-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCBVNormalizingLemmas.v
93 lines (80 loc) · 2.03 KB
/
CBVNormalizingLemmas.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Require Export SystemFR.LoopingTerm.
Lemma not_normalizing_loop:
scbv_normalizing loop ->
False.
Proof.
unfold scbv_normalizing; steps; eauto using not_star_scbv_step_loop.
Qed.
Lemma r_normalizing_loop:
scbv_normalizing loop <-> False.
Proof.
steps; eauto using not_normalizing_loop.
Qed.
Opaque loop.
Lemma not_normalizing_err:
scbv_normalizing notype_err ->
False.
Proof.
unfold scbv_normalizing; repeat step || t_invert_star || step_inversion cbv_value.
Qed.
Lemma r_normalizing_err:
scbv_normalizing notype_err <-> False.
Proof.
steps; eauto using not_normalizing_err.
Qed.
Lemma scbv_normalizing_ite_true:
forall t1 t2,
pfv t2 term_var = nil ->
wf t2 0 ->
scbv_normalizing (ite ttrue t1 t2) <-> scbv_normalizing t1.
Proof.
unfold scbv_normalizing;
repeat step || list_utils || t_invert_star; eauto with smallstep star.
Qed.
Lemma scbv_normalizing_ite_false:
forall t1 t2,
pfv t1 term_var = nil ->
wf t1 0 ->
scbv_normalizing (ite tfalse t1 t2) <-> scbv_normalizing t2.
Proof.
unfold scbv_normalizing;
repeat step || list_utils || t_invert_star; eauto with smallstep star.
Qed.
Lemma scbv_normalizing_zero:
scbv_normalizing zero.
Proof.
unfold scbv_normalizing; steps; eauto with smallstep values star.
Qed.
Lemma r_normalizing_zero:
scbv_normalizing zero <-> True.
Proof.
steps; eauto using scbv_normalizing_zero.
Qed.
Lemma scbv_normalizing_ttrue:
scbv_normalizing ttrue.
Proof.
unfold scbv_normalizing; steps; eauto with smallstep values star.
Qed.
Lemma r_normalizing_ttrue:
scbv_normalizing ttrue <-> True.
Proof.
steps; eauto using scbv_normalizing_ttrue.
Qed.
Lemma scbv_normalizing_step:
forall t1 t2,
scbv_normalizing t1 ->
t1 ~> t2 ->
scbv_normalizing t2.
Proof.
unfold scbv_normalizing; steps.
destruct H2; repeat step || no_step || deterministic_step;
eauto.
Qed.
Lemma scbv_normalizing_back:
forall t1 t2,
scbv_normalizing t2 ->
t1 ~> t2 ->
scbv_normalizing t1.
Proof.
unfold scbv_normalizing; steps; eauto with smallstep star.
Qed.