]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/relocation/seq.ma
update in ground_2, static_2, basic_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / relocation / seq.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 "static_2/notation/relations/ideqsn_3.ma".
16 include "static_2/syntax/ceq_ext.ma".
17 include "static_2/relocation/sex.ma".
18
19 (* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************)
20
21 (* Basic_2A1: includes: lreq_atom lreq_zero lreq_pair lreq_succ *)
22 definition seq: relation3 rtmap lenv lenv ≝ sex ceq_ext cfull.
23
24 interpretation
25   "syntactic equivalence on selected entries (local environment)"
26   'IdEqSn f L1 L2 = (seq f L1 L2).
27
28 (* Basic properties *********************************************************)
29
30 lemma seq_eq_repl_back: ∀L1,L2. eq_repl_back … (λf. L1 ≡[f] L2).
31 /2 width=3 by sex_eq_repl_back/ qed-.
32
33 lemma seq_eq_repl_fwd: ∀L1,L2. eq_repl_fwd … (λf. L1 ≡[f] L2).
34 /2 width=3 by sex_eq_repl_fwd/ qed-.
35
36 lemma sle_seq_trans: ∀f2,L1,L2. L1 ≡[f2] L2 →
37                      ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2.
38 /2 width=3 by sle_sex_trans/ qed-.
39
40 (* Basic_2A1: includes: lreq_refl *)
41 lemma seq_refl: ∀f. reflexive … (seq f).
42 /2 width=1 by sex_refl/ qed.
43
44 (* Basic_2A1: includes: lreq_sym *)
45 lemma seq_sym: ∀f. symmetric … (seq f).
46 /3 width=2 by sex_sym, cext2_sym/ qed-.
47
48 (* Basic inversion lemmas ***************************************************)
49
50 (* Basic_2A1: includes: lreq_inv_atom1 *)
51 lemma seq_inv_atom1: ∀f,Y. ⋆ ≡[f] Y → Y = ⋆.
52 /2 width=4 by sex_inv_atom1/ qed-.
53
54 (* Basic_2A1: includes: lreq_inv_pair1 *)
55 lemma seq_inv_next1: ∀g,J,K1,Y. K1.ⓘ{J} ≡[↑g] Y →
56                      ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ{J}.
57 #g #J #K1 #Y #H
58 elim (sex_inv_next1 … H) -H #Z #K2 #HK12 #H1 #H2 destruct
59 <(ceq_ext_inv_eq … H1) -Z /2 width=3 by ex2_intro/
60 qed-.
61
62 (* Basic_2A1: includes: lreq_inv_zero1 lreq_inv_succ1 *)
63 lemma seq_inv_push1: ∀g,J1,K1,Y. K1.ⓘ{J1} ≡[⫯g] Y →
64                      ∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ{J2}.
65 #g #J1 #K1 #Y #H elim (sex_inv_push1 … H) -H /2 width=4 by ex2_2_intro/
66 qed-.
67
68 (* Basic_2A1: includes: lreq_inv_atom2 *)
69 lemma seq_inv_atom2: ∀f,X. X ≡[f] ⋆ → X = ⋆.
70 /2 width=4 by sex_inv_atom2/ qed-.
71
72 (* Basic_2A1: includes: lreq_inv_pair2 *)
73 lemma seq_inv_next2: ∀g,J,X,K2. X ≡[↑g] K2.ⓘ{J} →
74                      ∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ{J}.
75 #g #J #X #K2 #H
76 elim (sex_inv_next2 … H) -H #Z #K1 #HK12 #H1 #H2 destruct
77 <(ceq_ext_inv_eq … H1) -J /2 width=3 by ex2_intro/
78 qed-.
79
80 (* Basic_2A1: includes: lreq_inv_zero2 lreq_inv_succ2 *)
81 lemma seq_inv_push2: ∀g,J2,X,K2. X ≡[⫯g] K2.ⓘ{J2} →
82                      ∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ{J1}.
83 #g #J2 #X #K2 #H elim (sex_inv_push2 … H) -H /2 width=4 by ex2_2_intro/
84 qed-.
85
86 (* Basic_2A1: includes: lreq_inv_pair *)
87 lemma seq_inv_next: ∀f,I1,I2,L1,L2. L1.ⓘ{I1} ≡[↑f] L2.ⓘ{I2} →
88                     ∧∧ L1 ≡[f] L2 & I1 = I2.
89 #f #I1 #I2 #L1 #L2 #H elim (sex_inv_next … H) -H
90 /3 width=3 by ceq_ext_inv_eq, conj/
91 qed-.
92
93 (* Basic_2A1: includes: lreq_inv_succ *)
94 lemma seq_inv_push: ∀f,I1,I2,L1,L2. L1.ⓘ{I1} ≡[⫯f] L2.ⓘ{I2} → L1 ≡[f] L2.
95 #f #I1 #I2 #L1 #L2 #H elim (sex_inv_push … H) -H /2 width=1 by conj/
96 qed-.
97
98 lemma seq_inv_tl: ∀f,I,L1,L2. L1 ≡[⫱f] L2 → L1.ⓘ{I} ≡[f] L2.ⓘ{I}.
99 /2 width=1 by sex_inv_tl/ qed-.
100
101 (* Basic_2A1: removed theorems 5:
102               lreq_pair_lt lreq_succ_lt lreq_pair_O_Y lreq_O2 lreq_inv_O_Y
103 *)