flow "RealAnalysisOntology" v1.0
# ============================================================
# REAL ANALYSIS ONTOLOGY — FLOW ALGEBRA
# ============================================================
SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/real-analysis/real-analysis-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Real Analysis"
ENTITY := "Real Analysis"
# ---------- CORE ENTITY ----------
REAL_ANALYSIS := {
type: MathematicalDiscipline,
domain: Mathematics,
parent: MathematicalAnalysis,
purpose: "Provide a rigorous framework for the real numbers, sequences, limits, continuity, differentiation, integration, infinite series, compactness and convergence."
}
# ---------- CORE CONCEPTS ----------
CONCEPTS := {
REAL_NUMBER,
ORDERED_FIELD,
COMPLETENESS,
SUPREMUM,
INFIMUM,
SEQUENCE,
LIMIT,
CAUCHY_SEQUENCE,
CONTINUITY,
UNIFORM_CONTINUITY,
DERIVATIVE,
RIEMANN_INTEGRAL,
SERIES,
UNIFORM_CONVERGENCE,
COMPACTNESS,
CONNECTEDNESS
}
# ---------- ONTOLOGICAL STRUCTURE ----------
REAL_ANALYSIS
-> branch_of(MATHEMATICAL_ANALYSIS)
-> formalises(CALCULUS_ON_REAL_NUMBERS)
-> studies(REAL_VALUED_FUNCTIONS)
-> studies(SEQUENCES)
-> studies(SERIES)
-> studies(REAL_TOPOLOGICAL_STRUCTURE)
-> supports(FUNCTIONAL_ANALYSIS)
# ---------- REAL NUMBER SYSTEM ----------
REAL_NUMBERS
:= R
R
-> FIELD
-> ORDERED_FIELD
-> COMPLETE_ORDERED_FIELD
REAL_NUMBER
-> element_of(R)
# ---------- FIELD STRUCTURE ----------
R
-> supports(ADDITION)
-> supports(SUBTRACTION)
-> supports(MULTIPLICATION)
-> supports(DIVISION_BY_NONZERO)
FIELD_AXIOMS
-> define(ALGEBRAIC_STRUCTURE)
# ---------- ORDER STRUCTURE ----------
for
x,y in R
x < y
-> ORDER_RELATION
ORDER
-> TOTAL
-> compatible_with(FIELD_OPERATIONS)
ORDER
-> defines(INTERVALS)
-> defines(UPPER_AND_LOWER_BOUNDS)
# ---------- COMPLETENESS ----------
COMPLETENESS
-> defining_analytic_property_of(R)
LEAST_UPPER_BOUND_PROPERTY:
if
A subset_of R
AND A nonempty
AND A bounded_above
then
SUPREMUM(A)
-> exists_in(R)
COMPLETENESS
-> supports(LIMIT_THEORY)
# ---------- SUPREMUM ----------
SUPREMUM(A)
:= least_upper_bound_of(A)
s = sup(A)
iff
for_all x in A:
x <= s
and
for_every epsilon > 0:
exists x in A
such_that
s-epsilon < x
# ---------- INFIMUM ----------
INFIMUM(A)
:= greatest_lower_bound_of(A)
INFIMUM
-> dual_of(SUPREMUM)
inf(A)
= -sup(-A)
when(appropriate)
# ---------- ARCHIMEDEAN PROPERTY ----------
for_every x in R
exists n in NATURAL_NUMBERS
such_that
n > x
ARCHIMEDEAN_PROPERTY
-> excludes(INFINITE_REAL_MAGNITUDES)
# ---------- DENSITY OF RATIONALS ----------
for
x < y
exists
q in RATIONAL_NUMBERS
such_that
x < q < y
RATIONALS
-> dense_in(R)
IRRATIONALS
-> dense_in(R)
# ---------- SEQUENCE ----------
SEQUENCE
:= mapping(
NATURAL_NUMBERS -> R
)
a_n
-> nth_term
SEQUENCE
-> ordered_infinite_collection
# ---------- SEQUENCE CONVERGENCE ----------
a_n
-> converges_to(L)
iff
for_every epsilon > 0
exists N
such_that
n >= N
-> abs(a_n-L) < epsilon
CONVERGENT_SEQUENCE
-> has(UNIQUE_LIMIT)
# ---------- BOUNDED SEQUENCE ----------
a_n
-> bounded
if
exists M > 0
such_that
abs(a_n) <= M
for_all n
CONVERGENT_SEQUENCE
-> BOUNDED
BOUNDED_SEQUENCE
-/> necessarily(CONVERGENT)
# ---------- CAUCHY SEQUENCE ----------
a_n
-> CAUCHY
iff
for_every epsilon > 0
exists N
such_that
m,n >= N
-> abs(a_m-a_n) < epsilon
in R:
CAUCHY
<-> CONVERGENT
CAUCHY_CRITERION
-> expression_of(COMPLETENESS)
# ---------- SUBSEQUENCE ----------
SUBSEQUENCE
:= a_(n_k)
where
n_1 < n_2 < ...
if
a_n -> L
then
every_subsequence
-> converges_to(L)
# ---------- BOLZANO-WEIERSTRASS ----------
every_bounded_sequence_in_R^n
-> has(CONVERGENT_SUBSEQUENCE)
BOLZANO_WEIERSTRASS
-> compactness_related_result
# ---------- MONOTONE CONVERGENCE ----------
if
a_n increasing
AND bounded_above
then
a_n
-> converges_to(sup{a_n})
if
a_n decreasing
AND bounded_below
then
a_n
-> converges_to(inf{a_n})
# ---------- FUNCTION LIMIT ----------
for
f: D -> R
lim_(x->a) f(x)
= L
iff
for_every epsilon > 0
exists delta > 0
such_that
0 < abs(x-a) < delta
-> abs(f(x)-L) < epsilon
# ---------- CONTINUITY ----------
f
-> continuous_at(a)
iff
lim_(x->a) f(x)
= f(a)
CONTINUITY
-> preserves(NEARBY_VALUES_IN_LIMIT_SENSE)
# ---------- UNIFORM CONTINUITY ----------
f
-> uniformly_continuous_on(D)
iff
for_every epsilon > 0
exists delta > 0
such_that
for_all x,y in D:
abs(x-y) < delta
-> abs(f(x)-f(y)) < epsilon
delta
-> independent_of(POINT_LOCATION)
# ---------- HEINE-CANTOR ----------
if
K compact
AND f continuous_on(K)
then
f
-> uniformly_continuous_on(K)
# ---------- EXTREME VALUE THEOREM ----------
if
K nonempty_compact
AND f continuous_on(K)
then
exists x_min,x_max in K
such_that
f(x_min)
<= f(x)
<= f(x_max)
for_all x in K
# ---------- INTERMEDIATE VALUE THEOREM ----------
if
f continuous_on([a,b])
and
y lies_between(f(a),f(b))
then
exists c in [a,b]
such_that
f(c)=y
CONTINUITY
-> preserves(INTERVAL_CONNECTEDNESS)
# ---------- DIFFERENTIABILITY ----------
f
-> differentiable_at(a)
iff
f_prime(a)
:=
lim_(h->0)
[
f(a+h)-f(a)
]
/ h
exists_finitely
DIFFERENTIABILITY
-> implies(CONTINUITY)
# ---------- DERIVATIVE RULES ----------
DERIVATIVE
-> obeys(LINEARITY)
-> obeys(PRODUCT_RULE)
-> obeys(QUOTIENT_RULE_WHERE_DENOMINATOR_NONZERO)
-> obeys(CHAIN_RULE)
DERIVATIVE
-> measures(LOCAL_LINEAR_CHANGE)
# ---------- ROLLE THEOREM ----------
if
f continuous_on([a,b])
AND differentiable_on((a,b))
AND f(a)=f(b)
then
exists c in (a,b)
such_that
f_prime(c)=0
# ---------- MEAN VALUE THEOREM ----------
if
f continuous_on([a,b])
AND differentiable_on((a,b))
then
exists c in (a,b)
such_that
f_prime(c)
=
[f(b)-f(a)]/(b-a)
MEAN_VALUE_THEOREM
-> links(DERIVATIVE, SECANT_SLOPE)
# ---------- RIEMANN INTEGRAL ----------
PARTITION
:= {
a=x_0 < x_1 < ... < x_n=b
}
TAGGED_POINTS
:= x_i_star in [x_(i-1),x_i]
RIEMANN_SUM
:=
sum(
f(x_i_star)
* (x_i-x_(i-1))
)
f
-> RIEMANN_INTEGRABLE
if
sums_converge_to(common_limit)
as
mesh(PARTITION) -> 0
# ---------- INTEGRABILITY ----------
CONTINUOUS_FUNCTION_ON_CLOSED_BOUNDED_INTERVAL
-> RIEMANN_INTEGRABLE
BOUNDED_FUNCTION_WITH_FINITE_DISCONTINUITIES
-> RIEMANN_INTEGRABLE
RIEMANN_INTEGRABILITY
-> depends_on(DISCONTINUITY_STRUCTURE)
# ---------- FUNDAMENTAL THEOREM OF CALCULUS ----------
if
f continuous_on([a,b])
define
F(x)
:=
integral_from_a_to_x(
f(t) dt
)
then
F_prime(x)
= f(x)
and
if
G_prime=f
then
integral_from_a_to_b(
f(x) dx
)
=
G(b)-G(a)
# ---------- SERIES ----------
SERIES
:= sum_from_n_1_to_infinity(a_n)
PARTIAL_SUM_SEQUENCE
:= S_N
= sum_from_n_1_to_N(a_n)
SERIES_CONVERGES
iff
S_N
-> finite_limit
# ---------- CONVERGENCE TESTS ----------
SERIES
-> may_be_tested_by(COMPARISON_TEST)
-> may_be_tested_by(RATIO_TEST)
-> may_be_tested_by(ROOT_TEST)
-> may_be_tested_by(INTEGRAL_TEST)
-> may_be_tested_by(ALTERNATING_SERIES_TEST)
TEST_SELECTION
-> depends_on(SERIES_STRUCTURE)
# ---------- ABSOLUTE / CONDITIONAL ----------
ABSOLUTE_CONVERGENCE
:= convergence_of(
sum(abs(a_n))
)
ABSOLUTE_CONVERGENCE
-> implies(CONVERGENCE)
CONDITIONAL_CONVERGENCE
:= convergent_series
whose_absolute_series_diverges
# ---------- FUNCTION SEQUENCES ----------
f_n
-> sequence_of_functions
POINTWISE:
for_each x:
f_n(x) -> f(x)
UNIFORM:
sup_x(
abs(f_n(x)-f(x))
)
-> 0
UNIFORM_CONVERGENCE
-> implies(POINTWISE_CONVERGENCE)
# ---------- UNIFORM LIMIT THEOREM ----------
if
f_n continuous
AND f_n -> f uniformly
then
f
-> continuous
UNIFORM_CONVERGENCE
-> preserves(CONTINUITY)
# ---------- COMPACTNESS ----------
K subset_of R^n
K compact
iff
K closed_and_bounded
HEINE_BOREL
-> finite_dimensional_euclidean_characterisation
COMPACTNESS
-> every_open_cover_has(FINITE_SUBCOVER)
# ---------- CONNECTEDNESS ----------
CONNECTED_SET
-> cannot_be_partitioned_into(TWO_NONEMPTY_DISJOINT_OPEN_RELATIVE_SETS)
in R:
CONNECTED_SET
<-> INTERVAL
CONNECTEDNESS
-> explains(INTERMEDIATE_VALUE_PROPERTY)
# ---------- APPLICATIONS ----------
REAL_ANALYSIS
-> applied_to(CALCULUS_FOUNDATIONS)
-> applied_to(FUNCTIONAL_ANALYSIS)
-> applied_to(PROBABILITY)
-> applied_to(DIFFERENTIAL_EQUATIONS)
-> applied_to(OPTIMISATION)
-> applied_to(NUMERICAL_ANALYSIS)
# ---------- RELATION GRAPH ----------
REAL_NUMBERS
-> have(COMPLETENESS)
COMPLETENESS
-> supports(CAUCHY_CONVERGENCE)
SEQUENCE
-> has(LIMIT_BEHAVIOUR)
FUNCTION_LIMIT
-> defines(CONTINUITY)
FUNCTION_LIMIT
-> defines(DERIVATIVE)
RIEMANN_SUM
-> defines(INTEGRAL)
COMPACTNESS
-> strengthens(CONTINUOUS_FUNCTION_PROPERTIES)
UNIFORM_CONVERGENCE
-> controls(FUNCTION_LIMIT_PRESERVATION)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
"real analysis" ~= "rigorous study of real-number calculus and convergence",
"least upper bound property" ~= "order completeness of the real numbers",
"Cauchy criterion" ~= "convergence criterion based on mutual closeness of sequence terms",
"uniform continuity" ~= "continuity with one delta working uniformly over the domain",
"uniform convergence" ~= "function convergence controlled uniformly across the domain",
"Heine-Borel theorem" ~= "closed-and-bounded compactness criterion in finite-dimensional Euclidean space"
}
# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
real_completeness_is_required_for_many_convergence_results: true,
bounded_sequence_need_not_converge_but_has_convergent_subsequence_in_finite_dimensions: true,
differentiability_implies_continuity_but_not_conversely: true,
uniform_continuity_stronger_than_pointwise_continuity: true,
uniform_convergence_stronger_than_pointwise_convergence: true,
heine_borel_closed_bounded_equivalence_is_finite_dimensional_euclidean: true,
limit_and_integral_interchanges_require_theorem_specific_conditions: true
}
# ---------- CONFIDENCE ----------
CONFIDENCE := {
ontology_structure: 0.99,
real_completeness_relation: 0.99,
sequence_convergence_relation: 0.99,
continuity_differentiability_relation: 0.99,
riemann_integration_relation: 0.99,
compactness_uniform_relation: 0.99,
semantic_equivalence: 0.97
}
# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
identify(real_analysis_entity)
-> classify(number_set_sequence_series_function_or_domain)
-> identify(order_boundedness_and_domain)
-> determine(limit_or_convergence_mode)
-> select(rigorous_definition)
-> test(relevant_theorem_hypotheses)
-> apply(completeness_compactness_or_continuity_theorem_if_valid)
-> analyse(differentiation_integration_or_series_if_requested)
-> distinguish(pointwise_uniform_and_cauchy_structures)
-> validate(all_limit_operations)
-> return(semantic_result)
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
parse_as: "typed real-analysis ontology graph",
primary_entity: REAL_ANALYSIS,
preserve: [
real_number_structure,
order,
completeness,
domain,
boundedness,
convergence_mode,
continuity_conditions,
differentiability_conditions
],
infer_through: [
suprema,
infima,
sequences,
cauchy_sequences,
function_limits,
continuity,
derivatives,
riemann_integrals,
series,
compactness
],
avoid: [
assuming_bounded_sequence_converges,
confusing_pointwise_with uniform convergence,
claiming_continuity_implies differentiability,
applying_heine_borel_in infinite-dimensional spaces,
interchanging_limits_without hypotheses,
ignoring_domain_and_endpoint conditions
]
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
validate(new_information)
-> identify(real_analysis_context)
-> compare(existing_relations)
-> preserve(completeness_order_domain_and_limit_invariants)
-> update(affected_entities)
-> update(affected_edges)
-> recompute(CONFIDENCE)
-> regenerate(FLOW_HASH)
# ---------- FLOW HASH ----------
FLOW_HASH := hash(
SOURCE_URL
+ ENTITY
+ CONCEPTS
+ REAL_ANALYSIS
+ REAL_NUMBERS
+ COMPLETENESS
+ SUPREMUM
+ SEQUENCE
+ CONTINUITY
+ DIFFERENTIABILITY
+ RIEMANN_INTEGRAL
+ SERIES
+ COMPACTNESS
+ SEMANTIC_EQUIVALENCE
+ CONSTRAINTS
)
# ---------- EXECUTION ----------
INPUT(query)
-> REAL_ANALYSIS
-> ENTITY_IDENTIFICATION
-> STRUCTURE_CLASSIFICATION
-> ORDER_BOUNDEDNESS_ANALYSIS
-> LIMIT_CONVERGENCE_ANALYSIS
-> DEFINITION_SELECTION
-> THEOREM_HYPOTHESIS_VALIDATION
-> COMPLETENESS_COMPACTNESS_ANALYSIS
-> CONTINUITY_DIFFERENTIABILITY_ANALYSIS
-> INTEGRATION_SERIES_ANALYSIS
-> LIMIT_OPERATION_VALIDATION
-> RECURSIVE_REASONING(query)
-> CONFIDENCE
-> OUTPUT(semantic_result)
END FLOW
Download Code
Copy to Clipboard