-
Notifications
You must be signed in to change notification settings - Fork 48
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
chore: golf a bit #212
chore: golf a bit #212
Conversation
This reverts commit c8a4088.
FLT/Basic/Reductions.lean
Outdated
calc | ||
0 < a * a + a * b + b * b := ?_ | ||
_ = _ := by ring | ||
apply add_pos_of_nonneg_of_pos | ||
apply add_nonneg (mul_self_nonneg _) h | ||
apply mul_self_pos.mpr hb | ||
exact add_pos_of_nonneg_of_pos (add_nonneg (mul_self_nonneg _) h) (mul_self_pos.mpr hb) | ||
| inr h => | ||
rw [sub_pos] | ||
exact h.trans_le (sq_nonneg _) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calc | |
0 < a * a + a * b + b * b := ?_ | |
_ = _ := by ring | |
apply add_pos_of_nonneg_of_pos | |
apply add_nonneg (mul_self_nonneg _) h | |
apply mul_self_pos.mpr hb | |
exact add_pos_of_nonneg_of_pos (add_nonneg (mul_self_nonneg _) h) (mul_self_pos.mpr hb) | |
| inr h => | |
rw [sub_pos] | |
exact h.trans_le (sq_nonneg _) | |
rify | |
calc | |
(0 : ℝ) < (a ^ 2 + (a + b) ^ 2 + b ^ 2) / 2 := by positivity | |
_ = (a + b) ^ 2 - a * b := by ring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you only golfed the first branch of the proof, while my suggestion was to unify the branches. See #212 (comment)
Co-Authored-By: Yaël Dillies <[email protected]>
Co-Authored-By: Yaël Dillies <[email protected]>
Co-Authored-By: Yaël Dillies <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you revert the Frey-Mazur thing? Other than that this is fine.
FLT/Basic/Reductions.lean
Outdated
apply Wiles_Frey P | ||
exact Mazur_Frey P | ||
theorem FreyPackage.false (P : FreyPackage) : False := | ||
Wiles_Frey P (Mazur_Frey P) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this one can be golfed but I think it's nice to leave it as it is. We should really add documentation rather than golfing!
Co-authored-by: Kevin Buzzard <[email protected]>
…eLondon/FLT into pitmonticone/golf
Done @kbuzzard |
Thanks! |
No description provided.