]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/computation/acp.ma
- bugfixed "aacr" allows to remove historical eta-conversions
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / acp.ma
index dc046b094990e20180b2f8ee38cd2c5d945ca5f1..6bcbfe4c7982511c4688364c154cfd64d72849e9 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/unfold/ldrops.ma".
+include "basic_2/grammar/genv.ma".
+include "basic_2/multiple/drops.ma".
 
 (* ABSTRACT COMPUTATION PROPERTIES ******************************************)
 
-definition CP1 ≝ λRR:lenv→relation term. λRS:relation term.
-                 ∀L,k. NF … (RR L) RS (⋆k).
+definition candidate: Type[0] ≝ relation3 genv lenv term.
 
-definition CP2 ≝ λRR:lenv→relation term. λRS:relation term.
-                 ∀L,K,W,i. ⇩[0,i] L ≡ K. ⓛW → NF … (RR L) RS (#i).
+definition CP0 ≝ λRR:relation4 genv lenv term term. λRS:relation term.
+                 ∀G,L0,L,T,T0,s,d,e. NF … (RR G L) RS T →
+                 ⇩[s, d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → NF … (RR G L0) RS T0.
 
-definition CP3 ≝ λRR:lenv→relation term. λRP:lenv→predicate term.
-                 ∀L,V,k. RP L (ⓐ⋆k.V) → RP L V.
+definition CP0s ≝ λRR:relation4 genv lenv term term. λRS:relation term.
+                  ∀G,L0,L,s,des. ⇩*[s, des] L0 ≡ L →
+                  ∀T,T0. ⇧*[des] T ≡ T0 →
+                  NF … (RR G L) RS T → NF … (RR G L0) RS T0.
 
-definition CP4 ≝ λRR:lenv→relation term. λRS:relation term.
-                 ∀L0,L,T,T0,d,e. NF … (RR L) RS T → 
-                 ⇩[d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → NF … (RR L0) RS T0.
+definition CP1 ≝ λRR:relation4 genv lenv term term. λRS:relation term.
+                 ∀G,L. ∃k. NF … (RR G L) RS (⋆k).
 
-definition CP4s ≝ λRR:lenv→relation term. λRS:relation term.
-                  ∀L0,L,des. ⇩*[des] L0 ≡ L →
-                  ∀T,T0. ⇧*[des] T ≡ T0 →
-                  NF … (RR L) RS T → NF … (RR L0) RS T0.
+definition CP2 ≝ λRP:candidate.
+                 ∀G,L,T,k. RP G L (ⓐ⋆k.T) → RP G L T.
 
 (* requirements for abstract computation properties *)
-record acp (RR:lenv->relation term) (RS:relation term) (RP:lenv→predicate term) : Prop ≝
-{ cp1: CP1 RR RS;
-  cp2: CP2 RR RS;
-  cp3: CP3 RR RP;
-  cp4: CP4 RR RS
+record acp (RR:relation4 genv lenv term term) (RS:relation term) (RP:candidate) : Prop ≝
+{ cp0: CP0 RR RS;
+  cp1: CP1 RR RS;
+  cp2: CP2 RP
 }.
 
 (* Basic properties *********************************************************)
 
 (* Basic_1: was: nf2_lift1 *)
-lemma acp_lifts: ∀RR,RS. CP4 RR RS → CP4s RR RS.
-#RR #RS #HRR #L1 #L2 #des #H elim H -L1 -L2 -des
+lemma acp_lifts: ∀RR,RS. CP0 RR RS → CP0s RR RS.
+#RR #RS #HRR #G #L1 #L2 #s #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=9/
+  elim (lifts_inv_cons … H) -H /3 width=10 by/
 ]
 qed.