category_theory.preadditive.schur
β·
Mathlib.CategoryTheory.Preadditive.Schur
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -105,7 +105,7 @@ theorem finrank_hom_simple_simple_eq_zero_of_not_iso [HasKernels C] [Linear π
subsingleton_of_forall_eq (0 : X βΆ Y) fun f =>
by
have p := not_congr (is_iso_iff_nonzero f)
- simp only [Classical.not_not, Ne.def] at p
+ simp only [Classical.not_not, Ne.def] at p
refine' p.mp fun _ => h (as_iso f)
finrank_zero_of_subsingleton
#align category_theory.finrank_hom_simple_simple_eq_zero_of_not_iso CategoryTheory.finrank_hom_simple_simple_eq_zero_of_not_iso
@@ -143,7 +143,7 @@ theorem finrank_endomorphism_eq_one {X : C} (is_iso_iff_nonzero : β f : X βΆ
(by convert I; ext; rfl; ext; rfl) (End.of f)
use c
rw [spectrum.mem_iff, IsUnit.sub_iff, is_unit_iff_is_iso, is_iso_iff_nonzero, Ne.def,
- Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
+ Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
exact nu.symm
#align category_theory.finrank_endomorphism_eq_one CategoryTheory.finrank_endomorphism_eq_one
-/
@@ -215,9 +215,9 @@ theorem finrank_hom_simple_simple_eq_one_iff (X Y : C) [FiniteDimensional π (
by
fconstructor
Β· intro h
- rw [finrank_eq_one_iff'] at h
+ rw [finrank_eq_one_iff'] at h
obtain β¨f, nz, -β© := h
- rw [β is_iso_iff_nonzero] at nz
+ rw [β is_iso_iff_nonzero] at nz
exact β¨as_iso fβ©
Β· rintro β¨fβ©
have le_one := finrank_hom_simple_simple_le_one π X Y
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -70,7 +70,24 @@ theorem isIso_iff_nonzero [HasKernels C] {X Y : C} [Simple X] [Simple Y] (f : X
/-- In any preadditive category with kernels,
the endomorphisms of a simple object form a division ring.
-/
-noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X) := by classical
+noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X) := by
+ classical exact
+ {
+ (inferInstance :
+ Ring
+ (End
+ X)) with
+ inv := fun f =>
+ if h : f = 0 then 0
+ else
+ haveI := is_iso_of_hom_simple h
+ inv f
+ exists_pair_ne := β¨π X, 0, id_nonzero _β©
+ inv_zero := dif_pos rfl
+ mul_inv_cancel := fun f h => by
+ haveI := is_iso_of_hom_simple h
+ convert is_iso.inv_hom_id f
+ exact dif_neg h }
open FiniteDimensional
@@ -155,7 +172,14 @@ theorem endomorphism_simple_eq_smul_id {X : C} [Simple X] [I : FiniteDimensional
This can't be an instance as `π` would be undetermined.
-/
noncomputable def fieldEndOfFiniteDimensional (X : C) [Simple X] [I : FiniteDimensional π (X βΆ X)] :
- Field (End X) := by classical
+ Field (End X) := by
+ classical exact
+ { (inferInstance : DivisionRing (End X)) with
+ mul_comm := fun f g =>
+ by
+ obtain β¨c, rflβ© := endomorphism_simple_eq_smul_id π f
+ obtain β¨d, rflβ© := endomorphism_simple_eq_smul_id π g
+ simp [β mul_smul, mul_comm c d] }
#align category_theory.field_End_of_finite_dimensional CategoryTheory.fieldEndOfFiniteDimensional
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -70,24 +70,7 @@ theorem isIso_iff_nonzero [HasKernels C] {X Y : C} [Simple X] [Simple Y] (f : X
/-- In any preadditive category with kernels,
the endomorphisms of a simple object form a division ring.
-/
-noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X) := by
- classical exact
- {
- (inferInstance :
- Ring
- (End
- X)) with
- inv := fun f =>
- if h : f = 0 then 0
- else
- haveI := is_iso_of_hom_simple h
- inv f
- exists_pair_ne := β¨π X, 0, id_nonzero _β©
- inv_zero := dif_pos rfl
- mul_inv_cancel := fun f h => by
- haveI := is_iso_of_hom_simple h
- convert is_iso.inv_hom_id f
- exact dif_neg h }
+noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X) := by classical
open FiniteDimensional
@@ -172,14 +155,7 @@ theorem endomorphism_simple_eq_smul_id {X : C} [Simple X] [I : FiniteDimensional
This can't be an instance as `π` would be undetermined.
-/
noncomputable def fieldEndOfFiniteDimensional (X : C) [Simple X] [I : FiniteDimensional π (X βΆ X)] :
- Field (End X) := by
- classical exact
- { (inferInstance : DivisionRing (End X)) with
- mul_comm := fun f g =>
- by
- obtain β¨c, rflβ© := endomorphism_simple_eq_smul_id π f
- obtain β¨d, rflβ© := endomorphism_simple_eq_smul_id π g
- simp [β mul_smul, mul_comm c d] }
+ Field (End X) := by classical
#align category_theory.field_End_of_finite_dimensional CategoryTheory.fieldEndOfFiniteDimensional
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2020 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel, Scott Morrison
-/
-import Mathbin.Algebra.Group.Ext
-import Mathbin.CategoryTheory.Simple
-import Mathbin.CategoryTheory.Linear.Basic
-import Mathbin.CategoryTheory.Endomorphism
-import Mathbin.FieldTheory.IsAlgClosed.Spectrum
+import Algebra.Group.Ext
+import CategoryTheory.Simple
+import CategoryTheory.Linear.Basic
+import CategoryTheory.Endomorphism
+import FieldTheory.IsAlgClosed.Spectrum
#align_import category_theory.preadditive.schur from "leanprover-community/mathlib"@"660b3a2db3522fa0db036e569dc995a615c4c848"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2020 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel, Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.preadditive.schur
-! leanprover-community/mathlib commit 660b3a2db3522fa0db036e569dc995a615c4c848
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Group.Ext
import Mathbin.CategoryTheory.Simple
@@ -14,6 +9,8 @@ import Mathbin.CategoryTheory.Linear.Basic
import Mathbin.CategoryTheory.Endomorphism
import Mathbin.FieldTheory.IsAlgClosed.Spectrum
+#align_import category_theory.preadditive.schur from "leanprover-community/mathlib"@"660b3a2db3522fa0db036e569dc995a615c4c848"
+
/-!
# Schur's lemma
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -98,6 +98,7 @@ section
variable (π : Type _) [DivisionRing π]
+#print CategoryTheory.finrank_hom_simple_simple_eq_zero_of_not_iso /-
/-- Part of **Schur's lemma** for `π`-linear categories:
the hom space between two non-isomorphic simple objects is 0-dimensional.
-/
@@ -111,6 +112,7 @@ theorem finrank_hom_simple_simple_eq_zero_of_not_iso [HasKernels C] [Linear π
refine' p.mp fun _ => h (as_iso f)
finrank_zero_of_subsingleton
#align category_theory.finrank_hom_simple_simple_eq_zero_of_not_iso CategoryTheory.finrank_hom_simple_simple_eq_zero_of_not_iso
+-/
end
@@ -118,6 +120,7 @@ variable (π : Type _) [Field π]
variable [IsAlgClosed π] [Linear π C]
+#print CategoryTheory.finrank_endomorphism_eq_one /-
-- In the proof below we have some difficulty using `I : finite_dimensional π (X βΆ X)`
-- where we need a `finite_dimensional π (End X)`.
-- These are definitionally equal, but without eta reduction Lean can't see this.
@@ -146,21 +149,26 @@ theorem finrank_endomorphism_eq_one {X : C} (is_iso_iff_nonzero : β f : X βΆ
Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
exact nu.symm
#align category_theory.finrank_endomorphism_eq_one CategoryTheory.finrank_endomorphism_eq_one
+-/
variable [HasKernels C]
+#print CategoryTheory.finrank_endomorphism_simple_eq_one /-
/-- **Schur's lemma** for endomorphisms in `π`-linear categories.
-/
theorem finrank_endomorphism_simple_eq_one (X : C) [Simple X] [I : FiniteDimensional π (X βΆ X)] :
finrank π (X βΆ X) = 1 :=
finrank_endomorphism_eq_one π isIso_iff_nonzero
#align category_theory.finrank_endomorphism_simple_eq_one CategoryTheory.finrank_endomorphism_simple_eq_one
+-/
+#print CategoryTheory.endomorphism_simple_eq_smul_id /-
theorem endomorphism_simple_eq_smul_id {X : C} [Simple X] [I : FiniteDimensional π (X βΆ X)]
(f : X βΆ X) : β c : π, c β’ π X = f :=
(finrank_eq_one_iff_of_nonzero' (π X) (id_nonzero X)).mp (finrank_endomorphism_simple_eq_one π X)
f
#align category_theory.endomorphism_simple_eq_smul_id CategoryTheory.endomorphism_simple_eq_smul_id
+-/
#print CategoryTheory.fieldEndOfFiniteDimensional /-
/-- Endomorphisms of a simple object form a field if they are finite dimensional.
mathlib commit https://github.com/leanprover-community/mathlib/commit/ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel, Scott Morrison
! This file was ported from Lean 3 source module category_theory.preadditive.schur
-! leanprover-community/mathlib commit 58a272265b5e05f258161260dd2c5d247213cbd3
+! leanprover-community/mathlib commit 660b3a2db3522fa0db036e569dc995a615c4c848
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -16,6 +16,9 @@ import Mathbin.FieldTheory.IsAlgClosed.Spectrum
/-!
# Schur's lemma
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
We first prove the part of Schur's Lemma that holds in any preadditive category with kernels,
that any nonzero morphism between simple objects
is an isomorphism.
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -35,12 +35,15 @@ variable {C : Type _} [Category C]
variable [Preadditive C]
+#print CategoryTheory.mono_of_nonzero_from_simple /-
-- See also `epi_of_nonzero_to_simple`, which does not require `preadditive C`.
theorem mono_of_nonzero_from_simple [HasKernels C] {X Y : C} [Simple X] {f : X βΆ Y} (w : f β 0) :
Mono f :=
Preadditive.mono_of_kernel_zero (kernel_zero_of_nonzero_from_simple w)
#align category_theory.mono_of_nonzero_from_simple CategoryTheory.mono_of_nonzero_from_simple
+-/
+#print CategoryTheory.isIso_of_hom_simple /-
/-- The part of **Schur's lemma** that holds in any preadditive category with kernels:
that a nonzero morphism between simple objects is an isomorphism.
-/
@@ -49,7 +52,9 @@ theorem isIso_of_hom_simple [HasKernels C] {X Y : C} [Simple X] [Simple Y] {f :
haveI := mono_of_nonzero_from_simple w
is_iso_of_mono_of_nonzero w
#align category_theory.is_iso_of_hom_simple CategoryTheory.isIso_of_hom_simple
+-/
+#print CategoryTheory.isIso_iff_nonzero /-
/-- As a corollary of Schur's lemma for preadditive categories,
any morphism between simple objects is (exclusively) either an isomorphism or zero.
-/
@@ -60,6 +65,7 @@ theorem isIso_iff_nonzero [HasKernels C] {X Y : C} [Simple X] [Simple Y] (f : X
apply id_nonzero X
simp only [β is_iso.hom_inv_id f, h, zero_comp], fun w => isIso_of_hom_simple wβ©
#align category_theory.is_iso_iff_nonzero CategoryTheory.isIso_iff_nonzero
+-/
/-- In any preadditive category with kernels,
the endomorphisms of a simple object form a division ring.
@@ -153,6 +159,7 @@ theorem endomorphism_simple_eq_smul_id {X : C} [Simple X] [I : FiniteDimensional
f
#align category_theory.endomorphism_simple_eq_smul_id CategoryTheory.endomorphism_simple_eq_smul_id
+#print CategoryTheory.fieldEndOfFiniteDimensional /-
/-- Endomorphisms of a simple object form a field if they are finite dimensional.
This can't be an instance as `π` would be undetermined.
-/
@@ -166,7 +173,9 @@ noncomputable def fieldEndOfFiniteDimensional (X : C) [Simple X] [I : FiniteDime
obtain β¨d, rflβ© := endomorphism_simple_eq_smul_id π g
simp [β mul_smul, mul_comm c d] }
#align category_theory.field_End_of_finite_dimensional CategoryTheory.fieldEndOfFiniteDimensional
+-/
+#print CategoryTheory.finrank_hom_simple_simple_le_one /-
-- There is a symmetric argument that uses `[finite_dimensional π (Y βΆ Y)]` instead,
-- but we don't bother proving that here.
/-- **Schur's lemma** for `π`-linear categories:
@@ -189,7 +198,9 @@ theorem finrank_hom_simple_simple_le_one (X Y : C) [FiniteDimensional π (X
obtain β¨c, wβ© := endomorphism_simple_eq_smul_id π (g β« inv f)
exact β¨c, by simpa using w =β« fβ©
#align category_theory.finrank_hom_simple_simple_le_one CategoryTheory.finrank_hom_simple_simple_le_one
+-/
+#print CategoryTheory.finrank_hom_simple_simple_eq_one_iff /-
theorem finrank_hom_simple_simple_eq_one_iff (X Y : C) [FiniteDimensional π (X βΆ X)]
[FiniteDimensional π (X βΆ Y)] [Simple X] [Simple Y] :
finrank π (X βΆ Y) = 1 β Nonempty (X β
Y) :=
@@ -206,7 +217,9 @@ theorem finrank_hom_simple_simple_eq_one_iff (X Y : C) [FiniteDimensional π (
finrank_pos_iff_exists_ne_zero.mpr β¨f.hom, (is_iso_iff_nonzero f.hom).mp inferInstanceβ©
linarith
#align category_theory.finrank_hom_simple_simple_eq_one_iff CategoryTheory.finrank_hom_simple_simple_eq_one_iff
+-/
+#print CategoryTheory.finrank_hom_simple_simple_eq_zero_iff /-
theorem finrank_hom_simple_simple_eq_zero_iff (X Y : C) [FiniteDimensional π (X βΆ X)]
[FiniteDimensional π (X βΆ Y)] [Simple X] [Simple Y] : finrank π (X βΆ Y) = 0 β IsEmpty (X β
Y) :=
by
@@ -217,9 +230,11 @@ theorem finrank_hom_simple_simple_eq_zero_iff (X Y : C) [FiniteDimensional π
Β· exact h'
Β· exact False.elim (h h')
#align category_theory.finrank_hom_simple_simple_eq_zero_iff CategoryTheory.finrank_hom_simple_simple_eq_zero_iff
+-/
open scoped Classical
+#print CategoryTheory.finrank_hom_simple_simple /-
theorem finrank_hom_simple_simple (X Y : C) [β X Y : C, FiniteDimensional π (X βΆ Y)] [Simple X]
[Simple Y] : finrank π (X βΆ Y) = if Nonempty (X β
Y) then 1 else 0 :=
by
@@ -227,6 +242,7 @@ theorem finrank_hom_simple_simple (X Y : C) [β X Y : C, FiniteDimensional π
exact (finrank_hom_simple_simple_eq_one_iff π X Y).2 h
exact (finrank_hom_simple_simple_eq_zero_iff π X Y).2 (not_nonempty_iff.mp h)
#align category_theory.finrank_hom_simple_simple CategoryTheory.finrank_hom_simple_simple
+-/
end CategoryTheory
mathlib commit https://github.com/leanprover-community/mathlib/commit/58a272265b5e05f258161260dd2c5d247213cbd3
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel, Scott Morrison
! This file was ported from Lean 3 source module category_theory.preadditive.schur
-! leanprover-community/mathlib commit 5ec62c8106221a3f9160e4e4fcc3eed79fe213e9
+! leanprover-community/mathlib commit 58a272265b5e05f258161260dd2c5d247213cbd3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -12,7 +12,7 @@ import Mathbin.Algebra.Group.Ext
import Mathbin.CategoryTheory.Simple
import Mathbin.CategoryTheory.Linear.Basic
import Mathbin.CategoryTheory.Endomorphism
-import Mathbin.Algebra.Algebra.Spectrum
+import Mathbin.FieldTheory.IsAlgClosed.Spectrum
/-!
# Schur's lemma
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -66,22 +66,22 @@ the endomorphisms of a simple object form a division ring.
-/
noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X) := by
classical exact
- {
- (inferInstance :
- Ring
- (End
- X)) with
- inv := fun f =>
- if h : f = 0 then 0
- else
- haveI := is_iso_of_hom_simple h
- inv f
- exists_pair_ne := β¨π X, 0, id_nonzero _β©
- inv_zero := dif_pos rfl
- mul_inv_cancel := fun f h => by
+ {
+ (inferInstance :
+ Ring
+ (End
+ X)) with
+ inv := fun f =>
+ if h : f = 0 then 0
+ else
haveI := is_iso_of_hom_simple h
- convert is_iso.inv_hom_id f
- exact dif_neg h }
+ inv f
+ exists_pair_ne := β¨π X, 0, id_nonzero _β©
+ inv_zero := dif_pos rfl
+ mul_inv_cancel := fun f h => by
+ haveI := is_iso_of_hom_simple h
+ convert is_iso.inv_hom_id f
+ exact dif_neg h }
open FiniteDimensional
@@ -159,12 +159,12 @@ This can't be an instance as `π` would be undetermined.
noncomputable def fieldEndOfFiniteDimensional (X : C) [Simple X] [I : FiniteDimensional π (X βΆ X)] :
Field (End X) := by
classical exact
- { (inferInstance : DivisionRing (End X)) with
- mul_comm := fun f g =>
- by
- obtain β¨c, rflβ© := endomorphism_simple_eq_smul_id π f
- obtain β¨d, rflβ© := endomorphism_simple_eq_smul_id π g
- simp [β mul_smul, mul_comm c d] }
+ { (inferInstance : DivisionRing (End X)) with
+ mul_comm := fun f g =>
+ by
+ obtain β¨c, rflβ© := endomorphism_simple_eq_smul_id π f
+ obtain β¨d, rflβ© := endomorphism_simple_eq_smul_id π g
+ simp [β mul_smul, mul_comm c d] }
#align category_theory.field_End_of_finite_dimensional CategoryTheory.fieldEndOfFiniteDimensional
-- There is a symmetric argument that uses `[finite_dimensional π (Y βΆ Y)]` instead,
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -98,7 +98,7 @@ theorem finrank_hom_simple_simple_eq_zero_of_not_iso [HasKernels C] [Linear π
subsingleton_of_forall_eq (0 : X βΆ Y) fun f =>
by
have p := not_congr (is_iso_iff_nonzero f)
- simp only [Classical.not_not, Ne.def] at p
+ simp only [Classical.not_not, Ne.def] at p
refine' p.mp fun _ => h (as_iso f)
finrank_zero_of_subsingleton
#align category_theory.finrank_hom_simple_simple_eq_zero_of_not_iso CategoryTheory.finrank_hom_simple_simple_eq_zero_of_not_iso
@@ -134,7 +134,7 @@ theorem finrank_endomorphism_eq_one {X : C} (is_iso_iff_nonzero : β f : X βΆ
(by convert I; ext; rfl; ext; rfl) (End.of f)
use c
rw [spectrum.mem_iff, IsUnit.sub_iff, is_unit_iff_is_iso, is_iso_iff_nonzero, Ne.def,
- Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
+ Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
exact nu.symm
#align category_theory.finrank_endomorphism_eq_one CategoryTheory.finrank_endomorphism_eq_one
@@ -196,9 +196,9 @@ theorem finrank_hom_simple_simple_eq_one_iff (X Y : C) [FiniteDimensional π (
by
fconstructor
Β· intro h
- rw [finrank_eq_one_iff'] at h
+ rw [finrank_eq_one_iff'] at h
obtain β¨f, nz, -β© := h
- rw [β is_iso_iff_nonzero] at nz
+ rw [β is_iso_iff_nonzero] at nz
exact β¨as_iso fβ©
Β· rintro β¨fβ©
have le_one := finrank_hom_simple_simple_le_one π X Y
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -218,7 +218,7 @@ theorem finrank_hom_simple_simple_eq_zero_iff (X Y : C) [FiniteDimensional π
Β· exact False.elim (h h')
#align category_theory.finrank_hom_simple_simple_eq_zero_iff CategoryTheory.finrank_hom_simple_simple_eq_zero_iff
-open Classical
+open scoped Classical
theorem finrank_hom_simple_simple (X Y : C) [β X Y : C, FiniteDimensional π (X βΆ Y)] [Simple X]
[Simple Y] : finrank π (X βΆ Y) = if Nonempty (X β
Y) then 1 else 0 :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -131,13 +131,7 @@ theorem finrank_endomorphism_eq_one {X : C} (is_iso_iff_nonzero : β f : X βΆ
haveI : Nontrivial (End X) := nontrivial_of_ne _ _ id_nonzero
obtain β¨c, nuβ© :=
@spectrum.nonempty_of_isAlgClosed_of_finiteDimensional π (End X) _ _ _ _ _
- (by
- convert I
- ext
- rfl
- ext
- rfl)
- (End.of f)
+ (by convert I; ext; rfl; ext; rfl) (End.of f)
use c
rw [spectrum.mem_iff, IsUnit.sub_iff, is_unit_iff_is_iso, is_iso_iff_nonzero, Ne.def,
Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
@@ -217,10 +211,7 @@ theorem finrank_hom_simple_simple_eq_zero_iff (X Y : C) [FiniteDimensional π
[FiniteDimensional π (X βΆ Y)] [Simple X] [Simple Y] : finrank π (X βΆ Y) = 0 β IsEmpty (X β
Y) :=
by
rw [β not_nonempty_iff, β not_congr (finrank_hom_simple_simple_eq_one_iff π X Y)]
- refine'
- β¨fun h => by
- rw [h]
- simp, fun h => _β©
+ refine' β¨fun h => by rw [h]; simp, fun h => _β©
have := finrank_hom_simple_simple_le_one π X Y
interval_cases h' : finrank π (X βΆ Y)
Β· exact h'
mathlib commit https://github.com/leanprover-community/mathlib/commit/5ec62c8106221a3f9160e4e4fcc3eed79fe213e9
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel, Scott Morrison
! This file was ported from Lean 3 source module category_theory.preadditive.schur
-! leanprover-community/mathlib commit 829895f162a1f29d0133f4b3538f4cd1fb5bffd3
+! leanprover-community/mathlib commit 5ec62c8106221a3f9160e4e4fcc3eed79fe213e9
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -126,8 +126,7 @@ theorem finrank_endomorphism_eq_one {X : C} (is_iso_iff_nonzero : β f : X βΆ
[I : FiniteDimensional π (X βΆ X)] : finrank π (X βΆ X) = 1 :=
by
have id_nonzero := (is_iso_iff_nonzero (π X)).mp (by infer_instance)
- apply finrank_eq_one (π X)
- Β· exact id_nonzero
+ refine' finrank_eq_one (π X) id_nonzero _
Β· intro f
haveI : Nontrivial (End X) := nontrivial_of_ne _ _ id_nonzero
obtain β¨c, nuβ© :=
@@ -191,7 +190,7 @@ theorem finrank_hom_simple_simple_le_one (X Y : C) [FiniteDimensional π (X
exact zero_le_one
Β· obtain β¨f, nzβ© := (nontrivial_iff_exists_ne 0).mp h
haveI fi := (is_iso_iff_nonzero f).mpr nz
- apply finrank_le_one f
+ refine' finrank_le_one f _
intro g
obtain β¨c, wβ© := endomorphism_simple_eq_smul_id π (g β« inv f)
exact β¨c, by simpa using w =β« fβ©
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -206,8 +206,8 @@ open scoped Classical
theorem finrank_hom_simple_simple (X Y : C) [β X Y : C, FiniteDimensional π (X βΆ Y)] [Simple X]
[Simple Y] : finrank π (X βΆ Y) = if Nonempty (X β
Y) then 1 else 0 := by
split_ifs with h
- exact (finrank_hom_simple_simple_eq_one_iff π X Y).2 h
- exact (finrank_hom_simple_simple_eq_zero_iff π X Y).2 (not_nonempty_iff.mp h)
+ Β· exact (finrank_hom_simple_simple_eq_one_iff π X Y).2 h
+ Β· exact (finrank_hom_simple_simple_eq_zero_iff π X Y).2 (not_nonempty_iff.mp h)
#align category_theory.finrank_hom_simple_simple CategoryTheory.finrank_hom_simple_simple
end CategoryTheory
NNRat.cast
(#11203)
Define the canonical coercion from the nonnegative rationals to any division semiring.
From LeanAPAP
@@ -70,6 +70,7 @@ noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X)
rw [dif_neg hf]
haveI := isIso_of_hom_simple hf
exact IsIso.inv_hom_id f
+ nnqsmul := _
qsmul := _
open FiniteDimensional
NNRat.cast
(#12360)
This is the parts of the diff of #11203 which don't mention NNRat.cast
.
where
notation.qsmul := _
instead of qsmul := qsmulRec _
to make the instances more robust to definition changes.qsmulRec
.qsmul
before ratCast_def
in instance declarations.rat_smul
to qsmul
.@@ -58,25 +58,19 @@ theorem isIso_iff_nonzero [HasKernels C] {X Y : C} [Simple X] [Simple Y] (f : X
fun w => isIso_of_hom_simple wβ©
#align category_theory.is_iso_iff_nonzero CategoryTheory.isIso_iff_nonzero
+open scoped Classical in
/-- In any preadditive category with kernels,
-the endomorphisms of a simple object form a division ring.
--/
-noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X) := by
- classical exact
- { (inferInstance : Ring (End X)) with
- inv := fun f =>
- if h : f = 0 then 0
- else
- haveI := isIso_of_hom_simple h
- inv f
- exists_pair_ne := β¨π X, 0, id_nonzero _β©
- inv_zero := dif_pos rfl
- mul_inv_cancel := fun f h => by
- dsimp
- rw [dif_neg h]
- haveI := isIso_of_hom_simple h
- exact IsIso.inv_hom_id f
- qsmul := qsmulRec _ }
+the endomorphisms of a simple object form a division ring. -/
+noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X) where
+ inv f := if h : f = 0 then 0 else haveI := isIso_of_hom_simple h; inv f
+ exists_pair_ne := β¨π X, 0, id_nonzero _β©
+ inv_zero := dif_pos rfl
+ mul_inv_cancel f hf := by
+ dsimp
+ rw [dif_neg hf]
+ haveI := isIso_of_hom_simple hf
+ exact IsIso.inv_hom_id f
+ qsmul := _
open FiniteDimensional
@@ -92,7 +92,7 @@ theorem finrank_hom_simple_simple_eq_zero_of_not_iso [HasKernels C] [Linear π
haveI :=
subsingleton_of_forall_eq (0 : X βΆ Y) fun f => by
have p := not_congr (isIso_iff_nonzero f)
- simp only [Classical.not_not, Ne.def] at p
+ simp only [Classical.not_not, Ne] at p
exact p.mp fun _ => h (asIso f)
finrank_zero_of_subsingleton
#align category_theory.finrank_hom_simple_simple_eq_zero_of_not_iso CategoryTheory.finrank_hom_simple_simple_eq_zero_of_not_iso
@@ -125,7 +125,7 @@ theorem finrank_endomorphism_eq_one {X : C} (isIso_iff_nonzero : β f : X βΆ X
have : FiniteDimensional π (End X) := I
obtain β¨c, nuβ© := spectrum.nonempty_of_isAlgClosed_of_finiteDimensional π (End.of f)
use c
- rw [spectrum.mem_iff, IsUnit.sub_iff, isUnit_iff_isIso, isIso_iff_nonzero, Ne.def,
+ rw [spectrum.mem_iff, IsUnit.sub_iff, isUnit_iff_isIso, isIso_iff_nonzero, Ne,
Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
exact nu.symm
#align category_theory.finrank_endomorphism_eq_one CategoryTheory.finrank_endomorphism_eq_one
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -29,7 +29,6 @@ namespace CategoryTheory
open CategoryTheory.Limits
variable {C : Type*} [Category C]
-
variable [Preadditive C]
-- See also `epi_of_nonzero_to_simple`, which does not require `Preadditive C`.
@@ -101,7 +100,6 @@ theorem finrank_hom_simple_simple_eq_zero_of_not_iso [HasKernels C] [Linear π
end
variable (π : Type*) [Field π]
-
variable [IsAlgClosed π] [Linear π C]
-- Porting note: the defeq issue in lean3 described below is no longer a problem in Lean4.
@@ -76,7 +76,8 @@ noncomputable instance [HasKernels C] {X : C} [Simple X] : DivisionRing (End X)
dsimp
rw [dif_neg h]
haveI := isIso_of_hom_simple h
- exact IsIso.inv_hom_id f }
+ exact IsIso.inv_hom_id f
+ qsmul := qsmulRec _ }
open FiniteDimensional
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -103,7 +103,7 @@ variable (π : Type*) [Field π]
variable [IsAlgClosed π] [Linear π C]
--- porting note: the defeq issue in lean3 described below is no longer a problem in Lean4.
+-- Porting note: the defeq issue in lean3 described below is no longer a problem in Lean4.
-- In the proof below we have some difficulty using `I : FiniteDimensional π (X βΆ X)`
-- where we need a `FiniteDimensional π (End X)`.
-- These are definitionally equal, but without eta reduction Lean can't see this.
I ran tryAtEachStep on all files under Mathlib
to find all locations where omega
succeeds. For each that was a linarith
without an only
, I tried replacing it with omega
, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesop
s along the way.
@@ -193,7 +193,7 @@ theorem finrank_hom_simple_simple_eq_one_iff (X Y : C) [FiniteDimensional π (
have le_one := finrank_hom_simple_simple_le_one π X Y
have zero_lt : 0 < finrank π (X βΆ Y) :=
finrank_pos_iff_exists_ne_zero.mpr β¨f.hom, (isIso_iff_nonzero f.hom).mp inferInstanceβ©
- linarith
+ omega
#align category_theory.finrank_hom_simple_simple_eq_one_iff CategoryTheory.finrank_hom_simple_simple_eq_one_iff
theorem finrank_hom_simple_simple_eq_zero_iff (X Y : C) [FiniteDimensional π (X βΆ X)]
refine
s (#10762)
I replaced a few "terminal" refine/refine'
s with exact
.
The strategy was very simple-minded: essentially any refine
whose following line had smaller indentation got replaced by exact
and then I cleaned up the mess.
This PR certainly leaves some further terminal refine
s, but maybe the current change is beneficial.
@@ -93,7 +93,7 @@ theorem finrank_hom_simple_simple_eq_zero_of_not_iso [HasKernels C] [Linear π
subsingleton_of_forall_eq (0 : X βΆ Y) fun f => by
have p := not_congr (isIso_iff_nonzero f)
simp only [Classical.not_not, Ne.def] at p
- refine' p.mp fun _ => h (asIso f)
+ exact p.mp fun _ => h (asIso f)
finrank_zero_of_subsingleton
#align category_theory.finrank_hom_simple_simple_eq_zero_of_not_iso CategoryTheory.finrank_hom_simple_simple_eq_zero_of_not_iso
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -28,7 +28,7 @@ namespace CategoryTheory
open CategoryTheory.Limits
-variable {C : Type _} [Category C]
+variable {C : Type*} [Category C]
variable [Preadditive C]
@@ -82,7 +82,7 @@ open FiniteDimensional
section
-variable (π : Type _) [DivisionRing π]
+variable (π : Type*) [DivisionRing π]
/-- Part of **Schur's lemma** for `π`-linear categories:
the hom space between two non-isomorphic simple objects is 0-dimensional.
@@ -99,7 +99,7 @@ theorem finrank_hom_simple_simple_eq_zero_of_not_iso [HasKernels C] [Linear π
end
-variable (π : Type _) [Field π]
+variable (π : Type*) [Field π]
variable [IsAlgClosed π] [Linear π C]
@@ -2,11 +2,6 @@
Copyright (c) 2020 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel, Scott Morrison
-
-! This file was ported from Lean 3 source module category_theory.preadditive.schur
-! leanprover-community/mathlib commit 58a272265b5e05f258161260dd2c5d247213cbd3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Group.Ext
import Mathlib.CategoryTheory.Simple
@@ -14,6 +9,8 @@ import Mathlib.CategoryTheory.Linear.Basic
import Mathlib.CategoryTheory.Endomorphism
import Mathlib.FieldTheory.IsAlgClosed.Spectrum
+#align_import category_theory.preadditive.schur from "leanprover-community/mathlib"@"58a272265b5e05f258161260dd2c5d247213cbd3"
+
/-!
# Schur's lemma
We first prove the part of Schur's Lemma that holds in any preadditive category with kernels,
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.
@@ -206,7 +206,7 @@ theorem finrank_hom_simple_simple_eq_zero_iff (X Y : C) [FiniteDimensional π
refine' β¨fun h => by rw [h]; simp, fun h => _β©
have := finrank_hom_simple_simple_le_one π X Y
interval_cases finrank π (X βΆ Y)
- . rfl
+ Β· rfl
Β· exact False.elim (h rfl)
#align category_theory.finrank_hom_simple_simple_eq_zero_iff CategoryTheory.finrank_hom_simple_simple_eq_zero_iff
@@ -58,7 +58,8 @@ theorem isIso_iff_nonzero [HasKernels C] {X Y : C} [Simple X] [Simple Y] (f : X
β¨fun I => by
intro h
apply id_nonzero X
- simp only [β IsIso.hom_inv_id f, h, zero_comp], fun w => isIso_of_hom_simple wβ©
+ simp only [β IsIso.hom_inv_id f, h, zero_comp],
+ fun w => isIso_of_hom_simple wβ©
#align category_theory.is_iso_iff_nonzero CategoryTheory.isIso_iff_nonzero
/-- In any preadditive category with kernels,
@@ -123,14 +124,14 @@ theorem finrank_endomorphism_eq_one {X : C} (isIso_iff_nonzero : β f : X βΆ X
[I : FiniteDimensional π (X βΆ X)] : finrank π (X βΆ X) = 1 := by
have id_nonzero := (isIso_iff_nonzero (π X)).mp (by infer_instance)
refine' finrank_eq_one (π X) id_nonzero _
- Β· intro f
- have : Nontrivial (End X) := nontrivial_of_ne _ _ id_nonzero
- have : FiniteDimensional π (End X) := I
- obtain β¨c, nuβ© := spectrum.nonempty_of_isAlgClosed_of_finiteDimensional π (End.of f)
- use c
- rw [spectrum.mem_iff, IsUnit.sub_iff, isUnit_iff_isIso, isIso_iff_nonzero, Ne.def,
- Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
- exact nu.symm
+ intro f
+ have : Nontrivial (End X) := nontrivial_of_ne _ _ id_nonzero
+ have : FiniteDimensional π (End X) := I
+ obtain β¨c, nuβ© := spectrum.nonempty_of_isAlgClosed_of_finiteDimensional π (End.of f)
+ use c
+ rw [spectrum.mem_iff, IsUnit.sub_iff, isUnit_iff_isIso, isIso_iff_nonzero, Ne.def,
+ Classical.not_not, sub_eq_zero, Algebra.algebraMap_eq_smul_one] at nu
+ exact nu.symm
#align category_theory.finrank_endomorphism_eq_one CategoryTheory.finrank_endomorphism_eq_one
variable [HasKernels C]
@@ -172,8 +173,7 @@ for the refinements when we know whether or not the simples are isomorphic.
theorem finrank_hom_simple_simple_le_one (X Y : C) [FiniteDimensional π (X βΆ X)] [Simple X]
[Simple Y] : finrank π (X βΆ Y) β€ 1 := by
obtain (h|h) := subsingleton_or_nontrivial (X βΆ Y)
- Β· skip
- rw [finrank_zero_of_subsingleton]
+ Β· rw [finrank_zero_of_subsingleton]
exact zero_le_one
Β· obtain β¨f, nzβ© := (nontrivial_iff_exists_ne 0).mp h
haveI fi := (isIso_iff_nonzero f).mpr nz
The unported dependencies are