]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/apps_2/etc/models/model_cpr.etc
update in models and ground_2
[helm.git] / matita / matita / contribs / lambdadelta / apps_2 / etc / models / model_cpr.etc
diff --git a/matita/matita/contribs/lambdadelta/apps_2/etc/models/model_cpr.etc b/matita/matita/contribs/lambdadelta/apps_2/etc/models/model_cpr.etc
new file mode 100644 (file)
index 0000000..cc96e99
--- /dev/null
@@ -0,0 +1,54 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/reduction/cpr.ma".
+include "apps_2/models/model_drop.ma".
+
+(* MODEL ********************************************************************)
+
+(* Forward lemmas on context-sensitive parallel reduction for terms *********)
+
+lemma sound_fwd_cpr: ∀M. sound M → extensional M →
+                     ∀sv,gv,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 →
+                     ∀lv. lv ∈ 〚L〛⦋M⦌{sv, gv} → 〚T1〛{sv, gv, lv} = 〚T2〛{sv, gv, lv}.
+#M #H1M #H2M #sv #gv #G #L #T1 #T2 #H elim H -G -L -T1 -T2 //
+[ #G #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 #IHV12 #lv #Hlv >(m2 … H1M)
+  <(sound_fwd_lift … H1M H2M … HVW2) -HVW2
+  lapply (sound_drop … HLK … Hlv) // -L -H2M #H
+  elim (li_inv_ldef … H) -H #v #HK #H
+  elim (lower_inv_raise_be … H) -H #H >H -H #Hlv
+  <IHV12 -IHV12 /3 width=3 by sound_ti_eq_l, li_veq, veq_sym/ 
+| #a * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #lv #Hlv
+  [ >(m4 … H1M) >(m4 … H1M) -H1M <IHV12 -IHV12 /3 width=1 by li_ldef/
+  | @(mx … H2M) -H2M /3 width=1 by li_ldec/
+  ]
+| * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #lv #Hlv
+  [ >(m6 … H1M) >(m6 … H1M) -H1M /3 width=1 by eq_f2/
+  | -IHV12 >(m7 … H1M) >(m7 … H1M) -H1M /2 width=1 by/
+  ]
+| #G #L #V #U1 #U2 #T2 #_ #HTU2 #IHU12 #lv #Hlv >(m4 … H1M)
+  >IHU12 -IHU12 /2 width=1 by li_ldef/
+  <(sound_fwd_lift … H1M H2M … HTU2) -H2M -HTU2
+  /2 width=1 by sound_ti_eq_l/
+| #G #L #V #T1 #T2 #_ #IHT12 #lv #Hlv >(m7 … H1M) -H1M /2 width=1 by/
+| #a #G #L #V1 #V2 #W1 #w2 #T1 #T2 #_ #_ #_ #IHV12 #_ #IHT12 #lv #Hlv
+  >(m6 … H1M) >(m8 … H1M) >(m4 … H1M) >(m7 … H1M) -H1M
+  >IHV12 -IHV12 /3 width=1 by li_ldec/
+| #a #G #L #V1 #V2 #W2 #U1 #U2 #T1 #T2 #_ #HVW2 #_ #_ #IHV12 #IHU12 #IHT12 #lv #Hlv
+  >(m6 … H1M) >(m4 … H1M) >(m4 … H1M) >(m6 … H1M)
+  >IHV12 -IHV12 // <IHU12 -IHU12 // @eq_f2 /3 width=1 by li_ldef/
+  <(sound_fwd_lift … H1M H2M … HVW2) -H2M -HVW2
+  /2 width=1 by sound_ti_eq_l/
+]
+qed-.