]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/acp.ma
22efc2d11916d1c06b770fbbacd70d2812174cfb
[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/ldrops.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 definition CP3 ≝ λRP:relation3 genv lenv term.
36                  ∀G,L,W,T. RP G L W → RP G L T → RP G L (ⓝW.T).
37
38 (* requirements for abstract computation properties *)
39 record acp (RR:relation4 genv lenv term term) (RS:relation term) (RP:relation3 genv lenv term) : Prop ≝
40 { cp0: CP0 RR RS;
41   cp1: CP1 RR RS;
42   cp2: CP2 RP;
43   cp3: CP3 RP
44 }.
45
46 (* Basic properties *********************************************************)
47
48 (* Basic_1: was: nf2_lift1 *)
49 lemma acp_lifts: ∀RR,RS. CP0 RR RS → CP0s RR RS.
50 #RR #RS #HRR #G #L1 #L2 #s #des #H elim H -L1 -L2 -des
51 [ #L #T1 #T2 #H #HT1
52   <(lifts_inv_nil … H) -H //
53 | #L1 #L #L2 #des #d #e #_ #HL2 #IHL #T2 #T1 #H #HLT2
54   elim (lifts_inv_cons … H) -H /3 width=10 by/
55 ]
56 qed.