]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_csx.ma
milestone update in basic_2, update in ground and static_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / rsx_csx.ma
index 64eeba55e7ca374cc4999008308bf78579a8b5fa..c56d1c6ccfbe4462b087a349a35ca98a191b8c8f 100644 (file)
@@ -16,23 +16,77 @@ include "basic_2/rt_computation/csx_lsubr.ma".
 include "basic_2/rt_computation/csx_cpxs.ma".
 include "basic_2/rt_computation/jsx_rsx.ma".
 
-(* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
+(* STRONGLY NORMALIZING REFERRED LOCAL ENVS FOR EXTENDED RT-TRANSITION ******)
 
-(* Advanced properties ******************************************************)
+(* Forward lemmas with strongly rt-normalizing terms ************************)
+
+fact rsx_fwd_lref_pair_csx_aux (G):
+     ∀L. G ⊢ ⬈*𝐒[#0] L →
+     ∀I,K,V. L = K.ⓑ[I]V → ❪G,K❫ ⊢ ⬈*𝐒 V.
+#G #L #H
+@(rsx_ind … H) -L #L #_ #IH #I #K #V1 #H destruct
+@csx_intro #V2 #HV12 #HnV12
+@(IH … I) -IH [1,4: // | -HnV12 | -G #H ]
+[ /2 width=1 by lpx_pair/
+| elim (reqx_inv_zero_pair_sn … H) -H #Y #X #_ #H1 #H2 destruct -I
+  /2 width=1 by/
+]
+qed-.
+
+lemma rsx_fwd_lref_pair_csx (G):
+      ∀I,K,V. G ⊢ ⬈*𝐒[#0] K.ⓑ[I]V → ❪G,K❫ ⊢ ⬈*𝐒 V.
+/2 width=4 by rsx_fwd_lref_pair_csx_aux/ qed-.
+
+lemma rsx_fwd_lref_pair_csx_drops (G):
+      ∀I,K,V,i,L. ⇩[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*𝐒[#i] L → ❪G,K❫ ⊢ ⬈*𝐒 V.
+#G #I #K #V #i elim i -i
+[ #L #H >(drops_fwd_isid … H) -H
+  /2 width=2 by rsx_fwd_lref_pair_csx/
+| #i #IH #L #H1 #H2
+  elim (drops_inv_bind2_isuni_next … H1) -H1 // #J #Y #HY #H destruct
+  lapply (rsx_inv_lifts … H2 … (𝐔❨1❩) ?????) -H2
+  /3 width=6 by drops_refl, drops_drop/
+]
+qed-.
+
+(* Inversion lemmas with strongly rt-normalizing terms **********************)
+
+lemma rsx_inv_lref_pair (G):
+      ∀I,K,V. G ⊢ ⬈*𝐒[#0] K.ⓑ[I]V →
+      ∧∧ ❪G,K❫ ⊢ ⬈*𝐒 V & G ⊢ ⬈*𝐒[V] K.
+/3 width=2 by rsx_fwd_lref_pair_csx, rsx_fwd_pair, conj/ qed-.
+
+lemma rsx_inv_lref_pair_drops (G):
+      ∀I,K,V,i,L. ⇩[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*𝐒[#i] L →
+      ∧∧ ❪G,K❫ ⊢ ⬈*𝐒 V & G ⊢ ⬈*𝐒[V] K.
+/3 width=5 by rsx_fwd_lref_pair_csx_drops, rsx_fwd_lref_pair_drops, conj/ qed-.
+
+lemma rsx_inv_lref_drops (G):
+      ∀L,i. G ⊢ ⬈*𝐒[#i] L →
+      ∨∨ ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆
+       | ∃∃I,K. ⇩[i] L ≘ K.ⓤ[I]
+       | ∃∃I,K,V. ⇩[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ ⬈*𝐒 V & G ⊢ ⬈*𝐒[V] K.
+#G #L #i #H elim (drops_F_uni L i)
+[ /2 width=1 by or3_intro0/
+| * * /4 width=10 by rsx_fwd_lref_pair_csx_drops, rsx_fwd_lref_pair_drops, ex3_3_intro, ex1_2_intro, or3_intro2, or3_intro1/
+]
+qed-.
+
+(* Properties with strongly rt-normalizing terms ****************************)
 
 (* Note: swapping the eliminations to avoid rsx_cpx_trans: no solution found *)
 (* Basic_2A1: uses: lsx_lref_be_lpxs *)
-lemma rsx_pair_lpxs (h) (G):
-      â\88\80K1,V. â¦\83G,K1â¦\84 â\8a¢ â¬\88*[h] ð\9d\90\92â¦\83Vâ¦\84 →
-      ∀K2. G ⊢ ⬈*[h,V] 𝐒⦃K2⦄ → ⦃G,K1⦄ ⊢ ⬈*[h] K2 →
-      ∀I. G ⊢ ⬈*[h,#0] 𝐒⦃K2.ⓑ{I}V⦄.
-#h #G #K1 #V #H
+lemma rsx_lref_pair_lpxs (G):
+      â\88\80K1,V. â\9dªG,K1â\9d« â\8a¢ â¬\88\9d\90\92 V →
+      ∀K2. G ⊢ ⬈*𝐒[V] K2 → ❪G,K1❫ ⊢ ⬈* K2 →
+      ∀I. G ⊢ ⬈*𝐒[#0] K2.ⓑ[I]V.
+#G #K1 #V #H
 @(csx_ind_cpxs … H) -V #V0 #_ #IHV0 #K2 #H
 @(rsx_ind … H) -K2 #K0 #HK0 #IHK0 #HK10 #I
 @rsx_intro #Y #HY #HnY
 elim (lpx_inv_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
-elim (tdeq_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
-[ /5 width=5 by rsx_rdeq_trans, lpxs_step_dx, rdeq_pair/
+elim (teqx_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
+[ /5 width=5 by rsx_reqx_trans, lpxs_step_dx, reqx_pair/
 | @(IHV0 … HnV02) -IHV0 -HnV02
   [ /2 width=3 by lpxs_cpx_trans/
   | /3 width=3 by rsx_lpx_trans, rsx_cpx_trans/
@@ -41,32 +95,39 @@ elim (tdeq_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
 ]
 qed.
 
+lemma rsx_lref_pair (G):
+      ∀K,V. ❪G,K❫ ⊢ ⬈*𝐒 V → G ⊢ ⬈*𝐒[V] K → ∀I. G ⊢ ⬈*𝐒[#0] K.ⓑ[I]V.
+/2 width=3 by rsx_lref_pair_lpxs/ qed.
+
 (* Basic_2A1: uses: lsx_lref_be *)
-lemma rsx_lref_pair_drops (h) (G):
-      â\88\80K,V. â¦\83G,Kâ¦\84 â\8a¢ â¬\88*[h] ð\9d\90\92â¦\83Vâ¦\84 â\86\92 G â\8a¢ â¬\88*[h,V] ð\9d\90\92â¦\83Kâ¦\84 →
-      â\88\80I,i,L. â¬\87*[i] L â\89\98 K.â\93\91{I}V â\86\92 G â\8a¢ â¬\88*[h,#i] ð\9d\90\92â¦\83Lâ¦\84.
-#h #G #K #V #HV #HK #I #i elim i -i
-[ #L #H >(drops_fwd_isid … H) -H /2 width=3 by rsx_pair_lpxs/
+lemma rsx_lref_pair_drops (G):
+      â\88\80K,V. â\9dªG,Kâ\9d« â\8a¢ â¬\88\9d\90\92 V â\86\92 G â\8a¢ â¬\88\9d\90\92[V] K →
+      â\88\80I,i,L. â\87©[i] L â\89\98 K.â\93\91[I]V â\86\92 G â\8a¢ â¬\88\9d\90\92[#i] L.
+#G #K #V #HV #HK #I #i elim i -i
+[ #L #H >(drops_fwd_isid … H) -H /2 width=1 by rsx_lref_pair/
 | #i #IH #L #H
   elim (drops_inv_bind2_isuni_next … H) -H // #J #Y #HY #H destruct
-  @(rsx_lifts â\80¦ (ð\9d\90\94â\9d´1â\9dµ)) /3 width=6 by drops_refl, drops_drop/ (**) (* full auto fails *)
+  @(rsx_lifts â\80¦ (ð\9d\90\94â\9d¨1â\9d©)) /3 width=6 by drops_refl, drops_drop/ (**) (* full auto fails *)
 ]
 qed.
 
-(* Main properties **********************************************************)
+(* Main properties with strongly rt-normalizing terms ***********************)
 
 (* Basic_2A1: uses: csx_lsx *)
-theorem csx_rsx (h): ∀G,L,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → G ⊢ ⬈*[h,T] 𝐒⦃L⦄.
-#h #G #L #T @(fqup_wf_ind_eq (Ⓕ) … G L T) -G -L -T
-#Z #Y #X #IH #G #L * * //
-[ #i #HG #HL #HT #H destruct
-  elim (csx_inv_lref … H) -H [ |*: * ]
-  [ /2 width=1 by rsx_lref_atom/
-  | /2 width=3 by rsx_lref_unit/
+theorem csx_rsx (G):
+        ∀L,T. ❪G,L❫ ⊢ ⬈*𝐒 T → G ⊢ ⬈*𝐒[T] L.
+#G #L #T @(fqup_wf_ind_eq (Ⓣ) … G L T) -G -L -T
+#Z #Y #X #IH #G #L * *
+[ //
+| #i #HG #HL #HT #H destruct
+  elim (csx_inv_lref_drops … H) -H [ |*: * ]
+  [ /2 width=1 by rsx_lref_atom_drops/
+  | /2 width=3 by rsx_lref_unit_drops/
   | /4 width=6 by rsx_lref_pair_drops, fqup_lref/
   ]
+| //
 | #p #I #V #T #HG #HL #HT #H destruct
-  elim (csx_fwd_bind_unit … H Void) -H /3 width=1 by rsx_bind_void/
+  elim (csx_fwd_bind … H) -H /3 width=1 by rsx_bind/
 | #I #V #T #HG #HL #HT #H destruct
   elim (csx_fwd_flat … H) -H /3 width=1 by rsx_flat/
 ]