Free abelian groups #
The free abelian group on a type α, defined as the abelianisation of
the free group on α.
The free abelian group on α can be abstractly defined as the left adjoint of the
forgetful functor from abelian groups to types. Alternatively, one could define
it as the functions α → ℤ which send all but finitely many (a : α) to 0,
under pointwise addition. In this file, it is defined as the abelianisation
of the free group on α. All the constructions and theorems required to show
the adjointness of the construction and the forgetful functor are proved in this
file, but the category-theoretic adjunction statement is in
Mathlib/Algebra/Category/Grp/Adjunctions.lean.
Main definitions #
Here we use the following variables: (α β : Type*) (A : Type*) [CommGroup A]
FreeCommGroup α: the free abelian group on a typeα. As an abelian group it isα →₀ ℤ, the functions fromαtoℤsuch that all but finitely many elements get mapped to zero, however this is not how it is implemented.lift f : FreeCommGroup α →+ A: the group homomorphism induced by the mapf : α → A.map (f : α → β) : FreeCommGroup α →* FreeCommGroup β: functoriality ofFreeCommGroup.instance [Monoid α] : Semigroup (FreeCommGroup α)instance [CommMonoid α] : CommRing (FreeCommGroup α)
Implementation details #
The definitions are
def FreeCommGroup : Type u := Group.Abelianization (FreeGroup α) and
def FreeAddCommGroup : Type u := AddGroup.Abelianization (FreeAddGroup α),
the latter generated from the former by to_additive. The two are related by
FreeCommGroup.freeCommGroupEquivMultiplicative and
FreeAddCommGroup.freeAddCommGroupEquivAdditive.
Chris Hughes has suggested that this all be rewritten in terms of Finsupp.
Johan Commelin has written all the API relating the definition to Finsupp
in Mathlib/Algebra/FreeAbelianGroup/Finsupp.lean.
The lemmas map_pure, map_of, map_one, map_mul, map_inv and map_div
are proved about the Functor.map <$> construction, and need α and β to
be in the same universe. But
FreeCommGroup.map (f : α → β) is defined to be the Group
homomorphism FreeCommGroup α →* FreeCommGroup β (with α and β now
allowed to be in different universes), so (map f).map_mul etc.
can be used to prove that FreeCommGroup.map preserves multiplication. The
functions map_id, map_id_apply, map_comp, map_comp_apply and map_of_apply
are about FreeCommGroup.map.
If α is a type, then FreeCommGroup α is the free abelian group generated by α. This is an
abelian group equipped with a function FreeCommGroup.of : α → FreeCommGroup α which has the
following universal property: if G is any abelian group, and f : α → G is any function, then
this function is the composite of FreeCommGroup.of and a unique group homomorphism
FreeCommGroup.lift f : FreeCommGroup α →* G.
A typical element of FreeCommGroup α is a formal product of elements of α and their formal
inverses. For example if x and y are terms of type α then x * x * x * y⁻¹ is a "typical"
element of FreeCommGroup α. In particular if α is empty then FreeCommGroup α is isomorphic to
the trivial group, and if α has one term then FreeCommGroup α is isomorphic to
Multiplicative ℤ. One can think of FreeCommGroup α as the functions α →₀ ℤ with finite
support, and multiplication given by pointwise addition.
Equations
Instances For
If α is a type, then FreeAddCommGroup α is the free additive abelian group generated by α.
This is an abelian group equipped with a function FreeAddCommGroup.of : α → FreeAddCommGroup α
which has the following universal property: if G is any additive abelian group, and f : α → G is
any function, then this function is the composite of FreeAddCommGroup.of and a unique group
homomorphism FreeAddCommGroup.lift f : FreeAddCommGroup α →+ G.
A typical element of FreeAddCommGroup α is a formal sum of elements of α and their formal
inverses. For example if x and y are terms of type α then x + x + x - y is a "typical"
element of FreeAddCommGroup α. In particular if α is empty then FreeAddCommGroup α is
isomorphic to the trivial group, and if α has one term then FreeAddCommGroup α is isomorphic to
ℤ. One can think of FreeAddCommGroup α as the functions α →₀ ℤ with finite support, and
addition given pointwise.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- instInhabitedFreeCommGroup α = { default := 1 }
Equations
- instInhabitedFreeAddCommGroup α = { default := 0 }
The map FreeCommGroup α →* A induced by a map of types α → A.
Instances For
The map FreeAdCommGroup α →+ A induced by a map of types α → A.
Instances For
Equations
- FreeCommGroup.instUniqueOfIsEmpty = { toInhabited := instInhabitedFreeCommGroup α, uniq := ⋯ }
Equations
- FreeAddCommGroup.instUniqueOfIsEmpty = { toInhabited := instInhabitedFreeAddCommGroup α, uniq := ⋯ }
Multiplicative free commutative groups are isomorphic to Multiplicative additive free
commutative groups.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Additive free commutative groups are isomorphic to Additive multiplicative free
commutative groups.
Equations
- One or more equations did not get rendered due to their size.
Instances For
FreeCommGroup.lift is an isomorphism of groups.
Equations
- FreeCommGroup.liftMulEquiv = { toEquiv := FreeCommGroup.lift, map_mul' := ⋯ }
Instances For
FreeAddCommGroup.lift is an isomorphism of additive groups.
Equations
- FreeAddCommGroup.liftAddEquiv = { toEquiv := FreeAddCommGroup.lift, map_add' := ⋯ }
Instances For
If g : FreeCommGroup X and A is an abelian group then liftMonoidHom g is the group
homomorphism sending a function X → A to the term of type A corresponding to the evaluation of
the induced map FreeCommGroup X → A at g.
Equations
- FreeCommGroup.liftMonoidHom β a = MonoidHom.mk' (fun (f : α → β) => (FreeCommGroup.lift f) a) ⋯
Instances For
If g : FreeAddCommGroup X and A is an additive abelian group then liftAddMonoidHom g is
the additive group homomorphism sending a function X → A to the term of type A corresponding to
the evaluation of the induced map FreeAddCommGroup X → A at g.
Equations
- FreeAddCommGroup.liftAddMonoidHom β a = AddMonoidHom.mk' (fun (f : α → β) => (FreeAddCommGroup.lift f) a) ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
If f : FreeCommGroup (α → β), then f <*> is a multiplicative morphism
FreeCommGroup α →* FreeCommGroup β.
Equations
- f.seqGroupHom = MonoidHom.mk' (fun (x : FreeCommGroup α) => f <*> x) ⋯
Instances For
If f : FreeAddCommGroup (α → β), then f <*> is an additive morphism
FreeAddCommGroup α →+ FreeAddCommGroup β.
Equations
- f.seqAddGroupHom = AddMonoidHom.mk' (fun (x : FreeAddCommGroup α) => f <*> x) ⋯
Instances For
The group homomorphism FreeCommGroup α →+ FreeCommGroup β induced from a map α → β.
Equations
Instances For
The additive group homomorphism FreeAddCommGroup α →+ FreeAddCommGroup β induced from a
map α → β.
Equations
Instances For
Isomorphic types have isomorphic free abelian groups.
Equations
- FreeCommGroup.equivOfEquiv f = { toFun := ⇑(FreeCommGroup.map ⇑f), invFun := ⇑(FreeCommGroup.map ⇑f.symm), left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯ }
Instances For
Isomorphic types have isomorphic free abelian groups.
Equations
- FreeAddCommGroup.equivOfEquiv f = { toFun := ⇑(FreeAddCommGroup.map ⇑f), invFun := ⇑(FreeAddCommGroup.map ⇑f.symm), left_inv := ⋯, right_inv := ⋯, map_add' := ⋯ }
Instances For
The free abelian group on a type with one term is isomorphic to ℤ.
Equations
- FreeAddCommGroup.uniqueEquiv T = { toFun := ⇑(FreeAddCommGroup.lift fun (x : T) => 1), invFun := fun (n : ℤ) => n • FreeAddCommGroup.of default, left_inv := ⋯, right_inv := ⋯, map_add' := ⋯ }
Instances For
This section defines a ring structure on FreeAddCommGroup α when α is a monoid. It is deprecated
in favor of using MonoidAlgebra ℤ α. MonoidAlgebra is defined in
Mathlib.Algebra.MonoidAlgebra.Defs.
Also deprecated is FreeAbelianGroup, as this is now FreeAddCommGroup. In particular, definitions
that were under the FreeAbelianGroup namespace are now deprecated in favor of the corresponding
ones in the FreeAddCommGroup namespace.
Equations
- FreeAbelianGroup.mul α = { mul := fun (x : FreeAddCommGroup α) => ⇑(FreeAddCommGroup.lift fun (x₂ : α) => (FreeAddCommGroup.lift fun (x₁ : α) => FreeAddCommGroup.of (x₁ * x₂)) x) }
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
Equations
- FreeAbelianGroup.one α = { one := FreeAddCommGroup.of 1 }
Instances For
Equations
- FreeAbelianGroup.nonUnitalRing α = { toNonUnitalNonAssocRing := FreeAbelianGroup.nonUnitalNonAssocRing, mul_assoc := ⋯ }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
FreeAddCommGroup.of is a MonoidHom when α is a Monoid.
Equations
- FreeAbelianGroup.ofMulHom = { toFun := FreeAddCommGroup.of, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Equations
- FreeAbelianGroup.instCommRingFreeAddCommGroupOfCommMonoid α = { toRing := FreeAbelianGroup.ring α, mul_comm := ⋯ }
Instances For
Alias of FreeAddCommGroup.
If α is a type, then FreeAddCommGroup α is the free additive abelian group generated by α.
This is an abelian group equipped with a function FreeAddCommGroup.of : α → FreeAddCommGroup α
which has the following universal property: if G is any additive abelian group, and f : α → G is
any function, then this function is the composite of FreeAddCommGroup.of and a unique group
homomorphism FreeAddCommGroup.lift f : FreeAddCommGroup α →+ G.
A typical element of FreeAddCommGroup α is a formal sum of elements of α and their formal
inverses. For example if x and y are terms of type α then x + x + x - y is a "typical"
element of FreeAddCommGroup α. In particular if α is empty then FreeAddCommGroup α is
isomorphic to the trivial group, and if α has one term then FreeAddCommGroup α is isomorphic to
ℤ. One can think of FreeAddCommGroup α as the functions α →₀ ℤ with finite support, and
addition given pointwise.
Equations
Instances For
Alias of FreeAddCommGroup.of.
The canonical map from α to FreeAddCommGroup α.
Equations
Instances For
Alias of FreeAddCommGroup.lift.
The map FreeAdCommGroup α →+ A induced by a map of types α → A.
Equations
Instances For
Alias of FreeAddCommGroup.lift_apply_of.
Alias of FreeAddCommGroup.lift_unique.
Alias of FreeAddCommGroup.lift_ext.
Alias of FreeAddCommGroup.lift_comp_apply.
Alias of FreeAddCommGroup.of_injective.
Alias of FreeAddCommGroup.of_ne_zero.
Alias of FreeAddCommGroup.zero_ne_of.
Alias of FreeAddCommGroup.induction_on.
Alias of FreeAddCommGroup.lift_add_apply.
Alias of FreeAddCommGroup.lift_add.
Alias of FreeAddCommGroup.liftAddEquiv.
FreeAddCommGroup.lift is an isomorphism of additive groups.
Instances For
Alias of FreeAddCommGroup.liftAddEquiv_symm_apply.
Alias of FreeAddCommGroup.liftAddMonoidHom_apply.
Alias of FreeAddCommGroup.lift_ext_iff.
Alias of FreeAddCommGroup.liftAddMonoidHom.
If g : FreeAddCommGroup X and A is an additive abelian group then liftAddMonoidHom g is
the additive group homomorphism sending a function X → A to the term of type A corresponding to
the evaluation of the induced map FreeAddCommGroup X → A at g.
Instances For
Alias of FreeAddCommGroup.lift_neg.
Alias of FreeAddCommGroup.lift_neg_apply.
Alias of FreeAddCommGroup.induction_on'.
Alias of FreeAddCommGroup.map_pure.
Alias of FreeAddCommGroup.map_zero.
Alias of FreeAddCommGroup.map_add.
Alias of FreeAddCommGroup.map_neg.
Alias of FreeAddCommGroup.map_sub.
Alias of FreeAddCommGroup.map_of.
Alias of FreeAddCommGroup.pure_bind.
Alias of FreeAddCommGroup.zero_bind.
Alias of FreeAddCommGroup.add_bind.
Alias of FreeAddCommGroup.neg_bind.
Alias of FreeAddCommGroup.sub_bind.
Alias of FreeAddCommGroup.pure_seq.
Alias of FreeAddCommGroup.zero_seq.
Alias of FreeAddCommGroup.add_seq.
Alias of FreeAddCommGroup.neg_seq.
Alias of FreeAddCommGroup.sub_seq.
Alias of FreeAddCommGroup.seqAddGroupHom.
If f : FreeAddCommGroup (α → β), then f <*> is an additive morphism
FreeAddCommGroup α →+ FreeAddCommGroup β.
Instances For
Alias of FreeAddCommGroup.seq_zero.
Alias of FreeAddCommGroup.seq_add.
Alias of FreeAddCommGroup.seq_neg.
Alias of FreeAddCommGroup.seq_sub.
Alias of FreeAddCommGroup.map.
The additive group homomorphism FreeAddCommGroup α →+ FreeAddCommGroup β induced from a
map α → β.
Equations
Instances For
Alias of FreeAddCommGroup.lift_comp.
Alias of FreeAddCommGroup.map_id.
Alias of FreeAddCommGroup.map_id_apply.
Alias of FreeAddCommGroup.map_comp.
Alias of FreeAddCommGroup.map_comp_apply.
Alias of FreeAddCommGroup.map_of_apply.
Alias of FreeAddCommGroup.uniqueEquiv.
The free abelian group on a type with one term is isomorphic to ℤ.
Instances For
Alias of FreeAddCommGroup.equivOfEquiv.
Isomorphic types have isomorphic free abelian groups.