Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Conversation

@khwilson
Copy link
Collaborator

@khwilson khwilson commented Mar 27, 2022

Introduce some decidability predicates for N and Z while also proving that a natural number is a square if and only if every one of its (maximal) prime power divisors is an even power.


Open in Gitpod

adomani and others added 8 commits March 22, 2022 13:20
There is already a concept of `even` and `odd`, but not of `square`.
These are some initial lemmas about being a square that I use in the
proof of the density of squarefree integers.

Note that this also introduces the notation `sqrt0`, which is `0` if its
argument is not a square and otherwise is its squareroot. This is in
line with `real.sqrt`'s behavior on negative numbers. However, the name
perhaps could use some work?
@khwilson khwilson added the awaiting-review The author would like community review of the PR label Mar 27, 2022
Copy link
Collaborator

@vihdzp vihdzp left a comment

Choose a reason for hiding this comment

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

tl;dr there's tons of golfing to be done, and also you should look into whether your theorems can be generalized if you don't already plan on doing so.

khwilson and others added 6 commits March 28, 2022 08:00
Co-authored-by: Violeta Hernández <vi.hdz.p@gmail.com>
Co-authored-by: Violeta Hernández <vi.hdz.p@gmail.com>
Co-authored-by: Violeta Hernández <vi.hdz.p@gmail.com>
@khwilson
Copy link
Collaborator Author

Thanks for the review @vihdzp ! Comments addressed, with a couple questions inline :-)

@khwilson
Copy link
Collaborator Author

Thanks again @vihdzp . Responded to your comments and added a long note in the code to address the UFM generalization

@Ruben-VandeVelde
Copy link
Collaborator

I think @adomani was looking into this as well

@adomani
Copy link
Collaborator

adomani commented Mar 29, 2022

Yes, I am indeed going to add is_square (and even as its to_additive partner). This may take a few days though, since, at the moment, I have only moved most relevant even lemmas to the same file, but have not yet changed the definition.

khwilson and others added 2 commits April 21, 2022 12:35
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Apr 22, 2022
@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Apr 24, 2022
@khwilson
Copy link
Collaborator Author

OK, assuming that this run goes fine, I think it's good to merge modulo one outstanding question from @jcommelin . So just bumping for him. :-)

@khwilson
Copy link
Collaborator Author

khwilson commented May 8, 2022

@jcommelin just bumping vis-a-vis the names! Thanks!!

@YaelDillies
Copy link
Collaborator

I just fixed the conflicts. I think that's ready?

@mathlib-dependent-issues-bot mathlib-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Sep 8, 2022
@khwilson
Copy link
Collaborator Author

khwilson commented Sep 8, 2022

Thanks for coming back to this! It looks fine to me at this point, beyond the obvious build issues :-)

@YaelDillies
Copy link
Collaborator

I split off the changes in algebra.parity to #16430 (feel free to add a Co-authored-by line there with your email address!). I expect the rest of this PR to be verbatim generalisable to UFDs, so I'll try doing that once #16430 goes through.

@khwilson
Copy link
Collaborator Author

khwilson commented Sep 8, 2022

Oh, very nice. Not sure how to add a Co-authored-by, but appreciate it.

@mathlib-dependent-issues-bot mathlib-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Sep 10, 2022
@mathlib-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

@jcommelin
Copy link
Member

Build is failing...

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Sep 12, 2022
@kim-em kim-em added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

awaiting-author A reviewer has asked the author a question or requested changes too-late This PR was ready too late for inclusion in mathlib3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants