Skip to main content

Contour Integral Ontology

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

# ============================================================
# CONTOUR INTEGRAL ONTOLOGY — FLOW ALGEBRA
# ============================================================

SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/integral-calculus/contour-integral-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Integral Calculus"
ENTITY := "Contour Integral"

# ---------- CORE ENTITY ----------
CONTOUR_INTEGRAL := {
    type: ComplexLineIntegral,
    domain: ComplexAnalysis,
    purpose: "Represent integration of a complex-valued function along an oriented curve or contour in the complex plane."
}

# ---------- CORE CONCEPTS ----------
CONCEPTS := {
    CONTOUR_INTEGRAL,
    COMPLEX_FUNCTION,
    COMPLEX_PLANE,
    CONTOUR,
    PARAMETERISATION,
    ORIENTATION,
    COMPLEX_DIFFERENTIAL,
    CLOSED_CONTOUR,
    HOLOMORPHIC_FUNCTION,
    CAUCHY_INTEGRAL_THEOREM,
    CAUCHY_INTEGRAL_FORMULA,
    RESIDUE,
    RESIDUE_THEOREM
}

# ---------- CONTOUR STRUCTURE ----------
CONTOUR
    := gamma(t)

where
    t in [a,b]

gamma(t)
    -> COMPLEX_VALUED_PATH

gamma_prime(t)
    -> COMPLEX_TANGENT_DERIVATIVE

CONTOUR
    -> oriented_by(INCREASING_PARAMETER)

# ---------- BASIC DEFINITION ----------
for
    complex_function f(z)

CONTOUR_INTEGRAL
    := integral_gamma(
        f(z) dz
    )

under parameterisation
    z = gamma(t)

integral_gamma(f(z) dz)
    =
integral_from_a_to_b(
    f(gamma(t))
    * gamma_prime(t)
    dt
)

CONTOUR_INTEGRAL
    -> reduces_to(PARAMETER_INTEGRAL)

# ---------- COMPLEX DIFFERENTIAL ----------
z
    = x + i*y

dz
    = dx + i*dy

COMPLEX_DIFFERENTIAL
    -> follows(CONTOUR_DIRECTION)

CONTOUR_INTEGRAL
    -> accumulates(COMPLEX_FUNCTION_ALONG_ORIENTED_PATH)

# ---------- REAL AND IMAGINARY DECOMPOSITION ----------
if
    f(z)
        = u(x,y) + i*v(x,y)
then

f(z) dz
    =
(u dx - v dy)
+
i(v dx + u dy)

CONTOUR_INTEGRAL
    -> decomposes_into(REAL_LINE_INTEGRALS)

# ---------- ORIENTATION ----------
if
    reverse(gamma)
then

integral_reverse_gamma(f(z) dz)
    =
-integral_gamma(f(z) dz)

CONTOUR_INTEGRAL
    -> orientation_dependent

POSITIVE_ORIENTATION
    -> conventionally(COUNTERCLOCKWISE_FOR_SIMPLE_CLOSED_CONTOURS)

# ---------- REPARAMETERISATION ----------
ORIENTATION_PRESERVING_REPARAMETERISATION
    -> preserves(CONTOUR_INTEGRAL)

ORIENTATION_REVERSING_REPARAMETERISATION
    -> reverses_sign(CONTOUR_INTEGRAL)

CONTOUR_INTEGRAL
    -> geometric_path_quantity
       subject_to(ORIENTATION)

# ---------- CLOSED CONTOUR ----------
CLOSED_CONTOUR
    -> start_point_equals(end_point)

CLOSED_CONTOUR_INTEGRAL
    := integral_closed_gamma(
        f(z) dz
    )

CLOSED_CONTOUR
    -> central_to(COMPLEX_ANALYSIS_THEOREMS)

# ---------- PRIMITIVE / ANTIDERIVATIVE ----------
if
    F_prime(z) = f(z)
    throughout(domain_containing_contour)
then

integral_gamma(
    f(z) dz
)
    =
F(gamma(b))
-
F(gamma(a))

PRIMITIVE
    -> implies(PATH_INDEPENDENCE)
       within(appropriate_domain)

# ---------- CAUCHY INTEGRAL THEOREM ----------
if
    f holomorphic_on_and_inside(CLOSED_CONTOUR)
    under(appropriate_domain_conditions)
then

integral_closed_gamma(
    f(z) dz
)
    = 0

CAUCHY_INTEGRAL_THEOREM
    -> establishes(VANISHING_CLOSED_CONTOUR_INTEGRAL)

# ---------- CAUCHY INTEGRAL FORMULA ----------
if
    f holomorphic_on_and_inside(gamma)
    AND z0 inside(gamma)
then

f(z0)
    =
1/(2*pi*i)
*
integral_closed_gamma(
    f(z)/(z-z0) dz
)

CAUCHY_INTEGRAL_FORMULA
    -> recovers(INTERIOR_FUNCTION_VALUE_FROM_BOUNDARY_VALUES)

# ---------- HIGHER DERIVATIVE FORMULA ----------
if
    f holomorphic
then

f^(n)(z0)
    =
n!/(2*pi*i)
*
integral_closed_gamma(
    f(z)/(z-z0)^(n+1)
    dz
)

CONTOUR_INTEGRAL
    -> encodes(HOLOMORPHIC_DERIVATIVES)

# ---------- SINGULARITIES ----------
SINGULARITY
    -> point_where(FUNCTION_FAILS_TO_BE_HOLOMORPHIC)

ISOLATED_SINGULARITY
    -> may_be(REMOVABLE)
    -> may_be(POLE)
    -> may_be(ESSENTIAL)

CONTOUR_INTEGRAL
    -> sensitive_to(SINGULARITIES_ENCLOSED_BY_CONTOUR)

# ---------- RESIDUE ----------
RESIDUE(f,z0)
    -> coefficient_of((z-z0)^(-1))
       in(LAURENT_SERIES)

RESIDUE
    -> local_complex_quantity_associated_with(ISOLATED_SINGULARITY)

# ---------- RESIDUE THEOREM ----------
if
    f meromorphic_inside_and_on(gamma)
    AND singularities z_k are isolated_inside(gamma)
    AND no_singularity_lies_on(gamma)
then

integral_closed_gamma(
    f(z) dz
)
    =
2*pi*i
*
sum(
    RESIDUE(f,z_k)
)

RESIDUE_THEOREM
    -> converts(CONTOUR_INTEGRAL, SUM_OF_RESIDUES)

# ---------- WINDING NUMBER ----------
WINDING_NUMBER
    -> counts(SIGNED_WRAPPING_OF_CONTOUR_AROUND_POINT)

generalised_residue_relation:

integral_gamma(
    f(z) dz
)
    =
2*pi*i
*
sum(
    winding_number(gamma,z_k)
    * residue(f,z_k)
)

under(appropriate_conditions)

# ---------- ESTIMATION LEMMA ----------
ML_ESTIMATE:

abs(
    integral_gamma(
        f(z) dz
    )
)
    <=
M * L

where
    M >= maximum_of(abs(f(z))) on(gamma)
    L = length(gamma)

ESTIMATION_LEMMA
    -> bounds(CONTOUR_INTEGRAL_MAGNITUDE)

# ---------- APPLICATIONS ----------
CONTOUR_INTEGRAL
    -> applied_to(COMPLEX_ANALYSIS)
    -> applied_to(REAL_INTEGRAL_EVALUATION)
    -> applied_to(FOURIER_ANALYSIS)
    -> applied_to(LAPLACE_TRANSFORMS)
    -> applied_to(GREEN_FUNCTIONS)
    -> applied_to(PHYSICS)
    -> applied_to(RESIDUE_CALCULATIONS)

# ---------- RELATION GRAPH ----------
CONTOUR
    -> parameterised_by(gamma)

PARAMETERISATION
    -> converts(CONTOUR_INTEGRAL_TO_REAL_PARAMETER_INTEGRAL)

ORIENTATION
    -> determines(SIGN)

HOLOMORPHICITY
    -> enables(CAUCHY_THEOREMS)

CLOSED_CONTOUR
    -> encloses(SINGULARITIES)

SINGULARITIES
    -> contribute(RESIDUES)

RESIDUE_THEOREM
    -> evaluates(CLOSED_CONTOUR_INTEGRAL)

# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
    "contour integral" ~= "complex line integral along an oriented contour",
    "complex path integral" ~= "contour integral",
    "closed contour integral" ~= "complex integral around a closed oriented path",
    "residue" ~= "coefficient of the minus-one Laurent term at an isolated singularity",
    "Cauchy integral formula" ~= "boundary contour representation of interior holomorphic function values",
    "ML estimate" ~= "upper bound based on maximum integrand magnitude and contour length"
}

# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
    contour_requires_valid_piecewise_smooth_parameterisation: true,
    contour_integral_depends_on_orientation: true,
    reparameterisation_must_preserve_orientation_for_same_value: true,
    cauchy_theorems_require_holomorphicity_and_domain_conditions: true,
    residue_theorem_requires_singularities_not_on_contour: true,
    enclosed_singularities_and_winding_numbers_must_be_accounted_for: true,
    contour_integral_is_not_an_area_integral: true
}

# ---------- CONFIDENCE ----------
CONFIDENCE := {
    core_definition: 0.99,
    parameterisation_relation: 0.99,
    orientation_relation: 0.99,
    cauchy_theorem_relation: 0.99,
    cauchy_formula_relation: 0.99,
    residue_theorem_relation: 0.99,
    semantic_equivalence: 0.97
}

# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
    identify(complex_function)
    -> identify(contour)
    -> determine(parameterisation)
    -> determine(orientation)
    -> identify(singularities)
    -> classify(open_or_closed_contour)
    -> test(holomorphicity_and_domain_conditions)
    -> choose(parameter_integration_or_cauchy_or_residue_method)
    -> compute(winding_numbers_if_required)
    -> evaluate(contour_integral)
    -> validate(singularity_and_orientation_conditions)
    -> return(semantic_result)

# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
    parse_as: "typed contour-integral semantic graph",
    primary_entity: CONTOUR_INTEGRAL,
    preserve: [
        complex_function,
        contour_parameterisation,
        orientation,
        closed_open_status,
        singularity_locations,
        winding_numbers,
        holomorphicity_conditions
    ],
    infer_through: [
        complex_functions,
        primitives,
        cauchy_theorem,
        cauchy_integral_formula,
        residues,
        residue_theorem,
        winding_numbers
    ],
    avoid: [
        ignoring_orientation,
        applying_cauchy_theorem_with enclosed singularities,
        applying_residue_theorem_when singularity lies on contour,
        omitting_winding_number_for_non_simple_contours,
        confusing_contour_integral_with_real_area_integral,
        assuming_path_independence_without primitive_or_domain_conditions
    ]
}

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

# ---------- FLOW HASH ----------
FLOW_HASH := hash(
    SOURCE_URL
    + ENTITY
    + CONCEPTS
    + CONTOUR_INTEGRAL
    + CONTOUR
    + CLOSED_CONTOUR
    + CAUCHY_INTEGRAL_THEOREM
    + CAUCHY_INTEGRAL_FORMULA
    + RESIDUE
    + RESIDUE_THEOREM
    + WINDING_NUMBER
    + SEMANTIC_EQUIVALENCE
    + CONSTRAINTS
)

# ---------- EXECUTION ----------
INPUT(query)
    -> CONTOUR_INTEGRAL
    -> FUNCTION_IDENTIFICATION
    -> CONTOUR_IDENTIFICATION
    -> PARAMETERISATION_ANALYSIS
    -> ORIENTATION_ANALYSIS
    -> SINGULARITY_ANALYSIS
    -> HOLOMORPHICITY_ANALYSIS
    -> METHOD_SELECTION
    -> WINDING_NUMBER_ANALYSIS
    -> INTEGRATION_EXECUTION
    -> THEOREM_VALIDATION
    -> RECURSIVE_REASONING(query)
    -> CONFIDENCE
    -> OUTPUT(semantic_result)

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