Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2020 Scott Morrison. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Scott Morrison | |
-/ | |
import representation_theory.basic | |
import representation_theory.Action | |
import algebra.category.Module.abelian | |
import algebra.category.Module.colimits | |
import algebra.category.Module.monoidal | |
/-! | |
If `V : Rep k G`, there is a coercion that allows you to treat `V` as a type, | |
and this type comes equipped with a `module k V` instance. | |
Also `V.Ο` gives the homomorphism `G β* (V ββ[k] V)`. | |
Conversely, given a homomorphism `Ο : G β* (V ββ[k] V)`, | |
you can construct the bundled representation as `Rep.of Ο`. | |
We construct the categorical equivalence `Rep k G β Module (monoid_algebra k G)`. | |
We verify that `Rep k G` is a `k`-linear abelian symmetric monoidal category with all (co)limits. | |
-/ | |
universes u | |
open category_theory | |
open category_theory.limits | |
/-- The category of `k`-linear representations of a monoid `G`. -/ | |
@[derive [large_category, concrete_category, has_limits, has_colimits, | |
preadditive, abelian]] | |
abbreviation Rep (k G : Type u) [ring k] [monoid G] := | |
Action (Module.{u} k) (Mon.of G) | |
instance (k G : Type u) [comm_ring k] [monoid G] : linear k (Rep k G) := | |
by apply_instance | |
namespace Rep | |
variables {k G : Type u} [comm_ring k] [monoid G] | |
instance : has_coe_to_sort (Rep k G) (Type u) := concrete_category.has_coe_to_sort _ | |
instance (V : Rep k G) : add_comm_group V := | |
by { change add_comm_group ((forgetβ (Rep k G) (Module k)).obj V), apply_instance, } | |
instance (V : Rep k G) : module k V := | |
by { change module k ((forgetβ (Rep k G) (Module k)).obj V), apply_instance, } | |
/-- | |
Specialize the existing `Action.Ο`, changing the type to `representation k G V`. | |
-/ | |
def Ο (V : Rep k G) : representation k G V := V.Ο | |
/-- Lift an unbundled representation to `Rep`. -/ | |
def of {V : Type u} [add_comm_group V] [module k V] (Ο : G β* (V ββ[k] V)) : Rep k G := | |
β¨Module.of k V, Οβ© | |
@[simp] | |
lemma coe_of {V : Type u} [add_comm_group V] [module k V] (Ο : G β* (V ββ[k] V)) : | |
(of Ο : Type u) = V := rfl | |
@[simp] lemma of_Ο {V : Type u} [add_comm_group V] [module k V] (Ο : G β* (V ββ[k] V)) : | |
(of Ο).Ο = Ο := rfl | |
-- Verify that limits are calculated correctly. | |
noncomputable example : preserves_limits (forgetβ (Rep k G) (Module.{u} k)) := | |
by apply_instance | |
noncomputable example : preserves_colimits (forgetβ (Rep k G) (Module.{u} k)) := | |
by apply_instance | |
end Rep | |
/-! | |
# The categorical equivalence `Rep k G β Module.{u} (monoid_algebra k G)`. | |
-/ | |
namespace Rep | |
variables {k G : Type u} [comm_ring k] [monoid G] | |
-- Verify that the symmetric monoidal structure is available. | |
example : symmetric_category (Rep k G) := by apply_instance | |
example : monoidal_preadditive (Rep k G) := by apply_instance | |
example : monoidal_linear k (Rep k G) := by apply_instance | |
noncomputable theory | |
/-- Auxilliary lemma for `to_Module_monoid_algebra`. -/ | |
lemma to_Module_monoid_algebra_map_aux {k G : Type*} [comm_ring k] [monoid G] | |
(V W : Type*) [add_comm_group V] [add_comm_group W] [module k V] [module k W] | |
(Ο : G β* V ββ[k] V) (Ο : G β* W ββ[k] W) | |
(f : V ββ[k] W) (w : β (g : G), f.comp (Ο g) = (Ο g).comp f) | |
(r : monoid_algebra k G) (x : V) : | |
f ((((monoid_algebra.lift k G (V ββ[k] V)) Ο) r) x) = | |
(((monoid_algebra.lift k G (W ββ[k] W)) Ο) r) (f x) := | |
begin | |
apply monoid_algebra.induction_on r, | |
{ intro g, | |
simp only [one_smul, monoid_algebra.lift_single, monoid_algebra.of_apply], | |
exact linear_map.congr_fun (w g) x, }, | |
{ intros g h gw hw, simp only [map_add, add_left_inj, linear_map.add_apply, hw, gw], }, | |
{ intros r g w, | |
simp only [alg_hom.map_smul, w, ring_hom.id_apply, | |
linear_map.smul_apply, linear_map.map_smulββ], } | |
end | |
/-- Auxilliary definition for `to_Module_monoid_algebra`. -/ | |
def to_Module_monoid_algebra_map {V W : Rep k G} (f : V βΆ W) : | |
Module.of (monoid_algebra k G) V.Ο.as_module βΆ Module.of (monoid_algebra k G) W.Ο.as_module := | |
{ map_smul' := Ξ» r x, to_Module_monoid_algebra_map_aux V.V W.V V.Ο W.Ο f.hom f.comm r x, | |
..f.hom, } | |
/-- Functorially convert a representation of `G` into a module over `monoid_algebra k G`. -/ | |
def to_Module_monoid_algebra : Rep k G β₯€ Module.{u} (monoid_algebra k G) := | |
{ obj := Ξ» V, Module.of _ V.Ο.as_module , | |
map := Ξ» V W f, to_Module_monoid_algebra_map f, } | |
/-- Functorially convert a module over `monoid_algebra k G` into a representation of `G`. -/ | |
def of_Module_monoid_algebra : Module.{u} (monoid_algebra k G) β₯€ Rep k G := | |
{ obj := Ξ» M, Rep.of (representation.of_module k G M), | |
map := Ξ» M N f, | |
{ hom := | |
{ map_smul' := Ξ» r x, f.map_smul (algebra_map k _ r) x, | |
..f }, | |
comm' := Ξ» g, by { ext, apply f.map_smul, }, }, }. | |
lemma of_Module_monoid_algebra_obj_coe (M : Module.{u} (monoid_algebra k G)) : | |
(of_Module_monoid_algebra.obj M : Type u) = restrict_scalars k (monoid_algebra k G) M := rfl | |
lemma of_Module_monoid_algebra_obj_Ο (M : Module.{u} (monoid_algebra k G)) : | |
(of_Module_monoid_algebra.obj M).Ο = representation.of_module k G M := rfl | |
/-- Auxilliary definition for `equivalence_Module_monoid_algebra`. -/ | |
def counit_iso_add_equiv {M : Module.{u} (monoid_algebra k G)} : | |
((of_Module_monoid_algebra β to_Module_monoid_algebra).obj M) β+ M := | |
begin | |
dsimp [of_Module_monoid_algebra, to_Module_monoid_algebra], | |
refine (representation.of_module k G β₯M).as_module_equiv.trans (restrict_scalars.add_equiv _ _ _), | |
end | |
/-- Auxilliary definition for `equivalence_Module_monoid_algebra`. -/ | |
def unit_iso_add_equiv {V : Rep k G} : | |
V β+ ((to_Module_monoid_algebra β of_Module_monoid_algebra).obj V) := | |
begin | |
dsimp [of_Module_monoid_algebra, to_Module_monoid_algebra], | |
refine V.Ο.as_module_equiv.symm.trans _, | |
exact (restrict_scalars.add_equiv _ _ _).symm, | |
end | |
/-- Auxilliary definition for `equivalence_Module_monoid_algebra`. -/ | |
def counit_iso (M : Module.{u} (monoid_algebra k G)) : | |
(of_Module_monoid_algebra β to_Module_monoid_algebra).obj M β M := | |
linear_equiv.to_Module_iso' | |
{ map_smul' := Ξ» r x, begin | |
dsimp [counit_iso_add_equiv], | |
simp, | |
end, | |
..counit_iso_add_equiv, } | |
lemma unit_iso_comm (V : Rep k G) (g : G) (x : V) : | |
unit_iso_add_equiv (((V.Ο) g).to_fun x) = | |
(((of_Module_monoid_algebra.obj (to_Module_monoid_algebra.obj V)).Ο) g).to_fun | |
(unit_iso_add_equiv x) := | |
begin | |
dsimp [unit_iso_add_equiv, of_Module_monoid_algebra, to_Module_monoid_algebra], | |
simp only [add_equiv.apply_eq_iff_eq, add_equiv.apply_symm_apply, | |
representation.as_module_equiv_symm_map_rho, representation.of_module_as_module_act], | |
end | |
/-- Auxilliary definition for `equivalence_Module_monoid_algebra`. -/ | |
def unit_iso (V : Rep k G) : | |
V β ((to_Module_monoid_algebra β of_Module_monoid_algebra).obj V) := | |
Action.mk_iso (linear_equiv.to_Module_iso' | |
{ map_smul' := Ξ» r x, begin | |
dsimp [unit_iso_add_equiv], | |
simp only [representation.as_module_equiv_symm_map_smul, | |
restrict_scalars.add_equiv_symm_map_algebra_map_smul], | |
end, | |
..unit_iso_add_equiv, }) | |
(Ξ» g, by { ext, apply unit_iso_comm, }) | |
/-- The categorical equivalence `Rep k G β Module (monoid_algebra k G)`. -/ | |
def equivalence_Module_monoid_algebra : Rep k G β Module.{u} (monoid_algebra k G) := | |
{ functor := to_Module_monoid_algebra, | |
inverse := of_Module_monoid_algebra, | |
unit_iso := nat_iso.of_components (Ξ» V, unit_iso V) (by tidy), | |
counit_iso := nat_iso.of_components (Ξ» M, counit_iso M) (by tidy), } | |
-- TODO Verify that the equivalence with `Module (monoid_algebra k G)` is a monoidal functor. | |
end Rep | |