Module HL :=  HoareLogic(Example).
(** These coercions makes the abstract syntax more user-friendly *)
Coercion getvar: ExVar >-> ExExpr.
Coercion binop: binOP >-> Funclass.
Coercion relop: relOP >-> Funclass.
(** A last coercion useful for assertions *)
Coercion get: ExVar >-> Funclass.
(** ** A [gcd] computation in this language *)
Definition gcd :=
(Iwhile (NEQ VX VY)
(Iif (LE VX VY)
(Iset VY (MINUS VY VX))
(Iset VX (MINUS VX VY)))).
Hint Resolve Zgcd_minus: zarith.
Hint Resolve Zneq_bool_true Zneq_bool_false Zle_bool_imp_le Zis_gcd_intro: zarith.
(** ** Total correctness proof of [gcd] *)

Lemma gcd_total_proof:
forall x0 y0, (fun e => (VX e)=x0 /\ (VY e)=y0 /\ x0 > 0 /\ y0 > 0)
|= gcd  [= fun e => (Zis_gcd x0 y0 (VX e)) =].