]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/fpr/lenv_px_bi.etc
update in binaries for λδ
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / fpr / lenv_px_bi.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/lenv_length.ma".
16
17 (* POINTWISE EXTENSION OF A FOCALIZED REALTION FOR TERMS ********************)
18
19 inductive lpx_bi (R:bi_relation lenv term): relation lenv ≝
20 | lpx_bi_stom: lpx_bi R (⋆) (⋆)
21 | lpx_bi_pair: ∀I,K1,K2,V1,V2.
22                lpx_bi R K1 K2 → R K1 V1 K2 V2 →
23                lpx_bi R (K1. ⓑ{I} V1) (K2. ⓑ{I} V2)
24 .
25
26 (* Basic inversion lemmas ***************************************************)
27
28 fact lpx_bi_inv_atom1_aux: ∀R,L1,L2. lpx_bi R L1 L2 → L1 = ⋆ → L2 = ⋆.
29 #R #L1 #L2 * -L1 -L2
30 [ //
31 | #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
32 ]
33 qed-.
34
35 lemma lpx_bi_inv_atom1: ∀R,L2. lpx_bi R (⋆) L2 → L2 = ⋆.
36 /2 width=4 by lpx_bi_inv_atom1_aux/ qed-.
37
38 fact lpx_bi_inv_pair1_aux: ∀R,L1,L2. lpx_bi R L1 L2 →
39                            ∀I,K1,V1. L1 = K1. ⓑ{I} V1 →
40                            ∃∃K2,V2. lpx_bi R K1 K2 &
41                                     R K1 V1 K2 V2 & L2 = K2. ⓑ{I} V2.
42 #R #L1 #L2 * -L1 -L2
43 [ #J #K1 #V1 #H destruct
44 | #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #L #W #H destruct /2 width=5/
45 ]
46 qed-.
47
48 lemma lpx_bi_inv_pair1: ∀R,I,K1,V1,L2. lpx_bi R (K1. ⓑ{I} V1) L2 →
49                         ∃∃K2,V2. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
50                                  L2 = K2. ⓑ{I} V2.
51 /2 width=3 by lpx_bi_inv_pair1_aux/ qed-.
52
53 fact lpx_bi_inv_atom2_aux: ∀R,L1,L2. lpx_bi R L1 L2 → L2 = ⋆ → L1 = ⋆.
54 #R #L1 #L2 * -L1 -L2
55 [ //
56 | #I #K1 #K2 #V1 #V2 #_ #_ #H destruct
57 ]
58 qed-.
59
60 lemma lpx_bi_inv_atom2: ∀R,L1. lpx_bi R L1 (⋆) → L1 = ⋆.
61 /2 width=4 by lpx_bi_inv_atom2_aux/ qed-.
62
63 fact lpx_bi_inv_pair2_aux: ∀R,L1,L2. lpx_bi R L1 L2 →
64                            ∀I,K2,V2. L2 = K2. ⓑ{I} V2 →
65                            ∃∃K1,V1. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
66                                     L1 = K1. ⓑ{I} V1.
67 #R #L1 #L2 * -L1 -L2
68 [ #J #K2 #V2 #H destruct
69 | #I #K1 #K2 #V1 #V2 #HK12 #HV12 #J #K #W #H destruct /2 width=5/
70 ]
71 qed-.
72
73 lemma lpx_bi_inv_pair2: ∀R,I,L1,K2,V2. lpx_bi R L1 (K2. ⓑ{I} V2) →
74                         ∃∃K1,V1. lpx_bi R K1 K2 & R K1 V1 K2 V2 &
75                                  L1 = K1. ⓑ{I} V1.
76 /2 width=3 by lpx_bi_inv_pair2_aux/ qed-.
77
78 (* Basic forward lemmas *****************************************************)
79
80 lemma lpx_bi_fwd_length: ∀R,L1,L2. lpx_bi R L1 L2 → |L1| = |L2|.
81 #R #L1 #L2 #H elim H -L1 -L2 normalize //
82 qed-.
83
84 (* Basic properties *********************************************************)
85
86 lemma lpx_bi_refl: ∀R. bi_reflexive ? ? R → reflexive … (lpx_bi R).
87 #R #HR #L elim L -L // /2 width=1/
88 qed.