[darcs-users] question mergers, revisited

David Roundy droundy at abridgegame.org
Wed Jan 28 12:22:03 UTC 2004

On Mon, Jan 19, 2004 at 12:49:07PM -0500, Mirian Crzig Lennox wrote:
> Back in December, I posted that I had been having some difficulty
> unwinding a particular hypothetical merger:
>     M(M(A,B),M(M(C,D),E))
> I began by unwinding the two halves,
>               C
>     A         M(C,D)
>     M(A,B)    M(M(C,D),E)
> then got stuck trying to reconcile patch A with M(C,D).  After staring
> at the problem for on three weeks, this is what I've come up with:
> * Since none of the mergers in either column involves A with C or D,
>   we may assume that AC' <=> CA' and AD' <=> DA' are valid
>   commutations.

Not quite.  A and M(C,D) are in parallel, so we know that A and M(C,D)
commute, but we need to use merge theorem to find

   A M(C',D') <-> M(C,D) A'

...and we then need to keep doing this sort of backwards commuting.

> * By definition, a merger comprises parallel patches; thus M(P1,P2) is
>   semantically equivalent to M(P2,P1) regardless of context.
>   Furthermore, for any simple patch P3,
>      if P1P3 <=> P3'P1' and P2P3 <=> P3'P2' then M(P1,P2)P3 <=> P3'M(P1'P2')

I don't think this is quite true.

(using for this email -P1 to indicate P1 inverse)

        -P1 P3 <-> P3' -P1'
         P3 P1 <-> P1' P3'' (this will be same P1' as first line by merge
                             theorem, but there is no guarantee that both
                             are valid commutes, so you have to check both)
         P3 P2 <-> P2' P3'''
        M(P1,P2)P3 <-> P3' M(P1',P2')

On top of this, I seem to recall that there is a corner case that needs to
be checked for, but this will at least get the common cases right.

> Consequently, my full unwinding works out to:
>      C'
>      M(C'D')
>      A
>      M(A,B)
>      M(M(A,B),M(M(C,D),E))
> Where C' and D' are C and D respectively commuted with A.
> Is this correct?

Yes, that is correct, except that I think your definition of C' and D' may
be off, depending on how you planned on doing the commutation with A.
David Roundy

More information about the darcs-users mailing list