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.Set.Lattice #1121
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.
A monumental effort! I approve modulo the things I flagged.
#align set.sInter Set.interₛ | ||
|
||
/-- Notation for `Set.interₛ` Intersection of a set of sets. -/ | ||
prefix:110 "⋂₀ " => interₛ |
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.
Talking point: how about we change this to ⋂ₛ
?
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.
Makes sense, but maybe we do it after the port?
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.
Part of me agrees, and part of me wants to say "well we just changed ten other things to use this little s and little i notation and I think it's really cool".
Mathlib/Data/Set/Lattice.lean
Outdated
hf.infᵢ_nat_add k | ||
#align antitone.Inter_nat_add Antitone.interᵢ_nat_add | ||
|
||
--Porting note: removing `simp`. LHS does not simplify |
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'm confused about this one.
example (f : ℕ → Set α) (k : ℕ) :
(⋃ n, ⋂ i ≥ n, f (i + k)) = ⋃ n, ⋂ i ≥ n, f i := by simp
works fine if unionᵢ_interᵢ_ge_nat_add
is tagged @[simp]
and doesn't work otherwise. Is this a bug in the linter? Are we sure this shouldn't be tagged @[simp]
?
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 added a link to the Zulip discussion https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/complete_lattice.20and.20has_sup/near/316497982
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
This will conflict with @negiizhao's #1109, for which leanprover-community/mathlib#17882 is on the queue |
I believe this just needs to remove some lemmas in |
That sounds like an argument in favor of merging #1109 first? |
Both are easy to deal with. To ensure that no more lemmas are removed by mistake, it might be better to merge #1121 first (then we can compare the diffs). |
Mostly name changes. The proof of `subset_bunionᵢ_of_mem` needed a bunch of explicit arguments for some reason. I also moved the definition of `set.sUnion` from `Init.Set` into this file and changed its name. I also `protected` the definition of `Set.compl` Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded: |
Fixes some doc comment typos added added in #1121. Note that the `sUnion` comment is correct is mathlib3: https://github.com/leanprover-community/mathlib/blob/b76e9f654df09f8a832aeee712511fe5f3e57869/src/data/set/lattice.lean#L72-L74
Mostly name changes. The proof of
subset_bunionᵢ_of_mem
needed a bunch of explicit arguments for some reason. I also moved the definition ofset.sUnion
fromInit.Set
into this file and changed its name. I alsoprotected
the definition ofSet.compl