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] - docs(data/pnat): add module docstrings #7960

Closed
wants to merge 2 commits into from

Conversation

YaelDillies
Copy link
Collaborator


I don't like those two files, xgcd in particular, for several reasons:

For xgcd,

  • xgcd_type is literally ℕ × ℕ × ℕ × ℕ × ℕ × ℕ with custom fields names. At least is_special could be bundled with it.
  • It basically is nat.xgcd (which already existed at the time of Neil Strickland's commit, feat (data/pnat): extensions to pnat  #1073) but with no mention to .
  • Instead of proving an equivalence between a definition and another condition, it defines this other condition separately and then proves its equivalence with the original one (see is_special/is_special', is_reduced/is_reduced'), and this isn't justified by defeq concerns or similar.
  • It outsources all steps out of the algorithm while it's not very long and none of these steps is truly useful beyond that scope. This results in multiple lemmas being sexplicated.

For factors,

  • Most of the file is rederiving instances by hand, from the fact that prime_multiset is a subtype.
  • It is not general enough.

Neither file is ever imported, which suggests that they are currently of limited use.

Any opinion?
Open in Gitpod

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR lintfix This PR only fixes linting errors labels Jun 16, 2021
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks. I have one comment about the module docstring. If you agree, please merge the suggestion and kick this on the queue.

bors d+

(Sorry for being so late with the review.)

src/data/pnat/factors.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Jun 22, 2021

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

@github-actions github-actions bot 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 Jun 22, 2021
Co-authored-by: Johan Commelin <johan@commelin.net>
@YaelDillies
Copy link
Collaborator Author

bors merge

bors bot pushed a commit that referenced this pull request Jun 22, 2021
@bors
Copy link

bors bot commented Jun 22, 2021

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Jun 22, 2021
@bors
Copy link

bors bot commented Jun 22, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title docs(data/pnat): add module docstrings [Merged by Bors] - docs(data/pnat): add module docstrings Jun 22, 2021
@bors bors bot closed this Jun 22, 2021
@bors bors bot deleted the yael/pnatfact branch June 22, 2021 13:51
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. lintfix This PR only fixes linting errors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants