Skip to main content

Symbolic Expression Ontology

Expression Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 13 October 2026
Audio Overview
FLOW ALGEBRA
SYMBOLIC EXPRESSION ONTOLOGY
Kireth Semantic Library | Entity Graph > Mathematical Entities > Expression Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/expression-entities/symbolic-expression-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-13 | Encoding: UTF-8
Source status: Conceptual mathematical specification; webpage text not independently verified.

01. PURPOSE
flow "SymbolicExpressionOntology" v1.0
  goal: represent, parse, type-check, transform and reason about mathematical expressions while preserving their semantics and assumptions.
  domain: symbolic mathematics, computer algebra, mathematical knowledge graphs.

02. CORE ENTITY TYPES
  SymbolicExpression := recursively constructed syntax tree with an interpretation.
  AtomicExpression := Literal | Variable | NamedConstant | Placeholder.
  CompoundExpression := OperatorApplication | FunctionApplication | BinderExpression | PiecewiseExpression.
  Equation := relation between expressions, not an expression of numeric value by default.
  Identifier := (name, namespace, scope, declared_type).
  Operator := (symbol, arity, precedence, associativity, signature).
  Function := (identifier, domain, codomain, argument_list).
  Context := (assumptions, symbol_table, domains, units, branch_conventions).

03. TYPED REPRESENTATION
  ExpressionNode:
    id: unique_identifier
    kind: atomic | operator_application | function_application | binder | piecewise
    notation: text?
    operator: Operator?
    children: ordered_list<ExpressionNode>
    type: Scalar | Boolean | Vector | Matrix | Set | Function | Other
    domain: mathematical_domain?
    free_variables: set<Identifier>
    assumptions: set<Constraint>
    provenance: source_reference?
  invariant: every child is an ExpressionNode.
  invariant: operator arity matches number of operands.
  invariant: declared operand types satisfy operator signature.

04. SYNTAX AND PARSING
  input: -expression_string, notation_grammar, symbol_table.
  tokenize -> parse_with_precedence -> build_AST -> resolve_identifiers -> type_check.
  distinguish: subtraction from unary negation; function call from multiplication.
  distinguish: x^2 from indexed symbol x_2; equality from assignment.
  reject: malformed brackets, unresolved binding, invalid operator arity.
  output: typed_AST | structured_parse_error.

05. INTERPRETATION
  interpret(expression, environment, domain, assumptions) -> value | undefined | symbolic_result.
  interpret(literal, env) = literal_value.
  interpret(variable, env) = env[variable] when assigned.
  interpret(op(args), env) = op(interpret(args, env)) when defined.
  undefined when a required operation violates domain restrictions.
  preserve distinctions among syntax, denotation and numerical approximation.

06. FREE AND BOUND VARIABLES
  FV(c) = empty_set for literal c.
  FV(x) = {x} for variable x.
  FV(f(e1,...,en)) = union(FV(ei)).
  FV(lambda x.e) = FV(e) minus {x}.
  binder_scope: quantifiers, summation, product, integral, lambda.
  alpha_equivalence: renaming bound variables without changing binding structure.
  substitution: capture_avoiding_replace(expression, variable, replacement).

07. STRUCTURAL OPERATIONS
  children(e) -> ordered_operands.
  traverse(e, preorder | postorder) -> sequence_of_nodes.
  depth(e) -> nonnegative_integer.
  size(e) -> positive_integer.
  replace_subtree(e, path, replacement) -> expression.
  substitute(e, mapping) -> expression with capture avoidance.
  canonical_serialize(e) -> deterministic syntax representation.

08. ALGEBRAIC OPERATIONS
  simplify(e, assumptions) -> equivalent_expression with proof obligations.
  expand(e) -> distributive_normal_form when applicable.
  factor(e) -> factorised_expression when applicable.
  collect(e, variable) -> grouped_terms.
  differentiate(e, variable) -> derivative_expression if defined.
  integrate(e, variable) -> antiderivative_family if available.
  evaluate(e, assignments) -> exact_or_approximate_result.
  solve(relation, unknowns, domain) -> solution_set with conditions.

09. EQUIVALENCE RELATIONS
  syntactic_equal(a,b) iff identical canonical syntax trees.
  alpha_equivalent(a,b) iff differing only by valid bound-variable renaming.
  semantic_equivalent(a,b,domain,assumptions) iff equal denotations wherever both are defined, with matching definedness requirements for full equivalence.
  example: x+x semantically equals 2*x over standard rings.
  example: x/x = 1 only where x != 0.
  example: sqrt(x^2) = abs(x) for real x, not necessarily x.
  warning: equivalence depends on domains, branch choices and assumptions.

10. REWRITE RULE SCHEMA
  RewriteRule:
    pattern: -expression_pattern
    replacement: -expression_template
    preconditions: list<Constraint>
    target_domain: Domain
    semantic_preservation: proof | trusted_axiom | verified_check
  rule ADD_ZERO: x + 0 -> x, when addition identity applies.
  rule MULTIPLY_ONE: x * 1 -> x, when multiplication identity applies.
  rule DISTRIBUTE: a*(b+c) -> a*b+a*c, in distributive structures.
  rule CANCEL: (a*b)/b -> a, provided b != 0 and division defined.
  rule POWER: x^a*x^b -> x^(a+b), only under valid exponent/domain assumptions.
  rewrite_strategy: apply validated rules; prevent nontermination with budgets and ordering.

11. NORMAL FORMS
  structural_normal_form: canonical tree ordering where algebra permits.
  polynomial_normal_form: coefficient map from monomials to coefficients.
  rational_normal_form: reduced numerator/denominator with excluded points retained.
  boolean_normal_form: DNF or CNF under Boolean semantics.
  note: no single universal normal form exists for all symbolic expressions.

12. DOMAINS AND CONSTRAINTS
  domain_of(e) = intersection of operand constraints and operator-definedness.
  division: denominator != 0.
  real_sqrt: radicand >= 0.
  real_log: argument > 0 and valid base when explicit.
  matrix_multiply: compatible dimensions.
  exponentiation: apply domain-specific branch conventions.
  propagate_constraints(e) -> satisfiable_conditions | contradiction | unknown.

13. SEMANTIC RELATIONSHIPS
  SymbolicExpression --is_a--> MathematicalExpression.
  SymbolicExpression --contains--> Operand.
  SymbolicExpression --applies--> Operator.
  SymbolicExpression --references--> Identifier.
  SymbolicExpression --has_free_variable--> Variable.
  BinderExpression --binds--> Variable.
  SymbolicExpression --has_domain--> MathematicalDomain.
  SymbolicExpression --is_equivalent_under--> Context.
  RewriteRule --transforms--> SymbolicExpression.
  SymbolicExpression --has_provenance--> Source.

14. KNOWLEDGE GRAPH TRIPLES
  (expr_1, rdf:type, SymbolicExpression)
  (expr_1, hasOperator, addition)
  (expr_1, hasOperand[0], variable_x)
  (expr_1, hasOperand[1], variable_x)
  (expr_1, semanticallyEquivalentTo, expr_2)
  (expr_2, notation, "2*x")
  (equivalence_assertion, requiresAssumption, "x in commutative ring")
  retain ordered operands, context and proof provenance as first-class data.

15. INFERENCE RULES
  IF e = add(x,0) AND additive_identity(domain) THEN infer equivalent(e,x).
  IF e = divide(x,x) AND nonzero(x) THEN infer equivalent(e,1).
  IF e = multiply(a,b) AND scalar(a) AND vector(b) THEN infer vector(e), subject to defined scalar action.
  IF alpha_equivalent(a,b) THEN infer equivalent_binding_structure(a,b).
  IF undefined(e,context) THEN prohibit unqualified numeric evaluation.
  IF equivalence(a,b,C) AND equivalence(b,c,C) THEN infer equivalence(a,c,C).

16. VALIDATION
  validate: parseable syntax, valid symbol resolution, correct arity and types.
  validate: binder scoping and capture avoidance.
  validate: assumptions satisfiable or explicitly unknown.
  validate: no division by zero or invalid real-domain operations.
  validate: rewrites preserve definedness and interpretation.
  validate: provenance recorded for nontrivial claims.
  status: valid | invalid | conditional | undetermined.

17. CONFIDENCE
  confidence: 1.0 for machine-checked identities under explicit assumptions.
  confidence: high for formally proven, source-grounded rules.
  confidence: qualified for heuristic simplifications or unverified conjectures.
  never interpret statistical confidence as mathematical proof.
  report: confidence_score, evidence_type, assumptions, verification_method.

18. SEMANTIC_EQUIVALENCE
  match: normalised AST + typed signatures + domains + binder structure.
  distinguish: exact equivalence | conditional equivalence | numerical closeness.
  numerical closeness is not a proof of symbolic equivalence.
  equivalence_key: hash(canonical_expression, domain, assumptions, branch_policy).

19. FLOW_HASH
  canonical_payload: ontology_id + version + schema + ordered_rules + assumptions.
  FLOW_HASH: SHA-256(UTF-8(canonical_payload)).
  note: calculate the actual digest at publication; no invented hash is asserted.

20. UPDATE_MODEL
  version_policy: semantic_versioning.
  triggers: corrected rules, revised types, new notation, proof updates.
  actions: validate -> compare -> migrate -> recalculate_hash -> publish.
  maintain: change_log, supersedes, provenance, rollback_reference.

21. AI_CONSUMPTION
  inputs: natural_language | LaTeX | MathML | AST | knowledge_graph.
  outputs: typed_AST | equivalent_forms | verified_steps | constraints | triples.
  pipeline: ingest -> parse -> resolve -> type -> infer -> validate -> explain.
  preserve: mathematical domain, units, exactness, binding and assumptions.
  abstain: when equivalence cannot be established.
  explain: distinguish proof from heuristic and approximation.

22. EXAMPLES
  E1: parse("3*x + 2") -> add(multiply(3,x),2).
  E2: simplify("x + x") -> "2*x" under ordinary arithmetic.
  E3: simplify("x/x") -> "1" with condition x != 0.
  E4: FV("lambda x. x+y") -> {y}.
  E5: alpha_equivalent("lambda x.x", "lambda z.z") -> true.
  E6: simplify("sqrt(x^2)") -> "abs(x)" for real x.
  E7: distinguish "x^2" (power) from "x_2" (indexed symbol).

23. QUALITY AND SAFETY
  avoid silent assumptions, fabricated proofs, lossy conversions or hidden domain restrictions.
  retain original expression alongside transformations.
  expose undefined, indeterminate and unsupported results explicitly.
  protect parser against resource exhaustion using depth, size and rewrite limits.

24. INTEGRATION
  parent: -Expression Entities.
  related: Mathematical Expression, Term, Polynomial, Rational Expression.
  related: Variable, Constant, Parameter, Operator, Operand, Bound Variable, Free Variable.
  adjacent: Symbolic Algebra, Mathematical Logic, Knowledge Graph, AI Reasoning.
  output_contract: portable UTF-8 TXT, explicit semantics and deterministic flow specification.

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ