]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/reducibility/cfpr.ma
- improved Makefile esp. with the "trim" function
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / reducibility / cfpr.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/reducibility/cpr.ma".
16 include "basic_2/reducibility/fpr.ma".
17
18 (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON CLOSURES *************************)
19
20 definition cfpr: lenv → bi_relation lenv term ≝
21                  λL,L1,T1,L2,T2. |L1| = |L2| ∧ L ⊢ L1 @@ T1 ➡ L2 @@ T2.
22
23 interpretation
24    "context-sensitive parallel reduction (closure)"
25    'FocalizedPRed L L1 T1 L2 T2 = (cfpr L L1 T1 L2 T2).
26
27 (* Basic properties *********************************************************)
28
29 lemma cfpr_refl: ∀L. bi_reflexive … (cfpr L).
30 /2 width=1/ qed.
31
32 lemma fpr_cfpr: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⋆ ⊢ ⦃L1, T1⦄ ➡ ⦃L2, T2⦄.
33 #L1 #L2 #T1 #T2 * /3 width=1/
34 qed.
35
36 (* Basic inversion lemmas ***************************************************)
37
38 lemma cfpr_inv_atom1: ∀L,L2,T1,T2. L ⊢ ⦃⋆, T1⦄ ➡ ⦃L2, T2⦄ → L ⊢ T1 ➡ T2 ∧ L2 = ⋆.
39 #L #L2 #T1 #T2 * #H >(length_inv_zero_sn … H) /2 width=1/
40 qed-.
41
42 (* Advanced inversion lemmas ************************************************)
43
44 lemma fpr_inv_pair1_sn: ∀I,K1,L2,V1,T1,T2. ⦃⋆.ⓑ{I}V1@@K1, T1⦄ ➡ ⦃L2, T2⦄ →
45                         ∃∃K2,V2. V1 ➡ V2 &
46                                  ⋆.ⓑ{I}V2 ⊢ ⦃K1, T1⦄ ➡ ⦃K2, T2⦄  &
47                                  L2 = ⋆.ⓑ{I}V2@@K2.
48 #I1 #K1 #L2 #V1 #T1 #T2 * >append_length #H
49 elim (length_inv_pos_sn_append … H) -H #I2 #K2 #V2 #HK12 #H destruct
50 >shift_append_assoc >shift_append_assoc normalize in ⊢ (%→?); #H
51 elim (tpr_inv_bind1 … H) -H *
52 [ #V0 #T #T0 #HV10 #HT1 #HT0 #H destruct /5 width=5/
53 | #T0 #_ #_ #H destruct
54 ]
55 qed-.