]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/rt_computation/lpxs.ma
milestone update in basic_2, update in ground and static_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / lpxs.ma
index b6c91c8b124135cc7625cb1789b3e4bf9e7a8748..17f352a9c6e3fbff8a1d2fbdb4a253d4c1b4876e 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/predsnstar_5.ma".
-include "basic_2/reduction/lpx.ma".
-include "basic_2/computation/lprs.ma".
+include "basic_2/notation/relations/predtysnstar_3.ma".
+include "static_2/relocation/lex.ma".
+include "basic_2/rt_computation/cpxs_ext.ma".
 
-(* SN EXTENDED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *******************)
+(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS *************)
 
-definition lpxs: ∀h. sd h → relation3 genv lenv lenv ≝
-                 λh,o,G. TC … (lpx h o G).
+definition lpxs (G): relation lenv ≝
+           lex (cpxs G).
 
-interpretation "extended parallel computation (local environment, sn variant)"
-   'PRedSnStar h o G L1 L2 = (lpxs h o G L1 L2).
-
-(* Basic eliminators ********************************************************)
-
-lemma lpxs_ind: ∀h,o,G,L1. ∀R:predicate lenv. R L1 →
-                (∀L,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L → ⦃G, L⦄ ⊢ ➡[h, o] L2 → R L → R L2) →
-                ∀L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → R L2.
-#h #o #G #L1 #R #HL1 #IHL1 #L2 #HL12
-@(TC_star_ind … HL1 IHL1 … HL12) //
-qed-.
-
-lemma lpxs_ind_dx: ∀h,o,G,L2. ∀R:predicate lenv. R L2 →
-                   (∀L1,L. ⦃G, L1⦄ ⊢ ➡[h, o] L → ⦃G, L⦄ ⊢ ➡*[h, o] L2 → R L → R L1) →
-                   ∀L1. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → R L1.
-#h #o #G #L2 #R #HL2 #IHL2 #L1 #HL12
-@(TC_star_ind_dx … HL2 IHL2 … HL12) //
-qed-.
+interpretation
+  "extended parallel rt-computation on all entries (local environment)"
+  'PRedTySnStar G L1 L2 = (lpxs G L1 L2).
 
 (* Basic properties *********************************************************)
 
-lemma lprs_lpxs: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡* L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2.
-/3 width=3 by lpr_lpx, monotonic_TC/ qed.
-
-lemma lpx_lpxs: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2.
-/2 width=1 by inj/ qed.
+(* Basic_2A1: uses: lpxs_pair_refl *)
+lemma lpxs_bind_refl_dx (G):
+      ∀L1,L2. ❪G,L1❫ ⊢ ⬈* L2 →
+      ∀I. ❪G,L1.ⓘ[I]❫ ⊢ ⬈* L2.ⓘ[I].
+/2 width=1 by lex_bind_refl_dx/ qed.
 
-lemma lpxs_refl: ∀h,o,G,L. ⦃G, L⦄ ⊢ ➡*[h, o] L.
-/2 width=1 by lprs_lpxs/ qed.
+lemma lpxs_pair (G):
+      ∀L1,L2. ❪G,L1❫ ⊢ ⬈* L2 →
+      ∀V1,V2. ❪G,L1❫ ⊢ V1 ⬈* V2 →
+      ∀I. ❪G,L1.ⓑ[I]V1❫ ⊢ ⬈* L2.ⓑ[I]V2.
+/2 width=1 by lex_pair/ qed.
 
-lemma lpxs_strap1: ∀h,o,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L → ⦃G, L⦄ ⊢ ➡[h, o] L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2.
-/2 width=3 by step/ qed.
-
-lemma lpxs_strap2: ∀h,o,G,L1,L,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L → ⦃G, L⦄ ⊢ ➡*[h, o] L2 → ⦃G, L1⦄ ⊢ ➡*[h, o] L2.
-/2 width=3 by TC_strap/ qed.
-
-lemma lpxs_pair_refl: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → ∀I,V. ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡*[h, o] L2.ⓑ{I}V.
-/2 width=1 by TC_lpx_sn_pair_refl/ qed.
+lemma lpxs_refl (G):
+      reflexive … (lpxs G).
+/2 width=1 by lex_refl/ qed.
 
 (* Basic inversion lemmas ***************************************************)
 
-lemma lpxs_inv_atom1: ∀h,o,G,L2. ⦃G, ⋆⦄ ⊢ ➡*[h, o] L2 → L2 = ⋆.
-/2 width=2 by TC_lpx_sn_inv_atom1/ qed-.
+(* Basic_2A1: was: lpxs_inv_atom1 *)
+lemma lpxs_inv_atom_sn (G):
+      ∀L2. ❪G,⋆❫ ⊢ ⬈* L2 → L2 = ⋆.
+/2 width=2 by lex_inv_atom_sn/ qed-.
+
+lemma lpxs_inv_bind_sn (G):
+      ∀I1,L2,K1. ❪G,K1.ⓘ[I1]❫ ⊢ ⬈* L2 →
+      ∃∃I2,K2. ❪G,K1❫ ⊢ ⬈* K2 & ❪G,K1❫ ⊢ I1 ⬈* I2 & L2 = K2.ⓘ[I2].
+/2 width=1 by lex_inv_bind_sn/ qed-.
+
+(* Basic_2A1: was: lpxs_inv_pair1 *)
+lemma lpxs_inv_pair_sn (G):
+      ∀I,L2,K1,V1. ❪G,K1.ⓑ[I]V1❫ ⊢ ⬈* L2 →
+      ∃∃K2,V2. ❪G,K1❫ ⊢ ⬈* K2 & ❪G,K1❫ ⊢ V1 ⬈* V2 & L2 = K2.ⓑ[I]V2.
+/2 width=1 by lex_inv_pair_sn/ qed-.
+
+(* Basic_2A1: was: lpxs_inv_atom2 *)
+lemma lpxs_inv_atom_dx (G):
+      ∀L1. ❪G,L1❫ ⊢ ⬈* ⋆ → L1 = ⋆.
+/2 width=2 by lex_inv_atom_dx/ qed-.
+
+(* Basic_2A1: was: lpxs_inv_pair2 *)
+lemma lpxs_inv_pair_dx (G):
+      ∀I,L1,K2,V2. ❪G,L1❫ ⊢ ⬈* K2.ⓑ[I]V2 →
+      ∃∃K1,V1. ❪G,K1❫ ⊢ ⬈* K2 & ❪G,K1❫ ⊢ V1 ⬈* V2 & L1 = K1.ⓑ[I]V1.
+/2 width=1 by lex_inv_pair_dx/ qed-.
 
-lemma lpxs_inv_atom2: ∀h,o,G,L1. ⦃G, L1⦄ ⊢ ➡*[h, o] ⋆ → L1 = ⋆.
-/2 width=2 by TC_lpx_sn_inv_atom2/ qed-.
-
-(* Basic forward lemmas *****************************************************)
+(* Basic eliminators ********************************************************)
 
-lemma lpxs_fwd_length: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡*[h, o] L2 → |L1| = |L2|.
-/2 width=2 by TC_lpx_sn_fwd_length/ qed-.
+(* Basic_2A1: was: lpxs_ind_alt *)
+lemma lpxs_ind (G) (Q:relation …):
+      Q (⋆) (⋆) → (
+        ∀I,K1,K2.
+        ❪G,K1❫ ⊢ ⬈* K2 →
+        Q K1 K2 → Q (K1.ⓘ[I]) (K2.ⓘ[I])
+      ) → (
+        ∀I,K1,K2,V1,V2.
+        ❪G,K1❫ ⊢ ⬈* K2 → ❪G,K1❫ ⊢ V1 ⬈* V2 →
+        Q K1 K2 → Q (K1.ⓑ[I]V1) (K2.ⓑ[I]V2)
+      ) →
+      ∀L1,L2. ❪G,L1❫ ⊢ ⬈* L2 → Q L1 L2.
+/3 width=4 by lex_ind/ qed-.