-
Notifications
You must be signed in to change notification settings - Fork 297
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(data/*, order/*) supporting lemmas for characterising well-founded complete lattices #5446
Conversation
50954d3
to
960121f
Compare
…for complete lattices
960121f
to
f674a1a
Compare
Rather than prove 4 implications, I think you can prove the equivalence of these 3 conditions with 3 implications. The most logical way to me, without having written any code, would be I'd also rewrite The following are suggestions for how to prove some of those directions. I'll investigate these further if I have time. Feel free not to use them if you don't want to, and I'm sorry if some of this is just rehashing what you've already done. I'd prove There should be a quick proof of |
808180a
to
91f2d0a
Compare
Still quite a bit of work to do but proofs reasonable now.
91f2d0a
to
5f5fc5d
Compare
Just for completeness since I have already added `Sup_eq_bot_nonempty_eq_singleton`
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -266,9 +266,17 @@ iff.intro | |||
(assume h a ha, top_unique $ h ▸ Inf_le ha) | |||
(assume h, top_unique $ le_Inf $ assume a ha, top_le_iff.2 $ h a ha) | |||
|
|||
lemma Inf_eq_top_nonempty_eq_singleton {s : set α} | |||
(h_inf : Inf s = ⊤) (hne : s.nonempty) : s = {⊤} := | |||
by { rw set.eq_singleton_iff_nonempty_unique_mem, rw Inf_eq_top at h_inf, exact ⟨hne, h_inf⟩, } |
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.
Golfs to
by { rw set.eq_singleton_iff_nonempty_unique_mem, rw Inf_eq_top at h_inf, exact ⟨hne, h_inf⟩, } | |
set.eq_singleton_iff_nonempty_unique_mem.mpr ⟨hne, Inf_eq_top.mp h_inf⟩ |
I'm sure you can do something similar with the one below
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 have mixed feelings about this one. I do use term-mode proofs but whenever I'm on the fence, I avoid them because they're harder to read (and, I claim, maintain).
Still, commit away if you like!
Could you please move supporting lemmas to a separate PR? |
Once you have all implications, could you please add
|
Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
Thanks for the review @urkud I have just one question. When you say:
do you mean the six "extra" lemmas I mentioned at the very top of this PR, or do you mean all lemmas, e.g., everything except for the contents of Either way, I'm happy to do it! |
I mean all changes to existing files. |
As per @urkud 's request, I am splitting this PR into two pieces: * One with all changes to existing files (this branch) * One with the proposed new file (a new branch).
Done! |
bors merge |
…ed complete lattices (#5446)
Pull request successfully merged into master. Build succeeded: |
Note that I have included some extra lemmas even though they are not actually needed (or used). Here is the list of such lemmas together with my justification for including them:
finset.not_nonempty_iff_eq_empty
: seems to be a gapset.not_nonempty_iff_eq_empty
already existsfinset.eq_singleton_iff_nonempty_unique_mem
: I introduceset.eq_singleton_iff_nonempty_unique_mem
here so it seems worth adding thefinset
version alsofinset.inf_eq_Inf
: I introducefinset.sup_eq_Sup
so it seems worth adding theinf
version alsorel_hom.map_inf
: I introducerel_hom.map_sup
here so it seems worth adding theinf
version alsoInf_eq_top_nonempty_eq_singleton
: I introduceSup_eq_bot_nonempty_eq_singleton
so it seems worth adding theinf
version alsoset.finite.preimage_embedding
: I used this for an earlier proof of the results here and it seemed worth keepingI think it is reasonable to bundle these extra results with the other work here but I will happily excise these (or move them to a separate PR) if requested.