Question: Coq Module Combined. Inductive tm : Type : = | C : nat - > tm | P : tm - > tm - >

Coq Module Combined.
Inductive tm : Type :=
| C : nat -> tm
| P : tm -> tm -> tm
| tru : tm
| fls : tm
| test : tm -> tm -> tm -> tm.
Inductive value : tm -> Prop :=
| v_const : forall n, value (C n)
| v_tru : value tru
| v_fls : value fls.
Reserved Notation " t '-->' t'"(at level 40).
Inductive step : tm -> tm -> Prop :=
| ST_PlusConstConst : forall v1 v2,
P (C v1)(C v2)--> C (v1+ v2)
| ST_Plus1 : forall t1 t1' t2,
t1--> t1'->
P t1 t2--> P t1' t2
| ST_Plus2 : forall v1 t2 t2',
value v1->
t2--> t2'->
P v1 t2--> P v1 t2'
| ST_IfTrue : forall t1 t2,
test tru t1 t2--> t1
| ST_IfFalse : forall t1 t2,
test fls t1 t2--> t2
| ST_If : forall t1 t1' t2 t3,
t1--> t1'->
test t1 t2 t3--> test t1' t2 t3
where " t '-->' t'" :=(step t t').
(** Earlier, we separately proved for both plus- and if-expressions...
- that the step relation was deterministic, and
- a strong progress lemma, stating that every term is either a
value or can take a step.
Formally prove or disprove these two properties for the combined
language. *)
(****** Exercise: 3 stars, standard (combined_step_deterministic)*)
Theorem combined_step_deterministic: (deterministic step)\/ ~ (deterministic step).
Proof.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!