(* Predeclare postfix doubling/halving operators. *)
Reserved Notation "n ./2" (at level 2, format "n ./2").
(* Canonical comparison and eqType for nat.                                *)
Fixpoint eqn m n {struct m} :=
match m, n with
| 0, 0 => true
| m'.+1, n'.+1 => eqn m' n'
| _, _ => false
end.

Lemma eqnP : Equality.axiom eqn.
Canonical nat_eqMixin := EqMixin eqnP.