]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/cpr/ltprs.etc
- basic_2: induction for preservation results now uses supclosure
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / cpr / ltprs.etc
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/reducibility/ltpr.ma".
16 include "basic_2/computation/tprs.ma".
17
18 (* CONTEXT-FREE PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS ******************)
19
20 definition ltprs: relation lenv ≝ TC … ltpr.
21
22 interpretation
23   "context-free parallel computation (environment)"
24   'PRedStar L1 L2 = (ltprs L1 L2).
25
26 (* Basic eliminators ********************************************************)
27
28 lemma ltprs_ind: ∀L1. ∀R:predicate lenv. R L1 →
29                  (∀L,L2. L1 ➡* L → L ➡ L2 → R L → R L2) →
30                  ∀L2. L1 ➡* L2 → R L2.
31 #L1 #R #HL1 #IHL1 #L2 #HL12
32 @(TC_star_ind … HL1 IHL1 … HL12) //
33 qed-.
34
35 lemma ltprs_ind_dx: ∀L2. ∀R:predicate lenv. R L2 →
36                     (∀L1,L. L1 ➡ L → L ➡* L2 → R L → R L1) →
37                     ∀L1. L1 ➡* L2 → R L1.
38 #L2 #R #HL2 #IHL2 #L1 #HL12
39 @(TC_star_ind_dx … HL2 IHL2 … HL12) //
40 qed-.
41
42 (* Basic properties *********************************************************)
43
44 lemma ltprs_refl: reflexive … ltprs.
45 /2 width=1/ qed.
46
47 lemma ltpr_ltprs: ∀L1,L2. L1 ➡ L2 → L1 ➡* L2.
48 /2 width=1/ qed.
49
50 lemma ltprs_strap1: ∀L1,L,L2. L1 ➡* L → L ➡ L2 → L1 ➡* L2.
51 /2 width=3/ qed.
52
53 lemma ltprs_strap2: ∀L1,L,L2. L1 ➡ L → L ➡* L2 → L1 ➡* L2.
54 /2 width=3/ qed.
55
56 (* Basic inversion lemmas ***************************************************)
57
58 lemma ltprs_inv_atom1: ∀L2. ⋆ ➡* L2 → L2 = ⋆.
59 #L2 #H @(ltprs_ind … H) -L2 //
60 #L #L2 #_ #HL2 #IHL1 destruct
61 >(ltpr_inv_atom1 … HL2) -L2 //
62 qed-.
63
64 lemma ltprs_inv_pair1: ∀I,K1,L2,V1. K1. ⓑ{I} V1 ➡* L2 →
65                        ∃∃K2,V2. K1 ➡* K2 & V1 ➡* V2 & L2 = K2. ⓑ{I} V2.
66 #I #K1 #L2 #V1 #H @(ltprs_ind … H) -L2 /2 width=5/
67 #L #L2 #_ #HL2 * #K #V #HK1 #HV1 #H destruct
68 elim (ltpr_inv_pair1 … HL2) -HL2 #K2 #V2 #HK2 #HV2 #H destruct /3 width=5/
69 qed-.
70
71 lemma ltprs_inv_atom2: ∀L1. L1 ➡* ⋆ → L1 = ⋆.
72 #L1 #H @(ltprs_ind_dx … H) -L1 //
73 #L1 #L #HL1 #_ #IHL2 destruct
74 >(ltpr_inv_atom2 … HL1) -L1 //
75 qed-.
76
77 lemma ltprs_inv_pair2: ∀I,L1,K2,V2. L1 ➡* K2. ⓑ{I} V2 →
78                        ∃∃K1,V1. K1 ➡* K2 & V1 ➡* V2 & L1 = K1. ⓑ{I} V1.
79 #I #L1 #K2 #V2 #H @(ltprs_ind_dx … H) -L1 /2 width=5/
80 #L1 #L #HL1 #_ * #K #V #HK2 #HV2 #H destruct
81 elim (ltpr_inv_pair2 … HL1) -HL1 #K1 #V1 #HK1 #HV1 #H destruct /3 width=5/
82 qed-.
83
84 (* Basic forward lemmas *****************************************************)
85
86 lemma ltprs_fwd_length: ∀L1,L2. L1 ➡* L2 → |L1| = |L2|.
87 #L1 #L2 #H @(ltprs_ind … H) -L2 //
88 #L #L2 #_ #HL2 #IHL1
89 >IHL1 -L1 >(ltpr_fwd_length … HL2) -HL2 //
90 qed-.