Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - chore: mark neg_div_neg_eq as simp #9332

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib/Algebra/Field/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ theorem neg_div (a b : K) : -b / a = -(b / a) := by
theorem neg_div' (a b : K) : -(b / a) = -b / a := by simp [neg_div]
#align neg_div' neg_div'

@[simp]
theorem neg_div_neg_eq (a b : K) : -a / -b = a / b := by rw [div_neg_eq_neg_div, neg_div, neg_neg]
#align neg_div_neg_eq neg_div_neg_eq

Expand Down
6 changes: 4 additions & 2 deletions Mathlib/NumberTheory/ModularForms/JacobiTheta/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ theorem jacobiTheta_S_smul (τ : ℍ) :
rw [mul_comm ((1 : ℂ) / _) _, mul_one_div, eq_div_iff ha', mul_comm _ (_ ^ _), eq_comm] at this
have expo1 : ∀ n : ℤ, -↑π / (-I * ↑τ) * (n : ℂ) ^ 2 = ↑π * I * (n : ℂ) ^ 2 * (-↑τ)⁻¹ := by
intro n
field_simp [hτ, I_ne_zero]
simp only [neg_mul, neg_div_neg_eq, div_mul_eq_mul_div, inv_eq_one_div, mul_div_assoc', mul_one,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be viewed as a regression? Or is there an explanation why this simp only is morally the better proof?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before it was nonterminal so liable to break

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'm not sure we have a field simp only

ne_eq, neg_eq_zero, hτ, not_false_eq_true, eq_div_iff, I_ne_zero,
mul_ne_zero, div_eq_iff]
ring_nf
rw [I_sq, mul_neg, mul_one, neg_neg]
rw [I_sq, mul_neg, mul_one]
simp_rw [expo1] at this
have expo2 : ∀ n : ℤ, -↑π * (-I * ↑τ) * (n : ℂ) ^ 2 = ↑π * I * (n : ℂ) ^ 2 * ↑τ := by
intro n
Expand Down