]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/acp.ma
0d054da39e51417de00ed28354993be77101fbf2
[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 CP0 ≝ λRR:relation4 genv lenv term term. λRS:relation term.
21                  ∀G,L0,L,T,T0,s,d,e. NF … (RR G L) RS T →
22                  ⇩[s, d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → NF … (RR G L0) RS T0.
23
24 definition CP0s ≝ λRR:relation4 genv lenv term term. λRS:relation term.
25                   ∀G,L0,L,s,des. ⇩*[s, des] L0 ≡ L →
26                   ∀T,T0. ⇧*[des] T ≡ T0 →
27                   NF … (RR G L) RS T → NF … (RR G L0) RS T0.
28
29 definition CP1 ≝ λRR:relation4 genv lenv term term. λRS:relation term.
30                  ∀G,L. ∃k. NF … (RR G L) RS (⋆k).
31
32 definition CP2 ≝ λRP:relation3 genv lenv term.
33                  ∀G,L,T,k. RP G L (ⓐ⋆k.T) → RP G L T.
34
35 (* requirements for abstract computation properties *)
36 record acp (RR:relation4 genv lenv term term) (RS:relation term) (RP:relation3 genv lenv term) : Prop ≝
37 { cp0: CP0 RR RS;
38   cp1: CP1 RR RS;
39   cp2: CP2 RP
40 }.
41
42 (* Basic properties *********************************************************)
43
44 (* Basic_1: was: nf2_lift1 *)
45 lemma acp_lifts: ∀RR,RS. CP0 RR RS → CP0s RR RS.
46 #RR #RS #HRR #G #L1 #L2 #s #des #H elim H -L1 -L2 -des
47 [ #L #T1 #T2 #H #HT1
48   <(lifts_inv_nil … H) -H //
49 | #L1 #L #L2 #des #d #e #_ #HL2 #IHL #T2 #T1 #H #HLT2
50   elim (lifts_inv_cons … H) -H /3 width=10 by/
51 ]
52 qed.