Skip to content

Refuse factorize, nextprime, divisors, gradient, divergence and φ by name - #2453

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
fix/refuse-names-and-stale-docs
Nov 15, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
fix/refuse-names-and-stale-docs

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Each was read as a product: factorize(360) was factorize * 360, nextprime(10) was
nextprime * 10, divisors(12) was divisors * 12, gradient(x^2) was gradient * x ^ 2,
divergence(x) was divergence * x, and φ(10) was φ * 10. The library has no node for any of
them, so each call is now refused with what can be written today: MathS.NumberTheory.Factorize
or Factorize() in C#, prime(primepi(n) + 1), divisorsigma(0, n) and divisorsigma(1, n),
jacobian([f], [x, y]), trace(jacobian(F, [x, y])), and phi(n), which is Euler's totient; ϕ,
the other glyph, is refused the same way. Each name without a bracket is still a variable.

Two documentation comments were stale. MathS.Settings.Budget said the Gröbner solver was the
only thing to honour it; the system solver's own ledger, the rewrite graph's transformations,
MathS.AreEqual and the perfect-square proof that Factorize runs and Simplify offers as a
candidate all do, and Simplify itself is not bounded by it. EquationSystem.Solve said only
that it returns null; it throws NotSufficientlySupportedException when its budget runs out.

Part of #2449 and #2182.

The <return> tag on EquationSystem.Solve is also corrected to <returns>, so its text reaches the generated docs.

Full check on this commit, before that one-tag change (the build after it is 0 warnings, 0 errors): 19,881 unit tests, 0 failed; MCP 441, Terminal 69, F# 134, Interactive 19; AOT smoke 78/78; BoundCheck 0 disagreements, RootCheck 596/596, CasBench 120/121 with 0 wrong, SimpSweep 10463/10463, RuleCheck clean, CanonCheck and Confluence at their baselines.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.41584% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.96%. Comparing base (e059bc0) to head (4797dff).

Files with missing lines Patch % Lines
...ources/AngouriMath/Core/Antlr/AngouriMathParser.cs 98.41% 7 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2453      +/-   ##
==========================================
+ Coverage   86.93%   86.96%   +0.03%     
==========================================
  Files         319      319              
  Lines       70760    70888     +128     
  Branches    20666    20676      +10     
==========================================
+ Hits        61515    61651     +136     
+ Misses       4966     4957       -9     
- Partials     4279     4280       +1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.50% <98.41%> (+0.03%) ⬆️
fsharp 32.97% <ø> (ø)
interactive 39.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
Sources/AngouriMath/Convenience/MathS.cs 90.63% <ø> (ø)
Sources/AngouriMath/Core/Antlr/AngouriMathLexer.cs 99.23% <ø> (+0.02%) ⬆️
Sources/AngouriMath/Core/EquationSystem.cs 70.58% <ø> (ø)
...ources/AngouriMath/Core/Antlr/AngouriMathParser.cs 88.04% <98.41%> (+0.06%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…name

Each was read as a product: factorize(360) was factorize * 360, nextprime(10) was
nextprime * 10, divisors(12) was divisors * 12, gradient(x^2) was gradient * x ^ 2,
divergence(x) was divergence * x, and φ(10) was φ * 10. The library has no node for any of
them, so each call is now refused with what can be written today: MathS.NumberTheory.Factorize
or Factorize() in C#, prime(primepi(n) + 1), divisorsigma(0, n) and divisorsigma(1, n),
jacobian([f], [x, y]), trace(jacobian(F, [x, y])), and phi(n), which is Euler's totient; ϕ,
the other glyph, is refused the same way. Each name without a bracket is still a variable.

Two documentation comments were stale. MathS.Settings.Budget said the Gröbner solver was the
only thing to honour it; the system solver's own ledger, the rewrite graph's transformations,
MathS.AreEqual and the perfect-square proof that Factorize runs and Simplify offers as a
candidate all do, and Simplify itself is not bounded by it. EquationSystem.Solve said only
that it returns null; it throws NotSufficientlySupportedException when its budget runs out.

Part of #2449 and #2182.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant