]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/fpr/lfpr_alt.etc
- extended multiple substitutions now uses bounds in ynat (ie. they
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / fpr / lfpr_alt.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( L1 ⊢ ➡ ➡ break term 46 L2 )"
16    non associative with precedence 45
17    for @{ 'PRedSnAlt $L1 $L2 }.
18
19 notation "hvbox( ⦃ term 46 L1 ⦄ ➡ ➡ break ⦃ term 46 L2 ⦄ )"
20    non associative with precedence 45
21    for @{ 'FocalizedPRedAlt $L1 $L2 }.
22
23 include "basic_2/grammar/lenv_px_bi.ma".
24 include "basic_2/reducibility/fpr_cpr.ma".
25 include "basic_2/reducibility/lfpr_fpr.ma".
26
27 (* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
28
29 (* alternative definition *)
30 definition lfpra: relation lenv ≝ lpx_bi fpr.
31
32 interpretation
33   "focalized parallel reduction (environment) alternative"
34   'FocalizedPRedAlt L1 L2 = (lfpra L1 L2).
35
36 (* Basic properties *********************************************************)
37
38 lemma lfpra_refl: reflexive … lfpra.
39 /2 width=1/ qed.
40
41 lemma fpr_lfpra: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
42 #L1 elim L1 -L1
43 [ #L2 #T1 #T2 #H
44   elim (fpr_inv_atom1 … H) -H #_ #H destruct //
45 | #L1 #I #V1 #IH #L2 #T1 #T2 #H
46   elim (fpr_inv_pair1 … H) -H #L #V #HV1 #HL1 #H destruct /3 width=3/
47 ]
48 qed.
49
50 (* Basic inversion lemmas ***************************************************)
51
52 lemma lfpra_inv_atom1: ∀L2. ⦃⋆⦄ ➡➡ ⦃L2⦄ → L2 = ⋆.
53 /2 width=2 by lpx_bi_inv_atom1/ qed-.
54
55 lemma lfpra_inv_pair1: ∀K1,I,V1,L2. ⦃K1. ⓑ{I} V1⦄ ➡➡ ⦃L2⦄ →
56                        ∃∃K2,V2. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
57                                 L2 = K2. ⓑ{I} V2.
58 /2 width=1 by lpx_bi_inv_pair1/ qed-.
59
60 lemma lfpra_inv_atom2: ∀L1. ⦃L1⦄ ➡➡ ⦃⋆⦄ → L1 = ⋆.
61 /2 width=2 by lpx_bi_inv_atom2/ qed-.
62
63 lemma lfpra_inv_pair2: ∀L1,K2,I,V2. ⦃L1⦄ ➡➡ ⦃K2. ⓑ{I} V2⦄ →
64                        ∃∃K1,V1. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
65                                 L1 = K1. ⓑ{I} V1.
66 /2 width=1 by lpx_bi_inv_pair2/ qed-.
67
68 lemma lfpra_inv_fpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ∀T.⦃L1, T⦄ ➡ ⦃L2, T⦄.
69 #L1 #L2 * -L1 -L2 // /3 width=1/
70 qed-.
71
72 (* Basic forward lemmas *****************************************************)
73
74 lemma lfpra_fwd_length: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → |L1| = |L2|.
75 /2 width=2 by lpx_bi_fwd_length/ qed-.
76
77 (* Main properties **********************************************************)
78
79 theorem lfpr_lfpra: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
80 #L1 #L2 #H
81 lapply (lfpr_inv_fpr … H (⋆0)) -H /2 width=3/
82 qed.
83
84 theorem lfpra_lfpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ⦃L1⦄ ➡ ⦃L2⦄.
85 #L1 #L2 #H
86 lapply (lfpra_inv_fpr … H (⋆0)) -H /2 width=3/
87 qed-.