EquationSystem.SolveWithParameters(params Variable[]) and
MathS.SolveSystemWithParameters(Entity, params Variable[]) answer the rows
Solve answers and, beside them, each parameter of the rows with its set,
as ParametrizedSolutions(Matrix Rows, IReadOnlyList<(Variable Parameter,
Set Domain)> Parameters). sin(x) = 1/2 in x, y is the two rows with
(n_1, ZZ), (t_1, CC). An answer without parameters lists none; null where
Solve is null, and where a parameter's set cannot be named.
The set is said where the parameter is minted, by SolutionParameters.Mint:
ZZ for the n of a period, a mod and a Lambert W branch, RR for the
argument r of abs, (0, oo) for the r of signum, [0, 1) for the t of floor
and ceil, (-1/2, 1/2) for round, and CC (RR over the reals) for an unknown
nothing constrains. The non-square check reads which symbols are whole
from there rather than from an "n_" prefix.
A second equation's roots minted the same name as the first's where the
two do not reach each other, so sin(x) = 1/2, sin(y) = 1/2 was
(pi/6 + 2 pi n_1, pi/6 + 2 pi n_1) and left out (pi/6, 13 pi/6). Such a
parameter is renamed where the rows are put together (n_2), one that
reaches a later equation stays shared (tan(x) = 1, y = x), and while a
system is solved one name stands for one set. Measured on v2.7.0 and
here; the changed answers are in BREAKING-CHANGES.md.
solve_system_with_parameters and solve_conjunction_with_parameters join
the catalogue; am_solve_system reports 'parameters', each with its set;
the terminal lists both entries in OneShot.notOffered.
Part of #212.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Option 1 from #212, as decided: a system's answer together with each parameter and the set it ranges over.
2x - 4y - 12inx, yis the rows[[6 + 2 t_1, t_1]]with(t_1, CC);sin(x) - 1/2inx, ylists(n_1, ZZ)and(t_1, CC). Parameters are in order of first appearance, the list is empty when there are none, and the call is null whereSolveis null, or where a parameter's set cannot be named (a decline, not a guess).Solveis unchanged apart from the fix below.Every site that mints a parameter now goes through
SolutionParameters.Mint(taken, prefix, set), which records the set:nmod; Lambert W branchesZZrabsRRrsignum(0, +oo)tfloor,ceil[0, 1)tround(-1/2, 1/2)tCC, orRRunder a real codomainNonSquareSystemSolverused to decide which symbols are whole numbers by then_prefix; it now reads the recorded set.A wrong answer fixed on the way
Two independent parameters in one row were given the same name, which made the answer incomplete:
sin(x) - 1/2, sin(y) - 1/2inx, y[pi/6 + 2 pi n_1, pi/6 + 2 pi n_1]: x − y a whole number of periods, so(pi/6, 13 pi/6)is missingn_1,n_2The same collision happened with
sinandcos, threetans, twofloors (t_1) and twoabs(r_1); all six are recorded inBREAKING-CHANGES.md, measured on v2.7.0 and the branch. Where a root is combined with the rows solved after it (InSolveSystem, andEachRootinNonSquareSystemSolver), a parameter of the root is renamed if the rows below minted the same name themselves. A parameter that reaches a later equation stays shared, as it must:tan(x) - 1, y - xis still[pi/4 + pi n_1, pi/4 + pi n_1]. Names are global within an answer, which is documented. All 28 probe systems diffed against a v2.7.0 build: only the collisions changed.Wiring: catalogue entries
solve_system_with_parametersandsolve_conjunction_with_parameters; MCPam_solve_systemreturns"parameters": [{"parameter": "n_1", "set": "ZZ"}, …]; the terminal lists both entries inOneShot.notOffered;PublicApi.txt; XML docs with examples.SystemParametersTest: 15 facts, each substituting the rows back with two sample values per parameter from its set (whole numbers forZZ, inner points of the intervals), and asserting the rows equalSolve's. Full check before the rebase onto c530e40: 20,134 unit tests, 0 failed; MCP 446, Terminal 69, F# 134, Interactive 19; AOT 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. After the rebase: system, solver, catalogue and API tests, 1,060 passed.Closes #212.
🤖 Generated with Claude Code