flow "ContourIntegrationOntology" v1.0
# ============================================================
# CONTOUR INTEGRATION ONTOLOGY — FLOW ALGEBRA
# ============================================================
SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/complex-analysis/contour-integration-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Complex Analysis"
ENTITY := "Contour Integration"
# ---------- CORE ENTITY ----------
CONTOUR_INTEGRATION := {
type: ComplexIntegrationMethod,
domain: ComplexAnalysis,
purpose: "Represent integration of complex-valued functions along oriented curves in the complex plane, forming the basis of Cauchy theory, residue methods and many complex integral evaluations."
}
# ---------- CORE CONCEPTS ----------
CONCEPTS := {
CONTOUR,
PARAMETERISATION,
ORIENTATION,
COMPLEX_LINE_INTEGRAL,
CLOSED_CONTOUR,
SIMPLE_CONTOUR,
HOLOMORPHIC_FUNCTION,
PRIMITIVE,
PATH_INDEPENDENCE,
CAUCHY_INTEGRAL_THEOREM,
CAUCHY_INTEGRAL_FORMULA,
RESIDUE_THEOREM,
WINDING_NUMBER,
ESTIMATION_LEMMA
}
# ---------- CONTOUR ----------
CONTOUR
:= gamma:[a,b] -> C
gamma(t)
-> COMPLEX_POSITION
gamma
-> continuous
-> usually_piecewise_C1
CONTOUR
-> oriented_by(INCREASING_PARAMETER)
# ---------- PARAMETERISATION ----------
gamma(t)
=
x(t)
+
i*y(t)
gamma_prime(t)
=
x_prime(t)
+
i*y_prime(t)
PARAMETERISATION
-> converts(COMPLEX_PATH_TO_REAL_PARAMETER_INTERVAL)
# ---------- CONTOUR INTEGRAL ----------
for
f defined_on_image(gamma)
integral_gamma(
f(z) dz
)
:=
integral_from_a_to_b(
f(gamma(t))
* gamma_prime(t)
dt
)
COMPLEX_CONTOUR_INTEGRAL
-> PARAMETERISED_LINE_INTEGRAL
# ---------- REAL / IMAGINARY DECOMPOSITION ----------
if
f(z)
=
u(x,y)+i*v(x,y)
and
dz
=
dx+i*dy
then
f(z)dz
=
(u dx - v dy)
+
i(
v dx + u dy
)
CONTOUR_INTEGRAL
-> pair_of(REAL_LINE_INTEGRALS)
# ---------- REPARAMETERISATION ----------
if
phi:[c,d] -> [a,b]
is_orientation_preserving_smooth_bijection
then
gamma composed_with phi
-> same_oriented_contour
and
integral_(gamma composed_with phi)(f dz)
=
integral_gamma(f dz)
ORIENTATION_PRESERVING_REPARAMETERISATION
-> leaves(INTEGRAL_UNCHANGED)
# ---------- REVERSE ORIENTATION ----------
define
-gamma
-> same_curve_with_reverse_orientation
then
integral_(-gamma)(
f(z) dz
)
=
-
integral_gamma(
f(z) dz
)
ORIENTATION
-> controls(SIGN)
# ---------- CONCATENATION ----------
if
gamma_1 ends_where gamma_2 begins
then
gamma_1 * gamma_2
-> CONCATENATED_CONTOUR
integral_(gamma_1*gamma_2)(f dz)
=
integral_gamma1(f dz)
+
integral_gamma2(f dz)
CONTOUR_INTEGRAL
-> additive_under(PATH_CONCATENATION)
# ---------- CLOSED CONTOUR ----------
gamma
-> CLOSED
if
gamma(a)
=
gamma(b)
notation:
closed_integral_gamma(
f(z) dz
)
CLOSED_CONTOUR
-> central_to(CAUCHY_AND_RESIDUE_THEORY)
# ---------- SIMPLE CONTOUR ----------
SIMPLE_CONTOUR
-> no_self_intersections
except(possible_common_start_end_for_closed_curve)
SIMPLE_CLOSED_CONTOUR
-> bounds(INTERIOR_REGION)
under(JORDAN_CURVE_CONTEXT)
# ---------- STANDARD CIRCLE ----------
for circle centred at z0
radius R:
gamma(t)
=
z0
+
R*e^(i*t)
0 <= t <= 2*pi
gamma_prime(t)
=
i*R*e^(i*t)
CIRCLE_CONTOUR
-> standard_positive_orientation(COUNTERCLOCKWISE)
# ---------- PRIMITIVE ----------
F
-> primitive_of(f)
if
F_prime(z)
=
f(z)
on domain D
then
integral_gamma(
f(z) dz
)
=
F(gamma(b))
-
F(gamma(a))
COMPLEX_FUNDAMENTAL_THEOREM_FOR_LINE_INTEGRALS
-> path_independence_when(PRIMITIVE_EXISTS)
# ---------- PATH INDEPENDENCE ----------
if
f has_primitive_on(D)
then
integral_from_z0_to_z1(
f(z) dz
)
-> independent_of(path_in_D)
and
every_closed_contour_integral
= 0
PATH_INDEPENDENCE
-> equivalent_to(PRIMITIVE_EXISTENCE)
under(APPROPRIATE_DOMAIN_CONDITIONS)
# ---------- CAUCHY INTEGRAL THEOREM ----------
if
f holomorphic
on simply_connected_domain_D
then
for every closed piecewise smooth contour gamma in D:
closed_integral_gamma(
f(z) dz
)
= 0
CAUCHY_INTEGRAL_THEOREM
-> holomorphy_plus_topology_controls(CONTOUR_INTEGRAL)
# ---------- HOMOTOPY FORM ----------
if
f holomorphic_on(D)
and
gamma_0
homotopic_to
gamma_1
within D
with fixed endpoints
then
integral_gamma0(f dz)
=
integral_gamma1(f dz)
HOMOTOPY_INVARIANCE
-> underlies(PATH_DEFORMATION)
# ---------- CAUCHY INTEGRAL FORMULA ----------
if
f holomorphic
on neighbourhood_of(simple_closed_contour_C_and_interior)
and
z0 inside C
then
f(z0)
=
1/(2*pi*i)
*
closed_integral_C(
f(z)/(z-z0)
dz
)
CAUCHY_FORMULA
-> reconstructs(FUNCTION_FROM_BOUNDARY_INTEGRAL)
# ---------- GENERAL CAUCHY FORMULA ----------
for suitable closed contour gamma:
closed_integral_gamma(
f(z)/(z-z0)
dz
)
=
2*pi*i
*
Ind(gamma,z0)
*
f(z0)
WINDING_NUMBER
-> counts(ORIENTED_ENCIRCLEMENT)
# ---------- HIGHER DERIVATIVES ----------
f^(n)(z0)
=
n!/(2*pi*i)
*
closed_integral_C(
f(z)/(z-z0)^(n+1)
dz
)
CONTOUR_INTEGRATION
-> determines(HIGHER_COMPLEX_DERIVATIVES)
# ---------- ESTIMATION LEMMA ----------
if
|f(z)| <= M
on contour gamma
and
length(gamma)=L
then
abs(
integral_gamma(
f(z) dz
)
)
<=
M*L
ML_INEQUALITY
~= ESTIMATION_LEMMA
ESTIMATION
-> controls(CONTOUR_SEGMENT_CONTRIBUTIONS)
# ---------- SINGULARITIES ----------
if
f holomorphic_except_at(isolated_singularities)
then
closed_contour_integral
-> may_depend_on(ENCLOSED_SINGULARITIES)
SINGULARITIES
-> obstruct(PATH_DEFORMATION_ACROSS_THEM)
# ---------- RESIDUE THEOREM ----------
if
f meromorphic
inside_and_on(C)
with no poles_on(C)
then
closed_integral_C(
f(z) dz
)
=
2*pi*i
*
sum(
residues_inside_C
)
RESIDUE_THEOREM
-> evaluates(CONTOUR_INTEGRALS_BY_LOCAL_SINGULARITY_DATA)
# ---------- WINDING NUMBER ----------
Ind(gamma,z0)
:=
1/(2*pi*i)
*
closed_integral_gamma(
1/(z-z0)
dz
)
WINDING_NUMBER
-> integer_for_closed_contours_avoiding(z0)
WINDING_NUMBER
-> orientation_sensitive
# ---------- DEFORMATION ----------
CONTOUR_DEFORMATION
-> allowed_when(NO_SINGULARITY_CROSSED)
DEFORMED_CONTOURS
-> same_integral
for(HOLOMORPHIC_INTEGRAND_IN_INTERVENING_REGION)
TOPOLOGY
-> controls(ALLOWED_DEFORMATIONS)
# ---------- KEYHOLE CONTOUR ----------
KEYHOLE_CONTOUR
-> used_for(BRANCH_POINT_INTEGRALS)
BRANCH_CUT
-> prevents(CROSSING_MULTIVALUED_DISCONTINUITY)
CONTOUR_INTEGRATION
-> must_preserve(BRANCH_CHOICE)
# ---------- SEMICIRCULAR CONTOUR ----------
SEMICIRCLE_CONTOUR
-> often_used_for(REAL_IMPROPER_INTEGRALS)
REAL_AXIS_SEGMENT
+ LARGE_ARC
-> CLOSED_CONTOUR
ESTIMATION_LEMMA
-> may_show(ARC_CONTRIBUTION_VANISHES)
# ---------- INDENTED CONTOUR ----------
if
pole_on_real_axis_or_path
INDENTATION
-> detours_around(SINGULARITY)
STANDARD_RESIDUE_THEOREM
-/> directly_applies_to(SINGULARITY_ON_CONTOUR)
CAUCHY_PRINCIPAL_VALUE
-> may_require(INDENTATION_LIMIT)
# ---------- REAL INTEGRAL EVALUATION ----------
procedure:
identify(real_integral)
-> extend_integrand_to_complex_function
-> choose(contour)
-> locate(singularities)
-> compute(residues)
-> apply(residue_theorem)
-> estimate(nonreal_contour_segments)
-> take(limit)
-> recover(real_integral)
CONTOUR_INTEGRATION
-> converts(REAL_INTEGRAL_TO_COMPLEX_GEOMETRIC_PROBLEM)
# ---------- APPLICATIONS ----------
CONTOUR_INTEGRATION
-> applied_to(RESIDUE_CALCULUS)
-> applied_to(REAL_INTEGRAL_EVALUATION)
-> applied_to(FOURIER_TRANSFORMS)
-> applied_to(INVERSE_LAPLACE_TRANSFORMS)
-> applied_to(SPECIAL_FUNCTIONS)
-> applied_to(DIFFERENTIAL_EQUATIONS)
-> applied_to(MATHEMATICAL_PHYSICS)
# ---------- RELATION GRAPH ----------
CONTOUR
-> parameterised_by(REAL_INTERVAL)
PARAMETERISATION
-> defines(CONTOUR_INTEGRAL)
ORIENTATION
-> determines(INTEGRAL_SIGN)
HOLOMORPHIC_FUNCTION
+ SIMPLY_CONNECTED_DOMAIN
-> CLOSED_INTEGRAL_ZERO
CAUCHY_INTEGRAL_FORMULA
-> evaluates(INTERIOR_FUNCTION_VALUES)
SINGULARITIES
-> contribute_via(RESIDUES)
WINDING_NUMBER
-> weights(SINGULARITY_CONTRIBUTION)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
"contour integration" ~= "integration of complex functions along oriented curves",
"complex line integral" ~= "contour integral",
"closed contour integral" ~= "complex integral over a path whose endpoints coincide",
"ML inequality" ~= "contour integral estimate by maximum integrand magnitude times path length",
"winding number" ~= "oriented number of times a closed contour surrounds a point",
"contour deformation" ~= "path modification preserving integral when no singularity is crossed"
}
# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
contour_integral_depends_on_orientation: true,
orientation_preserving_reparameterisation_preserves_integral: true,
cauchy_theorem_requires_holomorphy_and_relevant_domain_topology: true,
contour_deformation_cannot_cross_unaccounted_singularities: true,
residue_theorem_requires_no_singularity_on_contour: true,
branch_dependent_integrands_require_consistent_branch_choice: true,
principal_value_integrals_require_special_limit_handling: true
}
# ---------- CONFIDENCE ----------
CONFIDENCE := {
core_definition: 0.99,
parameterisation_relation: 0.99,
orientation_relation: 0.99,
cauchy_theorem_relation: 0.99,
residue_relation: 0.99,
winding_deformation_relation: 0.99,
semantic_equivalence: 0.97
}
# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
identify(integrand_and_contour)
-> identify(parameterisation_and_orientation)
-> identify(domain_and_singularities)
-> determine(whether_primitive_or_cauchy_theorem_applies)
-> determine(winding_numbers_if_closed)
-> choose(direct_parameterisation_cauchy_formula_or_residue_method)
-> compute(contour_integral)
-> estimate(auxiliary_segments_if_present)
-> handle(branch_cuts_or_indentations_if_required)
-> validate(no_unhandled_singularity_on_path)
-> return(semantic_result)
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
parse_as: "typed contour-integration semantic graph",
primary_entity: CONTOUR_INTEGRATION,
preserve: [
integrand,
contour,
parameterisation,
orientation,
endpoints,
domain,
singularities,
branch_choice
],
infer_through: [
line_integrals,
primitives,
path_independence,
cauchy_theorems,
winding_numbers,
residues,
contour_deformation,
estimation_lemma
],
avoid: [
ignoring_orientation,
changing_parameterisation_with orientation reversal unnoticed,
applying_cauchy_theorem_across holes_or_singularities,
crossing_singularities_during deformation,
applying_residue_theorem_with singularity_on contour,
ignoring_branch_cut_structure
]
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
validate(new_information)
-> identify(contour_integration_context)
-> compare(existing_relations)
-> preserve(path_orientation_domain_and_singularity_invariants)
-> update(affected_entities)
-> update(affected_edges)
-> recompute(CONFIDENCE)
-> regenerate(FLOW_HASH)
# ---------- FLOW HASH ----------
FLOW_HASH := hash(
SOURCE_URL
+ ENTITY
+ CONCEPTS
+ CONTOUR_INTEGRATION
+ CONTOUR
+ PARAMETERISATION
+ ORIENTATION
+ CAUCHY_INTEGRAL_THEOREM
+ CAUCHY_INTEGRAL_FORMULA
+ RESIDUE_THEOREM
+ WINDING_NUMBER
+ ESTIMATION_LEMMA
+ SEMANTIC_EQUIVALENCE
+ CONSTRAINTS
)
# ---------- EXECUTION ----------
INPUT(query)
-> CONTOUR_INTEGRATION
-> INTEGRAND_CONTOUR_IDENTIFICATION
-> PARAMETERISATION_ORIENTATION_ANALYSIS
-> DOMAIN_SINGULARITY_ANALYSIS
-> PRIMITIVE_CAUCHY_APPLICABILITY_ANALYSIS
-> WINDING_NUMBER_ANALYSIS
-> METHOD_SELECTION
-> INTEGRAL_COMPUTATION
-> AUXILIARY_SEGMENT_ESTIMATION
-> BRANCH_INDENTATION_ANALYSIS
-> PATH_VALIDATION
-> RECURSIVE_REASONING(query)
-> CONFIDENCE
-> OUTPUT(semantic_result)
END FLOW
Download Code
Copy to Clipboard