(* Big(ger) nat IO; usage:                              *)
(*     Num 1 072 399                                    *)
(*        to create large numbers for test cases        *)
(* Eval compute in [Num of some expression]             *)
(*        to display the resut of an expression that    *)
(*        returns a larger integer.                     *)
Record number : Type := Num {bin_of_number :> N}.
Definition extend_number (nn : number) m := Num (nn * 1000 + bin_of_nat m).
Coercion extend_number : number >-> Funclass.
Canonical number_subType := [newType for bin_of_number].
Definition number_eqMixin := Eval hnf in [eqMixin of number by <:].
Canonical number_eqType := Eval hnf in EqType number number_eqMixin.
Notation "[ 'Num' 'of' e ]" := (Num (bin_of_nat e))
(at level 0, format "[ 'Num'  'of'  e ]") : nat_scope.
(* Interface to ring/ring_simplify tactics *)

(* Specifications: *)
Lemma nat_semi_ring : semi_ring_theory 0 1 addn muln (@eq _).
Lemma nat_power_theory : power_theory 1 muln (@eq _) nat_of_bin expn.