]> matita.cs.unibo.it Git - helm.git/blob - 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
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2/grammar/genv.ma".
16 include "basic_2/multiple/drops.ma".
17
18 (* ABSTRACT COMPUTATION PROPERTIES ******************************************)
19
20 definition candidate: Type[0] ≝ relation3 genv lenv term.
21
22 definition CP0 ≝ λRR:relation4 genv lenv term term. λRS:relation term.
23                  ∀G,L0,L,T,T0,s,d,e. NF … (RR G L) RS T →
24                  ⇩[s, d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → NF … (RR G L0) RS T0.
25
26 definition CP0s ≝ λRR:relation4 genv lenv term term. λRS:relation term.
27                   ∀G,L0,L,s,des. ⇩*[s, des] L0 ≡ L →
28                   ∀T,T0. ⇧*[des] T ≡ T0 →
29                   NF … (RR G L) RS T → NF … (RR G L0) RS T0.
30
31 definition CP1 ≝ λRR:relation4 genv lenv term term. λRS:relation term.
32                  ∀G,L. ∃k. NF … (RR G L) RS (⋆k).
33
34 definition CP2 ≝ λRP:candidate.
35                  ∀G,L,T,k. RP G L (ⓐ⋆k.T) → RP G L T.
36
37 (* requirements for abstract computation properties *)
38 record acp (RR:relation4 genv lenv term term) (RS:relation term) (RP:candidate) : Prop ≝
39 { cp0: CP0 RR RS;
40   cp1: CP1 RR RS;
41   cp2: CP2 RP
42 }.
43
44 (* Basic properties *********************************************************)
45
46 (* Basic_1: was: nf2_lift1 *)
47 lemma acp_lifts: ∀RR,RS. CP0 RR RS → CP0s RR RS.
48 #RR #RS #HRR #G #L1 #L2 #s #des #H elim H -L1 -L2 -des
49 [ #L #T1 #T2 #H #HT1
50   <(lifts_inv_nil … H) -H //
51 | #L1 #L #L2 #des #d #e #_ #HL2 #IHL #T2 #T1 #H #HLT2
52   elim (lifts_inv_cons … H) -H /3 width=10 by/
53 ]
54 qed.