Symbolic workbench

Symbolic mathematics workbench

Symbolic mathematics workbench

Add a Symbolic surface to explore exact expressions and solutions in a Grid model. Select a named value and choose Inspect expression. Inspection is explicit: changing the model marks an existing capture as historical until you inspect again. The native result keeps its status, exactness, assumptions, conditions, solution bindings and root multiplicities visible.

Start with the canonical examples/canonical/symbolic-workbench.grid model. It declares symbol x, an ordinary reactive coefficient, a polynomial and named results for factorization, differentiation, definite polynomial integration, polynomial GCD, solving, cancellation, evaluation and explicit approximation. Select Roots to inspect the repeated root -1 with multiplicity 2. Compare Conditional with Cancelled: cancelling x/x requires a nonzero condition unless the supplied assumptions establish it. Select AlgebraicRoots for the three exact roots of x^3 - 2. Their defining polynomial and certified real interval or complex rectangle identify each root without replacing it with a rounded decimal.

Create a calculation

  1. Declare unknowns in Code, such as symbol x. Ordinary inputs remain reactive coefficients; a name entered in the workbench does not declare a variable.
  2. Choose New calculation, an operation, and an ordinary Grid expression. For example, factor x^2 + 2*x + 1, or solve Polynomial == 0 for x.
  3. Supply the operation's variable, real/complex solve domain, substitution or precision when requested. Assumptions apply to this calculation. Use an existing assumptions value or the real, positive-real or nonzero-real helper.
  4. Choose a fresh result name and Save calculation. This adds an ordinary formula through the existing model source owner. It preserves existing names.
  5. Inspect the saved result, then choose Add … to workbench to retain its bookmark. Formula creation and bookmark configuration have separate saves.

Guided operations include canonicalization, simplification, expansion, collection, factorization, fraction cancellation/combination/decomposition, differentiation, definite polynomial integration, polynomial GCD, solving, substitution/evaluation, relation decisions and explicit approximation. Native admission determines supported mathematical domains and limits. Unsupported, conditional, unknown and limited outcomes remain native outcomes. For standalone expressions and complete legacy results, Continue this calculation opens a new draft using the named expression or the result's .expression field. Solve = 0 authors an equation explicitly; solving a relation preserves that relation. Suggested result names avoid current source names. Drafting performs no write. Conditional, omitted and incomplete results do not receive automatic follow-up expressions: use an ordered worksheet from the original expression, or carry their conditions explicitly in Code. General multivariable and hybrid operations remain available in Code; this form does not add a second evaluator.

Choose Ordered worksheet to combine algebra, differentiation, polynomial antiderivatives and evaluation at rational points from an original expression. Add, reorder or remove steps; variable-based steps ask for a declared unknown. Local assumptions apply to the whole worksheet, and native conditions survive each step. Saving writes one SYMBOLIC.CALCULATE formula containing the original expression, ordered steps and assumptions. The saved formula and bookmark reopen with the model. The worksheet draft itself remains session-local.

Edit a saved worksheet

Select a named worksheet and choose Edit saved worksheet. The native parser recovers its original expression, ordered steps and local assumptions from the saved formula. For a ready example, select EditableDerivative in the canonical model. The form lists locally declared variables and keeps the saved name fixed. Change the expression, reorder steps or adjust assumptions, then choose Update worksheet. Native preparation checks the complete candidate model; the existing source writer replaces only that formula and recalculates its dependents. Surrounding comments, declarations and formatting are preserved.

Visual editing admits a local eager named SYMBOLIC.CALCULATE assignment with 1–64 literal steps. Shared or computed step lists, imported targets and special declarations remain editable in Code. The form preserves a named or inline assumptions expression; it does not reconstruct assumptions from a result. Source is bounded to 1 MiB, each original expression or assumptions expression to 4 KiB, and the complete formula to 16 KiB. Multiline expressions are admitted through native preparation.

After inspecting a complete or conditional worksheet, Continue this calculation offers Simplify, Expand, Factor, Differentiate, Find antiderivative and Evaluate at a point. An action reopens the original saved recipe and appends one draft step, preserving earlier steps and local assumptions. For example, inspect Antiderivative, then choose Differentiate to extend its recipe back to the original polynomial. Review the steps and choose Update worksheet to save under the same name; choosing an action alone does not change the model.

A new point value starts empty. When several variables are declared, choose the variable explicitly. Historical captures must be refreshed first; a value change while the recipe is opening also requires a new inspection. Shared/computed recipes stay in Code, and a worksheet at 64 steps must be edited before another step can be added. An incomplete result can be reopened for correction through Edit saved worksheet; it does not offer an automatic next step.

Save any Code draft before updating a worksheet. A change of model, workspace, partition or saved revision requires reopening against that source. A preparation refusal leaves the draft editable. If a submitted write loses its acknowledgement, inspect the possibly saved result before another write. Run mode hides editing.

Conditions and calculus

For example, cancel x/x and then differentiate with respect to x: the answer is 0 with the condition x != 0. A positive-real assumption discharges that condition. Native refusals show their status and reason without a result or certificate. Ordered worksheets support canonicalization, simplification, expansion, collection, factorization, fraction transforms, differentiation and polynomial antiderivatives.

Add Evaluate at a rational point to find a value after earlier steps. Choose the variable and enter an exact value such as 2/3. Differentiating x^3 and then evaluating at 2/3 returns 4/3. The point is saved with the recipe and reopens for editing. Each point expression is bounded to 4 KiB.

Earlier restrictions still apply: cancelling x/x and then evaluating at 0 refuses the excluded point. An earlier positive assumption also prevents a negative point, even if no conditions remain visible. A valid point discharges only its checked conditions; restrictions on other variables remain. Rational conditions such as x^2 > 0 are simplified exactly at the chosen point. The native engine refuses symbolic or irrational points and affected restrictions it cannot decide exactly in this profile, with a reason and no expression or certificate.

Legacy follow-up drafts still require assumptions to be supplied explicitly. An empty condition list does not establish an assumption-free result. Start an ordered worksheet from the original expression to preserve the full context; extracting .expression alone does not retain it.

Antiderivative (polynomial) finds one exact primitive of a polynomial in one declared variable with rational coefficients. The integration constant is zero: for x^2, it returns x^3/3. Add your own constant to represent a family of antiderivatives. This action saves an ordered worksheet that you can reopen and extend, for example by differentiating the primitive back to its input. A cancelled hole remains a condition: cancel x/x, integrate, then differentiate and the answer is 1 with x != 0. Calculus after a contextual rewrite requires an open domain; assumptions restricted to a point, a closed boundary or integers are refused. Elementary functions and rational poles are outside this profile.

Definite polynomial integral takes a declared variable and rational lower and upper bounds. For the example model, integrating Polynomial from 0 to 1 gives 7/3. Polynomial GCD takes two exact univariate polynomials over rational coefficients; the common monic factor of Polynomial and x + 1 is x + 1. The native engine determines admissibility. These controls do not promise general indefinite or transcendental integration.

Approximation requests 2–4,096 bits with nearest-even rounding. The engine enforces its own admitted precision and input authority, and exposes its native enclosure. Increasing requested precision cannot restore lost input precision.

Polynomial systems and multivariable algebra

Declare the unknowns in Code, for example symbol x and symbol y. Choose New calculation → Solve polynomial equations, enter x + y == 3 and x - y == 1 as separate equations, and enter x, y under Ordered variables. Choose Real or Complex and review the complete formula before saving under a fresh result name. Every equation must hold simultaneously. Add/remove controls preserve the remaining entries and move focus to the relevant input.

For Gröbner basis, enter generator polynomials such as x*y - 1 and y^2 - x. Choose Lexicographic or Graded lexicographic monomial order. Variable and generator order stay in the native request; switching operations keeps entry text, so review whether the selected operation needs equalities or polynomials. Polynomial GCD accepts an optional ordered-variable list; leaving it empty preserves the existing univariate call.

The composer supports 1–16 entries and 1–4 distinct variable references. Each entry is at most 4 KiB, the variable-list field is at most 1,024 characters, and the complete formula is at most 16 KiB. Naming a variable does not declare it. Only the native compiler checks mathematical syntax and meaning.

These calls require admitted native algebra capabilities. A missing capability refuses model admission before source publication. The native system profile returns isolated polynomial solutions; general parameterized families may remain unsupported. Matrix Solve linear system handles an admitted exact linear family. Degree, coefficient and work limits are enforced by the native profile; the workbench does not install a backend or silently weaken a request. See the optional polynomial-system model and the native capability profile.

Exact matrices

Choose New calculation → Create exact matrix. Select 1–8 rows and columns, then enter exact values such as 2/3 or declared symbolic expressions. The initial draft is the 2×2 identity. Resizing preserves entries within the new shape and fills new cells with zero; shrinking discards removed draft entries. The table scrolls horizontally when needed. Save under a fresh name and inspect it to see native matrix typesetting with the original text still available. Each entry is bounded to 4 KiB and the complete formula to 16 KiB. Use Code for larger or empty matrices. Native empty-matrix displays retain both dimensions.

The canonical model includes Coefficients and the column RightHandSide. Inspect Coefficients to choose Determinant, Rank, Row reduce, Inverse, Nullspace or Solve linear system. Each opens a new formula draft referencing the saved matrix. Linear solve asks for the second matrix, solving A × X = B; enter RightHandSide as B. Formula preview shows the exact native call before saving. Matrix operation results retain their native status, classification and bounded value details. Row reduction labels its reduced matrix and zero-based pivot columns separately. An underdetermined solve presents the particular solution X₀ and nullspace basis N, with the family X₀ + N × C for a free coefficient matrix C. Singular inverses and inconsistent systems have explicit outcomes. Matrix dimensions lists each native rows/columns pair. A truncated compound capture retains its omission notice. Automatic reuse of result payloads remains in Code.

Construction uses Grid's pure exact-matrix constructor. The six computations require an admitted native exact-linear-algebra capability and rational entries. A missing capability rejects model admission before source publication; the workbench retains the refusal and does not install a backend or retry the write. Singular, inconsistent and unsupported results retain the native classification. This authoring surface does not make that capability available on every package or platform. See the native capability profile.

Retention and evidence

Solutions appear as variable/value tables, with multiplicity and per-branch conditions beside the answer. Incomplete answers and truncated lists remain explicit. Computation counters, derivation evidence and revision details are available under Computation details.

Exact fractions, powers, square roots, functions, relations and matrices have mathematical typesetting generated from the native expression. Exact display text retains the engine's original text. Typesetting is optional: a large expression, an unsupported display form or unavailable font falls back to the native text. Algebraic root descriptors typeset their defining polynomial, variable, domain, zero-based native ordinal, descriptor multiplicity and exact isolation bounds. Descriptor multiplicity belongs to the canonical defining polynomial; the solution's multiplicity remains beside its branch. Negative coefficients use conventional subtraction and grouped powers, while original native text remains available. Values with approximation metadata retain all their native details. In narrow result panels, each solution variable sits above its value. Root metadata uses separate lines, and longer expressions retain horizontal scrolling. Approximation results show the stored value, lower and upper bounds, precision and rounding together; complex approximations include both real and imaginary components. No browser calculation invents additional decimal digits. MathML accompanies typeset displays for assistive technology.

The Calculation trail retains up to twelve recent captures in the mounted workbench session. Consecutive identical inspections reuse the most recent capture. Open capture restores its historical display without recalculation. Compare places two captures side by side with their conditions and source revisions; it does not assert mathematical equivalence. Export captures downloads the original bounded display records as JSON, up to 1 MiB. It preserves exactness, conditions, truncation and native identities; it is not a mathematical Tree transport, proof replay or executable notebook. Export before closing to retain these displays. Saved formulas are the reproducible calculation record; capture history is not automatically persisted.

Choose which captures to Include in report, then Export report to save a self-contained HTML document. New captures are included by default. The report orders the selected captures oldest first and retains typeset mathematics, conditions, solution multiplicities, approximation enclosures, source revisions and any formula recorded when the calculation was created. A missing formula is labelled explicitly. It opens offline and can be printed or saved as PDF through the browser. Expand computation details and capture identities before printing to include those records. Reports are limited to 2 MiB; select fewer captures if that limit is reached. Exporting performs no calculation or write to the model. A report is a historical display; retain the model source for reproducible mathematics.

Saved formulas and the list of up to 12 named bookmarks belong to model source. Removing a bookmark preserves the formula. Opening the surface does not execute an inspection. Local calculation drafts remain in the current session and guard navigation; copy them before leaving. Configuration uses the shared surface save/recovery owner. If a calculation's acknowledgement is missing, the draft is retained and another save is disabled. Observe saved result selects the possibly saved name; inspecting it performs no repeated write.

Inspect derivation shows existing certificate-bound WHY metadata for the captured value. It checks that the source, working revision and value identity still match. This inspection does not replay the original input-bearing proof.

Inspection admits one named native symbolic value, 32 children per container, 256 visited values and depth 8, with a 64 KiB response limit. Omitted and truncated details are labelled; a displayed prefix is never a complete solution set. Native Trees remain in native. The browser receives bounded display text and metadata, not semantic Tree JSON. Optional typesetting admits at most 512 expression nodes, depth 48 and 8 KiB per expression. If the complete inspection would exceed 64 KiB with typesetting, it retains the plain-text inspection instead; native conditions and identities are preserved.

This standalone built-in has no JSX ejection or compiler-native Grid View embedding contract. Run mode permits explicit inspection and hides authoring. Print mode does not fetch results; it can display only a capture already held by that mounted instance. For reproducible mathematics, retain the saved model and inspect its current values. See the language guide for the native mathematical contract.