Function and Mapping Entities
Authors:
MArk Anthony Higgins - Sky Recursive Ai
MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: July 6th 2026
Revised Date: July 6th 2026
AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
FUNCTION AND MAPPING ENTITIES
Kireth Semantic Library | Main-page ontology
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/function-and-mapping-entities.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
Date: 2026-10-13
Specification: typed semantic rules, executable-style declarative constraints
01. PURPOSE
flow "FunctionAndMappingEntities" v1.0
objective: represent mappings, functions, arguments, values, and their logical properties
parent: MathematicalEntities
domain: SetTheory + Algebra + Analysis + CategoryTheory
interpretation: formal rules, not natural-language heuristics
02. ENTITY TYPES
Set; Element; Function; Mapping; Domain; Codomain; Image; Preimage
Input; Output; InjectiveFunction; SurjectiveFunction; BijectiveFunction
PartialFunction; TotalFunction; InverseFunction; CompositeFunction
IdentityFunction; MultivaluedFunction; Functional
Relation; OrderedPair; Predicate; Constraint; Proof; Counterexample
03. TYPED SIGNATURE
function f : A -> B
A : Set; B : Set
graph(f) subseteq A x B
apply(f,x) : B where x in A and f is total
domain(f) : Set
codomain(f) : Set
image(f) : Set
preimage(f,S) : Set where S subseteq codomain(f)
input(f,x) : Element
output(f,x,y) : Proposition
04. FUNCTION AXIOMS
total_function(f,A,B) iff
graph(f) subseteq A x B
and forall x in A exists exactly_one y in B : (x,y) in graph(f)
partial_function(f,A,B) iff
graph(f) subseteq A x B
and forall x in A exists at_most_one y in B : (x,y) in graph(f)
domain(f) = {x in A | exists y in B : (x,y) in graph(f)}
codomain(f) = B
image(f) = {y in B | exists x in domain(f) : f(x)=y}
invariant: image(f) subseteq codomain(f)
warning: codomain and image need not be equal
05. MAPPING ONTOLOGY
Mapping: typed assignment from source elements to target elements
ordinary_function_mapping: single-valued and total on its declared domain
distinguish: arbitrary binary relation is not necessarily a function
identify mapping by source, target, graph and declared domain
06. DOMAIN ONTOLOGY
domain(f) = {x | f(x) is defined}
declared_source(f) may be larger than domain(f) for partial functions
restriction(f,D) where D subseteq domain(f)
domain(restriction(f,D)) = D
07. CODOMAIN ONTOLOGY
codomain(f) is part of typed function declaration
changing codomain may change surjectivity and function identity
ensure forall x in domain(f): f(x) in codomain(f)
08. IMAGE ONTOLOGY
image_of_subset(f,S) = {f(x) | x in S} where S subseteq domain(f)
image(f) = image_of_subset(f,domain(f))
image_of_union(f,S,T) = image_of_subset(f,S) union image_of_subset(f,T)
image_of_intersection(f,S,T) subseteq image_of_subset(f,S) intersection image_of_subset(f,T)
09. PREIMAGE ONTOLOGY
preimage(f,T) = {x in domain(f) | f(x) in T}
preimage(f,T union U) = preimage(f,T) union preimage(f,U)
preimage(f,T intersection U) = preimage(f,T) intersection preimage(f,U)
preimage(f,B \ T) = domain(f) \ preimage(f,T) where T subseteq B
10. INPUT ONTOLOGY
input: x with membership x in domain(f)
validation: reject application outside defined domain
arguments may be tuples for multivariate functions
11. OUTPUT ONTOLOGY
output: y = f(x)
deterministic_function: same x has exactly one y
output_type: y in codomain(f)
output is a value, not the codomain as a whole
12. INJECTIVE FUNCTION ONTOLOGY
injective(f) iff forall x1,x2 in domain(f):
f(x1)=f(x2) implies x1=x2
equivalent: distinct inputs have distinct outputs
test: find x1 != x2 with f(x1)=f(x2) to disprove
13. SURJECTIVE FUNCTION ONTOLOGY
surjective(f) iff image(f)=codomain(f)
equivalent: forall y in codomain(f) exists x in domain(f): f(x)=y
dependency: codomain must be explicitly identified
14. BIJECTIVE FUNCTION ONTOLOGY
bijective(f) iff injective(f) and surjective(f)
consequence: unique two-sided inverse exists
cardinality: bijection witnesses equipotence of domain and codomain
15. PARTIAL FUNCTION ONTOLOGY
partial(f,A,B): defined on some D subseteq A
undefined(f,x) iff x in A and x not in domain(f)
do_not_infer: undefined output equals zero or null element of B
note: totality relative to actual domain is distinct from declared source A
16. TOTAL FUNCTION ONTOLOGY
total(f,A,B) iff domain(f)=A and each x in A has one output in B
empty_domain: empty graph is a total function from empty set to B
17. INVERSE FUNCTION ONTOLOGY
inverse_relation(f) = {(y,x) | (x,y) in graph(f)}
inverse_function(f) : B -> A exists iff f:A->B is bijective
f_inverse(f(x))=x and f(f_inverse(y))=y
note: inverse relation of a non-bijection need not be a function B->A
18. COMPOSITE FUNCTION ONTOLOGY
given f:A->B and g:B->C, compose(g,f):A->C
(g o f)(x) = g(f(x))
associative: h o (g o f) = (h o g) o f when types match
partial composition domain: {x in domain(f) | f(x) in domain(g)}
no_commutativity_assumption: g o f may differ from f o g
19. IDENTITY FUNCTION ONTOLOGY
id_A:A->A; id_A(x)=x for every x in A
id_B o f = f = f o id_A for f:A->B
identity is bijective, including on empty set
20. MULTIVALUED FUNCTION ONTOLOGY
multivalued_map F:A -> P(B)
F(x) subseteq B, possibly containing multiple values
distinguish: set-valued mapping is single-valued into P(B)
alternate_semantics: relation R subseteq A x B
empty_values_allowed: configurable; do not assume nonempty
21. FUNCTIONAL ONTOLOGY
functional: mapping whose inputs are functions, typically into scalars
example: L:C([0,1],R)->R; L(f)=integral_0^1 f(t) dt
distinguish: functional versus arbitrary higher-order operator
require: function_space and output_type declarations
22. SEMANTIC RELATIONSHIPS
Function is_a MathematicalRelation with single-valued mapping constraint
InjectiveFunction is_a Function
SurjectiveFunction is_a Function
BijectiveFunction is_a InjectiveFunction and SurjectiveFunction
PartialFunction is_a FunctionLikeMapping
TotalFunction is_a Function
InverseFunction inverse_of Function
CompositeFunction composed_of Function
IdentityFunction identity_for Set
Functional maps_from FunctionSpace
Function has_domain Set; has_codomain Set; has_image Set
Function maps_input_to_output Element
23. KNOWLEDGE GRAPH MODEL
node: Function {id, label, version, domain_id, codomain_id, expression?, provenance}
edge: HAS_DOMAIN, HAS_CODOMAIN, HAS_IMAGE, HAS_PREIMAGE
edge: MAPS_TO, INJECTIVE_ON, SURJECTIVE_ON, BIJECTIVE_ON
edge: INVERSE_OF, COMPOSED_WITH, IDENTITY_ON, RESTRICTED_TO
constraints: referential integrity; type-safe edge endpoints
statement_provenance: preserve derivation and assumptions
24. INFERENCE RULES
R01: injective(f) and surjective(f) => bijective(f)
R02: bijective(f) => inverse_function_exists(f)
R03: bijective(f) => injective(f) and surjective(f)
R04: surjective(f) => image(f)=codomain(f)
R05: total(f,A,B) => domain(f)=A
R06: f:A->B and g:B->C => compose(g,f):A->C
R07: injective(f) and injective(g) => injective(g o f)
R08: surjective(f) and surjective(g) => surjective(g o f)
R09: bijective(f) and bijective(g) => bijective(g o f)
R10: all f:A->B => id_B o f=f and f o id_A=f
R11: f:A->B and S subseteq A => image_of_subset(f,S) subseteq B
R12: f:A->B and T subseteq B => preimage(f,T) subseteq A
guard: only infer where all declared types and premises hold
25. VALIDATION
V01: every mapped input belongs to declared domain
V02: every mapped output belongs to codomain
V03: no input has two distinct outputs for ordinary functions
V04: total functions cover every source element
V05: inverse function claims require bijectivity on declared sets
V06: composition requires compatible types or explicit restrictions
V07: surjectivity assessed against declared codomain
V08: distinguish equality of graphs from equality of typed functions
V09: do not conflate multivalued mapping with ordinary function
V10: prevent unsupported cardinality claims for infinite sets
26. TEST CASES
T01: f:{1,2}->{a,b}, f(1)=a,f(2)=b => bijective
T02: f:{1,2}->{a,b}, f(1)=a,f(2)=a => not injective, not surjective
T03: f:{1,2}->{a}, f(1)=a,f(2)=a => surjective, not injective
T04: f:{1,2}->{a,b}, f(1)=a only => partial relative to {1,2}
T05: id_{1,2} => bijective
T06: g o f where f(1)=a,g(a)=true => (g o f)(1)=true
T07: preimage(f,{a}) for T02 => {1,2}
T08: empty function empty_set -> {a} => total and injective, not surjective
T09: f:R->R, f(x)=x^2 => not injective and not surjective
T10: f:R->[0,infinity), f(x)=x^2 => surjective, not injective
27. CONFIDENCE
mathematical_axioms: 1.0 conditional on formal foundations
verified_derivation: 1.0 conditional on premises
inferred_from_incomplete_metadata: unknown, do_not_fabricate
confidence_scope: claims, not arbitrary numerical truth probabilities
28. SEMANTIC EQUIVALENCE
function == single_valued_total_mapping only under same domain conventions
inverse_function != inverse_relation without bijectivity
image != codomain unless surjective
mapping != necessarily_function in broad relation-based usage
alpha_renaming: bound variable renaming preserves meaning
structural_equivalence: require type and extensional behaviour checks
29. FLOW HASH
FLOW_HASH: compute SHA-256 from canonical UTF-8 normalised specification
canonicalise: line_endings LF; stable key ordering; Unicode NFC
exclude: mutable timestamp and hash field itself
status: not_computed; no fabricated digest
30. UPDATE MODEL
version: 1.0
updates: append provenance and version history
breaking_change: modifications to typing or logical meaning
revalidate: inference rules and test cases after any update
31. AI CONSUMPTION
mode: formal_semantic_reasoning
input: typed function entities, set declarations, mapping graph
process: parse -> type_check -> validate -> infer -> verify -> emit
output: validated triples, logical conclusions, counterexamples
safety: do not infer totality, invertibility, or surjectivity without proof
provenance: include source, assumptions, derivation and confidence
AI_INTERPRETATION_NOTE: execute formal rules, not pseudocode
32. TERMINATION
status: COMPLETE
sections: 32
parent_ontology: Function and Mapping Entities
next: child ontologies for individual function and mapping concepts
END FLOW ALGEBRA