1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/notation/relations/lazyeqsn_3.ma".
16 include "basic_2/syntax/ext2.ma".
17 include "basic_2/relocation/lexs.ma".
19 (* RANGED EQUIVALENCE FOR LOCAL ENVIRONMENTS ********************************)
21 (* Basic_2A1: includes: lreq_atom lreq_zero lreq_pair lreq_succ *)
22 definition lreq: relation3 rtmap lenv lenv ≝ lexs ceq cfull.
25 "ranged equivalence (local environment)"
26 'LazyEqSn f L1 L2 = (lreq f L1 L2).
28 (* Basic properties *********************************************************)
30 lemma lreq_eq_repl_back: ∀L1,L2. eq_repl_back … (λf. L1 ≡[f] L2).
31 /2 width=3 by lexs_eq_repl_back/ qed-.
33 lemma lreq_eq_repl_fwd: ∀L1,L2. eq_repl_fwd … (λf. L1 ≡[f] L2).
34 /2 width=3 by lexs_eq_repl_fwd/ qed-.
36 lemma sle_lreq_trans: ∀f2,L1,L2. L1 ≡[f2] L2 →
37 ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2.
38 /2 width=3 by sle_lexs_trans/ qed-.
40 (* Basic_2A1: includes: lreq_refl *)
41 lemma lreq_refl: ∀f. reflexive … (lreq f).
42 /3 width=1 by lexs_refl, ext2_refl/ qed.
44 (* Basic_2A1: includes: lreq_sym *)
45 lemma lreq_sym: ∀f. symmetric … (lreq f).
46 /3 width=1 by lexs_sym, ext2_sym/ qed-.
48 (* Basic inversion lemmas ***************************************************)
50 (* Basic_2A1: includes: lreq_inv_atom1 *)
51 lemma lreq_inv_atom1: ∀f,Y. ⋆ ≡[f] Y → Y = ⋆.
52 /2 width=4 by lexs_inv_atom1/ qed-.
54 (* Basic_2A1: includes: lreq_inv_pair1 *)
55 lemma lreq_inv_next1: ∀g,J,K1,Y. K1.ⓘ{J} ≡[⫯g] Y →
56 ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ{J}.
57 #g #J #K1 #Y #H elim (lexs_inv_next1 … H) -H /2 width=3 by ex2_intro/
60 (* Basic_2A1: includes: lreq_inv_zero1 lreq_inv_succ1 *)
61 lemma lreq_inv_push1: ∀g,J1,K1,Y. K1.ⓘ{J1} ≡[↑g] Y →
62 ∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ{J2}.
63 #g #J1 #K1 #Y #H elim (lexs_inv_push1 … H) -H /2 width=4 by ex2_2_intro/
66 (* Basic_2A1: includes: lreq_inv_atom2 *)
67 lemma lreq_inv_atom2: ∀f,X. X ≡[f] ⋆ → X = ⋆.
68 /2 width=4 by lexs_inv_atom2/ qed-.
70 (* Basic_2A1: includes: lreq_inv_pair2 *)
71 lemma lreq_inv_next2: ∀g,J,X,K2. X ≡[⫯g] K2.ⓘ{J} →
72 ∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ{J}.
73 #g #J #X #K2 #H elim (lexs_inv_next2 … H) -H /2 width=3 by ex2_intro/
76 (* Basic_2A1: includes: lreq_inv_zero2 lreq_inv_succ2 *)
77 lemma lreq_inv_push2: ∀g,J2,X,K2. X ≡[↑g] K2.ⓘ{J2} →
78 ∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ{J1}.
79 #g #J2 #X #K2 #H elim (lexs_inv_push2 … H) -H /2 width=4 by ex2_2_intro/
82 (* Basic_2A1: includes: lreq_inv_pair *)
83 lemma lreq_inv_next: ∀f,I1,I2,L1,L2. L1.ⓘ{I1} ≡[⫯f] L2.ⓘ{I2} →
85 /2 width=1 by lexs_inv_next/ qed-.
87 (* Basic_2A1: includes: lreq_inv_succ *)
88 lemma lreq_inv_push: ∀f,I1,I2,L1,L2. L1.ⓘ{I1} ≡[↑f] L2.ⓘ{I2} → L1 ≡[f] L2.
89 #f #I1 #I2 #L1 #L2 #H elim (lexs_inv_push … H) -H /2 width=1 by conj/
92 lemma lreq_inv_tl: ∀f,I,L1,L2. L1 ≡[⫱f] L2 → L1.ⓘ{I} ≡[f] L2.ⓘ{I}.
93 /2 width=1 by lexs_inv_tl/ qed-.
95 (* Basic_2A1: removed theorems 5:
96 lreq_pair_lt lreq_succ_lt lreq_pair_O_Y lreq_O2 lreq_inv_O_Y