THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
The functor of forming finitely supported functions on a type with values in a [ring R]
is the left adjoint of
the forgetful functor from R
-modules to types.
The free functor Type u ⥤ Module R
sending a type X
to the
free R
-module with generators x : X
, implemented as the type X →₀ R
.
The free-forgetful adjunction for R-modules.
Equations
- Module.adj R = category_theory.adjunction.mk_of_hom_equiv {hom_equiv := λ (X : Type u) (M : Module R), (finsupp.lift ↥M R X).to_equiv.symm, hom_equiv_naturality_left_symm' := _, hom_equiv_naturality_right' := _}
Equations
- Module.category_theory.forget.category_theory.is_right_adjoint R = {left := Module.free R _inst_1, adj := Module.adj R _inst_1}
(Implementation detail) The unitor for free R
.
Equations
- Module.free.ε R = finsupp.lsingle punit.star
(Implementation detail) The tensorator for free R
.
Equations
- Module.free.μ R α β = (finsupp_tensor_finsupp' R α β).to_Module_iso
The free R-module functor is lax monoidal.
Equations
- Module.free.obj.category_theory.lax_monoidal R = {ε := Module.free.ε R _inst_1, μ := λ (X Y : Type u), (Module.free.μ R X Y).hom, μ_natural' := _, associativity' := _, left_unitality' := _, right_unitality' := _}
The free functor Type u ⥤ Module R
, as a monoidal functor.
Equations
- Module.monoidal_free R = {to_lax_monoidal_functor := {to_functor := (category_theory.lax_monoidal_functor.of (Module.free R).obj).to_functor, ε := (category_theory.lax_monoidal_functor.of (Module.free R).obj).ε, μ := (category_theory.lax_monoidal_functor.of (Module.free R).obj).μ, μ_natural' := _, associativity' := _, left_unitality' := _, right_unitality' := _}, ε_is_iso := _, μ_is_iso := _}
Free R C
is a type synonym for C
, which, given [comm_ring R]
and [category C]
,
we will equip with a category structure where the morphisms are formal R
-linear combinations
of the morphisms in C
.
Equations
- category_theory.Free R C = C
Instances for category_theory.Free
Consider an object of C
as an object of the R
-linear completion.
It may be preferable to use (Free.embedding R C).obj X
instead;
this functor can also be used to lift morphisms.
Equations
- category_theory.Free.of R X = X
Equations
- category_theory.category_Free R C = {to_category_struct := {to_quiver := {hom := λ (X Y : C), (X ⟶ Y) →₀ R}, id := λ (X : C), finsupp.single (𝟙 X) 1, comp := λ (X Y Z : C) (f : X ⟶ Y) (g : Y ⟶ Z), finsupp.sum f (λ (f' : X ⟶ Y) (s : R), finsupp.sum g (λ (g' : Y ⟶ Z) (t : R), finsupp.single (f' ≫ g') (s * t)))}, id_comp' := _, comp_id' := _, assoc' := _}
Equations
- category_theory.Free.category_theory.preadditive R C = {hom_group := λ (X Y : category_theory.Free R C), finsupp.add_comm_group, add_comp' := _, comp_add' := _}
Equations
- category_theory.Free.category_theory.linear R C = {hom_module := λ (X Y : category_theory.Free R C), finsupp.module (X ⟶ Y) R, smul_comp' := _, comp_smul' := _}
A category embeds into its R
-linear completion.
Equations
- category_theory.Free.embedding R C = {obj := λ (X : C), X, map := λ (X Y : C) (f : X ⟶ Y), finsupp.single f 1, map_id' := _, map_comp' := _}
A functor to an R
-linear category lifts to a functor from its R
-linear completion.
Equations
- category_theory.Free.lift R F = {obj := λ (X : category_theory.Free R C), F.obj X, map := λ (X Y : category_theory.Free R C) (f : X ⟶ Y), finsupp.sum f (λ (f' : X ⟶ Y) (r : R), r • F.map f'), map_id' := _, map_comp' := _}
Instances for category_theory.Free.lift
The embedding into the R
-linear completion, followed by the lift,
is isomorphic to the original functor.
Equations
- category_theory.Free.embedding_lift_iso R F = category_theory.nat_iso.of_components (λ (X : C), category_theory.iso.refl ((category_theory.Free.embedding R C ⋙ category_theory.Free.lift R F).obj X)) _
Two R
-linear functors out of the R
-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
Equations
- category_theory.Free.ext R α = category_theory.nat_iso.of_components (λ (X : category_theory.Free R C), α.app X) _
Free.lift
is unique amongst R
-linear functors Free R C ⥤ D
which compose with embedding ℤ C
to give the original functor.