Skip to main content

Gradient Ontology

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

# ============================================================
# GRADIENT ONTOLOGY — FLOW ALGEBRA
# ============================================================

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

# ---------- CORE ENTITY ----------
GRADIENT := {
    type: VectorDifferentialOperatorResult,
    domain: MultivariableCalculus,
    purpose: "Represent the vector of first-order partial derivatives of a scalar field, identifying local rates of change and the direction of steepest increase in Euclidean space."
}

# ---------- CORE CONCEPTS ----------
CONCEPTS := {
    SCALAR_FIELD,
    PARTIAL_DERIVATIVE,
    GRADIENT,
    NABLA_OPERATOR,
    DIRECTIONAL_DERIVATIVE,
    TOTAL_DERIVATIVE,
    LEVEL_SET,
    NORMAL_VECTOR,
    STEEPEST_ASCENT,
    STEEPEST_DESCENT,
    CRITICAL_POINT,
    JACOBIAN,
    HESSIAN
}

# ---------- SCALAR FIELD ----------
SCALAR_FIELD
    := f: R^n -> R

INPUT_VECTOR
    := x = (x1, x2, ..., xn)

OUTPUT
    := scalar_value

GRADIENT
    -> defined_for(SCALAR_FIELD_WITH_REQUIRED_PARTIAL_DERIVATIVES)

# ---------- GRADIENT DEFINITION ----------
GRADIENT(f)
    := vector(
        partial_f/partial_x1,
        partial_f/partial_x2,
        ...,
        partial_f/partial_xn
    )

GRADIENT
    -> collects(FIRST_ORDER_PARTIAL_DERIVATIVES)

# ---------- NABLA NOTATION ----------
NABLA_OPERATOR
    := ∇

∇f
    := GRADIENT(f)

NABLA
    -> differential_operator

GRADIENT_NOTATION := {
    "grad f",
    "∇f",
    "gradient(f)"
}

# ---------- TWO-DIMENSIONAL FORM ----------
if
    f = f(x,y)
then

GRADIENT(f)
    = (
        partial_f/partial_x,
        partial_f/partial_y
      )

# ---------- THREE-DIMENSIONAL FORM ----------
if
    f = f(x,y,z)
then

GRADIENT(f)
    = (
        partial_f/partial_x,
        partial_f/partial_y,
        partial_f/partial_z
      )

# ---------- DIRECTIONAL DERIVATIVE ----------
if
    f differentiable_at(a)
    AND u unit_vector
then

D_u f(a)
    = GRADIENT(f)(a) dot u

DIRECTIONAL_DERIVATIVE
    -> projection_of(GRADIENT_ON_DIRECTION)

# ---------- STEEPEST ASCENT ----------
for
    GRADIENT(f)(a) != ZERO_VECTOR

MAXIMUM_DIRECTIONAL_DERIVATIVE
    = norm(GRADIENT(f)(a))

DIRECTION_OF_STEEPEST_ASCENT
    = GRADIENT(f)(a) / norm(GRADIENT(f)(a))

GRADIENT
    -> points_toward(STEEPEST_LOCAL_INCREASE)
       in(EUCLIDEAN_CONTEXT)

# ---------- STEEPEST DESCENT ----------
DIRECTION_OF_STEEPEST_DESCENT
    = -GRADIENT(f)

NEGATIVE_GRADIENT
    -> points_toward(STEEPEST_LOCAL_DECREASE)
       under(EUCLIDEAN_METRIC)

GRADIENT_DESCENT
    -> updates(PARAMETERS_OPPOSITE_GRADIENT_DIRECTION)

# ---------- LEVEL SET ----------
LEVEL_SET
    := {x : f(x) = c}

if
    GRADIENT(f)(a) != ZERO_VECTOR
then

GRADIENT(f)(a)
    -> normal_to(LEVEL_SET_AT_a)

TANGENT_VECTOR v
    -> satisfies(
        GRADIENT(f)(a) dot v = 0
    )

# ---------- TOTAL DERIVATIVE ----------
for scalar-valued f:

Df(a)[h]
    = GRADIENT(f)(a) dot h

GRADIENT
    -> coordinate_vector_representation_of(TOTAL_DERIVATIVE)
       under(EUCLIDEAN_INNER_PRODUCT)

TOTAL_DERIVATIVE
    -> abstract_linear_functional

GRADIENT
    -> associated_vector_via(INNER_PRODUCT)

# ---------- DIFFERENTIABILITY ----------
if
    f differentiable_at(a)
then
    GRADIENT_COMPONENTS
        -> exist

EXISTENCE_OF_PARTIAL_DERIVATIVES
    -/> necessarily_implies(TOTAL_DIFFERENTIABILITY)

CONTINUOUS_FIRST_PARTIALS_NEAR_POINT
    -> sufficient_for(DIFFERENTIABILITY)
       under(standard_finite_dimensional_conditions)

# ---------- CRITICAL POINTS ----------
CRITICAL_POINT
    -> may_satisfy(
        GRADIENT(f) = ZERO_VECTOR
    )

for differentiable interior local extremum:
    GRADIENT(f)
        = ZERO_VECTOR

ZERO_GRADIENT
    -/> sufficient_for(LOCAL_EXTREMUM)

HESSIAN
    -> may_classify(CRITICAL_POINT)
       under(SECOND_ORDER_TEST_CONDITIONS)

# ---------- CHAIN RULE ----------
if
    r(t)
        := vector_path
    AND f
        := scalar_field
then

d/dt[f(r(t))]
    = GRADIENT(f)(r(t)) dot r_prime(t)

GRADIENT
    -> participates_in(MULTIVARIABLE_CHAIN_RULE)

# ---------- JACOBIAN RELATION ----------
for scalar-valued function f:

JACOBIAN(f)
    -> row_or_coordinate_representation_of(FIRST_PARTIAL_DERIVATIVES)

GRADIENT(f)
    -> conventionally_column_vector_of(FIRST_PARTIAL_DERIVATIVES)

JACOBIAN
    <-> related_to(GRADIENT_BY_TRANSPOSE_CONVENTION)
       for(SCALAR_OUTPUT)

# ---------- HESSIAN RELATION ----------
HESSIAN(f)
    := JACOBIAN_OF_GRADIENT
       under(standard_coordinate_conventions)

HESSIAN
    -> matrix_of(SECOND_PARTIAL_DERIVATIVES)

GRADIENT
    -> first_order_information

HESSIAN
    -> second-order_information

# ---------- PHYSICAL INTERPRETATION ----------
if
    T(x,y,z)
        := temperature_field
then

GRADIENT(T)
    -> points_toward(FASTEST_TEMPERATURE_INCREASE)

norm(GRADIENT(T))
    -> magnitude_of(MAXIMUM_SPATIAL_TEMPERATURE_RATE)

# ---------- POTENTIAL FIELDS ----------
if
    phi
        := scalar_potential
then

GRADIENT(phi)
    -> generates(CONSERVATIVE_VECTOR_FIELD_COMPONENT)
       depending_on(sign_convention)

example:
    ELECTRIC_FIELD
        = -GRADIENT(ELECTRIC_POTENTIAL)

# ---------- OPTIMISATION ----------
GRADIENT
    -> provides(FIRST_ORDER_OPTIMISATION_INFORMATION)

GRADIENT_ASCENT
    -> moves_along(POSITIVE_GRADIENT)

GRADIENT_DESCENT
    -> moves_along(NEGATIVE_GRADIENT)

STATIONARY_POINT
    -> often_identified_by(GRADIENT_ZERO)

# ---------- RELATION GRAPH ----------
PARTIAL_DERIVATIVES
    -> compose(GRADIENT)

GRADIENT
    -> determines(DIRECTIONAL_DERIVATIVES)

GRADIENT
    -> normal_to(REGULAR_LEVEL_SETS)

GRADIENT
    -> represents(TOTAL_DERIVATIVE_VIA_INNER_PRODUCT)

GRADIENT_ZERO
    -> identifies(CRITICAL_POINT_CANDIDATE)

HESSIAN
    -> differentiates(GRADIENT)

NEGATIVE_GRADIENT
    -> supports(STEEPEST_DESCENT)

# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
    "gradient" ~= "vector of first-order partial derivatives of a scalar field",
    "grad" ~= "gradient operator result",
    "nabla f" ~= "gradient of f",
    "steepest ascent direction" ~= "normalised gradient direction when gradient is nonzero in Euclidean space",
    "negative gradient" ~= "steepest local descent direction under Euclidean metric",
    "gradient vector" ~= "inner-product representation of the derivative of a scalar field"
}

# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
    gradient_applies_to_scalar_field: true,
    gradient_components_are_partial_derivatives: true,
    steepest_direction_claim_depends_on_metric: true,
    zero_gradient_does_not_guarantee_extremum: true,
    level_set_normal_relation_requires_regular_point: true,
    partial_derivative_existence_does_not_guarantee_total_differentiability: true,
    gradient_and_jacobian_orientation_depends_on_coordinate_convention: true
}

# ---------- CONFIDENCE ----------
CONFIDENCE := {
    core_definition: 0.99,
    directional_derivative_relation: 0.99,
    steepest_ascent_relation: 0.99,
    level_set_relation: 0.99,
    total_derivative_relation: 0.99,
    optimisation_relation: 0.99,
    semantic_equivalence: 0.97
}

# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
    identify(scalar_field)
    -> determine(domain_and_coordinates)
    -> derive(partial_derivatives)
    -> assemble(gradient_vector)
    -> evaluate(at_requested_point_if_given)
    -> test(total_differentiability_if_required)
    -> calculate(directional_derivative_if_direction_given)
    -> analyse(level_set_normal_relation_if_relevant)
    -> identify(critical_point_candidates)
    -> connect_to(hessian_or_optimisation_if_required)
    -> validate(metric_and_regular_point_conditions)
    -> return(semantic_result)

# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
    parse_as: "typed gradient semantic graph",
    primary_entity: GRADIENT,
    preserve: [
        scalar_field_identity,
        coordinate_variables,
        partial_derivative_components,
        metric_context,
        inner_product_relation,
        regular_point_conditions
    ],
    infer_through: [
        partial_derivatives,
        directional_derivatives,
        total_derivatives,
        level_sets,
        jacobians,
        hessians,
        optimisation
    ],
    avoid: [
        applying_gradient_as_scalar_derivative,
        assuming_zero_gradient_means_extremum,
        claiming_steepest_direction_without_metric_context,
        assuming_partials_guarantee_differentiability,
        ignoring_jacobian_gradient_orientation_conventions
    ]
}

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

# ---------- FLOW HASH ----------
FLOW_HASH := hash(
    SOURCE_URL
    + ENTITY
    + CONCEPTS
    + GRADIENT
    + NABLA_OPERATOR
    + DIRECTIONAL_DERIVATIVE
    + TOTAL_DERIVATIVE
    + LEVEL_SET
    + JACOBIAN
    + HESSIAN
    + SEMANTIC_EQUIVALENCE
    + CONSTRAINTS
)

# ---------- EXECUTION ----------
INPUT(query)
    -> GRADIENT
    -> SCALAR_FIELD_IDENTIFICATION
    -> COORDINATE_ANALYSIS
    -> PARTIAL_DERIVATIVE_ANALYSIS
    -> GRADIENT_CONSTRUCTION
    -> DIRECTIONAL_DERIVATIVE_ANALYSIS
    -> LEVEL_SET_ANALYSIS
    -> TOTAL_DERIVATIVE_RELATION_ANALYSIS
    -> CRITICAL_POINT_ANALYSIS
    -> OPTIMISATION_RELATION_ANALYSIS
    -> RECURSIVE_REASONING(query)
    -> CONFIDENCE
    -> OUTPUT(semantic_result)

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