flow "LineIntegralOntology" v1.0
# ============================================================
# LINE INTEGRAL ONTOLOGY — FLOW ALGEBRA
# ============================================================
SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/integral-calculus/line-integral-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Integral Calculus"
ENTITY := "Line Integral"
# ---------- CORE ENTITY ----------
LINE_INTEGRAL := {
type: IntegralConcept,
domain: VectorCalculus,
purpose: "Represent accumulation of a scalar or vector field along a curve or path."
}
# ---------- CORE CONCEPTS ----------
CONCEPTS := {
LINE_INTEGRAL,
CURVE,
PATH,
PARAMETERISATION,
SCALAR_FIELD,
VECTOR_FIELD,
ARC_LENGTH,
TANGENT_VECTOR,
WORK,
CONSERVATIVE_FIELD,
POTENTIAL_FUNCTION,
PATH_INDEPENDENCE,
FUNDAMENTAL_THEOREM_FOR_LINE_INTEGRALS
}
# ---------- CURVE STRUCTURE ----------
CURVE
:= r(t)
where
t in [a,b]
r(t)
:= (
x1(t),
x2(t),
...,
xn(t)
)
DERIVATIVE_OF_CURVE
:= r_prime(t)
SPEED
:= norm(r_prime(t))
CURVE
-> parameterised_by(t)
# ---------- SCALAR LINE INTEGRAL ----------
for
scalar_field f
LINE_INTEGRAL_SCALAR
:= integral_C(f ds)
under parameterisation r(t):
integral_C(f ds)
= integral_from_a_to_b(
f(r(t))
* norm(r_prime(t))
dt
)
ds
= norm(r_prime(t)) dt
SCALAR_LINE_INTEGRAL
-> accumulates(SCALAR_FIELD_WEIGHTED_BY_ARC_LENGTH)
# ---------- ARC LENGTH ----------
if
f = 1
then
integral_C(1 ds)
= LENGTH(C)
ARC_LENGTH
:= integral_from_a_to_b(
norm(r_prime(t)) dt
)
LINE_INTEGRAL
-> generalises(ARC_LENGTH)
# ---------- VECTOR LINE INTEGRAL ----------
for
vector_field F
LINE_INTEGRAL_VECTOR
:= integral_C(F dot dr)
under parameterisation r(t):
integral_C(F dot dr)
= integral_from_a_to_b(
F(r(t))
dot r_prime(t)
dt
)
dr
= r_prime(t) dt
VECTOR_LINE_INTEGRAL
-> accumulates(TANGENTIAL_FIELD_COMPONENT_ALONG_PATH)
# ---------- WORK ----------
if
F
:= force_field
then
WORK
= integral_C(F dot dr)
LINE_INTEGRAL
-> computes(WORK_DONE_BY_VECTOR_FIELD_ALONG_PATH)
# ---------- ORIENTATION ----------
VECTOR_LINE_INTEGRAL
-> depends_on(PATH_ORIENTATION)
if
reverse(C)
then
integral_reverse_C(F dot dr)
= -integral_C(F dot dr)
SCALAR_LINE_INTEGRAL_WITH_ds
-> orientation_independent
under(standard_arc_length_form)
# ---------- PARAMETERISATION INVARIANCE ----------
REGULAR_REPARAMETERISATION
-> preserves(SCALAR_LINE_INTEGRAL)
ORIENTATION_PRESERVING_REPARAMETERISATION
-> preserves(VECTOR_LINE_INTEGRAL)
ORIENTATION_REVERSING_REPARAMETERISATION
-> reverses_sign(VECTOR_LINE_INTEGRAL)
LINE_INTEGRAL
-> geometric_quantity_independent_of_valid_parameterisation
subject_to(orientation_conditions)
# ---------- CONSERVATIVE FIELD ----------
VECTOR_FIELD F
-> CONSERVATIVE
if
exists(POTENTIAL_FUNCTION phi)
such_that
F = GRADIENT(phi)
CONSERVATIVE_FIELD
-> supports(PATH_INDEPENDENCE)
on(appropriate_domain)
# ---------- FUNDAMENTAL THEOREM FOR LINE INTEGRALS ----------
if
F = GRADIENT(phi)
AND C runs_from(A,to=B)
then
integral_C(F dot dr)
= phi(B) - phi(A)
FUNDAMENTAL_THEOREM_FOR_LINE_INTEGRALS
-> converts(PATH_INTEGRAL_TO_ENDPOINT_DIFFERENCE)
# ---------- PATH INDEPENDENCE ----------
PATH_INDEPENDENCE
-> line_integral_depends_only_on(ENDPOINTS)
if
F conservative
on(appropriate_domain)
then
VECTOR_LINE_INTEGRAL
-> PATH_INDEPENDENT
CLOSED_CURVE
-> start_point_equals(end_point)
if
F conservative
then
integral_closed_C(F dot dr)
= 0
# ---------- EXACT DIFFERENTIAL ----------
if
F = GRADIENT(phi)
then
F dot dr
= d(phi)
LINE_INTEGRAL
= integral_C(d(phi))
= phi(B)-phi(A)
EXACT_DIFFERENTIAL
-> linked_to(CONSERVATIVE_VECTOR_FIELD)
# ---------- TWO-DIMENSIONAL FORM ----------
if
F = (P,Q)
then
integral_C(F dot dr)
= integral_C(P dx + Q dy)
VECTOR_LINE_INTEGRAL
-> may_be_written_as(DIFFERENTIAL_FORM)
# ---------- THREE-DIMENSIONAL FORM ----------
if
F = (P,Q,R)
then
integral_C(F dot dr)
= integral_C(
P dx + Q dy + R dz
)
# ---------- CIRCULATION ----------
CIRCULATION
:= integral_closed_C(F dot dr)
CIRCULATION
-> measures(TANGENTIAL_FIELD_ACCUMULATION_AROUND_CLOSED_CURVE)
# ---------- GREEN'S THEOREM RELATION ----------
for suitable planar region D
with positively oriented boundary C:
integral_C(
P dx + Q dy
)
=
double_integral_D(
partial_Q/partial_x
- partial_P/partial_y
dA
)
GREEN_THEOREM
-> converts(CLOSED_LINE_INTEGRAL, DOUBLE_INTEGRAL)
# ---------- STOKES' THEOREM RELATION ----------
for suitable oriented surface S
with boundary C:
integral_C(F dot dr)
=
surface_integral_S(
CURL(F) dot n dS
)
STOKES_THEOREM
-> connects(LINE_INTEGRAL_AROUND_BOUNDARY, SURFACE_INTEGRAL_OF_CURL)
# ---------- APPLICATIONS ----------
LINE_INTEGRAL
-> applied_to(WORK)
-> applied_to(ARC_LENGTH)
-> applied_to(MASS_OF_WIRE)
-> applied_to(CIRCULATION)
-> applied_to(ELECTROMAGNETISM)
-> applied_to(FLUID_FLOW)
-> applied_to(POTENTIAL_FIELDS)
# ---------- MASS OF A CURVE ----------
if
rho
:= LINEAR_DENSITY
then
MASS
= integral_C(rho ds)
LINE_INTEGRAL
-> converts(LINEAR_DENSITY, TOTAL_MASS)
# ---------- RELATION GRAPH ----------
CURVE
-> parameterised_by(PARAMETER)
SCALAR_FIELD
-> integrated_along(CURVE_USING_ds)
VECTOR_FIELD
-> integrated_along(CURVE_USING_dot_dr)
CURVE_DERIVATIVE
-> determines(ds)
CONSERVATIVE_FIELD
-> generated_by(POTENTIAL_FUNCTION)
POTENTIAL_FUNCTION
-> determines(PATH_INDEPENDENT_LINE_INTEGRAL)
GREEN_THEOREM
-> relates(LINE_INTEGRAL, DOUBLE_INTEGRAL)
STOKES_THEOREM
-> relates(LINE_INTEGRAL, SURFACE_INTEGRAL)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
"line integral" ~= "integral of a field along a curve",
"path integral" ~= "line integral in standard vector-calculus context",
"scalar line integral" ~= "integration of a scalar field with respect to arc length",
"vector line integral" ~= "integration of the tangential component of a vector field along a path",
"work integral" ~= "vector line integral of force along displacement",
"circulation" ~= "closed line integral of tangential vector-field component"
}
# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
curve_requires_valid_parameterisation: true,
scalar_ds_integral_uses_speed_factor: true,
vector_line_integral_uses_tangent_derivative: true,
vector_line_integral_depends_on_orientation: true,
scalar_arc_length_integral_is_orientation_independent: true,
path_independence_requires_conservative_or_equivalent_conditions: true,
theorem_applications_require_orientation_and_regularity_conditions: true
}
# ---------- CONFIDENCE ----------
CONFIDENCE := {
scalar_line_integral: 0.99,
vector_line_integral: 0.99,
parameterisation_relation: 0.99,
conservative_field_relation: 0.99,
fundamental_theorem_relation: 0.99,
green_stokes_relations: 0.99,
semantic_equivalence: 0.97
}
# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
identify(curve_or_path)
-> identify(parameterisation)
-> identify(field_type)
-> classify(scalar_or_vector_line_integral)
-> compute(curve_derivative)
-> construct(ds_or_dr)
-> substitute(parameterisation_into_field)
-> evaluate(single_variable_integral)
-> test(conservative_field_if_relevant)
-> apply(fundamental_theorem_if_valid)
-> analyse(orientation_and_path_independence)
-> validate(theorem_and_domain_conditions)
-> return(semantic_result)
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
parse_as: "typed line-integral semantic graph",
primary_entity: LINE_INTEGRAL,
preserve: [
curve,
parameterisation,
orientation,
field_type,
arc_length_factor,
tangent_vector,
endpoints
],
infer_through: [
scalar_fields,
vector_fields,
conservative_fields,
potential_functions,
green_theorem,
stokes_theorem,
differential_forms
],
avoid: [
omitting_speed_factor_in_scalar_line_integral,
omitting_curve_derivative_in_vector_line_integral,
ignoring_orientation,
assuming_path_independence_without conservative conditions,
applying_fundamental_theorem_without potential function,
confusing_scalar_and_vector_line_integrals
]
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
validate(new_information)
-> identify(line_integral_context)
-> compare(existing_relations)
-> preserve(path_orientation_and_parameterisation_invariants)
-> update(affected_entities)
-> update(affected_edges)
-> recompute(CONFIDENCE)
-> regenerate(FLOW_HASH)
# ---------- FLOW HASH ----------
FLOW_HASH := hash(
SOURCE_URL
+ ENTITY
+ CONCEPTS
+ LINE_INTEGRAL
+ LINE_INTEGRAL_SCALAR
+ LINE_INTEGRAL_VECTOR
+ ARC_LENGTH
+ CONSERVATIVE_FIELD
+ FUNDAMENTAL_THEOREM_FOR_LINE_INTEGRALS
+ GREEN_THEOREM
+ STOKES_THEOREM
+ SEMANTIC_EQUIVALENCE
+ CONSTRAINTS
)
# ---------- EXECUTION ----------
INPUT(query)
-> LINE_INTEGRAL
-> CURVE_IDENTIFICATION
-> PARAMETERISATION_ANALYSIS
-> FIELD_TYPE_CLASSIFICATION
-> SCALAR_VECTOR_CLASSIFICATION
-> CURVE_DERIVATIVE_ANALYSIS
-> INTEGRAND_CONSTRUCTION
-> ORIENTATION_ANALYSIS
-> CONSERVATIVE_FIELD_ANALYSIS
-> THEOREM_SELECTION
-> INTEGRATION_EXECUTION
-> RECURSIVE_REASONING(query)
-> CONFIDENCE
-> OUTPUT(semantic_result)
END FLOW
Download Code
Copy to Clipboard