]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/static_2/static/gcp_cr.ma
partial commit in static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / static / gcp_cr.ma
index 10d8fa4b11c4ae47ced7e8d80a34ce98fd7ebde7..e1b88f5b682d1f8ce0689e7556e3cb31c4311c41 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "static_2/notation/relations/ineint_5.ma".
+include "static_2/notation/relations/inwbrackets_5.ma".
 include "static_2/syntax/aarity.ma".
 include "static_2/relocation/lifts_simple.ma".
 include "static_2/relocation/lifts_lifts_vector.ma".
@@ -28,23 +28,20 @@ definition S1 ≝ λRP,C:candidate.
 (* Note: this is Tait's iii, or Girard's CR4 *)
 definition S2 ≝ λRR:relation4 genv lenv term term. λRS:relation term. λRP,C:candidate.
                 ∀G,L,Vs. all … (RP G L) Vs →
-                â\88\80T. ð\9d\90\92â¦\83Tâ¦\84 â\86\92 NF â\80¦ (RR G L) RS T → C G L (ⒶVs.T).
+                â\88\80T. ð\9d\90\92â\9dªTâ\9d« â\86\92 nf RR RS G L T → C G L (ⒶVs.T).
 
-(* Note: this generalizes Tait's ii *)
+(* Note: this generalizes Tait's ii, or Girard's CR3 *)
 definition S3 ≝ λC:candidate.
                 ∀a,G,L,Vs,V,T,W.
-                C G L (ⒶVs.ⓓ{a}ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ{a}W.T).
-
-definition S4 ≝ λRP,C:candidate.
-                ∀G,L,Vs. all … (RP G L) Vs → ∀s. C G L (ⒶVs.⋆s).
+                C G L (ⒶVs.ⓓ[a]ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ[a]W.T).
 
 definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i.
-                C G L (â\92¶Vs.V2) â\86\92 â¬\86*[↑i] V1 ≘ V2 →
-                â¬\87*[i] L â\89\98 K.â\93\91{I}V1 → C G L (ⒶVs.#i).
+                C G L (â\92¶Vs.V2) â\86\92 â\87§[↑i] V1 ≘ V2 →
+                â\87©[i] L â\89\98 K.â\93\91[I]V1 → C G L (ⒶVs.#i).
 
 definition S6 ≝ λRP,C:candidate.
-                â\88\80G,L,V1b,V2b. â¬\86*[1] V1b ≘ V2b →
-                ∀a,V,T. C G (L.ⓓV) (ⒶV2b.T) → RP G L V → C G L (ⒶV1b.ⓓ{a}V.T).
+                â\88\80G,L,V1b,V2b. â\87§[1] V1b ≘ V2b →
+                ∀a,V,T. C G (L.ⓓV) (ⒶV2b.T) → RP G L V → C G L (ⒶV1b.ⓓ[a]V.T).
 
 definition S7 ≝ λC:candidate.
                 ∀G,L,Vs,T,W. C G L (ⒶVs.T) → C G L (ⒶVs.W) → C G L (ⒶVs.ⓝW.T).
@@ -54,7 +51,6 @@ record gcr (RR:relation4 genv lenv term term) (RS:relation term) (RP,C:candidate
 { s1: S1 RP C;
   s2: S2 RR RS RP C;
   s3: S3 C;
-  s4: S4 RP C;
   s5: S5 C;
   s6: S6 RP C;
   s7: S7 C
@@ -63,7 +59,7 @@ 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. ∀f,L,W,U.
-                 â¬\87*[â\92»,f] L â\89\98 K â\86\92 â¬\86*[f] T ≘ U → C1 G L W → C2 G L (ⓐW.U).
+                 â\87©*[â\92»,f] L â\89\98 K â\86\92 â\87§*[f] T ≘ U → C1 G L W → C2 G L (ⓐW.U).
 
 (* the reducibility candidate associated to an atomic arity *)
 rec definition acr (RP:candidate) (A:aarity) on A: candidate ≝
@@ -74,11 +70,11 @@ match A with
 
 interpretation
    "reducibility candidate of an atomic arity (abstract)"
-   'InEInt RP G L T A = (acr RP A G L T).
+   'InWBrackets RP G L T A = (acr RP A G L T).
 
 (* Basic properties *********************************************************)
 
-(* Note: this requires Ⓕ-slicing in cfun since b is unknown in d_liftable_1 *) 
+(* Note: this requires Ⓕ-slicing in cfun since b is unknown in d_liftable_1 *)
 (* Note: this requires multiple relocation *)
 (* Basic 1: includes: sc3_lift *)
 (* Basic 2A1: includes: gcr_lift *)
@@ -99,14 +95,16 @@ qed-.
 (* Basic_1: was:
    sc3_sn3 sc3_abst sc3_appl sc3_abbr sc3_bind sc3_cast
 *)
+(* Note: one sort must exist *)
 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 //
 #B #A #IHB #IHA @mk_gcr
 [ #G #L #T #H
-  elim (cp1 … H1RP G L) #s #HK
+  letin s ≝ 0 (* one sort must exist *)
+  lapply (cp1 … H1RP G L s) #HK
   lapply (s2 … IHB G L (Ⓔ) … HK) // #HB
-  lapply (H (ð\9d\90\88ð\9d\90\9d) L (⋆s) T ? ? ?) -H
+  lapply (H (ð\9d\90¢) L (⋆s) T ? ? ?) -H
   /3 width=6 by s1, cp3, drops_refl, lifts_refl/
 | #G #L #Vs #HVs #T #H1T #H2T #f #L0 #V0 #X #HL0 #H #HB
   elim (lifts_inv_applv1 … H) -H #V0s #T0 #HV0s #HT0 #H destruct
@@ -117,33 +115,28 @@ lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
   elim (lifts_inv_flat1 … H0) -H0 #U0 #X #HU0 #HX #H destruct
   elim (lifts_inv_bind1 … HX) -HX #W0 #T0 #HW0 #HT0 #H destruct
   @(s3 … IHA … (V0⨮V0s)) /5 width=6 by lifts_applv, lifts_flat, lifts_bind/
-| #G #L #Vs #HVs #s #f #L0 #V0 #X #HL0 #H #HB
-  elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct
-  >(lifts_inv_sort1 … H0) -X0
-  lapply (s1 … IHB … HB) #HV0
-  @(s4 … IHA … (V0⨮V0s)) /3 width=7 by gcp2_all, conj/
 | #I #G #L #K #Vs #V1 #V2 #i #HA #HV12 #HLK #f #L0 #V0 #X #HL0 #H #HB
   elim (lifts_inv_applv1 … H) -H #V0s #X0 #HV0s #H0 #H destruct
   elim (lifts_inv_lref1 … H0) -H0 #j #Hf #H destruct
   lapply (drops_trans … HL0 … HLK ??) [3: |*: // ] -HLK #H
-  elim (drops_split_trans … H) -H [ |*: /2 width=6 by after_uni_dx/ ] #Y #HLK0 #HY
+  elim (drops_split_trans … H) -H [ |*: /2 width=6 by pr_after_nat_uni/ ] #Y #HLK0 #HY
   lapply (drops_tls_at … Hf … HY) -HY #HY
   elim (drops_inv_skip2 … HY) -HY #Z #K0 #HK0 #HZ #H destruct
   elim (liftsb_inv_pair_sn … HZ) -HZ #W1 #HVW1 #H destruct
-  elim (lifts_total W1 (ð\9d\90\94â\9d´â\86\91\9dµ)) #W2 #HW12
+  elim (lifts_total W1 (ð\9d\90\94â\9d¨â\86\91\9d©)) #W2 #HW12
   lapply (lifts_trans … HVW1 … HW12 ??) -HVW1 [3: |*: // ] #H
-  lapply (lifts_conf … HV12 … H f ?) -V1 [ /2 width=3 by after_uni_succ_sn/ ] #HVW2
+  lapply (lifts_conf … HV12 … H f ?) -V1 [ /2 width=3 by pr_pat_after_uni_tls/ ] #HVW2
   @(s5 … IHA … (V0⨮V0s) … HW12) /3 width=4 by drops_inv_gen, lifts_applv/
 | #G #L #V1s #V2s #HV12s #p #V #T #HA #HV #f #L0 #V10 #X #HL0 #H #HB
   elim (lifts_inv_applv1 … H) -H #V10s #X0 #HV10s #H0 #H destruct
   elim (lifts_inv_bind1 … H0) -H0 #V0 #T0 #HV0 #HT0 #H destruct
-  elim (lifts_total V10 (ð\9d\90\94â\9d´1â\9dµ)) #V20 #HV120
-  elim (liftsv_total (ð\9d\90\94â\9d´1â\9dµ) V10s) #V20s #HV120s
+  elim (lifts_total V10 (ð\9d\90\94â\9d¨1â\9d©)) #V20 #HV120
+  elim (liftsv_total (ð\9d\90\94â\9d¨1â\9d©) V10s) #V20s #HV120s
   @(s6 … IHA … (V10⨮V10s) (V20⨮V20s)) /3 width=7 by cp2, liftsv_cons/
   @(HA … (⫯f)) /3 width=2 by drops_skip, ext2_pair/
   [ @lifts_applv //
     lapply (liftsv_trans … HV10s … HV120s ??) -V10s [3: |*: // ] #H
-    elim (liftsv_split_trans â\80¦ H (ð\9d\90\94â\9d´1â\9dµ) (⫯f)) /2 width=1 by after_uni_one_sn/ #V10s #HV10s #HV120s
+    elim (liftsv_split_trans â\80¦ H (ð\9d\90\94â\9d¨1â\9d©) (⫯f)) /2 width=1 by pr_after_unit_sn/ #V10s #HV10s #HV120s
     >(liftsv_mono … HV12s … HV10s) -V1s //
   | @(acr_lifts … H1RP … HB … HV120) /3 width=2 by drops_refl, drops_drop/
   ]
@@ -155,11 +148,11 @@ lemma acr_gcr: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
 qed.
 
 lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
-                â\88\80p,G,L,W,T,A,B. â¦\83G,L,Wâ¦\84 Ïµ[RP] ã\80\9a\80\9b → (
-                   â\88\80b,f,L0,V0,W0,T0. â¬\87*[b,f] L0 â\89\98 L â\86\92 â¬\86*[f] W â\89\98 W0 â\86\92 â¬\86*[⫯f] T ≘ T0 →
-                                   â¦\83G,L0,V0â¦\84 Ïµ[RP] ã\80\9a\80\9b â\86\92 â¦\83G,L0,W0â¦\84 Ïµ[RP] ã\80\9a\80\9b â\86\92 â¦\83G,L0.â\93\93â\93\9dW0.V0,T0â¦\84 Ïµ[RP] ã\80\9a\80\9b
+                â\88\80p,G,L,W,T,A,B. â\9dªG,L,Wâ\9d« Ïµ â\9f¦Bâ\9f§[RP] → (
+                   â\88\80b,f,L0,V0,W0,T0. â\87©*[b,f] L0 â\89\98 L â\86\92 â\87§*[f] W â\89\98 W0 â\86\92 â\87§*[⫯f] T ≘ T0 →
+                                   â\9dªG,L0,V0â\9d« Ïµ â\9f¦Bâ\9f§[RP] â\86\92 â\9dªG,L0,W0â\9d« Ïµ â\9f¦Bâ\9f§[RP] â\86\92 â\9dªG,L0.â\93\93â\93\9dW0.V0,T0â\9d« Ïµ â\9f¦Aâ\9f§[RP]
                 ) →
-                â¦\83G,L,â\93\9b{p}W.Tâ¦\84 Ïµ[RP] ã\80\9aâ\91¡B.Aã\80\9b.
+                â\9dªG,L,â\93\9b[p]W.Tâ\9d« Ïµ â\9f¦â\91¡B.Aâ\9f§[RP].
 #RR #RS #RP #H1RP #H2RP #p #G #L #W #T #A #B #HW #HA #f #L0 #V0 #X #HL0 #H #HB
 lapply (acr_gcr … H1RP H2RP A) #HCA
 lapply (acr_gcr … H1RP H2RP B) #HCB