-
Notifications
You must be signed in to change notification settings - Fork 298
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(order/complete_lattice): missing API lemmas about the prod instance #18029
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks! Is there a mathlib4 PR?
No, I haven't made a mathlib4 PR because I don't know how to use mathport to generate the Lean4 version, and I don't really want to port manually. Should I just put the lemmas in |
@eric-wieser Have you figured out how to use mathport oneshot (I saw you asked on Zulip)? CI is now reporting a timeout in an unrelated file, so some speedups are in order. |
33890f4
to
af2eecf
Compare
I did a rebase in the hope it would make the seemingly unrelated timeout go away. I haven't had a chance to try mathport yet. |
I think you can do that, but we'd better keep track of where they should be moved, and there are two blocks of lemmas ... In any case, I think #18023 is good as is and could be merged without waiting for this; what do you think? |
I had a go at doing a manual port as an exercise in familiarising myself with the new syntax. The only problem is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make has_Sup
and has_Inf
sections to clear up the statements, but else this looks good. I cannot see anything obvious missing.
I'd argue it's perhaps better to keep each sup lemma next to its inf lemma, as that makes it easier to spot that they are in sync. I think we alternate between your approach and my one in different places in mathlib. |
Sure it doesn't matter that much. maintainer merge |
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
@eric-wieser Is there now a corresponding Mathlib4 PR or does this comment still apply? |
There is a mathlib 4 PR, but my intent is to discard it and replace it with the output of mathport one this one is merged. |
bors merge |
…nce (#18029) This adds lemmas about how `fst`, `snd`, and `swap` interact with `Sup` and `Inf`.
Build failed (retrying...): |
…nce (#18029) This adds lemmas about how `fst`, `snd`, and `swap` interact with `Sup` and `Inf`.
In case the build fails: bors d+ |
✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with |
Pull request successfully merged into master. Build succeeded: |
|
||
lemma snd_Inf [has_Inf α] [has_Inf β] (s : set (α × β)) : (Inf s).snd = Inf (prod.snd '' s) := rfl | ||
|
||
lemma swap_Inf [has_Inf α] [has_Inf β] (s : set (α × β)) : (Inf s).swap = Inf (prod.swap '' s) := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I'm only noticing now, but maybe this statement is better?
lemma swap_Inf [has_Inf α] [has_Inf β] (s : set (α × β)) : (Inf s).swap = Inf (prod.swap ⁻¹' s) :=
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really need this lemma anyway, I was just listing every trivial function it could interact with. Feel free to make a PR to spell it that way instead.
…tice (#1369) This adds lemmas about how `fst`, `snd`, and `swap` interact with `supₛ` and `infₛ`. Manual port of a [mathlib PR](leanprover-community/mathlib#18029) by @eric-wieser Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
This adds lemmas about how
fst
,snd
, andswap
interact withSup
andInf
.