flow "ResidueTheoryOntology" v1.0
# ============================================================
# RESIDUE THEORY ONTOLOGY — FLOW ALGEBRA
# ============================================================
SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/complex-analysis/residue-theory-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Complex Analysis"
ENTITY := "Residue Theory"
# ---------- CORE ENTITY ----------
RESIDUE_THEORY := {
type: ComplexAnalysisTheory,
domain: ComplexAnalysis,
purpose: "Represent the theory of residues of meromorphic functions and their use in evaluating contour integrals through local information at isolated singularities."
}
# ---------- CORE CONCEPTS ----------
CONCEPTS := {
RESIDUE,
RESIDUE_THEOREM,
MEROMORPHIC_FUNCTION,
ISOLATED_SINGULARITY,
LAURENT_SERIES,
SIMPLE_POLE,
POLE_OF_ORDER_M,
CONTOUR,
WINDING_NUMBER,
CAUCHY_INTEGRAL_FORMULA,
PRINCIPAL_PART,
CONTOUR_INTEGRAL,
REAL_INTEGRAL
}
# ---------- RESIDUE DEFINITION ----------
let
f
-> holomorphic_on_punctured_neighbourhood_of(z0)
with Laurent expansion
f(z)
=
sum_from_n_minus_infinity_to_infinity(
a_n*(z-z0)^n
)
RESIDUE(f,z0)
:= a_(-1)
RESIDUE
-> coefficient_of((z-z0)^(-1))
# ---------- LAURENT COEFFICIENT ----------
a_n
=
1/(2*pi*i)
*
closed_integral_C(
f(z)/(z-z0)^(n+1)
dz
)
for suitable positively_oriented_contour_C
around z0
therefore
a_(-1)
=
1/(2*pi*i)
*
closed_integral_C(
f(z) dz
)
when
C encloses_only(z0)
# ---------- ISOLATED SINGULARITIES ----------
ISOLATED_SINGULARITY
-> classified_as(REMOVABLE)
-> classified_as(POLE)
-> classified_as(ESSENTIAL)
RESIDUE
-> defined_for(ISOLATED_SINGULARITY)
via(LAURENT_COEFFICIENT)
# ---------- REMOVABLE SINGULARITY ----------
if
z0 removable
then
principal_part
= 0
therefore
RESIDUE(f,z0)
= 0
REMOVABLE
-> no_negative_Laurent_terms
# ---------- SIMPLE POLE ----------
z0
-> SIMPLE_POLE
if
f(z)
=
g(z)/(z-z0)
where
g holomorphic_near(z0)
AND g(z0) != 0
then
RESIDUE(f,z0)
=
g(z0)
equivalently
RESIDUE(f,z0)
=
lim_(z->z0)(
(z-z0)f(z)
)
# ---------- QUOTIENT SIMPLE POLE ----------
if
f(z)
=
g(z)/h(z)
and
g,h holomorphic_near(z0)
h(z0)=0
h_prime(z0) != 0
then
z0
-> SIMPLE_POLE
provided(g(z0) != 0)
and
RESIDUE(f,z0)
=
g(z0)/h_prime(z0)
# ---------- POLE OF ORDER M ----------
z0
-> POLE_OF_ORDER_m
if
f(z)
=
g(z)/(z-z0)^m
where
g holomorphic_near(z0)
AND
g(z0) != 0
# ---------- RESIDUE AT HIGHER-ORDER POLE ----------
if
z0 pole_of_order_m
then
RESIDUE(f,z0)
=
1/(m-1)!
*
lim_(z->z0)
d^(m-1)/dz^(m-1)
[
(z-z0)^m f(z)
]
HIGHER_ORDER_POLE_FORMULA
-> computes(RESIDUE_WITHOUT_FULL_LAURENT_SERIES)
# ---------- ESSENTIAL SINGULARITY ----------
if
z0 essential
then
LAURENT_PRINCIPAL_PART
-> infinitely_many_negative_terms
RESIDUE
-> still_coefficient_a_minus_1
ESSENTIAL_SINGULARITY
-> may_have(NONZERO_OR_ZERO_RESIDUE)
# ---------- RESIDUE THEOREM ----------
let
C
-> positively_oriented_simple_closed_contour
and
f
-> meromorphic_inside_and_on(C)
with
no_singularities_on(C)
and isolated singularities
z_1,...,z_n
inside C
then
closed_integral_C(
f(z) dz
)
=
2*pi*i
*
sum_from_k_1_to_n(
RESIDUE(f,z_k)
)
RESIDUE_THEOREM
-> converts(GLOBAL_CONTOUR_INTEGRAL_TO_LOCAL_SINGULARITY_SUM)
# ---------- WINDING NUMBER FORM ----------
for more general closed contour gamma:
closed_integral_gamma(
f(z) dz
)
=
2*pi*i
*
sum_k(
Ind(gamma,z_k)
*
RESIDUE(f,z_k)
)
Ind(gamma,z_k)
-> WINDING_NUMBER
WINDING_NUMBER
-> weights(SINGULARITY_CONTRIBUTION)
# ---------- CONTOUR ORIENTATION ----------
POSITIVE_ORIENTATION
-> counterclockwise_for_standard_simple_contour
REVERSE_ORIENTATION
-> negates(CONTOUR_INTEGRAL)
RESIDUE_SUM
-> multiplied_by(ORIENTATION_OR_WINDING_NUMBER)
# ---------- CAUCHY FORMULA AS RESIDUE CASE ----------
consider
f(z)/(z-z0)
where
f holomorphic
RESIDUE_AT_z0
=
f(z0)
therefore
closed_integral_C(
f(z)/(z-z0)
dz
)
=
2*pi*i*f(z0)
CAUCHY_INTEGRAL_FORMULA
-> special_case_of(RESIDUE_THEOREM)
# ---------- LOGARITHMIC DERIVATIVE ----------
for meromorphic f:
f_prime(z)/f(z)
-> has simple poles at
zeros_and_poles_of(f)
RESIDUE
-> multiplicity_at_zero
or
negative_pole_order
LOGARITHMIC_DERIVATIVE
-> counts(ZEROS_AND_POLES)
# ---------- ARGUMENT PRINCIPLE ----------
if
f meromorphic
and no zeros_or_poles_on(C)
then
1/(2*pi*i)
*
closed_integral_C(
f_prime(z)/f(z)
dz
)
=
N - P
where
N
-> number_of_zeros_inside_C_counted_with_multiplicity
P
-> number_of_poles_inside_C_counted_with_multiplicity
ARGUMENT_PRINCIPLE
-> consequence_of(RESIDUE_THEOREM)
# ---------- ROUCHE RELATION ----------
ROUCHE_THEOREM
-> compares(ZERO_COUNTS_OF_HOLOMORPHIC_FUNCTIONS)
RESIDUE_THEORY
-> supports(ZERO_AND_POLE_COUNTING_METHODS)
# ---------- RESIDUE AT INFINITY ----------
for meromorphic function on extended complex plane:
RESIDUE_AT_INFINITY
:=
- coefficient_relation_to_finite_residues
Res(f,infinity)
=
- sum_of_all_finite_residues
when applicable
equivalently
Res(f,infinity)
=
-Res(
f(1/w)/w^2,
w=0
)
RESIDUE_AT_INFINITY
-> compactifies(SINGULARITY_ACCOUNTING_ON_RIEMANN_SPHERE)
# ---------- GLOBAL RESIDUE SUM ----------
for meromorphic differential on Riemann sphere:
sum_of_all_residues_including_infinity
= 0
GLOBAL_RESIDUE_THEOREM
-> conservation_like_relation_on(COMPACT_RIEMANN_SURFACE_CONTEXT)
# ---------- REAL INTEGRAL APPLICATION ----------
REAL_INTEGRAL
-> may_be_embedded_in(COMPLEX_CONTOUR)
procedure:
extend(real_integrand_to_complex_function)
-> choose(contour)
-> identify(enclosed_poles)
-> compute(residues)
-> apply(residue_theorem)
-> estimate(auxiliary_contour_segments)
-> recover(real_integral)
RESIDUE_THEORY
-> evaluates(MANY_IMPROPER_REAL_INTEGRALS)
# ---------- TRIGONOMETRIC INTEGRALS ----------
for integrals over
0 to 2*pi
substitution:
z
= e^(i*theta)
dtheta
= dz/(i*z)
sin(theta)
=
(z-z^(-1))/(2i)
cos(theta)
=
(z+z^(-1))/2
TRIGONOMETRIC_INTEGRAL
-> transforms_to(CONTOUR_INTEGRAL_ON_UNIT_CIRCLE)
# ---------- FOURIER-TYPE INTEGRALS ----------
integrals involving
e^(i*a*x)
-> may_use(UPPER_OR_LOWER_HALF_PLANE_CONTOUR)
CONTOUR_SELECTION
-> depends_on(EXPONENTIAL_DECAY)
JORDAN_LEMMA
-> may_control(SEMICIRCULAR_ARC_CONTRIBUTION)
# ---------- PRINCIPAL VALUE ----------
if
singularity_lies_on_real_integration_path
CAUCHY_PRINCIPAL_VALUE
-> may_be_computed_using(INDENTED_CONTOURS)
ON_CONTOUR_POLE
-/> directly_allowed_in(STANDARD_RESIDUE_THEOREM)
INDENTATION
-> requires(CAREFUL_HALF_RESIDUE_OR_ANGLE_CONTRIBUTION_ANALYSIS)
# ---------- APPLICATIONS ----------
RESIDUE_THEORY
-> applied_to(CONTOUR_INTEGRATION)
-> applied_to(REAL_INTEGRALS)
-> applied_to(FOURIER_TRANSFORMS)
-> applied_to(INVERSE_LAPLACE_TRANSFORMS)
-> applied_to(ZERO_COUNTING)
-> applied_to(DIFFERENTIAL_EQUATIONS)
-> applied_to(MATHEMATICAL_PHYSICS)
# ---------- RELATION GRAPH ----------
LAURENT_SERIES
-> contains(RESIDUE_COEFFICIENT)
ISOLATED_SINGULARITY
-> has(RESIDUE)
POLE
-> permits(RESIDUE_FORMULA)
RESIDUES_INSIDE_CONTOUR
-> determine(CONTOUR_INTEGRAL)
WINDING_NUMBER
-> weights(RESIDUE_CONTRIBUTION)
LOGARITHMIC_DERIVATIVE
-> connects(RESIDUES_TO_ZERO_POLE_COUNTS)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
"residue theory" ~= "complex-analysis theory using Laurent residues to evaluate contour integrals",
"residue" ~= "coefficient of the (z-z0)^-1 term in a Laurent expansion",
"simple-pole residue" ~= "limit of (z-z0)f(z) at a simple pole",
"residue theorem" ~= "contour integral equals 2 pi i times the weighted sum of enclosed residues",
"argument principle" ~= "zero-minus-pole count obtained from the logarithmic derivative contour integral",
"residue at infinity" ~= "residue encoding the aggregate finite-singularity contribution on the Riemann sphere"
}
# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
residue_is_defined_from_laurent_coefficient_at_isolated_singularity: true,
standard_residue_theorem_requires_no_singularity_on_contour: true,
contour_orientation_and_winding_number_must_be_preserved: true,
simple_pole_limit_formula_requires_simple_pole: true,
higher_order_formula_requires_known_pole_order: true,
principal_value_integrals_require_special_contour_handling: true,
residue_at_infinity_requires_extended_complex_plane_context: true
}
# ---------- CONFIDENCE ----------
CONFIDENCE := {
core_definition: 0.99,
laurent_relation: 0.99,
simple_pole_relation: 0.99,
higher_order_pole_relation: 0.99,
residue_theorem_relation: 0.99,
argument_principle_relation: 0.99,
semantic_equivalence: 0.97
}
# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
identify(meromorphic_or_local_complex_function)
-> identify(contour_and_orientation)
-> locate(isolated_singularities)
-> classify(singularity_types)
-> select(residue_computation_method)
-> compute(each_enclosed_residue)
-> determine(winding_numbers_if_needed)
-> apply(residue_theorem)
-> estimate_or_eliminate(auxiliary_contour_terms)
-> transform_back_to(target_integral_if_applicable)
-> validate(no_unhandled_singularity_on_contour)
-> return(semantic_result)
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
parse_as: "typed residue-theory semantic graph",
primary_entity: RESIDUE_THEORY,
preserve: [
function,
contour,
orientation,
singularity_locations,
singularity_types,
pole_orders,
residues,
winding_numbers
],
infer_through: [
laurent_series,
simple_pole_formulas,
higher_order_pole_formulas,
residue_theorem,
argument_principle,
residue_at_infinity,
real_integral_methods
],
avoid: [
applying_residue_theorem_with pole_on contour,
using_simple_pole_formula_for higher_order pole,
ignoring_contour_orientation,
omitting_winding_number_for non-simple contours,
assuming_removable_singularity_has nonzero residue,
applying_half_residue_rule_without indentation analysis
]
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
validate(new_information)
-> identify(residue_theory_context)
-> compare(existing_relations)
-> preserve(contour_singularity_order_and_residue_invariants)
-> update(affected_entities)
-> update(affected_edges)
-> recompute(CONFIDENCE)
-> regenerate(FLOW_HASH)
# ---------- FLOW HASH ----------
FLOW_HASH := hash(
SOURCE_URL
+ ENTITY
+ CONCEPTS
+ RESIDUE_THEORY
+ RESIDUE
+ LAURENT_SERIES
+ SIMPLE_POLE
+ POLE_OF_ORDER_M
+ RESIDUE_THEOREM
+ WINDING_NUMBER
+ ARGUMENT_PRINCIPLE
+ RESIDUE_AT_INFINITY
+ SEMANTIC_EQUIVALENCE
+ CONSTRAINTS
)
# ---------- EXECUTION ----------
INPUT(query)
-> RESIDUE_THEORY
-> FUNCTION_CONTOUR_IDENTIFICATION
-> SINGULARITY_LOCATION_ANALYSIS
-> SINGULARITY_CLASSIFICATION
-> RESIDUE_METHOD_SELECTION
-> RESIDUE_COMPUTATION
-> WINDING_NUMBER_ANALYSIS
-> RESIDUE_THEOREM_APPLICATION
-> AUXILIARY_CONTOUR_ANALYSIS
-> TARGET_INTEGRAL_RECOVERY
-> CONTOUR_SINGULARITY_VALIDATION
-> RECURSIVE_REASONING(query)
-> CONFIDENCE
-> OUTPUT(semantic_result)
END FLOW
Download Code
Copy to Clipboard