FLOW ALGEBRA
TITLE: Equality Ontology
DOMAIN: Mathematical Relationships / Relationship Ontologies
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/mathematical-relationships/equality-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source page not independently verified.
flow "EqualityOntology" v1.0 {
ontology:
id: "kireth:relationship:mathematical:equality"
label: "Equality Ontology"
scope: "Typed mathematical equality, substitution, normalisation, and proof-aware inference"
types:
Entity: { id: IRI, type: IRI, label: String? }
Expression: { syntax: String, sort: IRI, unit: String?, context: IRI? }
EqualityAssertion: { lhs: -Expression, rhs: -Expression, context: IRI?, evidence: Evidence?, confidence: Decimal }
Evidence: { method: String, source: IRI?, proof: String?, timestamp: DateTime? }
ValidationResult: { valid: Boolean, errors: List[String], warnings: List[String] }
relations:
EQUALS(a: -Expression, b: -Expression) -> Boolean
NOT_EQUALS(a: -Expression, b: -Expression) -> Boolean
SAME_SORT(a: -Expression, b: -Expression) -> Boolean
EQUIVALENT_UNDER(a: -Expression, b: -Expression, assumptions: Set[String]) -> Boolean
DERIVED_FROM(assertion: EqualityAssertion, evidence: Evidence) -> Boolean
axioms:
reflexivity: forall x: -Expression . EQUALS(x,x)
symmetry: forall x,y: -Expression . EQUALS(x,y) => EQUALS(y,x)
transitivity: forall x,y,z: -Expression . (EQUALS(x,y) and EQUALS(y,z)) => EQUALS(x,z)
substitutivity: forall x,y: -Expression, f: Function . EQUALS(x,y) and defined(f,x) and defined(f,y) => EQUALS(f(x),f(y))
consistency: forall x,y: -Expression . not (EQUALS(x,y) and NOT_EQUALS(x,y))
inference:
- name: "equality_chain"
when: ["EQUALS(a,b)", "EQUALS(b,c)"]
then: "EQUALS(a,c)"
justification: "transitivity"
- name: "symmetric_equality"
when: ["EQUALS(a,b)"]
then: "EQUALS(b,a)"
justification: "symmetry"
- name: "substitute_equals"
when: ["EQUALS(a,b)", "well_typed(f,a)", "well_typed(f,b)"]
then: "EQUALS(f(a),f(b))"
justification: "congruence"
SEMANTIC_EQUIVALENCE:
equal: "exact identity of mathematical value under declared interpretation"
distinct_from: ["approximate_equality", "similarity", "isomorphism", "syntactic_identity"]
canonical_symbols: ["=", "equals"]
assumptions_required: true
CONFIDENCE:
range: [0.0, 1.0]
formal_proof: 1.0
unverified_assertion: "retain supplied confidence; never silently promote to certainty"
composition: "track evidence and inference provenance; do not treat confidence as proof"
validation:
- "Operands must have compatible mathematical sorts."
- "Quantities with units require compatible dimensions and explicit conversions."
- "Substitution must preserve domains and definedness."
- "Approximate numerical equality must use a separately declared tolerance relation."
- "Contradictory equalities and inequalities must be flagged within the same context."
- "Context-dependent equalities must retain their assumptions."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonical serialisation of ontology version, assertions, assumptions, and rules"
output: "hex digest computed at execution; no precomputed value asserted"
UPDATE_MODEL:
strategy: "versioned immutable revisions"
on_change: ["revalidate dependent assertions", "recompute canonical hash", "preserve previous provenance"]
AI_CONSUMPTION:
format: "typed machine-readable ontology"
capabilities: ["equality resolution", "symbolic substitution", "proof-aware retrieval", "consistency checking"]
guardrails: ["do not confuse equivalence with similarity", "do not invent proofs", "respect contexts and units"]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard