Submonoids: definition #
This file defines bundled multiplicative and additive submonoids. We also define
a CompleteLattice structure on Submonoids, define the closure of a set as the minimal submonoid
that includes this set, and prove a few results about extending properties from a dense set (i.e.
a set with closure s = ⊤) to the whole monoid, see Submonoid.dense_induction and
MonoidHom.ofClosureEqTopLeft/MonoidHom.ofClosureEqTopRight.
Main definitions #
Submonoid M: the type of bundled submonoids of a monoidM; the underlying set is given in thecarrierfield of the structure, and should be accessed through coercion as in(S : Set M).AddSubmonoid M: the type of bundled submonoids of an additive monoidM.
For each of the following definitions in the Submonoid namespace, there is a corresponding
definition in the AddSubmonoid namespace.
Submonoid.copy: copy of a submonoid withcarrierreplaced by a set that is equal but possibly not definitionally equal to the carrier of the originalSubmonoid.MonoidHom.eqLocusM: the submonoid of elementsx : Msuch thatf x = g x;
Implementation notes #
Submonoid inclusion is denoted ≤ rather than ⊆, although ∈ is defined as
membership of a submonoid's underlying set.
Note that Submonoid M does not actually require Monoid M, instead requiring only the weaker
MulOneClass M.
This file is designed to have very few dependencies. In particular, it should not use natural
numbers. Submonoid is implemented by extending Subsemigroup requiring one_mem'.
Tags #
submonoid, submonoids
OneMemClass S M says S is a type of subsets s ≤ M, such that 1 ∈ s for all s.
By definition, if we have
OneMemClass S M, we have1 ∈ sfor alls : S.
Instances
ZeroMemClass S M says S is a type of subsets s ≤ M, such that 0 ∈ s for all s.
By definition, if we have
ZeroMemClass S M, we have0 ∈ sfor alls : S.
Instances
A submonoid of a monoid M is a subset containing 1 and closed under multiplication.
A submonoid contains
1.
Instances For
SubmonoidClass S M says S is a type of subsets s ≤ M that contain 1
and are closed under (*)
Instances
An additive submonoid of an additive monoid M is a subset containing 0 and
closed under addition.
An additive submonoid contains
0.
Instances For
AddSubmonoidClass S M says S is a type of subsets s ≤ M that contain 0
and are closed under (+)
Instances
Equations
- AddSubmonoid.instSetLike = { coe := fun (s : AddSubmonoid M) => s.carrier, coe_injective' := ⋯ }
The actual Submonoid obtained from an element of a SubmonoidClass
Equations
- Submonoid.ofClass s = { carrier := ↑s, mul_mem' := ⋯, one_mem' := ⋯ }
Instances For
The actual AddSubmonoid obtained from an element of a
AddSubmonoidClass
Equations
- AddSubmonoid.ofClass s = { carrier := ↑s, add_mem' := ⋯, zero_mem' := ⋯ }
Instances For
Two submonoids are equal if they have the same elements.
Two AddSubmonoids are equal if they have the same elements.
Copy an additive submonoid replacing carrier with a set that is equal to it.
Instances For
A submonoid contains the monoid's 1.
An AddSubmonoid contains the monoid's 0.
A submonoid is closed under multiplication.
An AddSubmonoid is closed under addition.
The submonoid M of the monoid M.
The additive submonoid M of the AddMonoid M.
The trivial submonoid {1} of a monoid M.
The trivial AddSubmonoid {0} of an AddMonoid M.
Equations
- Submonoid.instInhabited = { default := ⊥ }
Equations
- AddSubmonoid.instInhabited = { default := ⊥ }
The inf of two submonoids is their intersection.
The inf of two AddSubmonoids is their intersection.
Equations
- AddSubmonoid.instMin = { min := fun (S₁ S₂ : AddSubmonoid M) => { carrier := ↑S₁ ∩ ↑S₂, add_mem' := ⋯, zero_mem' := ⋯ } }
Equations
- Submonoid.instUniqueOfSubsingleton = { default := ⊥, uniq := ⋯ }
Equations
- AddSubmonoid.instUniqueOfSubsingleton = { default := ⊥, uniq := ⋯ }
The additive submonoid of elements x : M such that f x = g x
Instances For
A submonoid of a monoid inherits a 1.
An AddSubmonoid of an AddMonoid inherits a zero.
An AddSubmonoid of an AddMonoid inherits a scalar multiplication.
A submonoid of a unital magma inherits a unital magma structure.
Equations
- SubmonoidClass.toMulOneClass S = { toOne := OneMemClass.one S, toMul := MulMemClass.mul S, one_mul := ⋯, mul_one := ⋯ }
An AddSubmonoid of a unital additive magma inherits a unital additive magma structure.
Equations
- AddSubmonoidClass.toAddZeroClass S = { toZero := ZeroMemClass.zero S, toAdd := AddMemClass.add S, zero_add := ⋯, add_zero := ⋯ }
A submonoid of a monoid inherits a monoid structure.
Equations
- One or more equations did not get rendered due to their size.
An AddSubmonoid of an AddMonoid inherits an AddMonoid structure.
Equations
- One or more equations did not get rendered due to their size.
A submonoid of a CommMonoid is a CommMonoid.
Equations
- SubmonoidClass.toCommMonoid S = { toMonoid := SubmonoidClass.toMonoid S, mul_comm := ⋯ }
An AddSubmonoid of an AddCommMonoid is an AddCommMonoid.
Equations
- AddSubmonoidClass.toAddCommMonoid S = { toAddMonoid := AddSubmonoidClass.toAddMonoid S, add_comm := ⋯ }
The natural monoid hom from a submonoid of monoid M to M.
Equations
- SubmonoidClass.subtype S' = { toFun := Subtype.val, map_one' := ⋯, map_mul' := ⋯ }
Instances For
The natural monoid hom from an AddSubmonoid of AddMonoid M to M.
Equations
- AddSubmonoidClass.subtype S' = { toFun := Subtype.val, map_zero' := ⋯, map_add' := ⋯ }
Instances For
An AddSubmonoid of an AddMonoid inherits an addition.
An AddSubmonoid of an AddMonoid inherits a zero.
A submonoid of a unital magma inherits a unital magma structure.
Equations
An AddSubmonoid of a unital additive magma inherits a unital additive magma structure.
Equations
A submonoid of a monoid inherits a monoid structure.
Equations
An AddSubmonoid of an AddMonoid inherits an AddMonoid structure.
Equations
A submonoid of a CommMonoid is a CommMonoid.
Equations
An AddSubmonoid of an AddCommMonoid is an AddCommMonoid.
Equations
The natural monoid hom from a submonoid of monoid M to M.
Equations
- S.subtype = { toFun := Subtype.val, map_one' := ⋯, map_mul' := ⋯ }
Instances For
The natural monoid hom from an AddSubmonoid of AddMonoid M to M.
Equations
- S.subtype = { toFun := Subtype.val, map_zero' := ⋯, map_add' := ⋯ }