flow "RealNumberSystemOntology" v1.0
# ============================================================
# REAL NUMBER SYSTEM ONTOLOGY — FLOW ALGEBRA
# ============================================================
SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/real-analysis/real-number-system-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Real Analysis"
ENTITY := "Real Number System"
# ---------- CORE ENTITY ----------
REAL_NUMBER_SYSTEM := {
type: CompleteOrderedField,
domain: RealAnalysis,
symbol: "R",
purpose: "Represent the complete ordered field of real numbers that provides the numerical foundation for real analysis and calculus."
}
# ---------- CORE CONCEPTS ----------
CONCEPTS := {
REAL_NUMBER,
REAL_NUMBERS,
NATURAL_NUMBERS,
INTEGERS,
RATIONAL_NUMBERS,
IRRATIONAL_NUMBERS,
FIELD,
ORDERED_FIELD,
COMPLETENESS,
SUPREMUM,
INFIMUM,
ABSOLUTE_VALUE,
INTERVAL,
ARCHIMEDEAN_PROPERTY,
DENSITY
}
# ---------- NUMBER HIERARCHY ----------
NATURAL_NUMBERS
subset_of INTEGERS
INTEGERS
subset_of RATIONAL_NUMBERS
RATIONAL_NUMBERS
subset_of REAL_NUMBERS
IRRATIONAL_NUMBERS
subset_of REAL_NUMBERS
REAL_NUMBERS
=
RATIONAL_NUMBERS
union
IRRATIONAL_NUMBERS
RATIONAL_NUMBERS
intersection
IRRATIONAL_NUMBERS
= EMPTY_SET
# ---------- REAL NUMBER ----------
REAL_NUMBER
:= element_of(REAL_NUMBERS)
REAL_NUMBERS
:= R
R
-> COMPLETE_ORDERED_FIELD
# ---------- FIELD STRUCTURE ----------
FIELD_OPERATIONS := {
ADDITION,
SUBTRACTION,
MULTIPLICATION,
DIVISION_BY_NONZERO
}
R
-> closed_under(ADDITION)
-> closed_under(SUBTRACTION)
-> closed_under(MULTIPLICATION)
-> closed_under(DIVISION_BY_NONZERO)
# ---------- ADDITIVE STRUCTURE ----------
for
a,b,c in R
a+b
= b+a
(a+b)+c
= a+(b+c)
exists
0 in R
such_that
a+0
= a
for each a
exists -a
such_that
a+(-a)
= 0
# ---------- MULTIPLICATIVE STRUCTURE ----------
for
a,b,c in R
a*b
= b*a
(a*b)*c
= a*(b*c)
exists
1 in R
such_that
a*1
= a
for
a != 0
exists
a^(-1)
such_that
a*a^(-1)
= 1
# ---------- DISTRIBUTIVITY ----------
a*(b+c)
=
a*b + a*c
DISTRIBUTIVE_LAW
-> connects(ADDITION, MULTIPLICATION)
# ---------- ORDER STRUCTURE ----------
for
a,b in R
exactly_one_of:
a < b
a = b
a > b
ORDER
-> TOTAL_ORDER
if
a < b
then
a+c
< b+c
if
a < b
AND c > 0
then
a*c
< b*c
FIELD
+ COMPATIBLE_TOTAL_ORDER
-> ORDERED_FIELD
# ---------- POSITIVE / NEGATIVE ----------
POSITIVE_REAL
:= x > 0
NEGATIVE_REAL
:= x < 0
NONNEGATIVE_REAL
:= x >= 0
SIGN
-> determined_by(ORDER_RELATION_TO_ZERO)
# ---------- ABSOLUTE VALUE ----------
abs(x)
:= {
x, if x >= 0
-x, if x < 0
}
ABSOLUTE_VALUE
-> distance_from_zero
abs(x-y)
-> distance_between(x,y)
# ---------- ABSOLUTE VALUE PROPERTIES ----------
abs(x)
>= 0
abs(x)
= 0
iff
x = 0
abs(x*y)
=
abs(x)*abs(y)
abs(x+y)
<=
abs(x)+abs(y)
TRIANGLE_INEQUALITY
-> fundamental_metric_property
# ---------- METRIC ----------
d(x,y)
:= abs(x-y)
REAL_NUMBERS
-> METRIC_SPACE
METRIC
-> supports(CONVERGENCE)
-> supports(CONTINUITY)
-> supports(OPEN_AND_CLOSED_SETS)
# ---------- COMPLETENESS ----------
LEAST_UPPER_BOUND_PROPERTY:
if
A subset_of R
AND A nonempty
AND A bounded_above
then
exists
sup(A) in R
COMPLETENESS
-> defining_difference_between(R_AND_Q)
# ---------- SUPREMUM ----------
s
:= sup(A)
iff
s
-> UPPER_BOUND_OF(A)
and
for every upper bound u of A:
s <= u
SUPREMUM
-> least_upper_bound
# ---------- INFIMUM ----------
m
:= inf(A)
iff
m
-> LOWER_BOUND_OF(A)
and
for every lower bound l of A:
l <= m
INFIMUM
-> greatest_lower_bound
# ---------- CAUCHY COMPLETENESS ----------
sequence
:= (x_n)
if
x_n is Cauchy_in_R
then
exists
x in R
such_that
x_n -> x
CAUCHY_COMPLETENESS
-> equivalent_to(ORDER_COMPLETENESS)
in(REAL_NUMBER_SYSTEM)
# ---------- MONOTONE COMPLETENESS ----------
if
sequence increasing
AND bounded_above
then
sequence
-> converges_in(R)
if
sequence decreasing
AND bounded_below
then
sequence
-> converges_in(R)
MONOTONE_CONVERGENCE
-> consequence_of(COMPLETENESS)
# ---------- ARCHIMEDEAN PROPERTY ----------
for
x in R
exists
n in NATURAL_NUMBERS
such_that
n > x
ARCHIMEDEAN_PROPERTY
-> no_infinite_real_number
also
for
epsilon > 0
exists
n in NATURAL_NUMBERS
such_that
1/n < epsilon
# ---------- DENSITY OF RATIONALS ----------
for
x,y in R
with x < y
exists
q in RATIONAL_NUMBERS
such_that
x < q < y
RATIONAL_NUMBERS
-> DENSE_IN(R)
# ---------- DENSITY OF IRRATIONALS ----------
for
x < y
exists
r in IRRATIONAL_NUMBERS
such_that
x < r < y
IRRATIONAL_NUMBERS
-> DENSE_IN(R)
# ---------- RATIONAL NUMBERS ----------
RATIONAL_NUMBER
:= p/q
where
p in INTEGERS
q in INTEGERS
q != 0
Q
-> ORDERED_FIELD
-/> COMPLETE
RATIONAL_NUMBERS
-> dense_in(R)
# ---------- IRRATIONAL NUMBERS ----------
IRRATIONAL_NUMBER
:= real_number_not_in(Q)
examples:
sqrt(2)
pi
e
IRRATIONALS
-> required_to_complete(RATIONAL_NUMBER_LINE)
# ---------- DECIMAL REPRESENTATION ----------
REAL_NUMBER
-> may_be_represented_by(DECIMAL_EXPANSION)
RATIONAL_NUMBER
-> terminating_or_eventually_periodic_decimal
IRRATIONAL_NUMBER
-> nonterminating_nonperiodic_decimal
DECIMAL_REPRESENTATION
-> not_always_unique_in_symbolic_form
because(e.g._0.999...=1)
# ---------- INTERVALS ----------
OPEN_INTERVAL
:= (a,b)
= {
x in R :
a < x < b
}
CLOSED_INTERVAL
:= [a,b]
= {
x in R :
a <= x <= b
}
HALF_OPEN_INTERVAL
-> [a,b)
-> (a,b]
INTERVAL
-> connected_subset_of(R)
# ---------- UNBOUNDED INTERVALS ----------
(a,infinity)
(-infinity,b)
[a,infinity)
(-infinity,b]
INFINITY
-/> REAL_NUMBER
INFINITY_SYMBOL
-> denotes(UNBOUNDED_DIRECTION)
# ---------- EXTENDED REAL NUMBERS ----------
EXTENDED_REAL_LINE
:= R union {
-infinity,
+infinity
}
EXTENDED_REALS
-/> FIELD
EXTENDED_REALS
-> useful_for(LIMITS_AND_MEASURE_THEORY)
# ---------- CARDINALITY ----------
REAL_NUMBERS
-> UNCOUNTABLE
RATIONAL_NUMBERS
-> COUNTABLE
IRRATIONAL_NUMBERS
-> UNCOUNTABLE
CANTOR_DIAGONAL_ARGUMENT
-> proves(UNCOUNTABILITY_OF_R)
# ---------- CONTINUUM ----------
CARDINALITY(R)
:= CONTINUUM
REAL_LINE
-> geometric_model_of(R)
POINT_ON_REAL_LINE
<-> REAL_NUMBER
# ---------- APPLICATIONS ----------
REAL_NUMBER_SYSTEM
-> foundation_of(REAL_ANALYSIS)
-> foundation_of(CALCULUS)
-> applied_to(MEASUREMENT)
-> applied_to(GEOMETRY)
-> applied_to(PROBABILITY)
-> applied_to(DIFFERENTIAL_EQUATIONS)
-> applied_to(NUMERICAL_ANALYSIS)
# ---------- RELATION GRAPH ----------
NATURAL_NUMBERS
-> subset_of(INTEGERS)
INTEGERS
-> subset_of(RATIONAL_NUMBERS)
RATIONAL_NUMBERS
-> subset_of(REAL_NUMBERS)
REAL_NUMBERS
-> partitioned_into(RATIONALS, IRRATIONALS)
FIELD
+ ORDER
+ COMPLETENESS
-> REAL_NUMBER_SYSTEM
ABSOLUTE_VALUE
-> induces(METRIC)
COMPLETENESS
-> supports(LIMIT_AND_CONVERGENCE_THEORY)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
"real number system" ~= "complete ordered field of real numbers",
"real line" ~= "geometric representation of the real numbers",
"least upper bound property" ~= "order completeness of the real numbers",
"absolute value" ~= "distance from zero on the real line",
"rational number" ~= "ratio of two integers with nonzero denominator",
"irrational number" ~= "real number that is not rational"
}
# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
real_numbers_form_complete_ordered_field: true,
rational_numbers_are_not_complete: true,
infinity_is_not_real_number: true,
extended_real_line_is_not_field: true,
rational_and_irrational_numbers_partition_reals: true,
decimal_representation_can_have_equivalent_forms: true,
completeness_must_not_be_confused_with_algebraic_closure: true
}
# ---------- CONFIDENCE ----------
CONFIDENCE := {
core_definition: 0.99,
field_structure: 0.99,
order_structure: 0.99,
completeness_relation: 0.99,
rational_irrational_relation: 0.99,
metric_interval_relation: 0.99,
semantic_equivalence: 0.97
}
# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
identify(number_or_set)
-> classify(natural_integer_rational_irrational_or_real)
-> identify(field_and_order_operations)
-> analyse(bounds_if_set)
-> compute_or_reason_about(supremum_or_infimum_if_relevant)
-> apply(completeness_if_limit_structure_present)
-> analyse(absolute_value_metric_or_interval_structure)
-> apply(archimedean_or_density_properties_if_requested)
-> distinguish(real_and_extended_real_context)
-> validate(number_system_constraints)
-> return(semantic_result)
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
parse_as: "typed real-number-system semantic graph",
primary_entity: REAL_NUMBER_SYSTEM,
preserve: [
number_class,
field_operations,
order_relation,
completeness,
bounds,
interval_structure,
metric_structure
],
infer_through: [
natural_numbers,
integers,
rationals,
irrationals,
suprema,
infima,
absolute_values,
density,
archimedean_property
],
avoid: [
treating_infinity_as real number,
claiming_rationals_are complete,
confusing_completeness_with algebraic closure,
assuming_unique_decimal notation,
confusing_extended_reals_with field,
omitting_nonzero_denominator_for rational numbers
]
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
validate(new_information)
-> identify(real_number_system_context)
-> compare(existing_relations)
-> preserve(field_order_and_completeness_invariants)
-> update(affected_entities)
-> update(affected_edges)
-> recompute(CONFIDENCE)
-> regenerate(FLOW_HASH)
# ---------- FLOW HASH ----------
FLOW_HASH := hash(
SOURCE_URL
+ ENTITY
+ CONCEPTS
+ REAL_NUMBER_SYSTEM
+ REAL_NUMBERS
+ FIELD_OPERATIONS
+ ORDER
+ COMPLETENESS
+ SUPREMUM
+ INFIMUM
+ ABSOLUTE_VALUE
+ ARCHIMEDEAN_PROPERTY
+ DENSITY
+ SEMANTIC_EQUIVALENCE
+ CONSTRAINTS
)
# ---------- EXECUTION ----------
INPUT(query)
-> REAL_NUMBER_SYSTEM
-> NUMBER_SET_IDENTIFICATION
-> NUMBER_CLASSIFICATION
-> FIELD_OPERATION_ANALYSIS
-> ORDER_ANALYSIS
-> BOUND_SUPREMUM_INFIMUM_ANALYSIS
-> COMPLETENESS_ANALYSIS
-> METRIC_INTERVAL_ANALYSIS
-> ARCHIMEDEAN_DENSITY_ANALYSIS
-> REAL_EXTENDED_REAL_CLASSIFICATION
-> CONSTRAINT_VALIDATION
-> RECURSIVE_REASONING(query)
-> CONFIDENCE
-> OUTPUT(semantic_result)
END FLOW
Download Code
Copy to Clipboard