Substructures of Semigroups #
In this file, we extend Mathlib's Subsemigroup structure to define structures
for Submonoid and Subgroup. Note that these are different that the mathlib notions
of Submonoid and Subgroup which requrire the outer structure to also be a monoid/group,
so we put all definitions in the Semigroup namespace to avoid conflict
Main Definitions #
Semigroup.SubsemigroupSemigroup.Subsemigroup.toSemigroupThesemigroupinstance on the subtype of a subsemigroupSemigroup.SubmonoidSemigroup.Submonoid.toMonoidTheMonoidinstance on the subtype of a submonoidSemigroup.SubgroupSemigroup.Subgroup.toGroupTheGroupinstance on the subtype of a submonoidSemigroup.Subgroup.isMaximalA maximal subgroup is a subgroup that is not properly contained in any other subgroup.Semigroup.hom_of_bijOn- Noncomputably lift a bijection on the carriers of two subgroups that maps multiplication to an isomorphism between the groups.
References #
See https://avigad.github.io/mathematics_in_lean/C08_Hierarchies.html#sub-objects
TODO #
Redefine group with only left inverse requirement not both.
Blueprint #
Subgroup of a Semigroup
Label: def:subgroup-of-semigroup
Lean definition to tag: Semigroup.Subgroup
dependencies: None
Maximal Subgroup
label: def:maximal-subgroup
Lean definition to tag: Semigroup.Subgroup.isMaximal
Dependencies: def:subgroup-of-semigroup
Structure definitions #
The definition of Semigroup.Subsemigroup is copied from mathlibs Subsemigroup,
except we requrie an outer Semigroup structure.
These BUNDLED structures come with SetLike instances, enabiling a coersion to Set
so you can write things like x ∈ H for x : S and H : Subsemigroup S. It also provides
the lattice strucure (⊓ ⊔ ⊤ ⊥) and the cannonical subtype H : Type := {x // x ∈ carrier}
A subsemigroup of a Semigroup S is a subset closed under multiplication.
- carrier : Set S
The carrier of a subsemigroup.
The product of two elements of a subsemigroup belongs to the subsemigroup.
Instances For
We prove that Subsemigroup S has an injective coersion to Set S
Equations
- Semigroup.Subsemigroup.instSetLike = { coe := Semigroup.Subsemigroup.carrier, coe_injective' := ⋯ }
We define * on the subsemigroup as a subtype
We relate our defintion of * in the subtype to that outside of the subtype
A subsemigroup is a semigroup on its subtype
Equations
- Semigroup.Subsemigroup.toSemigroup = { toMul := T.instMulSubtypeMem, mul_assoc := ⋯ }
A submonoid of a Semigroup S is a subset closed under multiplication and containing
and identity element
- one : S
The one element
The one element is in the carrier
The one element is a left identity in the carrier
The one element is a right identity in the carrier
Instances For
In Order to obtain the SetLike instance, we need to construct an injection
from Submonoids to Sets. This means that we must prove that, if the carrier
of two Submonoids is equal, then the one elements must be equal.
We prove that Submonoid S has an injective coersion to Set S
Equations
- Semigroup.Submonoid.instSetLike = { coe := Semigroup.Subsemigroup.carrier ∘ Semigroup.Submonoid.toSubsemigroup, coe_injective' := ⋯ }
We relate our defintion of * in the subtype to that outside of the subtype
Equations
- Semigroup.Submonoid.instSubtypeMem = { toMul := T.instMulSubtypeMem, mul_assoc := ⋯ }
We relate our identiy properties to the subtype
A Submonoid is a Monoid on its subtype
Equations
- Semigroup.Submonoid.toMonoid = { toMul := T.instMulSubtypeMem, mul_assoc := ⋯, one := ⟨T.one, ⋯⟩, one_mul := ⋯, mul_one := ⋯, npow := npowRecAuto, npow_zero := ⋯, npow_succ := ⋯ }
A Subgroup of a Semigroup S is a subset closed under multiplication and containing
and identity element and an inverse function
- one : S
- inv (x : S) : S
The inverse function
The inverses are in the carrier
The inverse function provides right inverses
The inverse function provides left inverses
Instances For
In Order to obtain the SetLike instance, we need to construct an injection
from Subgroups to Sets. This means that we must prove that, if the carrier
of two Submonoids is equal, then the one elements and the inverse functions must be equal.
We prove that Subgroup S has an injective coersion to Set S
Equations
- Semigroup.Subgroup.instSetLike = { coe := Semigroup.Subsemigroup.carrier ∘ Semigroup.Submonoid.toSubsemigroup ∘ Semigroup.Subgroup.toSubmonoid, coe_injective' := ⋯ }
We relate our defintion of * in the subtype to that outside of the subtype
Equations
- Semigroup.Subgroup.instSubtypeMem = { toMul := T.instMulSubtypeMem, mul_assoc := ⋯ }
We relate our identiy properties to the subtype
Lift a bijection on the carriers of two subgroups that maps multiplication to an isomorphism between the groups.
Equations
- H.hom_of_bijOn T f hbij hmap = { toFun := fun (x : ↥H) => ⟨f ↑x, ⋯⟩, invFun := Function.surjInv ⋯, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯ }