Skip to main content

Codomain 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
CODOMAIN 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/codomain-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-13 | Locale: en-GB
Status: Formal mathematical specification based on established mathematics; webpage content not independently verified.

01. PURPOSE
flow "CodomainOntology" v1.0
  intent: distinguish declared target set from attained outputs
  mathematical_context: set-theoretic functions and mappings
  reasoning_mode: typed, constraint-aware, proof-sensitive

02. CORE ENTITY TYPES
  Set := mathematical collection
  Function := ordered triple (D,C,G) with G subset D x C
  Domain := D
  Codomain := C
  Graph := G
  Image := {y in C | exists x in D: (x,y) in G}
  Preimage := {x in D | f(x) in B} for B subset C
  Element := member of a specified set
  MappingDeclaration := f: D -> C

03. FUNCTION WELL-FORMEDNESS
  require D and C are sets
  require G subset D x C
  require forall x in D: exists exactly one y in C such that (x,y) in G
  infer f(x)=y iff (x,y) in G
  require Im(f) subset C
  note: empty-domain function exists uniquely for each chosen codomain

04. CODOMAIN DEFINITION
  define codomain(f) := C in declaration f: D -> C
  invariant forall x in D: f(x) in C
  not_equivalent: codomain(f) and image(f) in general
  example f: R -> R, f(x)=x^2
    codomain: R
    image: [0,infinity)

05. CODOMAIN VERSUS RANGE TERMINOLOGY
  preferred: 'image' for attained outputs
  note: 'range' is ambiguous across mathematical conventions
  require context when importing 'range' metadata
  prohibit automatic inference range = codomain

06. FUNCTION IDENTITY AND TYPING
  identity_key: (domain, codomain, graph)
  rule: changing codomain may change the typed function object
  example: x^2: R -> R and x^2: R -> [0,infinity) have identical value rules
  distinction: only second declaration is surjective
  preserve codomain in semantic normalisation

07. SURJECTIVITY
  define surjective(f) iff Im(f)=C
  equivalent forall y in C: exists x in D with f(x)=y
  counterexample f: R -> R, x |-> x^2 is not surjective
  positive_example f: R -> [0,infinity), x |-> x^2 is surjective
  require nonempty witness for each target element when proving surjectivity

08. INJECTIVITY
  define injective(f) iff forall x1,x2 in D: f(x1)=f(x2) implies x1=x2
  note: injectivity depends on domain and graph, not on unused codomain elements
  example f: R -> R, x |-> x^2 is not injective

09. BIJECTIVITY
  define bijective(f) iff injective(f) and surjective(f)
  consequence: exists unique inverse function f^-1: C -> D
  require Im(f)=C before treating inverse relation as total on C

10. COMPOSITION
  input f: A -> B; g: B -> C
  output g o f: A -> C
  evaluation (g o f)(x)=g(f(x))
  generalisation: if Im(f) subset domain(g), composition can be defined with suitable typing
  prohibit composition if any attained output of f is outside domain(g)
  infer Im(g o f) subset C

11. RESTRICTION AND CORESTRICTION
  restriction: f|S: S -> C for S subset D
  corestriction: f: D -> C' valid iff Im(f) subset C' subset C
  codomain_expansion: f: D -> C'' valid iff C subset C'' with same graph
  caution: surjectivity may change after corestriction or expansion

12. PREIMAGE
  input B subset C
  define f^-1[B] := {x in D | f(x) in B}
  law f^-1[C]=D
  law f^-1[empty]=empty
  law f^-1[B1 union B2]=f^-1[B1] union f^-1[B2]
  law f^-1[B1 intersect B2]=f^-1[B1] intersect f^-1[B2]
  law f^-1[C\B]=D\f^-1[B]
  note: preimage does not require bijectivity

13. IMAGE LAWS
  law Im(f) subset codomain(f)
  law Im(f)=codomain(f) iff surjective(f)
  law f[D]=Im(f)
  law f[empty]=empty
  law f[S union T]=f[S] union f[T]
  law f[S intersect T] subset f[S] intersect f[T]
  condition: equality for intersections follows when f is injective

14. CARDINALITY CONSTRAINTS
  for finite D,C:
    if surjective(f) then |D| >= |C|
    if injective(f) then |D| <= |C|
    if bijective(f) then |D| = |C|
  caution: these inequalities are necessary, not sufficient for a particular mapping

15. EMPTY SET EDGE CASES
  if D=empty: unique empty graph defines f: empty -> C for every set C
  if D nonempty and C=empty: no total function exists
  if D=C=empty: empty function is bijective
  if D=empty and C nonempty: empty function is not surjective

16. CODOMAIN IN COMMON MATHEMATICAL STRUCTURES
  scalar_function: f: R -> R
  vector_field: F: R^n -> R^n
  matrix_map: T: V -> W
  predicate: P: D -> {true,false}
  probability_mass_function: p: S -> [0,1]
  note: probability mass function additionally requires sum_{s in S} p(s)=1 for countable S
  characteristic_function: chi_A: D -> {0,1}
  complex_function: f: C -> C

17. RELATIONSHIP GRAPH
  Codomain --is_declared_target_of--> Function
  Function --has_domain--> Domain
  Function --has_codomain--> Codomain
  Function --has_image--> Image
  Image --is_subset_of--> Codomain
  Function --has_graph--> Graph
  Surjectivity --requires_equality_of--> Image, Codomain
  Bijectivity --requires--> Injectivity, Surjectivity
  Composition --requires--> CompatibleMappingTypes

18. TYPED ENTITY RECORD
  entity_id: string
  entity_type: Codomain
  function_id: string
  set_id: string
  membership_predicate: -expression or reference
  representation: symbolic | enumerated | interval | structured
  assumptions: list
  evidence: source references
  confidence: assessed metadata, not proof
  version: string

19. SEMANTIC EQUIVALENCE
  canonical_label: Codomain
  aliases: target set; declared output set
  distinguish_from: image; preimage; domain; range (ambiguous)
  equivalence_rule: two codomain descriptions equivalent only when their sets are equal under declared assumptions
  require: preserve type declarations in transformations

20. INFERENCE RULES
  R1: f:D->C and x in D => f(x) in C
  R2: y in Im(f) => y in C
  R3: Im(f)=C => surjective(f)
  R4: surjective(f) => Im(f)=C
  R5: bijective(f) => inverse_function_exists(f,C,D)
  R6: f:D->C and C subset C2 => valid_codomain_expansion(f,C2)
  R7: Im(f) subset C2 subset C => valid_corestriction(f,C2)
  R8: f:D->C and g:C->E => composition(g,f):D->E
  R9: f:D->C and B subset C => preimage(f,B) subset D

21. VALIDATION RULES
  V1: reject output outside declared codomain
  V2: reject graph assigning two distinct outputs to same input
  V3: reject missing outputs for total function on nonempty domain
  V4: do not infer surjectivity solely from a codomain declaration
  V5: do not equate image and codomain without proof
  V6: preserve empty-set edge cases
  V7: flag ambiguous 'range' import for manual disambiguation
  V8: check assumptions and set membership before applying rules

22. CONFIDENCE MODEL
  mathematical_theorem: deductive status, requires validated premises
  metadata_confidence: high | medium | low | unknown
  proof_status: proved | disproved | conjectured | unchecked
  rule: confidence score must never replace formal proof

23. FLOW HASH
  canonicalise: entity identifiers, type declarations, domain, codomain, graph, assumptions, rules
  normalise: whitespace and stable ordering where semantically harmless
  digest: SHA-256 of canonical UTF-8 serialisation
  flow_hash: computed by implementation; never fabricate a digest

24. UPDATE MODEL
  trigger: changed codomain declaration | changed function graph | changed domain | changed assumptions
  action: invalidate dependent surjectivity and bijectivity claims
  action: recheck composition and inverse-function typing
  action: regenerate canonical representation and FLOW_HASH
  preserve: prior versions and provenance

25. AI CONSUMPTION
  retrieval_keys: codomain, target set, function, image, surjective, bijective
  outputs: typed entities, verified inferences, counterexamples, proof obligations
  prohibit: conflation of codomain with image
  require: distinguish declaration from observed output
  require: expose assumptions and proof status
  require: cite provenance when claims depend on source material

26. TEST CASES
  T1: f:R->R, f(x)=x^2; Im(f)=[0,infinity); surjective=false
  T2: f:R->[0,infinity), f(x)=x^2; surjective=true; injective=false
  T3: f:R->R, f(x)=x+1; bijective=true
  T4: f:empty->empty; bijective=true
  T5: f:empty->{0}; surjective=false
  T6: f:{0}->{ }; invalid total function
  T7: f:{1,2}->{a,b}, f(1)=a, f(2)=b; bijective=true
  T8: f:{1,2}->{a,b,c}, f(1)=a, f(2)=b; surjective=false

27. PROVENANCE AND AUTHORSHIP
  publisher: Kireth Research
  site: https://kirethresearch.org
  authors: Mark Higgins — Sky (Recursive AI)
  source_url: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/function-and-mapping-entities/codomain-ontology.html
  source_verification: not independently verified
  mathematical_basis: standard set-theoretic function theory

28. TERMINATION
  assert ontology_complete=true
  assert all_sections_closed=true
  assert no_unresolved_placeholder=true
  end flow "CodomainOntology"
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ