]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/apps_2/models/vdrop.ma
f0d72d4e298cf2844d478033c55fc5a041c53a0e
[helm.git] / matita / matita / contribs / lambdadelta / apps_2 / models / vdrop.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_2/lib/functions.ma".
16 include "ground_2/lib/exteq.ma".
17 include "ground_2/notation/functions/downspoon_2.ma".
18 include "apps_2/notation/models/downspoon_3.ma".
19 include "apps_2/models/model.ma".
20
21 (* EVALUATION DROP **********************************************************)
22
23 definition vdrop (M): nat → evaluation M → evaluation M ≝
24                       λj,lv,i. tri … i j (lv i) (lv (↑i)) (lv (↑i)).
25
26 interpretation "generic drop (model evaluation)"
27    'DownSpoon M i lv = (vdrop M i lv).
28
29 interpretation "drop (model evaluation)"
30    'DownSpoon M lv = (vdrop M O lv).
31
32 (* Basic properties *********************************************************)
33
34 lemma vdrop_lt (M): ∀lv,j,i. i < j → (⫰{M}[j] lv) i = lv i.
35 /2 width=1 by tri_lt/ qed-.
36
37 lemma vdrop_ge (M): ∀lv,j,i. j ≤ i → (⫰{M}[j] lv) i = lv (↑i).
38 #M #lv #j #i #Hji elim (le_to_or_lt_eq … Hji) -Hji #Hji destruct
39 [ /2 width=1 by tri_gt/
40 | /2 width=1 by tri_eq/
41 ]
42 qed-.
43
44 lemma vdrop_ext (M): ∀i. compatible_2 … (vdrop M i) (exteq …) (exteq …).
45 #M #i #lv1 #lv2 #Hlv12 #j elim (lt_or_ge j i) #Hji
46 [ >vdrop_lt // >vdrop_lt //
47 | >vdrop_ge // >vdrop_ge //
48 ]
49 qed.