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/nat/factorization/basic): define ord_proj[p] and ord_compl[p], prove basic lemmas #15589

Closed
wants to merge 48 commits into from

Conversation

stuart-presnell
Copy link
Collaborator

@stuart-presnell stuart-presnell commented Jul 21, 2022

ord_proj[p] n := p ^ (nat.factorization n p) is the largest power of p that divides into n. For p = 2 this is the even part of n.

ord_compl[p] n := n / ord_proj[p] n is the largest divisor of n not divisible by p. For p = 2 this is the odd part of n.

Note that for consistency with the naming of other lemmas introduced in this PR, the following lemmas are renamed:

  • pow_factorization_dvd -> ord_proj_dvd
  • pow_factorization_le -> ord_proj_le
  • not_dvd_div_pow_factorization -> not_dvd_ord_compl
  • coprime_of_div_pow_factorization -> coprime_ord_compl
  • div_pow_factorization_ne_zero -> ord_compl_pos
  • prime.pow_dvd_iff_dvd_pow_factorization -> prime.pow_dvd_iff_dvd_ord_proj

Open in Gitpod

@stuart-presnell stuart-presnell marked this pull request as ready for review July 25, 2022 17:52
@stuart-presnell stuart-presnell added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Jul 25, 2022
Copy link
Collaborator

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

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

Could you add a description of the changed declarations to the PR description, in particular explaining the renames?

src/data/nat/factorization/basic.lean Outdated Show resolved Hide resolved
src/data/nat/factorization/basic.lean Outdated Show resolved Hide resolved
src/data/nat/factorization/basic.lean Outdated Show resolved Hide resolved
src/data/nat/factorization/basic.lean Outdated Show resolved Hide resolved
src/data/nat/factorization/basic.lean Outdated Show resolved Hide resolved
@Vierkantor Vierkantor 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 Aug 16, 2022
@stuart-presnell stuart-presnell added awaiting-CI The author would like to see what CI has to say before doing more work. and removed awaiting-author A reviewer has asked the author a question or requested changes labels Aug 16, 2022
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Aug 16, 2022
@Vierkantor Vierkantor self-assigned this Aug 17, 2022
@Vierkantor Vierkantor added the awaiting-review The author would like community review of the PR label Aug 17, 2022
Copy link
Collaborator

@Vierkantor Vierkantor 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 r+

@leanprover-community-bot-assistant leanprover-community-bot-assistant 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 Aug 17, 2022
bors bot pushed a commit that referenced this pull request Aug 17, 2022
…pl[p]`, prove basic lemmas (#15589)

`ord_proj[p] n := p ^ (nat.factorization n p)` is the largest power of `p` that divides into `n`.  For `p = 2` this is the even part of `n`.

`ord_compl[p] n := n / ord_proj[p] n` is the largest divisor of `n` not divisible by `p`.  For `p = 2` this is the odd part of `n`.

Note that for consistency with the naming of other lemmas introduced in this PR, the following lemmas are renamed:
* `pow_factorization_dvd` -> `ord_proj_dvd`
* `pow_factorization_le` -> `ord_proj_le`
* `not_dvd_div_pow_factorization` -> `not_dvd_ord_compl`
* `coprime_of_div_pow_factorization` -> `coprime_ord_compl`
* `div_pow_factorization_ne_zero` -> `ord_compl_pos`
* `prime.pow_dvd_iff_dvd_pow_factorization` -> `prime.pow_dvd_iff_dvd_ord_proj`
@bors
Copy link

bors bot commented Aug 17, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/nat/factorization/basic): define ord_proj[p] and ord_compl[p], prove basic lemmas [Merged by Bors] - feat(data/nat/factorization/basic): define ord_proj[p] and ord_compl[p], prove basic lemmas Aug 17, 2022
@bors bors bot closed this Aug 17, 2022
@bors bors bot deleted the SP_padic_odd_part branch August 17, 2022 12:09
stuart-presnell added a commit that referenced this pull request Aug 17, 2022
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

4 participants