What problem does it solve?
Representing abstract, potentially infinite mathematical sets and constructions on finite machines is challenging because implementations must balance formal correctness with performance and usability. This skill provides architectural patterns to model sets, operations, and number constructions so implementations remain practical while retaining a verifiable mathematical foundation.
Core Features & Use Cases
- Extensional vs Intensional Representations: Model finite sets by explicit membership and infinite or comprehension-defined sets by predicates over a domain.
- Dual-Mode Architecture: Separate a fast Kernel (practical, native-backed values) from a Construction mode (axiomatic, set-theoretic constructions) and use isomorphism testing to relate them.
- Lazy Evaluation for Large/Infinite Sets: Represent power sets and cartesian products lazily to avoid materializing exponentially large or infinite collections.
- Use Cases: Designing theorem provers, symbolic algebra libraries, verified numeric libraries, and educational tools that demonstrate formal constructions with performant runtime representations.
Quick Start
Show me Kotlin implementations for an ExtensionalSet of the first five natural numbers, an IntensionalSet for even numbers, and a LazyPowerSet sketch that generates subsets lazily.