(** Divides with bounded ex quantifier. *)

Definition bDivides (d n : nat) :=
  n = 0 \/ (exists q : nat, q < S n /\ n = d * q).

Theorem sqrdivbound : forall n d : nat, Divides d n -> exists x : nat, Divides x n /\ x * x <= n /\ (x = d \/ d * x = n).