AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
IDENTITY 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/identity-function-ontology-2.html
Authors: Mark Higgins — Sky (Recursive AI)
Date: 2026-10-13
Status: Formal mathematical synthesis; source webpage not independently verified
01. PURPOSE
flow "IdentityFunctionOntology" v1.0
purpose: represent, type, validate, infer, and compose identity functions.
notation: id_A : A -> A; id_A(x) = x for every x in A.
distinction: identity function is not a constant function except when its domain has at most one element.
02. ENTITY SCHEMA
entity IdentityFunction:
id: uri
domain: Set
codomain: Set
graph: Set[OrderedPair]
total: bool = true
injective: bool = true
surjective: bool = true
bijective: bool = true
provenance: SourceRecord?
confidence: ConfidenceRecord?
constraint: domain = codomain
constraint: graph = {(x,x) | x in domain}
03. TYPED RELATIONSHIPS
IdentityFunction IS_A TotalFunction
IdentityFunction IS_A BijectiveFunction
IdentityFunction IS_A Mapping
IdentityFunction HAS_DOMAIN Set
IdentityFunction HAS_CODOMAIN Set
IdentityFunction HAS_GRAPH DiagonalRelation
IdentityFunction ACTS_AS IdentityMorphism
IdentityFunction IS_INVERSE_OF itself
04. FORMAL DEFINITION
For every set A there is a unique function id_A : A -> A satisfying
forall x in A: id_A(x) = x.
Graph(id_A) = Delta_A = {(a,a) : a in A}.
Image(id_A) = A.
For B subseteq A: id_A[B] = B and id_A^(-1)[B] = B.
Empty case: id_empty is the unique empty function empty -> empty.
05. COMPOSITION LAWS
For f : A -> B:
id_B o f = f
f o id_A = f
For g : B -> C:
id_C o (g o f) = g o f = (g o f) o id_A
Composition is defined only when the relevant types align.
06. INVERSE AND ITERATION
(id_A)^(-1) = id_A.
id_A o id_A = id_A.
For every integer n >= 0, (id_A)^n = id_A, with the zeroth power interpreted as the composition identity.
id_A is an involution and an idempotent under composition.
07. INJECTIVITY
id_A(x) = id_A(y) implies x = y.
Every identity function is injective, including id_empty.
08. SURJECTIVITY
forall y in A exists x in A such that id_A(x) = y, namely x = y.
Every identity function is surjective onto its declared codomain A.
09. FIXED POINTS
Fix(id_A) = A.
Every element of A is a fixed point.
This differs from arbitrary maps that may have no fixed points.
10. RESTRICTION AND EXTENSION
For B subseteq A, id_A restricted to B is id_B when its codomain is restricted to B.
As a map B -> A, the same pointwise rule is the inclusion map, not necessarily id_B as a typed function.
For A subseteq C, id_C extends id_A at the level of graph inclusion.
11. CATEGORY-THEORETIC SEMANTICS
Every object A in Set has identity morphism id_A.
Identity morphisms satisfy left and right unit laws for composition.
In an arbitrary category, identity morphisms are defined by unit laws; they need not be set-theoretic functions.
12. ALGEBRAIC STRUCTURES
Identity homomorphism on a group, ring, vector space, or module preserves all operations.
Identity linear operator I_V(v) = v.
Identity matrix I_n represents the identity linear map in a chosen basis.
Distinguish the identity element of an algebraic operation from an identity function on a set.
13. ORDER AND TOPOLOGY
id_A is monotone on any poset A.
id_X is continuous on any topological space X.
id_X is a homeomorphism with itself as inverse.
id_X is measurable when source and target have the same measurable structure.
14. SEMANTIC EQUIVALENCE
id_A; identity map on A; identity function on A: equivalent when types agree.
lambda x:A. x: extensionally equal to id_A.
Graph(id_A) = Delta_A: graph-level equivalence, not type identity.
Identity matrix: representation of identity linear transformation, not universally interchangeable with id_A.
15. NOT EQUIVALENT
Constant map c(x)=k: generally not identity.
Inclusion i:B->A for B proper subset A: not the typed identity id_B.
Inverse relation R^(-1): not necessarily an identity function.
Equality relation on A: same ordered pairs as Graph(id_A), but a different semantic type.
16. VALIDATION RULES
rule ID-TYPE:
require domain and codomain to be the same set.
rule ID-TOTAL:
require exactly one pair (a,a) for each a in domain.
rule ID-NO-EXTRA:
forbid pairs (a,b) with a != b.
rule ID-COMPOSE:
check matching domain/codomain before rewriting.
rule ID-EXTENSIONAL:
two functions are equal only when their declared domains, codomains, and pointwise outputs agree.
17. INFERENCE RULES
infer identity(f:A->A) => injective(f) and surjective(f) and bijective(f).
infer identity(f:A->A) => inverse(f)=f.
infer identity(f:A->A) => fixed_points(f)=A.
infer f:A->B => compose(id_B,f)=f.
infer f:A->B => compose(f,id_A)=f.
infer identity(f:A->A) => graph(f)=diagonal(A).
infer graph(f)=diagonal(A) and type(f)=A->A => identity(f).
18. SYMBOLIC NORMALISATION
rewrite id_B(f(x)) -> f(x) when f:A->B and x:A.
rewrite f(id_A(x)) -> f(x) when f:A->B and x:A.
rewrite id_A(id_A(x)) -> id_A(x) -> x when x:A.
rewrite inverse(id_A) -> id_A.
rewrite compose(id_A,id_A) -> id_A.
Do not apply untyped rewrites to mismatched sets.
19. KNOWLEDGE GRAPH MODEL
node: IdentityFunction(id_A)
node: Set(A)
edge: id_A --domain--> A
edge: id_A --codomain--> A
edge: id_A --hasProperty--> Total
edge: id_A --hasProperty--> Injective
edge: id_A --hasProperty--> Surjective
edge: id_A --hasProperty--> Bijective
edge: id_A --hasGraph--> Delta_A
edge: id_A --inverseOf--> id_A
edge: id_A --identityForCompositionOn--> End(A)
20. CONFIDENCE
mathematical_axioms: certainty = deductive within declared set theory.
computed_validation: confidence = 1.0 only if checks complete under stated assumptions.
external_source_alignment: unverified until webpage text compared.
uncertainty: do not conflate empirical confidence with theorem validity.
21. FLOW_HASH
canonical_payload: UTF-8, NFC-normalised, ordered entity and rule records.
algorithm: SHA-256.
hash_scope: schema + definitions + inference + validation + version.
hash_value: computed by implementation; never fabricate.
22. UPDATE_MODEL
version: 1.0
change_policy: append revision notes; preserve prior hashes.
triggers: corrected definitions, revised types, added inference rules, verified source changes.
compatibility: semantic changes require a version increment.
23. AI_CONSUMPTION
inputs: typed function records, sets, composition expressions, proof obligations.
outputs: validated identity classification, simplifications, proof traces, graph triples.
requirements: preserve typing, record assumptions, reject undefined compositions.
reasoning: symbolic and deductive, not numerical approximation.
provenance: attach source URI and flow version to outputs.
24. TEST CASES
PASS: id_{1,2}(1)=1 and id_{1,2}(2)=2.
PASS: id_empty : empty -> empty is bijective.
PASS: f:A->B implies id_B o f = f.
PASS: id_A^(-1)=id_A.
PASS: all points of A are fixed points.
FAIL: f:{1,2}->{1,2} with f(1)=2 and f(2)=1 is identity.
FAIL: f:{1}->{1,2} with f(1)=1 is typed identity on {1}.
FAIL: id_A o f for f:A->B where B differs from A, unless separately type-compatible.
25. TERMINATION
status: COMPLETE
required_sections: 25
truncation_guard: END_OF_FLOW_ALGEBRA
END_OF_FLOW_ALGEBRA