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 "apps_2/models/model_props.ma".
17 (* EVALUATION EQUIVALENCE **************************************************)
19 definition veq (M): relation (evaluation M) ≝
20 λv1,v2. ∀d. v1 d ≗ v2 d.
22 interpretation "evaluation equivalence (model)"
23 'RingEq M v1 v2 = (veq M v1 v2).
25 (* Basic properties *********************************************************)
27 lemma veq_refl (M): is_model M →
29 /2 width=1 by mq/ qed.
31 lemma veq_repl (M): is_model M →
32 replace_2 … (veq M) (veq M) (veq M).
33 /2 width=5 by mr/ qed-.
35 lemma ext_veq (M): is_model M →
36 ∀lv1,lv2. lv1 ≐ lv2 → lv1 ≗{M} lv2.
37 /2 width=1 by mq/ qed.
39 lemma exteq_veq_trans (M): ∀lv1,lv. lv1 ≐ lv →
40 ∀lv2. lv ≗{M} lv2 → lv1 ≗ lv2.
43 (* Properties with evaluation evaluation lift *******************************)
45 lemma vlift_comp (M): ∀i. compatible_3 … (vlift M i) (sq M) (veq M) (veq M).
46 #m #i #d1 #d2 #Hd12 #lv1 #lv2 #HLv12 #j
47 elim (lt_or_eq_or_gt j i) #Hij destruct
48 [ >(vlift_lt … Hij) >(vlift_lt … Hij) //
49 | >(vlift_eq …) >(vlift_eq …) //
50 | >(vlift_gt … Hij) >(vlift_gt … Hij) //
54 (* Properies with term interpretation ***************************************)
56 lemma ti_comp_l (M): is_model M →
57 ∀T,gv,lv1,lv2. lv1 ≗{M} lv2 →
58 ⟦T⟧[gv, lv1] ≗ ⟦T⟧[gv, lv2].
59 #M #HM #T elim T -T * [||| #p * | * ]
60 [ /4 width=3 by seq_trans, seq_sym, ms/
61 | /4 width=5 by seq_sym, ml, mr/
62 | /4 width=3 by seq_trans, seq_sym, mg/
63 | /5 width=5 by vlift_comp, seq_sym, md, mr/
64 | /5 width=1 by vlift_comp, mi, mq/
65 | /4 width=5 by seq_sym, ma, mc, mr/
66 | /4 width=5 by seq_sym, me, mr/