Skip to content

Commit

Permalink
refactor: avoid passing both directions of a lemma to simp
Browse files Browse the repository at this point in the history
this only works by chance, in a way, and will break when
leanprover/lean4#5870 lands
  • Loading branch information
nomeata committed Oct 29, 2024
1 parent 7bf2901 commit 0b01e55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Mathlib/CategoryTheory/Adjunction/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ def homEquiv {F : C ⥤ D} {G : D ⥤ C} (adj : F ⊣ G) (X : C) (Y : D) :
rw [F.map_comp, assoc, ← Functor.comp_map, adj.counit.naturality, ← assoc]
simp
right_inv := fun g => by
simp [← assoc, ← Functor.comp_map, ← adj.unit.naturality, assoc]
simp only [Functor.comp_obj, Functor.map_comp]
rw [← assoc, ← Functor.comp_map, ← adj.unit.naturality]
simp

alias homEquiv_unit := homEquiv_apply
alias homEquiv_counit := homEquiv_symm_apply
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/NumberTheory/Bernoulli.lean
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def bernoulli (n : ℕ) : ℚ :=
(-1) ^ n * bernoulli' n

theorem bernoulli'_eq_bernoulli (n : ℕ) : bernoulli' n = (-1) ^ n * bernoulli n := by
simp [bernoulli, ← mul_assoc, ← sq, ← pow_mul, mul_comm n 2, pow_mul]
simp [bernoulli, ← mul_assoc, ← sq, ← pow_mul, mul_comm n 2]

@[simp]
theorem bernoulli_zero : bernoulli 0 = 1 := by simp [bernoulli]
Expand Down

0 comments on commit 0b01e55

Please sign in to comment.