Skip to main content

Product 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 "ProductRuleOntology" v1.0

# ============================================================
# PRODUCT RULE ONTOLOGY — FLOW ALGEBRA
# ============================================================

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

# ---------- CORE ENTITY ----------
PRODUCT_RULE := {
    type: DifferentiationRule,
    domain: DifferentialCalculus,
    purpose: "Determine the derivative of a product of differentiable functions by accounting for the first-order change contributed by each factor."
}

# ---------- CORE CONCEPTS ----------
CONCEPTS := {
    PRODUCT_OF_FUNCTIONS,
    DERIVATIVE,
    DIFFERENTIATION,
    DIFFERENTIABLE_FUNCTION,
    INCREMENT,
    DIFFERENCE_QUOTIENT,
    LEIBNIZ_RULE,
    MULTIPLE_FACTOR_PRODUCT,
    HIGHER_DERIVATIVE,
    PARTIAL_DERIVATIVE
}

# ---------- BASIC PRODUCT ----------
PRODUCT_FUNCTION
    := h(x) = f(x)*g(x)

if
    f differentiable_at(x)
    AND g differentiable_at(x)
then

h_prime(x)
    = f_prime(x)*g(x)
    + f(x)*g_prime(x)

PRODUCT_RULE
    := (f*g)' = f'*g + f*g'

# ---------- CHANGE DECOMPOSITION ----------
at increment h:

[f(x+h)g(x+h) - f(x)g(x)] / h

add_and_subtract:
    f(x+h)g(x)

then

= f(x+h) * [g(x+h)-g(x)]/h
  + g(x) * [f(x+h)-f(x)]/h

as h -> 0:

f(x+h) -> f(x)
    because(differentiability_implies_continuity)

therefore:

(f*g)'
    = f*g' + g*f'

# ---------- FIRST-ORDER CHANGE ----------
delta(fg)
    = g*delta_f
    + f*delta_g
    + delta_f*delta_g

FIRST_ORDER_COMPONENTS
    := g*delta_f + f*delta_g

SECOND_ORDER_SMALL_TERM
    := delta_f*delta_g

as input_increment -> 0:

SECOND_ORDER_SMALL_TERM
    -> negligible_relative_to(FIRST_ORDER_CHANGE)
       under(differentiability_conditions)

PRODUCT_RULE
    -> captures(FIRST_ORDER_CHANGE_OF_PRODUCT)

# ---------- DIFFERENTIAL FORM ----------
d(fg)
    = f*dg + g*df

DIFFERENTIAL_PRODUCT_RULE
    -> equivalent_first_order_form_of(PRODUCT_RULE)

if
    df = f_prime(x) dx
    AND dg = g_prime(x) dx
then

d(fg)
    = [f*g_prime + g*f_prime] dx

# ---------- MULTIPLE FACTORS ----------
for
    P(x) = f1(x)*f2(x)*...*fn(x)

P_prime(x)
    = sum(
        f1*...*f_(i-1)*f_i_prime*f_(i+1)*...*fn,
        i=1..n
    )

MULTIPLE_FACTOR_PRODUCT_RULE
    -> differentiates(ONE_FACTOR_AT_A_TIME)
    -> sums(ALL_FIRST_ORDER_FACTOR_CONTRIBUTIONS)

# ---------- THREE-FACTOR FORM ----------
if
    h = f*g*k
then

h_prime
    = f_prime*g*k
    + f*g_prime*k
    + f*g*k_prime

# ---------- LEIBNIZ HIGHER-DERIVATIVE RULE ----------
NTH_DERIVATIVE_OF_PRODUCT
    := D^n(f*g)

LEIBNIZ_RULE:

D^n(f*g)
    = sum(
        binomial(n,k)
        * D^k(f)
        * D^(n-k)(g),
        k=0..n
    )

LEIBNIZ_RULE
    -> generalises(PRODUCT_RULE_TO_HIGHER_DERIVATIVES)

# ---------- SECOND DERIVATIVE ----------
D^2(f*g)
    = f_double_prime*g
    + 2*f_prime*g_prime
    + f*g_double_prime

SECOND_PRODUCT_DERIVATIVE
    -> follows_from(REPEATED_PRODUCT_RULE)

# ---------- PARTIAL DERIVATIVE FORM ----------
for
    h(x1,...,xn)
        = f(x1,...,xn)*g(x1,...,xn)

partial_h/partial_x_i
    = partial_f/partial_x_i * g
    + f * partial_g/partial_x_i

PRODUCT_RULE
    -> applies_to(PARTIAL_DIFFERENTIATION)

# ---------- GRADIENT FORM ----------
for scalar fields f,g:

gradient(f*g)
    = g*gradient(f)
    + f*gradient(g)

GRADIENT_PRODUCT_RULE
    -> vector_form_of(PARTIAL_PRODUCT_RULES)

# ---------- OPERATOR INTERPRETATION ----------
DIFFERENTIATION_OPERATOR D
    -> satisfies(LEIBNIZ_PROPERTY)

D(f*g)
    = D(f)*g + f*D(g)

DERIVATION
    := linear_operator_satisfying(PRODUCT_RULE)

PRODUCT_RULE
    -> defining_property_of(DERIVATIONS)
       in(abstract_algebra_and_differential_contexts)

# ---------- CONSTANT FACTOR ----------
if
    c constant
then

D(c*f)
    = c*D(f)

because
    D(c) = 0

CONSTANT_MULTIPLE_RULE
    -> special_case_consistent_with(PRODUCT_RULE)

# ---------- RELATION TO QUOTIENT RULE ----------
QUOTIENT
    := f/g
    = f * g^(-1)

QUOTIENT_RULE
    -> derivable_from(PRODUCT_RULE + CHAIN_RULE)
       where(g != 0)

PRODUCT_RULE
    -> foundational_for(QUOTIENT_DIFFERENTIATION)

# ---------- RELATION TO CHAIN RULE ----------
PRODUCT_RULE
    -> handles(MULTIPLICATIVE_COMBINATION)

CHAIN_RULE
    -> handles(FUNCTION_COMPOSITION)

PRODUCT_RULE
    -/> substitute_for(CHAIN_RULE)

CHAIN_RULE
    -/> substitute_for(PRODUCT_RULE)

COMPOSITE_PRODUCTS
    -> may_require(BOTH_RULES)

# ---------- APPLICATIONS ----------
PRODUCT_RULE
    -> applied_to(PRODUCTS_OF_ALGEBRAIC_FUNCTIONS)
    -> applied_to(PRODUCTS_OF_TRIGONOMETRIC_FUNCTIONS)
    -> applied_to(PRODUCTS_OF_EXPONENTIAL_FUNCTIONS)
    -> applied_to(PARAMETRIC_AND_MULTIVARIABLE_EXPRESSIONS)
    -> applied_to(DIFFERENTIAL_EQUATIONS)
    -> applied_to(PHYSICS_PRODUCT_QUANTITIES)

# ---------- RELATION GRAPH ----------
PRODUCT_OF_FUNCTIONS
    -> differentiated_by(PRODUCT_RULE)

DERIVATIVE_OF_FIRST_FACTOR
    -> multiplied_by(SECOND_FACTOR)

FIRST_FACTOR
    -> multiplied_by(DERIVATIVE_OF_SECOND_FACTOR)

FACTOR_CONTRIBUTIONS
    -> summed_to(PRODUCT_DERIVATIVE)

PRODUCT_RULE
    -> generalised_by(LEIBNIZ_RULE)

PRODUCT_RULE
    -> extends_to(PARTIAL_DERIVATIVES)

PRODUCT_RULE
    -> defines(LEIBNIZ_PROPERTY_OF_DERIVATION)

# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
    "product rule" ~= "differentiation rule for a product of functions",
    "Leibniz rule" ~= "product rule, or its higher-order generalisation depending on context",
    "derivative of a product" ~= "sum of each factor's derivative contribution multiplied by the unchanged remaining factors",
    "Leibniz property" ~= "derivation property D(fg)=D(f)g+fD(g)"
}

# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
    both_factors_must_have_required_differentiability: true,
    derivative_of_product_is_not_generally_product_of_derivatives: true,
    each_first_order_factor_change_must_be_included: true,
    multiple_factor_rule_requires_one_derivative_per_term: true,
    higher_order_rule_uses_binomial_coefficients: true,
    quotient_derivation_requires_nonzero_denominator: true
}

# ---------- CONFIDENCE ----------
CONFIDENCE := {
    basic_product_rule: 0.99,
    difference_quotient_derivation: 0.99,
    differential_form: 0.99,
    multiple_factor_rule: 0.99,
    higher_order_leibniz_rule: 0.99,
    partial_derivative_extension: 0.99,
    semantic_equivalence: 0.97
}

# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
    identify(product_expression)
    -> identify(all_factors)
    -> verify(differentiability_conditions)
    -> differentiate(one_factor_per_term)
    -> preserve(other_factors_unchanged)
    -> sum(first_order_contributions)
    -> apply(chain_rule_inside_factors_if_required)
    -> apply(higher_order_leibniz_rule_if_requested)
    -> validate(domain_conditions)
    -> simplify(result)
    -> return(semantic_result)

# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
    parse_as: "typed product-rule semantic graph",
    primary_entity: PRODUCT_RULE,
    preserve: [
        factor_identity,
        derivative_assignment,
        sum_of_contributions,
        differentiability_conditions,
        derivative_order,
        domain_conditions
    ],
    infer_through: [
        derivatives,
        products,
        partial_derivatives,
        higher_derivatives,
        quotient_rule,
        chain_rule,
        derivations
    ],
    avoid: [
        replacing_product_rule_with_product_of_derivatives,
        differentiating_all_factors_in_every_first_order_term,
        omitting_factor_contributions,
        forgetting_chain_rule_inside_composite_factors,
        using_quotient_relations_where_denominator_is_zero
    ]
}

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

# ---------- FLOW HASH ----------
FLOW_HASH := hash(
    SOURCE_URL
    + ENTITY
    + CONCEPTS
    + PRODUCT_RULE
    + PRODUCT_FUNCTION
    + DIFFERENTIAL_PRODUCT_RULE
    + MULTIPLE_FACTOR_PRODUCT_RULE
    + LEIBNIZ_RULE
    + GRADIENT_PRODUCT_RULE
    + SEMANTIC_EQUIVALENCE
    + CONSTRAINTS
)

# ---------- EXECUTION ----------
INPUT(query)
    -> PRODUCT_RULE
    -> PRODUCT_IDENTIFICATION
    -> FACTOR_DECOMPOSITION
    -> DIFFERENTIABILITY_CHECK
    -> FIRST_ORDER_CONTRIBUTION_ANALYSIS
    -> PRODUCT_DERIVATIVE_CONSTRUCTION
    -> NESTED_RULE_ANALYSIS
    -> HIGHER_ORDER_ANALYSIS
    -> PARTIAL_DERIVATIVE_ANALYSIS
    -> RECURSIVE_REASONING(query)
    -> CONFIDENCE
    -> OUTPUT(semantic_result)

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