]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/apps_2/models/veq_lifts.ma
update in delayed-updating
[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/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_vpush_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     >vpush_lt /2 width=1 by mr/
35   | lapply (at_basic_inv_ge … Hi12) -Hi12 // #H destruct
36     >vpush_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     @mc [3:|*: /2 width=1 by/ ]
44     @(seq_trans … H1M)
45     [3: @ti_comp // | skip ]
46     [1,2: /2 width=2 by veq_refl/ ]
47     [2: @(vpush_comp … H1M) | skip ]
48     [1,2: /2 width=2 by/ |3,4: /2 width=2 by veq_refl/ ] -IHV
49     @(seq_trans … H1M)
50     [3: @ti_comp // | skip ]
51     [1,2: /2 width=2 by veq_refl/ ]
52     [2: @veq_sym // @vpush_swap // | skip ]
53     /2 width=1 by/
54   | @mx // [ /2 width=1 by/ ] -IHV #d0
55     @(seq_trans … H1M)
56     [3: @ti_comp // | skip ]
57     [1,2: /2 width=2 by veq_refl/ ]
58     [2: @veq_sym // @vpush_swap // | skip ]
59     /2 width=1 by/
60   ]
61 | #f * #V1 #v2 #T1 #T2 #_ #_ #IHV #IHT #m #Hm #gv #lv #d
62   [ /4 width=5 by seq_sym, ma, mp, mq/
63   | /4 width=5 by seq_sym, me, mq/
64   ]
65 ]
66 qed-.
67
68 lemma lifts_SO_fwd_vpush (M) (gv): is_model M → is_extensional M →
69                                    ∀T1,T2. ⇧[1] T1 ≘ T2 →
70                                    ∀lv,d. ⟦T1⟧[gv,lv] ≗{M} ⟦T2⟧[gv,⫯[0←d]lv].
71 /2 width=3 by lifts_fwd_vpush_aux/ qed-.