]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/apps_2/models/veq.ma
11f07c404293f8df145f2828635c0885659af203
[helm.git] / matita / matita / contribs / lambdadelta / apps_2 / models / veq.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 "apps_2/models/model_props.ma".
16
17 (* EVALUATION EQUIVALENCE  **************************************************)
18
19 definition veq (M): relation (evaluation M) ≝
20                     λv1,v2. ∀d. v1 d ≗ v2 d.
21
22 interpretation "evaluation equivalence (model)"
23    'RingEq M v1 v2 = (veq M v1 v2).
24
25 (* Basic properties *********************************************************)
26
27 lemma veq_refl (M): is_model M →
28                     reflexive … (veq M).
29 /2 width=1 by mq/ qed.
30
31 lemma veq_repl (M): is_model M →
32                     replace_2 … (veq M) (veq M) (veq M).
33 /2 width=5 by mr/ qed-.
34
35 (* Properties with evaluation push ******************************************)
36
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) //
43 ]
44 qed.
45
46 (* Inversion lemmas with evaluation push *************************************)
47
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.   
50 (*
51 #M #lv1 #y2 #d1 #i #H 
52 *)
53 (* Properies with term interpretation ***************************************) 
54
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/
66 ]
67 qed.