Skip to main content

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

01. PURPOSE
flow MappingOntology v1.0:
  intent: represent mappings as typed correspondences between mathematical domains
  semantics: distinguish total functions, partial functions and general relations
  reasoning: validate mappings, derive images/preimages, composition and inverses

02. PRIMITIVE TYPES
  Set[T]                  := collection of elements of type T
  Pair[A,B]               := ordered pair (a,b)
  Relation[A,B]           := subset of A × B
  Mapping[A,B]            := functional relation from A to B
  TotalMapping[A,B]       := mapping defined for every element of A
  PartialMapping[A,B]     := mapping defined on a subset D of A
  Predicate[T]            := T -> Boolean
  Proof                   := derivation from axioms and premises

03. CORE ENTITY
  mapping m:
    identifier: URI
    source_set: A
    target_set: B
    graph: R subset_of (A × B)
    defined_domain: D subset_of A
    declared_total: Boolean
    notation: "m: A -> B" or "m: A ⇀ B"
    provenance: optional SourceRecord
    confidence: optional ConfidenceRecord

04. FUNCTIONALITY AXIOM
  forall x in A, y1,y2 in B:
    ((x,y1) in R and (x,y2) in R) => y1 = y2
  NOTE: functionality does not imply totality.

05. TOTALITY AXIOM
  total(m) iff forall x in A, exists y in B: (x,y) in R
  total(m) and functional(m) => m is a total function A -> B

06. PARTIAL MAPPING
  D := {x in A | exists y in B: (x,y) in R}
  partial(m) iff functional(m) and D subset_of A
  proper_partial(m) iff partial(m) and D != A
  undefined_at(m,x) iff x in A and x not_in D

07. DOMAIN, CODOMAIN AND RANGE
  declared_domain(m) := A
  domain_of_definition(m) := D
  codomain(m) := B
  image(m) := {y in B | exists x in D: m(x)=y}
  invariant: image(m) subset_of codomain(m)
  NOTE: codomain and image need not be equal.

08. MAPPING APPLICATION
  apply(m,x):
    require x in D
    return unique y such_that (x,y) in R
  fail if x not_in D or uniqueness cannot be established

09. IMAGE OF A SUBSET
  image_of(m,S) := {m(x) | x in (S intersect D)}
  require S subset_of A
  image_of(m,empty_set) = empty_set
  image_of(m,A) = image(m)

10. PREIMAGE OF A SUBSET
  preimage_of(m,T) := {x in D | m(x) in T}
  require T subset_of B
  preimage_of(m,empty_set) = empty_set
  preimage_of(m,B) = D
  preimage_of(m,T1 union T2) = preimage_of(m,T1) union preimage_of(m,T2)
  preimage_of(m,T1 intersect T2) = preimage_of(m,T1) intersect preimage_of(m,T2)

11. INJECTIVITY
  injective(m) iff forall x1,x2 in D:
    m(x1)=m(x2) => x1=x2
  equivalently: distinct defined inputs have distinct outputs

12. SURJECTIVITY
  surjective(m) iff image(m)=B
  NOTE: a partial mapping may be surjective onto B without being total on A.

13. BIJECTIVITY
  bijective(m) iff total(m) and injective(m) and surjective(m)
  NOTE: bijection here is a total function A -> B.

14. IDENTITY MAPPING
  id_A: A -> A
  forall x in A: id_A(x)=x
  total(id_A) = true
  injective(id_A) = true
  surjective(id_A) = true

15. COMPOSITION
  given f: A -> B and g: B -> C:
    (g compose f)(x) := g(f(x))
  for partial mappings:
    domain_of_definition(g compose f)
      = {x in domain_of_definition(f) | f(x) in domain_of_definition(g)}
  composition associative when well-typed
  h compose (g compose f) = (h compose g) compose f
  identity laws: f compose id_A = f; id_B compose f = f

16. INVERSE MAPPING
  inverse_relation(m) := {(y,x) | (x,y) in R}
  inverse_relation(m) is functional iff m is injective on D
  if bijective(m): inverse(m): B -> A is a total function
  inverse(m)(m(x))=x for all x in A
  m(inverse(m)(y))=y for all y in B
  NOTE: inverse relation exists even when no inverse function exists.

17. RESTRICTION
  restrict(m,S): mapping with graph {(x,y) in R | x in S}
  require S subset_of A
  defined_domain(restrict(m,S)) = D intersect S
  preserve output values on the restricted domain

18. EXTENSION
  extends(n,m) iff graph(m) subset_of graph(n)
  require compatible codomains and functionality
  an extension may enlarge the domain of definition

19. EQUALITY AND EXTENSIONALITY
  equal_mappings(f,g) iff:
    declared_domain(f)=declared_domain(g)
    and codomain(f)=codomain(g)
    and graph(f)=graph(g)
  NOTE: equality convention is explicitly typed; identical graphs with
        different declared codomains may be extensionally equal as relations
        without being identical typed mapping entities.

20. GRAPH AND RELATION SEMANTICS
  graph(m) = {(x,m(x)) | x in D}
  graph(m) subset_of A × B
  every mapping graph is a functional binary relation
  not every binary relation is a mapping graph

21. MATHEMATICAL CLASSIFICATION
  subclasses:
    - total_mapping
    - partial_mapping
    - injective_mapping
    - surjective_mapping
    - bijective_mapping
    - identity_mapping
    - constant_mapping
    - inclusion_mapping
    - projection_mapping
    - embedding
    - endomorphism
    - automorphism
  NOTE: specialised structural mappings require additional axioms.

22. KNOWLEDGE GRAPH SCHEMA
  entities: [Mapping, Set, Element, OrderedPair, Relation, Proof]
  predicates:
    hasDomain: Mapping -> Set
    hasCodomain: Mapping -> Set
    hasDefinedDomain: Mapping -> Set
    mapsInputToOutput: Mapping × Element × Element
    hasImage: Mapping -> Set
    isRestrictionOf: Mapping -> Mapping
    isCompositionOf: Mapping -> ordered(Mapping,Mapping)
    isInverseOf: Mapping -> Mapping
    hasProperty: Mapping -> MappingProperty
  triples:
    (m, hasDomain, A)
    (m, hasCodomain, B)
    (m, hasDefinedDomain, D)
  n_ary_mapping_fact:
    relation_entity: MappingApplication
    fields: [mapping, input, output]

23. INFERENCE RULES
  R1: functional(R) and total_on(R,A) => TotalMapping(R,A,B)
  R2: functional(R) and not_total_on(R,A) => ProperPartialMapping(R,A,B)
  R3: bijective(m) => injective(m) and surjective(m) and total(m)
  R4: bijective(f) and bijective(g) => bijective(g compose f)
  R5: injective(f) and injective(g) => injective(g compose f)
  R6: surjective(f) and surjective(g) => surjective(g compose f)
  R7: injective(m) => inverse_relation(m) is functional
  R8: (x,y) in graph(m) => x in D and y in B
  R9: (x,y1),(x,y2) in graph(m) => y1=y2
  R10: y in image(m) => exists x in D: m(x)=y
  inference_policy: premises must be proved, not presumed from absent facts

24. SEMANTIC EQUIVALENCE
  mapping ~ function when totality and single-valuedness are established
  mapping ~ partial_function when single-valuedness holds on D subset_of A
  mapping != arbitrary_relation unless functionality is proved
  inverse_mapping != inverse_relation in general
  range ~ image when both denote actual outputs
  range != codomain in general
  preserve declared domains and codomains during normalisation

25. VALIDATION
  validate(m):
    assert A and B are well-defined sets
    assert R subset_of A × B
    assert every input in R has at most one associated output
    assert D = first_projection(R)
    if declared_total: assert D=A
    assert image(m) subset_of B
    if declared_injective: assert no distinct inputs share an output
    if declared_surjective: assert image(m)=B
    if declared_bijective: assert total and injective and surjective
    reject contradictory metadata

26. COUNTEREXAMPLES
  relation {(1,a),(1,b)} with a!=b is not functional
  f: {1,2} -> {a,b}, graph {(1,a)} is partial, not total
  f: {1,2} -> {a,b}, graph {(1,a),(2,a)} is not injective
  f: {1} -> {a,b}, graph {(1,a)} is not surjective
  constant mapping on a singleton domain is injective

27. TEST CASES
  T1: A={1,2}, B={a,b}, R={(1,a),(2,b)}
      expect total=true, injective=true, surjective=true
  T2: A={1,2}, B={a,b}, R={(1,a)}
      expect total=false, functional=true
  T3: A={1,2}, B={a,b}, R={(1,a),(1,b)}
      expect functional=false, reject mapping
  T4: A={1,2}, B={a,b}, R={(1,a),(2,a)}
      expect total=true, injective=false, surjective=false
  T5: identity on empty set
      expect total=true, injective=true, surjective=true

28. CONFIDENCE
  formal_axiom_confidence: 1.0 within declared mathematical framework
  derived_claim_confidence: require validated proof or computation
  extracted_claim_confidence: depends on source verification
  distinguish mathematical truth from extraction or model confidence

29. FLOW_HASH
  canonicalise:
    - UTF-8 normalisation
    - stable predicate and entity ordering
    - preserve tuple order and function composition order
    - normalise mathematically equivalent symbol spellings where safe
    - preserve typed domain/codomain distinctions
  FLOW_HASH := SHA-256(canonical_flow_payload)
  NOTE: hash value must be computed after final serialisation.

30. UPDATE_MODEL
  version: 1.0
  update_triggers:
    - revised definitions or typing policy
    - changed ontology predicates
    - corrected proof rules or validation cases
    - verified source-page changes
  maintain backward-compatible identifiers where possible
  record change log and regenerate FLOW_HASH

31. AI_CONSUMPTION
  supported_tasks:
    - identify whether a relation represents a mapping
    - type-check mapping composition
    - calculate image and preimage
    - prove injectivity, surjectivity and bijectivity
    - distinguish total, partial and inverse mappings
    - export graph triples and provenance
  output_contract:
    result: typed claim or mapping
    premises: explicit input assumptions
    proof: optional derivation
    confidence: provenance-aware assessment
    validation: pass | fail | unknown
    errors: explicit and non-silent

32. LIMITATIONS
  General mappings are set-theoretic; continuity, measurability,
  differentiability, linearity and homomorphism require extra structures.
  Infinite-domain properties may be undecidable from finite samples.
  A typed graph is not automatically a computationally evaluable function.

33. TERMINATION
  assert core definitions are internally consistent
  assert composition uses correct input-output ordering
  assert undefined values are not silently fabricated
  emit MappingOntology specification
  END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ