]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/computation/gcp_cr.ma
notational change of lift, drop, and gget
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / gcp_cr.ma
index 537769345a22cbe98e506b605df501148283b591..fa040b9155cb8ecd6b816f69252741258c292dab 100644 (file)
@@ -21,13 +21,6 @@ include "basic_2/computation/gcp.ma".
 
 (* GENERIC COMPUTATION PROPERTIES *******************************************)
 
-definition S0 ≝ λC:candidate. ∀G,L2,L1,T1,d,e.
-                C G L1 T1 → ∀T2. ⇩[Ⓕ, d, e] L2 ≡ L1 → ⇧[d, e] T1 ≡ T2 → C G L2 T2.
-
-definition S0s ≝ λC:candidate.
-                 ∀G,L1,L2,des. ⇩*[Ⓕ, des] L2 ≡ L1 →
-                 ∀T1,T2. ⇧*[des] T1 ≡ T2 → C G L1 T1 → C G L2 T2.
-
 (* Note: this is Girard's CR1 *)
 definition S1 ≝ λRP,C:candidate.
                 ∀G,L,T. C G L T → RP G L T.
@@ -46,11 +39,11 @@ definition S4 ≝ λRP,C:candidate.
                 ∀G,L,Vs. all … (RP G L) Vs → ∀k. C G L (ⒶVs.⋆k).
 
 definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i.
-                C G L (â\92¶Vs.V2) â\86\92 â\87§[0, i+1] V1 ≡ V2 →
-                â\87©[i] L ≡ K.ⓑ{I}V1 → C G L (ⒶVs.#i).
+                C G L (â\92¶Vs.V2) â\86\92 â¬\86[0, i+1] V1 ≡ V2 →
+                â¬\87[i] L ≡ K.ⓑ{I}V1 → C G L (ⒶVs.#i).
 
 definition S6 ≝ λRP,C:candidate.
-                â\88\80G,L,V1s,V2s. â\87§[0, 1] V1s ≡ V2s →
+                â\88\80G,L,V1s,V2s. â¬\86[0, 1] V1s ≡ V2s →
                 ∀a,V,T. C G (L.ⓓV) (ⒶV2s.T) → RP G L V → C G L (ⒶV1s.ⓓ{a}V.T).
 
 definition S7 ≝ λC:candidate.
@@ -58,8 +51,7 @@ definition S7 ≝ λC:candidate.
 
 (* requirements for the generic reducibility candidate *)
 record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate) : Prop ≝
-{ s0: S0 C;
-  s1: S1 RP C;
+{ s1: S1 RP C;
   s2: S2 RR RS RP C;
   s3: S3 C;
   s4: S4 RP C;
@@ -70,8 +62,8 @@ record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate
 
 (* the functional construction for candidates *)
 definition cfun: candidate → candidate → candidate ≝
-                 λC1,C2,G,K,T. ∀L,V,U,des.
-                 â\87©*[â\92», des] L â\89¡ K â\86\92 â\87§*[des] T â\89¡ U â\86\92 C1 G L V â\86\92 C2 G L (â\93\90V.U).
+                 λC1,C2,G,K,T. ∀L,W,U,des.
+                 â¬\87*[â\92», des] L â\89¡ K â\86\92 â¬\86*[des] T â\89¡ U â\86\92 C1 G L W â\86\92 C2 G L (â\93\90W.U).
 
 (* the reducibility candidate associated to an atomic arity *)
 let rec acr (RP:candidate) (A:aarity) on A: candidate ≝
@@ -86,51 +78,35 @@ interpretation
 
 (* Basic properties *********************************************************)
 
-(* Basic_1: was: sc3_lift1 *)
-lemma gcr_lifts: ∀C. S0 C → S0s C.
-#C #HC #G #L1 #L2 #des #H elim H -L1 -L2 -des
-[ #L #T1 #T2 #H #HT1 <(lifts_inv_nil … H) -H //
-| #L1 #L #L2 #des #d #e #_ #HL2 #IHL #T2 #T1 #H #HLT2
-  elim (lifts_inv_cons … H) -H /3 width=10 by/
-]
+(* Basic 1: was: sc3_lift *)
+lemma gcr_lift: ∀RR,RS,RP. gcp RR RS RP → ∀A,G. l_liftable1 (acr RP A G) (Ⓕ).
+#RR #RS #RP #H #A elim A -A
+/3 width=8 by cp2, drops_cons, lifts_cons/
 qed.
 
-lemma rp_lifts: ∀RR,RS,RP. gcr RR RS RP RP →
-                ∀des,G,L0,L,V,V0. ⇩*[Ⓕ, des] L0 ≡ L → ⇧*[des] V ≡ V0 →
-                RP G L V → RP G L0 V0.
-#RR #RS #RP #HRP #des #G #L0 #L #V #V0 #HL0 #HV0 #HV
-@gcr_lifts /width=7 by/
-@(s0 … HRP)
-qed.
-
-(* Basic_1: was only: sns3_lifts1 *)
-lemma rp_liftsv_all: ∀RR,RS,RP. gcr RR RS RP RP →
-                     ∀des,G,L0,L,Vs,V0s. ⇩*[Ⓕ, des] L0 ≡ L → ⇧*[des] Vs ≡ V0s →
-                     all … (RP G L) Vs → all … (RP G L0) V0s.
-#RR #RS #RP #HRP #des #G #L0 #L #Vs #V0s #HL0 #H elim H -Vs -V0s normalize //
-#T1s #T2s #T1 #T2 #HT12 #_ #IHT2s * /3 width=7 by rp_lifts, conj/
+(* Basic_1: was: sc3_lift1 *)
+lemma gcr_lifts: ∀RR,RS,RP. gcp RR RS RP → ∀A,G. l_liftables1 (acr RP A G) (Ⓕ).
+#RR #RS #RP #H #A #G @l1_liftable_liftables /2 width=7 by gcr_lift/
 qed.
 
 (* Basic_1: was:
-   sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast sc3_lift
+   sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast
 *)
 lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
                ∀A. gcr RR RS RP (acr RP A).
-#RR #RS #RP #H1RP #H2RP #A elim A -A normalize //
-#B #A #IHB #IHA @mk_gcr normalize
-[ /3 width=7 by drops_cons, lifts_cons/
-| #G #L #T #H
+#RR #RS #RP #H1RP #H2RP #A elim A -A //
+#B #A #IHB #IHA @mk_gcr
+[ #G #L #T #H
   elim (cp1 … H1RP G L) #k #HK
-  lapply (H ? (⋆k) ? (⟠) ? ? ?) -H
-  [3,5: // |2,4: skip
-  | @(s2 … IHB … (◊)) //
-  | #H @(cp2 … H1RP … k) @(s1 … IHA) //
+  lapply (H L (⋆k) T (◊) ? ? ?) -H //
+  [ lapply (s2 … IHB G L (◊) … HK) //
+  | /3 width=6 by s1, cp3/
   ]
 | #G #L #Vs #HVs #T #H1T #H2T #L0 #V0 #X #des #HL0 #H #HB
   elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct
   lapply (s1 … IHB … HB) #HV0
   @(s2 … IHA … (V0 @ V0s))
-  /3 width=14 by rp_liftsv_all, gcp_lifts, cp0, lifts_simple_dx, conj/
+  /3 width=14 by gcp2_lifts_all, gcp2_lifts, gcp0_lifts, lifts_simple_dx, conj/
 | #a #G #L #Vs #U #T #W #HA #L0 #V0 #X #des #HL0 #H #HB
   elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
   elim (lifts_inv_flat1 … HY) -HY #U0 #X #HU0 #HX #H destruct
@@ -140,7 +116,7 @@ lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
   elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
   >(lifts_inv_sort1 … HY) -Y
   lapply (s1 … IHB … HB) #HV0
-  @(s4 … IHA … (V0 @ V0s)) /3 width=7 by rp_liftsv_all, conj/
+  @(s4 … IHA … (V0 @ V0s)) /3 width=7 by gcp2_lifts_all, conj/
 | #I #G #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #L0 #V0 #X #des #HL0 #H #HB
   elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
   elim (lifts_inv_lref1 … HY) -HY #i0 #Hi0 #H destruct
@@ -156,12 +132,12 @@ lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
   elim (lifts_inv_bind1 … HY) -HY #V0 #T0 #HV0 #HT0 #H destruct
   elim (lift_total V10 0 1) #V20 #HV120
   elim (liftv_total 0 1 V10s) #V20s #HV120s
-  @(s6 … IHA … (V10 @ V10s) (V20 @ V20s)) /3 width=7 by rp_lifts, liftv_cons/
+  @(s6 … IHA … (V10 @ V10s) (V20 @ V20s)) /3 width=7 by gcp2_lifts, liftv_cons/
   @(HA … (des + 1)) /2 width=2 by drops_skip/
   [ @lifts_applv //
     elim (liftsv_liftv_trans_le … HV10s … HV120s) -V10s #V10s #HV10s #HV120s
     >(liftv_mono … HV12s … HV10s) -V1s //
-  | @(s0 … IHB … HB … HV120) /2 width=2 by drop_drop/
+  | @(gcr_lift … H1RP … HB … HV120) /2 width=2 by drop_drop/
   ]
 | #G #L #Vs #T #W #HA #HW #L0 #V0 #X #des #HL0 #H #HB
   elim (lifts_inv_applv1 … H) -H #V0s #Y #HV0s #HY #H destruct
@@ -172,7 +148,7 @@ qed.
 
 lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
                 ∀a,G,L,W,T,A,B. ⦃G, L, W⦄ ϵ[RP] 〚B〛 → (
-                   â\88\80L0,V0,W0,T0,des. â\87©*[â\92», des] L0 â\89¡ L â\86\92 â\87§*[des] W â\89¡ W0 â\86\92 â\87§*[des + 1] T ≡ T0 →
+                   â\88\80L0,V0,W0,T0,des. â¬\87*[â\92», des] L0 â\89¡ L â\86\92 â¬\86*[des] W â\89¡ W0 â\86\92 â¬\86*[des + 1] T ≡ T0 →
                                    ⦃G, L0, V0⦄ ϵ[RP] 〚B〛 → ⦃G, L0, W0⦄ ϵ[RP] 〚B〛 → ⦃G, L0.ⓓⓝW0.V0, T0⦄ ϵ[RP] 〚A〛
                 ) →
                 ⦃G, L, ⓛ{a}W.T⦄ ϵ[RP] 〚②B.A〛.
@@ -180,12 +156,12 @@ lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
 lapply (acr_gcr … H1RP H2RP A) #HCA
 lapply (acr_gcr … H1RP H2RP B) #HCB
 elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
-lapply (gcr_lifts … HL0 … HW0 HW) -HW [ @(s0 … HCB) ] #HW0
-@(s3 … HCA … (◊))
-@(s6 … HCA … (◊) (◊)) //
+lapply (gcr_lifts … H1RP … HL0 … HW0 HW) -HW #HW0
+lapply (s3 … HCA … a G L0 (◊)) #H @H -H
+lapply (s6 … HCA G L0 (◊) (◊) ?) // #H @H -H
 [ @(HA … HL0) //
 | lapply (s1 … HCB) -HCB #HCB
-  @(s7 … H2RP … (◊)) /2 width=1 by/
+  lapply (s7 … H2RP G L0 (◊)) /3 width=1 by/
 ]
 qed.