Skip to main content

Domain Ontology

Function and Mapping Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 13 October 2026
Audio Overview
FLOW ALGEBRA
DOMAIN ONTOLOGY — FUNCTION AND MAPPING ENTITIES
Kireth Semantic Library | Version 1.0 | 2026-10-13
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/function-and-mapping-entities/domain-ontology.html
Source status: Formal synthesis from established mathematics; source page not independently verified.

01. PURPOSE
Define, classify, validate and reason about domains of mathematical functions, partial mappings, relations and expressions, preserving the distinction between declared input sets and actual admissible inputs.

02. CORE ENTITY
entity Domain:
  id: URI
  belongs_to: Function | Mapping | Relation | Expression
  carrier_set: Set
  membership_predicate: Predicate
  representation: Enumeration | Interval | SetBuilder | Constraint | Symbolic
  context: MathematicalContext
  provenance: SourceReference?

03. FORMAL DEFINITIONS
For a function f: A -> B, domain(f) = A.
A function is a set of ordered pairs with each a in A paired with exactly one b in B.
For a relation R subset A x B, domain(R) = {a in A | exists b in B: (a,b) in R}.
For a partial function p: A ⇀ B, effective_domain(p) = {a in A | p(a) is defined}, a subset of A.
For an expression E(x), admissible_domain(E) is the set of values where all operations in E are defined under the stated number system and conventions.

04. TYPED RELATIONSHIPS
Function --has_domain--> Set
Function --has_codomain--> Set
Function --maps_element--> OutputElement
Domain --contains--> InputElement
Domain --constrained_by--> Predicate
Domain --subset_of--> CarrierSet
Expression --has_admissible_domain--> Set
PartialFunction --has_effective_domain--> Set
Relation --has_relational_domain--> Set

05. DOMAIN VERSUS CODOMAIN AND RANGE
Domain(f): permitted input set.
Codomain(f): declared target set.
Image(f): {f(x) | x in domain(f)}; image(f) subset codomain(f).
Never infer that codomain(f) equals image(f).
Never conflate a relation's domain with its ambient first-coordinate set.

06. DOMAIN CLASSIFICATION
Finite domain: cardinality is finite.
Infinite domain: cardinality is infinite.
Discrete domain: specified as a discrete set in the relevant topology.
Interval domain: subset of ordered real numbers defined by endpoints.
Product domain: A1 x ... x An for multivariate mappings.
Restricted domain: D intersect C for constraint set C.
Empty domain: allowed for set-theoretic functions where explicitly permitted.

07. MEMBERSHIP AND TYPE RULES
RULE D01: f: A -> B AND x in A => f(x) is defined and belongs to B.
RULE D02: f: A -> B AND x not in A => evaluation f(x) is outside the declared function domain.
RULE D03: domain(f restricted_to S) = domain(f) intersect S.
RULE D04: domain(identity_A) = A.
RULE D05: domain(constant_function_on_A) = A.
RULE D06: For total f: A -> B and g: B -> C, domain(g o f) = A.
RULE D07: For partial f and g, domain(g o f) = {x in domain(f) | f(x) in domain(g)}.
RULE D08: domain(f inverse_relation) = image(f) for any function f viewed as a relation.
RULE D09: An inverse function exists on image(f) when f is injective; its domain is image(f).

08. EXPRESSION CONSTRAINTS OVER REAL NUMBERS
RULE E01: denominator q(x) != 0 for p(x)/q(x).
RULE E02: radicand r(x) >= 0 for even real roots.
RULE E03: argument a(x) > 0 for real logarithms.
RULE E04: arcsin(x), arccos(x) require -1 <= x <= 1 over reals.
RULE E05: sqrt(x^2) is defined for all real x.
RULE E06: Domains depend on chosen number system; complex logarithms and branches require explicit conventions.

09. DOMAIN OPERATIONS
intersect_domains(D1,D2) := D1 intersect D2.
union_domains(D1,D2) := D1 union D2.
restrict_domain(D,C) := D intersect C.
product_domain(D1,...,Dn) := D1 x ... x Dn.
preimage_domain(f,S) := {x in domain(f) | f(x) in S}.

10. FUNCTION ARITHMETIC
For real-valued functions f,g, domain(f+g) = domain(f) intersect domain(g) when sum is evaluated pointwise.
Similarly for f-g and f*g.
For f/g, domain = {x in domain(f) intersect domain(g) | g(x) != 0}.
An algebraically simplified expression may extend a function to points excluded from its original domain; preserve original domain unless extension is explicitly declared.

11. SYMBOLIC REPRESENTATION
DomainSpec := {entity_id, input_type, carrier_set, constraints, notation, context}.
Constraint predicates must be typed and composable.
Represent intervals with inclusive/exclusive endpoints and unboundedness explicitly.
Canonicalise conjunctions without silently discarding exclusions.

12. EXAMPLES
f(x)=1/(x-2) over R: domain = R \ {2}.
g(x)=sqrt(5-x) over R: domain = (-infinity,5].
h(x)=ln(x^2-1) over R: domain = (-infinity,-1) union (1,infinity).
k(x,y)=x+y over R: domain = R x R.
p(x)=(x^2-1)/(x-1) over R: original domain = R \ {1}, despite simplification to x+1 where defined.

13. SEMANTIC EQUIVALENCE
Two domain descriptions are semantically equivalent if they denote the same set in the same ambient universe and interpretation.
Example: {x in R | x>0} equivalent_to (0,infinity).
A textual match of notation does not establish equivalence without matching context.

14. KNOWLEDGE GRAPH TRIPLES
(FunctionF, hasDomain, SetA)
(FunctionF, hasCodomain, SetB)
(SetA, hasMembershipCondition, PredicateP)
(RestrictedFunction, derivedFrom, FunctionF)
(RestrictedFunction, hasDomain, Intersection(A,S))

15. INFERENCE ENGINE
INPUT: typed function or expression and declared universe.
STEP 1: parse structure and declared domain.
STEP 2: collect subexpression definedness constraints.
STEP 3: intersect constraints with declared universe.
STEP 4: simplify set expression using sound equivalences.
STEP 5: preserve removable singularities and branch restrictions.
STEP 6: emit domain, justification, confidence and provenance.

16. VALIDATION
CHECK V01: Every function has a declared input set.
CHECK V02: Domain membership is well-typed.
CHECK V03: Codomain is not substituted for domain.
CHECK V04: Division by zero excluded where relevant.
CHECK V05: Real/complex conventions recorded.
CHECK V06: Composition order and intermediate types checked.
CHECK V07: All asserted simplifications preserve the declared domain.
CHECK V08: Empty and infinite domains handled without finite enumeration assumptions.

17. CONFIDENCE
confidence.level: verified | derived | provisional | unknown
confidence.basis: proof | formal_definition | trusted_reference | heuristic
confidence.score: optional real in [0,1]
Do not use confidence to override a failed mathematical validation.

18. FLOW HASH
FLOW_HASH := SHA256(canonical_serialisation(ontology_id, version, typed_definitions, rules, constraints, context)).
Hash is computed by implementation, not asserted as a fabricated digest.

19. UPDATE MODEL
On domain change: increment version, recalculate dependent mappings, image/preimage statements and validation tests.
Track changed axioms, notation conventions, provenance and downstream graph dependencies.
Preserve historical domain versions for reproducibility.

20. AI CONSUMPTION
Provide machine-readable entity IDs, typed edges, predicates, validation outcomes and inference provenance.
Return explicit unknown where a function's domain cannot be determined from its declaration.
Do not guess the ambient number system or assume a maximal natural domain when a declared domain is provided.

21. TEST CASES
TEST T01: f: Z -> Z, f(n)=n^2 => domain(f)=Z.
TEST T02: real sqrt(x-3) => [3,infinity).
TEST T03: real 1/(x^2-4) => R \ {-2,2}.
TEST T04: f: R -> R, f(x)=x^2 => image(f)=[0,infinity), domain(f)=R.
TEST T05: real ln(x) + 1/(x-1) => (0,1) union (1,infinity).
TEST T06: composition of partial maps checks intermediate domain membership.

22. LIMITATIONS
Mathematical context determines admissibility. A formula alone need not uniquely determine the domain of the declared function. This ontology is a formal specification, not a certified theorem prover or executable implementation.

23. TERMINATION
status: COMPLETE
ontology: Domain Ontology
header: FLOW ALGEBRA
END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ