]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/apps_2/models/veq_lifts.ma
syntactic components detached from basic_2 become static_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) (gv): is_model M → is_extensional M →
24                                    ∀f,T1,T2. ⬆*[f] T1 ≘ T2 → ∀m. 𝐁❴m,1❵ = f →
25                                    ∀lv,d. ⟦T1⟧[gv, lv] ≗{M} ⟦T2⟧[gv, ⫯[m←d]lv].
26 #M #gv #H1M #H2M #f #T1 #T2 #H elim H -f -T1 -T2
27 [ /4 width=3 by seq_trans, seq_sym, ms/
28 | #f #i1 #i2 #Hi12 #m #Hm #lv #d destruct
29   @(mr … H1M) [4,5: @(seq_sym … H1M) @(ml … H1M) |1,2: skip ]
30   elim (lt_or_ge i1 m) #Hi1
31   [ lapply (at_basic_inv_lt … Hi12) -Hi12 // #H destruct
32     >vlift_lt /2 width=1 by mq/
33   | lapply (at_basic_inv_ge … Hi12) -Hi12 // #H destruct
34     >vlift_gt /2 width=1 by mq, le_S_S/
35   ]
36 | /4 width=3 by seq_trans, seq_sym, mg/
37 | #f #p * #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #m #Hm #lv #d destruct
38   [ @(mr … H1M) [4,5: @(seq_sym … H1M) @(md … H1M) |1,2: skip ]
39     @(seq_trans … H1M)
40     [2: @(ti_comp_l … H1M) | skip ]
41     [2: @(vlift_comp … lv lv) | skip ]
42     [3: /2 width=1 by veq_refl/ ]
43     [2: @(IHV … d) // | skip ]
44     @(seq_trans … H1M) [2: @(IHT (↑m) … d) // | skip ]
45     /4 width=1 by seq_sym, ti_ext_l, vlift_swap/
46   | @mx /2 width=1 by/ #d0 @(seq_trans … H1M)
47     [3: @(seq_sym … H1M) @(ti_ext_l … H1M) | skip ]
48     [2: @vlift_swap // | skip ]
49     /2 width=1 by/
50   ]
51 | #f * #V1 #v2 #T1 #T2 #_ #_ #IHV #IHT #m #Hm #lv #d
52   [ /4 width=5 by seq_sym, ma, mc, mr/
53   | /4 width=5 by seq_sym, me, mr/
54   ]
55 ]
56 qed-.
57
58 lemma lifts_SO_fwd_vlift (M) (gv): is_model M → is_extensional M →
59                                    ∀T1,T2. ⬆*[1] T1 ≘ T2 →
60                                    ∀lv,d. ⟦T1⟧[gv, lv] ≗{M} ⟦T2⟧[gv, ⫯[d]lv].
61 /2 width=3 by lifts_fwd_vlift_aux/ qed-.