Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 8c64be0

Browse files
committed
chore(category_theory/abelian): Moved more stuff into pseudoelement locale (#11621)
The `ext` lemma triggers unwantedly in lots of places.
1 parent 8f73b07 commit 8c64be0

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/category_theory/abelian/diagram_lemmas/four.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ universes v u
5555
variables {V : Type u} [category.{v} V] [abelian V]
5656

5757
local attribute [instance] preadditive.has_equalizers_of_has_kernels
58-
local attribute [instance] object_to_sort hom_to_fun
5958

6059
open_locale pseudoelement
6160

src/category_theory/abelian/pseudoelements.lean

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ def object_to_sort : has_coe_to_sort C (Type (max u v)) :=
137137

138138
local attribute [instance] object_to_sort
139139

140+
localized "attribute [instance] category_theory.abelian.pseudoelement.object_to_sort"
141+
in pseudoelement
142+
140143
/-- A coercion from an arrow with codomain `P` to its associated pseudoelement. -/
141144
def over_to_sort {P : C} : has_coe (over P) (pseudoelement P) :=
142145
⟨quot.mk (pseudo_equal P)⟩
@@ -160,6 +163,8 @@ def hom_to_fun {P Q : C} : has_coe_to_fun (P ⟶ Q) (λ _, P → Q) := ⟨pseudo
160163

161164
local attribute [instance] hom_to_fun
162165

166+
localized "attribute [instance] category_theory.abelian.pseudoelement.hom_to_fun" in pseudoelement
167+
163168
lemma pseudo_apply_mk {P Q : C} (f : P ⟶ Q) (a : over P) : f ⟦a⟧ = ⟦a.hom ≫ f⟧ :=
164169
rfl
165170

@@ -231,12 +236,15 @@ quotient.induction_on a $ λ a',
231236
by { rw [pseudo_zero_def, pseudo_apply_mk], simp }
232237

233238
/-- An extensionality lemma for being the zero arrow. -/
234-
@[ext] theorem zero_morphism_ext {P Q : C} (f : P ⟶ Q) : (∀ a, f a = 0) → f = 0 :=
239+
theorem zero_morphism_ext {P Q : C} (f : P ⟶ Q) : (∀ a, f a = 0) → f = 0 :=
235240
λ h, by { rw ←category.id_comp f, exact (pseudo_zero_iff ((𝟙 P ≫ f) : over Q)).1 (h (𝟙 P)) }
236241

237-
@[ext] theorem zero_morphism_ext' {P Q : C} (f : P ⟶ Q) : (∀ a, f a = 0) → 0 = f :=
242+
theorem zero_morphism_ext' {P Q : C} (f : P ⟶ Q) : (∀ a, f a = 0) → 0 = f :=
238243
eq.symm ∘ zero_morphism_ext f
239244

245+
localized "attribute [ext] category_theory.abelian.pseudoelement.zero_morphism_ext
246+
category_theory.abelian.pseudoelement.zero_morphism_ext'" in pseudoelement
247+
240248
theorem eq_zero_iff {P Q : C} (f : P ⟶ Q) : f = 0 ↔ ∀ a, f a = 0 :=
241249
⟨λ h a, by simp [h], zero_morphism_ext _⟩
242250

0 commit comments

Comments
 (0)