flow "DoubleIntegralOntology" v1.0
# ============================================================
# DOUBLE INTEGRAL ONTOLOGY — FLOW ALGEBRA
# ============================================================
SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/integral-calculus/double-integral-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Integral Calculus"
ENTITY := "Double Integral"
# ---------- CORE ENTITY ----------
DOUBLE_INTEGRAL := {
type: MultipleIntegral,
domain: MultivariableCalculus,
purpose: "Represent accumulation of a two-variable function over a two-dimensional region."
}
# ---------- CORE CONCEPTS ----------
CONCEPTS := {
DOUBLE_INTEGRAL,
TWO_VARIABLE_FUNCTION,
REGION_OF_INTEGRATION,
ITERATED_INTEGRAL,
AREA_ELEMENT,
FUBINI_THEOREM,
TONELLI_THEOREM,
ORDER_OF_INTEGRATION,
CHANGE_OF_VARIABLES,
JACOBIAN_DETERMINANT,
POLAR_COORDINATES,
SURFACE_DENSITY
}
# ---------- BASIC STRUCTURE ----------
DOUBLE_INTEGRAL
:= integral_integral_R(
f(x,y) dA
)
f(x,y)
-> INTEGRAND
R
-> TWO_DIMENSIONAL_REGION
dA
-> AREA_ELEMENT
DOUBLE_INTEGRAL
-> accumulates(FUNCTION_VALUES_OVER_REGION)
# ---------- RIEMANN-SUM INTERPRETATION ----------
REGION_R
-> partitioned_into(SMALL_SUBREGIONS)
DELTA_A_i
-> area_of(SUBREGION_i)
SAMPLE_POINT_i
-> selected_in(SUBREGION_i)
DOUBLE_RIEMANN_SUM
:= sum(
f(SAMPLE_POINT_i) * DELTA_A_i
)
DOUBLE_INTEGRAL
:= limit(DOUBLE_RIEMANN_SUM)
under(REGION_REFINEMENT)
when(INTEGRABLE)
# ---------- RECTANGULAR REGION ----------
RECTANGLE
:= [a,b] x [c,d]
DOUBLE_INTEGRAL_OVER_RECTANGLE
= integral_from_a_to_b(
integral_from_c_to_d(
f(x,y) dy
) dx
)
under(FUBINI_CONDITIONS)
RECTANGULAR_REGION
-> permits(CONSTANT_INNER_AND_OUTER_BOUNDS)
# ---------- TYPE I REGION ----------
TYPE_I_REGION
:= {
(x,y):
a <= x <= b,
g1(x) <= y <= g2(x)
}
DOUBLE_INTEGRAL
= integral_from_a_to_b(
integral_from_g1(x)_to_g2(x)(
f(x,y) dy
) dx
)
TYPE_I_REGION
-> naturally_uses(dy_dx_order)
# ---------- TYPE II REGION ----------
TYPE_II_REGION
:= {
(x,y):
c <= y <= d,
h1(y) <= x <= h2(y)
}
DOUBLE_INTEGRAL
= integral_from_c_to_d(
integral_from_h1(y)_to_h2(y)(
f(x,y) dx
) dy
)
TYPE_II_REGION
-> naturally_uses(dx_dy_order)
# ---------- ITERATED INTEGRAL ----------
ITERATED_INTEGRAL
-> evaluates(INNER_INTEGRAL_FIRST)
-> treats(OUTER_VARIABLE_AS_CONSTANT_DURING_INNER_INTEGRATION)
INNER_RESULT
-> function_of(OUTER_VARIABLE)
OUTER_INTEGRAL
-> accumulates(INNER_RESULT)
# ---------- FUBINI THEOREM ----------
if
f integrable_over(R)
under(FUBINI_CONDITIONS)
then
DOUBLE_INTEGRAL
-> equals(APPROPRIATE_ITERATED_INTEGRAL)
ORDER_OF_INTEGRATION
-> may_be_changed
when(THEOREM_AND_REGION_CONDITIONS_HOLD)
FUBINI_THEOREM
-> connects(DOUBLE_INTEGRAL, ITERATED_INTEGRATION)
# ---------- TONELLI THEOREM ----------
if
f >= 0
AND measurable
then
TONELLI_THEOREM
-> permits(ITERATED_INTEGRATION)
possibly_with(INFINITE_VALUE)
TONELLI_THEOREM
-> supports(ORDER_INTERCHANGE_FOR_NONNEGATIVE_FUNCTIONS)
# ---------- CHANGE OF ORDER ----------
CHANGE_ORDER:
identify(original_region)
-> sketch_or_characterise(region)
-> project_onto(new_outer_axis)
-> derive(new_inner_bounds)
-> rewrite(iterated_integral)
CHANGING_ORDER
-/> merely_swap(dx,dy)
BOUNDS
-> must_be_recomputed_from(REGION_GEOMETRY)
# ---------- AREA ----------
if
f(x,y) = 1
then
double_integral_R(1 dA)
= AREA(R)
DOUBLE_INTEGRAL
-> generalises(AREA_MEASUREMENT)
# ---------- VOLUME UNDER SURFACE ----------
if
f(x,y) >= 0
then
double_integral_R(
f(x,y) dA
)
-> VOLUME_UNDER_SURFACE
above(R)
if
f changes_sign
then
DOUBLE_INTEGRAL
-> SIGNED_VOLUME_ACCUMULATION
# ---------- MASS ----------
if
rho(x,y)
:= SURFACE_DENSITY
then
MASS
= double_integral_R(
rho(x,y) dA
)
DOUBLE_INTEGRAL
-> converts(DENSITY_FIELD, TOTAL_MASS)
# ---------- CENTRE OF MASS ----------
M
:= double_integral_R(rho dA)
x_bar
:= 1/M
* double_integral_R(
x*rho dA
)
y_bar
:= 1/M
* double_integral_R(
y*rho dA
)
CENTRE_OF_MASS
-> computed_from(WEIGHTED_DOUBLE_INTEGRALS)
# ---------- AVERAGE VALUE ----------
AVERAGE_VALUE
:= 1/AREA(R)
* double_integral_R(
f(x,y) dA
)
AVERAGE_VALUE
-> normalised(DOUBLE_ACCUMULATION)
# ---------- CHANGE OF VARIABLES ----------
TRANSFORMATION
:= T(u,v)
= (x(u,v), y(u,v))
JACOBIAN_DETERMINANT
:= det(
partial(x,y) /
partial(u,v)
)
dA
= abs(JACOBIAN_DETERMINANT)
du dv
CHANGE_OF_VARIABLES
-> transforms(REGION_AND_INTEGRAND)
-> requires(JACOBIAN_SCALE_FACTOR)
# ---------- POLAR COORDINATES ----------
x
= r*cos(theta)
y
= r*sin(theta)
JACOBIAN_DETERMINANT
= r
dA
= r dr dtheta
DOUBLE_INTEGRAL
-> may_be_simplified_by(POLAR_COORDINATES)
for(CIRCULAR_OR_RADIAL_GEOMETRY)
# ---------- POLAR REGION ----------
POLAR_REGION
:= {
alpha <= theta <= beta,
r1(theta) <= r <= r2(theta)
}
DOUBLE_INTEGRAL
= integral_from_alpha_to_beta(
integral_from_r1(theta)_to_r2(theta)(
f(r*cos(theta), r*sin(theta))
* r dr
) dtheta
)
# ---------- PROBABILITY ----------
if
p(x,y)
:= JOINT_PROBABILITY_DENSITY
then
P((X,Y) in R)
= double_integral_R(
p(x,y) dA
)
NORMALISATION
-> double_integral_over_support(p dA) = 1
# ---------- IMPROPER DOUBLE INTEGRAL ----------
DOUBLE_INTEGRAL
-> may_be(IMPROPER)
IMPROPER_CASE
-> may_involve(UNBOUNDED_REGION)
-> may_involve(UNBOUNDED_INTEGRAND)
CONVERGENCE
-> requires(LIMIT_OR_MEASURE_THEORETIC_ANALYSIS)
# ---------- RELATION GRAPH ----------
TWO_VARIABLE_FUNCTION
-> integrated_by(DOUBLE_INTEGRAL)
REGION_OF_INTEGRATION
-> determines(BOUNDS)
FUBINI_THEOREM
-> enables(ITERATED_INTEGRATION)
ORDER_CHANGE
-> requires(REGION_REDESCRIPTION)
CHANGE_OF_VARIABLES
-> uses(JACOBIAN_DETERMINANT)
POLAR_COORDINATES
-> introduce(AREA_FACTOR_r)
SURFACE_DENSITY
-> integrated_to(MASS)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
"double integral" ~= "two-dimensional accumulation of a two-variable function",
"iterated double integral" ~= "successive single-variable integrations representing a double integral under suitable conditions",
"region of integration" ~= "two-dimensional domain over which the double integral is taken",
"dA" ~= "area element",
"polar area element" ~= "r dr dtheta under standard polar coordinates",
"double integral of one" ~= "area of the integration region"
}
# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
double_integral_requires_two_dimensional_region: true,
integration_variables_are_bound: true,
order_change_requires_bound_reconstruction: true,
fubini_interchange_requires_appropriate_conditions: true,
polar_coordinates_require_factor_r: true,
general_coordinate_change_requires_absolute_jacobian_determinant: true,
improper_double_integrals_require_convergence_analysis: true
}
# ---------- CONFIDENCE ----------
CONFIDENCE := {
core_definition: 0.99,
iterated_integral_relation: 0.99,
region_bound_structure: 0.99,
fubini_tonelli_relations: 0.99,
change_of_variables_relation: 0.99,
polar_coordinate_relation: 0.99,
semantic_equivalence: 0.97
}
# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
identify(two_variable_integrand)
-> identify(region_of_integration)
-> classify(region_type)
-> select(order_of_integration)
-> derive(inner_and_outer_bounds)
-> test(fubini_or_tonelli_conditions_if_relevant)
-> select(cartesian_or_transformed_coordinates)
-> include(jacobian_factor_if_transformed)
-> evaluate(inner_integral)
-> evaluate(outer_integral)
-> validate(region_and_convergence_conditions)
-> interpret(area_volume_mass_or_probability_context)
-> return(semantic_result)
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
parse_as: "typed double-integral semantic graph",
primary_entity: DOUBLE_INTEGRAL,
preserve: [
integrand,
two_dimensional_region,
integration_order,
inner_bounds,
outer_bounds,
coordinate_system,
jacobian_factor
],
infer_through: [
iterated_integrals,
fubini_theorem,
tonelli_theorem,
order_changes,
polar_coordinates,
coordinate_transformations,
density_integrals
],
avoid: [
swapping_order_without_rebuilding_bounds,
omitting_polar_factor_r,
omitting_absolute_jacobian_factor,
assuming_fubini_conditions_without verification,
confusing_signed_volume_with_geometric_volume,
ignoring_improper_integral_convergence
]
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
validate(new_information)
-> identify(double_integral_context)
-> compare(existing_relations)
-> preserve(region_bound_and_jacobian_invariants)
-> update(affected_entities)
-> update(affected_edges)
-> recompute(CONFIDENCE)
-> regenerate(FLOW_HASH)
# ---------- FLOW HASH ----------
FLOW_HASH := hash(
SOURCE_URL
+ ENTITY
+ CONCEPTS
+ DOUBLE_INTEGRAL
+ DOUBLE_RIEMANN_SUM
+ TYPE_I_REGION
+ TYPE_II_REGION
+ FUBINI_THEOREM
+ TONELLI_THEOREM
+ CHANGE_OF_VARIABLES
+ POLAR_COORDINATES
+ SEMANTIC_EQUIVALENCE
+ CONSTRAINTS
)
# ---------- EXECUTION ----------
INPUT(query)
-> DOUBLE_INTEGRAL
-> INTEGRAND_IDENTIFICATION
-> REGION_IDENTIFICATION
-> REGION_TYPE_CLASSIFICATION
-> ORDER_SELECTION
-> BOUND_CONSTRUCTION
-> FUBINI_TONELLI_ANALYSIS
-> COORDINATE_SYSTEM_ANALYSIS
-> JACOBIAN_ANALYSIS
-> ITERATED_INTEGRATION
-> CONVERGENCE_ANALYSIS
-> APPLICATION_INTERPRETATION
-> RECURSIVE_REASONING(query)
-> CONFIDENCE
-> OUTPUT(semantic_result)
END FLOW
Download Code
Copy to Clipboard