Skip to main content

Variable Ontology

Symbolic Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 13 October 2026
Audio Overview
FLOW ALGEBRA
VARIABLE ONTOLOGY
Kireth Semantic Library — Mathematical Entities / Symbolic Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/symbolic-entities/variable-ontology-2.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0
Date: 2026-10-13
Source status: Formal ontology drafted from established mathematical principles; source page not independently verified.

01. PURPOSE
flow VariableOntology v1.0:
  domain: MathematicalEntities.SymbolicEntities
  primary_entity: Variable
  objective: Represent symbols whose interpretation may vary with assignment, scope, context or mathematical model.
  distinction: A variable is a symbolic role, not necessarily a changing physical quantity.

02. ENTITY TYPES
entity Variable <: MathematicalSymbol
entity FreeVariable <: Variable
entity BoundVariable <: Variable
entity IndependentVariable <: Variable
entity DependentVariable <: Variable
entity RandomVariable <: Variable
entity Parameter <: Variable
entity IndexVariable <: Variable
entity DummyVariable <: BoundVariable
entity TypedVariable <: Variable
entity VariableOccurrence
entity Binding
entity Assignment
entity Scope
entity Domain
entity Expression
entity Formula
entity Function
entity Context
entity Value

03. CORE SCHEMA
Variable:
  id: Identifier
  glyph: UnicodeString
  namespace: Identifier?
  type: MathematicalType?
  domain: Set?
  scope: Scope?
  binding_status: free | bound | context_dependent
  role: independent | dependent | parameter | index | random | general
  assumptions: Set[Constraint]
  provenance: SourceReference?

04. RELATIONSHIP TYPES
relationship hasSymbol(Variable, MathematicalSymbol)
relationship hasDomain(Variable, Domain)
relationship hasType(Variable, MathematicalType)
relationship occursIn(VariableOccurrence, Expression)
relationship refersTo(VariableOccurrence, Variable)
relationship boundBy(VariableOccurrence, Binding)
relationship scopedWithin(Binding, Scope)
relationship assignedValue(Assignment, Value)
relationship assignmentFor(Assignment, Variable)
relationship dependsOn(Variable, Variable)
relationship constrainedBy(Variable, Constraint)
relationship denotes(Variable, MathematicalObject)
relationship equivalentUnderRenaming(Expression, Expression)

05. FORMAL SEMANTICS
context Γ: maps variable identifiers to types and assumptions.
environment ρ: maps free variables to values in their domains.
interpretation [[x]]ρ = ρ(x) for free x.
For a binding operator B x . E, occurrences of x within B's scope refer to that binding, except where shadowed.
The same glyph in different scopes may identify different variables.

06. FREE AND BOUND VARIABLES
FV(x) = {x}.
FV(c) = {} for constant c.
FV(f(E1,...,En)) = union(FV(Ei)).
FV(∀x.P) = FV(P) \ {x}.
FV(∃x.P) = FV(P) \ {x}.
FV(λx.E) = FV(E) \ {x}.
Boundness is occurrence-relative: one expression may contain both free and bound occurrences of the same glyph.

07. ALPHA EQUIVALENCE
λx.x ≡α λy.y where renaming is capture-avoiding.
∀x.P(x) ≡α ∀y.P(y) if y is fresh and substitution avoids capture.
Do not identify free-variable renaming with alpha equivalence.

08. SUBSTITUTION
substitute(E, x, t): replace free occurrences of x in E with t.
precondition: t is well-typed for x.
requirement: rename bound variables as necessary to prevent variable capture.
example: substitute(∀y.P(x,y), x, y) = ∀z.P(y,z) for fresh z.

09. TYPE AND DOMAIN RULES
Γ ⊢ x:T when Γ(x)=T.
ρ(x) ∈ Domain(x).
Assignment must satisfy declared type, domain and constraints.
A domain can be finite, infinite, discrete, continuous or structured.
A variable may range over numbers, sets, functions, propositions or other objects.

10. VARIABLE ROLES
IndependentVariable: input coordinate or chosen argument relative to a model.
DependentVariable: determined by other variables under a specified relation.
Parameter: held fixed within one evaluation while permitted to vary across model instances.
IndexVariable: indexes a family, sum, product or sequence.
RandomVariable: measurable function X: Ω → S on a probability space, not merely an unknown number.
DummyVariable: locally bound symbol, often within summation, integration or quantification.
Roles depend on context and are not necessarily mutually exclusive across contexts.

11. MATHEMATICAL OPERATIONS
assign(x,v): create an environment binding after type/domain checks.
evaluate(E,ρ): evaluate expression under environment ρ when defined.
substitute(E,x,t): capture-avoiding substitution.
renameBound(E,x,y): alpha-renaming with freshness checks.
freeVariables(E): compute free-variable set.
boundOccurrences(E): enumerate occurrences bound by operators.
unify(E1,E2): derive substitution subject to occurs check and type constraints.

12. INFERENCE RULES
IF Γ(x)=T THEN infer hasType(x,T).
IF occurrence o is in scope of binding b and b binds x without intervening shadowing THEN infer boundBy(o,b).
IF x occurs in E and has no binding applicable to that occurrence THEN infer freeOccurrence(x,E).
IF E1 and E2 differ only by valid bound-variable renaming THEN infer alphaEquivalent(E1,E2).
IF assignment x:=v and v∉Domain(x) THEN reject assignment.
IF substitution would capture a free variable THEN rename conflicting binder before substitution.

13. KNOWLEDGE GRAPH MODEL
node variable:x: Variable {glyph:'x',type:'Real'}
node expression:e: -Expression {notation:'x + 2'}
node domain:R: Domain {name:'RealNumbers'}
edge (variable:x)-[HAS_DOMAIN]->(domain:R)
edge (variable:x)-[OCCURS_IN]->(expression:e)
edge (expression:e)-[HAS_FREE_VARIABLE]->(variable:x)
Preserve occurrence identity, scope and context when serialising graph edges.

14. SEMANTIC EQUIVALENCE
Variable identity: identifier + namespace + binding context; glyph equality alone is insufficient.
α-equivalence: same binding structure after capture-avoiding renaming.
Expression equivalence: may require algebraic assumptions and a declared domain.
Do not equate an unbound variable with a constant merely because one assignment matches its value.

15. CONSTRAINTS AND VALIDATION
V01: each variable reference resolves to a binding or is explicitly free.
V02: every typed assignment satisfies the declared type.
V03: assigned values satisfy domain restrictions.
V04: substitutions avoid capture.
V05: bound-variable renaming preserves binding structure.
V06: scope shadowing is handled deterministically.
V07: variable roles have explicit model context.
V08: random-variable declarations identify sample space, sigma algebra and codomain where needed.
V09: notation and semantics are recorded separately.
V10: unknown domain or type remains unknown; do not invent values.

16. EXAMPLES
Example A: E=x+3, Γ={x:Integer}, ρ={x:4}; evaluate(E,ρ)=7.
Example B: ∀x∈R, x²≥0; x is bound in the predicate.
Example C: f(x)=ax+b; a,b may be parameters and x an independent variable in the chosen model.
Example D: Σ(i=1..n) i; i is a bound index, n may be free.
Example E: X:Ω→R; X is a random variable when measurable.

17. CONFIDENCE
confidence:
  formal_definitions: high
  mathematical_rules: high
  page_specific_alignment: unverified
  inference_policy: distinguish proven consequences from assumptions and conventions

18. PROVENANCE AND UPDATE MODEL
provenance:
  origin: Kireth Semantic Library
  reference_url: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/symbolic-entities/variable-ontology-2.html
  drafting_basis: standard logic, algebra, programming-language semantics and probability theory
update_model:
  versioned: true
  triggers: source revision | formal correction | schema extension
  compatibility: preserve entity identifiers and document breaking changes
  review: validate formal examples and scope rules after changes

19. FLOW HASH
flow_hash:
  method: SHA-256
  canonicalisation: UTF-8, LF newlines, stable ordered keys, exclude flow_hash digest field
  digest: compute on deployment; not precomputed
  purpose: content integrity and version comparison

20. AI CONSUMPTION
ai_consumption:
  parsing: typed entity and relationship extraction
  reasoning: scope-aware variable resolution and inference
  retrieval: variable role, domain, binding and notation search
  safety: refuse undefined substitutions and unsupported type assumptions
  output: machine-readable entities, edges, proofs, confidence and provenance
  interoperability: RDF/OWL or JSON-LD mapping with explicit scope representation

21. FLOW TERMINATION
END FLOW ALGEBRA — VARIABLE ONTOLOGY
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ