Skip to main content

Function Ontology

Functions
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 October 2026
Audio Overview
FLOW ALGEBRA
TITLE: Function Ontology
DOMAIN: Discrete Mathematics / Functions
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/functions/function-ontology-2.html
VERSION: 1.0
LANGUAGE: en-GB
AUTHORS: Mark Higgins — Sky (Recursive AI)
SITE: https://kirethresearch.org

1. PURPOSE
Represent mathematical functions as typed, total, single-valued mappings between sets; support symbolic reasoning, validation, composition, inversion, and semantic retrieval.

2. TYPED ENTITIES
Set[A]                  : set of elements of type A
Set[B]                  : set of elements of type B
Function[A,B]           : total mapping A -> B
Domain(f)               : source set A
Codomain(f)             : target set B
Image(f)                : {f(a) | a in A}
Graph(f)                : {(a,f(a)) | a in A}
Identity[A]             : Function[A,A]
Injection[A,B]          : Function[A,B] satisfying injectivity
Surjection[A,B]         : Function[A,B] satisfying surjectivity
Bijection[A,B]          : Function[A,B] satisfying both
PartialFunction[A,B]    : mapping defined only on a subset of A

3. CORE DECLARATIONS
function f : A -> B
requires: A and B are sets
ensures: forall a in A, exists exactly one b in B with f(a)=b
note: a function's codomain is not necessarily its image

4. OPERATIONS
apply(f,a) -> b         requires a in Domain(f); returns f(a)
compose(g,f) -> g o f  requires f:A->B and g:B->C; returns A->C
identity(A) -> id_A    returns a |-> a
restrict(f,S)           requires S subseteq Domain(f); returns f|S:S->B
image(f,S)              requires S subseteq A; returns {f(a):a in S}
preimage(f,T)           requires T subseteq B; returns {a in A:f(a) in T}
inverse(f)              defined as B->A only when f is bijective

5. PROPERTIES
injective(f)  <=> forall x,y in A, f(x)=f(y) implies x=y
surjective(f) <=> forall b in B, exists a in A: f(a)=b
bijective(f)  <=> injective(f) and surjective(f)
constant(f)   <=> forall x,y in A, f(x)=f(y)

6. ALGEBRAIC LAWS
Associativity: h o (g o f) = (h o g) o f (when typed)
Identity: id_B o f = f = f o id_A
Image: f(S union T) = f(S) union f(T)
Image intersection: f(S intersection T) subseteq f(S) intersection f(T)
Image intersection equality holds if f is injective
Preimage: f^-1(U union V) = f^-1(U) union f^-1(V)
Preimage: f^-1(U intersection V) = f^-1(U) intersection f^-1(V)
Preimage: f^-1(B\U) = A\f^-1(U)
Inverse: f^-1 o f = id_A and f o f^-1 = id_B when f bijective

7. SEMANTIC RELATIONSHIPS
Function IS_A single-valued total binary relation
Function HAS_DOMAIN Set
Function HAS_CODOMAIN Set
Function HAS_GRAPH BinaryRelation
Bijection IS_A Injection
Bijection IS_A Surjection
Composition COMBINES Function
InverseFunction REQUIRES Bijection
PartialFunction DIFFERS_FROM Function by totality requirement

8. INFERENCE RULES
IF bijective(f) THEN inverse(f) exists and is unique
IF injective(f) AND injective(g) AND composable(g,f) THEN injective(g o f)
IF surjective(f) AND surjective(g) AND composable(g,f) THEN surjective(g o f)
IF bijective(f) AND bijective(g) AND composable(g,f) THEN bijective(g o f)
IF f:A->B AND S subseteq A THEN image(f,S) subseteq B
IF f:A->B AND T subseteq B THEN preimage(f,T) subseteq A

9. VALIDATION
V01: Every domain element must have exactly one output.
V02: Every output must belong to the declared codomain.
V03: Composition must satisfy type compatibility.
V04: Do not infer surjectivity from the image alone without comparing it with codomain.
V05: An inverse relation need not be an inverse function unless f is bijective.
V06: Empty-domain functions exist uniquely for each codomain; no function from nonempty A to empty B exists.
V07: Distinguish inverse function f^-1 from set preimage f^-1(T).

10. SEMANTIC_EQUIVALENCE
"mapping" ~= "function" when totality and single-valuedness are explicit
"one-to-one" ~= "injective"
"onto" ~= "surjective"
"one-to-one correspondence" ~= "bijective"
Avoid equating "range" with codomain without contextual disambiguation.

11. CONFIDENCE
Mathematical definitions and standard laws: 1.00 (formal, subject to stated assumptions)
Page-specific correspondence: unverified; source URL provided by user.

12. FLOW_HASH
Algorithm: SHA-256 over canonical UTF-8 flow payload, excluding FLOW_HASH field.
Value: COMPUTE_ON_PUBLICATION

13. UPDATE_MODEL
Trigger: correction of a definition, relationship, rule, or source page content
Process: validate -> increment version -> regenerate hash -> preserve provenance

14. AI_CONSUMPTION
Parse typed entities before applying operations.
Check preconditions and quantifiers before inference.
Return counterexamples when a proposed property fails.
Preserve distinctions among domain, codomain, image and preimage.
Represent unverified source alignment as unverified, not as mathematical uncertainty.

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