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] - refactor(algebra/order/ring): turn sq_le_sq into an iff #14511

Closed
wants to merge 1 commit into from

Conversation

urkud
Copy link
Member

@urkud urkud commented Jun 2, 2022

  • sq_le_sq and sq_lt_sq are now iff lemmas;
  • drop abs_le_abs_of_sq_le_sq and abs_lt_abs_of_sq_lt_sq.

Open in Gitpod

@urkud urkud added the awaiting-review The author would like community review of the PR label Jun 2, 2022
@@ -341,57 +341,46 @@ by simpa only [sq] using abs_mul_abs_self x
theorem abs_sq (x : R) : |x ^ 2| = x ^ 2 :=
by simpa only [sq] using abs_mul_self x

theorem sq_lt_sq (h : |x| < |y|) : x ^ 2 < y ^ 2 :=
by simpa only [sq_abs] using pow_lt_pow_of_lt_left h (abs_nonneg x) (1:ℕ).succ_pos
theorem sq_lt_sq : x ^ 2 < y ^ 2 ↔ |x| < |y| :=
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be called sq_lt_sq_iff or something like that?

Copy link
Member Author

Choose a reason for hiding this comment

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

We're not very consistent about iffs. E.g., we have sub_pos. Formally, this should be something like sq_lt_sq_iff_abs_lt_abs but this is to long.

@riccardobrasca
Copy link
Member

Thanks!

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Jun 3, 2022
bors bot pushed a commit that referenced this pull request Jun 3, 2022
* `sq_le_sq` and `sq_lt_sq` are now `iff` lemmas;
* drop `abs_le_abs_of_sq_le_sq` and `abs_lt_abs_of_sq_lt_sq`.
@bors
Copy link

bors bot commented Jun 3, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(algebra/order/ring): turn sq_le_sq into an iff [Merged by Bors] - refactor(algebra/order/ring): turn sq_le_sq into an iff Jun 3, 2022
@bors bors bot closed this Jun 3, 2022
@bors bors bot deleted the YK-sq-le-sq branch June 3, 2022 18:16
tomaz1502 pushed a commit that referenced this pull request Jun 3, 2022
* `sq_le_sq` and `sq_lt_sq` are now `iff` lemmas;
* drop `abs_le_abs_of_sq_le_sq` and `abs_lt_abs_of_sq_lt_sq`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants