(* This file is generated by Why3's Coq 8.4 driver *)
(* Beware! Only edit allowed sections below    *)
Require Import BuiltIn.
Require BuiltIn.
Require int.Int.
Require int.Abs.
Require int.EuclideanDivision.
Require int.ComputerDivision.
Require number.Parity.
Require number.Divisibility.
Require number.Gcd.

(* Why3 assumption *)
Definition unit := unit.

Axiom qtmark : Type.
Parameter qtmark_WhyType : WhyType qtmark.
Existing Instance qtmark_WhyType.

(* Why3 goal *)
Theorem WP_parameter_euclid : forall (u:Z) (v:Z), ((0%Z <= u)%Z /\
  (0%Z <= v)%Z) -> ((~ (v = 0%Z)) -> let o := (ZArith.BinInt.Z.rem u v) in
  (((0%Z <= v)%Z /\ (0%Z <= o)%Z) -> ((number.Gcd.gcd v
  o) = (number.Gcd.gcd u v)))).
(* Why3 intros u v (h1,h2) h3 o (h4,h5). *)
Proof.
intuition.
symmetry.
rewrite Gcd.Comm.
rewrite Gcd.gcd_euclid with (q := Z.quot u v).
apply f_equal.
rewrite (Zquot.Z_quot_rem_eq u v) at 1.
ring.
Qed.

