Record monoid : Set := mkmonoid
  {u : M;
   o : M -> M -> M;
   point_assoc : forall a b c : M, o a (o b c) = o (o a b) c;
   u_neutral_l : forall a : M, o u a = a;
   u_neutral_r : forall a : M, o a u = a}.Record monoid : Set := mkmonoid
  {u : M;
   o : M -> M -> M;
   point_assoc : forall a b c : M, o a (o b c) = o (o a b) c;
   u_neutral_l : forall a : M, o u a = a;
   u_neutral_r : forall a : M, o a u = a}.Record monoid : Set := mkmonoid
  {u : M;
   o : M -> M -> M;
   point_assoc : forall a b c : M, o a (o b c) = o (o a b) c;
   u_neutral_l : forall a : M, o u a = a;
   u_neutral_r : forall a : M, o a u = a}.Record monoid : Set := mkmonoid
  {u : M;
   o : M -> M -> M;
   point_assoc : forall a b c : M, o a (o b c) = o (o a b) c;
   u_neutral_l : forall a : M, o u a = a;
   u_neutral_r : forall a : M, o a u = a}.Record monoid : Set := mkmonoid
  {u : M;
   o : M -> M -> M;
   point_assoc : forall a b c : M, o a (o b c) = o (o a b) c;
   u_neutral_l : forall a : M, o u a = a;
   u_neutral_r : forall a : M, o a u = a}.Record monoid : Set := mkmonoid
  {u : M;
   o : M -> M -> M;
   point_assoc : forall a b c : M, o a (o b c) = o (o a b) c;
   u_neutral_l : forall a : M, o u a = a;
   u_neutral_r : forall a : M, o a u = a}.Record monoid : Set := mkmonoid
  {u : M;
   o : M -> M -> M;
   point_assoc : forall a b c : M, o a (o b c) = o (o a b) c;
   u_neutral_l : forall a : M, o u a = a;
   u_neutral_r : forall a : M, o a u = a}.Remark o'_assoc : forall a b c : M, o' a (o' b c) = o' (o' a b) c.Remark u'_neutral_l : forall a : M, o' u' a = a.Remark u'_neutral_r : forall a : M, o' a u' = a.(* powering 
************)
Fixpoint power (x : M) (n : nat) {struct n} : M :=
  match n with
  | O => u'
  | S n => o' x (power x n)
  end.

(* Specifications: *)
Lemma power_u : forall m : nat, power u' m = u'.
Lemma power_plus : forall (a : M) (n p : nat), power a (n + p) = o' (power a n) (power a p).
Lemma power_1 : forall a : M, power a 1 = a.
Lemma power_sym : forall (a : M) (n p : nat), o' (power a n) (power a p) = o' (power a p) (power a n).
Lemma power_mult : forall (a : M) (n p : nat), power a (p * n) = power (power a n) p.
Lemma a2x : forall (a : M) (x : nat), power (o' a a) x = power a (x + x).
Lemma power_eucl : forall (m : M) (b q r : nat), power m (q * b + r) = o' (power (power m b) q) (power m r).