Merged
Conversation
Collaborator
Author
|
Do not merge this yet - there are three sorries left on this PR. |
| rw [sq, Finset.sum_mul_sum, ← Finset.sum_product'] | ||
| have dsub : (𝓙₆ t u₁).toFinset.diag ⊆ (𝓙₆ t u₁).toFinset ×ˢ (𝓙₆ t u₁).toFinset := | ||
| Finset.filter_subset .. | ||
| sorry -- was: Finset.filter_subset --.. |
Contributor
There was a problem hiding this comment.
variable {α} (s t : Finset α) in
theorem _root_.Finset.diag_eq_filter [DecidableEq α] :
Finset.diag s = (s ×ˢ s).filter fun a : α × α => a.fst = a.snd := by
ext; simp +contextual
open Classical in
lemma sum_𝓙₆_indicator_sq_eq {f : Grid X → X → ℝ≥0∞} :
(∑ J ∈ (𝓙₆ t u₁).toFinset, (J : Set X).indicator (f J) x) ^ 2 =
∑ J ∈ (𝓙₆ t u₁).toFinset, (J : Set X).indicator (f J · ^ 2) x := by
rw [sq, Finset.sum_mul_sum, ← Finset.sum_product']
have dsub : (𝓙₆ t u₁).toFinset.diag ⊆ (𝓙₆ t u₁).toFinset ×ˢ (𝓙₆ t u₁).toFinset := by
rw [Finset.diag_eq_filter]
exact Finset.filter_subset ..
Contributor
There was a problem hiding this comment.
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
grunweg
commented
Jan 19, 2026
| _ ≤ _ := by | ||
| gcongr; rw [edist_dist]; apply ofReal_le_of_le_toReal | ||
| rw [toReal_div, toReal_ofNat]; linarith | ||
| replace dnt := @dnt x |
Collaborator
Author
There was a problem hiding this comment.
@fpvandoorn Do you know how difficult it would be to make finiteness support this?
Prior to this line, dnt has the form ∀ {z : X}, depth O z ≠ ⊤; finiteness needs the statement for x.
Adding it as an extra term feels fine to me, so perhaps the answer should just be "wontfix".
Owner
There was a problem hiding this comment.
This sounds like it falls well within the scope of aesop, so I don't know why this wouldn't work. Is it related to argument explicitness?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pushforSetmembership leanprover-community/mathlib4#34023 be used to golf some proofs?finiteness [h, h']syntax leanprover-community/mathlib4#34039 (finiteness [h, h']syntax) is merged, it will also be interesting to try using it more.