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