]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma
- degree assignment, static type assignment, iterated static type
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / dynamic / snv_da_lpr.ma
diff --git a/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma b/matita/matita/contribs/lambdadelta/basic_2/dynamic/snv_da_lpr.ma
new file mode 100644 (file)
index 0000000..d706d6d
--- /dev/null
@@ -0,0 +1,94 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/static/lsubd_da.ma".
+include "basic_2/computation/cpds_cpds.ma".
+include "basic_2/dynamic/snv_aaa.ma".
+include "basic_2/dynamic/snv_cpcs.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties on degree assignment for terms ********************************)
+
+fact da_cpr_lpr_aux: ∀h,g,G0,L0,T0.
+                     (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, g] ⦃G1, L1, T1⦄ → IH_snv_lsstas h g G1 L1 T1) →
+                     (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, g] ⦃G1, L1, T1⦄ → IH_snv_cpr_lpr h g G1 L1 T1) →
+                     (∀G1,L1,T1. ⦃G0, L0, T0⦄ >[h, g] ⦃G1, L1, T1⦄ → IH_da_cpr_lpr h g G1 L1 T1) →
+                     ∀G1,L1,T1. G0 = G1 → L0 = L1 → T0 = T1 → IH_da_cpr_lpr h g G1 L1 T1.
+#h #g #G0 #L0 #T0 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ]
+[ #k #_ #_ #_ #_ #l #H2 #X3 #H3 #L2 #_ -IH3 -IH2 -IH1
+  lapply (da_inv_sort … H2) -H2
+  lapply (cpr_inv_sort1 … H3) -H3 #H destruct /2 width=1/
+| #i #HG0 #HL0 #HT0 #H1 #l #H2 #X3 #H3 #L2 #HL12 destruct -IH3 -IH2
+  elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #H #HX0
+  elim (da_inv_lref … H2) -H2 * #K1 [ #V1 | #W1 #l1 ] #HLK1 [ #HV1 | #HW1 #H ] destruct
+  lapply (ldrop_mono … H … HLK1) -H #H destruct
+  elim (cpr_inv_lref1 … H3) -H3
+  [1,3: #H destruct
+    lapply (fsupp_lref … G1 … HLK1)
+    elim (lpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #H #HLK2
+    elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+    /4 width=10 by da_ldef, da_ldec, fsupp_ygt/
+  |2,4: * #K0 #V0 #W0 #H #HVW0 #HW0
+    lapply (ldrop_mono … H … HLK1) -H #H destruct
+    lapply (fsupp_lref … G1 … HLK1)
+    elim (lpr_ldrop_conf … HLK1 … HL12) -HLK1 -HL12 #X #H #HLK2
+    elim (lpr_inv_pair1 … H) -H #K2 #V2 #HK12 #_ #H destruct
+    lapply (ldrop_fwd_ldrop2 … HLK2) -V2
+    /4 width=7 by da_lift, fsupp_ygt/
+  ]
+| #p #_ #_ #HT0 #H1 destruct -IH3 -IH2 -IH1
+  elim (snv_inv_gref … H1)
+| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #l #H2 #X3 #H3 #L2 #HL12 destruct -IH2
+  elim (snv_inv_bind … H1) -H1 #_ #HT1
+  lapply (da_inv_bind … H2) -H2
+  elim (cpr_inv_bind1 … H3) -H3 *
+  [ #V2 #T2 #HV12 #HT12 #H destruct
+    /4 width=9 by da_bind, fsupp_ygt, lpr_pair/
+  | #T2 #HT12 #HT2 #H1 #H2 destruct
+    /4 width=11 by da_inv_lift, fsupp_ygt, lpr_pair, ldrop_ldrop/
+  ]
+| #V1 #T1 #HG0 #HL0 #HT0 #H1 #l #H2 #X3 #H3 #L2 #HL12 destruct
+  elim (snv_inv_appl … H1) -H1 #b0 #W1 #W0 #T0 #l0 #HV1 #HT1 #Hl0 #HVW1 #HW10 #HT10
+  lapply (da_inv_flat … H2) -H2 #Hl
+  elim (cpr_inv_appl1 … H3) -H3 *
+  [ #V2 #T2 #HV12 #HT12 #H destruct -IH3 -IH2 /4 width=7 by da_flat, fsupp_ygt/
+  | #b #V2 #W #W2 #U1 #U2 #HV12 #HW2 #HU12 #H1 #H2 destruct
+    elim (snv_inv_bind … HT1) -HT1 #HW #HU1
+    lapply (da_inv_bind … Hl) -Hl #Hl
+    elim (cpds_inv_abst1 … HT10) -HT10 #W3 #U3 #HW3 #_ #H destruct -U3
+    lapply (cprs_div … HW3 … HW10) -W3 #HWW1
+    lapply (ssta_da_conf … HVW1 … Hl0) <minus_plus_m_m #H
+    elim (snv_fwd_da … HW) #l1 #Hl1
+    lapply (IH3 … HV1 … 1 … Hl0 W1 ?) /2 width=2 by fsupp_ygt, ssta_lsstas/ #HW1
+    lapply (da_cpcs_aux … IH2 IH1 … Hl1 … H … HWW1) -H
+    /3 width=5 by ygt_yprs_trans, fsupp_ygt, ssta_yprs/ #H destruct
+    lapply (IH1 … HV1 … Hl0 … HV12 … HL12) -HV1 -Hl0 -HV12 [ /2 by fsupp_ygt/ ] #Hl0
+    lapply (IH1 … Hl1 … HW2 … HL12) -Hl1 // /2 width=1 by fsupp_ygt/ -HW
+    lapply (IH1 … HU1 … Hl … HU12 (L2.ⓛW2) ?) -IH1 -HU1 -Hl -HU12 [1,2: /2 by fsupp_ygt, lpr_pair/ ] -HL12 -HW2
+    /4 width=6 by da_bind, lsubd_da_trans, lsubd_abbr/
+  | #b #V #V2 #W #W2 #U1 #U2 #HV1 #HV2 #HW2 #HU12 #H1 #H2 destruct -IH3 -IH2 -V -W0 -T0 -l0 -HV1 -HVW1
+    elim (snv_inv_bind … HT1) -HT1 #_
+    lapply (da_inv_bind … Hl) -Hl
+    /5 width=9 by da_bind, da_flat, fsupp_ygt, lpr_pair/
+  ]
+| #W1 #T1 #HG0 #HL0 #HT0 #H1 #l #H2 #X3 #H3 #L2 #HL12 destruct -IH3 -IH2
+  elim (snv_inv_cast … H1) -H1 #U1 #l0 #HW1 #HT1 #Hl0 #HTU1 #HUW1
+  lapply (da_inv_flat … H2) -H2 #Hl
+  elim (cpr_inv_cast1 … H3) -H3
+  [ * #W2 #T2 #HW12 #HT12 #H destruct /4 width=7 by da_flat, fsupp_ygt/
+  | /3 width=7 by fsupp_ygt/
+  ]
+]
+qed-.