|
| 1 | +/- |
| 2 | +Copyright (c) 2020 Scott Morrison. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Scott Morrison |
| 5 | +-/ |
| 6 | +import algebra.category.Module.monoidal |
| 7 | +import algebra.category.Algebra.basic |
| 8 | +import category_theory.monoidal.internal |
| 9 | + |
| 10 | + |
| 11 | +/-! |
| 12 | +# `Mon_ (Module R) ≌ Algebra R` |
| 13 | +
|
| 14 | +The category of internal monoid objects in `Module R` |
| 15 | +is equivalent to the category of "native" bundled `R`-algebras. |
| 16 | +
|
| 17 | +Moreover, this equivalence is compatible with the forgetful functors to `Module R`. |
| 18 | +-/ |
| 19 | + |
| 20 | +universes v u |
| 21 | + |
| 22 | +open category_theory |
| 23 | +open linear_map |
| 24 | + |
| 25 | +open_locale tensor_product |
| 26 | + |
| 27 | +namespace Module |
| 28 | + |
| 29 | +variables {R : Type u} [comm_ring R] |
| 30 | + |
| 31 | +namespace Mon_Module_equivalence_Algebra |
| 32 | + |
| 33 | +@[simps] |
| 34 | +instance (A : Mon_ (Module R)) : ring A.X := |
| 35 | +{ one := A.one (1 : R), |
| 36 | + mul := λ x y, A.mul (x ⊗ₜ y), |
| 37 | + one_mul := λ x, by { convert lcongr_fun A.one_mul ((1 : R) ⊗ₜ x), simp, }, |
| 38 | + mul_one := λ x, by { convert lcongr_fun A.mul_one (x ⊗ₜ (1 : R)), simp, }, |
| 39 | + mul_assoc := λ x y z, by convert lcongr_fun A.mul_assoc ((x ⊗ₜ y) ⊗ₜ z), |
| 40 | + left_distrib := λ x y z, |
| 41 | + begin |
| 42 | + convert A.mul.map_add (x ⊗ₜ y) (x ⊗ₜ z), |
| 43 | + rw ←tensor_product.tmul_add, |
| 44 | + refl, |
| 45 | + end, |
| 46 | + right_distrib := λ x y z, |
| 47 | + begin |
| 48 | + convert A.mul.map_add (x ⊗ₜ z) (y ⊗ₜ z), |
| 49 | + rw ←tensor_product.add_tmul, |
| 50 | + refl, |
| 51 | + end, |
| 52 | + ..(by apply_instance : add_comm_group A.X) } |
| 53 | + |
| 54 | +instance (A : Mon_ (Module R)) : algebra R A.X := |
| 55 | +{ map_zero' := A.one.map_zero, |
| 56 | + map_one' := rfl, |
| 57 | + map_mul' := λ x y, |
| 58 | + begin |
| 59 | + have h := lcongr_fun A.one_mul.symm (x ⊗ₜ (A.one y)), |
| 60 | + rwa [monoidal_category.left_unitor_hom_apply, ←A.one.map_smul] at h, |
| 61 | + end, |
| 62 | + commutes' := λ r a, |
| 63 | + begin dsimp, |
| 64 | + have h₁ := lcongr_fun A.one_mul (r ⊗ₜ a), |
| 65 | + have h₂ := lcongr_fun A.mul_one (a ⊗ₜ r), |
| 66 | + exact h₁.trans h₂.symm, |
| 67 | + end, |
| 68 | + smul_def' := λ r a, by { convert (lcongr_fun A.one_mul (r ⊗ₜ a)).symm, simp, }, |
| 69 | + ..A.one } |
| 70 | + |
| 71 | +@[simp] lemma algebra_map (A : Mon_ (Module R)) (r : R) : algebra_map R A.X r = A.one r := rfl |
| 72 | + |
| 73 | +/-- |
| 74 | +Converting a monoid object in `Module R` to a bundled algebra. |
| 75 | +-/ |
| 76 | +@[simps] |
| 77 | +def functor : Mon_ (Module R) ⥤ Algebra R := |
| 78 | +{ obj := λ A, Algebra.of R A.X, |
| 79 | + map := λ A B f, |
| 80 | + { to_fun := f.hom, |
| 81 | + map_one' := lcongr_fun f.one_hom (1 : R), |
| 82 | + map_mul' := λ x y, lcongr_fun f.mul_hom (x ⊗ₜ y), |
| 83 | + commutes' := λ r, lcongr_fun f.one_hom r, |
| 84 | + ..(f.hom.to_add_monoid_hom) }, }. |
| 85 | + |
| 86 | +/-- |
| 87 | +Converting a bundled algebra to a monoid object in `Module R`. |
| 88 | +-/ |
| 89 | +@[simps] |
| 90 | +def inverse_obj (A : Algebra.{u} R) : Mon_ (Module.{u} R) := |
| 91 | +{ X := Module.of R A, |
| 92 | + one := algebra.linear_map R A, |
| 93 | + mul := algebra.lmul' R A, |
| 94 | + one_mul' := |
| 95 | + begin |
| 96 | + ext x, |
| 97 | + dsimp, |
| 98 | + rw [algebra.lmul'_apply, monoidal_category.left_unitor_hom_apply, algebra.smul_def], |
| 99 | + refl, |
| 100 | + end, |
| 101 | + mul_one' := |
| 102 | + begin |
| 103 | + ext x, |
| 104 | + dsimp, |
| 105 | + rw [algebra.lmul'_apply, monoidal_category.right_unitor_hom_apply, |
| 106 | + ←algebra.commutes, algebra.smul_def], |
| 107 | + refl, |
| 108 | + end, |
| 109 | + mul_assoc' := |
| 110 | + begin |
| 111 | + ext xy z, |
| 112 | + dsimp, |
| 113 | + apply tensor_product.induction_on xy, |
| 114 | + { simp only [linear_map.map_zero, tensor_product.zero_tmul], }, |
| 115 | + { intros x y, dsimp, simp [mul_assoc], }, |
| 116 | + { intros x y hx hy, dsimp, simp [tensor_product.add_tmul, hx, hy], }, |
| 117 | + end } |
| 118 | + |
| 119 | +/-- |
| 120 | +Converting a bundled algebra to a monoid object in `Module R`. |
| 121 | +-/ |
| 122 | +@[simps] |
| 123 | +def inverse : Algebra.{u} R ⥤ Mon_ (Module.{u} R) := |
| 124 | +{ obj := inverse_obj, |
| 125 | + map := λ A B f, |
| 126 | + { hom := f.to_linear_map, }, }. |
| 127 | + |
| 128 | +end Mon_Module_equivalence_Algebra |
| 129 | + |
| 130 | +open Mon_Module_equivalence_Algebra |
| 131 | + |
| 132 | +/-- |
| 133 | +The category of internal monoid objects in `Module R` |
| 134 | +is equivalent to the category of "native" bundled `R`-algebras. |
| 135 | +-/ |
| 136 | +def Mon_Module_equivalence_Algebra : Mon_ (Module R) ≌ Algebra R := |
| 137 | +{ functor := functor, |
| 138 | + inverse := inverse, |
| 139 | + unit_iso := nat_iso.of_components |
| 140 | + (λ A, |
| 141 | + { hom := { hom := { to_fun := id, map_add' := λ x y, rfl, map_smul' := λ r a, rfl, } }, |
| 142 | + inv := { hom := { to_fun := id, map_add' := λ x y, rfl, map_smul' := λ r a, rfl, } } }) |
| 143 | + (by tidy), |
| 144 | + counit_iso := nat_iso.of_components (λ A, |
| 145 | + { hom := |
| 146 | + { to_fun := id, |
| 147 | + map_zero' := rfl, |
| 148 | + map_add' := λ x y, rfl, |
| 149 | + map_one' := (algebra_map R A).map_one, |
| 150 | + map_mul' := λ x y, algebra.lmul'_apply, |
| 151 | + commutes' := λ r, rfl, }, |
| 152 | + inv := |
| 153 | + { to_fun := id, |
| 154 | + map_zero' := rfl, |
| 155 | + map_add' := λ x y, rfl, |
| 156 | + map_one' := (algebra_map R A).map_one.symm, |
| 157 | + map_mul' := λ x y, algebra.lmul'_apply.symm, |
| 158 | + commutes' := λ r, rfl } }) (by tidy), }. |
| 159 | + |
| 160 | +/-- |
| 161 | +The equivalence `Mon_ (Module R) ≌ Algebra R` |
| 162 | +is naturally compatible with the forgetful functors to `Module R`. |
| 163 | +-/ |
| 164 | +def Mon_Module_equivalence_Algebra_forget : |
| 165 | + Mon_Module_equivalence_Algebra.functor ⋙ forget₂ (Algebra R) (Module R) ≅ Mon_.forget := |
| 166 | +nat_iso.of_components (λ A, |
| 167 | +{ hom := |
| 168 | + { to_fun := id, |
| 169 | + map_add' := λ x y, rfl, |
| 170 | + map_smul' := λ c x, rfl }, |
| 171 | + inv := |
| 172 | + { to_fun := id, |
| 173 | + map_add' := λ x y, rfl, |
| 174 | + map_smul' := λ c x, rfl }, }) (by tidy) |
| 175 | + |
| 176 | +end Module |
0 commit comments