Skip to content

Commit 4335474

Browse files
committed
chore(CategoryTheory): rename ConcreteCategory to HasForget (leanprover-community#20809)
This is the first step towards a concrete category redesign, as outlined in this Zulip post: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Concrete.20category.20class.20redesign/near/493903980 This commit was generated by find-and-replacing `ConcreteCategory` and `concreteCategory` with `HasForget` and `hasForget` respectively, making sure not to touch imports. I did not look too closely at the changes, since we should be going over everything during the redesign anyway. `ConcreteCategory` is now temporarily an alias for `HasForget`, with a deprecation warning. The `ConcreteCategory` namespace itself was not renamed, since we'll eventually be redoing those results for the new `ConcreteCategory` class.
1 parent 3830035 commit 4335474

File tree

139 files changed

+369
-359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+369
-359
lines changed

Mathlib/Algebra/Category/AlgebraCat/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ lemma hom_inv_apply {A B : AlgebraCat.{v} R} (e : A ≅ B) (x : B) : e.hom (e.in
127127
instance : Inhabited (AlgebraCat R) :=
128128
⟨of R R⟩
129129

130-
instance : ConcreteCategory.{v} (AlgebraCat.{v} R) where
130+
instance : HasForget.{v} (AlgebraCat.{v} R) where
131131
forget :=
132132
{ obj := fun R => R
133133
map := fun f => f.hom }

Mathlib/Algebra/Category/BialgebraCat/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ abbrev ofHom {X Y : Type v} [Ring X] [Ring Y]
9595
Hom.toBialgHom (𝟙 M) = BialgHom.id _ _ :=
9696
rfl
9797

98-
instance concreteCategory : ConcreteCategory.{v} (BialgebraCat.{v} R) where
98+
instance hasForget : HasForget.{v} (BialgebraCat.{v} R) where
9999
forget :=
100100
{ obj := fun M => M
101101
map := fun f => f.toBialgHom }

Mathlib/Algebra/Category/BoolRing.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ lemma hom_ext {R S : BoolRing} {f g : R ⟶ S} (hf : f.hom = g.hom) : f = g :=
7171
abbrev ofHom {R S : Type u} [BooleanRing R] [BooleanRing S] (f : R →+* S) : of R ⟶ of S :=
7272
⟨f⟩
7373

74-
instance : ConcreteCategory BoolRing where
74+
instance : HasForget BoolRing where
7575
forget :=
7676
{ obj := fun R ↦ R
7777
map := fun f ↦ f.hom }

Mathlib/Algebra/Category/CoalgebraCat/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ abbrev ofHom {X Y : Type v} [AddCommGroup X] [Module R X] [AddCommGroup Y] [Modu
9696
Hom.toCoalgHom (𝟙 M) = CoalgHom.id _ _ :=
9797
rfl
9898

99-
instance concreteCategory : ConcreteCategory.{v} (CoalgebraCat.{v} R) where
99+
instance hasForget : HasForget.{v} (CoalgebraCat.{v} R) where
100100
forget :=
101101
{ obj := fun M => M
102102
map := fun f => f.toCoalgHom }

Mathlib/Algebra/Category/FGModuleCat/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def FGModuleCat :=
4646
FullSubcategory fun V : ModuleCat.{u} R => Module.Finite R V
4747
-- Porting note: still no derive handler via `dsimp`.
4848
-- see https://github.com/leanprover-community/mathlib4/issues/5020
49-
-- deriving LargeCategory, ConcreteCategory,Preadditive
49+
-- deriving LargeCategory, HasForget,Preadditive
5050

5151
variable {R}
5252

@@ -72,7 +72,7 @@ instance : LargeCategory (FGModuleCat R) := by
7272
dsimp [FGModuleCat]
7373
infer_instance
7474

75-
instance : ConcreteCategory (FGModuleCat R) := by
75+
instance : HasForget (FGModuleCat R) := by
7676
dsimp [FGModuleCat]
7777
infer_instance
7878

Mathlib/Algebra/Category/Grp/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ deriving instance LargeCategory for Grp
4242
attribute [to_additive] instGrpLargeCategory
4343

4444
@[to_additive]
45-
instance concreteCategory : ConcreteCategory Grp := by
45+
instance hasForget : HasForget Grp := by
4646
dsimp only [Grp]
4747
infer_instance
4848

@@ -171,7 +171,7 @@ deriving instance LargeCategory for CommGrp
171171
attribute [to_additive] instCommGrpLargeCategory
172172

173173
@[to_additive]
174-
instance concreteCategory : ConcreteCategory CommGrp := by
174+
instance hasForget : HasForget CommGrp := by
175175
dsimp only [CommGrp]
176176
infer_instance
177177

Mathlib/Algebra/Category/Grp/FiniteGrp.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ instance : CoeSort FiniteGrp.{u} (Type u) where
4444
instance : Category FiniteGrp := InducedCategory.category FiniteGrp.toGrp
4545

4646
@[to_additive]
47-
instance : ConcreteCategory FiniteGrp := InducedCategory.concreteCategory FiniteGrp.toGrp
47+
instance : HasForget FiniteGrp := InducedCategory.hasForget FiniteGrp.toGrp
4848

4949
@[to_additive]
5050
instance (G : FiniteGrp) : Group G := inferInstanceAs <| Group G.toGrp

Mathlib/Algebra/Category/GrpWithZero.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ lemma coe_id {X : GrpWithZero} : (𝟙 X : X → X) = id := rfl
5656

5757
lemma coe_comp {X Y Z : GrpWithZero} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
5858

59-
instance groupWithZeroConcreteCategory : ConcreteCategory GrpWithZero where
59+
instance groupWithZeroHasForget : HasForget GrpWithZero where
6060
forget :=
6161
{ obj := fun G => G
6262
map := fun f => f.toFun }

Mathlib/Algebra/Category/HopfAlgebraCat/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ abbrev ofHom {X Y : Type v} [Ring X] [Ring Y]
9494
Hom.toBialgHom (𝟙 M) = BialgHom.id _ _ :=
9595
rfl
9696

97-
instance concreteCategory : ConcreteCategory.{v} (HopfAlgebraCat.{v} R) where
97+
instance hasForget : HasForget.{v} (HopfAlgebraCat.{v} R) where
9898
forget :=
9999
{ obj := fun M => M
100100
map := fun f => f.toBialgHom }

Mathlib/Algebra/Category/ModuleCat/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ end
188188
instance : Inhabited (ModuleCat R) :=
189189
⟨of R R⟩
190190

191-
instance moduleConcreteCategory : ConcreteCategory.{v} (ModuleCat.{v} R) where
191+
instance moduleHasForget : HasForget.{v} (ModuleCat.{v} R) where
192192
forget :=
193193
{ obj := fun R => R
194194
map := fun f => f.hom }

0 commit comments

Comments
 (0)