Contents
Page-10
Prev
Next
Page+10
Index
Matching and Substitution
match and sublis are inverse operations:
- (match pattern instance ) = bindings
- (sublis bindings pattern ) = instance
If we use a transformed pattern in the second equation, we can
form a rule that transforms instances:
- (match pattern instance ) = bindings
- (sublis bindings newpattern ) = newinstance
- transformation rule: pattern → newpattern
- (transform rule instance )
= (sublis (match pattern instance ) newpattern )