category_theory.idempotents.biproducts
⟷
Mathlib.CategoryTheory.Idempotents.Biproducts
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -146,7 +146,7 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
inr_snd := P.complement.decompId.symm }
(by
simp only [hom_ext, ← decomp_p, quiver.hom.add_comm_group_add_f, to_karoubi_map_f, id_eq,
- coe_p, complement_p, add_sub_cancel'_right])
+ coe_p, complement_p, add_sub_cancel])
#print CategoryTheory.Idempotents.Karoubi.decomposition /-
/-- A formal direct factor `P : karoubi C` of an object `P.X : C` in a
@@ -177,7 +177,7 @@ def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.p
simp only [← decomp_p]
ext
dsimp only [complement, to_karoubi]
- simp only [quiver.hom.add_comm_group_add_f, add_sub_cancel'_right, id_eq]
+ simp only [quiver.hom.add_comm_group_add_f, add_sub_cancel, id_eq]
#align category_theory.idempotents.karoubi.decomposition CategoryTheory.Idempotents.Karoubi.decomposition
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -82,7 +82,32 @@ end Biproducts
#print CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts /-
theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproducts (Karoubi C) :=
- { out := fun n => { HasBiproduct := fun F => by classical } }
+ {
+ out := fun n =>
+ {
+ HasBiproduct := fun F => by
+ classical
+ apply has_biproduct_of_total (biproducts.bicone F)
+ ext1
+ ext1
+ simp only [id_eq, comp_id, biproducts.bicone_X_p, biproduct.ι_map]
+ rw [sum_hom, comp_sum, Finset.sum_eq_single j]
+ rotate_left
+ · intro j' h1 h2
+ simp only [biproduct.ι_map, biproducts.bicone_ι_f, biproducts.bicone_π_f, assoc, comp_f,
+ biproduct.map_π]
+ slice_lhs 1 2 => rw [biproduct.ι_π]
+ split_ifs
+ · exfalso; exact h2 h.symm
+ · simp only [zero_comp]
+ · intro h
+ exfalso
+ simpa only [Finset.mem_univ, not_true] using h
+ · simp only [biproducts.bicone_π_f, comp_f, biproduct.ι_map, assoc, biproducts.bicone_ι_f,
+ biproduct.map_π]
+ slice_lhs 1 2 => rw [biproduct.ι_π]
+ split_ifs; swap; · exfalso; exact h rfl
+ simp only [eq_to_hom_refl, id_comp, (F j).idem] } }
#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -82,32 +82,7 @@ end Biproducts
#print CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts /-
theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproducts (Karoubi C) :=
- {
- out := fun n =>
- {
- HasBiproduct := fun F => by
- classical
- apply has_biproduct_of_total (biproducts.bicone F)
- ext1
- ext1
- simp only [id_eq, comp_id, biproducts.bicone_X_p, biproduct.ι_map]
- rw [sum_hom, comp_sum, Finset.sum_eq_single j]
- rotate_left
- · intro j' h1 h2
- simp only [biproduct.ι_map, biproducts.bicone_ι_f, biproducts.bicone_π_f, assoc, comp_f,
- biproduct.map_π]
- slice_lhs 1 2 => rw [biproduct.ι_π]
- split_ifs
- · exfalso; exact h2 h.symm
- · simp only [zero_comp]
- · intro h
- exfalso
- simpa only [Finset.mem_univ, not_true] using h
- · simp only [biproducts.bicone_π_f, comp_f, biproduct.ι_map, assoc, biproducts.bicone_ι_f,
- biproduct.map_π]
- slice_lhs 1 2 => rw [biproduct.ι_π]
- split_ifs; swap; · exfalso; exact h rfl
- simp only [eq_to_hom_refl, id_comp, (F j).idem] } }
+ { out := fun n => { HasBiproduct := fun F => by classical } }
#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2022 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-/
-import Mathbin.CategoryTheory.Idempotents.Karoubi
+import CategoryTheory.Idempotents.Karoubi
#align_import category_theory.idempotents.biproducts from "leanprover-community/mathlib"@"6cf5900728239efa287df7761ec2a1ac9cf39b29"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2022 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-
-! This file was ported from Lean 3 source module category_theory.idempotents.biproducts
-! leanprover-community/mathlib commit 6cf5900728239efa287df7761ec2a1ac9cf39b29
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.CategoryTheory.Idempotents.Karoubi
+#align_import category_theory.idempotents.biproducts from "leanprover-community/mathlib"@"6cf5900728239efa287df7761ec2a1ac9cf39b29"
+
/-!
# Biproducts in the idempotent completion of a preadditive category
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -48,6 +48,7 @@ variable {C : Type _} [Category.{v} C] [Preadditive C]
namespace Biproducts
+#print CategoryTheory.Idempotents.Karoubi.Biproducts.bicone /-
/-- The `bicone` used in order to obtain the existence of
the biproduct of a functor `J ⥤ karoubi C` when the category `C` is additive. -/
@[simps]
@@ -78,9 +79,11 @@ def bicone [HasFiniteBiproducts C] {J : Type} [Fintype J] (F : J → Karoubi C)
simp only [biproduct.ι_π_ne_assoc _ h, assoc, biproduct.map_π, biproduct.map_π_assoc, hom_ext,
comp_f, zero_comp, quiver.hom.add_comm_group_zero_f]
#align category_theory.idempotents.karoubi.biproducts.bicone CategoryTheory.Idempotents.Karoubi.Biproducts.bicone
+-/
end Biproducts
+#print CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts /-
theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproducts (Karoubi C) :=
{
out := fun n =>
@@ -109,6 +112,7 @@ theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproduct
split_ifs; swap; · exfalso; exact h rfl
simp only [eq_to_hom_refl, id_comp, (F j).idem] } }
#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts
+-/
attribute [instance] karoubi_has_finite_biproducts
@@ -147,6 +151,7 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
simp only [hom_ext, ← decomp_p, quiver.hom.add_comm_group_add_f, to_karoubi_map_f, id_eq,
coe_p, complement_p, add_sub_cancel'_right])
+#print CategoryTheory.Idempotents.Karoubi.decomposition /-
/-- A formal direct factor `P : karoubi C` of an object `P.X : C` in a
preadditive category is actually a direct factor of the image `(to_karoubi C).obj P.X`
of `P.X` in the category `karoubi C` -/
@@ -177,6 +182,7 @@ def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.p
dsimp only [complement, to_karoubi]
simp only [quiver.hom.add_comm_group_add_f, add_sub_cancel'_right, id_eq]
#align category_theory.idempotents.karoubi.decomposition CategoryTheory.Idempotents.Karoubi.decomposition
+-/
end Karoubi
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -87,27 +87,27 @@ theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproduct
{
HasBiproduct := fun F => by
classical
- apply has_biproduct_of_total (biproducts.bicone F)
- ext1
- ext1
- simp only [id_eq, comp_id, biproducts.bicone_X_p, biproduct.ι_map]
- rw [sum_hom, comp_sum, Finset.sum_eq_single j]
- rotate_left
- · intro j' h1 h2
- simp only [biproduct.ι_map, biproducts.bicone_ι_f, biproducts.bicone_π_f, assoc,
- comp_f, biproduct.map_π]
- slice_lhs 1 2 => rw [biproduct.ι_π]
- split_ifs
- · exfalso; exact h2 h.symm
- · simp only [zero_comp]
- · intro h
- exfalso
- simpa only [Finset.mem_univ, not_true] using h
- · simp only [biproducts.bicone_π_f, comp_f, biproduct.ι_map, assoc,
- biproducts.bicone_ι_f, biproduct.map_π]
- slice_lhs 1 2 => rw [biproduct.ι_π]
- split_ifs; swap; · exfalso; exact h rfl
- simp only [eq_to_hom_refl, id_comp, (F j).idem] } }
+ apply has_biproduct_of_total (biproducts.bicone F)
+ ext1
+ ext1
+ simp only [id_eq, comp_id, biproducts.bicone_X_p, biproduct.ι_map]
+ rw [sum_hom, comp_sum, Finset.sum_eq_single j]
+ rotate_left
+ · intro j' h1 h2
+ simp only [biproduct.ι_map, biproducts.bicone_ι_f, biproducts.bicone_π_f, assoc, comp_f,
+ biproduct.map_π]
+ slice_lhs 1 2 => rw [biproduct.ι_π]
+ split_ifs
+ · exfalso; exact h2 h.symm
+ · simp only [zero_comp]
+ · intro h
+ exfalso
+ simpa only [Finset.mem_univ, not_true] using h
+ · simp only [biproducts.bicone_π_f, comp_f, biproduct.ι_map, assoc, biproducts.bicone_ι_f,
+ biproduct.map_π]
+ slice_lhs 1 2 => rw [biproduct.ι_π]
+ split_ifs; swap; · exfalso; exact h rfl
+ simp only [eq_to_hom_refl, id_comp, (F j).idem] } }
#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts
attribute [instance] karoubi_has_finite_biproducts
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -48,12 +48,6 @@ variable {C : Type _} [Category.{v} C] [Preadditive C]
namespace Biproducts
-/- warning: category_theory.idempotents.karoubi.biproducts.bicone -> CategoryTheory.Idempotents.Karoubi.Biproducts.bicone is a dubious translation:
-lean 3 declaration is
- forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.Limits.HasFiniteBiproducts.{u1, u2} C _inst_1 (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, u2} C _inst_1 _inst_2)] {J : Type} [_inst_4 : Fintype.{0} J] (F : J -> (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1)), CategoryTheory.Limits.Bicone.{0, u1, max u2 u1} J (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.preadditive.{u2, u1} C _inst_1 _inst_2)) F
-but is expected to have type
- forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.Limits.HasFiniteBiproducts.{u1, u2} C _inst_1 (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, u2} C _inst_1 _inst_2)] {J : Type} [_inst_4 : Finite.{1} J] (F : J -> (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1)), CategoryTheory.Limits.Bicone.{0, u1, max u1 u2} J (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u1 u2} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.instPreadditiveKaroubiInstCategoryKaroubi.{u2, u1} C _inst_1 _inst_2)) F
-Case conversion may be inaccurate. Consider using '#align category_theory.idempotents.karoubi.biproducts.bicone CategoryTheory.Idempotents.Karoubi.Biproducts.biconeₓ'. -/
/-- The `bicone` used in order to obtain the existence of
the biproduct of a functor `J ⥤ karoubi C` when the category `C` is additive. -/
@[simps]
@@ -87,12 +81,6 @@ def bicone [HasFiniteBiproducts C] {J : Type} [Fintype J] (F : J → Karoubi C)
end Biproducts
-/- warning: category_theory.idempotents.karoubi.karoubi_has_finite_biproducts -> CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts is a dubious translation:
-lean 3 declaration is
- forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.Limits.HasFiniteBiproducts.{u1, u2} C _inst_1 (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, u2} C _inst_1 _inst_2)], CategoryTheory.Limits.HasFiniteBiproducts.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.preadditive.{u2, u1} C _inst_1 _inst_2))
-but is expected to have type
- forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.Limits.HasFiniteBiproducts.{u2, u1} C _inst_1 (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u2, u1} C _inst_1 _inst_2)], CategoryTheory.Limits.HasFiniteBiproducts.{u2, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u1, u2} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u1, u2} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u2, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u1, u2} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u1, u2} C _inst_1) (CategoryTheory.Idempotents.instPreadditiveKaroubiInstCategoryKaroubi.{u1, u2} C _inst_1 _inst_2))
-Case conversion may be inaccurate. Consider using '#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproductsₓ'. -/
theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproducts (Karoubi C) :=
{
out := fun n =>
@@ -159,12 +147,6 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
simp only [hom_ext, ← decomp_p, quiver.hom.add_comm_group_add_f, to_karoubi_map_f, id_eq,
coe_p, complement_p, add_sub_cancel'_right])
-/- warning: category_theory.idempotents.karoubi.decomposition -> CategoryTheory.Idempotents.Karoubi.decomposition is a dubious translation:
-lean 3 declaration is
- forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] (P : CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1), CategoryTheory.Iso.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Limits.biprod.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.preadditive.{u2, u1} C _inst_1 _inst_2)) P (CategoryTheory.Idempotents.Karoubi.complement.{u1, u2} C _inst_1 _inst_2 P) (CategoryTheory.Idempotents.Karoubi.complement.CategoryTheory.Limits.hasBinaryBiproduct.{u1, u2} C _inst_1 _inst_2 P)) (CategoryTheory.Functor.obj.{u1, u1, u2, max u2 u1} C _inst_1 (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.toKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.x.{u2, u1} C _inst_1 P))
-but is expected to have type
- forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] (P : CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1), CategoryTheory.Iso.{u1, max u1 u2} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Limits.biprod.{u1, max u1 u2} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u1 u2} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.instPreadditiveKaroubiInstCategoryKaroubi.{u2, u1} C _inst_1 _inst_2)) P (CategoryTheory.Idempotents.Karoubi.complement.{u1, u2} C _inst_1 _inst_2 P) (CategoryTheory.Idempotents.Karoubi.instHasBinaryBiproductKaroubiInstCategoryKaroubiPreadditiveHasZeroMorphismsInstPreadditiveKaroubiInstCategoryKaroubiComplement.{u1, u2} C _inst_1 _inst_2 P)) (Prefunctor.obj.{succ u1, succ u1, u2, max u1 u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Category.toCategoryStruct.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, max u2 u1} C _inst_1 (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.toKaroubi.{u2, u1} C _inst_1)) (CategoryTheory.Idempotents.Karoubi.X.{u2, u1} C _inst_1 P))
-Case conversion may be inaccurate. Consider using '#align category_theory.idempotents.karoubi.decomposition CategoryTheory.Idempotents.Karoubi.decompositionₓ'. -/
/-- A formal direct factor `P : karoubi C` of an object `P.X : C` in a
preadditive category is actually a direct factor of the image `(to_karoubi C).obj P.X`
of `P.X` in the category `karoubi C` -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -110,8 +110,7 @@ theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproduct
comp_f, biproduct.map_π]
slice_lhs 1 2 => rw [biproduct.ι_π]
split_ifs
- · exfalso
- exact h2 h.symm
+ · exfalso; exact h2 h.symm
· simp only [zero_comp]
· intro h
exfalso
@@ -119,10 +118,7 @@ theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproduct
· simp only [biproducts.bicone_π_f, comp_f, biproduct.ι_map, assoc,
biproducts.bicone_ι_f, biproduct.map_π]
slice_lhs 1 2 => rw [biproduct.ι_π]
- split_ifs
- swap
- · exfalso
- exact h rfl
+ split_ifs; swap; · exfalso; exact h rfl
simp only [eq_to_hom_refl, id_comp, (F j).idem] } }
#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
! This file was ported from Lean 3 source module category_theory.idempotents.biproducts
-! leanprover-community/mathlib commit 362c2263e25ed3b9ed693773f32f91243612e1da
+! leanprover-community/mathlib commit 6cf5900728239efa287df7761ec2a1ac9cf39b29
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.CategoryTheory.Idempotents.Karoubi
# Biproducts in the idempotent completion of a preadditive category
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In this file, we define an instance expressing that if `C` is an additive category
(i.e. is preadditive and has finite biproducts), then `karoubi C` is also an additive category.
mathlib commit https://github.com/leanprover-community/mathlib/commit/2f8347015b12b0864dfaf366ec4909eb70c78740
@@ -45,6 +45,12 @@ variable {C : Type _} [Category.{v} C] [Preadditive C]
namespace Biproducts
+/- warning: category_theory.idempotents.karoubi.biproducts.bicone -> CategoryTheory.Idempotents.Karoubi.Biproducts.bicone is a dubious translation:
+lean 3 declaration is
+ forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.Limits.HasFiniteBiproducts.{u1, u2} C _inst_1 (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, u2} C _inst_1 _inst_2)] {J : Type} [_inst_4 : Fintype.{0} J] (F : J -> (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1)), CategoryTheory.Limits.Bicone.{0, u1, max u2 u1} J (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.preadditive.{u2, u1} C _inst_1 _inst_2)) F
+but is expected to have type
+ forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.Limits.HasFiniteBiproducts.{u1, u2} C _inst_1 (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, u2} C _inst_1 _inst_2)] {J : Type} [_inst_4 : Finite.{1} J] (F : J -> (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1)), CategoryTheory.Limits.Bicone.{0, u1, max u1 u2} J (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u1 u2} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.instPreadditiveKaroubiInstCategoryKaroubi.{u2, u1} C _inst_1 _inst_2)) F
+Case conversion may be inaccurate. Consider using '#align category_theory.idempotents.karoubi.biproducts.bicone CategoryTheory.Idempotents.Karoubi.Biproducts.biconeₓ'. -/
/-- The `bicone` used in order to obtain the existence of
the biproduct of a functor `J ⥤ karoubi C` when the category `C` is additive. -/
@[simps]
@@ -78,6 +84,12 @@ def bicone [HasFiniteBiproducts C] {J : Type} [Fintype J] (F : J → Karoubi C)
end Biproducts
+/- warning: category_theory.idempotents.karoubi.karoubi_has_finite_biproducts -> CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts is a dubious translation:
+lean 3 declaration is
+ forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] [_inst_3 : CategoryTheory.Limits.HasFiniteBiproducts.{u1, u2} C _inst_1 (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, u2} C _inst_1 _inst_2)], CategoryTheory.Limits.HasFiniteBiproducts.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.preadditive.{u2, u1} C _inst_1 _inst_2))
+but is expected to have type
+ forall {C : Type.{u1}} [_inst_1 : CategoryTheory.Category.{u2, u1} C] [_inst_2 : CategoryTheory.Preadditive.{u2, u1} C _inst_1] [_inst_3 : CategoryTheory.Limits.HasFiniteBiproducts.{u2, u1} C _inst_1 (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u2, u1} C _inst_1 _inst_2)], CategoryTheory.Limits.HasFiniteBiproducts.{u2, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u1, u2} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u1, u2} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u2, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u1, u2} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u1, u2} C _inst_1) (CategoryTheory.Idempotents.instPreadditiveKaroubiInstCategoryKaroubi.{u1, u2} C _inst_1 _inst_2))
+Case conversion may be inaccurate. Consider using '#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproductsₓ'. -/
theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproducts (Karoubi C) :=
{
out := fun n =>
@@ -113,6 +125,7 @@ theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproduct
attribute [instance] karoubi_has_finite_biproducts
+#print CategoryTheory.Idempotents.Karoubi.complement /-
/-- `P.complement` is the formal direct factor of `P.X` given by the idempotent
endomorphism `𝟙 P.X - P.p` -/
@[simps]
@@ -122,6 +135,7 @@ def complement (P : Karoubi C) : Karoubi C
p := 𝟙 _ - P.p
idem := idem_of_id_sub_idem P.p P.idem
#align category_theory.idempotents.karoubi.complement CategoryTheory.Idempotents.Karoubi.complement
+-/
instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
hasBinaryBiproduct_of_total
@@ -146,6 +160,12 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
simp only [hom_ext, ← decomp_p, quiver.hom.add_comm_group_add_f, to_karoubi_map_f, id_eq,
coe_p, complement_p, add_sub_cancel'_right])
+/- warning: category_theory.idempotents.karoubi.decomposition -> CategoryTheory.Idempotents.Karoubi.decomposition is a dubious translation:
+lean 3 declaration is
+ forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] (P : CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1), CategoryTheory.Iso.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Limits.biprod.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.preadditive.{u2, u1} C _inst_1 _inst_2)) P (CategoryTheory.Idempotents.Karoubi.complement.{u1, u2} C _inst_1 _inst_2 P) (CategoryTheory.Idempotents.Karoubi.complement.CategoryTheory.Limits.hasBinaryBiproduct.{u1, u2} C _inst_1 _inst_2 P)) (CategoryTheory.Functor.obj.{u1, u1, u2, max u2 u1} C _inst_1 (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.CategoryTheory.category.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.toKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.x.{u2, u1} C _inst_1 P))
+but is expected to have type
+ forall {C : Type.{u2}} [_inst_1 : CategoryTheory.Category.{u1, u2} C] [_inst_2 : CategoryTheory.Preadditive.{u1, u2} C _inst_1] (P : CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1), CategoryTheory.Iso.{u1, max u1 u2} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Limits.biprod.{u1, max u1 u2} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Preadditive.preadditiveHasZeroMorphisms.{u1, max u1 u2} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.instPreadditiveKaroubiInstCategoryKaroubi.{u2, u1} C _inst_1 _inst_2)) P (CategoryTheory.Idempotents.Karoubi.complement.{u1, u2} C _inst_1 _inst_2 P) (CategoryTheory.Idempotents.Karoubi.instHasBinaryBiproductKaroubiInstCategoryKaroubiPreadditiveHasZeroMorphismsInstPreadditiveKaroubiInstCategoryKaroubiComplement.{u1, u2} C _inst_1 _inst_2 P)) (Prefunctor.obj.{succ u1, succ u1, u2, max u1 u2} C (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} C (CategoryTheory.Category.toCategoryStruct.{u1, u2} C _inst_1)) (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.CategoryStruct.toQuiver.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Category.toCategoryStruct.{u1, max u2 u1} (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, max u2 u1} C _inst_1 (CategoryTheory.Idempotents.Karoubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.Karoubi.instCategoryKaroubi.{u2, u1} C _inst_1) (CategoryTheory.Idempotents.toKaroubi.{u2, u1} C _inst_1)) (CategoryTheory.Idempotents.Karoubi.X.{u2, u1} C _inst_1 P))
+Case conversion may be inaccurate. Consider using '#align category_theory.idempotents.karoubi.decomposition CategoryTheory.Idempotents.Karoubi.decompositionₓ'. -/
/-- A formal direct factor `P : karoubi C` of an object `P.X : C` in a
preadditive category is actually a direct factor of the image `(to_karoubi C).obj P.X`
of `P.X` in the category `karoubi C` -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -4,19 +4,18 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
! This file was ported from Lean 3 source module category_theory.idempotents.biproducts
-! leanprover-community/mathlib commit 31019c2504b17f85af7e0577585fad996935a317
+! leanprover-community/mathlib commit 362c2263e25ed3b9ed693773f32f91243612e1da
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.CategoryTheory.Idempotents.Karoubi
-import Mathbin.CategoryTheory.Additive.Basic
/-!
# Biproducts in the idempotent completion of a preadditive category
-In this file, we define an instance expressing that if `C` is an additive category,
-then `karoubi C` is also an additive category.
+In this file, we define an instance expressing that if `C` is an additive category
+(i.e. is preadditive and has finite biproducts), then `karoubi C` is also an additive category.
We also obtain that for all `P : karoubi C` where `C` is a preadditive category `C`, there
is a canonical isomorphism `P ⊞ P.complement ≅ (to_karoubi C).obj P.X` in the category
@@ -112,10 +111,7 @@ theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproduct
simp only [eq_to_hom_refl, id_comp, (F j).idem] } }
#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts
-instance {D : Type _} [Category D] [AdditiveCategory D] : AdditiveCategory (Karoubi D)
- where
- toPreadditive := inferInstance
- to_hasFiniteBiproducts := karoubi_hasFiniteBiproducts
+attribute [instance] karoubi_has_finite_biproducts
/-- `P.complement` is the formal direct factor of `P.X` given by the idempotent
endomorphism `𝟙 P.X - P.p` -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/06a655b5fcfbda03502f9158bbf6c0f1400886f9
@@ -130,11 +130,11 @@ def complement (P : Karoubi C) : Karoubi C
instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
hasBinaryBiproduct_of_total
{ pt := P.pt
- fst := P.decompIdP
- snd := P.complement.decompIdP
- inl := P.decompIdI
- inr := P.complement.decompIdI
- inl_fst := P.decomp_id.symm
+ fst := P.decompId_p
+ snd := P.complement.decompId_p
+ inl := P.decompId_i
+ inr := P.complement.decompId_i
+ inl_fst := P.decompId.symm
inl_snd :=
by
simp only [decomp_id_i_f, decomp_id_p_f, complement_p, comp_sub, comp_f, hom_ext,
@@ -145,7 +145,7 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
simp only [decomp_id_i_f, complement_p, decomp_id_p_f, sub_comp, comp_f, hom_ext,
quiver.hom.add_comm_group_zero_f, P.idem]
erw [id_comp, sub_self]
- inr_snd := P.complement.decomp_id.symm }
+ inr_snd := P.complement.decompId.symm }
(by
simp only [hom_ext, ← decomp_p, quiver.hom.add_comm_group_add_f, to_karoubi_map_f, id_eq,
coe_p, complement_p, add_sub_cancel'_right])
@@ -155,8 +155,8 @@ preadditive category is actually a direct factor of the image `(to_karoubi C).ob
of `P.X` in the category `karoubi C` -/
def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.pt
where
- Hom := biprod.desc P.decompIdI P.complement.decompIdI
- inv := biprod.lift P.decompIdP P.complement.decompIdP
+ Hom := biprod.desc P.decompId_i P.complement.decompId_i
+ inv := biprod.lift P.decompId_p P.complement.decompId_p
hom_inv_id' := by
ext1
· simp only [← assoc, biprod.inl_desc, comp_id, biprod.lift_eq, comp_add, ← decomp_id, id_comp,
mathlib commit https://github.com/leanprover-community/mathlib/commit/38f16f960f5006c6c0c2bac7b0aba5273188f4e5
@@ -134,18 +134,18 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
snd := P.complement.decompIdP
inl := P.decompIdI
inr := P.complement.decompIdI
- inl_fst' := P.decomp_id.symm
- inl_snd' :=
+ inl_fst := P.decomp_id.symm
+ inl_snd :=
by
simp only [decomp_id_i_f, decomp_id_p_f, complement_p, comp_sub, comp_f, hom_ext,
quiver.hom.add_comm_group_zero_f, P.idem]
erw [comp_id, sub_self]
- inr_fst' :=
+ inr_fst :=
by
simp only [decomp_id_i_f, complement_p, decomp_id_p_f, sub_comp, comp_f, hom_ext,
quiver.hom.add_comm_group_zero_f, P.idem]
erw [id_comp, sub_self]
- inr_snd' := P.complement.decomp_id.symm }
+ inr_snd := P.complement.decomp_id.symm }
(by
simp only [hom_ext, ← decomp_p, quiver.hom.add_comm_group_add_f, to_karoubi_map_f, id_eq,
coe_p, complement_p, add_sub_cancel'_right])
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -51,8 +51,8 @@ the biproduct of a functor `J ⥤ karoubi C` when the category `C` is additive.
@[simps]
def bicone [HasFiniteBiproducts C] {J : Type} [Fintype J] (F : J → Karoubi C) : Bicone F
where
- x :=
- { x := biproduct fun j => (F j).x
+ pt :=
+ { pt := biproduct fun j => (F j).pt
p := biproduct.map fun j => (F j).p
idem := by
ext j
@@ -122,14 +122,14 @@ endomorphism `𝟙 P.X - P.p` -/
@[simps]
def complement (P : Karoubi C) : Karoubi C
where
- x := P.x
+ pt := P.pt
p := 𝟙 _ - P.p
idem := idem_of_id_sub_idem P.p P.idem
#align category_theory.idempotents.karoubi.complement CategoryTheory.Idempotents.Karoubi.complement
instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
hasBinaryBiproduct_of_total
- { x := P.x
+ { pt := P.pt
fst := P.decompIdP
snd := P.complement.decompIdP
inl := P.decompIdI
@@ -153,7 +153,7 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
/-- A formal direct factor `P : karoubi C` of an object `P.X : C` in a
preadditive category is actually a direct factor of the image `(to_karoubi C).obj P.X`
of `P.X` in the category `karoubi C` -/
-def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.x
+def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.pt
where
Hom := biprod.desc P.decompIdI P.complement.decompIdI
inv := biprod.lift P.decompIdP P.complement.decompIdP
mathlib commit https://github.com/leanprover-community/mathlib/commit/eb0cb4511aaef0da2462207b67358a0e1fe1e2ee
@@ -79,7 +79,7 @@ def bicone [HasFiniteBiproducts C] {J : Type} [Fintype J] (F : J → Karoubi C)
end Biproducts
-theorem karoubiHasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproducts (Karoubi C) :=
+theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproducts (Karoubi C) :=
{
out := fun n =>
{
@@ -110,12 +110,12 @@ theorem karoubiHasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproducts
· exfalso
exact h rfl
simp only [eq_to_hom_refl, id_comp, (F j).idem] } }
-#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubiHasFiniteBiproducts
+#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts
instance {D : Type _} [Category D] [AdditiveCategory D] : AdditiveCategory (Karoubi D)
where
toPreadditive := inferInstance
- toHasFiniteBiproducts := karoubiHasFiniteBiproducts
+ to_hasFiniteBiproducts := karoubi_hasFiniteBiproducts
/-- `P.complement` is the formal direct factor of `P.X` given by the idempotent
endomorphism `𝟙 P.X - P.p` -/
@@ -128,7 +128,7 @@ def complement (P : Karoubi C) : Karoubi C
#align category_theory.idempotents.karoubi.complement CategoryTheory.Idempotents.Karoubi.complement
instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
- hasBinaryBiproductOfTotal
+ hasBinaryBiproduct_of_total
{ x := P.x
fst := P.decompIdP
snd := P.complement.decompIdP
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
mul
-div
cancellation lemmas (#11530)
Lemma names around cancellation of multiplication and division are a mess.
This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero
lemma name, the Group
lemma, the AddGroup
lemma name).
| Statement | New name | Old name | |
@@ -117,7 +117,7 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
(by
simp only [id_eq, complement_X, comp_f,
decompId_i_f, decompId_p_f, complement_p, instAdd_add, idem,
- comp_sub, comp_id, sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel'_right])
+ comp_sub, comp_id, sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel])
attribute [-simp] hom_ext_iff
@@ -144,7 +144,7 @@ def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.X
inv_hom_id := by
simp only [biprod.lift_desc, instAdd_add, toKaroubi_obj_X, comp_f,
decompId_p_f, decompId_i_f, idem, complement_X, complement_p, comp_sub, comp_id,
- sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel'_right,
+ sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel,
id_eq, toKaroubi_obj_p]
#align category_theory.idempotents.karoubi.decomposition CategoryTheory.Idempotents.Karoubi.decomposition
nsmul
and zsmul
to default automatically (#6262)
This PR removes the default values for nsmul
and zsmul
, forcing the user to populate them manually.
The previous behavior can be obtained by writing nsmul := nsmulRec
and zsmul := zsmulRec
, which is now in the docstring for these fields.
The motivation here is to make it more obvious when module diamonds are being introduced, or at least where they might be hiding; you can now simply search for nsmulRec
in the source code.
Arguably we should do the same thing for intCast
, natCast
, pow
, and zpow
too, but diamonds are less common in those fields, so I'll leave them to a subsequent PR.
Co-authored-by: Matthew Ballard <matt@mrb.email>
@@ -108,15 +108,15 @@ instance (P : Karoubi C) : HasBinaryBiproduct P P.complement :=
inr := P.complement.decompId_i
inl_fst := P.decompId.symm
inl_snd := by
- simp only [instAddCommGroupHom_zero, hom_ext_iff, complement_X, comp_f,
+ simp only [instZero_zero, hom_ext_iff, complement_X, comp_f,
decompId_i_f, decompId_p_f, complement_p, comp_sub, comp_id, idem, sub_self]
inr_fst := by
- simp only [instAddCommGroupHom_zero, hom_ext_iff, complement_X, comp_f,
+ simp only [instZero_zero, hom_ext_iff, complement_X, comp_f,
decompId_i_f, complement_p, decompId_p_f, sub_comp, id_comp, idem, sub_self]
inr_snd := P.complement.decompId.symm }
(by
simp only [id_eq, complement_X, comp_f,
- decompId_i_f, decompId_p_f, complement_p, instAddCommGroupHom_add, idem,
+ decompId_i_f, decompId_p_f, complement_p, instAdd_add, idem,
comp_sub, comp_id, sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel'_right])
attribute [-simp] hom_ext_iff
@@ -134,15 +134,15 @@ def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.X
refine' (_ =≫ _).trans zero_comp
ext
simp only [comp_f, toKaroubi_obj_X, decompId_i_f, decompId_p_f,
- complement_p, comp_sub, comp_id, idem, sub_self, instAddCommGroupHom_zero]
+ complement_p, comp_sub, comp_id, idem, sub_self, instZero_zero]
· rw [biprod.inr_desc_assoc, comp_id, biprod.lift_eq, comp_add, ← decompId_assoc,
add_left_eq_self, ← assoc]
refine' (_ =≫ _).trans zero_comp
ext
simp only [complement_X, comp_f, decompId_i_f, complement_p,
- decompId_p_f, sub_comp, id_comp, idem, sub_self, instAddCommGroupHom_zero]
+ decompId_p_f, sub_comp, id_comp, idem, sub_self, instZero_zero]
inv_hom_id := by
- simp only [biprod.lift_desc, instAddCommGroupHom_add, toKaroubi_obj_X, comp_f,
+ simp only [biprod.lift_desc, instAdd_add, toKaroubi_obj_X, comp_f,
decompId_p_f, decompId_i_f, idem, complement_X, complement_p, comp_sub, comp_id,
sub_comp, id_comp, sub_self, sub_zero, add_sub_cancel'_right,
id_eq, toKaroubi_obj_p]
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -38,7 +38,7 @@ namespace Idempotents
namespace Karoubi
-variable {C : Type _} [Category.{v} C] [Preadditive C]
+variable {C : Type*} [Category.{v} C] [Preadditive C]
namespace Biproducts
@@ -2,14 +2,11 @@
Copyright (c) 2022 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-
-! This file was ported from Lean 3 source module category_theory.idempotents.biproducts
-! leanprover-community/mathlib commit 362c2263e25ed3b9ed693773f32f91243612e1da
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.CategoryTheory.Idempotents.Karoubi
+#align_import category_theory.idempotents.biproducts from "leanprover-community/mathlib"@"362c2263e25ed3b9ed693773f32f91243612e1da"
+
/-!
# Biproducts in the idempotent completion of a preadditive category
@@ -69,7 +69,7 @@ def bicone [HasFiniteBiproducts C] {J : Type} [Finite J] (F : J → Karoubi C) :
id_eq, hom_ext_iff, comp_f, assoc, bicone_ι_π_self_assoc, idem]
· dsimp
simp only [hom_ext_iff, biproduct.ι_map, biproduct.map_π, comp_f, assoc, ne_eq,
- biproduct.ι_π_ne_assoc _ h, comp_zero, zero_comp]
+ biproduct.ι_π_ne_assoc _ h, comp_zero, zero_comp]
#align category_theory.idempotents.karoubi.biproducts.bicone CategoryTheory.Idempotents.Karoubi.Biproducts.bicone
end Biproducts
This PR is the result of running
find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +·)\n +(.*)$/\1 \2/;P;D' {} \;
which firstly replaces .
focusing dots with ·
and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.
@@ -64,10 +64,10 @@ def bicone [HasFiniteBiproducts C] {J : Type} [Finite J] (F : J → Karoubi C) :
comm := by simp only [biproduct.ι_map, assoc, idem_assoc] }
ι_π j j' := by
split_ifs with h
- . subst h
+ · subst h
simp only [biproduct.ι_map, biproduct.bicone_π, biproduct.map_π, eqToHom_refl,
id_eq, hom_ext_iff, comp_f, assoc, bicone_ι_π_self_assoc, idem]
- . dsimp
+ · dsimp
simp only [hom_ext_iff, biproduct.ι_map, biproduct.map_π, comp_f, assoc, ne_eq,
biproduct.ι_π_ne_assoc _ h, comp_zero, zero_comp]
#align category_theory.idempotents.karoubi.biproducts.bicone CategoryTheory.Idempotents.Karoubi.Biproducts.bicone
@@ -84,10 +84,10 @@ theorem karoubi_hasFiniteBiproducts [HasFiniteBiproducts C] : HasFiniteBiproduct
biproduct.bicone_π, biproduct.map_π, Biproducts.bicone_ι_f, biproduct.ι_map, assoc,
idem_assoc, id_eq, Biproducts.bicone_pt_p, comp_sum]
rw [Finset.sum_eq_single j]
- . simp only [bicone_ι_π_self_assoc]
- . intro b _ hb
+ · simp only [bicone_ι_π_self_assoc]
+ · intro b _ hb
simp only [biproduct.ι_π_ne_assoc _ hb.symm, zero_comp]
- . intro hj
+ · intro hj
simp only [Finset.mem_univ, not_true] at hj } }
#align category_theory.idempotents.karoubi.karoubi_has_finite_biproducts CategoryTheory.Idempotents.Karoubi.karoubi_hasFiniteBiproducts
@@ -132,13 +132,13 @@ def decomposition (P : Karoubi C) : P ⊞ P.complement ≅ (toKaroubi _).obj P.X
inv := biprod.lift P.decompId_p P.complement.decompId_p
hom_inv_id := by
apply biprod.hom_ext'
- . rw [biprod.inl_desc_assoc, comp_id, biprod.lift_eq, comp_add, ← decompId_assoc,
+ · rw [biprod.inl_desc_assoc, comp_id, biprod.lift_eq, comp_add, ← decompId_assoc,
add_right_eq_self, ← assoc]
refine' (_ =≫ _).trans zero_comp
ext
simp only [comp_f, toKaroubi_obj_X, decompId_i_f, decompId_p_f,
complement_p, comp_sub, comp_id, idem, sub_self, instAddCommGroupHom_zero]
- . rw [biprod.inr_desc_assoc, comp_id, biprod.lift_eq, comp_add, ← decompId_assoc,
+ · rw [biprod.inr_desc_assoc, comp_id, biprod.lift_eq, comp_add, ← decompId_assoc,
add_left_eq_self, ← assoc]
refine' (_ =≫ _).trans zero_comp
ext
The unported dependencies are