-
Notifications
You must be signed in to change notification settings - Fork 2
/
OldExamples.v
56 lines (40 loc) · 983 Bytes
/
OldExamples.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
(*
Module Example.
Definition x := Id 1.
Definition y := Id 2.
Definition z := Id 3.
Definition m1 :=
update_st (update_st (update_st empty_state x 0) y 1) z 2.
Definition m2 :=
update_st (update_st (update_st empty_state x 0) y 6) z 9.
Definition Γ :=
update_env (update_env (update_env empty_env x Low) y High) z High.
Lemma only_x_is_low_in_gamma:
forall var, Γ var = Some Low -> var = x.
Proof.
intros.
unfold Γ in H.
unfold update_env in H.
repeat (destruct eq_id_dec; [ crush | ]).
assert (@empty_env level var = None) by crush.
rewrite H0 in H.
crush.
Qed.
Example ex4:
state_low_eq Γ m1 m2.
unfold state_low_eq.
unfold var_low_eq.
intros.
induction ℓ.
apply only_x_is_low_in_gamma in H.
rewrite H in H0,H1.
assert (m1 x = Some 0) by crush.
assert (m2 x = Some 0) by crush.
assert (u = 0) by crush.
assert (v = 0) by crush.
rewrite H4, H5.
apply VLEqL. crush.
apply VLEqH.
Qed.
End Example.
*)