+(* Magmas *)
+
+record Magma : Type ≝
+ { carrier:> Type;
+ op: carrier → carrier → carrier
+ }.
+
+notation < "M" for @{ 'carrier $M }.
+interpretation "carrier coercion" 'carrier S =
+ (cic:/matita/algebra/semigroups/carrier.con S).
+
+notation "hvbox(a break \middot b)"
+ left associative with precedence 55
+for @{ 'magma_op $a $b }.
+
+interpretation "magma operation" 'magma_op a b =
+ (cic:/matita/algebra/semigroups/op.con _ a b).
+
+(* Semigroups *)
+
+record isSemiGroup (M:Magma) : Prop ≝
+ { associative: associative ? (op M) }.