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 (* Properties with evaluation push ******************************************)
37 lemma push_comp (M): ∀i. compatible_3 … (push M i) (sq M) (veq M) (veq M).
38 #m #i #d1 #d2 #Hd12 #lv1 #lv2 #HLv12 #j
39 elim (lt_or_eq_or_gt j i) #Hij destruct
40 [ >(push_lt … Hij) >(push_lt … Hij) //
41 | >(push_eq …) >(push_eq …) //
42 | >(push_gt … Hij) >(push_gt … Hij) //
46 (* Inversion lemmas with evaluation push *************************************)
48 axiom veq_inv_push_sn: ∀M,lv1,y2,d1,i. ⫯[i←d1]lv1 ≗{M} y2 →
49 ∃∃lv2,d2. lv1 ≗ lv2 & d1 ≗ d2 & ⫯[i←d2]lv2 = y2.
53 (* Properies with term interpretation ***************************************)
55 lemma ti_comp_l (M): is_model M →
56 ∀T,gv,lv1,lv2. lv1 ≗{M} lv2 →
57 ⟦T⟧[gv, lv1] ≗ ⟦T⟧[gv, lv2].
58 #M #HM #T elim T -T * [||| #p * | * ]
59 [ /4 width=3 by seq_trans, seq_sym, ms/
60 | /4 width=5 by seq_sym, ml, mr/
61 | /4 width=3 by seq_trans, seq_sym, mg/
62 | /5 width=5 by push_comp, seq_sym, md, mr/
63 | /5 width=1 by push_comp, mi, mq/
64 | /4 width=5 by seq_sym, ma, mc, mr/
65 | /4 width=5 by seq_sym, me, mr/