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] - chore: bump to nightly-2023-07-15 #5992

Closed
wants to merge 22 commits into from

Conversation

semorrison
Copy link
Contributor

@semorrison semorrison commented Jul 19, 2023

Various adaptations to changes when Fin API was moved to Std. One notable change is that many lemmas are now stated in terms of i ≠ 0 (for i : Fin n) rather then i.1 ≠ 0, and as a consequence many Fin.vne_of_ne applications have been added or removed, mostly removed.


Open in Gitpod

@semorrison semorrison added awaiting-review The author would like community review of the PR awaiting-CI labels Jul 19, 2023
@semorrison
Copy link
Contributor Author

semorrison commented Jul 19, 2023

This will need a fix to Std4. Edit: DONE.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Jul 19, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Jul 20, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the blocked-by-other-PR This PR depends on another PR to Mathlib label Jul 20, 2023
@semorrison
Copy link
Contributor Author

This is currently failing in tests/CommDiag.lean, but I can't reproduce the failure locally.

@Vtec234
Copy link
Contributor

Vtec234 commented Jul 20, 2023

Now it is failing on the simpNF linter.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the blocked-by-other-PR This PR depends on another PR to Mathlib label Jul 21, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

This PR/issue depends on:

@semorrison semorrison removed the awaiting-review The author would like community review of the PR label Jul 23, 2023
@semorrison semorrison added awaiting-review The author would like community review of the PR and removed help-wanted The author needs attention to resolve issues labels Jul 24, 2023
@urkud
Copy link
Member

urkud commented Jul 27, 2023

Thanks! 🎉
bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Jul 27, 2023
bors bot pushed a commit that referenced this pull request Jul 27, 2023
Various adaptations to changes when `Fin` API was moved to Std. One notable change is that many lemmas are now stated in terms of `i ≠ 0` (for `i : Fin n`) rather then `i.1 ≠ 0`, and as a consequence many `Fin.vne_of_ne` applications have been added or removed, mostly removed.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Wojciech Nawrocki <wjnawrocki@protonmail.com>
@bors
Copy link

bors bot commented Jul 27, 2023

Canceled.

Comment on lines 1331 to 1342
/-- `succAbove p i` embeds `Fin n` into `Fin (n + 1)` with a hole around `p`. -/
def succAbove (p : Fin (n + 1)) (i : Fin n) : Fin (n + 1) :=
if i.1 < p.1 then castSucc i else succ i

/-- `predAbove p i` embeds `i : Fin (n+1)` into `Fin n` by subtracting one if `p < i`. -/
def predAbove (p : Fin n) (i : Fin (n + 1)) : Fin n :=
if h : castSucc p < i then i.pred ((ne_iff_vne i 0).mpr (Nat.not_eq_zero_of_lt h))
else i.castLT (Nat.lt_of_le_of_lt (Nat.ge_of_not_lt h) p.2)

/-- `castPred` embeds `i : Fin (n + 2)` into `Fin (n + 1)`
by lowering just `last (n + 1)` to `last n`. -/
def castPred (i : Fin (n + 2)) : Fin (n + 1) := predAbove (last n) i
Copy link
Member

@eric-wieser eric-wieser Jul 27, 2023

Choose a reason for hiding this comment

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

Should we put these back to how they were in mathlib3 (ie, rename succAboveEmb back to succAbove)

Copy link
Member

@eric-wieser eric-wieser Jul 27, 2023

Choose a reason for hiding this comment

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

theorem succAbove_aux (p : Fin (n + 1)) :
StrictMono fun i : Fin n => if (castSuccEmb i) < p then (castSuccEmb i) else i.succ :=
(castSuccEmb : Fin n ↪o _).strictMono.ite (succEmbedding n).strictMono
(fun _ _ hij hj => lt_trans ((castSuccEmb : Fin n ↪o _).lt_iff_lt.2 hij) hj) fun i =>
(castSuccEmb_lt_succ i).le
#align fin.succ_above_aux Fin.succAbove_aux
/-- `succAbove p i` embeds `Fin n` into `Fin (n + 1)` with a hole around `p`. -/
def succAbove (p : Fin (n + 1)) : Fin n ↪o Fin (n + 1) :=
OrderEmbedding.ofStrictMono _ p.succAbove_aux
#align fin.succ_above Fin.succAbove

Copy link
Member

Choose a reason for hiding this comment

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

I think these were removed in this diff

Copy link
Member

Choose a reason for hiding this comment

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

Ah, only succAbove was changed; I moved the other lemmas back to their original (unbundled) homes.

@eric-wieser
Copy link
Member

bors d+

The succAbove thing is probably out of scope.

@bors
Copy link

bors bot commented Jul 27, 2023

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

@semorrison
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Jul 27, 2023
Various adaptations to changes when `Fin` API was moved to Std. One notable change is that many lemmas are now stated in terms of `i ≠ 0` (for `i : Fin n`) rather then `i.1 ≠ 0`, and as a consequence many `Fin.vne_of_ne` applications have been added or removed, mostly removed.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Wojciech Nawrocki <wjnawrocki@protonmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors
Copy link

bors bot commented Jul 27, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title chore: bump to nightly-2023-07-15 [Merged by Bors] - chore: bump to nightly-2023-07-15 Jul 27, 2023
@bors bors bot closed this Jul 27, 2023
@bors bors bot deleted the bump-nightly-2023-07-15 branch July 27, 2023 13:17
adomani pushed a commit that referenced this pull request Jul 28, 2023
Various adaptations to changes when `Fin` API was moved to Std. One notable change is that many lemmas are now stated in terms of `i ≠ 0` (for `i : Fin n`) rather then `i.1 ≠ 0`, and as a consequence many `Fin.vne_of_ne` applications have been added or removed, mostly removed.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Wojciech Nawrocki <wjnawrocki@protonmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
semorrison added a commit that referenced this pull request Aug 14, 2023
Various adaptations to changes when `Fin` API was moved to Std. One notable change is that many lemmas are now stated in terms of `i ≠ 0` (for `i : Fin n`) rather then `i.1 ≠ 0`, and as a consequence many `Fin.vne_of_ne` applications have been added or removed, mostly removed.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Wojciech Nawrocki <wjnawrocki@protonmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated 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

5 participants