AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
POLYNOMIAL ONTOLOGY
Kireth Semantic Library | Entity Graph | Mathematical Entities | Expression Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/expression-entities/polynomial-ontology-2.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-13
Status: mathematical reference draft; source webpage not independently verified
01. ONTOLOGY IDENTITY
flow "PolynomialOntology" v1.0
entity Polynomial <: MathematicalExpression
namespace: kireth:mathematics:e-xpression:polynomial
purpose: Represent, validate, transform and reason over polynomial expressions.
02. DEFINITIONS
Let R be a commutative ring with identity and X = (x_1,...,x_n).
R[X] consists of finite sums p = SUM_{alpha in N^n} c_alpha X^alpha,
where c_alpha in R and only finitely many coefficients are nonzero.
X^alpha = PRODUCT_i x_i^(alpha_i).
Zero polynomial: every coefficient equals zero.
Constant polynomial: every nonzero monomial has total degree zero.
Univariate polynomial: n = 1.
Multivariate polynomial: n >= 2.
03. TYPED ENTITIES
Polynomial(id, coefficient_ring, variables, terms, representation)
Monomial(coefficient, exponent_vector)
Coefficient(value, ring)
Variable(symbol, scope, domain)
ExponentVector(values: tuple[nonnegative_integer])
PolynomialDegree(value: nonnegative_integer | NEG_INFINITY)
Factor(polynomial, multiplicity: positive_integer)
Root(value, domain, multiplicity)
PolynomialIdentity(lhs, rhs, assumptions)
04. CONSTRUCTION
CONSTRUCT(R, X, terms):
require R is a commutative ring with identity
require variable symbols are distinct
require each coefficient belongs to R
require exponent vectors have length len(X) and entries in N
combine like exponent vectors by coefficient addition
delete zero-coefficient terms
return canonical sparse polynomial
05. CANONICAL REPRESENTATION
NORMALISE(p):
fix variable order and coefficient normal form
combine like terms; remove zero terms
sort terms by an explicitly chosen monomial order
preserve coefficient ring and variable scope
do not assume two distinct symbolic coefficients are equal without proof
06. DEGREE AND LEADING TERMS
For nonzero p, total_degree(p) = max SUM_i alpha_i over nonzero terms.
For the zero polynomial, degree(0) = NEG_INFINITY by convention.
Univariate leading coefficient is the coefficient of the highest power.
Multivariate leading term requires a declared monomial order.
In an integral domain, deg(pq) = deg(p) + deg(q) for nonzero p,q.
Over rings with zero divisors, that equality need not hold.
07. ADDITION AND NEGATION
ADD(p,q): require same compatible ring and variable context;
coefficient(r,alpha) = coefficient(p,alpha) + coefficient(q,alpha).
NEGATE(p): negate every coefficient.
SUBTRACT(p,q) = ADD(p,NEGATE(q)).
Invariants: p+0=p; p+(-p)=0; p+q=q+p; (p+q)+r=p+(q+r).
08. MULTIPLICATION
MULTIPLY(p,q):
for each alpha,beta: accumulate c_alpha*d_beta at alpha+beta
normalise result
Invariants: p*1=p; pq=qp; p(q+r)=pq+pr.
POWER(p,k): require k integer >= 0; repeated multiplication with p^0=1.
09. EVALUATION AND SUBSTITUTION
EVALUATE(p, a_1,...,a_n): require compatible target algebra and embedding;
sum c_alpha PRODUCT_i a_i^(alpha_i).
SUBSTITUTE(p, x_i -> q_i): require well-typed substitution;
compose polynomial expressions and normalise.
Evaluation is a ring homomorphism under compatible assumptions.
Capture avoidance applies when embedded in binder-bearing languages.
10. DERIVATION
FORMAL_DERIVATIVE(p,x_i):
SUM_{alpha_i>0} c_alpha*alpha_i*x_i^(alpha_i-1)*PRODUCT_{j!=i}x_j^(alpha_j).
Product rule: D(pq)=D(p)q+pD(q).
Formal differentiation is defined over any commutative coefficient ring.
In positive characteristic, nonconstant polynomials can have zero derivative.
11. DIVISION AND FACTORISATION
Univariate division with remainder requires a field of coefficients,
or other assumptions making divisor leading coefficient invertible.
For q != 0 over a field: p = q*s + r, with r=0 or deg(r)<deg(q).
Factorisation is relative to the chosen coefficient domain.
Irreducibility over Q differs from irreducibility over R or C.
Unique factorisation holds in F[x] for a field F, up to units and order.
12. ROOTS AND IDENTITIES
ROOT(p,a): EVALUATE(p,a)=0.
Over a field, x-a divides p iff p(a)=0.
A nonzero univariate degree-d polynomial over an integral domain
has at most d distinct roots in that domain.
Over C, every nonconstant univariate polynomial has a complex root.
A polynomial identity is equality in the polynomial ring,
not merely agreement at finitely many sample inputs.
13. CLASSIFICATION
Monomial: one nonzero term after normalisation.
Binomial: two nonzero terms after normalisation.
Trinomial: three nonzero terms after normalisation.
Homogeneous polynomial: all nonzero terms share total degree.
Linear polynomial: total degree <= 1; specify whether constants count.
Quadratic polynomial: total degree exactly 2.
Zero polynomial is not assigned a finite degree.
14. SEMANTIC RELATIONSHIPS
Polynomial IS_A MathematicalExpression.
Polynomial HAS_TERM Monomial.
Monomial HAS_COEFFICIENT Coefficient.
Monomial HAS_EXPONENT_VECTOR ExponentVector.
Polynomial USES_VARIABLE Variable.
Polynomial OVER_RING CoefficientRing.
Polynomial HAS_DEGREE PolynomialDegree.
Polynomial HAS_ROOT Root.
Polynomial FACTORS_INTO Factor.
Polynomial EQUIVALENT_TO Polynomial under a declared coefficient ring.
15. KNOWLEDGE GRAPH TRIPLES
(p1, rdf:type, Polynomial)
(p1, coefficientRing, RationalNumbers)
(p1, variable, x)
(p1, hasTerm, t1)
(t1, coefficient, 3)
(t1, exponentOf_x, 2)
(p1, semanticDomain, Algebra)
All graph assertions carry provenance and context identifiers.
16. INFERENCE RULES
IF NORMALISE(p-q)=0 THEN infer PolynomialIdentity(p,q).
IF p(a)=0 AND coefficient_domain_is_field THEN infer DIVIDES(x-a,p).
IF p is nonzero AND deg(p)=0 THEN infer ConstantPolynomial(p).
IF p is nonzero AND exactly_two_nonzero_terms(p) THEN infer Binomial(p).
IF p,q nonzero over integral_domain THEN infer deg(pq)=deg(p)+deg(q).
IF coefficient_ring_has_zero_divisors THEN withhold unrestricted degree rule.
17. SEMANTIC EQUIVALENCE
SYNTACTIC_EQUALITY: same parsed representation.
CANONICAL_EQUALITY: same normalised polynomial over same coefficient ring.
FUNCTIONAL_EQUALITY: evaluations agree over a specified domain.
Do not conflate polynomial equality with functional equality over finite fields.
Example: x^2-x is nonzero in F_2[x] but vanishes at both F_2 elements.
18. VALIDATION
CHECK coefficient membership, exponent integrality, variable uniqueness.
CHECK ring compatibility before combining polynomials.
CHECK division assumptions and zero divisor restrictions.
CHECK roots by exact evaluation when possible.
CHECK factorisation by multiplying all factors and comparing normal forms.
CHECK claimed degree and leading term against monomial ordering.
CHECK equality with symbolic normalisation, not floating-point sampling alone.
19. CONFIDENCE
confidence.definition = 1.0 for standard definitions under stated assumptions.
confidence.symbolic_proof = 1.0 when verified by exact derivation.
confidence.numeric_evidence = contextual, never substitute for proof.
confidence.source_alignment = unverified until source page is reviewed.
Represent confidence with evidence type and provenance, not arbitrary certainty.
20. FLOW_HASH
FLOW_HASH := SHA256(canonical_utf8(
ontology_id + version + coefficient_context + sorted_axioms + sorted_rules
))
Hash is a reproducibility identifier, not proof of mathematical truth.
21. UPDATE_MODEL
On coefficient-ring change: invalidate ring-dependent claims.
On variable-order change: recompute canonical ordering and leading terms.
On term change: renormalise, recalculate degree, roots and derived claims.
On rule change: increment version, recalculate FLOW_HASH, audit dependencies.
Maintain history, provenance and semantic compatibility checks.
22. AI_CONSUMPTION
input: typed polynomial entities, context, assumptions, requested operation
pipeline: parse -> type_check -> normalise -> reason -> validate -> explain
output: result, canonical_form, assumptions, proof_or_trace, confidence, provenance
Never infer global equivalence from a finite set of numerical evaluations.
Return explicit uncertainty when factorisation or equality cannot be established.
23. EXAMPLES
p = 3*x^2 + 2*x - 5 over Q[x].
NORMALISE(p) = 3*x^2 + 2*x - 5.
DEGREE(p) = 2.
FORMAL_DERIVATIVE(p,x) = 6*x + 2.
EVALUATE(p,1) = 0.
FACTOR(p) = (x-1)*(3*x+5).
CHECK: (x-1)*(3*x+5) = 3*x^2 + 2*x - 5.
24. LIMITATIONS AND PROVENANCE
This is a formal reference specification, not a directly executable interpreter.
Syntax describes operations and constraints; an implementation must define parser,
coefficient arithmetic, proof checker, hash canonicalisation and graph storage.
The linked Kireth page was not independently verified for this draft.
END FLOW ALGEBRA