← All examples
22

Canonical Grid model

Symbolic Mathematics

Declare symbols, compose polynomials with ordinary operators, and canonicalize, expand, factor, differentiate, and solve exactly with certified SYMBOLIC results, assumptions, and reactive coefficients.

Scale
Medium
Source
22-symbolic-mathematics.grid
Length
56 lines
Collection
Forecasting & decisions
Level
Advanced
Runtime
Portable
Version
1.0.0

Watch it in Grid

See this model in motion.

Watch the model respond in the product, then inspect the exact source and checkpoints on this page.

Companion film

Exact math stays live

Change one coefficient and watch factors, derivatives, roots, and exact mathematical evidence update together.

49 secGrid 0.61.0
Open film page

What this model gives you

An exact reactive algebra model with immutable symbols, certified transformations, assumptions, solving, substitution, approximation, and replayable derivation evidence.

35 min to study · Source reviewed 2026-08-26

Continue with guided practice

What to notice

  • Contextual symbolic variables and reactive coefficients
  • Atomic transformation result records
  • Local assumptions and four-state decisions
  • Exact solving, evaluation, and explicit approximation

Requirements

  • Runtime with the native SYMBOLIC.* engine and certificate-backed Tree values
  • Operation inputs must remain inside symbolic size and work limits
  • No connector or network

Expected checkpoint

A known state for this walkthrough.

With x declared by the model authority and A1 = 2. The exact scalar projections below follow the documented symbolic contract; the verification contract currently certifies compilation rather than carrying a symbolic runtime receipt.

Polynomial at x = 3
16value
Reactive expression at x = 3
19reactive_value with A1 = 2
Derivative
2*x + 2derivative; exact symbolic expression
Cancellation under x > 0
1 / :completecancelled / cancelled_status
Exact roots
x = -1 with multiplicity 2roots_result over :complex
01 · Declare

Separate unknowns from reactive coefficients

symbol x creates an immutable authority-scoped variable. A1 remains an ordinary input, so editing it rebuilds only reactive and its dependants while the identity of x and unrelated expressions remains stable.

02 · Transform

Keep status and certificate attached to every answer

CANONICALIZE, EXPAND, FACTOR, COLLECT, and D return atomic records containing expression, status, conditions, completeness, work, and a replayable certificate. Project a field for display, but retain the parent result for audit.

03 · Assume

Pass local evidence instead of mutating global truth

real_positive combines a domain claim with x > 0. CANCEL can then discharge the nonzero obligation, and DECIDE returns four-state evidence; contradictory assumptions would remain explicit rather than coercing to true.

04 · Solve

Distinguish exact branches from no answer

SOLVE returns certified branches, multiplicities, conditions, domain, completeness, and result-level evidence. :none is reserved for a complete no-solution proof; :unknown and :limit never masquerade as absence.

05 · Evaluate

Cross the approximate boundary explicitly

SUBSTITUTION plus EVALUATE keeps polynomial values exact. RATIONAL constructs 1/3 exactly, while APPROXIMATE alone introduces a declared bit precision and rounding policy with an outward enclosure.

22-symbolic-mathematics.grid
Get Grid
MODEL "Symbolic Mathematics"
DESCRIPTION "Declare symbols, compose polynomials with ordinary operators, and canonicalize, expand, factor, differentiate, and solve exactly with certified SYMBOLIC results, assumptions, and reactive coefficients."
VERSION "1.0.0"
AUTHOR "Grid"
TAGS "symbolic", "mathematics", "exact", "certificates"

symbol x
input A1 = 2

polynomial = x^2 + 2*x + 1
reactive = A1*x^2 + 1
unrelated = x + 7

canonical_result = SYMBOLIC.CANONICALIZE(polynomial)
canonical = canonical_result.expression
canonical_status = canonical_result.status
canonical_certificate = canonical_result.certificate

expanded_result = SYMBOLIC.EXPAND(polynomial)
factored_result = SYMBOLIC.FACTOR(polynomial)
collected_result = SYMBOLIC.COLLECT(polynomial, x)
derivative_result = SYMBOLIC.D(polynomial, x)
derivative = derivative_result.expression

real_positive = SYMBOLIC.ASSUMPTIONS(
  SYMBOLIC.DOMAIN(x, :real),
  x > 0
)
cancelled_result = SYMBOLIC.CANCEL(x / x, real_positive)
cancelled = cancelled_result.expression
cancelled_status = cancelled_result.status

roots_result = SYMBOLIC.SOLVE(polynomial == 0, x, :complex)
roots_status = roots_result.status
roots_complete = roots_result.complete
roots_certificate = roots_result.certificate

at_three = SYMBOLIC.SUBSTITUTION(x, 3)
value_result = SYMBOLIC.EVALUATE(polynomial, at_three)
value = value_result.expression
reactive_value_result = SYMBOLIC.EVALUATE(reactive, at_three)
reactive_value = reactive_value_result.expression

one_third = SYMBOLIC.RATIONAL(1, 3)
approximation_result = SYMBOLIC.APPROXIMATE(one_third, 64, :nearest_even)
approximation = approximation_result.expression
approximation_certificate = approximation_result.certificate

decision_result = SYMBOLIC.DECIDE(x > 0, real_positive)
decision_status = decision_result.status
decision_evidence = decision_result.evidence
decision_certificate = decision_result.certificate

same_tree = SYMBOLIC.SAME(polynomial, canonical)

END MODEL