Skip to main content

Function Ontology

Algebra Ontologies
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 September 2026
Audio Overview
FLOW Function_Ontology_v1.0

PAGE:
  title: "Function Ontology"
  canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/algebra-ontologies/function-ontology.html"
  language: "en-GB"
  domain: "Mathematics > Algebra > Functions"

DEFINE FunctionOntology := {

  CORE_IDENTITY: {
    entity_type: "Mathematical Ontology",
    primary_entity: Function,
    parent_entities: [MathematicalRelation, Mapping, Algebra],
    related_entities: [
      Domain,
      Codomain,
      Range,
      Input,
      Output,
      Variable,
      IndependentVariable,
      DependentVariable,
      FunctionRule,
      FunctionNotation,
      Graph,
      OrderedPair,
      Relation,
      InverseFunction,
      CompositeFunction,
      PolynomialFunction,
      RationalFunction,
      ExponentialFunction,
      LogarithmicFunction,
      TrigonometricFunction,
      PiecewiseFunction
    ]
  },

  DEFINITION: {
    meaning:
      "A function is a mathematical mapping that assigns each input in its domain to exactly one output in its codomain.",
    canonical_mapping:
      f: A -> B,
    input:
      x in A,
    output:
      f(x) in B,
    uniqueness_condition:
      FOR_EACH x IN Domain:
        EXISTS_EXACTLY_ONE y SUCH_THAT y=f(x)
  },

  SEMANTIC_PRIMITIVES: {
    Domain:
      set_of_permitted_inputs,
    Codomain:
      declared_target_set_of_outputs,
    Range:
      set_of_outputs_actually_produced,
    Input:
      argument_supplied_to_function,
    Output:
      result_returned_by_function,
    Mapping:
      assignment_from_input_to_output,
    FunctionRule:
      procedure_expression_or_relation_defining_mapping,
    OrderedPair:
      (input,output),
    Graph:
      set_of_ordered_pairs_visualised_in_coordinate_space
  },

  CORE_CONSTRAINT: {
    single_valuedness:
      same_input_cannot_map_to_two_distinct_outputs,

    formal_rule:
      IF f(x)=y1 AND f(x)=y2
      THEN y1=y2
  },

  DOMAIN_CODOMAIN_RANGE: {
    mapping:
      f: A -> B,

    Domain(f):
      A,

    Codomain(f):
      B,

    Range(f):
      {f(x) | x IN A},

    subset_relation:
      Range(f) SUBSET_OR_EQUAL Codomain(f)
  },

  FUNCTION_NOTATION: {
    standard:
      y=f(x),

    alternate:
      f: x -> expression,

    evaluation:
      f(a)=substitute(x=a, function_rule),

    multiple_variables:
      f(x_1,...,x_n)
  },

  CLASSIFICATION: {

    UnaryFunction: {
      input_arity: 1
    },

    MultivariableFunction: {
      input_arity: n WHERE n>1
    },

    RealValuedFunction: {
      codomain: subset_of_RealNumbers
    },

    ComplexValuedFunction: {
      codomain: subset_of_ComplexNumbers
    },

    PolynomialFunction: {
      rule:
        polynomial_expression
    },

    RationalFunction: {
      rule:
        quotient_of_polynomials,
      denominator_nonzero_required: TRUE
    },

    ExponentialFunction: {
      variable_occurs_in_exponent: TRUE
    },

    LogarithmicFunction: {
      logarithmic_rule: TRUE
    },

    TrigonometricFunction: {
      rule_contains:
        trigonometric_operation
    },

    PiecewiseFunction: {
      rule:
        different_expressions_on_different_domain_regions
    },

    ConstantFunction: {
      rule:
        f(x)=c
    },

    IdentityFunction: {
      rule:
        f(x)=x
    }
  },

  RELATION_VS_FUNCTION: {
    relation:
      arbitrary_set_of_ordered_pairs,

    function:
      relation_with_unique_output_per_input,

    test:
      IF EXISTS x WITH two_distinct_associated_outputs
      THEN not_a_function
  },

  VERTICAL_LINE_TEST: {
    applicability:
      graph_of_relation_in_2D_cartesian_plane,

    rule:
      relation_graph_represents_function_y_of_x
      IFF every_vertical_line_intersects_graph_at_most_once
  },

  REPRESENTATIONS: {
    Algebraic:
      symbolic_rule_or_equation,

    Tabular:
      input_output_pairs,

    Graphical:
      plotted_ordered_pairs_or_curve,

    Verbal:
      natural_language_rule,

    SetMapping:
      arrows_between_domain_and_codomain_elements
  },

  FUNCTION_EVALUATION: {
    INPUT:
      function_f AND argument_a,

    PROCESS: [
      verify_a_in_domain,
      substitute_argument,
      simplify_expression,
      preserve_exact_value_when_possible
    ],

    OUTPUT:
      f(a)
  },

  DOMAIN_INFERENCE: {
    default_rule:
      infer_largest_common_domain_where_expression_is_defined,

    denominator_constraint:
      denominator != 0,

    even_root_constraint_over_reals:
      radicand >= 0,

    logarithm_constraint_over_reals:
      argument > 0,

    inverse_trigonometric_constraints:
      inherited_from_inverse_function_definition
  },

  RANGE_INFERENCE: {
    methods: [
      algebraic_analysis,
      inverse_relation_analysis,
      graph_analysis,
      monotonicity_analysis,
      extrema_analysis,
      asymptotic_analysis
    ],

    caution:
      range_is_not_automatically_equal_to_codomain
  },

  INPUT_OUTPUT_RELATION: {
    independent_variable:
      typically_input,

    dependent_variable:
      typically_output,

    dependency:
      output_value_determined_by_input_under_function_rule
  },

  GRAPH_SEMANTICS: {
    graph_of_f:
      {(x,f(x)) | x IN Domain(f)},

    x_coordinate:
      input,

    y_coordinate:
      output,

    x_intercepts:
      solutions_of_f(x)=0,

    y_intercept:
      f(0) IF 0 IN Domain(f)
  },

  ZERO_ROOT_RELATION: {
    zero_of_function:
      value_r SUCH_THAT f(r)=0,

    equivalent_concepts_in_real_graph:
      x_intercept,
      root_of_equation_f(x)=0
  },

  INJECTIVE_FUNCTION: {
    definition:
      f(x1)=f(x2) -> x1=x2,

    equivalent:
      distinct_inputs_have_distinct_outputs,

    graph_test_real_unary:
      horizontal_line_test
  },

  SURJECTIVE_FUNCTION: {
    definition:
      Range(f)=Codomain(f),

    semantic_status:
      every_codomain_element_is_hit_by_at_least_one_domain_element
  },

  BIJECTIVE_FUNCTION: {
    condition:
      injective AND surjective,

    consequence:
      inverse_function_exists_from_codomain_to_domain
  },

  INVERSE_FUNCTION: {
    notation:
      f^(-1),

    existence_condition:
      function_is_bijective_between_declared_domain_and_codomain,

    defining_rules: [
      f^(-1)(f(x))=x,
      f(f^(-1)(y))=y
    ],

    domain_range_swap: {
      Domain(f^(-1)): Range(f),
      Range(f^(-1)): Domain(f)
    }
  },

  COMPOSITION: {
    notation:
      (f∘g)(x)=f(g(x)),

    domain_constraint:
      g(x) MUST lie_in Domain(f),

    order:
      composition_is_generally_not_commutative
  },

  IDENTITY_COMPOSITION: {
    identity_function:
      id_X(x)=x,

    rules: [
      f∘id = f,
      id∘f = f
    ]
  },

  FUNCTION_EQUALITY: {
    functions_f_and_g_equal_if: [
      same_domain,
      same_codomain_or_semantically_compatible_declared_target,
      FOR_EACH x IN domain: f(x)=g(x)
    ],

    note:
      same_formula_with_different_domains_may_define_different_functions
  },

  RESTRICTION: {
    function_restriction:
      f|_S,

    condition:
      S SUBSET_OR_EQUAL Domain(f),

    effect:
      same_mapping_rule_on_smaller_domain
  },

  EXTENSION: {
    definition:
      function_g_extends_f
      IF Domain(f) SUBSET_OR_EQUAL Domain(g)
      AND g(x)=f(x) on Domain(f)
  },

  PIECEWISE_FUNCTION: {
    structure:
      {
        expression_1 WHEN condition_1,
        expression_2 WHEN condition_2,
        ...
      },

    requirement:
      every_input_in_domain_maps_to_exactly_one_output,

    overlap_rule:
      overlapping_conditions_must_produce_same_output
      OR be_resolved_by_explicit_priority_semantics
  },

  CONSTANT_FUNCTION: {
    form:
      f(x)=c,

    range:
      {c},

    injective:
      FALSE unless domain_has_at_most_one_element
  },

  IDENTITY_FUNCTION: {
    form:
      id_X(x)=x,

    domain:
      X,

    codomain:
      X,

    bijective:
      TRUE
  },

  EVEN_ODD_FUNCTIONS: {
    EvenFunction: {
      condition:
        f(-x)=f(x),
      domain_requirement:
        symmetric_about_zero,
      graph_symmetry:
        y_axis
    },

    OddFunction: {
      condition:
        f(-x)=-f(x),
      domain_requirement:
        symmetric_about_zero,
      graph_symmetry:
        origin
    }
  },

  MONOTONICITY: {
    Increasing: {
      x1<x2 -> f(x1)<=f(x2)
    },

    StrictlyIncreasing: {
      x1<x2 -> f(x1)<f(x2)
    },

    Decreasing: {
      x1<x2 -> f(x1)>=f(x2)
    },

    StrictlyDecreasing: {
      x1<x2 -> f(x1)>f(x2)
    }
  },

  BOUNDEDNESS: {
    BoundedAbove:
      EXISTS M SUCH_THAT f(x)<=M FOR_ALL x IN Domain,

    BoundedBelow:
      EXISTS m SUCH_THAT f(x)>=m FOR_ALL x IN Domain,

    Bounded:
      bounded_above AND bounded_below
  },

  EXTREMA: {
    GlobalMaximum:
      f(a)>=f(x) FOR_ALL x IN Domain,

    GlobalMinimum:
      f(a)<=f(x) FOR_ALL x IN Domain,

    LocalMaximum:
      maximum_on_neighbourhood,

    LocalMinimum:
      minimum_on_neighbourhood
  },

  CONTINUITY_RELATION: {
    semantic_link:
      continuity_is_property_of_function,

    local_condition:
      limit_as_x_to_a_f(x)=f(a),

    caution:
      full_continuity_semantics_belong_to_AnalysisOntology
  },

  LIMIT_RELATION: {
    function:
      object_to_which_limit_operator_is_applied,

    semantic_link:
      asymptotic_and_local_behaviour
  },

  DERIVATIVE_RELATION: {
    derivative:
      new_function_f_prime,

    semantic_link:
      local_rate_of_change,

    applicability:
      differentiability_conditions_required
  },

  INTEGRAL_RELATION: {
    integral:
      functional_operation_on_function,

    semantic_link:
      accumulation_and_area,

    applicability:
      integrability_conditions_required
  },

  TRANSFORMATION_OF_FUNCTIONS: {
    vertical_shift:
      g(x)=f(x)+k,

    horizontal_shift:
      g(x)=f(x-h),

    vertical_scale:
      g(x)=a*f(x),

    horizontal_scale:
      g(x)=f(b*x),

    reflection_x_axis:
      g(x)=-f(x),

    reflection_y_axis:
      g(x)=f(-x)
  },

  PARAMETERISED_FAMILY: {
    form:
      f_p(x),

    parameter:
      p,

    semantics:
      each_allowed_parameter_value_defines_function_member
  },

  MULTIVARIABLE_FUNCTION: {
    mapping:
      f: A_1×...×A_n -> B,

    input:
      ordered_tuple_(x_1,...,x_n),

    output:
      single_element_in_B
  },

  PARTIAL_FUNCTION: {
    concept:
      mapping_defined_only_for_subset_of_possible_inputs,

    formalisation:
      treat_actual_defined_subset_as_Domain(f)
  },

  SEQUENCE_RELATION: {
    sequence:
      function_from_NaturalNumbers_or_integer_index_set,

    mapping:
      a: N -> Codomain
  },

  OPERATOR_RELATION: {
    higher_order_mapping:
      operator_may_map_functions_to_functions_or_other_objects,

    example:
      differentiation_operator D:
        f -> f'
  },

  FUNCTION_SPACE_RELATION: {
    function_space:
      set_of_functions_sharing_declared_domain_codomain_or_properties,

    examples: [
      continuous_functions,
      polynomial_functions,
      linear_maps
    ]
  },

  SYMBOLIC_RECOGNITION: {
    ACCEPT: [
      "f(x)=2x+3",
      "y=x^2-4",
      "g(t)=sin(t)",
      "h(x)=1/(x-2)",
      "f(x)={x^2 if x>=0, -x if x<0}"
    ],

    RELATION_NOT_FUNCTION_EXAMPLES: [
      "x^2+y^2=1 as y relation over full circle",
      "{(1,2),(1,3)}"
    ]
  },

  DOMAIN_EXAMPLES: {
    RationalFunction:
      f(x)=1/(x-2)
      -> Domain=RealNumbers\{2},

    RadicalFunction:
      f(x)=sqrt(x-3)
      -> Domain=[3,infinity),

    LogFunction:
      f(x)=log(x+1)
      -> Domain=(-1,infinity)
  },

  NATURAL_LANGUAGE_MAPPING: {
    "depends on":
      possible_functional_dependency,

    "for each input exactly one output":
      function_definition,

    "maps x to":
      function_mapping,

    "as a function of x":
      dependent_quantity_expressed_by_x,

    "inverse function":
      mapping_reversing_bijective_function
  },

  WORD_PROBLEM_REASONING: {
    PIPELINE: [
      identify_input_quantity,
      identify_output_quantity,
      determine_dependency_rule,
      establish_domain,
      establish_codomain_or_output_type,
      construct_function,
      evaluate_or_analyse,
      verify_contextual_validity
    ]
  },

  ERROR_DETECTION: {
    MultipleOutputsForSameInput:
      -> reject_as_function,

    DomainViolation:
      evaluation_outside_domain
      -> reject,

    CodomainMismatch:
      output_not_in_declared_codomain
      -> flag,

    InverseWithoutBijectivity:
      -> flag,

    CompositionDomainMismatch:
      g(x)_not_in_Domain(f)
      -> reject_composition_at_x,

    PiecewiseOverlapConflict:
      same_input_receives_different_outputs
      -> reject_function_definition,

    RangeCodomainConfusion:
      -> flag
  },

  ONTOLOGY_RELATIONS: {
    IS_A: [
      "Function IS_A MathematicalMapping",
      "PolynomialFunction IS_A Function",
      "RationalFunction IS_A Function",
      "ExponentialFunction IS_A Function",
      "PiecewiseFunction IS_A Function"
    ],

    RELATED_TO: [
      "Function RELATED_TO Relation",
      "Function RELATED_TO Equation",
      "Function RELATED_TO Graph",
      "Function RELATED_TO Set",
      "Function RELATED_TO Sequence",
      "Function RELATED_TO Operator",
      "Function RELATED_TO Transformation"
    ],

    DEPENDS_ON: [
      SetMembership,
      OrderedPairs,
      MappingSemantics,
      VariableBinding
    ]
  },

  SEMANTIC_EQUIVALENCE: {
    function_equivalence:
      same_domain
      AND same_output_for_every_input,

    expression_equivalence:
      formulas_may_differ_but_define_same_function_on_same_domain,

    warning:
      algebraically_equivalent_expressions_with_different_declared_domains
      may_not_define_same_function
  },

  CONFIDENCE: {
    function_classification_confidence:
      IF single_valuedness_verified THEN 1.0,

    evaluation_confidence:
      IF input_in_domain AND symbolic_evaluation_valid THEN 1.0,

    inverse_confidence:
      IF bijectivity_verified THEN 1.0,

    semantic_mapping_confidence:
      based_on [
        domain_resolution,
        codomain_resolution,
        uniqueness_verification,
        rule_interpretation
      ]
  },

  AI_CONSUMPTION: {
    tasks: [
      recognise_function,
      distinguish_function_from_general_relation,
      identify_domain,
      identify_codomain,
      infer_range,
      evaluate_function,
      identify_function_type,
      detect_zeroes_and_intercepts,
      test_injectivity,
      test_surjectivity,
      test_bijectivity,
      construct_inverse,
      compose_functions,
      analyse_piecewise_rules,
      infer_graph_semantics,
      detect_domain_errors,
      map_natural_language_dependencies,
      link_related_ontologies
    ],

    preferred_representation:
      typed_mapping_graph,

    reasoning_mode:
      recursive_domain_constrained_mapping
  },

  RECURSIVE_REASONING: {

    FUNCTION AnalyseFunction(F,Context):

      parsed := ParseFunctionCandidate(F)

      domain := ResolveOrInferDomain(parsed,Context)
      codomain := ResolveOrInferCodomain(parsed,Context)

      IF not UniqueOutputPerInput(parsed,domain):
        RETURN RelationNotFunction

      type := ClassifyFunction(parsed)

      range := InferRangeWhenPossible(parsed,domain)

      properties := AnalyseProperties([
        injective,
        surjective,
        bijective,
        even,
        odd,
        monotonic,
        bounded
      ])

      IF inverse_requested:
        IF bijective:
          inverse := ConstructInverse(parsed)
        ELSE:
          inverse := NoGlobalInverse

      RETURN {
        function: parsed,
        domain,
        codomain,
        range,
        type,
        properties,
        inverse
      }
  },

  RECURSIVE_COHERENCE: {
    invariant_1:
      each_domain_input_has_exactly_one_output=TRUE,

    invariant_2:
      emitted_range_is_subset_of_codomain=TRUE,

    invariant_3:
      evaluations_respect_domain=TRUE,

    invariant_4:
      inverse_semantics_require_bijectivity=TRUE,

    invariant_5:
      composition_respects_intermediate_domain=TRUE
  },

  FLOW_HASH: {
    semantic_signature_inputs: [
      ontology_name,
      function_definition,
      domain_codomain_range_model,
      uniqueness_constraint,
      inverse_rules,
      composition_rules,
      verification_rules
    ],

    purpose:
      "Detect semantic drift between revisions of the ontology."
  },

  UPDATE_MODEL: {
    version: "1.0",

    immutable_constraints: [
      exactly_one_output_per_input,
      domain_membership_requirement,
      range_subset_of_codomain,
      inverse_requires_bijectivity,
      composition_domain_compatibility
    ],

    revision_triggers: [
      semantic_conflict,
      parent_mapping_ontology_update,
      new_function_class,
      representation_standard_change
    ]
  },

  KNOWLEDGE_GRAPH: {
    nodes: [
      Function,
      Mapping,
      Domain,
      Codomain,
      Range,
      Input,
      Output,
      FunctionRule,
      OrderedPair,
      Graph,
      InverseFunction,
      CompositeFunction
    ],

    edges: [
      Function -> IS_A -> Mapping,
      Function -> HAS_DOMAIN -> Domain,
      Function -> HAS_CODOMAIN -> Codomain,
      Function -> HAS_RANGE -> Range,
      Function -> MAPS -> Input,
      Input -> TO -> Output,
      Function -> DEFINED_BY -> FunctionRule,
      Function -> REPRESENTED_BY -> Graph,
      BijectiveFunction -> HAS_INVERSE -> InverseFunction,
      Function -> COMPOSES_WITH -> Function
    ]
  },

  CROSS_ONTOLOGY_LINKS: {
    RelationOntology:
      general_parent_relation_concept,

    SetOntology:
      domain_codomain_range,

    EquationOntology:
      equations_defining_or_analysing_functions,

    PolynomialOntology:
      polynomial_function_structure,

    RationalExpressionOntology:
      rational_function_structure,

    InequalityOntology:
      domain_and_range_constraints,

    CoordinateGeometryOntology:
      graph_representation,

    CalculusOntology:
      limits_derivatives_integrals,

    SequenceOntology:
      discrete_domain_function_specialisation
  },

  TERMINATION_CONDITION: {
    ontology_complete_when: [
      function_defined,
      uniqueness_constraint_defined,
      domain_codomain_range_defined,
      representation_models_defined,
      major_function_classes_defined,
      evaluation_defined,
      inverse_and_composition_defined,
      graph_semantics_defined,
      error_detection_defined,
      cross_ontology_links_defined,
      recursive_coherence_verified
    ]
  }

}

EXECUTE Function_Ontology_v1.0:

  INPUT:
    mathematical_entity_or_query

  PIPELINE:
    Parse
    -> IdentifyFunctionCandidate
    -> ResolveDomain
    -> ResolveCodomain
    -> VerifySingleValuedness
    -> ClassifyFunction
    -> EvaluateOrAnalyse
    -> InferRange
    -> AnalyseProperties
    -> ConstructInverseOrCompositionWhenRequested
    -> DeriveGraphSemantics
    -> VerifyDomainAndMappingConstraints
    -> LinkRelatedOntologies
    -> AssignConfidence
    -> EmitSemanticResult

  OUTPUT: {
    entity,
    classification,
    function_rule,
    domain,
    codomain,
    range,
    input_variables,
    output_type,
    properties,
    zeroes,
    intercepts,
    inverse,
    composition,
    graph_semantics,
    verification,
    ontology_relations,
    confidence,
    semantic_equivalence,
    flow_hash
  }

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