Congruence relations #
This file defines congruence relations: equivalence relations that preserve a binary operation,
which in this case is multiplication or addition. The principal definition is a structure
extending a Setoid
(an equivalence relation), and the inductive definition of the smallest
congruence relation containing a binary relation is also given (see ConGen
).
The file also proves basic properties of the quotient of a type by a congruence relation, and the
complete lattice of congruence relations on a type. We then establish an order-preserving bijection
between the set of congruence relations containing a congruence relation c
and the set of
congruence relations on the quotient by c
.
The second half of the file concerns congruence relations on monoids, in which case the quotient by the congruence relation is also a monoid. There are results about the universal property of quotients of monoids, and the isomorphism theorems for monoids.
Implementation notes #
The inductive definition of a congruence relation could be a nested inductive type, defined using
the equivalence closure of a binary relation EqvGen
, but the recursor generated does not work.
A nested inductive definition could conceivably shorten proofs, because they would allow invocation
of the corresponding lemmas about EqvGen
.
The lemmas refl
, symm
and trans
are not tagged with @[refl]
, @[symm]
, and @[trans]
respectively as these tags do not work on a structure coerced to a binary relation.
There is a coercion from elements of a type to the element's equivalence class under a congruence relation.
A congruence relation on a monoid M
can be thought of as a submonoid of M × M
for which
membership is an equivalence relation, but whilst this fact is established in the file, it is not
used, since this perspective adds more layers of definitional unfolding.
Tags #
congruence, congruence relation, quotient, quotient by congruence relation, monoid, quotient monoid, isomorphism theorems
- r : M → M → Prop
- iseqv : Equivalence Setoid.r
Additive congruence relations are closed under addition
A congruence relation on a type with an addition is an equivalence relation which preserves addition.
Instances For
- r : M → M → Prop
- iseqv : Equivalence Setoid.r
Congruence relations are closed under multiplication
A congruence relation on a type with a multiplication is an equivalence relation which preserves multiplication.
Instances For
- of: ∀ {M : Type u_1} [inst : Add M] {r : M → M → Prop} (x y : M), r x y → AddConGen.Rel r x y
- refl: ∀ {M : Type u_1} [inst : Add M] {r : M → M → Prop} (x : M), AddConGen.Rel r x x
- symm: ∀ {M : Type u_1} [inst : Add M] {r : M → M → Prop} {x y : M}, AddConGen.Rel r x y → AddConGen.Rel r y x
- trans: ∀ {M : Type u_1} [inst : Add M] {r : M → M → Prop} {x y z : M}, AddConGen.Rel r x y → AddConGen.Rel r y z → AddConGen.Rel r x z
- add: ∀ {M : Type u_1} [inst : Add M] {r : M → M → Prop} {w x y z : M}, AddConGen.Rel r w x → AddConGen.Rel r y z → AddConGen.Rel r (w + y) (x + z)
The inductively defined smallest additive congruence relation containing a given binary relation.
Instances For
- of: ∀ {M : Type u_1} [inst : Mul M] {r : M → M → Prop} (x y : M), r x y → ConGen.Rel r x y
- refl: ∀ {M : Type u_1} [inst : Mul M] {r : M → M → Prop} (x : M), ConGen.Rel r x x
- symm: ∀ {M : Type u_1} [inst : Mul M] {r : M → M → Prop} {x y : M}, ConGen.Rel r x y → ConGen.Rel r y x
- trans: ∀ {M : Type u_1} [inst : Mul M] {r : M → M → Prop} {x y z : M}, ConGen.Rel r x y → ConGen.Rel r y z → ConGen.Rel r x z
- mul: ∀ {M : Type u_1} [inst : Mul M] {r : M → M → Prop} {w x y z : M}, ConGen.Rel r w x → ConGen.Rel r y z → ConGen.Rel r (w * y) (x * z)
The inductively defined smallest multiplicative congruence relation containing a given binary relation.
Instances For
The inductively defined smallest multiplicative congruence relation containing a given binary relation.
Equations
- conGen r = { toSetoid := { r := ConGen.Rel r, iseqv := (_ : Equivalence (ConGen.Rel r)) }, mul' := (_ : ∀ {w x y z : M}, ConGen.Rel r w x → ConGen.Rel r y z → ConGen.Rel r (w * y) (x * z)) }
Instances For
A coercion from an additive congruence relation to its underlying binary relation.
A coercion from a congruence relation to its underlying binary relation.
Additive congruence relations are reflexive.
Additive congruence relations are symmetric.
Additive congruence relations are transitive.
Given a type M
with an addition, x, y ∈ M
, and an additive congruence relation
c
on M
, (x, y) ∈ M × M
iff x
is related to y
by c
.
Equations
- AddCon.instMembershipSumCon = { mem := fun x c => ↑c x.fst x.snd }
Given a type M
with a multiplication, a congruence relation c
on M
, and elements of M
x, y
, (x, y) ∈ M × M
iff x
is related to y
by c
.
Equations
- Con.instMembershipProdCon = { mem := fun x c => ↑c x.fst x.snd }
The kernel of an addition-preserving function as an additive congruence relation.
Equations
- AddCon.addKer f h = { toSetoid := Setoid.ker f, add' := (_ : ∀ {w x y z : M}, Setoid.r w x → Setoid.r y z → Setoid.r (w + y) (x + z)) }
Instances For
The kernel of a multiplication-preserving function as a congruence relation.
Equations
- Con.mulKer f h = { toSetoid := Setoid.ker f, mul' := (_ : ∀ {w x y z : M}, Setoid.r w x → Setoid.r y z → Setoid.r (w * y) (x * z)) }
Instances For
Given types with additions M, N
, the product of two congruence relations
c
on M
and d
on N
: (x₁, x₂), (y₁, y₂) ∈ M × N
are related by c.prod d
iff x₁
is related to y₁
by c
and x₂
is related to y₂
by d
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given types with multiplications M, N
, the product of two congruence relations c
on M
and
d
on N
: (x₁, x₂), (y₁, y₂) ∈ M × N
are related by c.prod d
iff x₁
is related to y₁
by c
and x₂
is related to y₂
by d
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The product of an indexed collection of additive congruence relations.
Equations
- AddCon.pi C = let src := piSetoid; { toSetoid := { r := Setoid.r, iseqv := (_ : Equivalence Setoid.r) }, add' := @AddCon.pi.proof_2 ι f inst C }
Instances For
The product of an indexed collection of congruence relations.
Equations
- Con.pi C = let src := piSetoid; { toSetoid := { r := Setoid.r, iseqv := (_ : Equivalence Setoid.r) }, mul' := @Con.pi.proof_2 ι f inst C }
Instances For
Defining the quotient by an additive congruence relation of a type with an addition.
Equations
- AddCon.Quotient c = Quotient c.toSetoid
Instances For
Defining the quotient by a congruence relation of a type with a multiplication.
Equations
- Con.Quotient c = Quotient c.toSetoid
Instances For
The morphism into the quotient by an additive congruence relation
Equations
- AddCon.toQuotient = Quotient.mk''
Instances For
The morphism into the quotient by a congruence relation
Equations
- Con.toQuotient = Quotient.mk''
Instances For
Coercion from a type with an addition to its quotient by an additive congruence relation
Equations
- AddCon.instCoeTCQuotient c = { coe := AddCon.toQuotient }
Coercion from a type with a multiplication to its quotient by a congruence relation.
See Note [use has_coe_t].
Equations
- Con.instCoeTCQuotient c = { coe := Con.toQuotient }
The quotient by a decidable additive congruence relation has decidable equality.
Equations
- AddCon.instDecidableEqQuotient c = inferInstanceAs (DecidableEq (Quotient c.toSetoid))
The quotient by a decidable congruence relation has decidable equality.
Equations
- Con.instDecidableEqQuotient c = inferInstanceAs (DecidableEq (Quotient c.toSetoid))
The function on the quotient by a congruence relation c
induced by a function that is constant on c
's equivalence classes.
Equations
- AddCon.liftOn q f h = Quotient.liftOn' q f h
Instances For
The function on the quotient by a congruence relation c
induced by a function that is
constant on c
's equivalence classes.
Equations
- Con.liftOn q f h = Quotient.liftOn' q f h
Instances For
The binary function on the quotient by a congruence relation c
induced by a binary function that is constant on c
's equivalence classes.
Equations
- AddCon.liftOn₂ q r f h = Quotient.liftOn₂' q r f h
Instances For
The binary function on the quotient by a congruence relation c
induced by a binary function
that is constant on c
's equivalence classes.
Equations
- Con.liftOn₂ q r f h = Quotient.liftOn₂' q r f h
Instances For
A version of Quotient.hrecOn₂'
for quotients by AddCon
.
Equations
- AddCon.hrecOn₂ a b f h = Quotient.hrecOn₂' a b f h
Instances For
A version of Quotient.hrecOn₂'
for quotients by Con
.
Equations
- Con.hrecOn₂ a b f h = Quotient.hrecOn₂' a b f h
Instances For
The inductive principle used to prove propositions about the elements of a quotient by an additive congruence relation.
The inductive principle used to prove propositions about the elements of a quotient by a congruence relation.
A version of AddCon.induction_on
for predicates which take
two arguments.
A version of Con.induction_on
for predicates which take two arguments.
The addition induced on the quotient by an additive congruence relation on a type with an addition.
Equations
- AddCon.hasAdd c = { add := Quotient.map₂' (fun x x_1 => x + x_1) fun x x_1 h1 x_2 x_3 => (_ : Setoid.r x_2 x_3 → ↑c (x + x_2) (x_1 + x_3)) }
The multiplication induced on the quotient by a congruence relation on a type with a multiplication.
Equations
- Con.hasMul c = { mul := Quotient.map₂' (fun x x_1 => x * x_1) fun x x_1 h1 x_2 x_3 => (_ : Setoid.r x_2 x_3 → ↑c (x * x_2) (x_1 * x_3)) }
The kernel of the quotient map induced by an additive congruence
relation c
equals c
.
The kernel of the quotient map induced by a congruence relation c
equals c
.
Definition of the function on the quotient by an additive congruence
relation c
induced by a function that is constant on c
's equivalence classes.
Definition of the function on the quotient by a congruence relation c
induced by a function
that is constant on c
's equivalence classes.
Equations
- AddCon.sInf_toSetoid.match_1 S r motive x h_1 = Exists.casesOn x fun w h => And.casesOn h fun left right => h_1 w left right
Instances For
The complete lattice of additive congruence relations on a given type with an addition.
Equations
- One or more equations did not get rendered due to their size.
The complete lattice of congruence relations on a given type with a multiplication.
Equations
- One or more equations did not get rendered due to their size.
Given binary relations r, s
with r
contained in s
, the
smallest additive congruence relation containing s
contains the smallest additive congruence
relation containing r
.
The supremum of a set of additive congruence relations S
equals
the smallest additive congruence relation containing the binary relation 'there exists c ∈ S
such that x
is related to y
by c
'.
Equations
- AddCon.sSup_eq_addConGen.match_1 S x x motive x h_1 = Exists.casesOn x fun w h => h_1 w h
Instances For
The supremum of a set of additive congruence relations is the same as the smallest additive congruence relation containing the supremum of the set's image under the map to the underlying binary relation.
There is a Galois insertion of additive congruence relations on a type with
an addition M
into binary relations on M
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
There is a Galois insertion of congruence relations on a type with a multiplication M
into
binary relations on M
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a function f
, the smallest additive congruence relation containing the
binary relation on f
's image defined by 'x ≈ y
iff the elements of f⁻¹(x)
are related to the
elements of f⁻¹(y)
by an additive congruence relation c
.'
Instances For
Given a function f
, the smallest congruence relation containing the binary relation on f
's
image defined by 'x ≈ y
iff the elements of f⁻¹(x)
are related to the elements of f⁻¹(y)
by a congruence relation c
.'
Instances For
Given a surjective addition-preserving function f
whose kernel is contained in
an additive congruence relation c
, the additive congruence relation on f
's codomain defined
by 'x ≈ y
iff the elements of f⁻¹(x)
are related to the elements of f⁻¹(y)
by c
.'
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a surjective multiplicative-preserving function f
whose kernel is contained in a
congruence relation c
, the congruence relation on f
's codomain defined by 'x ≈ y
iff the
elements of f⁻¹(x)
are related to the elements of f⁻¹(y)
by c
.'
Equations
- One or more equations did not get rendered due to their size.
Instances For
A specialization of 'the smallest additive congruence relation containing
an additive congruence relation c
equals c
'.
A specialization of 'the smallest congruence relation containing a congruence relation c
equals c
'.
Given types with additions M, N
and an additive congruence relation c
on N
,
an addition-preserving map f : M → N
induces an additive congruence relation on f
's domain
defined by 'x ≈ y
iff f(x)
is related to f(y)
by c
.'
Equations
- AddCon.comap f H c = let src := Setoid.comap f c.toSetoid; { toSetoid := { r := Setoid.r, iseqv := (_ : Equivalence Setoid.r) }, add' := AddCon.comap.proof_1 f H c }
Instances For
Given types with multiplications M, N
and a congruence relation c
on N
, a
multiplication-preserving map f : M → N
induces a congruence relation on f
's domain
defined by 'x ≈ y
iff f(x)
is related to f(y)
by c
.'
Equations
- Con.comap f H c = let src := Setoid.comap f c.toSetoid; { toSetoid := { r := Setoid.r, iseqv := (_ : Equivalence Setoid.r) }, mul' := Con.comap.proof_1 f H c }
Instances For
Given an additive congruence relation c
on a type M
with an addition,
the order-preserving bijection between the set of additive congruence relations containing c
and
the additive congruence relations on the quotient of M
by c
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given a congruence relation c
on a type M
with a multiplication, the order-preserving
bijection between the set of congruence relations containing c
and the congruence relations
on the quotient of M
by c
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The quotient of an AddMonoid
by an additive congruence relation is
an AddMonoid
.
Equations
- AddCon.addZeroClass c = AddZeroClass.mk (_ : ∀ (x : AddCon.Quotient c), 0 + x = x) (_ : ∀ (x : AddCon.Quotient c), x + 0 = x)
The quotient of a monoid by a congruence relation is a monoid.
Equations
- Con.mulOneClass c = MulOneClass.mk (_ : ∀ (x : Con.Quotient c), 1 * x = x) (_ : ∀ (x : Con.Quotient c), x * 1 = x)
The 1 of the quotient of a monoid by a congruence relation is the equivalence class of the monoid's 1.
The AddSubmonoid
of M × M
defined by an additive congruence
relation on an AddMonoid
M
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The submonoid of M × M
defined by a congruence relation on a monoid M
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The additive congruence relation on an AddMonoid
M
from
an add_submonoid
of M × M
for which membership is an equivalence relation.
Equations
Instances For
The congruence relation on a monoid M
from a submonoid of M × M
for which membership
is an equivalence relation.
Equations
Instances For
Coercion from a congruence relation c
on an AddMonoid
M
to the add_submonoid
of M × M
whose elements are (x, y)
such that x
is related to y
by c
.
Equations
- AddCon.toAddSubmonoid = { coe := fun c => ↑c }
Coercion from a congruence relation c
on a monoid M
to the submonoid of M × M
whose
elements are (x, y)
such that x
is related to y
by c
.
Equations
- Con.toSubmonoid = { coe := fun c => ↑c }
The kernel of an AddMonoid
homomorphism as an additive congruence relation.
Equations
- AddCon.ker f = AddCon.addKer ↑f (_ : ∀ (x y : M), ↑f (x + y) = ↑f x + ↑f y)
Instances For
The kernel of a monoid homomorphism as a congruence relation.
Instances For
The definition of the additive congruence relation defined by an
AddMonoid
homomorphism's kernel.
The definition of the congruence relation defined by a monoid homomorphism's kernel.
There exists an element of the quotient of an AddMonoid
by a congruence relation
(namely 0).
Equations
- AddCon.Quotient.inhabited = { default := ↑0 }
There exists an element of the quotient of a monoid by a congruence relation (namely 1).
Equations
- Con.Quotient.inhabited = { default := ↑1 }
The natural homomorphism from an AddMonoid
to its quotient by an additive
congruence relation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The natural homomorphism from a monoid to its quotient by a congruence relation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The kernel of the natural homomorphism from an AddMonoid
to its
quotient by an additive congruence relation c
equals c
.
The kernel of the natural homomorphism from a monoid to its quotient by a congruence
relation c
equals c
.
The natural homomorphism from an AddMonoid
to its quotient by a congruence
relation is surjective.
The natural homomorphism from a monoid to its quotient by a congruence relation is surjective.
Given an AddMonoid
homomorphism f : N → M
and an additive congruence relation
c
on M
, the additive congruence relation induced on N
by f
equals the kernel of c
's
quotient homomorphism composed with f
.
Given a monoid homomorphism f : N → M
and a congruence relation c
on M
, the congruence
relation induced on N
by f
equals the kernel of c
's quotient homomorphism composed with
f
.
The homomorphism on the quotient of an AddMonoid
by an additive congruence
relation c
induced by a homomorphism constant on c
's equivalence classes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The homomorphism on the quotient of a monoid by a congruence relation c
induced by a
homomorphism constant on c
's equivalence classes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The diagram describing the universal property for quotients of AddMonoid
s
commutes.
The diagram describing the universal property for quotients of monoids commutes.
The diagram describing the universal property for quotients of
AddMonoid
s commutes.
The diagram describing the universal property for quotients of monoids commutes.
The diagram describing the universal property for quotients of
AddMonoid
s commutes.
The diagram describing the universal property for quotients of monoids commutes.
Given a homomorphism f
from the quotient of an AddMonoid
by an
additive congruence relation, f
equals the homomorphism on the quotient induced by f
composed
with the natural map from the AddMonoid
to the quotient.
Given a homomorphism f
from the quotient of a monoid by a congruence relation, f
equals the
homomorphism on the quotient induced by f
composed with the natural map from the monoid to
the quotient.
Homomorphisms on the quotient of an AddMonoid
by an additive congruence relation
are equal if they are equal on elements that are coercions from the AddMonoid
.
Homomorphisms on the quotient of a monoid by a congruence relation are equal if they are equal on elements that are coercions from the monoid.
The uniqueness part of the universal property for quotients of AddMonoid
s.
The uniqueness part of the universal property for quotients of monoids.
Given an additive congruence relation c
on an AddMonoid
and a homomorphism f
constant on c
's equivalence classes, f
has the same image as the homomorphism that f
induces
on the quotient.
Equations
- AddCon.lift_range.match_1 x motive x h_1 = Exists.casesOn x fun w h => h_1 w h
Instances For
Given a congruence relation c
on a monoid and a homomorphism f
constant on c
's
equivalence classes, f
has the same image as the homomorphism that f
induces on the
quotient.
Surjective AddMonoid
homomorphisms constant on an additive congruence
relation c
's equivalence classes induce a surjective homomorphism on c
's quotient.
Surjective monoid homomorphisms constant on a congruence relation c
's equivalence classes
induce a surjective homomorphism on c
's quotient.
Given an AddMonoid
homomorphism f
from M
to P
, the kernel of f
is the unique additive congruence relation on M
whose induced map from the quotient of M
to P
is injective.
Given a monoid homomorphism f
from M
to P
, the kernel of f
is the unique congruence
relation on M
whose induced map from the quotient of M
to P
is injective.
The homomorphism induced on the quotient of an AddMonoid
by the kernel
of an AddMonoid
homomorphism.
Equations
- AddCon.kerLift f = AddCon.lift (AddCon.ker f) f (AddCon.kerLift.proof_1 f)
Instances For
The homomorphism induced on the quotient of a monoid by the kernel of a monoid homomorphism.
Equations
- Con.kerLift f = Con.lift (Con.ker f) f (Con.kerLift.proof_1 f)
Instances For
The diagram described by the universal property for quotients
of AddMonoid
s, when the additive congruence relation is the kernel of the homomorphism,
commutes.
The diagram described by the universal property for quotients of monoids, when the congruence relation is the kernel of the homomorphism, commutes.
Given an AddMonoid
homomorphism f
, the induced homomorphism
on the quotient by f
's kernel has the same image as f
.
Given a monoid homomorphism f
, the induced homomorphism on the quotient by f
's kernel has
the same image as f
.
An AddMonoid
homomorphism f
induces an injective homomorphism on the quotient
by f
's kernel.
A monoid homomorphism f
induces an injective homomorphism on the quotient by f
's kernel.
Given additive congruence relations c, d
on an AddMonoid
such that d
contains c
, d
's quotient map induces a homomorphism from the quotient by c
to the quotient
by d
.
Equations
- AddCon.map c d h = AddCon.lift c (AddCon.mk' d) (AddCon.map.proof_1 c d h)
Instances For
Given congruence relations c, d
on a monoid such that d
contains c
, d
's quotient
map induces a homomorphism from the quotient by c
to the quotient by d
.
Equations
- Con.map c d h = Con.lift c (Con.mk' d) (Con.map.proof_1 c d h)
Instances For
Given additive congruence relations c, d
on an AddMonoid
such that d
contains c
, the definition of the homomorphism from the quotient by c
to the quotient by d
induced by d
's quotient map.
Given congruence relations c, d
on a monoid such that d
contains c
, the definition of
the homomorphism from the quotient by c
to the quotient by d
induced by d
's quotient
map.
The first isomorphism theorem for AddMonoid
s.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- AddCon.quotientKerEquivRange.match_1 f motive x h_1 = Subtype.casesOn x fun val property => Exists.casesOn property fun w h => h_1 val w h
Instances For
The first isomorphism theorem for monoids.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The first isomorphism theorem for AddMonoid
s in the case of a homomorphism
with right inverse.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The first isomorphism theorem for monoids in the case of a homomorphism with right inverse.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The first isomorphism theorem for AddMonoid
s in the case of a surjective
homomorphism.
For a computable
version, see AddCon.quotientKerEquivOfRightInverse
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The first isomorphism theorem for Monoids in the case of a surjective homomorphism.
For a computable
version, see Con.quotientKerEquivOfRightInverse
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The second isomorphism theorem for AddMonoid
s.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The second isomorphism theorem for monoids.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The third isomorphism theorem for AddMonoid
s.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The third isomorphism theorem for monoids.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- AddCon.nsmul.match_1 c motive x x x x h_1 h_2 = Nat.casesOn x (h_1 x x x) fun n => h_2 n x x x
Instances For
Equations
- AddCon.zero c = { zero := Quotient.mk'' 0 }
Equations
- Con.one c = { one := Quotient.mk'' 1 }
Equations
- AddCon.Quotient.nsmul c = { smul := fun n => Quotient.map' ((fun x x_1 => x • x_1) n) fun x x_1 => (_ : ↑c x x_1 → ↑c (n • x) (n • x_1)) }
Equations
- Con.instPowQuotientToMulToMulOneClassNat c = { pow := fun x n => Quotient.map' (fun x => x ^ n) (fun x x_1 => (_ : ↑c x x_1 → ↑c (x ^ n) (x_1 ^ n))) x }
The quotient of an AddSemigroup
by an additive congruence relation is
an AddSemigroup
.
Equations
- One or more equations did not get rendered due to their size.
The quotient of a semigroup by a congruence relation is a semigroup.
Equations
- One or more equations did not get rendered due to their size.
The quotient of an AddCommSemigroup
by an additive congruence relation is
an AddCommSemigroup
.
Equations
- One or more equations did not get rendered due to their size.
The quotient of a commutative semigroup by a congruence relation is a semigroup.
Equations
- One or more equations did not get rendered due to their size.
The quotient of a monoid by a congruence relation is a monoid.
Equations
- One or more equations did not get rendered due to their size.
The quotient of an AddCommMonoid
by an additive congruence
relation is an AddCommMonoid
.
Equations
- One or more equations did not get rendered due to their size.
The quotient of a CommMonoid
by a congruence relation is a CommMonoid
.
Equations
- One or more equations did not get rendered due to their size.
Sometimes, an additive group is defined as a quotient of a monoid
by an additive congruence relation.
Usually, the inverse operation is defined as Setoid.map f _
for some f
.
This lemma allows to avoid code duplication in the definition of the inverse operation:
instead of proving both ∀ x y, c x y → c (f x) (f y)
(to define the operation)
and ∀ x, c (f x + x) 0
(to prove the group laws), one can only prove the latter.
Sometimes, a group is defined as a quotient of a monoid by a congruence relation.
Usually, the inverse operation is defined as Setoid.map f _
for some f
.
This lemma allows to avoid code duplication in the definition of the inverse operation:
instead of proving both ∀ x y, c x y → c (f x) (f y)
(to define the operation)
and ∀ x, c (f x * x) 1
(to prove the group laws), one can only prove the latter.
Equations
- AddCon.zsmul.match_1 c motive x x x x h_1 h_2 = Int.casesOn x (fun a => h_1 a x x x) fun a => h_2 a x x x
Instances For
The negation induced on the quotient by an additive congruence relation on a type with a negation.
Equations
- AddCon.hasNeg c = { neg := Quotient.map' Neg.neg fun x x_1 => (_ : ↑c x x_1 → ↑c (-x) (-x_1)) }
The inversion induced on the quotient by a congruence relation on a type with an inversion.
Equations
- Con.hasInv c = { inv := Quotient.map' Inv.inv fun x x_1 => (_ : ↑c x x_1 → ↑c x⁻¹ x_1⁻¹) }
The subtraction induced on the quotient by an additive congruence relation on a type with a subtraction.
Equations
- AddCon.hasSub c = { sub := Quotient.map₂' (fun x x_1 => x - x_1) fun x x_1 h₁ x_2 x_3 => (_ : Setoid.r x_2 x_3 → ↑c (x - x_2) (x_1 - x_3)) }
The division induced on the quotient by a congruence relation on a type with a division.
Equations
- Con.hasDiv c = { div := Quotient.map₂' (fun x x_1 => x / x_1) fun x x_1 h₁ x_2 x_3 => (_ : Setoid.r x_2 x_3 → ↑c (x / x_2) (x_1 / x_3)) }
The integer scaling induced on the quotient by a congruence relation on a type with a subtraction.
Equations
- AddCon.Quotient.zsmul c = { smul := fun z => Quotient.map' ((fun x x_1 => x • x_1) z) fun x x_1 => (_ : ↑c x x_1 → ↑c (z • x) (z • x_1)) }
The integer power induced on the quotient by a congruence relation on a type with a division.
Equations
- Con.zpowinst c = { pow := fun x z => Quotient.map' (fun x => x ^ z) (fun x x_1 => (_ : Setoid.r x x_1 → ↑c (x ^ z) (x_1 ^ z))) x }
In order to define a function (Con.Quotient c)ˣ → α
on the units of Con.Quotient c
,
where c : Con M
is a multiplicative congruence on a monoid, it suffices to define a function f
that takes elements x y : M
with proofs of c (x * y) 1
and c (y * x) 1
, and returns an element
of α
provided that f x y _ _ = f x' y' _ _
whenever c x x'
and c y y'
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
In order to define a function (Con.Quotient c)ˣ → α
on the units of Con.Quotient c
,
where c : Con M
is a multiplicative congruence on a monoid, it suffices to define a function f
that takes elements x y : M
with proofs of c (x * y) 1
and c (y * x) 1
, and returns an element
of α
provided that f x y _ _ = f x' y' _ _
whenever c x x'
and c y y'
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- AddCon.instVAdd c = { vadd := fun a => Quotient.map' ((fun x x_1 => x +ᵥ x_1) a) fun x x_1 => (_ : ↑c x x_1 → ↑c (a +ᵥ x) (a +ᵥ x_1)) }
Equations
- Con.instSMul c = { smul := fun a => Quotient.map' ((fun x x_1 => x • x_1) a) fun x x_1 => (_ : ↑c x x_1 → ↑c (a • x) (a • x_1)) }
Equations
- One or more equations did not get rendered due to their size.