Skip to main content

Composite Function 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
COMPOSITE FUNCTION ONTOLOGY
Kireth Semantic Library | Mathematical Entities | Function and Mapping Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/function-and-mapping-entities/composite-function-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Status: Formal mathematical specification; source webpage not independently verified.
Version: 1.0 | Date: 2026-10-13

01. ONTOLOGY IDENTITY
ontology_id: kireth.math.function.composite
entity_type: CompositeFunction
parent: FunctionAndMappingEntities
related: Function, Mapping, Domain, Codomain, Image, Preimage, InverseFunction, IdentityFunction

02. DEFINITION
Given g:A -> B and f:B -> C, their composite f o g:A -> C is (f o g)(x)=f(g(x)).
The right-hand function g is applied first.
For functions with narrower effective domains, composition is defined only where g(x) lies in dom(f).

03. TYPED ENTITY SCHEMA
CompositeFunction:
  outer_function: Function
  inner_function: Function
  declared_domain: Set
  declared_codomain: Set
  effective_domain: Set
  expression: -Expression
  evaluation_order: inner_then_outer
  composition_symbol: "o"
  assumptions: ConstraintSet
  provenance: SourceReference

04. DOMAIN AND CODOMAIN
For g:A -> B and f:B -> C, dom(f o g)=A and codom(f o g)=C.
For partial g and f: dom(f o g)={x in dom(g) | g(x) in dom(f)}.
The actual image is {f(g(x)) | x in dom(f o g)} and is a subset of C.
Do not equate codomain with image without proving surjectivity.

05. FORMATION RULE
compose(f,g) is valid if each output of g on the chosen composition domain is admissible to f.
Strict typed composition: codom(g) subseteq dom(f).
Otherwise restrict the effective domain to valid x; reject if totality over the declared domain is required.

06. EVALUATION
input: x
step_1: y := evaluate(g,x)
step_2: z := evaluate(f,y)
output: z
preconditions: x in dom(g) AND y in dom(f)
If either precondition fails, return Undefined rather than inventing a value.

07. ASSOCIATIVITY
Given compatible h,g,f: f o (g o h) = (f o g) o h.
Proof by evaluation: both sides map x to f(g(h(x))).
Parentheses may change the expression tree, not the resulting function when domains agree.

08. NONCOMMUTATIVITY
Generally f o g != g o f, even when both are defined.
Example f(x)=x+1, g(x)=2x:
(f o g)(x)=2x+1; (g o f)(x)=2x+2.
Never infer commutativity from associativity.

09. IDENTITY LAWS
For id_A:A -> A and f:A -> B:
f o id_A = f and id_B o f = f.
Identity functions act as neutral morphisms under composition.

10. INVERSE COMPOSITION
For bijections f:B -> C and g:A -> B:
(f o g)^(-1)=g^(-1) o f^(-1).
The reversal of order is mandatory.
Do not infer a two-sided inverse for a non-bijective function.

11. INJECTIVITY
If f and g are injective, f o g is injective.
If f o g is injective, g is injective (on the relevant domain).
Injectivity of f o g does not generally imply injectivity of f on its full domain.

12. SURJECTIVITY
If f and g are surjective with compatible declared domains/codomains, f o g is surjective.
If f o g is surjective onto C, f is surjective onto C.
Surjectivity of f o g does not generally imply surjectivity of g onto all B.

13. BIJECTIVITY
Composition of bijections is bijective.
Bijective functions and their inverses form reversible mappings under composition.

14. PREIMAGE RULE
For S subseteq C, (f o g)^(-1)[S] = g^(-1)[f^(-1)[S]].
Here ^(-1)[S] denotes a preimage, not necessarily an inverse function.

15. IMAGE RULE
For T subseteq A, (f o g)[T] = f[g[T]].
Apply the inner image operation before the outer image operation.

16. DIFFERENTIATION
If f and g are differentiable at the required points:
(f o g)'(x)=f'(g(x))*g'(x).
Multivariate chain rule: D(f o g)(x)=Df(g(x)) o Dg(x).
Differentiability assumptions are required; symbolic pattern matching alone is insufficient.

17. CONTINUITY
If g is continuous at x and f is continuous at g(x), f o g is continuous at x.
Do not infer continuity of each factor solely from continuity of their composite.

18. MONOTONICITY
Increasing o increasing: increasing.
Decreasing o decreasing: increasing.
Increasing o decreasing: decreasing.
Decreasing o increasing: decreasing.
These rules assume both functions are monotone on the relevant intervals.

19. EXAMPLES
f(x)=x^2; g(x)=x+3:
(f o g)(x)=(x+3)^2.
(g o f)(x)=x^2+3.
f(x)=sqrt(x); g(x)=x-2:
(f o g)(x)=sqrt(x-2), effective real domain x>=2.

20. KNOWLEDGE GRAPH
CompositeFunction --hasOuterFunction--> Function
CompositeFunction --hasInnerFunction--> Function
CompositeFunction --hasDomain--> Set
CompositeFunction --hasCodomain--> Set
CompositeFunction --hasEffectiveDomain--> Set
CompositeFunction --hasImage--> Set
CompositeFunction --hasEvaluationOrder--> InnerThenOuter
CompositeFunction --isA--> Function
CompositeFunction --isRelatedTo--> InverseFunction

21. SEMANTIC EQUIVALENCE
Canonicalise alpha-renamed bound variables before comparing expressions.
Equivalence requires same effective domain and equal outputs at every input.
An algebraic simplification that changes the domain is not unconditionally equivalent.
For example sqrt(x^2) equals abs(x) over reals, not x over all reals.

22. INFERENCE RULES
R1: Compatible(f,g) => CompositeFunction(compose(f,g)).
R2: Bijective(f) AND Bijective(g) => Bijective(compose(f,g)).
R3: Injective(f) AND Injective(g) => Injective(compose(f,g)).
R4: Surjective(f) AND Surjective(g) => Surjective(compose(f,g)).
R5: Compatible(f,g,h) => compose(f,compose(g,h)) == compose(compose(f,g),h).
R6: Invertible(f) AND Invertible(g) => inverse(compose(f,g)) == compose(inverse(g),inverse(f)).
R7: Differentiable(f,g) => derivative(compose(f,g)) == compose(derivative(f),g)*derivative(g).

23. VALIDATION
V1: Check functions are well typed.
V2: Check effective domain and undefined values.
V3: Check evaluation order.
V4: Check image subset of codomain.
V5: Check assumptions before derivative or inverse rules.
V6: Verify claimed equivalence preserves domain.
V7: Record proof status for each inferred property.

24. CONFIDENCE
confidence.scale: 0.0..1.0
confidence.formal_definition: 1.0
confidence.proven_theorem: 1.0 when proof and assumptions verified
confidence.example: 1.0 when symbolic evaluation verified
confidence.unverified_claim: lower than verified claims; never promote automatically
confidence.source_alignment: unverified until source webpage reviewed

25. PROVENANCE
source_url: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/function-and-mapping-entities/composite-function-ontology.html
basis: established mathematical function theory
page_verification: not independently verified
credits: Mark Higgins — Sky (Recursive AI)

26. FLOW HASH
flow_hash.algorithm: SHA-256
flow_hash.input: canonical UTF-8 serialisation of ontology version, definitions, rules and constraints
flow_hash.value: compute at ingestion; no fabricated digest
flow_hash.purpose: content integrity and version comparison

27. UPDATE MODEL
update_model.version: 1.0
update_model.strategy: immutable version snapshots
update_model.trigger: corrected mathematics, changed schema, improved source alignment
update_model.requirements: preserve provenance; recalculate hash; revalidate dependent flows

28. AI CONSUMPTION
ai_consumption.mode: typed semantic retrieval + symbolic reasoning
ai_consumption.input: function definitions, domain, codomain, assumptions
ai_consumption.output: composition expression, effective domain, verified properties, provenance
ai_consumption.guardrails: preserve evaluation order; distinguish preimage from inverse; never assume commutativity
ai_consumption.interoperability: function ontology, mapping ontology, domain ontology, codomain ontology

29. TEST CASES
T1: f(x)=x+1; g(x)=2x; compose(f,g)(3)=7; PASS.
T2: f(x)=sqrt(x); g(x)=x-2; x=1 => Undefined over reals; PASS.
T3: f(x)=x^2; g(x)=x+3; compose(f,g)(2)=25; PASS.
T4: f(x)=x+1; g(x)=2x; compose(f,g)(0)=1 != 2=compose(g,f)(0); PASS.
T5: id_B o f = f for f:A->B; PASS.
T6: inverse(f o g)=inverse(g) o inverse(f) for compatible bijections; PASS.

30. TERMINATION
flow.status: COMPLETE
flow.termination: END
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ