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 include "ground/relocation/rtmap_basic.ma".
16 include "static_2/relocation/lifts.ma".
17 include "apps_2/models/veq.ma".
19 (* EVALUATION EQUIVALENCE **************************************************)
21 (* Forward lemmas with generic relocation ***********************************)
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 ]
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/
38 | #f #l #m #Hf #gv #lv #d
39 @(mq … H1M) [4,5: /3 width=2 by seq_sym, mg/ |1,2: skip ]
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/ ]
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
50 [3: @ti_comp // | skip ]
51 [1,2: /2 width=2 by veq_refl/ ]
52 [2: @veq_sym // @vpush_swap // | skip ]
54 | @mx // [ /2 width=1 by/ ] -IHV #d0
56 [3: @ti_comp // | skip ]
57 [1,2: /2 width=2 by veq_refl/ ]
58 [2: @veq_sym // @vpush_swap // | skip ]
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/
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-.