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