Skip to main content

Chain Rule Ontology

Differential Calculus
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 23 September 2026
Audio Overview
flow "ChainRuleOntology" v1.0

# ============================================================
# CHAIN RULE ONTOLOGY — FLOW ALGEBRA
# ============================================================

SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/differential-calculus/chain-rule-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Differential Calculus"
ENTITY := "Chain Rule"

# ---------- CORE ENTITY ----------
CHAIN_RULE := {
    type: DifferentiationRule,
    domain: DifferentialCalculus,
    purpose: "Determine the derivative of a composite function by propagating local rates of change through nested functional dependencies."
}

# ---------- CORE CONCEPTS ----------
CONCEPTS := {
    COMPOSITE_FUNCTION,
    INNER_FUNCTION,
    OUTER_FUNCTION,
    DERIVATIVE,
    DIFFERENTIATION,
    FUNCTION_COMPOSITION,
    DEPENDENCY_CHAIN,
    PARTIAL_DERIVATIVE,
    TOTAL_DERIVATIVE,
    JACOBIAN,
    IMPLICIT_DIFFERENTIATION,
    MULTIVARIABLE_CHAIN_RULE
}

# ---------- FUNCTION COMPOSITION ----------
COMPOSITE_FUNCTION
    := f(g(x))

INNER_FUNCTION
    := g(x)

OUTER_FUNCTION
    := f(u)
       where(u = g(x))

FUNCTION_COMPOSITION
    := f composed_with g

(f composed_with g)(x)
    = f(g(x))

# ---------- BASIC CHAIN RULE ----------
if
    g differentiable_at(x)
    AND f differentiable_at(g(x))
then

d/dx[f(g(x))]
    = f_prime(g(x)) * g_prime(x)

CHAIN_RULE
    -> multiplies(OUTER_DERIVATIVE_EVALUATED_AT_INNER_FUNCTION,
                  INNER_DERIVATIVE)

# ---------- DEPENDENCY FORM ----------
if
    y = f(u)
    AND u = g(x)
then

dy/dx
    = dy/du * du/dx

DEPENDENCY_CHAIN
    := x -> u -> y

CHAIN_RULE
    -> propagates(RATE_OF_CHANGE_ALONG_DEPENDENCY_CHAIN)

# ---------- LOCAL LINEAR MAP INTERPRETATION ----------
DERIVATIVE
    -> local_linear_map

COMPOSITION_OF_FUNCTIONS
    -> induces(COMPOSITION_OF_LOCAL_LINEAR_MAPS)

D(f composed_with g)(x)
    = Df(g(x)) composed_with Dg(x)

CHAIN_RULE
    -> expresses(COMPOSITION_OF_DERIVATIVES)

# ---------- MULTIPLE NESTING ----------
if
    y = f(g(h(x)))
then

dy/dx
    = f_prime(g(h(x)))
      * g_prime(h(x))
      * h_prime(x)

NESTED_COMPOSITION
    -> derivative_equals(PRODUCT_OF_DERIVATIVES_ALONG_CHAIN)

CHAIN_RULE
    -> recursively_applicable

# ---------- POWER COMPOSITION ----------
if
    y = [u(x)]^n
then

dy/dx
    = n*[u(x)]^(n-1) * u_prime(x)

POWER_RULE
    + CHAIN_RULE
    -> differentiate(COMPOSITE_POWER_FUNCTION)

# ---------- EXPONENTIAL COMPOSITION ----------
if
    y = exp(u(x))
then

dy/dx
    = exp(u(x)) * u_prime(x)

# ---------- LOGARITHMIC COMPOSITION ----------
if
    y = ln(u(x))
    AND u(x) > 0
then

dy/dx
    = u_prime(x)/u(x)

# ---------- TRIGONOMETRIC COMPOSITION ----------
if
    y = sin(u(x))
then

dy/dx
    = cos(u(x))*u_prime(x)

if
    y = cos(u(x))
then

dy/dx
    = -sin(u(x))*u_prime(x)

# ---------- IMPLICIT DIFFERENTIATION ----------
if
    y = y(x)
then

d/dx[g(y)]
    = g_prime(y) * dy/dx

CHAIN_RULE
    -> essential_to(IMPLICIT_DIFFERENTIATION)

example:
    d/dx[y^n]
        = n*y^(n-1)*dy/dx

# ---------- MULTIVARIABLE CHAIN RULE ----------
if
    z = f(x,y)
    AND x = x(t)
    AND y = y(t)
then

dz/dt
    = partial_f/partial_x * dx/dt
    + partial_f/partial_y * dy/dt

MULTIVARIABLE_CHAIN_RULE
    -> sums(CONTRIBUTIONS_FROM_ALL_DEPENDENCY_PATHS)

# ---------- GENERAL MULTIVARIABLE FORM ----------
if
    z = f(x1, x2, ..., xn)
    AND x_i = x_i(t)
then

dz/dt
    = sum(
        partial_f/partial_x_i
        * dx_i/dt,
        i=1..n
    )

CHAIN_RULE
    -> combines(PARTIAL_DERIVATIVES, VARIABLE_RATES)

# ---------- VECTOR-VALUED FORM ----------
F: R^n -> R^m
G: R^p -> R^n

if
    G differentiable_at(x)
    AND F differentiable_at(G(x))
then

D(F composed_with G)(x)
    = DF(G(x)) composed_with DG(x)

# ---------- JACOBIAN FORM ----------
J_(F composed_with G)(x)
    = J_F(G(x)) * J_G(x)

JACOBIAN_MATRIX_MULTIPLICATION
    -> coordinate_representation_of(CHAIN_RULE)

MATRIX_ORDER
    -> follows(COMPOSITION_ORDER)

# ---------- PARTIAL DERIVATIVE DEPENDENCIES ----------
if
    z = f(u,v)
    AND u = u(x,y)
    AND v = v(x,y)
then

partial_z/partial_x
    = partial_f/partial_u * partial_u/partial_x
    + partial_f/partial_v * partial_v/partial_x

partial_z/partial_y
    = partial_f/partial_u * partial_u/partial_y
    + partial_f/partial_v * partial_v/partial_y

DEPENDENCY_GRAPH
    -> identifies(ALL_PATHS_FROM_INPUT_TO_OUTPUT)

CHAIN_RULE
    -> sums(PRODUCT_OF_DERIVATIVES_ALONG_EACH_PATH)

# ---------- TOTAL DERIVATIVE RELATION ----------
TOTAL_DERIVATIVE
    -> obeys(CHAIN_RULE)

TOTAL_DIFFERENTIAL
    -> propagates_through(COMPOSITE_MAPPING)

CHAIN_RULE
    -> connects(LOCAL_LINEAR_APPROXIMATIONS)

# ---------- RELATED RATES ----------
RELATED_RATES
    -> uses(CHAIN_RULE)

if
    quantities_depend_on(time)
then

differentiate(CONSTRAINT_WITH_RESPECT_TO_TIME)
    -> introduces(TIME_DERIVATIVES)

CHAIN_RULE
    -> connects(RATES_OF_DEPENDENT_QUANTITIES)

# ---------- INVERSE FUNCTION RELATION ----------
if
    y = f(x)
    AND f has_local_differentiable_inverse
    AND f_prime(x) != 0
then

d/dy[f_inverse(y)]
    = 1 / f_prime(f_inverse(y))

INVERSE_DERIVATIVE_RULE
    -> derived_using(CHAIN_RULE)

# ---------- APPLICATIONS ----------
CHAIN_RULE
    -> applied_to(COMPOSITE_FUNCTIONS)
    -> applied_to(IMPLICIT_DIFFERENTIATION)
    -> applied_to(RELATED_RATES)
    -> applied_to(MULTIVARIABLE_CALCULUS)
    -> applied_to(COORDINATE_TRANSFORMATIONS)
    -> applied_to(AUTOMATIC_DIFFERENTIATION)
    -> applied_to(NEURAL_NETWORK_BACKPROPAGATION)

# ---------- RELATION GRAPH ----------
FUNCTION_COMPOSITION
    -> requires(CHAIN_RULE_FOR_DIFFERENTIATION)

INNER_DERIVATIVE
    -> scales(OUTER_DERIVATIVE)

DEPENDENCY_CHAIN
    -> determines(DERIVATIVE_PROPAGATION)

PARTIAL_DERIVATIVES
    -> combine_via(MULTIVARIABLE_CHAIN_RULE)

TOTAL_DERIVATIVES
    -> compose_via(CHAIN_RULE)

JACOBIANS
    -> multiply_via(CHAIN_RULE)

IMPLICIT_DIFFERENTIATION
    -> uses(CHAIN_RULE)

# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
    "chain rule" ~= "derivative rule for function composition",
    "differentiate the outside then multiply by the inside derivative" ~= "informal scalar chain-rule procedure",
    "dependency propagation" ~= "rate-of-change propagation through composite functions",
    "Jacobian chain rule" ~= "matrix representation of composition of total derivatives",
    "multivariable chain rule" ~= "sum of derivative contributions across dependency paths"
}

# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
    composition_order_must_be_preserved: true,
    derivative_evaluation_point_must_follow_inner_function: true,
    scalar_chain_rule_requires_relevant_differentiability: true,
    multivariable_chain_rule_requires_all_dependency_paths: true,
    jacobian_multiplication_order_is_not_commutative: true,
    implicit_differentiation_requires_chain_factors_for_dependent_variables: true
}

# ---------- CONFIDENCE ----------
CONFIDENCE := {
    scalar_chain_rule: 0.99,
    dependency_relation: 0.99,
    nested_composition: 0.99,
    multivariable_chain_rule: 0.99,
    jacobian_form: 0.99,
    implicit_relation: 0.99,
    semantic_equivalence: 0.97
}

# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
    identify(composite_function)
    -> decompose(inner_and_outer_functions)
    -> construct(dependency_graph)
    -> verify(differentiability_conditions)
    -> differentiate(outer_function)
    -> evaluate(outer_derivative_at_inner_output)
    -> differentiate(inner_function)
    -> multiply_or_compose(local_derivatives)
    -> sum(all_dependency_path_contributions_if_multivariable)
    -> preserve(jacobian_order_if_matrix_form)
    -> validate(domain_and_dependency_conditions)
    -> return(semantic_result)

# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
    parse_as: "typed chain-rule dependency graph",
    primary_entity: CHAIN_RULE,
    preserve: [
        composition_order,
        dependency_direction,
        derivative_evaluation_points,
        path_structure,
        jacobian_order,
        differentiability_conditions
    ],
    infer_through: [
        function_composition,
        derivatives,
        partial_derivatives,
        total_derivatives,
        jacobians,
        implicit_differentiation,
        related_rates
    ],
    avoid: [
        omitting_inner_derivative,
        reversing_composition_order,
        evaluating_outer_derivative_at_wrong_argument,
        omitting_dependency_paths,
        commuting_jacobian_products,
        omitting_dy_dx_in_implicit_terms
    ]
}

# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
    validate(new_information)
    -> identify(composition_context)
    -> compare(existing_relations)
    -> preserve(dependency_and_composition_invariants)
    -> update(affected_entities)
    -> update(affected_edges)
    -> recompute(CONFIDENCE)
    -> regenerate(FLOW_HASH)

# ---------- FLOW HASH ----------
FLOW_HASH := hash(
    SOURCE_URL
    + ENTITY
    + CONCEPTS
    + CHAIN_RULE
    + COMPOSITE_FUNCTION
    + DEPENDENCY_CHAIN
    + MULTIVARIABLE_CHAIN_RULE
    + TOTAL_DERIVATIVE
    + JACOBIAN
    + IMPLICIT_DIFFERENTIATION
    + SEMANTIC_EQUIVALENCE
    + CONSTRAINTS
)

# ---------- EXECUTION ----------
INPUT(query)
    -> CHAIN_RULE
    -> COMPOSITION_IDENTIFICATION
    -> INNER_OUTER_DECOMPOSITION
    -> DEPENDENCY_GRAPH_ANALYSIS
    -> DIFFERENTIABILITY_CHECK
    -> SCALAR_OR_MULTIVARIABLE_CLASSIFICATION
    -> DERIVATIVE_PROPAGATION
    -> JACOBIAN_ORDER_ANALYSIS
    -> IMPLICIT_DEPENDENCY_ANALYSIS
    -> RECURSIVE_REASONING(query)
    -> CONFIDENCE
    -> OUTPUT(semantic_result)

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