Skip to content

The least member of a set is found by search where its condition is not a bound - #1554

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
least-member-by-search
Sep 28, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
least-member-by-search

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

min(x, x in S and P) was decided only where P is a bound, so Sullivan and Mackey's Prob 8.9.3 stayed as written: min(n, n in { n in ZZ+ : n binomial(n - 1, 2) >= 14 }). It is 5 now.

The least member by search (ExtremumOverSet): when the condition is not a bound, the members of ZZ+, ZZ* or PP are tried in order from the least, and the first one whose condition evaluates to True is returned. Every member before it was tried and came out False, so it is the least. Primes are stepped with NextPrime. The search declines if a condition does not evaluate to a truth value, or if none of the first 4096 members holds. So min(x, x in ZZ+ and x^2 < 0), which has no member, stays as written.

Suite: 132 tests pass on net10.0 in PrimeSetTest and ExtremumTest, and every target framework builds. The whole suite ran on this branch merged with the other open #1409 and #1540 branches: 13,422 passed, 0 failed. Gate on that merge: passed, with allocation as the baseline says on all 19 gated benchmarks.

BREAKING-CHANGES.md: the min entry is extended, with a row measured on 2.5.0.

Part of #1409.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…ot a bound

min(x, x in S and P) was decided only where P is a bound. Where it is
not, the members of ZZ+, ZZ* or PP are tried in order from the least,
and the first whose condition evaluates to True is the least: Sullivan
and Mackey's Prob 8.9.3, the least n with n binomial(n - 1, 2) >= 14, is
5. A condition that does not evaluate to a truth value, or none of the
first 4096 members holding, leaves it as written.

Part of #1409.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit d5f5c04 into master Sep 28, 2026
31 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the least-member-by-search branch October 29, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant