]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/relocation/lreq.ma
first commit for lreq ...
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / relocation / lreq.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/notation/relations/lazyeq_3.ma".
16 include "basic_2/grammar/ceq.ma".
17 include "basic_2/relocation/lexs.ma".
18
19 (* RANGED EQUIVALENCE FOR LOCAL ENVIRONMENTS ********************************)
20
21 (* Basic_2A1: includes: lreq_atom lreq_zero lreq_pair lreq_succ *)
22 definition lreq: relation3 rtmap lenv lenv ≝ lexs ceq cfull.
23
24 interpretation
25   "ranged equivalence (local environment)"
26   'LazyEq f L1 L2 = (lreq f L1 L2).
27
28 (* Basic properties *********************************************************)
29
30 lemma lreq_eq_repl_back: ∀L1,L2. eq_stream_repl_back … (λf. L1 ≡[f] L2).
31 /2 width=3 by lexs_eq_repl_back/ qed-.
32
33 lemma lreq_eq_repl_fwd: ∀L1,L2. eq_stream_repl_fwd … (λf. L1 ≡[f] L2).
34 /2 width=3 by lexs_eq_repl_fwd/ qed-.
35
36 lemma sle_lreq_trans: ∀L1,L2,f2. L1 ≡[f2] L2 →
37                       ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2.
38 /2 width=3 by sle_lexs_trans/ qed-.
39
40 (* Basic_2A1: includes: lreq_refl *)
41 lemma lreq_refl: ∀f. reflexive … (lreq f).
42 /2 width=1 by lexs_refl/ qed.
43
44 (* Basic_2A1: includes: lreq_sym *)
45 lemma lreq_sym: ∀f. symmetric … (lreq f).
46 #f #L1 #L2 #H elim H -L1 -L2 -f
47 /2 width=1 by lexs_next, lexs_push/
48 qed-.
49
50 (* Basic inversion lemmas ***************************************************)
51
52 (* Basic_2A1: includes: lreq_inv_atom1 *)
53 lemma lreq_inv_atom1: ∀Y,f. ⋆ ≡[f] Y → Y = ⋆.
54 /2 width=4 by lexs_inv_atom1/ qed-.
55
56 (* Basic_2A1: includes: lreq_inv_pair1 *)
57 lemma lreq_inv_next1: ∀J,K1,Y,W1,g. K1.ⓑ{J}W1 ≡[⫯g] Y →
58                       ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓑ{J}W1.
59 #J #K1 #Y #W1 #g #H elim (lexs_inv_next1 … H) -H /2 width=3 by ex2_intro/
60 qed-.
61
62 (* Basic_2A1: includes: lreq_inv_zero1 lreq_inv_succ1 *)
63 lemma lreq_inv_push1: ∀J,K1,Y,W1,g. K1.ⓑ{J}W1 ≡[↑g] Y →
64                       ∃∃K2,W2. K1 ≡[g] K2 & Y = K2.ⓑ{J}W2.
65 #J #K1 #Y #W1 #g #H elim (lexs_inv_push1 … H) -H /2 width=4 by ex2_2_intro/ qed-.
66
67 (* Basic_2A1: includes: lreq_inv_atom2 *)
68 lemma lreq_inv_atom2: ∀X,f. X ≡[f] ⋆ → X = ⋆.
69 /2 width=4 by lexs_inv_atom2/ qed-.
70
71 (* Basic_2A1: includes: lreq_inv_pair2 *)
72 lemma lreq_inv_next2: ∀J,X,K2,W2,g. X ≡[⫯g] K2.ⓑ{J}W2 →
73                       ∃∃K1. K1 ≡[g] K2 & X = K1.ⓑ{J}W2.
74 #J #X #K2 #W2 #g #H elim (lexs_inv_next2 … H) -H /2 width=3 by ex2_intro/ qed-.
75
76 (* Basic_2A1: includes: lreq_inv_zero2 lreq_inv_succ2 *)
77 lemma lreq_inv_push2: ∀J,X,K2,W2,g. X ≡[↑g] K2.ⓑ{J}W2 →
78                       ∃∃K1,W1. K1 ≡[g] K2 & X = K1.ⓑ{J}W1.
79 #J #X #K2 #W2 #g #H elim (lexs_inv_push2 … H) -H /2 width=4 by ex2_2_intro/ qed-.
80
81 (* Basic_2A1: includes: lreq_inv_pair *)
82 lemma lreq_inv_next: ∀I1,I2,L1,L2,V1,V2,f.
83                      L1.ⓑ{I1}V1 ≡[⫯f] (L2.ⓑ{I2}V2) →
84                      ∧∧ L1 ≡[f] L2 & V1 = V2 & I1 = I2.
85 /2 width=1 by lexs_inv_next/ qed-.
86
87 (* Basic_2A1: includes: lreq_inv_succ *)
88 lemma lreq_inv_push: ∀I1,I2,L1,L2,V1,V2,f.
89                      L1.ⓑ{I1}V1 ≡[↑f] (L2.ⓑ{I2}V2) →
90                      L1 ≡[f] L2 ∧ I1 = I2.
91 #I1 #I2 #L1 #L2 #V1 #V2 #f #H elim (lexs_inv_push … H) -H /2 width=1 by conj/  
92 qed-.
93
94 (* Basic_2A1: removed theorems 5:
95               lreq_pair_lt lreq_succ_lt lreq_pair_O_Y lreq_O2 lreq_inv_O_Y
96 *)