]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/reduction/crx.ma
- new component "s_transition" for the restored fqu and fquq
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / reduction / crx.ma
index a4509ec796e41e3343b4489cc1ff3ddfca40c175..c6c9626468a575fea7c97b53bbd2eae19c689399 100644 (file)
@@ -20,35 +20,35 @@ include "basic_2/reduction/crr.ma".
 
 (* activate genv *)
 (* extended reducible terms *)
-inductive crx (h) (g) (G:genv): relation2 lenv term ≝
-| crx_sort   : ∀L,k,d. deg h g k (d+1) → crx h g G L (⋆k)
-| crx_delta  : ∀I,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → crx h g G L (#i)
-| crx_appl_sn: ∀L,V,T. crx h g G L V → crx h g G L (ⓐV.T)
-| crx_appl_dx: ∀L,V,T. crx h g G L T → crx h g G L (ⓐV.T)
-| crx_ri2    : ∀I,L,V,T. ri2 I → crx h g G L (②{I}V.T)
-| crx_ib2_sn : ∀a,I,L,V,T. ib2 a I → crx h g G L V → crx h g G L (ⓑ{a,I}V.T)
-| crx_ib2_dx : ∀a,I,L,V,T. ib2 a I → crx h g G (L.ⓑ{I}V) T → crx h g G L (ⓑ{a,I}V.T)
-| crx_beta   : ∀a,L,V,W,T. crx h g G L (ⓐV. ⓛ{a}W.T)
-| crx_theta  : ∀a,L,V,W,T. crx h g G L (ⓐV. ⓓ{a}W.T)
+inductive crx (h) (o) (G:genv): relation2 lenv term ≝
+| crx_sort   : ∀L,s,d. deg h o s (d+1) → crx h o G L (⋆s)
+| crx_delta  : ∀I,L,K,V,i. ⬇[i] L ≡ K.ⓑ{I}V → crx h o G L (#i)
+| crx_appl_sn: ∀L,V,T. crx h o G L V → crx h o G L (ⓐV.T)
+| crx_appl_dx: ∀L,V,T. crx h o G L T → crx h o G L (ⓐV.T)
+| crx_ri2    : ∀I,L,V,T. ri2 I → crx h o G L (②{I}V.T)
+| crx_ib2_sn : ∀a,I,L,V,T. ib2 a I → crx h o G L V → crx h o G L (ⓑ{a,I}V.T)
+| crx_ib2_dx : ∀a,I,L,V,T. ib2 a I → crx h o G (L.ⓑ{I}V) T → crx h o G L (ⓑ{a,I}V.T)
+| crx_beta   : ∀a,L,V,W,T. crx h o G L (ⓐV. ⓛ{a}W.T)
+| crx_theta  : ∀a,L,V,W,T. crx h o G L (ⓐV. ⓓ{a}W.T)
 .
 
 interpretation
    "reducibility for context-sensitive extended reduction (term)"
-   'PRedReducible h g G L T = (crx h g G L T).
+   'PRedReducible h o G L T = (crx h o G L T).
 
 (* Basic properties *********************************************************)
 
-lemma crr_crx: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄.
-#h #g #G #L #T #H elim H -L -T
+lemma crr_crx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃T⦄.
+#h #o #G #L #T #H elim H -L -T
 /2 width=4 by crx_delta, crx_appl_sn, crx_appl_dx, crx_ri2, crx_ib2_sn, crx_ib2_dx, crx_beta, crx_theta/
 qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-fact crx_inv_sort_aux: ∀h,g,G,L,T,k. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → T = ⋆k →
-                       ∃d. deg h g k (d+1).
-#h #g #G #L #T #k0 * -L -T
-[ #L #k #d #Hkd #H destruct /2 width=2 by ex_intro/
+fact crx_inv_sort_aux: ∀h,o,G,L,T,s. ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃T⦄ → T = ⋆s →
+                       ∃d. deg h o s (d+1).
+#h #o #G #L #T #s0 * -L -T
+[ #L #s #d #Hkd #H destruct /2 width=2 by ex_intro/
 | #I #L #K #V #i #HLK #H destruct
 | #L #V #T #_ #H destruct
 | #L #V #T #_ #H destruct
@@ -60,13 +60,13 @@ fact crx_inv_sort_aux: ∀h,g,G,L,T,k. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ →
 ]
 qed-.
 
-lemma crx_inv_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃⋆k⦄ → ∃d. deg h g k (d+1).
+lemma crx_inv_sort: ∀h,o,G,L,s. ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃⋆s⦄ → ∃d. deg h o s (d+1).
 /2 width=5 by crx_inv_sort_aux/ qed-.
 
-fact crx_inv_lref_aux: ∀h,g,G,L,T,i. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → T = #i →
+fact crx_inv_lref_aux: ∀h,o,G,L,T,i. ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃T⦄ → T = #i →
                        ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I}V.
-#h #g #G #L #T #j * -L -T
-[ #L #k #d #_ #H destruct
+#h #o #G #L #T #j * -L -T
+[ #L #s #d #_ #H destruct
 | #I #L #K #V #i #HLK #H destruct /2 width=4 by ex1_3_intro/
 | #L #V #T #_ #H destruct
 | #L #V #T #_ #H destruct
@@ -78,12 +78,12 @@ fact crx_inv_lref_aux: ∀h,g,G,L,T,i. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ →
 ]
 qed-.
 
-lemma crx_inv_lref: ∀h,g,G,L,i. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃#i⦄ → ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I}V.
+lemma crx_inv_lref: ∀h,o,G,L,i. ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃#i⦄ → ∃∃I,K,V. ⬇[i] L ≡ K.ⓑ{I}V.
 /2 width=6 by crx_inv_lref_aux/ qed-.
 
-fact crx_inv_gref_aux: ∀h,g,G,L,T,p. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → T = §p → ⊥.
-#h #g #G #L #T #q * -L -T
-[ #L #k #d #_ #H destruct
+fact crx_inv_gref_aux: ∀h,o,G,L,T,p. ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃T⦄ → T = §p → ⊥.
+#h #o #G #L #T #q * -L -T
+[ #L #s #d #_ #H destruct
 | #I #L #K #V #i #HLK #H destruct
 | #L #V #T #_ #H destruct
 | #L #V #T #_ #H destruct
@@ -95,12 +95,12 @@ fact crx_inv_gref_aux: ∀h,g,G,L,T,p. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ →
 ]
 qed-.
 
-lemma crx_inv_gref: ∀h,g,G,L,p. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃§p⦄ → ⊥.
+lemma crx_inv_gref: ∀h,o,G,L,p. ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃§p⦄ → ⊥.
 /2 width=8 by crx_inv_gref_aux/ qed-.
 
-lemma trx_inv_atom: ∀h,g,I,G. ⦃G, ⋆⦄ ⊢ ➡[h, g] 𝐑⦃⓪{I}⦄ →
-                    ∃∃k,d. deg h g k (d+1) & I = Sort k.
-#h #g * #i #G #H
+lemma trx_inv_atom: ∀h,o,I,G. ⦃G, ⋆⦄ ⊢ ➡[h, o] 𝐑⦃⓪{I}⦄ →
+                    ∃∃s,d. deg h o s (d+1) & I = Sort s.
+#h #o * #i #G #H
 [ elim (crx_inv_sort … H) -H /2 width=4 by ex2_2_intro/
 | elim (crx_inv_lref … H) -H #I #L #V #H
   elim (drop_inv_atom1 … H) -H #H destruct
@@ -108,10 +108,10 @@ lemma trx_inv_atom: ∀h,g,I,G. ⦃G, ⋆⦄ ⊢ ➡[h, g] 𝐑⦃⓪{I}⦄ →
 ]
 qed-.
 
-fact crx_inv_ib2_aux: ∀h,g,a,I,G,L,W,U,T. ib2 a I → ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ →
-                      T = ⓑ{a,I}W.U → ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃W⦄ ∨ ⦃G, L.ⓑ{I}W⦄ ⊢ ➡[h, g] 𝐑⦃U⦄.
-#h #g #b #J #G #L #W0 #U #T #HI * -L -T
-[ #L #k #d #_ #H destruct
+fact crx_inv_ib2_aux: ∀h,o,a,I,G,L,W,U,T. ib2 a I → ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃T⦄ →
+                      T = ⓑ{a,I}W.U → ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃W⦄ ∨ ⦃G, L.ⓑ{I}W⦄ ⊢ ➡[h, o] 𝐑⦃U⦄.
+#h #o #b #J #G #L #W0 #U #T #HI * -L -T
+[ #L #s #d #_ #H destruct
 | #I #L #K #V #i #_ #H destruct
 | #L #V #T #_ #H destruct
 | #L #V #T #_ #H destruct
@@ -125,14 +125,14 @@ fact crx_inv_ib2_aux: ∀h,g,a,I,G,L,W,U,T. ib2 a I → ⦃G, L⦄ ⊢ ➡[h, g]
 ]
 qed-.
 
-lemma crx_inv_ib2: ∀h,g,a,I,G,L,W,T. ib2 a I → ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃ⓑ{a,I}W.T⦄ →
-                   ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃W⦄ ∨ ⦃G, L.ⓑ{I}W⦄ ⊢ ➡[h, g] 𝐑⦃T⦄.
+lemma crx_inv_ib2: ∀h,o,a,I,G,L,W,T. ib2 a I → ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃ⓑ{a,I}W.T⦄ →
+                   ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃W⦄ ∨ ⦃G, L.ⓑ{I}W⦄ ⊢ ➡[h, o] 𝐑⦃T⦄.
 /2 width=5 by crx_inv_ib2_aux/ qed-.
 
-fact crx_inv_appl_aux: ∀h,g,G,L,W,U,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → T = ⓐW.U →
-                       ∨∨ ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃W⦄ | ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃U⦄ | (𝐒⦃U⦄ → ⊥).
-#h #g #G #L #W0 #U #T * -L -T
-[ #L #k #d #_ #H destruct
+fact crx_inv_appl_aux: ∀h,o,G,L,W,U,T. ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃T⦄ → T = ⓐW.U →
+                       ∨∨ ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃W⦄ | ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃U⦄ | (𝐒⦃U⦄ → ⊥).
+#h #o #G #L #W0 #U #T * -L -T
+[ #L #s #d #_ #H destruct
 | #I #L #K #V #i #_ #H destruct
 | #L #V #T #HV #H destruct /2 width=1 by or3_intro0/
 | #L #V #T #HT #H destruct /2 width=1 by or3_intro1/
@@ -147,6 +147,6 @@ fact crx_inv_appl_aux: ∀h,g,G,L,W,U,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ 
 ]
 qed-.
 
-lemma crx_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃ⓐV.T⦄ →
-                    ∨∨ ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃V⦄ | ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ | (𝐒⦃T⦄ → ⊥).
+lemma crx_inv_appl: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃ⓐV.T⦄ →
+                    ∨∨ ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃V⦄ | ⦃G, L⦄ ⊢ ➡[h, o] 𝐑⦃T⦄ | (𝐒⦃T⦄ → ⊥).
 /2 width=3 by crx_inv_appl_aux/ qed-.