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/substitution/lsubr.ma".
17 (* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
19 (* Auxiliary inversion lemmas ***********************************************)
21 fact lsubr_inv_abbr1_aux: ∀L1,L2. L1 ⊑ L2 → ∀K1,W. L1 = K1.ⓓW →
23 | ∃∃K2. K1 ⊑ K2 & L2 = K2.ⓓW
24 | ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
26 [ #L #K1 #W #H destruct /2 width=1/
27 | #L1 #L2 #V #HL12 #K1 #W #H destruct /3 width=3/
28 | #I #L1 #L2 #V1 #V2 #HL12 #K1 #W #H destruct /3 width=4/
32 lemma lsubr_inv_abbr1: ∀K1,L2,W. K1.ⓓW ⊑ L2 →
34 | ∃∃K2. K1 ⊑ K2 & L2 = K2.ⓓW
35 | ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
36 /2 width=3 by lsubr_inv_abbr1_aux/ qed-.
38 fact lsubr_inv_abst1_aux: ∀L1,L2. L1 ⊑ L2 → ∀K1,W1. L1 = K1.ⓛW1 →
40 ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
42 [ #L #K1 #W1 #H destruct /2 width=1/
43 | #L1 #L2 #V #_ #K1 #W1 #H destruct
44 | #I #L1 #L2 #V1 #V2 #HL12 #K1 #W1 #H destruct /3 width=4/
48 lemma lsubr_inv_abst1: ∀K1,L2,W1. K1.ⓛW1 ⊑ L2 →
50 ∃∃K2,W2. K1 ⊑ K2 & L2 = K2.ⓛW2.
51 /2 width=4 by lsubr_inv_abst1_aux/ qed-.
53 (* Main properties **********************************************************)
55 theorem lsubr_trans: Transitive … lsubr.
56 #L1 #L #H elim H -L1 -L
58 lapply (lsubr_inv_atom1 … H) -H //
59 | #L1 #L #V #_ #IHL1 #X #H
60 elim (lsubr_inv_abbr1 … H) -H // *
61 #L2 [2: #V2 ] #HL2 #H destruct /3 width=1/
62 | #I #L1 #L #V1 #V #_ #IHL1 #X #H
63 elim (lsubr_inv_abst1 … H) -H // *
64 #L2 #V2 #HL2 #H destruct /3 width=1/