]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/fpr/fpr.etc
components: arity, csuba
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / fpr / fpr.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( ⦃ term 46 L1, break term 46 T1 ⦄ ➡ break ⦃ term 46 L2 , break term 46 T2 ⦄ )"
16    non associative with precedence 45
17    for @{ 'FocalizedPRed $L1 $T1 $L2 $T2 }.
18
19 include "basic_2/reducibility/tpr.ma".
20
21 (* CONTEXT-FREE PARALLEL REDUCTION ON CLOSURES ******************************)
22
23 definition fpr: bi_relation lenv term ≝
24                 λL1,T1,L2,T2. |L1| = |L2| ∧ L1 @@ T1 ➡ L2 @@ T2.
25
26 interpretation
27    "context-free parallel reduction (closure)"
28    'FocalizedPRed L1 T1 L2 T2 = (fpr L1 T1 L2 T2).
29
30 (* Basic properties *********************************************************)
31
32 lemma fpr_refl: bi_reflexive … fpr.
33 /2 width=1/ qed.
34
35 lemma fpr_shift: ∀I1,I2,L1,L2,V1,V2,T1,T2.
36                  ⦃L1, -ⓑ{I1}V1.T1⦄ ➡ ⦃L2, -ⓑ{I2}V2.T2⦄ →
37                  ⦃L1.ⓑ{I1}V1, T1⦄ ➡ ⦃L2.ⓑ{I2}V2, T2⦄.
38 #I1 #I2 #L1 #L2 #V1 #V2 #T1 #T2 * #HL12 #HT12
39 @conj // normalize // (**) (* explicit constructor *)
40 qed.
41
42 (* Basic inversion lemmas ***************************************************)
43
44 lemma fpr_inv_atom1: ∀L2,T1,T2. ⦃⋆, T1⦄ ➡ ⦃L2, T2⦄ → T1 ➡ T2 ∧ L2 = ⋆.
45 #L2 #T1 #T2 * #H
46 lapply (length_inv_zero_sn … H) -H #H destruct /2 width=1/
47 qed-.
48
49 lemma fpr_inv_atom3: ∀L1,T1,T2. ⦃L1,T1⦄ ➡ ⦃⋆,T2⦄ → T1 ➡ T2 ∧ L1 = ⋆.
50 #L1 #T1 #T2 * #H
51 lapply (length_inv_zero_dx … H) -H #H destruct /2 width=1/
52 qed-.
53
54 (* Basic forward lemmas *****************************************************)
55
56 lemma fpr_fwd_pair1: ∀I1,K1,L2,V1,T1,T2. ⦃K1.ⓑ{I1}V1, T1⦄ ➡ ⦃L2, T2⦄ →
57                      ∃∃I2,K2,V2. ⦃K1, -ⓑ{I1}V1.T1⦄ ➡ ⦃K2, -ⓑ{I2}V2.T2⦄  &
58                                  L2 = K2.ⓑ{I2}V2.
59 #I1 #K1 #L2 #V1 #T1 #T2 * #H
60 elim (length_inv_pos_sn … H) -H #I2 #K2 #V2 #HK12 #H destruct /3 width=5/
61 qed-.
62
63 lemma fpr_fwd_pair3: ∀I2,L1,K2,V2,T1,T2. ⦃L1, T1⦄ ➡ ⦃K2.ⓑ{I2}V2, T2⦄ →
64                      ∃∃I1,K1,V1. ⦃K1, -ⓑ{I1}V1.T1⦄ ➡ ⦃K2, -ⓑ{I2}V2.T2⦄  &
65                                  L1 = K1.ⓑ{I1}V1.
66 #I2 #L1 #K2 #V2 #T1 #T2 * #H
67 elim (length_inv_pos_dx … H) -H #I1 #K1 #V1 #HK12 #H destruct /3 width=5/
68 qed-.