
Formal denition of rewriting Given a set of objects A, an (abstract) rewriting system is a relation A A. R ⊆ × Example : Abstract Rewriting A = the set of nite sequences over , , . {◦ • •} ◦ • →1 • ◦ Rewriting system = 2 R • • → • • • ◦ →3 ◦ • 2 Closure notions An -rewrite sequence has the form R s = s0 s1 ... sn = t (for n 0). →R →R →R ≥ s + t is the transitive closure of . → →R = Ris the reexive closure. Example of -rewrite sequence R →R ∗ is the reexive transitive closure of . →R →R is the symmetrique closure. ↔R ∗ is the reexive, symetrique and transitive closure. ↔R 3 4 ◦ • • ◦ • • ◦ • • ↓ • ◦ • ◦ • • ◦ • • More basic vocabulary ↓ A term t is -reducible i there exists s s.t. t s. • ◦ • • ◦ • ◦ • • R →R A term t is in -normal form i it is no -reducible. ↓ R R A term s is a -normal form of t i t s and s is in R →∗ • ◦ • • ◦ • ◦ • • -normal form. R R ↓ • • ◦ • ◦ • ◦ • • ↓∗ • • • ◦ ◦ ◦ • • • 5 6 Same meaning for equivalent terms Dierent meaning for equivalent terms Given again is Church-Rosser i f(x, x) c R → = a b R u ∗ v → f(x, b) d ↔R → ∗R ∗R we can compute from the same term f(a, a) two dierent results c ↘ ↙ and d. s 7 8 Conuence notions Conuence diagrams is conuent i R A diagram like : t ∗ u →R t 1 u ↓∗R ↓∗R R v ∗ s →R R2 R3 v 4 s is locally conuent i R R reads : t u →R for all t, u, v such that t 1 u and t 2 v, R R ↓R ↓∗R there exist such that and . s u 3 s v 4 s v ∗ s R R →R 9 10 is strongly conuent i R t u →R ↓R ↓∗R v = s →R Equivalent notions has the diamond property i R Theorem : is Church-Rosser i is conuent. R R t u →R ↓R ↓R v s →R This is a particular case of strongly conuence. 11 12 Not equivalent notions Termination notions The following system [Curry] : The element s is -weakly normalising (WN) i s has at least R c a one normal form. → c d The element s is - strongly normalising (SN) i there is no = → R innite sequence i every -reduction R d c s = s0 s1 ... →R →R R → sequence starting at is nite. We note . d b s s SN → ∈ S The system is weakly normalising (WN) i every element is R is locally conuent but not conuent : WN. The system terminates or is strongly normalising (SN) or R noetherien or well-founded (WF) i every element is SN. a c ∗ b s ← → 13 14 Weak vs strong normalisation Convergent Systems Dénition : The system is convergent i it is conuent and f(a) c R = → strongly normalising. R f(x) f(a) → The system is weakly normalising but not strongly normalising : Remarque : f(b) f(a) c If is conuent, then every element has at most a normal form. R → → If is convergent, then every element has one and only one R normal form. In this case, we use the functional notation (t) to f(b) f(a) f(a) ... R → → denote the -normal form of t. R 15 16 Conuence from local conuence Important remark Lemma : (Newmann) Let be a SN system. Then is The following (innite) system on natural numbers : R R locally conuent i is conuent. 2.n 2.n + 1 R → Proof. (By Huet) By well-founded induction on s SN. 2.n a ∈ = → R 2.m + 1 2.m + 2 s t′ ∗ t → → → t′ < s 2.m + 1 b LC → ↓ u <↓∗ s ↓∗ ′ u′ ∗ v I.H. is locally conuent but not conuent : a 0 b → ↓∗ ← →∗ I.H. In fact it is not SN ↓∗ ↓∗ ↓∗ u ∗ p ∗ p′ → → 0 1 2 3 ... → → → → 17 18.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-