Skip to main content

Constraint Ontology

Equation and Statement Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 13 October 2026
Audio Overview
FLOW ALGEBRA
CONSTRAINT ONTOLOGY
Kireth Semantic Library | Entity Graph | Mathematical Entities | Equation and Statement Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/equation-and-statement-entities/constraint-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-13 | Language: en-GB
Status: Mathematical specification; source page content not independently verified.

01. PURPOSE
flow "ConstraintOntology" v1.0
  objective: represent, type, combine, evaluate, and reason about mathematical constraints
  principle: a constraint restricts admissible assignments, structures, or states
  output: typed constraint entities, satisfaction results, solution sets, provenance

02. CORE TYPES
  Entity := Variable | Constant | Expression | Domain | Constraint | Assignment | Model
  Constraint := Equality | Inequality | Membership | Logical | Integrality | Bound | Global
  TruthStatus := SATISFIED | VIOLATED | UNKNOWN
  SolverStatus := SAT | UNSAT | UNKNOWN
  Domain := Set[Value]
  Assignment := Map[Variable, Value]
  Context := {domains, assumptions, interpretation, units, precision}

03. FORMAL SEMANTICS
  vars(c) := free variables occurring in c
  eval(c, assignment, context) -> TruthStatus
  satisfies(a,c,C) := eval(c,a,C) = SATISFIED
  solution_set(c,C) := {a in admissible_assignments(C) | satisfies(a,c,C)}
  feasible(CS,C) := intersection over c in CS of solution_set(c,C)
  satisfiable(CS,C) := feasible(CS,C) != empty_set
  NOTE: UNKNOWN must never be treated as SATISFIED or VIOLATED

04. ENTITY SCHEMA
  ConstraintEntity:
    id: URI
    expression: TypedExpression
    relation: ConstraintKind
    variables: Set[Variable]
    variable_domains: Map[Variable,Domain]
    assumptions: Set[Proposition]
    units: Optional[UnitSpecification]
    tolerance: Optional[NonNegativeReal]
    source: Optional[URI]
    status: TruthStatus
    confidence: ConfidenceRecord
    version: VersionIdentifier

05. CONSTRAINT CLASSES
  equality: f(x) = g(x)
  strict_inequality: f(x) < g(x) or f(x) > g(x)
  non_strict_inequality: f(x) <= g(x) or f(x) >= g(x)
  membership: x in S
  exclusion: x not_in S
  integrality: x in Integers
  interval_bound: lower <= x <= upper
  logical: P AND Q, P OR Q, NOT P, P IMPLIES Q
  global: all_different(x1,...,xn), cardinality, cumulative_resource
  conditional: P IMPLIES constraint(c)

06. TYPE AND DOMAIN RULES
  rule TYPE_VALID: operands must support the selected relation
  rule UNIT_VALID: quantities compared by order/equality must have compatible dimensions
  rule DOMAIN_VALID: every assignment value must belong to its variable domain
  rule DEFINED: partial expressions must be defined before comparisons are evaluated
  example: 1/x > 2 requires x != 0
  rule ORDERED: inequalities require an ordered domain; complex numbers have no canonical total order compatible with field operations

07. CONJUNCTION AND DISJUNCTION
  combine_and(C1,C2): solution_set = solutions(C1) intersection solutions(C2)
  combine_or(C1,C2): solution_set = solutions(C1) union solutions(C2)
  negate(x = y): x != y
  negate(x < y): x >= y, when comparison is defined in a total order
  logical_implication(P,Q): equivalent_to (NOT P) OR Q
  NOTE: conjunction is not equivalent to disjunction

08. EQUALITY TRANSFORMATIONS
  if f = g then f+h = g+h when terms are defined
  if f = g then k*f = k*g when terms are defined
  from k*f = k*g infer f = g only if k != 0 in an integral domain
  substitution: replace equals by equals in well-typed, defined contexts
  equivalence requires preservation of the full solution set and domain restrictions

09. INEQUALITY TRANSFORMATIONS
  if a < b then a+c < b+c for ordered real quantities
  if a < b and k > 0 then ka < kb
  if a < b and k < 0 then ka > kb
  if k = 0 then multiplication loses strict ordering
  squaring, taking reciprocals, or applying nonlinear functions requires sign/domain checks

10. LINEAR CONSTRAINTS
  linear_form: sum_i(a_i*x_i) relation b
  relation in {=, <=, >=, <, >}
  polyhedron: intersection of finitely many non-strict linear halfspaces and hyperplanes
  strict linear inequalities may yield open boundaries
  integer_linear: linear constraints with selected variables restricted to integers
  feasibility differs from optimisation; objective function is optional

11. NONLINEAR CONSTRAINTS
  polynomial: p(x1,...,xn) relation 0
  transcendental: sin(x) = 0, exp(x) <= k with valid domains
  nonlinear_solver: must record completeness and numerical guarantees
  interval_enclosure: bound possible values without silently assuming exactness
  approximate_feasibility: tolerance-dependent and not a proof of exact satisfaction

12. CONSTRAINT PROPAGATION
  input: constraints CS, current domains D
  propagate(CS,D) -> narrowed_domains, status
  invariant: sound propagation never removes a value belonging to a valid solution
  fixed_point: repeat monotone domain narrowing until stable or contradiction
  empty_domain: proves UNSAT if propagation is sound and assumptions hold
  nonempty_domains: do not alone prove SAT

13. SOLVER INTERFACE
  solve(CS,context,mode) -> {status, witness?, proof?, residuals?, diagnostics?}
  SAT: witness satisfies all constraints under declared semantics
  UNSAT: no admissible assignment satisfies every constraint
  UNKNOWN: no justified SAT/UNSAT determination
  exact_solver: provide proof certificate where supported
  numeric_solver: disclose tolerance, residuals, precision and limitations

14. INFERENCE RULES
  R1: x = a AND x = b AND a != b -> UNSAT
  R2: x >= a AND x <= b AND a > b -> UNSAT (ordered domain)
  R3: x in A AND x in B -> x in intersection(A,B)
  R4: x = y AND y = z -> x = z
  R5: x < y AND y < z -> x < z
  R6: x in Integers AND 0 < x < 2 -> x = 1
  R7: CS entails c iff every model of CS satisfies c
  R8: UNSAT(CS union {NOT c}) -> CS entails c, assuming sound complete reasoning for the checked logic

15. SEMANTIC RELATIONSHIPS
  Constraint IS_A MathematicalStatement
  Constraint RESTRICTS VariableDomain
  Constraint REFERENCES Expression
  Constraint HAS_OPERATOR RelationOperator
  Constraint HAS_ASSUMPTION Proposition
  Constraint COMBINES_WITH Constraint
  Constraint IS_SATISFIED_BY Assignment
  Constraint IS_VIOLATED_BY Assignment
  Constraint PARTICIPATES_IN ConstraintSystem
  Constraint DERIVED_FROM MathematicalRule
  Constraint VALIDATED_BY SolverResult

16. KNOWLEDGE GRAPH TRIPLES
  (constraint:cx, rdf:type, ontology:Constraint)
  (constraint:cx, ontology:restricts, variable:x)
  (constraint:cx, ontology:hasRelation, relation:LessThanOrEqual)
  (constraint:cx, ontology:hasDomain, domain:RealNumbers)
  (constraint:cx, ontology:hasSource, source:PageURI)
  (constraint:cx, ontology:hasValidationStatus, status:UNKNOWN)
  Identity of a constraint depends on expression, binding, domain and context.

17. SEMANTIC EQUIVALENCE
  equivalent(C1,C2,C) iff solution_set(C1,C) = solution_set(C2,C)
  syntactic_identity: identical canonical syntax under specified normalisation
  alpha_equivalence: bound-variable renaming preserves meaning
  logical_equivalence: same truth conditions in the declared interpretation
  example: x > 3 equivalent_to 3 < x over the real numbers
  nonexample: x^2 = 4 not equivalent_to x = 2 over the real numbers
  implication is weaker than equivalence

18. VALIDATION
  V01: all identifiers resolve
  V02: -expression syntax parses
  V03: variable types and domains declared
  V04: operators are well-typed
  V05: units and dimensions consistent
  V06: division by zero and undefined operations excluded
  V07: transformations preserve assumptions
  V08: solver outcomes have verifiable meaning
  V09: approximation is distinguished from exact proof
  V10: provenance and version recorded

19. CONFIDENCE
  confidence := {value: Real[0,1], basis: EvidenceType, explanation: Text}
  formal_proof: mathematical validity under explicit assumptions
  numerical_evidence: contingent on error bounds and solver guarantees
  heuristic: not a proof of satisfiability or entailment
  never conflate confidence with logical truth

20. FLOW_HASH
  canonical_payload := canonicalise({constraint_ast, domains, assumptions, units, semantics, version})
  FLOW_HASH := SHA256(UTF8(canonical_payload))
  exclude volatile timestamps from semantic identity hash
  hash equality supports content matching; it does not prove semantic equivalence

21. UPDATE_MODEL
  on_change(expression|domain|assumptions|units|semantics):
    increment version
    invalidate dependent solver results and inference caches
    recompute canonical payload and FLOW_HASH
    rerun typing, validation and affected derivations
    preserve provenance and previous versions

22. AI_CONSUMPTION
  machine_readable: typed entities, relations, rules, assumptions and provenance
  retrieval_keys: constraint_kind, variables, domain, operator, status, hash
  reasoning: use declared inference rules and solver evidence
  safety: reject unsupported conclusions and surface UNKNOWN
  output: {constraint, interpretation, status, witness_or_proof, confidence, provenance}

23. WORKED EXAMPLE
  variables: x: Integer
  constraints: [x >= 1, x <= 3, x != 2]
  admissible_values: {1,2,3}
  solution_set: {1,3}
  status: SAT
  witnesses: x=1; x=3
  inferred: x=1 OR x=3
  verification: each witness satisfies every original constraint

24. LIMITATIONS AND INVARIANTS
  Constraint satisfaction is relative to a specified domain and interpretation.
  A solver timeout is UNKNOWN, not UNSAT.
  Floating-point comparisons may not establish exact equality.
  Constraint equivalence cannot be inferred from similar wording alone.
  Contradictions must be distinguished from malformed input.
  Soundness and completeness are properties of particular methods, not all solvers.

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