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(data/nat/*): cleanup data.nat.basic, split data.nat.choose #4135

Closed
wants to merge 12 commits into from

Conversation

bryangingechen
Copy link
Collaborator

This PR rearranges data.nat.basic so the lemmas are now in (hopefully appropriately-named) markdown sections. It also moves several sections (mostly ones that introduced new defs) into new files:

  • data.nat.fact
  • data.nat.psub (maybe this could be named data.nat.partial?)
  • data.nat.log
  • data.nat.with_bot

data.nat.choose has been split into a directory:

  • The definition of nat.choose and basic lemmas about it have been moved from data.nat.basic into data.nat.choose.basic
  • The binomial theorem and related lemmas involving sums are now in data.nat.choose.sum; the following lemmas are now in the nat namespace:
    • sum_range_choose
    • sum_range_choose_halfway
    • choose_middle_le_pow
  • Divisibility properties of binomial coefficients are now in data.nat.choose.dvd.

Other changes:

  • added nat.pow_two_sub_pow_two to data.nat.basic.
  • module docs & doc strings for data.nat.sqrt

Zulip thread.

@bryangingechen bryangingechen added the awaiting-review The author would like community review of the PR label Sep 13, 2020
@jcommelin
Copy link
Member

Thanks a lot for doing this. LGTM.

@robertylewis
Copy link
Member

Wow, thank you Bryan. This looks great. It's a hard diff to read, but I trust your report on the changes!

I'm going to glance over the doc strings a bit later today, but structurally it looks ready to me, and this shouldn't sit for too long.

src/data/nat/basic.lean Outdated Show resolved Hide resolved
src/data/nat/basic.lean Outdated Show resolved Hide resolved
@robertylewis
Copy link
Member

Thanks again!

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 Sep 14, 2020
bors bot pushed a commit that referenced this pull request Sep 14, 2020
…4135)

This PR rearranges `data.nat.basic` so the lemmas are now in (hopefully appropriately-named) markdown sections. It also moves several sections (mostly ones that introduced new `def`s) into new files:
- `data.nat.fact`
- `data.nat.psub` (maybe this could be named `data.nat.partial`?)
- `data.nat.log`
- `data.nat.with_bot`

`data.nat.choose` has been split into a directory:
- The definition of `nat.choose` and basic lemmas about it have been moved from `data.nat.basic` into `data.nat.choose.basic`
- The binomial theorem and related lemmas involving sums are now in `data.nat.choose.sum`; the following lemmas are now in the `nat` namespace:
  - `sum_range_choose`
  - `sum_range_choose_halfway`
  - `choose_middle_le_pow`
- Divisibility properties of binomial coefficients are now in `data.nat.choose.dvd`.

Other changes:
- added `nat.pow_two_sub_pow_two` to `data.nat.basic`.
- module docs & doc strings for `data.nat.sqrt`



Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
@bors
Copy link

bors bot commented Sep 14, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(data/nat/*): cleanup data.nat.basic, split data.nat.choose [Merged by Bors] - refactor(data/nat/*): cleanup data.nat.basic, split data.nat.choose Sep 14, 2020
@bors bors bot closed this Sep 14, 2020
@bors bors bot deleted the cleanup_data_nat_basic branch September 14, 2020 14:30
@YaelDillies YaelDillies removed the awaiting-review The author would like community review of the PR label Nov 15, 2021
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