]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/cpr/tprs.etc
update in binaries for λδ
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / cpr / tprs.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 notation "hvbox( T1 ➡ * break term 46 T2 )"
16    non associative with precedence 45
17    for @{ 'PRedStar $T1 $T2 }.
18
19 include "basic_2/reducibility/tpr.ma".
20
21 (* CONTEXT-FREE PARALLEL COMPUTATION ON TERMS *******************************)
22
23 (* Basic_1: includes: pr1_pr0 *)
24 definition tprs: relation term ≝ TC … tpr.
25
26 interpretation "context-free parallel computation (term)"
27    'PRedStar T1 T2 = (tprs T1 T2).
28
29 (* Basic eliminators ********************************************************)
30
31 lemma tprs_ind: ∀T1. ∀R:predicate term. R T1 →
32                 (∀T,T2. T1 ➡* T → T ➡ T2 → R T → R T2) →
33                 ∀T2. T1 ➡* T2 → R T2.
34 #T1 #R #HT1 #IHT1 #T2 #HT12
35 @(TC_star_ind … HT1 IHT1 … HT12) //
36 qed-.
37
38 lemma tprs_ind_dx: ∀T2. ∀R:predicate term. R T2 →
39                    (∀T1,T. T1 ➡ T → T ➡* T2 → R T → R T1) →
40                    ∀T1. T1 ➡* T2 → R T1.
41 #T2 #R #HT2 #IHT2 #T1 #HT12
42 @(TC_star_ind_dx … HT2 IHT2 … HT12) //
43 qed-.
44
45 (* Basic properties *********************************************************)
46
47 lemma tprs_refl: reflexive … tprs.
48 /2 width=1/ qed.
49
50 lemma tpr_tprs: ∀T1,T2. T1 ➡ T2 → T2 ➡* T2.
51 /2 width=1/ qed.
52
53 lemma tprs_strap1: ∀T1,T,T2. T1 ➡* T → T ➡ T2 → T1 ➡* T2.
54 /2 width=3/ qed.
55
56 lemma tprs_strap2: ∀T1,T,T2. T1 ➡ T → T ➡* T2 → T1 ➡* T2.
57 /2 width=3/ qed.
58
59 (* Basic_1: was only: pr1_head_1 *)
60 lemma tprs_pair_sn: ∀I,T1,T2. T1 ➡ T2 → ∀V1,V2. V1 ➡* V2 →
61                     ②{I} V1. T1 ➡* ②{I} V2. T2.
62 * [ #a ] #I #T1 #T2 #HT12 #V1 #V2 #H @(tprs_ind … H) -V2
63 [1,3: /3 width=1/
64 |2,4: #V #V2 #_ #HV2 #IHV1
65       @(tprs_strap1 … IHV1) -IHV1 /2 width=1/
66 ]
67 qed.
68
69 (* Basic_1: was only: pr1_head_2 *)
70 lemma tprs_pair_dx: ∀I,V1,V2. V1 ➡ V2 → ∀T1,T2. T1 ➡* T2 →
71                     ②{I} V1. T1 ➡* ②{I} V2. T2.
72 * [ #a ] #I #V1 #V2 #HV12 #T1 #T2 #H @(tprs_ind … H) -T2
73 [1,3: /3 width=1/
74 |2,4: #T #T2 #_ #HT2 #IHT1
75       @(tprs_strap1 … IHT1) -IHT1 /2 width=1/
76 ]
77 qed.
78
79 (* Basic inversion lemmas ***************************************************)
80
81 lemma tprs_inv_atom1: ∀U2,k. ⋆k ➡* U2 → U2 = ⋆k.
82 #U2 #k #H @(tprs_ind … H) -U2 //
83 #U #U2 #_ #HU2 #IHU1 destruct
84 >(tpr_inv_atom1 … HU2) -HU2 //
85 qed-.
86
87 lemma tprs_inv_cast1: ∀W1,T1,U2. ⓝW1.T1 ➡* U2 → T1 ➡* U2 ∨
88                       ∃∃W2,T2. W1 ➡* W2 & T1 ➡* T2 & U2 = ⓝW2.T2.
89 #W1 #T1 #U2 #H @(tprs_ind … H) -U2 /3 width=5/
90 #U #U2 #_ #HU2 * /3 width=3/ *
91 #W #T #HW1 #HT1 #H destruct
92 elim (tpr_inv_cast1 … HU2) -HU2 /3 width=3/ *
93 #W2 #T2 #HW2 #HT2 #H destruct /4 width=5/
94 qed-.