Zulip Chat Archive

Stream: Is there code for X?

Topic: Quasigroups


Yan Yablonovskiy 🇺🇦 (Jul 28 2025 at 10:17):

Hey all,

Is there anything like this currently?

import Mathlib.Tactic
import Mathlib.Algebra.Group.Defs
class AssocQuasiGroup.{u} (α : Type u) extends Semigroup α where
latin_sq_prop : ∀a b: α,∃! p:α × α, (a*p.1 = b) ∧ (p.2*a = b)

Based on:
https://en.wikipedia.org/wiki/Quasigroup

Aaron Liu (Jul 28 2025 at 10:21):

That would be [Semigroup α] [IsLeftCancelMul α] [IsRightCancelMul α]

Aaron Liu (Jul 28 2025 at 10:21):

Interestingly, we have docs#LeftCancelSemigroup and docs#RightCancelSemigroup but I couldn't find a two-sided version

Aaron Liu (Jul 28 2025 at 10:23):

hmm after thinking about this a bit more maybe not

Aaron Liu (Jul 28 2025 at 10:24):

since it doesn't ensure your elements are always "reachable"

Yan Yablonovskiy 🇺🇦 (Jul 28 2025 at 10:24):

Aaron Liu said:

hmm after thinking about this a bit more maybe not

Yea I am a bit worried about the combined uniqueness , and statement of existence.

Aaron Liu (Jul 28 2025 at 10:24):

in particular any free semigroup satisfies cancellability but you don't get division

Aaron Liu (Jul 28 2025 at 10:26):

Based on the generality some of the division lemmas are stated in I would guess that this is not in mathlib

Kenny Lau (Jul 28 2025 at 10:55):

i would additionally advise you to make it data instead of prop


Last updated: Dec 20 2025 at 21:32 UTC