(** NB: the compatibility of [le] can be proved later from [lt_wd] and [lt_eq_cases] *)
Module Type NZOrdSig := NZOrd <+ IsNZOrd.
Module Type NZOrdSig' := NZOrd' <+ IsNZOrd.
(** Everything together : *)
(** The [HasMinMax] module type is a type with [min] and [max] operators consistent with [le]. *)
Module Type NZOrdAxiomsSig <: NZBasicFunsSig <: NZOrdSig
:= NZOrdSig <+ AddSubMul <+ IsAddSubMul <+ HasMinMax.
Module Type NZOrdAxiomsSig' <: NZOrdAxiomsSig
:= NZOrdSig' <+ AddSubMul' <+ IsAddSubMul <+ HasMinMax.
(** Same, plus a comparison function. *)
(** The [HasCompare] module type requires a comparison function in type [comparison] consistent with [eq] and [lt]. In particular, this imposes that the order is decidable. *)
Module Type NZDecOrdSig := NZOrdSig <+ HasCompare.
Module Type NZDecOrdSig' := NZOrdSig' <+ HasCompare.
Module Type NZDecOrdAxiomsSig := NZOrdAxiomsSig <+ HasCompare.
Module Type NZDecOrdAxiomsSig' := NZOrdAxiomsSig' <+ HasCompare.
(** A square function *)
(* TODO: why is this here? *)
Module Type NZSquare (Import NZ : NZBasicFunsSig').
Parameter Inline square : t -> t.

(* Specifications: *)
Axiom square_spec : forall n, square n == n * n.
End NZSquare.