]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_lift.ma
- basic_2: reaxiomatized snv with improved cpds and cpes simplifies preservation
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / snv_lift.ma
index 7ddb258b4df8addd85d46e37cfee070bdf88d4a3..d8fb8d161bed887cd05a0bddd1f8a406ca662b69 100644 (file)
@@ -12,8 +12,8 @@
 (*                                                                        *)
 (**************************************************************************)
 
+include "basic_2/multiple/fqus_alt.ma".
 include "basic_2/computation/cpds_lift.ma".
-include "basic_2/equivalence/cpcs_cpcs.ma".
 include "basic_2/dynamic/snv.ma".
 
 (* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
@@ -36,18 +36,16 @@ lemma snv_lift: ∀h,g,G,K,T. ⦃G, K⦄ ⊢ T ¡[h, g] → ∀L,s,d,e. ⇩[s, d
 | #a #I #G #K #V #T #_ #_ #IHV #IHT #L #s #d #e #HLK #X #H
   elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct
   /4 width=5 by snv_bind, drop_skip/
-| #a #G #K #V #V0 #V1 #T #T1 #l #_ #_ #Hl #HV0 #HV01 #HT1 #IHV #IHT #L #s #d #e #HLK #X #H
+| #a #G #K #V #W0 #T #U0 #l #_ #_ #HVW0 #HTU0 #IHV #IHT #L #s #d #e #HLK #X #H
   elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct
-  elim (lift_total V0 d e) #W0 #HVW0
-  elim (lift_total V1 d e) #W1 #HVW1
-  elim (lift_total T1 (d+1) e) #U1 #HTU1
-  @(snv_appl … a … W0 … W1 … U1 l)
-  [1,2,3,4,5: /2 width=10 by cprs_lift, sta_lift, da_lift/ ]
-  @(cpds_lift … HT1 … HLK … HTU) /2 width=1 by lift_bind/ (**) (* full auto raises typecjhecker failure *)
-| #G #K #V0 #T #V #l #_ #_ #Hl #HTV #HV0 #IHV0 #IHT #L #s #d #e #HLK #X #H
-  elim (lift_inv_flat1 … H) -H #W0 #U #HVW0 #HTU #H destruct
-  elim (lift_total V d e)
-  /3 width=12 by snv_cast, cpcs_lift, sta_lift, da_lift/
+  elim (lift_total W0 d e) #W1 #HW01
+  elim (lift_total U0 (d+1) e) #U1 #HU01
+  @(snv_appl … a … W1 … U1 l) [1,2,3: /2 width=10 by cpds_lift/ ] -IHV -IHT
+  @(cpds_lift … HTU0 … HLK … HTU) /2 width=1 by lift_bind/ (**) (* full auto raises typechecker failure *)
+| #G #K #V #T #U0 #_ #_ #HVU0 #HTU0 #IHV #IHT #L #s #d #e #HLK #X #H
+  elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct
+  elim (lift_total U0 d e)
+  /3 width=12 by snv_cast, cprs_lift, cpds_lift/
 ]
 qed.
 
@@ -66,25 +64,23 @@ lemma snv_inv_lift: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ U ¡[h, g] → ∀K,s,d,e. ⇩[
 | #a #I #G #L #W #U #_ #_ #IHW #IHU #K #s #d #e #HLK #X #H
   elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct
   /4 width=5 by snv_bind, drop_skip/
-| #a #G #L #W #W0 #W1 #U #U1 #l #_ #_ #Hl #HW0 #HW01 #HU1 #IHW #IHU #K #s #d #e #HLK #X #H
+| #a #G #L #W #W1 #U #U1 #l #_ #_ #HW1 #HU1 #IHW #IHU #K #s #d #e #HLK #X #H
+  elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct
+  elim (cpds_inv_lift1 … HW1 … HLK … HVW) -HW1 #W0 #HW01 #HVW0  
+  elim (cpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #H #HTU0
+  elim (lift_inv_bind2 … H) -H #Y #U0 #HY #HU01 #H destruct
+  lapply (lift_inj … HY … HW01) -HY #H destruct
+  /3 width=6 by snv_appl/
+| #G #L #W #U #U1 #_ #_ #HWU1 #HU1 #IHW #IHU #K #s #d #e #HLK #X #H
   elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct
-  lapply (da_inv_lift … Hl … HLK … HVW) -Hl #Hl
-  elim (sta_inv_lift1 … HW0 … HLK … HVW) -HW0 #V0 #HVW0 #HV0
-  elim (cprs_inv_lift1 … HW01 … HLK … HVW0) -W0 #V1 #HVW1 #HV01
-  elim (cpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #H #HTU
-  elim (lift_inv_bind2 … H) -H #Y #T1 #HY #HTU1 #H destruct
-  lapply (lift_inj … HY … HVW1) -HY #H destruct
-  /3 width=8 by snv_appl/
-| #G #L #W0 #U #W #l #_ #_ #Hl #HUW #HW0 #IHW0 #IHU #K #s #d #e #HLK #X #H
-  elim (lift_inv_flat2 … H) -H #V0 #T #HVW0 #HTU #H destruct
-  lapply (da_inv_lift … Hl … HLK … HTU) -Hl #Hl
-  elim (sta_inv_lift1 … HUW … HLK … HTU) -HUW #V #HVW #HTV
-  lapply (cpcs_inv_lift G … HLK … HVW … HVW0 ?) // -W
-  /3 width=8 by snv_cast/
+  elim (cprs_inv_lift1 … HWU1 … HLK … HVW) -HWU1 #U0 #HU01 #HVU0
+  elim (cpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #HX #HTU0 
+  lapply (lift_inj … HX … HU01) -HX #H destruct
+  /3 width=5 by snv_cast/
 ]
 qed-.
 
-(* Advanced properties ******************************************************)
+(* Properties on subclosure *************************************************)
 
 lemma snv_fqu_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
                     ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g].
@@ -102,3 +98,21 @@ lemma snv_fqu_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2
   ]
 ]
 qed-.
+
+lemma snv_fquq_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
+                     ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g].
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fquq_inv_gen … H) -H [|*]
+/2 width=5 by snv_fqu_conf/
+qed-.
+
+lemma snv_fqup_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
+                     ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g].
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
+/3 width=5 by fqup_strap1, snv_fqu_conf/
+qed-.
+
+lemma snv_fqus_conf: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
+                     ⦃G1, L1⦄ ⊢ T1 ¡[h, g] → ⦃G2, L2⦄ ⊢ T2 ¡[h, g].
+#h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_gen … H) -H [|*]
+/2 width=5 by snv_fqup_conf/
+qed-.