Skip to content
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: Positivity extension for Finset.prod #9365

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
64fa1c5
feat: Positivity extension for `Finset.sum`
YaelDillies Dec 30, 2023
eb70e94
remove unused instance synthesis
YaelDillies Dec 31, 2023
5aa5b0e
golf downstream
YaelDillies Dec 31, 2023
e964bfd
hack
eric-wieser Dec 31, 2023
695ea52
beta expand if needed
alexjbest Dec 31, 2023
ca61d08
Merge remote-tracking branch 'origin/master' into positivity_finset_sum
eric-wieser Feb 12, 2024
c3d02ea
simplify logic
eric-wieser Feb 12, 2024
738c7cc
better logic
YaelDillies Feb 12, 2024
4c0225b
check for debug
YaelDillies Feb 12, 2024
2285697
fix
eric-wieser Feb 12, 2024
d7456a3
remove unreachable failure
YaelDillies Feb 12, 2024
6161d23
add todo
YaelDillies Feb 12, 2024
92ec7dc
revert AkraBazzi
YaelDillies Feb 12, 2024
5e8424f
feat: Positivity extension for `Finset.prod`
YaelDillies Feb 13, 2024
72d04bd
golfs
YaelDillies Feb 13, 2024
40fe08f
Merge pull request #10481 from leanprover-community/positivity_finset…
YaelDillies Feb 13, 2024
b654c75
Merge remote-tracking branch 'origin/master' into positivity_finset_sum
YaelDillies Feb 18, 2024
9c7ccba
Merge remote-tracking branch 'origin/master' into positivity_finset_sum
YaelDillies Feb 22, 2024
4091f23
tests
YaelDillies Feb 22, 2024
e27d652
don't use @
YaelDillies Feb 23, 2024
3050994
Merge remote-tracking branch 'origin/master' into positivity_finset_sum
YaelDillies Feb 29, 2024
56eeb82
Merge remote-tracking branch 'origin/master' into positivity_finset_sum
YaelDillies Feb 29, 2024
2da120c
Merge remote-tracking branch 'origin/master' into positivity_finset_sum
YaelDillies Mar 6, 2024
65e6593
Eric's no-monadic-failure paradigm
YaelDillies Mar 6, 2024
214fec9
Merge remote-tracking branch 'origin/master' into positivity_finset_sum
YaelDillies Apr 3, 2024
7003214
suggestions
YaelDillies Apr 3, 2024
bc25cf0
whitespace for clarity
YaelDillies Apr 4, 2024
3aefce7
Merge remote-tracking branch 'origin/master' into positivity_finset_sum
YaelDillies Apr 5, 2024
e6a642d
bump
YaelDillies Apr 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Mathlib/Algebra/BigOperators/Order.lean
YaelDillies marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ TC inference. -/
def evalFinsetSum : PositivityExt where eval {u α} zα pα e := do
match e with
| ~q(@Finset.sum _ $ι $instα $s $f) =>
let (lhs, _, (rhs : Q($α))) ← lambdaMetaTelescope f
let (lhs, _, (rhs : Q($α))) ← lambdaMetaTelescope (if f.isLambda then f else q(fun x => $f x))
YaelDillies marked this conversation as resolved.
Show resolved Hide resolved
-- TODO: The following annotation is ignored. See leanprover/lean4#3126
let so : Option Q(Finset.Nonempty $s) ← do
try
Expand Down Expand Up @@ -880,5 +880,7 @@ example (n : ℕ) (a : ℕ → ℤ) : 0 < ∑ j : Fin (n + 1), (a j^2 + 1) := by
example (a : ℕ → ℤ) : 0 < ∑ j in ({1} : Finset ℕ), (a j^2 + 1) := by
have : Finset.Nonempty {1} := singleton_nonempty 1
positivity
example (s : Finset (ℕ)) : 0 ≤ ∑ j in s, j := by positivity
example (s : Finset (ℕ)) : 0 ≤ s.sum id := by positivity

end Mathlib.Meta.Positivity
Loading