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/multiple/llor.ma".
16 include "basic_2/multiple/llpx_sn_frees.ma".
17 include "basic_2/multiple/lleq_alt.ma".
19 (* LAZY EQUIVALENCE FOR LOCAL ENVIRONMENTS **********************************)
21 (* Properties on pointwise union for local environments **********************)
23 lemma llpx_sn_llor_dx: ∀R. (c_r_confluent1 … R (llpx_sn R 0)) → (frees_trans R) →
24 ∀L1,L2,T,l. llpx_sn R l T L1 L2 → ∀L. L1 ⋓[T, l] L2 ≡ L → L2 ≡[T, l] L.
25 #R #H1R #H2R #L1 #L2 #T #l #H1 #L #H2
26 lapply (llpx_sn_frees_trans … H1R H2R … H1) -H1R -H2R #HR
27 elim (llpx_sn_llpx_sn_alt … H1) -H1 #HL12 #IH1
28 elim H2 -H2 #_ #HL1 #IH2
29 @lleq_intro_alt // #I2 #I #K2 #K #V2 #V #i #Hi #HnT #HLK2 #HLK
30 lapply (drop_fwd_length_lt2 … HLK) #HiL
31 elim (drop_O1_lt (Ⓕ) L1 i) // -HiL #I1 #K1 #V1 #HLK1
32 elim (IH1 … HLK1 HLK2) -IH1 /2 width=1 by/ #H #_ destruct
33 elim (IH2 … HLK1 HLK2 HLK) -IH2 -HLK1 -HLK2 -HLK * /2 width=1 by conj/ #H
34 [ elim (ylt_yle_false … H) -H //
35 | elim H -H /2 width=1 by/
39 lemma llpx_sn_llor_dx_sym: ∀R. (c_r_confluent1 … R (llpx_sn R 0)) → (frees_trans R) →
40 ∀L1,L2,T,l. llpx_sn R l T L1 L2 → ∀L. L1 ⋓[T, l] L2 ≡ L → L ≡[T, l] L2.
41 /3 width=6 by llpx_sn_llor_dx, lleq_sym/ qed.