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: port Data.Fin.Basic #1084

Closed
wants to merge 130 commits into from

Conversation

j-loreaux
Copy link
Collaborator

@j-loreaux j-loreaux commented Dec 16, 2022

@j-loreaux j-loreaux added mathlib-port This is a port of a theory file from mathlib. WIP Work in progress labels Dec 16, 2022
@mcdoll mcdoll added the help-wanted The author needs attention to resolve issues label Dec 19, 2022
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.

There's a refactor hidden in the adhoc port here

Mathlib/Data/Fin/Basic.lean Outdated Show resolved Hide resolved
@eric-wieser eric-wieser dismissed their stale review January 12, 2023 19:35

All of the major points are fixed

@jcommelin jcommelin changed the base branch from j-loreaux/data.fin.basic-mathport to master January 12, 2023 19:43
@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Jan 12, 2023
bors bot pushed a commit that referenced this pull request Jan 12, 2023
mathlib3 SHA: 0bd2ea37bcba5769e14866170f251c9bc64e35d7



Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
Co-authored-by: Johan Commelin <johan@commelin.net>
@github-actions github-actions bot removed the awaiting-review The author would like community review of the PR label Jan 12, 2023
@bors
Copy link

bors bot commented Jan 12, 2023

Canceled.

@jcommelin
Copy link
Member

bors merge

bors bot pushed a commit that referenced this pull request Jan 12, 2023
mathlib3 SHA: 0bd2ea37bcba5769e14866170f251c9bc64e35d7



Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
Co-authored-by: Johan Commelin <johan@commelin.net>
@bors
Copy link

bors bot commented Jan 12, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: port Data.Fin.Basic [Merged by Bors] - feat: port Data.Fin.Basic Jan 12, 2023
@bors bors bot closed this Jan 12, 2023
@bors bors bot deleted the j-loreaux/data.fin.basic branch January 12, 2023 19:52
Comment on lines +2482 to +2491
@[simp]
theorem coe_ofNat_eq_mod' (m n : ℕ) [NeZero m] :
(@Fin.ofNat' m n (Nat.pos_of_ne_zero (NeZero.ne m)) : ℕ) = n % m :=
rfl
#align fin.coe_of_nat_eq_mod' Fin.coe_ofNat_eq_mod'

@[simp]
theorem coe_of_nat_eq_mod (m n : ℕ) : ((n : Fin (m+1)) : ℕ) = n % Nat.succ m :=
rfl
#align fin.coe_of_nat_eq_mod Fin.coe_of_nat_eq_mod
Copy link
Contributor

Choose a reason for hiding this comment

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

seems we need a matching PR to #18131. @negiizhao will you do it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just noticed the LHS of these two theorems look syntactically different, but they were the same in mathlib3. The latter is now removed from mathlib3, and the former is renamed to the latter, so the first #align should fail and the second #align should be a misalignment now. Can we change the statement of the former to ((n : Fin m) : ℕ) = n % m and remove the latter?

Copy link
Member

Choose a reason for hiding this comment

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

jcommelin added a commit that referenced this pull request Jan 23, 2023
mathlib3 SHA: 0bd2ea37bcba5769e14866170f251c9bc64e35d7



Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
Co-authored-by: Johan Commelin <johan@commelin.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mathlib-port This is a port of a theory file from mathlib. ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet