Variant ifnz_spec T n (x y : T) : T -> Type :=
| IfnzPos of n > 0 : ifnz_spec n x y x
| IfnzZero of n = 0 : ifnz_spec n x y y.

(* Specifications: *)
Lemma ifnzP T n (x y : T) : ifnz_spec n x y (ifnz n x y).
Lemma primePn n :
reflect (n < 2 \/ exists2 d, 1 < d < n & d %| n) (~~ prime n).
Lemma primeP p :
reflect (p > 1 /\ forall d, d %| p -> xpred2 1 p d) (prime p).
Lemma prime_nt_dvdP d p : prime p -> d != 1 -> reflect (d = p) (d %| p).
Arguments primeP {p}.