]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/etc/cpr_cpm.etc
auxiliary update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / cpr_cpm.etc
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/cpr_cpm.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/cpr_cpm.etc
new file mode 100644 (file)
index 0000000..dcb1c93
--- /dev/null
@@ -0,0 +1,57 @@
+include "basic_2/rt_transition/cpm_drops.ma".
+include "basic_2/rt_transition/cpr.ma".
+(*
+theorem cpm_cpm_trans_swap (h) (G) (L) (T1):
+        ∀n1,T. ⦃G,L⦄ ⊢ T1 ➡[n1,h] T → ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 → n1 ≤ n2 →
+        ∃∃T0. ⦃G,L⦄ ⊢ T1 ➡[n2,h] T0 & ⦃G,L⦄ ⊢ T0 ➡[n1,h] T2.
+#h #G #L #T1 #n1 #T #H
+@(cpm_ind … H) -n1 -G -L -T1 -T
+[ #I #G #L #n2 #T2 #HT2 #_ /2 width=3 by ex2_intro/
+| #G #L #s #n2 #X2 #H #_
+  elim (cpm_inv_sort1 … H) -H #H #Hn2 destruct >iter_n_Sm
+  /3 width=3 by cpm_sort, ex2_intro/
+| #n1 #G #K #V1 #V #W #_ #IH #HVW #n2 #T2 #HT2 #Hn
+  elim (cpm_inv_lifts_sn … HT2 (Ⓣ) … HVW) -W
+  [|*: /3 width=2 by drops_refl, drops_drop/ ] #V2 #HVT2 #HV2
+  elim (IH … HV2) -V [| // ] #V0 #HV10 #HV02
+  elim (lifts_total V0 (𝐔❴1❵)) #T0 #HVT0
+  lapply (cpm_lifts_bi … HV02 (Ⓣ) … (K.ⓓV1) … HVT0 … HVT2) -V2
+  [ /3 width=2 by drops_refl, drops_drop/ ] #HT02
+  /3 width=3 by cpm_delta, ex2_intro/
+| #n1 #G #K #V1 #V #W #_ #IH #HVW #m2 #T2 #HT2 #H
+  elim (le_inv_S1 … H) -H #n2 #Hn #H destruct
+  elim (cpm_inv_lifts_sn … HT2 (Ⓣ) … HVW) -W
+  [|*: /3 width=2 by drops_refl, drops_drop/ ] #V2 #HVT2 #HV2
+  elim (IH … HV2) -V [| /2 width=1 by le_S/ ] #V0 #HV10 #HV02
+  elim (lifts_total V0 (𝐔❴1❵)) #T0 #HVT0
+  lapply (cpm_lifts_bi … HV02 (Ⓣ) … (K.ⓛV1) … HVT0 … HVT2) -V2
+  [ /3 width=2 by drops_refl, drops_drop/ ] #HT02
+  /3 width=5 by cpm_ell, ex2_intro/
+*)
+
+(* Note: cpm_cpm_trans_swap does not hold: take L = K.ⓛV1, T1 = #0, n2 = 0 *)
+theorem cpr_cpm_trans_swap (h) (G) (L):
+        ∀T1,T. ⦃G,L⦄ ⊢ T1 ➡[h] T → ∀n2,T2. ⦃G,L⦄ ⊢ T ➡[n2,h] T2 →
+        ∃∃T0. ⦃G,L⦄ ⊢ T1 ➡[n2,h] T0 & ⦃G,L⦄ ⊢ T0 ➡[h] T2.
+#h #G #L #T1 #T #H
+@(cpr_ind … H) -G -L -T1 -T
+[ #I #G #L #n2 #T2 #HT2 /2 width=3 by ex2_intro/
+| #G #K #V1 #V #W #_ #IH #HVW #n2 #T2 #HT2
+  elim (cpm_inv_lifts_sn … HT2 (Ⓣ) … HVW) -W
+  [|*: /3 width=2 by drops_refl, drops_drop/ ] #V2 #HVT2 #HV2
+  elim (IH … HV2) -V #V0 #HV10 #HV02
+  elim (lifts_total V0 (𝐔❴1❵)) #T0 #HVT0
+  lapply (cpm_lifts_bi … HV02 (Ⓣ) … (K.ⓓV1) … HVT0 … HVT2) -V2
+  [ /3 width=2 by drops_refl, drops_drop/ ] #HT02
+  /3 width=3 by cpm_delta, ex2_intro/
+| #I #G #K #T #U #i #_ #IH #HTU #n2 #U2 #HU2
+  elim (cpm_inv_lifts_sn … HU2 (Ⓣ) … HTU) -U
+  [|*: /3 width=2 by drops_refl, drops_drop/ ] #T2 #HTU2 #HT2
+  elim (IH … HT2) -T #T0 #HT0 #HT02
+  elim (lifts_total T0 (𝐔❴1❵)) #U0 #HTU0
+  lapply (cpm_lifts_bi … HT02 (Ⓣ) … (K.ⓘ{I}) … HTU0 … HTU2) -T2
+  [ /3 width=2 by drops_refl, drops_drop/ ] #HU02
+  /3 width=3 by cpm_lref, ex2_intro/
+| #p #I #G #L #V1 #V #T1 #T #_ #_ #IHV #IHT #n2 #X2 #H
+  elim (cpm_inv_bind1 … H) -H *
+  [ #V2 #T2 #HV2 #HT2 #H destruct 
\ No newline at end of file