Skip to content

[Merged by Bors] - chore: bump to nightly-2023-07-15#5992

Closed
kim-em wants to merge 22 commits intomasterfrom
bump-nightly-2023-07-15
Closed

[Merged by Bors] - chore: bump to nightly-2023-07-15#5992
kim-em wants to merge 22 commits intomasterfrom
bump-nightly-2023-07-15

Conversation

@kim-em
Copy link
Copy Markdown
Contributor

@kim-em kim-em 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

@kim-em kim-em added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Jul 19, 2023
@kim-em
Copy link
Copy Markdown
Contributor Author

kim-em commented Jul 19, 2023

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

@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 19, 2023
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 20, 2023
@ghost ghost added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 20, 2023
@kim-em
Copy link
Copy Markdown
Contributor Author

kim-em commented Jul 20, 2023

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

@Vtec234
Copy link
Copy Markdown
Contributor

Vtec234 commented Jul 20, 2023

Now it is failing on the simpNF linter.

@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 21, 2023
@ghost
Copy link
Copy Markdown

ghost commented Jul 21, 2023

This PR/issue depends on:

@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jul 21, 2023
@kim-em kim-em added awaiting-review and removed help-wanted The author needs attention to resolve issues labels Jul 24, 2023
@urkud
Copy link
Copy Markdown
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 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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

bors d+

The succAbove thing is probably out of scope.

@bors
Copy link
Copy Markdown

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.

@github-actions github-actions bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Jul 27, 2023
@kim-em
Copy link
Copy Markdown
Contributor Author

kim-em commented Jul 27, 2023

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
Copy Markdown

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>
kim-em 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 This pull request has been delegated to the PR author (or occasionally another non-maintainer). ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants