<br><br><div class="gmail_quote">On Thu, Oct 29, 2009 at 6:50 AM, Heinrich Apfelmus <span dir="ltr">&lt;<a href="mailto:apfelmus@quantentunnel.de">apfelmus@quantentunnel.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Jason Dagit wrote:<br>
&gt; Heinrich Apfelmus wrote:<br>
<div class="im">&gt;&gt; Eric Kow wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; You may be interested in a related (but seemingly different) test for<br>
&gt;&gt;&gt; something the OT people call &#39;convergence&#39;.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  <a href="http://darcs.net/tests/failing-issue1609_ot_convergence.sh" target="_blank">http://darcs.net/tests/failing-issue1609_ot_convergence.sh</a><br>
&gt;&gt;&gt;<br>
&gt;&gt; It appears to me that, in terms of commutators, this &#39;convergence&#39; property<br>
&gt;&gt; from OT is to be expressed as follows:<br>
&gt;&gt;<br>
&gt;&gt;  patches C, A, B in that order<br>
&gt;&gt;<br>
&gt;&gt;  if A B      commutes to  B&#39;      A&#39;   and<br>
&gt;&gt;     C (AB)   commutes to  (AB)&#39;   C1&#39;  and<br>
&gt;&gt;     C (B&#39;A&#39;) commutes to  (B&#39;A&#39;)&#39; C2&#39;<br>
&gt;&gt;  then<br>
&gt;&gt;     (AB)&#39; C1&#39; and (B&#39;A&#39;)&#39; C2&#39; should have the same effect<br>
&gt;&gt;<br>
&gt;&gt; In particular, I have chosen<br>
&gt;&gt;<br>
&gt;&gt;  C = invert op3<br>
&gt;&gt;  A = op1<br>
&gt;&gt;  B = T(op2,op1)<br>
<br>
</div>(This is the property TP2 from<br>
<br>
     <a href="http://en.wikipedia.decenturl.com/ot-convergence" target="_blank">http://en.wikipedia.decenturl.com/ot-convergence</a><br>
<br>
translated to darcs-style patch theory.)<br>
<div class="im"><br>
&gt; I&#39;m having trouble understanding this because in darcs we don&#39;t have a<br>
&gt; primitive to commute two patches.  We can do this by repeated commutes<br>
&gt; though.  So, if you defined C (AB) commutes to (AB)&#39; C1&#39;, as something along<br>
&gt; the lines of A&#39;B&#39;C1&#39;, then I&#39;d be happier.<br>
<br>
</div>Yes, I meant &quot; C (AB) commutes to  (AB)&#39; C1&#39; &quot; to be some kind of<br>
shorthand notation that says that C can be commuted past A and B<br>
   ___       _____<br>
   C A B &lt;-&gt; Ac Ca B &lt;-&gt; Ac Bc C1&#39;<br>
                ^^^^        ^^^^^<br>
with the understanding that<br>
<br>
   (AB)&#39; := Ac Bc<br>
<br>
and likewise for &quot; C (B&#39; A&#39;) &lt;-&gt; (B&#39; A&#39;) C2&#39; &quot;.<br>
<br>
<br>
Note however that in his paper, Judah extends commutation to sequences<br>
of patches and proves that things like the above work as expected. This<br>
is very handy!<br>
<div class="im"><br>
<br>
&gt;&gt; What my curiosity asks is slightly different, namely whether<br>
&gt;&gt;<br>
&gt;&gt;    if A B   commutes to  B&#39; A&#39;    and<br>
&gt;&gt;       C A   commutes to  Ac  Ca   and<br>
&gt;&gt;       C B&#39;  commutes to  B&#39;c Cb<br>
&gt;&gt;    then<br>
&gt;&gt;      do  Ca B  or  Cb A&#39;  actually commute as well?<br>
&gt;&gt;<br>
&gt;&gt; In other words, it asks whether the postulated commutations in the<br>
&gt;&gt; convergence property actually hold. It could well be possible to commute the<br>
&gt;&gt; C past the A and the C past the B&#39; separately, but impossible to commute C<br>
&gt;&gt; past both at the same time.<br>
&gt;&gt;<br>
&gt;<br>
&gt; Ah, yes, so we&#39;re wondering about the same thing.<br>
<br>
</div>Not sure, but hopefully yes. :)<br>
<div class="im"><br>
&gt; Using Judah&#39;s idea of sensible sequence, and the &#39;intent&#39; of patch theory<br>
&gt; that says reordering a sequence via commute to another sensible sequence<br>
&gt; doesn&#39;t change the state of the pristine, then we should have either a<br>
&gt; theorem, lemma, or axiom that states if C A commutes to Ac Ca, and AB<br>
&gt; commutes to B&#39;A&#39;, then Ca B commutes.<br>
<br>
</div>This is not true verbatim; you forgot the premise that  C B&#39;  should<br>
commute as well. Maybe you meant to include it?<br>
<br>
Counterexample to the weaker version:<br>
<br>
   C = create file &quot;foo&quot;<br>
   A = change file &quot;useless-bystander&quot;<br>
   B = delete file &quot;foo&quot;<br>
<br>
In other words, the changes C and B cannot be interchanged while A is<br>
independent of both. Then,<br>
<br>
   C A &lt;-&gt; Ac Ca<br>
   A B &lt;-&gt; B&#39; A&#39;<br>
<br>
but  Ca B  does not commute.<br>
<div class="im"><br>
<br>
&gt; The &#39;intent&#39; of patch theory is that C A and Ac Ca give the same pristine<br>
&gt; state.  C and Ca represent the same transformation, but with different<br>
&gt; domains (which means in the patch format we tweak the representation so that<br>
&gt; a hunk applies to a different line in the file than it used it, as an<br>
&gt; example).  In other words, if C A is sensible and Ac Ca is sensible, we want<br>
&gt; them to mean the same thing.  That is, Ca and C are different<br>
&gt; representations of the same transformation.  So if one of them commutes with<br>
&gt; B or B&#39; then the other one should as well, assuming all the results are<br>
&gt; sensible sequences.<br>
<br>
</div>Yes, exactly. (I&#39;m not sure whether Judah&#39;s notion of  sensible  applies<br>
here, however, at least in its current formalization.)<br>
<br>
<br>
My amusing (to me) observation was that this &quot;intuitively correct&quot;<br>
property is equivalent to the following property about merges:<br>
<br>
Consider three concurrent patches<br>
<br>
   X = C^(-1)   inverse of C<br>
   Y = A<br>
   Z = B&#39;<br>
<br>
   visually:<br>
<br>
         +-- X                 +-- C --&lt;<br>
         |                     |<br>
     &gt;---+-- Y        &lt;=&gt;      +-- A (-- B)<br>
         |                     |<br>
         +-- Z                 +-- B&#39;<br>
<br>
     X Y Z concurrent &lt;=&gt;      C A B in sequence<br>
<br>
such that<br>
<br>
   X and Y  can be merged  (i.e. X and Y^(-1) commute)<br>
   Y and Z  can be merged  (...)<br>
   Z and X  can be merged  (...)<br></blockquote><div><br></div><div>I don&#39;t understand the setup of this example.  What does it mean for two or more patches to be concurrent?  Also, the notation for your diagram is unfamiliar so I need an explanation of the symbols (&gt;--) vs. (--&lt;), (-- B), what does + represent, etc.  At first I thought it was an ASCII art tree, but if that is true why do you say C A B is a sequence when they appear to branch from the same level of the tree?  And I think you might have more than one notation for inverses, C^(-1) vs. (--B).</div>
<div><br></div><div>Do you think it would help if we used the context notation here?  For example, this is what I think you mean:</div><div><br></div><div>oXx, oYy, oZz, would mean that X, Y, and Z all have the same pre-context (meaning they all apply to the same sequence of patches).</div>
<div><br></div><div>and you have, iCcAaBb  as a sequence.  So then, I think you mean to commute A and B so that we get cB&#39;d.</div><div><br></div><div>In this notation the lower case letters represent the context of the patches.  The context before the patch is the pre-context and it is where the patch applies, similar to the domain of a function. The post-context is the resulting context from applying the patch (so, c = i with C on the end).  When patches are in a sequence we omit the contexts that are implied or redundant.</div>
<div><br></div><div>Thanks,</div><div>Jason</div></div>