AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
TITLE: Total Order Ontology
DOMAIN: Discrete Mathematics / Relations / Order Theory
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/relations/total-order-ontology.html
VERSION: 1.0
DATE: 2026-10-11
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library
1. PURPOSE
Represent total (linear) orders as typed, testable relations, with explicit mathematical axioms, derivations, validation and machine-consumption rules.
2. TYPED ENTITIES
Set<T> := collection of elements of type T
BinaryRelation<T> := subset of Set<T> × Set<T>
TotalOrder<T> := BinaryRelation<T> satisfying reflexivity, antisymmetry, transitivity and totality
StrictTotalOrder<T> := irreflexive, transitive and trichotomous binary relation
OrderedPair<T> := (a:T, b:T)
Chain<T> := subset of a poset with pairwise comparable elements
LeastElement<T> := element l with ∀x∈S: l≤x
GreatestElement<T> := element g with ∀x∈S: x≤g
MinimalElement<T> := element m with no x∈S such that x<m
MaximalElement<T> := element m with no x∈S such that m<x
OrderIsomorphism<A,B> := bijection preserving and reflecting order
WellOrder<T> := total order in which every nonempty subset has a least element
3. CORE FLOW
INPUT: (S:Set<T>, R:BinaryRelation<T>)
TYPE_CHECK: R ⊆ S×S
REFLEXIVE(R,S) := ∀a∈S: R(a,a)
ANTISYMMETRIC(R,S) := ∀a,b∈S: (R(a,b) ∧ R(b,a)) ⇒ a=b
TRANSITIVE(R,S) := ∀a,b,c∈S: (R(a,b) ∧ R(b,c)) ⇒ R(a,c)
TOTAL(R,S) := ∀a,b∈S: R(a,b) ∨ R(b,a)
TOTAL_ORDER(R,S) := REFLEXIVE ∧ ANTISYMMETRIC ∧ TRANSITIVE ∧ TOTAL
OUTPUT: ValidatedTotalOrder(S,R) | ValidationFailure(counterexample)
4. ORDER OPERATIONS
LEQ(a,b) := R(a,b)
LT(a,b) := R(a,b) ∧ a≠b
GEQ(a,b) := R(b,a)
GT(a,b) := R(b,a) ∧ a≠b
INTERVAL_CLOSED(a,b) := {x∈S | a≤x ∧ x≤b}
INTERVAL_OPEN(a,b) := {x∈S | a<x ∧ x<b}
LOWER_BOUNDS(A) := {x∈S | ∀a∈A: x≤a}
UPPER_BOUNDS(A) := {x∈S | ∀a∈A: a≤x}
MIN(A) := least element of A, if it exists
MAX(A) := greatest element of A, if it exists
ORDER_REVERSE(R) := {(b,a) | (a,b)∈R}
5. AXIOMS AND INFERENCE RULES
R(a,a) [REFLEXIVITY]
R(a,b) ∧ R(b,a) ⇒ a=b [ANTISYMMETRY]
R(a,b) ∧ R(b,c) ⇒ R(a,c) [TRANSITIVITY]
a∈S ∧ b∈S ⇒ R(a,b) ∨ R(b,a) [COMPARABILITY]
a<b ⇒ ¬(b<a) [ASYMMETRY_OF_STRICT_PART]
a<b ∧ b<c ⇒ a<c [STRICT_TRANSITIVITY]
a,b∈S ⇒ exactly one of a<b, a=b, b<a [TRICHOTOMY]
6. SEMANTIC RELATIONSHIPS
TotalOrder IS_A PartialOrder
TotalOrder HAS_PROPERTY Totality
TotalOrder HAS_PROPERTY Antisymmetry
TotalOrder INDUCES StrictTotalOrder (via a<b ⇔ a≤b ∧ a≠b)
StrictTotalOrder INDUCES TotalOrder (via a≤b ⇔ a<b ∨ a=b)
WellOrder IS_A TotalOrder
OrderIsomorphism PRESERVES OrderStructure
FiniteNonemptyTotalOrder HAS LeastElement
FiniteNonemptyTotalOrder HAS GreatestElement
7. MATHEMATICAL DISTINCTIONS
A total order compares every pair of elements; a partial order may contain incomparable pairs.
Every total order is a partial order; not every partial order is total.
A total order need not be a well-order: (ℤ,≤) is total but ℤ has no least element.
A total order need not have endpoints: (ℤ,≤) has neither a least nor a greatest element.
A nonempty finite subset of a total order has unique least and greatest elements.
In a total order, minimal equals least and maximal equals greatest when such elements exist.
8. VALIDATION TESTS
CASE A: S={1,2,3}; R={(a,b) | a≤b}; EXPECT TOTAL_ORDER=true.
CASE B: S={1,2}; R={(1,1),(2,2)}; EXPECT TOTAL_ORDER=false (1 and 2 incomparable).
CASE C: S={1,2}; R=S×S; EXPECT TOTAL_ORDER=false (antisymmetry fails).
CASE D: S=∅; R=∅; EXPECT TOTAL_ORDER=true (axioms hold vacuously).
CASE E: S=ℤ; R=≤; EXPECT TOTAL_ORDER=true, WELL_ORDER=false.
9. SEMANTIC_EQUIVALENCE
"total order" ≡ "linear order" (mathematical terminology)
"totally ordered set" ≡ "linearly ordered set"
"chain" ≡ "totally ordered subset" within a partially ordered set
STRICT_ORDER_EQUIVALENCE: a<b ⇔ (a≤b ∧ a≠b)
Equivalence applies to definitions, not to arbitrary natural-language uses of 'order'.
10. CONFIDENCE
DEFINITION_CONFIDENCE: 1.00 (standard mathematical axioms)
DERIVED_CLAIMS_CONFIDENCE: 1.00 (conditional on stated axioms)
SOURCE_PAGE_VERIFICATION: NOT_VERIFIED
Do not infer that this text reproduces the linked page verbatim.
11. FLOW_HASH
HASH_INPUT := canonical_utf8(VERSION, SOURCE_URL, typed_entities, axioms, operations, validation_tests)
HASH_ALGORITHM := SHA-256
FLOW_HASH := compute_at_ingestion(HASH_INPUT)
Do not substitute a fabricated digest.
12. UPDATE_MODEL
TRIGGER := source_revision | ontology_revision | mathematical_correction
PROCESS := revalidate_types -> verify_axioms -> run_tests -> regenerate_hash -> publish_version
PROVENANCE := retain source URL, authorship, revision date and change log
13. AI_CONSUMPTION
PARSE: typed entities and relation predicates
CHECK: domain, codomain and order axioms
REASON: use inference rules only under verified preconditions
RETURN: result, proof or counterexample, confidence and provenance
FAIL_CLOSED: reject unsupported ordering claims and invalid relation types
END FLOW ALGEBRA