diff options
Diffstat (limited to 'theories/lambda/operational_props.v')
-rw-r--r-- | theories/lambda/operational_props.v | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/theories/lambda/operational_props.v b/theories/lambda/operational_props.v new file mode 100644 index 0000000..c331924 --- /dev/null +++ b/theories/lambda/operational_props.v | |||
@@ -0,0 +1,29 @@ | |||
1 | From mininix Require Export lambda.operational. | ||
2 | From stdpp Require Import options. | ||
3 | |||
4 | Module Import lambda. | ||
5 | Export lambda. | ||
6 | |||
7 | (** Properties of operational semantics *) | ||
8 | Lemma step_not_final e1 e2 : e1 --> e2 → ¬final e1. | ||
9 | Proof. induction 1; inv 1; naive_solver. Qed. | ||
10 | Lemma final_nf e : final e → nf step e. | ||
11 | Proof. by intros ? [??%step_not_final]. Qed. | ||
12 | |||
13 | Lemma SAppL_rtc e1 e1' e2 : e1 -->* e1' → EApp e1 e2 -->* EApp e1' e2. | ||
14 | Proof. induction 1; repeat (done || econstructor). Qed. | ||
15 | |||
16 | Ltac inv_step := repeat | ||
17 | match goal with H : ?e --> _ |- _ => assert_fails (is_var e); inv H end. | ||
18 | |||
19 | Lemma step_det e d1 d2 : | ||
20 | e --> d1 → | ||
21 | e --> d2 → | ||
22 | d1 = d2. | ||
23 | Proof. | ||
24 | intros Hred1. revert d2. | ||
25 | induction Hred1; intros d2 Hred2; inv Hred2; try by inv_step. | ||
26 | f_equal. by apply IHHred1. | ||
27 | Qed. | ||
28 | |||
29 | End lambda. | ||