Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - feat(data/finset/lattice): sup'/inf' lemmas #18989

Closed
wants to merge 8 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented May 11, 2023

Match (most of) the lemmas between finset.sup/finset.inf and finset.sup'/finset.inf'. Also golf two proofs using eq_of_forall_ge_iff to make sure both APIs prove their lemmas in as closely as possible a way. Also define finset.nontrivial to match set.nontrivial.


Open in Gitpod

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR t-order Order hierarchy modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. labels May 11, 2023
Comment on lines +637 to +643
lemma sup'_product_left {t : finset γ} (hs : s.nonempty) (ht : t.nonempty) (f : β × γ → α) :
(s ×ˢ t).sup' (hs.product ht) f = s.sup' hs (λ i, t.sup' ht $ λ i', f ⟨i, i'⟩) :=
eq_of_forall_ge_iff $ λ a, by simp [@forall_swap _ γ]

lemma sup'_product_right {t : finset γ} (hs : s.nonempty) (ht : t.nonempty) (f : β × γ → α) :
(s ×ˢ t).sup' (hs.product ht) f = t.sup' ht (λ i', s.sup' hs $ λ i, f ⟨i, i'⟩) :=
by rw [sup'_product_left, finset.sup'_comm]
Copy link
Member

Choose a reason for hiding this comment

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

I assume there's some precedent for these names; can you refer to it in a -- comment?

Copy link
Collaborator Author

@YaelDillies YaelDillies May 11, 2023

Choose a reason for hiding this comment

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

Yeah, the corresponding finset.sup lemmas. Do you really think that's needed? I'm not going to write "See also finset.sup_x" in the docstring of every finset.sup'_x and vice-versa.

@eric-wieser eric-wieser added the not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 label Jul 15, 2023
src/data/finset/lattice.lean Outdated Show resolved Hide resolved
@urkud
Copy link
Member

urkud commented Jul 22, 2023

Otherwise LGTM.

@urkud
Copy link
Member

urkud commented Jul 22, 2023

bors d+

@bors
Copy link

bors bot commented Jul 22, 2023

✌️ YaelDillies 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 delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Jul 22, 2023
@YaelDillies
Copy link
Collaborator Author

bors merge

bors bot pushed a commit that referenced this pull request Aug 28, 2023
Match (most of) the lemmas between `finset.sup`/`finset.inf` and `finset.sup'`/`finset.inf'`. Also golf two proofs using `eq_of_forall_ge_iff` to make sure both APIs prove their lemmas in as closely as possible a way.
@bors
Copy link

bors bot commented Aug 28, 2023

Canceled.

@YaelDillies
Copy link
Collaborator Author

bors merge

bors bot pushed a commit that referenced this pull request Aug 28, 2023
Match (most of) the lemmas between `finset.sup`/`finset.inf` and `finset.sup'`/`finset.inf'`. Also golf two proofs using `eq_of_forall_ge_iff` to make sure both APIs prove their lemmas in as closely as possible a way.
@bors
Copy link

bors bot commented Aug 28, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Aug 28, 2023
Match (most of) the lemmas between `finset.sup`/`finset.inf` and `finset.sup'`/`finset.inf'`. Also golf two proofs using `eq_of_forall_ge_iff` to make sure both APIs prove their lemmas in as closely as possible a way. Also define `finset.nontrivial` to match `set.nontrivial`.
@bors
Copy link

bors bot commented Aug 28, 2023

Build failed:

@YaelDillies
Copy link
Collaborator Author

bors merge

@bors
Copy link

bors bot commented Aug 28, 2023

Canceled.

@YaelDillies
Copy link
Collaborator Author

bors merge

bors bot pushed a commit that referenced this pull request Aug 31, 2023
Match (most of) the lemmas between `finset.sup`/`finset.inf` and `finset.sup'`/`finset.inf'`. Also golf two proofs using `eq_of_forall_ge_iff` to make sure both APIs prove their lemmas in as closely as possible a way. Also define `finset.nontrivial` to match `set.nontrivial`.
@bors
Copy link

bors bot commented Aug 31, 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 feat(data/finset/lattice): sup'/inf' lemmas [Merged by Bors] - feat(data/finset/lattice): sup'/inf' lemmas Aug 31, 2023
@bors bors bot closed this Aug 31, 2023
@bors bors bot deleted the sup'_inf_sup' branch August 31, 2023 12:18
YaelDillies added a commit to leanprover-community/mathlib4 that referenced this pull request Sep 7, 2023
bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Sep 9, 2023
kodyvajjha pushed a commit to leanprover-community/mathlib4 that referenced this pull request Sep 22, 2023
chenjulang added a commit to chenjulang/mathlib that referenced this pull request May 11, 2024
* commit '65a1391a0106c9204fe45bc73a039f056558cb83': (12443 commits)
  feat(data/{list,multiset,finset}/*): `attach` and `filter` lemmas (leanprover-community#18087)
  feat(combinatorics/simple_graph): More clique lemmas (leanprover-community#19203)
  feat(measure_theory/order/upper_lower): Order-connected sets in `ℝⁿ` are measurable (leanprover-community#16976)
  move old README.md to OLD_README.md
  doc: Add a warning mentioning Lean 4 to the readme (leanprover-community#19243)
  feat(topology/metric_space): diameter of pointwise zero and addition (leanprover-community#19028)
  feat(topology/algebra/order/liminf_limsup): Eventual boundedness of neighborhoods (leanprover-community#18629)
  feat(probability/independence): Independence of singletons (leanprover-community#18506)
  feat(combinatorics/set_family/ahlswede_zhang): Ahlswede-Zhang identity, part I (leanprover-community#18612)
  feat(data/finset/lattice): `sup'`/`inf'` lemmas (leanprover-community#18989)
  chore(order/liminf_limsup): Generalise and move lemmas (leanprover-community#18628)
  feat(algebraic_topology/dold_kan): The Dold-Kan equivalence for abelian categories (leanprover-community#17926)
  feat(data/sum/interval): The lexicographic sum of two locally finite orders is locally finite (leanprover-community#11352)
  feat(analysis/convex/proj_Icc): Extending convex functions (leanprover-community#18797)
  feat(algebraic_topology/dold_kan): The Dold-Kan equivalence for pseudoabelian categories (leanprover-community#17925)
  feat(measure_theory/measure/haar_quotient): the Unfolding Trick (leanprover-community#18863)
  feat(linear_algebra/orientation): add `orientation.reindex` (leanprover-community#19236)
  feat(combinatorics/quiver/covering): Definition of coverings and unique lifting of paths (leanprover-community#17828)
  feat(set_theory/game/pgame): small sets of pre-games / games / surreals are bounded (leanprover-community#15260)
  feat(tactic/positivity): Extension for `ite` (leanprover-community#17650)
  ...

# Conflicts:
#	README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
delegated The PR author may merge after reviewing final suggestions. modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants