Denotational Semantics in Agda
Algebra.Properties.Semigroup
Initializing search
    pdmosses/xds-agda
    • About
    • Meta-notation
    • ULC
    • PCF
    • Scheme
    pdmosses/xds-agda
    • About
    • Meta-notation
      • Untyped λ-calculus
      • ULC.All
      • ULC.Variables
      • ULC.Terms
      • ULC.Domains
      • ULC.Environments
      • ULC.Semantics
      • ULC.Checks
      • PCF (Plotkin 1977)
      • PCF.All
      • PCF.Domain Notation
      • PCF.Types
      • PCF.Constants
      • PCF.Variables
      • PCF.Terms
      • PCF.Environments
      • PCF.Checks
      • Core Scheme (R5RS)
      • Scheme.All
      • Scheme.Domain Notation
      • Scheme.Abstract Syntax
      • Scheme.Domain Equations
      • Scheme.Auxiliary Functions
      • Scheme.Semantic Functions

    Algebra.Properties.Semigroup

    ------------------------------------------------------------------------
    -- The Agda standard library
    --
    -- Some theory for Semigroup
    ------------------------------------------------------------------------
    
    {-# OPTIONS --cubical-compatible --safe #-}
    
    open import Algebra using (Semigroup)
    
    module Algebra.Properties.Semigroup {a ℓ} (S : Semigroup a ℓ) where
    
    open Semigroup S
    open import Algebra.Definitions _≈_
    open import Data.Product.Base using (_,_)
    
    x∙yz≈xy∙z : ∀ x y z → x ∙ (y ∙ z) ≈ (x ∙ y) ∙ z
    x∙yz≈xy∙z x y z = sym (assoc x y z)
    
    alternativeˡ : LeftAlternative _∙_
    alternativeˡ x y = assoc x x y
    
    alternativeʳ : RightAlternative _∙_
    alternativeʳ x y = sym (assoc x y y)
    
    alternative : Alternative _∙_
    alternative = alternativeˡ , alternativeʳ
    
    flexible : Flexible _∙_
    flexible x y = assoc x y x
    
    Made with Material for MkDocs