]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma
- improved fqu allows to prove fqu_cpx_trans and its derivatives
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / cpx_fqus.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *************)
16
17 include "basic_2/s_computation/fqus_fqup.ma".
18 include "basic_2/rt_transition/cpx_drops.ma".
19
20 (* Properties on supclosure *************************************************)
21
22 lemma fqu_cpx_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
23                      ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
24                      ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄.
25 #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
26 /3 width=3 by fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, cpx_pair_sn, cpx_bind, cpx_flat, ex2_intro/
27 [ #I #G #L2 #V2 #X2 #HVX2
28   elim (lifts_total X2 (𝐔❴1❵))
29   /3 width=3 by fqu_drop, cpx_delta, ex2_intro/
30 | #I #G #L2 #V #T2 #X2 #HTX2 #U2 #HTU2
31   elim (cpx_lifts … HTU2 (Ⓣ) … (L2.ⓑ{I}V) … HTX2)
32   /3 width=3 by fqu_drop, drops_refl, drops_drop, ex2_intro/
33 ]
34 qed-.
35
36 lemma fquq_cpx_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
37                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
38                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄.
39 #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H
40 [ #HT12 #U2 #HTU2 elim (fqu_cpx_trans … HT12 … HTU2) /3 width=3 by fqu_fquq, ex2_intro/
41 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
42 ]
43 qed-.
44
45 lemma fqup_cpx_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
46                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
47                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄.
48 #h #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
49 [ #G2 #L2 #T2 #H12 #U2 #HTU2 elim (fqu_cpx_trans … H12 … HTU2) -T2
50   /3 width=3 by fqu_fqup, ex2_intro/
51 | #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #U2 #HTU2
52   elim (fqu_cpx_trans … HT2 … HTU2) -T2 #T2 #HT2 #HTU2
53   elim (IHT1 … HT2) -T /3 width=7 by fqup_strap1, ex2_intro/
54 ]
55 qed-.
56
57 lemma fqus_cpx_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
58                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
59                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄.
60 #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_fqup … H) -H
61 [ #HT12 #U2 #HTU2 elim (fqup_cpx_trans … HT12 … HTU2) /3 width=3 by fqup_fqus, ex2_intro/
62 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
63 ]
64 qed-.
65 (*
66 lemma fqu_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
67                          ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h, o] U2 → (T2 = U2 → ⊥) →
68                          ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄.
69 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
70 [ #I #G #L #V1 #V2 #HV12 #_ elim (lift_total V2 0 1)
71   #U2 #HVU2 @(ex3_intro … U2)
72   [1,3: /3 width=7 by fqu_drop, cpx_delta, drop_pair, drop_drop/
73   | #H destruct
74     lapply (lift_inv_lref2_be … HVU2 ? ?) -HVU2 //
75   ]
76 | #I #G #L #V1 #T #V2 #HV12 #H @(ex3_intro … (②{I}V2.T))
77   [1,3: /2 width=4 by fqu_pair_sn, cpx_pair_sn/
78   | #H0 destruct /2 width=1 by/
79   ]
80 | #a #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓑ{a,I}V.T2))
81   [1,3: /2 width=4 by fqu_bind_dx, cpx_bind/
82   | #H0 destruct /2 width=1 by/
83   ]
84 | #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓕ{I}V.T2))
85   [1,3: /2 width=4 by fqu_flat_dx, cpx_flat/
86   | #H0 destruct /2 width=1 by/
87   ]
88 | #G #L #K #T1 #U1 #k #HLK #HTU1 #T2 #HT12 #H elim (lift_total T2 0 (k+1))
89   #U2 #HTU2 @(ex3_intro … U2)
90   [1,3: /2 width=10 by cpx_lift, fqu_drop/
91   | #H0 destruct /3 width=5 by lift_inj/
92 ]
93 qed-.
94
95 lemma fquq_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
96                           ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h, o] U2 → (T2 = U2 → ⊥) →
97                           ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄.
98 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fquq_inv_gen … H12) -H12
99 [ #H12 elim (fqu_cpx_trans_neq … H12 … HTU2 H) -T2
100   /3 width=4 by fqu_fquq, ex3_intro/
101 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
102 ]
103 qed-.
104
105 lemma fqup_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
106                           ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h, o] U2 → (T2 = U2 → ⊥) →
107                           ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄.
108 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
109 [ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_neq … H12 … HTU2 H) -T2
110   /3 width=4 by fqu_fqup, ex3_intro/
111 | #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2
112   #U1 #HTU1 #H #H12 elim (fqu_cpx_trans_neq … H1 … HTU1 H) -T1
113   /3 width=8 by fqup_strap2, ex3_intro/
114 ]
115 qed-.
116
117 lemma fqus_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
118                           ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h, o] U2 → (T2 = U2 → ⊥) →
119                           ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄.
120 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_gen … H12) -H12
121 [ #H12 elim (fqup_cpx_trans_neq … H12 … HTU2 H) -T2
122   /3 width=4 by fqup_fqus, ex3_intro/
123 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
124 ]
125 qed-.
126 *)