Axiomatic Construction of Number Systems and Mathematical Objects

Express axioms and mathematical structures as composable Go interface contracts, independent of their concrete representation.

← Mathematical Foundations projects

Experience Research Mathematical Foundations

Question

How can Go interfaces describe what a mathematical object does without deciding how it is represented?

Goals

  • Translate the operations of an axiomatic definition into small, behavioural Go interfaces.
  • Compose interfaces to model number systems and structures such as sets, points, vectors, regions, graphs, and manifolds.
  • Write algorithms against the abstraction, then test that different implementations obey the required mathematical laws.

Method

Treat an interface as a contract for observable behaviour: the methods expose the permitted operations, while documentation and tests record laws that a Go type cannot enforce by its signature alone.

  • Isolate primitive behaviours such as equality, addition, multiplication, order, membership, and mapping.
  • Build larger concepts by embedding smaller interfaces—for example, additive and multiplicative structures into real numbers, or finite maps into points and vectors.
  • Implement more than one concrete representation and reuse the same algorithms for square roots, distance, region subdivision, or graphing.
  • Check identities, inverses, closure, dimensions, and other invariants with law-based tests, and identify assumptions such as completeness that remain outside the type system.