]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/static/reqx_reqx.ma
update in staic_2 and basic_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / static / reqx_reqx.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/syntax/ext2_ext2.ma".
16 include "static_2/syntax/teqx_teqx.ma".
17 include "static_2/static/reqx_length.ma".
18
19 (* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
20
21 (* Advanced properties ******************************************************)
22
23 lemma reqx_sym: ∀T. symmetric … (reqx T).
24 /3 width=3 by reqx_fsge_comp, rex_sym, teqx_sym/ qed-.
25
26 (* Basic_2A1: uses: lleq_dec *)
27 lemma reqx_dec: ∀L1,L2. ∀T:term. Decidable (L1 ≛[T] L2).
28 /3 width=1 by rex_dec, teqx_dec/ qed-.
29
30 (* Main properties **********************************************************)
31
32 (* Basic_2A1: uses: lleq_bind lleq_bind_O *)
33 theorem reqx_bind: ∀p,I,L1,L2,V1,V2,T.
34                    L1 ≛[V1] L2 → L1.ⓑ[I]V1 ≛[T] L2.ⓑ[I]V2 →
35                    L1 ≛[ⓑ[p,I]V1.T] L2.
36 /2 width=2 by rex_bind/ qed.
37
38 (* Basic_2A1: uses: lleq_flat *)
39 theorem reqx_flat: ∀I,L1,L2,V,T.
40                    L1 ≛[V] L2 → L1 ≛[T] L2 → L1 ≛[ⓕ[I]V.T] L2.
41 /2 width=1 by rex_flat/ qed.
42
43 theorem reqx_bind_void: ∀p,I,L1,L2,V,T.
44                         L1 ≛[V] L2 → L1.ⓧ ≛[T] L2.ⓧ → L1 ≛[ⓑ[p,I]V.T] L2.
45 /2 width=1 by rex_bind_void/ qed.
46
47 (* Basic_2A1: uses: lleq_trans *)
48 theorem reqx_trans: ∀T. Transitive … (reqx T).
49 #T #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2
50 lapply (frees_teqx_conf_reqx … Hf1 T … HL1) // #H0
51 lapply (frees_mono … Hf2 … H0) -Hf2 -H0
52 /5 width=7 by sex_trans, sex_eq_repl_back, teqx_trans, ext2_trans, ex2_intro/
53 qed-.
54
55 (* Basic_2A1: uses: lleq_canc_sn *)
56 theorem reqx_canc_sn: ∀T. left_cancellable … (reqx T).
57 /3 width=3 by reqx_trans, reqx_sym/ qed-.
58
59 (* Basic_2A1: uses: lleq_canc_dx *)
60 theorem reqx_canc_dx: ∀T. right_cancellable … (reqx T).
61 /3 width=3 by reqx_trans, reqx_sym/ qed-.
62
63 theorem reqx_repl: ∀L1,L2. ∀T:term. L1 ≛[T] L2 →
64                    ∀K1. L1 ≛[T] K1 → ∀K2. L2 ≛[T] K2 → K1 ≛[T] K2.
65 /3 width=3 by reqx_canc_sn, reqx_trans/ qed-.
66
67 (* Negated properties *******************************************************)
68
69 (* Note: auto works with /4 width=8/ so reqx_canc_sn is preferred **********)
70 (* Basic_2A1: uses: lleq_nlleq_trans *)
71 lemma reqx_rneqx_trans: ∀T:term.∀L1,L. L1 ≛[T] L →
72                         ∀L2. (L ≛[T] L2 → ⊥) → (L1 ≛[T] L2 → ⊥).
73 /3 width=3 by reqx_canc_sn/ qed-.
74
75 (* Basic_2A1: uses: nlleq_lleq_div *)
76 lemma rneqx_reqx_div: ∀T:term.∀L2,L. L2 ≛[T] L →
77                       ∀L1. (L1 ≛[T] L → ⊥) → (L1 ≛[T] L2 → ⊥).
78 /3 width=3 by reqx_trans/ qed-.
79
80 theorem rneqx_reqx_canc_dx: ∀L1,L. ∀T:term. (L1 ≛[T] L → ⊥) →
81                             ∀L2. L2 ≛[T] L → L1 ≛[T] L2 → ⊥.
82 /3 width=3 by reqx_trans/ qed-.
83
84 (* Negated inversion lemmas *************************************************)
85
86 (* Basic_2A1: uses: nlleq_inv_bind nlleq_inv_bind_O *)
87 lemma rneqx_inv_bind: ∀p,I,L1,L2,V,T. (L1 ≛[ⓑ[p,I]V.T] L2 → ⊥) →
88                       (L1 ≛[V] L2 → ⊥) ∨ (L1.ⓑ[I]V ≛[T] L2.ⓑ[I]V → ⊥).
89 /3 width=2 by rnex_inv_bind, teqx_dec/ qed-.
90
91 (* Basic_2A1: uses: nlleq_inv_flat *)
92 lemma rneqx_inv_flat: ∀I,L1,L2,V,T. (L1 ≛[ⓕ[I]V.T] L2 → ⊥) →
93                       (L1 ≛[V] L2 → ⊥) ∨ (L1 ≛[T] L2 → ⊥).
94 /3 width=2 by rnex_inv_flat, teqx_dec/ qed-.
95
96 lemma rneqx_inv_bind_void: ∀p,I,L1,L2,V,T. (L1 ≛[ⓑ[p,I]V.T] L2 → ⊥) →
97                            (L1 ≛[V] L2 → ⊥) ∨ (L1.ⓧ ≛[T] L2.ⓧ → ⊥).
98 /3 width=3 by rnex_inv_bind_void, teqx_dec/ qed-.