]> matita.cs.unibo.it Git - helm.git/commitdiff
more results on strongly normalizing terms
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Sat, 18 Feb 2012 19:16:56 +0000 (19:16 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Sat, 18 Feb 2012 19:16:56 +0000 (19:16 +0000)
matita/matita/contribs/lambda_delta/Basic_2/Basic_1.txt
matita/matita/contribs/lambda_delta/Basic_2/computation/cprs.ma
matita/matita/contribs/lambda_delta/Basic_2/computation/cprs_cprs.ma
matita/matita/contribs/lambda_delta/Basic_2/computation/csn_cprs.ma
matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lcpr.ma
matita/matita/contribs/lambda_delta/Basic_2/computation/csn_lift.ma
matita/matita/contribs/lambda_delta/Basic_2/reducibility/cnf.ma

index f7e55be6343cadd5a5dafac7d42e98509d35bb27..6e87998761ae206ec5c104b7ad7b03938d47fcde 100644 (file)
@@ -282,8 +282,6 @@ pr3/props pr3_eta
 pr3/subst1 pr3_subst1
 pr3/subst1 pr3_gen_cabbr
 pr3/wcpr0 pr3_wcpr0_t
 pr3/subst1 pr3_subst1
 pr3/subst1 pr3_gen_cabbr
 pr3/wcpr0 pr3_wcpr0_t
-sn3/nf2 nf2_sn3
-sn3/props sn3_pr3_trans
 sn3/props sn3_cpr3_trans
 
 sn3/props sn3_shift
 sn3/props sn3_cpr3_trans
 
 sn3/props sn3_shift
@@ -293,7 +291,6 @@ sn3/props sn3_cdelta
 sn3/props sn3_appl_lref
 sn3/props sn3_appl_abbr
 sn3/props sn3_appl_cast
 sn3/props sn3_appl_lref
 sn3/props sn3_appl_abbr
 sn3/props sn3_appl_cast
-sn3/props sn3_appl_bind
 sn3/props sn3_appl_appl
 sn3/props sn3_appl_beta
 sn3/props sn3_appl_appls
 sn3/props sn3_appl_appl
 sn3/props sn3_appl_beta
 sn3/props sn3_appl_appls
index 8748b6c3dedd390958dfa74958ea24778dc7ce63..3e4289e2789c15746290db3fb9f542ced9aef8ea 100644 (file)
@@ -56,4 +56,11 @@ lemma cprs_lsubs_conf: ∀L1,T1,T2. L1 ⊢ T1 ➡* T2 →
 /3 width=3/
 qed.
 
 /3 width=3/
 qed.
 
+lemma cprs_flat_dx: ∀I,L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L ⊢ T1 ➡* T2 →
+                    L ⊢ ⓕ{I} V1. T1 ➡* ⓕ{I} V2. T2.
+#I #L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cprs_ind … HT12) -T2 /3 width=1/
+#T #T2 #_ #HT2 #IHT2
+@(cprs_strap1 … IHT2) -IHT2 /2 width=1/
+qed.
+
 (* Basic_1: removed theorems 2: clear_pr3_trans pr3_cflat *)
 (* Basic_1: removed theorems 2: clear_pr3_trans pr3_cflat *)
index e198001045b9f727e571dcf427ad0af18cd9e147..9f8d517e267cfc0e27879e6ebc60e4ba907f53e1 100644 (file)
@@ -17,6 +17,28 @@ include "Basic_2/computation/cprs_lcpr.ma".
 
 (* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
 
 
 (* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
 
+(* Advanced properties ******************************************************)
+
+lemma cprs_abbr_dx: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡* T2 →
+                    L ⊢ ⓓV1. T1 ➡* ⓓV2. T2.
+#L #V1 #V2 #HV12 #T1 #T2 #HT12 @(cprs_ind_dx … HT12) -T1
+[ /3 width=1/
+| #T1 #T #HT1 #_ #IHT1
+  @(cprs_strap2 … IHT1) -IHT1 /2 width=1/
+]
+qed.
+
+lemma cpr_abbr: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡ T2 →
+                L ⊢ ⓓV1. T1 ➡* ⓓV2. T2.
+/3 width=1/ qed.
+
+(* Basic_1: was only: pr3_pr2_pr3_t *)
+lemma lcpr_cprs_trans: ∀L1,L2. L1 ⊢ ➡ L2 →
+                       ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
+#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
+#T #T2 #_ #HT2 #IHT2 /3 width=5/
+qed.
+
 (* Main propertis ***********************************************************)
 
 (* Basic_1: was: pr3_t *)
 (* Main propertis ***********************************************************)
 
 (* Basic_1: was: pr3_t *)
@@ -28,17 +50,3 @@ theorem cprs_conf: ∀L,T1,T. L ⊢ T ➡* T1 → ∀T2. L ⊢ T ➡* T2 →
                    ∃∃T0. L ⊢ T1 ➡* T0 & L ⊢ T2 ➡* T0.
 /3 width=3/ qed.
 
                    ∃∃T0. L ⊢ T1 ➡* T0 & L ⊢ T2 ➡* T0.
 /3 width=3/ qed.
 
-(* Advanced properties ******************************************************)
-
-(* Basic_1: was only: pr3_pr2_pr3_t *)
-lemma lcpr_cprs_trans: ∀L1,L2. L1 ⊢ ➡ L2 →
-                       ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
-#L1 #L2 #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
-#T #T2 #_ #HT2 #IHT2 /3 width=5/
-qed.
-
-lemma cpr_abbr: ∀L,V1,V2. L ⊢ V1 ➡ V2 → ∀T1,T2. L. ⓓV1 ⊢ T1 ➡ T2 →
-                L ⊢ ⓓV1. T1 ➡* ⓓV2. T2.
-#L #V1 #V2 #HV12 #T1 #T2 #HT12
-@(cprs_strap2 … (ⓓV1.T2)) /2 width=1/ /3 width=1/
-qed.
index 4a936f607864a36067ed488aa7b4bdc18ea1ebdb..bf6683d3c6d036b0609ad81c2c20cac94774013d 100644 (file)
@@ -38,6 +38,7 @@ qed-.
 
 (* Basic properties *********************************************************)
 
 
 (* Basic properties *********************************************************)
 
+(* Basic_1: was: sn3_intro *)
 lemma csns_intro: ∀L,T1.
                   (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → False) → L ⊢ ⬇** T2) → L ⊢ ⬇** T1.
 #L #T1 #H
 lemma csns_intro: ∀L,T1.
                   (∀T2. L ⊢ T1 ➡* T2 → (T1 = T2 → False) → L ⊢ ⬇** T2) → L ⊢ ⬇** T1.
 #L #T1 #H
@@ -48,6 +49,7 @@ fact csns_intro_aux: ∀L,T1.
                      (∀T,T2. L ⊢ T ➡* T2 → T1 = T → (T1 = T2 → False) → L ⊢ ⬇** T2) → L ⊢ ⬇** T1.
 /4 width=3/ qed-.
 
                      (∀T,T2. L ⊢ T ➡* T2 → T1 = T → (T1 = T2 → False) → L ⊢ ⬇** T2) → L ⊢ ⬇** T1.
 /4 width=3/ qed-.
 
+(* Basic_1: was: sn3_pr3_trans (old version) *)
 lemma csns_cprs_trans: ∀L,T1. L ⊢ ⬇** T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬇** T2.
 #L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12
 @csns_intro #T #HLT2 #HT2
 lemma csns_cprs_trans: ∀L,T1. L ⊢ ⬇** T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬇** T2.
 #L #T1 #H elim H -T1 #T1 #HT1 #IHT1 #T2 #HLT12
 @csns_intro #T #HLT2 #HT2
@@ -56,6 +58,7 @@ elim (term_eq_dec T1 T2) #HT12
 | -HT1 -HT2 /3 width=4/
 qed.
 
 | -HT1 -HT2 /3 width=4/
 qed.
 
+(* Basic_1: was: sn3_pr2_intro (old version) *)
 lemma csns_intro_cpr: ∀L,T1.
                       (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → False) → L ⊢ ⬇** T2) →
                       L ⊢ ⬇** T1.
 lemma csns_intro_cpr: ∀L,T1.
                       (∀T2. L ⊢ T1 ➡ T2 → (T1 = T2 → False) → L ⊢ ⬇** T2) →
                       L ⊢ ⬇** T1.
@@ -81,9 +84,21 @@ theorem csns_csn: ∀L,T. L ⊢ ⬇** T → L ⊢ ⬇* T.
 #L #T #H @(csns_ind … H) -T /4 width=1/
 qed.
 
 #L #T #H @(csns_ind … H) -T /4 width=1/
 qed.
 
+(* Basic_1: was: sn3_pr3_trans *)
 lemma csn_cprs_trans: ∀L,T1. L ⊢ ⬇* T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬇* T2.
 /4 width=3/ qed.
 
 lemma csn_cprs_trans: ∀L,T1. L ⊢ ⬇* T1 → ∀T2. L ⊢ T1 ➡* T2 → L ⊢ ⬇* T2.
 /4 width=3/ qed.
 
+(* Basic_1: was: nf2_sn3 *)
+lemma csn_cwn: ∀L,T1. L ⊢ ⬇* T1 →
+               ∃∃T2. L ⊢ T1 ➡* T2 & L ⊢ 𝐍[T2].
+#L #T1 #H elim H -T1 #T1 #_ #IHT1
+elim (cnf_dec L T1)
+[ -IHT1 /2 width=3/
+| * #T2 #HLT12 #HT12
+  elim (IHT1 T2 ? ?) -IHT1 // /2 width=1/ -HT12 /3 width=3/
+]
+qed.
+
 (* Main eliminators *********************************************************)
 
 lemma csn_ind_cprs: ∀L. ∀R:predicate term.
 (* Main eliminators *********************************************************)
 
 lemma csn_ind_cprs: ∀L. ∀R:predicate term.
index 8121a0ac1f60910d3a82cf8468fc03677cfc1a3b..30368a428d35f634371dad881dc47912bc49bc2d 100644 (file)
@@ -73,3 +73,47 @@ qed.
 lemma csn_appl_beta: ∀L,W. L ⊢ ⬇* W → ∀V,T. L ⊢ ⬇* (ⓓV. T) → (**)
                      L ⊢ ⬇* ⓐV. ⓛW. T.
 /2 width=3/ qed.
 lemma csn_appl_beta: ∀L,W. L ⊢ ⬇* W → ∀V,T. L ⊢ ⬇* (ⓓV. T) → (**)
                      L ⊢ ⬇* ⓐV. ⓛW. T.
 /2 width=3/ qed.
+
+fact csn_appl_theta_aux: ∀L,U. L ⊢ ⬇* U → ∀V1,V2. ⇧[0, 1] V1 ≡ V2 →
+                         ∀V,T. U = ⓓV. ⓐV2. T → L ⊢ ⬇* ⓐV1. ⓓV. T.
+#L #X #H @(csn_ind_cprs … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct
+lapply (csn_fwd_pair_sn … HVT) #HV
+lapply (csn_fwd_bind_dx … HVT) -HVT #HVT
+@csn_intro #X #HL #H
+elim (cpr_inv_appl1 … HL) -HL *
+[ -HV #V0 #Y #HLV10 #HL #H0 destruct
+  elim (cpr_inv_abbr1 … HL) -HL *
+  [ #V3 #V4 #T3 #HV3 #HLV34 #HLT3 #H0 destruct
+    lapply (cpr_intro … HV3 HLV34) -HLV34 #HLV34
+    elim (lift_total V0 0 1) #V5 #HV05
+    elim (term_eq_dec (ⓓV.ⓐV2.T) (ⓓV4.ⓐV5.T3))
+    [ -IHVT #H0 destruct
+      elim (eq_false_inv_tpair … H) -H
+      [ -HLV10 -HLV34 -HV3 -HLT3 -HVT
+        >(lift_inj … HV12 … HV05) -V5
+        #H elim (H ?) //
+      | * #_ #H elim (H ?) //
+      ]
+    | -H -HVT #H
+      lapply (cpr_lift (L. ⓓV) … HV12 … HV05 HLV10) -HLV10 -HV12 /2 width=1/ #HV25
+      lapply (ltpr_cpr_trans (L. ⓓV) … HLT3) /2 width=1/ -HLT3 #HLT3
+      @(IHVT … H … HV05) -IHVT // -H -HV05 /3 width=1/
+    ]
+  | -H -IHVT #T0 #HT0 #HLT0
+    @(csn_cpr_trans … (ⓐV1.T0)) /2 width=1/ -V0 -Y
+    @(csn_inv_lift … 0 1 HVT) /2 width=1/
+  ]
+| -HV -HV12 -HVT -IHVT -H #V0 #W0 #T0 #T1 #_ #_ #H destruct
+| -IHVT -H #V0 #V3 #W0 #W1 #T0 #T1 #HLV10 #HLW01 #HLT01 #HV03 #H1 #H2 destruct
+  lapply (cpr_lift (L. ⓓW0) … HV12 … HV03 HLV10) -HLV10 -HV12 -HV03 /2 width=1/ #HLV23
+  lapply (lcpr_cpr_trans (L. ⓓW0) … HLT01) -HLT01 /2 width=1/ #HLT01
+  @csn_abbr /2 width=3/ -HV
+  @(csn_lcpr_conf (L. ⓓW0)) /2 width=1/ -W1
+  @(csn_cprs_trans … HVT) -HVT /2 width=1/
+]
+qed.
+
+(* Basic_1: was: sn3_appl_bind *)
+lemma csn_appl_theta: ∀V1,V2. ⇧[0, 1] V1 ≡ V2 →
+                      ∀L,V,T. L ⊢ ⬇* ⓓV. ⓐV2. T → L ⊢ ⬇* ⓐV1. ⓓV. T.
+/2 width=5/ qed.
index 29872f92903bc01b67aad87a15967554a6154ec8..2e816b72c30feedcf9ebfb6f4840ed580a137bb4 100644 (file)
@@ -77,3 +77,24 @@ elim (eq_false_inv_tpair … H2) -H2
 | -HLW0 * #H destruct /3 width=1/
 ]
 qed.
 | -HLW0 * #H destruct /3 width=1/
 ]
 qed.
+(*
+axiom eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2.
+                             (②{I} V1. T1 = ②{I} V2. T2 → False) →
+                             (T1 = T2 → False) ∨ (T1 = T2 ∧ (V1 = V2 → False)).
+                             
+#I #V1 #T1 #V2 #T2 #H
+elim (term_eq_dec V1 V2) /3 width=1/ #HV12 destruct
+@or_intror @conj // #HT12 destruct /2 width=1/ 
+qed-.
+
+lemma csn_appl_simple: ∀L,T. L ⊢ ⬇* T → 𝐒[T] → ∀V. L ⊢ ⬇* V → L ⊢ ⬇* ⓐV. T.
+#L #T #H elim H -T #T #_ #IHT #HT #V #H @(csn_ind … H) -V #V #HV #IHV 
+@csn_intro #X #H1 #H2
+elim (cpr_inv_appl1_simple … H1 ?) // -H1
+#V0 #T0 #HLV0 #HLT0 #H destruct
+elim (eq_false_inv_tpair_dx … H2) -H2
+[ -IHV #HT0 @IHT -IHT // -HLT0 /2 width=1/ -HT0 /2 width=3/   
+| -HV -HT -IHT -HLT0 * #H #HV0 destruct /3 width=1/
+]
+qed.
+*)
\ No newline at end of file
index 50ff046038f7e1cfbc6894d15d2fcaf1f56ae047..39ac692cda6d0b0a09239d36598d4d443def5a34 100644 (file)
@@ -30,4 +30,7 @@ lemma cnf_sort: ∀L,k. L ⊢ 𝐍[⋆k].
 >(cpr_inv_sort1 … H) //
 qed.
 
 >(cpr_inv_sort1 … H) //
 qed.
 
+axiom cnf_dec: ∀L,T1. L ⊢ 𝐍[T1] ∨
+               ∃∃T2. L ⊢ T1 ➡ T2 & (T1 = T2 → False).
+
 (* Basic_1: removed theorems 1: nf2_abst_shift *)
 (* Basic_1: removed theorems 1: nf2_abst_shift *)