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] - feat(data/int/basic algebra/associated): is_unit (a : ℤ) iff a = ±1 #7058

Closed
wants to merge 11 commits into from

Conversation

adomani
Copy link
Collaborator

@adomani adomani commented Apr 6, 2021

Besides the title lemma, this PR also moves lemma is_unit_int from algebra/associated to data/int/basic.

Co-authored-by: Eric Wieser wieser.eric@gmail.com
Co-authored-by: Ruben Van de Velde 65514131+Ruben-VandeVelde@users.noreply.github.com


Open in Gitpod

src/data/int/basic.lean Outdated Show resolved Hide resolved
adomani and others added 2 commits April 6, 2021 11:31
src/data/int/basic.lean Outdated Show resolved Hide resolved
@adomani adomani added the awaiting-review The author would like community review of the PR label Apr 6, 2021
src/data/int/basic.lean Outdated Show resolved Hide resolved
src/data/int/basic.lean Outdated Show resolved Hide resolved
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@eric-wieser
Copy link
Member

eric-wieser commented Apr 6, 2021

You asked on the zulip thread about where a good place for is_unit.neg would be - I think shortly after units.coe_neg would be a good place, in algebra/ring/basic

lemma is_unit.neg {α : Type*} [ring α] {a : α} : is_unit a → is_unit (-a)
| ⟨x, hx⟩ := hx ▸ (-x).is_unit

src/data/int/basic.lean Outdated Show resolved Hide resolved
adomani and others added 2 commits April 6, 2021 14:48
Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Thanks!

bors d+

@bors
Copy link

bors bot commented Apr 6, 2021

✌️ adomani can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@adomani
Copy link
Collaborator Author

adomani commented Apr 6, 2021

Thank you for all your help! I will wait for CI to finish and will push the PR onto the queue!

@eric-wieser eric-wieser added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Apr 6, 2021
@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Apr 6, 2021
bors bot pushed a commit that referenced this pull request Apr 6, 2021
…7058)

Besides the title lemma, this PR also moves lemma `is_unit_int` from `algebra/associated` to `data/int/basic`.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>



Co-authored-by: Ruben-VandeVelde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@bors
Copy link

bors bot commented Apr 7, 2021

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Apr 7, 2021
…7058)

Besides the title lemma, this PR also moves lemma `is_unit_int` from `algebra/associated` to `data/int/basic`.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>



Co-authored-by: Ruben-VandeVelde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@bors
Copy link

bors bot commented Apr 7, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/int/basic algebra/associated): is_unit (a : ℤ) iff a = ±1 [Merged by Bors] - feat(data/int/basic algebra/associated): is_unit (a : ℤ) iff a = ±1 Apr 7, 2021
@bors bors bot closed this Apr 7, 2021
@bors bors bot deleted the adomani_int_nat_abs branch April 7, 2021 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. 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

4 participants