Skip to content

Commit

Permalink
chore(Algebra/Quandle): use FunLike (#6463)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Aug 9, 2023
1 parent a2c3434 commit ee7bea2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Mathlib/Algebra/Quandle.lean
Expand Up @@ -358,14 +358,12 @@ namespace ShelfHom

variable {S₁ : Type _} {S₂ : Type _} {S₃ : Type _} [Shelf S₁] [Shelf S₂] [Shelf S₃]

instance : CoeFun (S₁ →◃ S₂) fun _ => S₁ → S₂ :=
⟨ShelfHom.toFun⟩

-- Porting Note: Syntactically equal in Lean4
-- @[simp]
-- theorem toFun_eq_coe (f : S₁ →◃ S₂) : f.toFun = f :=
-- rfl
#noalign shelf_hom.to_fun_eq_coe
instance : FunLike (S₁ →◃ S₂) S₁ fun _ => S₂ where
coe := toFun
coe_injective' | ⟨_, _⟩, ⟨_, _⟩, rfl => rfl

@[simp] theorem toFun_eq_coe (f : S₁ →◃ S₂) : f.toFun = f := rfl
#align shelf_hom.to_fun_eq_coe ShelfHom.toFun_eq_coe

@[simp]
theorem map_act (f : S₁ →◃ S₂) {x y : S₁} : f (x ◃ y) = f x ◃ f y :=
Expand Down

0 comments on commit ee7bea2

Please sign in to comment.