![]() |
|
| | |
| Craig Holman Research Jabberwocky Quotations Contact | |
| Home >
Jabberwocky      |
|
Jabberwocky for June 20, 2008 |
|
Proof that the Elegance Transformations are a Complete Set of Reductions    
This is an excerpt from my doctoral dissertation and was written in 1990. A gentle warning - This proof gave me serious headaches in 1990 and they came rushing back as I started transcribing it for this post. This should be the densest and hardest-to-read bit of writing that I'll post. I'm including it for completeness, but it can be accidentally overlooked without shame. I'd still encourage the brave and curious to read through the proof, even a few of the 36 mind-numbing cases in the proof of Lemma 2. IntroductionA set of transformations is a complete set of reductions (CSR) if and only if it is both noetherian and confluent. A set of transformations is said to be noetherian if every possible sequence of transformation applications to every structure in the set's domain is finite in length. One method for establishing the noetherianity of a set is to show that each transformation in the set necessarily reduces a particular measure of the structures in the set's domain. A set of transformations is said to be confluent if an exhaustive application of the transformations in the set to a structure in the set's domain will result in a unique normal form for that structure regardless of the order in which the applications are applied. Demonstrating that a set of transformations is a complete set of reductions is highly desirable for, once a set has been shown to be a CSR, we need only be concerned with the efficiency of the algorithm for applying the transformations exhaustively.
Definition 1 - A set of transformations is a complete set of reductions iff it is both noetherian and confluent.
Definition 2 - A rewriting system is locally confluent iff " M, M1, M2 [ ( M → M1 Ù M → M2 ) implies $ P ( M1 →* P Ù M2 →* P ) ] where M, M1, M2, and P are terms. (Le Chenadac 1986:17). For our purposes, a constraint tree is a term. Observe that, while M1 is not equal to M2, P may be M1, M2, or neither. It is possible for the application of one transformation to both obviate and preclude the application of a second application.
Lemma 1 - The elegance transformations are noetherian.
Proof. Each of the eight elegance transformations reduces the weight of a constraint tree by some combination of releasing nodes, releasing constraints, and moving constraints closer to the root of the tree. An application of the Delete-Inconsistent-Handle transformation results in the relase of at least one AND node and one constraint. An application of the Promote-Common-Constraints transformation results in a reduction of the distance from the root to at least one constraint by two edges. An application of the Subtract-Redundant-Constraints transformation results in the release of at least one constraint. An applicationof the Cut-Unnecessary-OR transformation results in the release of one OR node and one AND Node. In addition, constraints may be released, and nodes and constraints may be moved closer to the root. An application of the Cut-Unnecessary-AND transformation results in the release of one OR node and one AND node. In addition, nodes and constraints may be moved closer to the root. An application of the 0-Constraint-Subsumption transformation results in the release of at least one AND node and one OR node. In addition, any nodes or constraints which are in the tree rooted at the POA's parent will be released. An application of the 1-Constraint-Subsumption transformation results in the release of at least one constraint. Since the weight of a constraint tree is finite, and the application of any of the elegance transformations necessarily reduces the weight of a constraint tree, there exists an upper bound on the number of times that any of the elegance transformations may be applied to a constraint tree, regardless of the transformations selected, or the order in which they are applied. Q.E.D.
Two applications will be said to interact iff the intersection of the critical set of one application and the modification set of the other application is not empty. If APP1 and APP2 do not interact, then <APP1, APP2> = <APP2, APP1>
Lemma 2 - The elegance transformations are locally confluent.
Proof - By Definition 2, the elegance transformations are locally confluent iff, for every pair R1 and R2 of transformations selected from the elegance transformations, every constraint tree T, every POA1 in T at which R1 may be applied, and every POA2 in T at which R2 may be applied, there exist two sequences of applications, S1 and S2, such that the first application in S1 is R1:POA1, the first application in S2 is R2:POA2, S1 and S2 both contain zero or more additional applications of an elegance transformation to a POA in T, and S1 applied to T is equal to S2 applied to T. In order to prove that the elegance transformations are locally confluent, we will consider each of the 36 distinct pairs of transformations drawn from the elegance transformations. For each pair of transformations, we will identify the conditions under which applications of these transformations interact, and exhibit, for each case, sequences of applications which allow the different paths to converge. For each pair of transformations discussed, the following notation will be used:
Note that APP1 may equal APP2, POA1 may equal POA2, and DSN1 may equal DSN2.
Case 1 : InconHandle and InconHandle Interactions
APP1 and APP2 interact iff the parent of the DSN of one application is in the handle of the other. If DSN1 and DSN2 coincide, then <APP1> = <APP2>. If DSN1 dominates DSN2, then <APP1> = <APP2, APP1>. Similarly, if DSN2 dominates DSN1, then <APP2> = <APP1, APP2>. By Lemma 1, if DSN1 and DSN2 are siblings, then <APP1, APP2> = <APP2, APP1>. If the parent of one DSN dominates, but is not the parent of, the other, then <APP1, APP2> = <APP2, APP1>.
Case 2 : InconHandle and Promote Interactions
APP1 and APP2 interact if DSN1's parent and POA2's parent share a branch. If DSN1 dominates POA2, then <APP1> = <APP2, APP1>. If POA2 dominates DSN1, but does not coincide with DSN1's parent, then <APP1, APP2> = <APP2, APP1>. If DSN1's parent and POA2 coincide, then there are two subcases to consider. Performing APP1 first will remove one of POA2's children, but the intersection of the guard sets of POA2's children will still not be empty. Performing APP2 first will not alter POA1's handle set. Therefore, the two applications may be performed independently, and <APP1, APP2> = <APP2, APP1>.
Case 3 : InconHandle and Redundant Interactions
APP1 and APP2 interact if DSN1's parent and POA2 share a branch. However, since only one application involves deletion, we need only consider cases where DSN1 and POA2 share a branch. If DSN1 dominates or coincides with POA2, then <APP1> = <APP2, APP1>. If POA2 dominates DSN1, then APP2 will not alter the handle set of POA1, and APP2 does not obviate APP1. Therefore, <APP1, APP2> = <APP1>.
Case 4 : InconHandle and OrCut Interactions
APP1 and APP2 interact if DSN1's parent and POA2's parent share a branch. However, since only one application involves deletion, we need only consider cases wehre DSN1 and POA2's parent share a branch. If DSN1 dominates POA2, then APP1 obviates, but is not obviated by, APP2. Since OrCut does not alter any branch sets, if POA2's parent dominates DSN1, then <APP1, APP2> = <APP2, APP1>. Note that POA2 can not be DSN1's parent, since POA2 only has one child, and a DSN must either have a sibling or be the root of the tree.
Case 5 : InconHandle and AndCut Interactions
APP1 and APP2 interact if DSN1's parent and POA2's parent share a branch. However, since only one application involves deletion, we need only consider cases where DSN1 and POA2's parent share a branch. If POA1 and POA2 coincide, then POA1's grandparent's handle is inconsistent, since POA1 contributes no constraints to its handle set. Therefore, POA1's grandparent is a site for InconHandle, and <APP1, InconHndle:POA1's grandparent> = <APP2, InconHandle:POA1's grandparent>. If DSN1 and POA2 coincide, and POA1 and POA2 do not coincide, then performing APP2 first will change the DSN for APP1, but the new DSN will have the same parent as the prior DSN, and the effect of the deletion will be the same. Therefore, <APP1> = <APP2, APP1>. If DSN1 dominates POA2, and POA1 and POA2 do not coincide, then <APP1> = <APP2, APP1>. If POA2 dominates DSN1, then <APP1, APP2> = <APP2, APP1>.
Case 6 : InconHandle and 0Subsume Interactions
APP1 and APP2 interact if DSN1's parent and POA2's parent share a branch. However, since only one application involves deletion, we need only consider the case where DSN1 and POA2's parent share a branch. If DSN1 either dominates or coincides with POA2's parent, then <APP1> = <APP2, APP1>. If POA2 dominates DSN1, then APP2 obviates APP1, and <APP2> = <APP1, APP2>.
Case 7 : InconHandle and 1Subsume Interactions
APP1 and APP2 interact iff the parent of the DSN of one application is in the handle of the other. If DSN1 and DSN2 coincide, then the two applications have identical effects, and each obviates the other. Therefore, <APP1> = <APP2>. If DSN1 dominates DSN2, then APP1 obviates, but is not obviated by, APP2. Therefore, <APP1> = <APP2, APP1>. Similarly, if DSN2 dominates DSN1, then <APP2> = <APP1, APP2>. By Lemma 1, if DSN1 and DSN2 are siblings, then <APP1, APP2> = <APP2, APP1>. If the parent of one DSN dominates, but is not the parent of, the other, then the two applications may be performed independently, and <APP1, APP2> = <APP2, APP1>.
Case 8 : InconHandle and 1CCSubtract Interactions
APP1 and APP2 interact if the parent of DSN1 is in the handle of POA2. However, since only one application involves deletion, we may consider only the cases where DSN1 is in the handle of POA2. We shall assume that APP2 is supported by the constraint X in the guard set of node COM2. The guard set of POA2 contains the opposite of X. If POA1's hand set is inconsistent only because it contains both X and the opposite of X, then there are two subcases to consider. If COM2's dominant set contains X, then COM2's parent is a site for 0Subsume, and <APP1, 0Subsume:COM2's parent> = <APP2, 0Subsume:COM2's parent>. If COM2's dominant set does not contain X, then COM2 must command a node (POA3) in the handle of POA1 which contains X, in which case this node in the handle of X is a site for 1Subsume. If POA2 dominates DSN3, then <APP1, 1Subsume:POA3, APP2> = <APP2, 1Subsume:POA3>; otherwise, <APP1, 1Subsume:POA3> = <APP2, 1Subsume:POA3>. If POA1's handle set is inconsistent on some variable other than that which is constrained by X, then performing APP2 first can have no effect on the inconsistency of POA1's handle. If it is also the case that POA2 dominates DSN1, then <APP1, APP2> = <APP2, APP1>; otherwise, <APP1> = <APP2, APP1>.
Case 9 : Promote and Promote Interactions
APP1 and APP2 interact if POA1 and POA2 coincide, or if either POA is the grandparent of the other. If POA1 and POA2 coincide, then <APP1, APP2> = <APP2, APP1>. If POA1 is the grandparent of POA2, then APP2 may raise one or ore constraints which will permit a new constraint to be promoted by APP2. Therefore, either <APP1, APP2> = <APP2, APP1>, or <APP1, APP2, APP1> = <APP2, APP1>. Similarly, if POA2 is the grandparent of POA1, then either <APP1, APP2> = <APP2, APP1> or <APP1, APP2> = <APP2, APP1, APP2>.
Case 10 : Promote and Redundant Interactions
APP1 and APP2 interact if POA1 is the parent of POA2. If POA1 is the parent of POA2, then either the intersection of the set of constraints being promoted and the set of redundant constraints being subtracted is empty, or it is not. If the intersection set is empty, then <APP1, APP2> = <APP2, APP1>. If the intersection set is not empty, then POA1's parent may be a site for Promote, and <APP1, APP2, Promote:POA1's parent> = <APP2, APP1>, or <APP1, APP2, Promote:POA1's parent> = <APP1, APP2, Promote:POA1's parent>, or <APP1, APP2> = <APP2, APP1>, depending on whether POA1's parent was previously a site for Redundant, and whether any new constraints were added to POA1's parent's guard set by APP1.
Case 11 : Promote and OrCut Interactions
App1 and APP2 interact if POA1 and POA2 coincide, or if either POA is the grandparent of the other. if POA1 and POA2 coincide, then APP1 and APP2 result in identical trees, and <APP1> = <APP2>. If POA1 is the grandparent of POA2, then it is possible that APP2 may raise a constraint which would permit a new constraint to be promoted by APP1. Therefore, either <APP1, APP2> = <APP2, APP1> or <APP1, APP2, APP1> = <APP2, APP1>. If POA2 is the grandparent of POA1, then <APP1, APP2> = <APP2, APP1>.
Case 12 : Promote and AndCut Interactions.
APP1 and APP2 do not interact. Note that POA1 can not be the parent of POA2, since each child of the POA of a promotion must contain at least one constraint. Also, POA2 can not be the parent of POA1 since, by the definition of AndCut, no child of an AndCut site can be a site for Promote. Therefore, <APP1, APP2> = <APP2, APP1>.
Case 13 : Promote and 0Subsume Interactions
APP1 and APP2 interact if POA2 dominates POA1. If POA2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 14 : Promote and 1Subsume Interactions
APP1 and APP2 interact if POA1 is the parent of COM2 or if DSN2 dominates POA2. If POA1 is the parent of COM2, and the constraint in COM2 would be promoted by APP1, then POA1 would be a site for 0Subsume after APP1 had been performed. Therefore, <APP1, 0Subsume:POA1> = <APP2, APP1, 0Subsume:POA1>. If DSN2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 15 : Promote and 1CCSubtractInteractions
APP1 and APP2 interact if POA1 is the parent of POA2. If POA1 is the parent of both POA2 and COM2, then <APP1, 0Subsume:COM2> = <APP2, APP1, 0Subsume:COM2>. If POA1 is the parent of POA2, but not of COM2, then either <APP1, APP2> = <APP2, APP1>, or <APP1> = <APP1, APP2>, depending on whether the constraint in COM2 would be promoted by APP1.
Case 16 : Redundant and Redundant Interactions
APP1 and APP2 interact if either POA is in the handle of the other. If POA1 and POA2 coincide, then <APP1, APP2> = <APP2, APP1>. If POA1 dominates POA2, then performing APP1 first will not change the dominant set of POA2, and <APP1, APP2> = <APP2, APP1>. Similarly, if POA2 dominates POA1, then <APP1, APP2> = <APP2, APP1>.
Case 17 : Redundant and OrCut Interactions
APP1 and APP2 interact if POA2 dominates POA1, or if POA1 is the parent of POA2. If POA2 dominates POA1, then <APP2, APP1> = <APP1, APP2>, for OrCut does not modify any selection sets. If POA1 is the parent of POA2, then <APP1, APP2> = <APP2, APP1>.
Case 18 : Redundant and AndCut Interactions
APP1 and APP2 interact if POA2 dominates POA1. If POA2 dominates POA1, then <APP1, APP2> = <APP2, APP1>, for AndCut does not modify any selection sets.
Case 19 : Redundant and 0Subsume Interactions
APP1 and APP2 interact if POA2 dominates POA1. If POA2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 20 : Redundant and 1Subsume Interactions
APP1 and APP2 interact if POA1 and COM2 coincide, if POA1 and POA2 coincide, or if DSN2 dominates POA1. Let X be the constraint which is in the guard set of COM2. If POA1 and POA2 coincide, then either COM2 is dominated by a node containing X, or COM2 commands a node POA3 containing X which, in turn, dominates POA1. In the first case, COM2 is a site for Redundant, after which its parent would be a site for 0Subsume, and <APP1, Redundant:COM2, 0Subsume:COM2's parent> = <APP2, Redundant:COM2, 0Subsume:COM2's parent>. In the second case, POA3 is a site for 1Subsume, which would obviate, but not be affected by, APP1 and APP2, so that <APP1, 1Subsume:POA3> = <APP2, 1Subsume:POA3>. If DSN2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 21 : Redundant and 1CCSubtract Interactions
APP1 and APP2 interact if POA1 and COM2 coincide, or if POA2 is in POA1's handle. If POA1 and COM2 coincide, then <APP1, 0Subsume:POA1's parent> = <APP2, APP1, 0Subsume:POA1's parent>. If POA2 dominates POA1, then <APP1, APP2> = <APP2, APP1>. If POA2 and POA1 coincide, and the constraint which APP2 will subtract is among those which APP1 will subtract, then <APP1> = <APP2, APP1>. If the constraint which APP2 will subtract is not among those which APP1 will subtract, then <APP1, APP2> = <APP2, APP1>.
Case 22 : OrCut and OrCut Interactions
APP1 and APP2 interact if POA1 and POA2 coincide. If POA1 and POA2 coincide, then <APP1> = <APP2>.
Case 23 : OrCut and AndCut Interactions
APP1 and APP2 interact if either POA is the parent of the other. If POA1 is the parent of POA2, then APP1 and APP2 result in identical trees, and <APP1> = <APP2>. If POA2 is the parent of POA1, then APP1 and APP2 result in identical trees, and <APP1> = <APP2>.
Case 24 : OrCut and 0Subsume Interactions
APP1 and APP2 interact if POA1 and POA2 coincide, or if POA2 dominates POA1. If POA1 and POA2 coincide, the APP1 and APP2 result in identical trees, and <APP1> = <APP2>. If POA2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 25 : OrCut and 1Subsume Interactions
APP1 and APP2 interact if POA1 is the parent of POA2, or if DSN2 dominates POA1. If POA1 is the parent of POA2, then DSN2 must dominate POA1, and <APP2> = <APP1, APP2>. If DSN2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 26 : OrCut and 1CCSubtract Interactions
APP1 and APP2 interact if either POA is the parent of the other. If POA1 is the parent of POA2, then <APP1, 1CCSubtract:POA1's parent> = <APP2, APP1>. If POA2 is the parent of POA1, then <APP1, APP2> = <APP2, APP1>.
Case 27 : AndCut and AndCut Interactions
APP1 and APP2 interact if POA1 and POA2 coincide. If POA1 and POA2 coincide, then <APP1> = <APP2>.
Case 28 : AndCut and 0Subsume Interactions
APP1 and APP2 interact if POA1 is the parent of POA2, or if POA2 dominates POA1. If POA1 is the parent of POA2, then POA1 will become a site for 0Subsume after APP2, so that <APP1, APP2> = <APP2, 0Subsume:POA1>. If POA2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 29 : AndCut and 1Subsume Interactions
APP1 and APP2 interact if DSN2 dominates POA1. If DSN2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 30 : AndCut and 1CCSubtract Interactions
APP1 and APP2 do not interact. Therefore, <APP1, APP2> = <APP2, APP1>.
Case 31 : 0Subsume and 0Subsume Interactions
APP1 and APP2 interact if POA1 and POA2 coincide, or if either POA dominates the other. If POA1 and POA2 coincide, then <APP1> = <APP2>. If POA1 dominates POA2, then <APP1> = <APP2, APP1>. Similarly, if POA2 dominates POA1, then <APP2> = <APP1, APP2>.
Case 32 : 0Subsume and 1Subsume Interactions
APP1 and APP2 interact if POA1 and DSN2 share a branch. If POA1 dominates DSN2, then <APP1> = <APP2, APP1>. If DSN2 dominates or coincides with POA1, then POA2 dominates POA1 and <APP2> = <APP1, APP2>.
Case 33 : 0Subsume and 1CCSubtract Interactions
APP1 and APP2 interact if POA1 dominates POA2. If POA1 dominates POA2, then <APP1> = <APP2, APP1>.
Case 34 : 1Subsume and 1Subsume Interactions
APP1 and APP2 interact if DSN1 and DSN2 share a branch or a parent, or if either POA and the COM for the other POA coincide. If DSN1 and DSN2 coincide, then <APP1> = <APP2>. If DSN1 dominates DSN2, then <APP1> = <APP2, APP1>. If DSN2 dominates DSN1, then <APP2> = <APP1, APP2>. If DSN1 and DSN2 are siblings, then <APP1, APP2> = <APP2, APP1>. If POA1 and COM2 coincide, then COM1 and COM2 have the same constraint, COM1 commands POA2, and <APP1, APP2> = <APP2, APP1>. Similarly, if POA2 and COM1 coincide, then <APP1, APP2> = <APP2, APP1>.
Case 35 : 1Subsume and 1CCSubtract Interactions
APP1 and APP2 interact if DSN1 is in POA2's handle, or if POA2 and COM1 coincide. If DSN1 dominates POa2, then APP1 obviates but is not affected by APP2, and <APP1> = <APP2, APP1>. If DSN1 and POA2 coincide, but DSN1 and POA1 do not coincide, then APP1 obviates but is not affected by APP2, and <APP1> = <APP2, APP1>. If POA1 and POA2 coincide, then either the constraint in COM1 is the negation of the constraint in COM2, or it is not. If COM1 and COM2 have opposing constraints, then APP2 will preclude APP1. If this happens, however, then COM1 commands COM2, COM2 commands COM1, or they command each other, and the COM which is closer to POA1 will be a site for 1CCSubtract, and its parent will be a site for a subsequent application of 0Subsume, so that <APP1> = <APP2, 1CCSubtract:lower COM, 0Subsume:parent of lower COM>. However, if COM1 and COM2 do not have opposing constraints, then APP1 obviates but is not afffected by APP2, and <APP1> = <APP2, APP1>. If POA2 and COM1 coincide, then APP2 will cause COM1's parent ot be a site for 0Subsume, which obviates APP1, so that <APP1, APP2, 0Subsume:COM1's parent> = <APP2, 0Subsume:COM1's parent>.
Case 36 : 1CCSubtract and 1CCSubtract Interactions
APP1 and APP2 interact if if POA1 and POA2 coincide, or if either POA coincides with the other POA's COM. If POA1 and POA2 coincide and APP1 and APP2 subtract the same constraint, then APP1 obviates and is obviated by APP2, and <APP1> = <APP2>. If POA1 and POA2 coincide and APP1 and APP2 do not subtract the same constraint, then the two applications may be applied independently, and <APP1, APP2> = <APP2, APP1>. If POA1 and COM2 coincide, then APP1 precludes, but is not affected by, APP2. However, POA2 must be a site for Redundant, so that <APP1, Redundant:POA2> = <APP2, APP1>. Similarly, if POA2 and COM1 coincide, then <APP2, Redundant:POA1> = <APP1, APP2>.
Since each of the 36 distinct pairs of transformation drawn from the elegance transformations supports the criterion for local confluence stated in Definition 2, the elegance transformations are locally confluent. Q.E.D.
Lemma 3 (Newman) - Let R be a noetherian rewriting system, then: R is confluent iff R is locally confluent.
A discussion of Huet's proof of Newman's lemma may be found in (Le Chenandec 1986:17).
Lemma 4 - The elegance transformations are confluent.
Proof. By Lemma 1, the elegance transformations are noetherian. By Lemma 2, the elegance transformations are locally confluent. Since the elegance transformations are both noetherian and locally confluent, the the elegance transformations are confluent, by Lemma 3. Q.E.D.
Theorem - The elegance transformations are a complete set of reductions.
Proof. By definition, a set of transformation sis a complete set of transformations iff the set of transformations is both noetherian and confluent. Since the elegance transformations are noetherian, by Lemma 1, and confluent, by Lemma 4, the elegance transformations are a complete set of reductions. Q.E.D.
References
Le Chenandec, P. Canonical Forms in Finitely Presented Algebras. John Wiley & Sons, New York, N.Y., 1986.
     |
| Home >
Jabberwocky      |
|
| Craig Holman Research Jabberwocky Quotations Contact | |
| Patterncraft and Constraint and Consequence are trademarks of Craig Stewart Holman Copyright © 2008 Craig Stewart Holman All Rights Reserved. |
|
| | |
![]() |
|