Denotational Semantics in Agda
Algebra.Properties.Quasigroup
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.Quasigroup

    ------------------------------------------------------------------------
    -- The Agda standard library
    --
    -- Some basic properties of Quasigroup
    ------------------------------------------------------------------------
    
    {-# OPTIONS --cubical-compatible --safe #-}
    
    open import Algebra.Bundles using (Quasigroup)
    
    module Algebra.Properties.Quasigroup {q₁ q₂} (Q : Quasigroup q₁ q₂) where
    
    open Quasigroup Q
    open import Algebra.Definitions _≈_
    open import Relation.Binary.Reasoning.Setoid setoid
    open import Data.Product.Base using (_,_)
    
    cancelˡ : LeftCancellative _∙_
    cancelˡ x y z eq = begin
      y             ≈⟨ leftDividesʳ x y ⟨
      x \\ (x ∙ y)  ≈⟨ \\-congˡ eq ⟩
      x \\ (x ∙ z)  ≈⟨ leftDividesʳ x z ⟩
      z             ∎
    
    cancelʳ : RightCancellative _∙_
    cancelʳ x y z eq = begin
      y             ≈⟨ rightDividesʳ x y ⟨
      (y ∙ x) // x  ≈⟨ //-congʳ eq ⟩
      (z ∙ x) // x  ≈⟨ rightDividesʳ x z ⟩
      z             ∎
    
    cancel : Cancellative _∙_
    cancel = cancelˡ , cancelʳ
    
    y≈x\\z : ∀ x y z → x ∙ y ≈ z → y ≈ x \\ z
    y≈x\\z x y z eq = begin
      y            ≈⟨ leftDividesʳ x y ⟨
      x \\ (x ∙ y) ≈⟨ \\-congˡ eq ⟩
      x \\ z       ∎
    
    x≈z//y : ∀ x y z → x ∙ y ≈ z → x ≈ z // y
    x≈z//y x y z eq = begin
      x            ≈⟨ rightDividesʳ y x ⟨
      (x ∙ y) // y ≈⟨ //-congʳ eq ⟩
      z // y       ∎
    
    Made with Material for MkDocs