]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/etc/tshf/cpr_tshf.etc
milestone update in ground_2 and basic_2A
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / etc / tshf / cpr_tshf.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/grammar/tshf.ma".
16 include "basic_2/reduction/cpr.ma".
17
18 (* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************)
19
20 (* Forward lemmas on same head forms for terms ******************************)
21
22 lemma cpr_fwd_tshf1: ∀L,T1,T2. L ⊢ T1 ➡ T2 → T1 ≈ T1 →
23                      T2 ≈ T1 ∨ (L = ⋆ → ⊥).
24 #L #T1 #T2 #H elim H -L -T1 -T2
25 [ /2 width=1/
26 | #L #K #V1 #V2 #W2 #i #HLK #_ #_ #_ #_
27   @or_intror #H destruct
28   lapply (ldrop_inv_atom1 … HLK) -HLK #H destruct
29 | #a #I #L #V1 #V2 #T1 #T2 #_ #_ #_ #_ #H
30   elim (tshf_inv_bind1 … H) -H #W2 #U2 #H1 * #H2 destruct /2 width=1/
31 | #I #L #V1 #V2 #T1 #T2 #_ #_ #_ #IHT12 #H
32   elim (tshf_inv_flat1 … H) -H #W2 #U2 #HT1U2 #HT1 #_ #H1 #H2 destruct
33   lapply (IHT12 HT1U2) -IHT12 -HT1U2 * #HUT2 /3 width=1/
34   lapply (simple_tshf_repl_sn … HUT2 HT1) /3 width=1/
35 | #L #V #T #T1 #T2 #_ #_ #_ #H
36   elim (tshf_inv_bind1 … H) -H #W2 #U2 #H1 * #H2 destruct
37 | #L #V #T1 #T2 #_ #_ #H
38   elim (tshf_inv_flat1 … H) -H #W2 #U2 #_ #_ #_ #H destruct
39 | #a #L #V1 #V2 #W #T1 #T2 #_ #_ #_ #_ #H
40   elim (tshf_inv_flat1 … H) -H #W2 #U2 #_ #H
41   elim (simple_inv_bind … H)
42 | #a #L #V2 #V1 #V #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H
43   elim (tshf_inv_flat1 … H) -H #U1 #U2 #_ #H
44   elim (simple_inv_bind … H)
45 ]
46 qed-.