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/s_computation/fqus_fqup.ma".
16 include "basic_2/static/lfdeq_drops.ma".
17 include "basic_2/static/lfdeq_fqup.ma".
18 include "basic_2/static/lfdeq_lfdeq.ma".
20 (* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
22 (* Properties with supclosure ***********************************************)
24 lemma fqu_tdeq_conf: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, T1⦄ →
26 ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐[b] ⦃G2, L, T2⦄ & L2 ≡[h, o, T1] L & T1 ≡[h, o] T2.
27 #h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1
28 [ #I #G #L #W #X #H >(tdeq_inv_lref1 … H) -X
29 /2 width=5 by fqu_lref_O, ex3_2_intro/
30 | #I #G #L #W1 #U1 #X #H
31 elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #_ #H destruct
32 /2 width=5 by fqu_pair_sn, ex3_2_intro/
33 | #p #I #G #L #W1 #U1 #X #H
34 elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
35 /3 width=5 by lfdeq_pair, fqu_bind_dx, ex3_2_intro/
36 | #p #I #G #L #W1 #U1 #Hb #X #H
37 elim (tdeq_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
38 /3 width=5 by fqu_clear, ex3_2_intro/
39 | #I #G #L #W1 #U1 #X #H
40 elim (tdeq_inv_pair1 … H) -H #W2 #U2 #_ #HU12 #H destruct
41 /2 width=5 by fqu_flat_dx, ex3_2_intro/
42 | #I #G #L #T1 #U1 #HTU1 #U2 #HU12
43 elim (tdeq_inv_lifts_sn … HU12 … HTU1) -U1
44 /3 width=5 by fqu_drop, ex3_2_intro/
48 lemma tdeq_fqu_trans: ∀h,o,b,G1,G2,L1,L2,U1,T1. ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, T1⦄ →
50 ∃∃L,T2. ⦃G1, L1, U2⦄ ⊐[b] ⦃G2, L, T2⦄ & T2 ≡[h, o] T1 & L ≡[h, o, T1] L2.
51 #h #o #b #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21
52 elim (fqu_tdeq_conf … o … H12 U2) -H12
53 /3 width=5 by lfdeq_sym, tdeq_sym, ex3_2_intro/
56 (* Basic_2A1: was just: lleq_fqu_trans *)
57 lemma lfdeq_fqu_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐[b] ⦃G2, K2, U⦄ →
58 ∀L1. L1 ≡[h, o, T] L2 →
59 ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐[b] ⦃G2, K1, U0⦄ & U0 ≡[h, o] U & K1 ≡[h, o, U] K2.
60 #h #o #b #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U
61 [ #I #G #L2 #V2 #L1 #H elim (lfdeq_inv_zero_pair_dx … H) -H
62 #K1 #V1 #HV1 #HV12 #H destruct
63 /3 width=7 by tdeq_lfdeq_conf_sn, fqu_lref_O, ex3_2_intro/
64 | * [ #p ] #I #G #L2 #V #T #L1 #H
65 [ elim (lfdeq_inv_bind … H)
66 | elim (lfdeq_inv_flat … H)
68 /2 width=5 by fqu_pair_sn, ex3_2_intro/
69 | #p #I #G #L2 #V #T #L1 #H elim (lfdeq_inv_bind … H) -H
70 /2 width=5 by fqu_bind_dx, ex3_2_intro/
71 | #p #I #G #L2 #V #T #Hb #L1 #H elim (lfdeq_inv_bind_void … H) -H
72 /3 width=5 by fqu_clear, ex3_2_intro/
73 | #I #G #L2 #V #T #L1 #H elim (lfdeq_inv_flat … H) -H
74 /2 width=5 by fqu_flat_dx, ex3_2_intro/
75 | #I #G #L2 #T #U #HTU #Y #HU
76 elim (lfdeq_fwd_dx … HU) #L1 #V1 #H destruct
77 /5 width=12 by lfdeq_inv_lifts_bi, fqu_drop, drops_refl, drops_drop, ex3_2_intro/
81 (* Basic_2A1: was just: lleq_fquq_trans *)
82 lemma lfdeq_fquq_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐⸮[b] ⦃G2, K2, U⦄ →
83 ∀L1. L1 ≡[h, o, T] L2 →
84 ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐⸮[b] ⦃G2, K1, U0⦄ & U0 ≡[h, o] U & K1 ≡[h, o, U] K2.
85 #h #o #b #G1 #G2 #L2 #K2 #T #U #H elim H -H
86 [ #H #L1 #HL12 elim (lfdeq_fqu_trans … H … HL12) -L2 /3 width=5 by fqu_fquq, ex3_2_intro/
87 | * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
91 (* Basic_2A1: was just: lleq_fqup_trans *)
92 lemma lfdeq_fqup_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐+[b] ⦃G2, K2, U⦄ →
93 ∀L1. L1 ≡[h, o, T] L2 →
94 ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐+[b] ⦃G2, K1, U0⦄ & U0 ≡[h, o] U & K1 ≡[h, o, U] K2.
95 #h #o #b #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U
96 [ #G2 #K2 #U #HTU #L1 #HL12 elim (lfdeq_fqu_trans … HTU … HL12) -L2
97 /3 width=5 by fqu_fqup, ex3_2_intro/
98 | #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12
99 elim (IHTU … HL12) -L2 #K0 #U0 #HTU #HU0 #HK0
100 elim (lfdeq_fqu_trans … HU2 … HK0) -K #K1 #U1 #HU1 #HU12 #HK12
101 elim (tdeq_fqu_trans … HU1 … HU0) -U #K3 #U3 #HU03 #HU31 #HK31
102 @(ex3_2_intro … K3 U3) (**) (* full auto too slow *)
103 /3 width=5 by lfdeq_trans, tdeq_lfdeq_conf_sn, fqup_strap1, tdeq_trans/
107 (* Basic_2A1: was just: lleq_fqus_trans *)
108 lemma lfdeq_fqus_trans: ∀h,o,b,G1,G2,L2,K2,T,U. ⦃G1, L2, T⦄ ⊐*[b] ⦃G2, K2, U⦄ →
109 ∀L1. L1 ≡[h, o, T] L2 →
110 ∃∃K1,U0. ⦃G1, L1, T⦄ ⊐*[b] ⦃G2, K1, U0⦄ & U0 ≡[h, o] U & K1 ≡[h, o, U] K2.
111 #h #o #b #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H
112 [ #H elim (lfdeq_fqup_trans … H … HL12) -L2 /3 width=5 by fqup_fqus, ex3_2_intro/
113 | * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/