Source code on Github
{-# OPTIONS --without-K #-}
module Class.Semigroup.Core where

open import Class.Prelude

record Semigroup (A : Type ) : Type  where
  infixr 5 _◇_ _<>_
  field _◇_ : A  A  A
  _<>_ = _◇_
open Semigroup ⦃...⦄ public

module _ (A : Type )  _ : Semigroup A  where
  record SemigroupLaws (_≈_ : Rel A ℓ′) : Type (  ℓ′) where
    open Alg _≈_
    field ◇-comm   : Commutative _◇_
          ◇-assocʳ : Associative _◇_
  open SemigroupLaws ⦃...⦄ public

  SemigroupLaws≡ : Type 
  SemigroupLaws≡ = SemigroupLaws _≡_

module _ {A : Type }  _ : Semigroup A   _ : SemigroupLaws≡ A  where
  ◇-assocˡ :  (x y z : A)  (x  (y  z))  ((x  y)  z)
  ◇-assocˡ x y z = sym (◇-assocʳ x y z)