Subsemigroups: definition #
This file defines bundled multiplicative and additive subsemigroups.
Main definitions #
Subsemigroup M
: the type of bundled subsemigroup of a magmaM
; the underlying set is given in thecarrier
field of the structure, and should be accessed through coercion as in(S : Set M)
.AddSubsemigroup M
: the type of bundled subsemigroups of an additive magmaM
.
For each of the following definitions in the Subsemigroup
namespace, there is a corresponding
definition in the AddSubsemigroup
namespace.
Subsemigroup.copy
: copy of a subsemigroup withcarrier
replaced by a set that is equal but possibly not definitionally equal to the carrier of the originalSubsemigroup
.
Similarly, for each of these definitions in the MulHom
namespace, there is a corresponding
definition in the AddHom
namespace.
MulHom.eqLocus f g
: the subsemigroup of thosex
such thatf x = g x
Implementation notes #
Subsemigroup inclusion is denoted ≤
rather than ⊆
, although ∈
is defined as
membership of a subsemigroup's underlying set.
Note that Subsemigroup M
does not actually require Semigroup M
,
instead requiring only the weaker Mul M
.
This file is designed to have very few dependencies. In particular, it should not use natural numbers.
Tags #
subsemigroup, subsemigroups
MulMemClass S M
says S
is a type of sets s : Set M
that are closed under (*)
A substructure satisfying
MulMemClass
is closed under multiplication.
Instances
A substructure satisfying MulMemClass
is closed under multiplication.
AddMemClass S M
says S
is a type of sets s : Set M
that are closed under (+)
A substructure satisfying
AddMemClass
is closed under addition.
Instances
A substructure satisfying AddMemClass
is closed under addition.
A subsemigroup of a magma M
is a subset closed under multiplication.
- carrier : Set M
The carrier of a subsemigroup.
The product of two elements of a subsemigroup belongs to the subsemigroup.
Instances For
The product of two elements of a subsemigroup belongs to the subsemigroup.
An additive subsemigroup of an additive magma M
is a subset closed under addition.
- carrier : Set M
The carrier of an additive subsemigroup.
The sum of two elements of an additive subsemigroup belongs to the subsemigroup.
Instances For
The sum of two elements of an additive subsemigroup belongs to the subsemigroup.
Equations
- AddSubsemigroup.instSetLike = { coe := AddSubsemigroup.carrier, coe_injective' := ⋯ }
Equations
- Subsemigroup.instSetLike = { coe := Subsemigroup.carrier, coe_injective' := ⋯ }
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Two AddSubsemigroup
s are equal if they have the same elements.
Two subsemigroups are equal if they have the same elements.
Copy an additive subsemigroup replacing carrier
with a set that is equal to it.
Equations
- S.copy s hs = { carrier := s, add_mem' := ⋯ }
Instances For
Copy a subsemigroup replacing carrier
with a set that is equal to it.
Equations
- S.copy s hs = { carrier := s, mul_mem' := ⋯ }
Instances For
An AddSubsemigroup
is closed under addition.
A subsemigroup is closed under multiplication.
The additive subsemigroup M
of the magma M
.
Equations
- AddSubsemigroup.instTop = { top := { carrier := Set.univ, add_mem' := ⋯ } }
The subsemigroup M
of the magma M
.
Equations
- Subsemigroup.instTop = { top := { carrier := Set.univ, mul_mem' := ⋯ } }
The trivial AddSubsemigroup
∅
of an additive magma M
.
The trivial subsemigroup ∅
of a magma M
.
The inf of two AddSubsemigroup
s is their intersection.
Equations
- AddSubsemigroup.instInf = { inf := fun (S₁ S₂ : AddSubsemigroup M) => { carrier := ↑S₁ ∩ ↑S₂, add_mem' := ⋯ } }
The inf of two subsemigroups is their intersection.
Equations
- Subsemigroup.instInf = { inf := fun (S₁ S₂ : Subsemigroup M) => { carrier := ↑S₁ ∩ ↑S₂, mul_mem' := ⋯ } }
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
An additive submagma of an additive magma inherits an addition.
Equations
- AddMemClass.add S' = { add := fun (a b : ↥S') => ⟨↑a + ↑b, ⋯⟩ }
A submagma of a magma inherits a multiplication.
Equations
- MulMemClass.mul S' = { mul := fun (a b : ↥S') => ⟨↑a * ↑b, ⋯⟩ }
An AddSubsemigroup
of an AddSemigroup
inherits an AddSemigroup
structure.
Equations
- AddMemClass.toAddSemigroup S = Function.Injective.addSemigroup Subtype.val ⋯ ⋯
A subsemigroup of a semigroup inherits a semigroup structure.
Equations
- MulMemClass.toSemigroup S = Function.Injective.semigroup Subtype.val ⋯ ⋯
An AddSubsemigroup
of an AddCommSemigroup
is an AddCommSemigroup
.
Equations
- AddMemClass.toAddCommSemigroup S = Function.Injective.addCommSemigroup Subtype.val ⋯ ⋯
A subsemigroup of a CommSemigroup
is a CommSemigroup
.
Equations
- MulMemClass.toCommSemigroup S = Function.Injective.commSemigroup Subtype.val ⋯ ⋯
The natural semigroup hom from an AddSubsemigroup
of
AddSubsemigroup
M
to M
.
Equations
- AddMemClass.subtype S' = { toFun := Subtype.val, map_add' := ⋯ }
Instances For
The natural semigroup hom from a subsemigroup of semigroup M
to M
.
Equations
- MulMemClass.subtype S' = { toFun := Subtype.val, map_mul' := ⋯ }