]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/apps_2/models/veq_lifts.ma
update in static_2 and app_2
[helm.git] / matita / matita / contribs / lambdadelta / apps_2 / models / veq_lifts.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 include "ground_2/relocation/rtmap_basic.ma".
16 include "static_2/relocation/lifts.ma".
17 include "apps_2/models/veq.ma".
18
19 (* EVALUATION EQUIVALENCE  **************************************************)
20
21 (* Forward lemmas with generic relocation ***********************************)
22
23 fact lifts_fwd_vlift_aux (M): is_model M → is_extensional M →
24                               ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → ∀m. 𝐁❴m,1❵ = f →
25                               ∀gv,lv,d. ⟦T1⟧[gv, lv] ≗{M} ⟦T2⟧[gv, ⫯[m←d]lv].
26 #M #H1M #H2M #f #T1 #T2 #H elim H -f -T1 -T2
27 [ #f #s #m #Hf #gv #lv #d
28   @(mq … H1M) [4,5: /3 width=2 by seq_sym, ms/ |1,2: skip ]
29   /2 width=1 by mr/
30 | #f #i1 #i2 #Hi12 #m #Hm #gv #lv #d destruct
31   @(mq … H1M) [4,5: /3 width=2 by seq_sym, ml/ |1,2: skip ]
32   elim (lt_or_ge i1 m) #Hi1
33   [ lapply (at_basic_inv_lt … Hi12) -Hi12 // #H destruct
34     >vlift_lt /2 width=1 by mr/
35   | lapply (at_basic_inv_ge … Hi12) -Hi12 // #H destruct
36     >vlift_gt /2 width=1 by mr, le_S_S/
37   ]
38 | #f #l #m #Hf #gv #lv #d
39   @(mq … H1M) [4,5: /3 width=2 by seq_sym, mg/ |1,2: skip ]
40   /2 width=1 by mr/
41 | #f #p * #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #m #Hm #gv #lv #d destruct
42   [ @(mq … H1M) [4,5: /3 width=2 by seq_sym, md/ |1,2: skip ]
43     @(seq_trans … H1M)
44     [3: @ti_comp // | skip ]
45     [1,2: /2 width=2 by veq_refl/ ]
46     [2: @(vlift_comp … H1M) | skip ]
47     [1,2: /2 width=2 by/ |3,4: /2 width=2 by veq_refl/ ] -IHV
48     @(seq_trans … H1M)
49     [3: @ti_comp // | skip ]
50     [1,2: /2 width=2 by veq_refl/ ]
51     [2: @veq_sym // @vlift_swap // | skip ]
52     /2 width=1 by/
53   | @mx // [ /2 width=1 by/ ] -IHV #d0
54     @(seq_trans … H1M)
55     [3: @ti_comp // | skip ]
56     [1,2: /2 width=2 by veq_refl/ ]
57     [2: @veq_sym // @vlift_swap // | skip ]
58     /2 width=1 by/
59   ]
60 | #f * #V1 #v2 #T1 #T2 #_ #_ #IHV #IHT #m #Hm #gv #lv #d
61   [ /4 width=5 by seq_sym, ma, mp, mq/
62   | /4 width=5 by seq_sym, me, mq/
63   ]
64 ]
65 qed-.
66
67 lemma lifts_SO_fwd_vlift (M) (gv): is_model M → is_extensional M →
68                                    ∀T1,T2. ⬆*[1] T1 ≘ T2 →
69                                    ∀lv,d. ⟦T1⟧[gv, lv] ≗{M} ⟦T2⟧[gv, ⫯[0←d]lv].
70 /2 width=3 by lifts_fwd_vlift_aux/ qed-.