Skip to content

Commit

Permalink
make ofHom an abbrev
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisflav committed Nov 19, 2024
1 parent e85aa47 commit 24c84a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Category/AlgebraCat/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ variable {R} in
/-- The type of morphisms in `AlgebraCat R`. -/
@[ext]
structure Hom (A B : AlgebraCat.{v} R) where
private mk ::
/-- The underlying algebra map. -/
hom : A →ₐ[R] B

Expand Down Expand Up @@ -90,11 +91,10 @@ lemma hom_ext {A B : AlgebraCat.{v} R} {f g : A ⟶ B} (hf : f.hom = g.hom) : f
Hom.ext hf

/-- Typecheck an `AlgHom` as a morphism in `AlgebraCat R`. -/
def ofHom {R : Type u} [CommRing R] {X Y : Type v} [Ring X] [Algebra R X] [Ring Y] [Algebra R Y]
abbrev ofHom {R : Type u} [CommRing R] {X Y : Type v} [Ring X] [Algebra R X] [Ring Y] [Algebra R Y]
(f : X →ₐ[R] Y) : of R X ⟶ of R Y :=
⟨f⟩

@[simp]
lemma hom_ofHom {R : Type u} [CommRing R] {X Y : Type v} [Ring X] [Algebra R X] [Ring Y]
[Algebra R Y] (f : X →ₐ[R] Y) : (ofHom f).hom = f := rfl

Expand Down

0 comments on commit 24c84a4

Please sign in to comment.