The "standard" monoid

The most standard monoid is composed of the set nat, the unity (S O), and the multiplication mult.

Since the module Mult is required, we get a very simple construction:

Lemma standard: (monoid nat).
 Realizer (mkmonoid nat (S O) mult).
 Program_all.
Qed.

CaML Implementation

#load "Demo.ml";;
##open "Demo";;

#standard;;
- : int monoid = mkmonoid (1, <fun>)


#addchains (dicho log2_impl) 10 standard (S (S O)) ;;
- : int = 1024