123456789101112131415161718192021222324252627282930313233343536373839404142434445-------------------------------------------------------------------------- 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 Qopen import Algebra.Definitions _≈_open import Relation.Binary.Reasoning.Setoid setoidopen 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 \\ zy≈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 // yx≈z//y x y z eq = begin x ≈⟨ rightDividesʳ y x ⟨ (x ∙ y) // y ≈⟨ //-congʳ eq ⟩ z // y ∎