Inductive Exp :=
| num : nat -> Exp
| var : string -> Exp
| add : Exp -> Exp -> Exp
| sub : Exp -> Exp -> Exp
| div : Exp -> Exp -> Exp.
Inductive Cond :=
| base : bool -> Cond
| bnot : Cond -> Cond
| beq : Exp -> Exp -> Cond
| less : Exp -> Exp -> Cond
| band : Cond -> Cond -> Cond.
Nat.sub și Nat.div (din modulul
Nat predefinite în Coq) pot fi utilizate pentru
operațiile de scădere și înmulțire.
Inductive Stmt :=
| skip : Stmt
| assign : string -> Exp -> Stmt
| seq : Stmt -> Stmt -> Stmt
| ite : Cond -> Stmt -> Stmt -> Stmt (* if-then-else *)
| it : Cond -> Stmt -> Stmt (* if-then *)
| dowhile : Stmt -> Cond -> Stmt.
CPar ce permite executarea în paralel a două
instrucțiuni. Cerință: adăugați la Stmt definit la
exercițiul 2 instrucțiunea CPar și apoi demonstrați o
proprietate similară cu cea din exercițiul https://softwarefoundations.cis.upenn.edu/plf-current/Smallstep.html#lab178.Coq Reference Manual: https://coq.inria.fr/distrib/current/refman/