mathlib documentation

group_theory.free_abelian_group

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 algebra.category.Group.adjunctions .

Main definitions #

Here we use the following variables: (α β : Type*) (A : Type*) [add_comm_group A]

It has been suggested that we would be better off refactoring this file and using finsupp instead.

Implementation issues #

The definition is def free_abelian_group : Type u := additive $ abelianization $ free_group α

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 the lean-liquid repo.

The lemmas map_pure, map_of, map_zero, map_add, map_neg and map_sub are proved about the functor.map <$> construction, and need α and β to be in the same universe. But free_abelian_group.map (f : α → β) is defined to be the add_group homomorphism free_abelian_group α →+ free_abelian_group β (with α and β now allowed to be in different universes), so (map f).map_add etc can be used to prove that free_abelian_group.map preserves addition. The functions map_id, map_id_apply, map_comp, map_comp_apply and map_of_apply are about free_abelian_group.map.

def free_abelian_group (α : Type u) :
Type u

The free abelian group on a type.

Equations
def free_abelian_group.of {α : Type u} (x : α) :

The canonical map from α to free_abelian_group α

Equations
def free_abelian_group.lift {α : Type u} {β : Type v} [add_comm_group β] :
(α → β) (free_abelian_group α →+ β)

The map free_abelian_group α →+ A induced by a map of types α → A.

Equations
@[simp]
theorem free_abelian_group.lift.of {α : Type u} {β : Type v} [add_comm_group β] (f : α → β) (x : α) :
theorem free_abelian_group.lift.unique {α : Type u} {β : Type v} [add_comm_group β] (f : α → β) (g : free_abelian_group α →+ β) (hg : ∀ (x : α), g (free_abelian_group.of x) = f x) {x : free_abelian_group α} :
@[ext]
theorem free_abelian_group.lift.ext {α : Type u} {β : Type v} [add_comm_group β] (g h : free_abelian_group α →+ β) (H : ∀ (x : α), g (free_abelian_group.of x) = h (free_abelian_group.of x)) :
g = h

See note [partially-applied ext lemmas].

theorem free_abelian_group.lift.map_hom {α : Type u_1} {β : Type u_2} {γ : Type u_3} [add_comm_group β] [add_comm_group γ] (a : free_abelian_group α) (f : α → β) (g : β →+ γ) :
theorem free_abelian_group.induction_on {α : Type u} {C : free_abelian_group α → Prop} (z : free_abelian_group α) (C0 : C 0) (C1 : ∀ (x : α), C (free_abelian_group.of x)) (Cn : ∀ (x : α), C (free_abelian_group.of x)C (-free_abelian_group.of x)) (Cp : ∀ (x y : free_abelian_group α), C xC yC (x + y)) :
C z
theorem free_abelian_group.lift.add' {α : Type u_1} {β : Type u_2} [add_comm_group β] (a : free_abelian_group α) (f g : α → β) :
@[simp]
def free_abelian_group.lift_add_group_hom {α : Type u_1} (β : Type u_2) [add_comm_group β] (a : free_abelian_group α) :
(α → β) →+ β

If g : free_abelian_group X and A is an abelian group then lift_add_group_hom 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 free_abelian_group X → A at g.

Equations
theorem free_abelian_group.is_add_group_hom_lift' {α : Type u_1} (β : Type u_2) [add_comm_group β] (a : free_abelian_group α) :
theorem free_abelian_group.induction_on' {α : Type u} {C : free_abelian_group α → Prop} (z : free_abelian_group α) (C0 : C 0) (C1 : ∀ (x : α), C (pure x)) (Cn : ∀ (x : α), C (pure x)C (-pure x)) (Cp : ∀ (x y : free_abelian_group α), C xC yC (x + y)) :
C z
@[simp]
theorem free_abelian_group.map_pure {α β : Type u} (f : α → β) (x : α) :
f <$> pure x = pure (f x)
@[simp]
theorem free_abelian_group.map_zero {α β : Type u} (f : α → β) :
f <$> 0 = 0
@[simp]
theorem free_abelian_group.map_add {α β : Type u} (f : α → β) (x y : free_abelian_group α) :
f <$> (x + y) = f <$> x + f <$> y
@[simp]
theorem free_abelian_group.map_neg {α β : Type u} (f : α → β) (x : free_abelian_group α) :
f <$> -x = -f <$> x
@[simp]
theorem free_abelian_group.map_sub {α β : Type u} (f : α → β) (x y : free_abelian_group α) :
f <$> (x - y) = f <$> x - f <$> y
@[simp]
theorem free_abelian_group.map_of {α β : Type u} (f : α → β) (y : α) :
@[simp]
theorem free_abelian_group.pure_bind {α β : Type u} (f : α → free_abelian_group β) (x : α) :
pure x >>= f = f x
@[simp]
theorem free_abelian_group.zero_bind {α β : Type u} (f : α → free_abelian_group β) :
0 >>= f = 0
@[simp]
theorem free_abelian_group.add_bind {α β : Type u} (f : α → free_abelian_group β) (x y : free_abelian_group α) :
x + y >>= f = (x >>= f) + (y >>= f)
@[simp]
theorem free_abelian_group.neg_bind {α β : Type u} (f : α → free_abelian_group β) (x : free_abelian_group α) :
-x >>= f = -(x >>= f)
@[simp]
theorem free_abelian_group.sub_bind {α β : Type u} (f : α → free_abelian_group β) (x y : free_abelian_group α) :
x - y >>= f = (x >>= f) - (y >>= f)
@[simp]
theorem free_abelian_group.pure_seq {α β : Type u} (f : α → β) (x : free_abelian_group α) :
pure f <*> x = f <$> x
@[simp]
theorem free_abelian_group.zero_seq {α β : Type u} (x : free_abelian_group α) :
0 <*> x = 0
@[simp]
theorem free_abelian_group.add_seq {α β : Type u} (f g : free_abelian_group (α → β)) (x : free_abelian_group α) :
f + g <*> x = (f <*> x) + (g <*> x)
@[simp]
theorem free_abelian_group.neg_seq {α β : Type u} (f : free_abelian_group (α → β)) (x : free_abelian_group α) :
-f <*> x = -(f <*> x)
@[simp]
theorem free_abelian_group.sub_seq {α β : Type u} (f g : free_abelian_group (α → β)) (x : free_abelian_group α) :
f - g <*> x = (f <*> x) - (g <*> x)
@[simp]
theorem free_abelian_group.seq_zero {α β : Type u} (f : free_abelian_group (α → β)) :
f <*> 0 = 0
@[simp]
theorem free_abelian_group.seq_add {α β : Type u} (f : free_abelian_group (α → β)) (x y : free_abelian_group α) :
f <*> x + y = (f <*> x) + (f <*> y)
@[simp]
theorem free_abelian_group.seq_neg {α β : Type u} (f : free_abelian_group (α → β)) (x : free_abelian_group α) :
f <*> -x = -(f <*> x)
@[simp]
theorem free_abelian_group.seq_sub {α β : Type u} (f : free_abelian_group (α → β)) (x y : free_abelian_group α) :
f <*> x - y = (f <*> x) - (f <*> y)
def free_abelian_group.map {α : Type u} {β : Type v} (f : α → β) :

The additive group homomorphism free_abelian_group α →+ free_abelian_group β induced from a map α → β

Equations
theorem free_abelian_group.lift_comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} [add_comm_group γ] (f : α → β) (g : β → γ) (x : free_abelian_group α) :
theorem free_abelian_group.map_comp {α : Type u} {β : Type v} {γ : Type w} {f : α → β} {g : β → γ} :
theorem free_abelian_group.map_comp_apply {α : Type u} {β : Type v} {γ : Type w} {f : α → β} {g : β → γ} (x : free_abelian_group α) :
@[simp]
theorem free_abelian_group.map_of_apply {α : Type u} {β : Type v} {f : α → β} (a : α) :
@[instance]
Equations
theorem free_abelian_group.mul_def {α : Type u} [monoid α] (x y : free_abelian_group α) :
x * y = (free_abelian_group.lift (λ (x₂ : α), (free_abelian_group.lift (λ (x₁ : α), free_abelian_group.of (x₁ * x₂))) x)) y
def free_abelian_group.lift_monoid {α : Type u} {R : Type u_1} [monoid α] [ring R] :

If f preserves multiplication, then so does lift f.

Equations
@[simp]
theorem free_abelian_group.one_def {α : Type u} [monoid α] :
theorem free_abelian_group.of_one {α : Type u} [monoid α] :
@[instance]
Equations

The free abelian group on a type with one term is isomorphic to .

Equations
def free_abelian_group.equiv_of_equiv {α : Type u_1} {β : Type u_2} (f : α β) :

Isomorphic types have isomorphic free abelian groups.

Equations