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 (* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
17 include "static_2/relocation/lifts_tdeq.ma".
18 include "static_2/s_computation/fqus_fqup.ma".
19 include "basic_2/rt_transition/cpx_drops.ma".
20 include "basic_2/rt_transition/cpx_lsubr.ma".
22 (* Properties on supclosure *************************************************)
24 lemma fqu_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
25 ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
26 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
27 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
28 /3 width=3 by cpx_pair_sn, cpx_bind, cpx_flat, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, ex2_intro/
29 [ #I #G #L2 #V2 #X2 #HVX2
30 elim (lifts_total X2 (𝐔❴1❵))
31 /3 width=3 by fqu_drop, cpx_delta, ex2_intro/
32 | /5 width=4 by lsubr_cpx_trans, cpx_bind, lsubr_unit, fqu_clear, ex2_intro/
33 | #I #G #L2 #T2 #X2 #HTX2 #U2 #HTU2
34 elim (cpx_lifts_sn … HTU2 (Ⓣ) … (L2.ⓘ{I}) … HTX2)
35 /3 width=3 by fqu_drop, drops_refl, drops_drop, ex2_intro/
39 lemma fquq_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
40 ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
41 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
42 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H
43 [ #HT12 #U2 #HTU2 elim (fqu_cpx_trans … HT12 … HTU2) /3 width=3 by fqu_fquq, ex2_intro/
44 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
48 lemma fqup_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
49 ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
50 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, U2⦄.
51 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
52 [ #G2 #L2 #T2 #H12 #U2 #HTU2 elim (fqu_cpx_trans … H12 … HTU2) -T2
53 /3 width=3 by fqu_fqup, ex2_intro/
54 | #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #U2 #HTU2
55 elim (fqu_cpx_trans … HT2 … HTU2) -T2 #T2 #HT2 #HTU2
56 elim (IHT1 … HT2) -T /3 width=7 by fqup_strap1, ex2_intro/
60 lemma fqus_cpx_trans: ∀h,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
61 ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
62 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, U2⦄.
63 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_fqup … H) -H
64 [ #HT12 #U2 #HTU2 elim (fqup_cpx_trans … HT12 … HTU2) /3 width=3 by fqup_fqus, ex2_intro/
65 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
69 lemma fqu_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
70 ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
71 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
72 #h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
73 [ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❴1❵)
74 #U2 #HVU2 @(ex3_intro … U2)
75 [1,3: /3 width=7 by cpx_delta, fqu_drop/
76 | #H lapply (tdeq_inv_lref1 … H) -H
77 #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/
79 | #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②{I}V2.T))
80 [1,3: /2 width=4 by fqu_pair_sn, cpx_pair_sn/
81 | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
83 | #p #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2))
84 [1,3: /2 width=4 by fqu_bind_dx, cpx_bind/
85 | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
87 | #p #I #G #L #V #T1 #Hb #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2))
88 [1,3: /4 width=4 by lsubr_cpx_trans, cpx_bind, lsubr_unit, fqu_clear/
89 | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
91 | #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓕ{I}V.T2))
92 [1,3: /2 width=4 by fqu_flat_dx, cpx_flat/
93 | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
95 | #I #G #L #T1 #U1 #HTU1 #T2 #HT12 #H0
96 elim (cpx_lifts_sn … HT12 (Ⓣ) … (L.ⓘ{I}) … HTU1) -HT12
97 /4 width=6 by fqu_drop, drops_refl, drops_drop, tdeq_inv_lifts_bi, ex3_intro/
101 lemma fquq_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
102 ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
103 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
104 #h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12
105 [ #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tdneq … H12 … HTU2 H) -T2
106 /3 width=4 by fqu_fquq, ex3_intro/
107 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
111 lemma fqup_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+[b] ⦃G2, L2, T2⦄ →
112 ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
113 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+[b] ⦃G2, L2, U2⦄.
114 #h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
115 [ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tdneq … H12 … HTU2 H) -T2
116 /3 width=4 by fqu_fqup, ex3_intro/
117 | #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2
118 #U1 #HTU1 #H #H12 elim (fqu_cpx_trans_tdneq … H1 … HTU1 H) -T1
119 /3 width=8 by fqup_strap2, ex3_intro/
123 lemma fqus_cpx_trans_tdneq: ∀h,o,b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
124 ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≛[h, o] U2 → ⊥) →
125 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≛[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐*[b] ⦃G2, L2, U2⦄.
126 #h #o #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
127 [ #H12 elim (fqup_cpx_trans_tdneq … H12 … HTU2 H) -T2
128 /3 width=4 by fqup_fqus, ex3_intro/
129 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/