delta_analysis v0.1: Initial implementation of discrete analysis foundations
Release v0.1.0 – Δ‑analysis Library: A Constructive Refounding of Mathematical Analysis
We are thrilled to announce the first public release of the Δ‑analysis library, a modern C++20 implementation of a radical reformulation of mathematical analysis. Instead of assuming a pre‑existing continuum, Δ‑analysis builds everything from a single elementary operation: between any two addresses a new one can be inserted. This process generates finite grids that converge to a continuum – but the continuum is never a primitive; it remains a regulative horizon.
This library strives to translate the theoretical framework (detailed in our 900‑page monograph, DOI:10.5281/zenodo.18761044) into a practical tool for constructive numerical methods, adaptive algorithms, and explorations of non‑classical geometries (p‑adic, tree‑based, matrix spaces, etc.).
✨ Key Features Right Now
1. Regulative Ideas as First‑Class Citizens
Choose the geometric structure of your computation:
- Linear order with Euclidean metric (classical real analysis).
- p‑adic metric for non‑archimedean experiments.
- Tree‑based betweenness (binary strings) with ultrametric – integrate the Dirichlet function without measure theory.
- Matrix‑valued addresses (
Eigen::MatrixXd) for tensor field approximations.
Easily add your own by implementing simple concepts (Betweenness,Metric).
2. Flexible Grid Refinement
- Static operators: midpoint, fixed‑λ, user‑defined.
- Dynamic operators: change the insertion rule with the level.
- Adaptive operators: insert points based on the function’s local variation – the library’s
AdaptiveDeltaPathclusters points where they are needed most, dramatically accelerating convergence for functions with sharp features.
3. Operational Functions
Store and extend function values consistently across refinement levels. Specialised for UniformGrid, it provides O(1) access – ideal for repeated evaluations in loops.
4. Calculus on Grids
- Riemann sums (left, right, tagged, tree‑adapted).
- Continuity checks with arbitrary moduli (
PowerModulus,LogarithmicModulus). - Differentiability checks comparing one‑sided difference quotients against a convergence modulus.
5. Performance & Reliability
- OpenMP acceleration for computing maximal oscillation (optional).
- Double buffering in
DeltaPath::advance()to minimise allocations. - Exact rational arithmetic with configurable precision (dynamic or stack‑allocated via Boost.Multiprecision).
- Comprehensive test suite (95%+ coverage) and Google Benchmarks to track performance.
6. Examples & Benchmarks
- Dirichlet function on binary strings – becomes locally constant under the tree regulative idea; its integral converges to ½.
- Adaptive refinement of |x‑0.5| – points cluster at the corner, runtime stays almost constant as accuracy increases.
- Matrix‑valued functions – integrate the identity on [0·I, I] and obtain 0.5·I.
- Non‑commutativity demo – applying λ=1/3 and λ=2/3 in different orders yields different intermediate grids, proving that Δ‑analysis captures the process, not just the limit.
🚀 Quick Start
#include <delta/core/adaptive_delta_path.h>
#include <delta/core/rational.h>
#include <iostream>
using namespace delta;
int main() {
// Function with a corner: |x - 1/2|
auto func = [](const Rational& x) {
return abs(x - Rational(1,2));
};
// Adaptive operator with threshold 0.1 and epsilon 0.05
AdaptiveOperator adapt_op(Rational(1,10), Rational(1,20));
std::vector<Rational> init = {0_r, 1_r};
// Build adaptive path – threshold 0.01
auto path = AdaptiveDeltaPath<Rational, Rational, Rational,
LessBetweenness, EuclideanMetric,
EuclideanValueMetric, AdaptiveOperator>(
init, func, adapt_op, Rational(1,100)
);
// Perform 10 refinement steps
for (int i = 0; i < 10; ++i) path.advance();
std::cout << "Points after adaptive refinement: " << path.size() << "\n";
// Points cluster around 0.5, while linear parts remain coarse.
return 0;
}For more examples, see the examples/ and tests/ directories.
📦 Building
Requirements:
- CMake 3.15+
- C++20 compiler (MSVC 19.29+, GCC 11+, Clang 14+)
- vcpkg recommended for dependencies (Boost, Eigen3, fmt, Google Test, Google Benchmark)
Using CMake Presets (Windows/Linux/macOS):
# Configure and build (example for Windows Debug)
cmake --preset x64-debug
cmake --build out/build/x64-debug
# Run tests
cd out/build/x64-debug
ctest --output-on-failureSee the README for detailed instructions.
📚 Documentation & Theory
- Full mathematical exposition: Zenodo DOI:10.5281/zenodo.18761044 (900+ pages).
- Doxygen comments in headers – the primary reference for the API.
- Test suite – every feature is demonstrated and verified.
📄 License
This project is dual‑licensed:
- Non‑commercial use: CC BY‑NC‑SA 4.0
- Commercial use: separate agreement required – contact timohaishimcev@gmail.com
🙏 Acknowledgements
- Boost.Multiprecision for the
Rationaltype. - Eigen for linear algebra.
- {fmt} for modern formatting.
- Google Test and Google Benchmark for testing and benchmarking.
🔮 What’s Next?
- Extended regulative ideas: graphs, categories, stochastic processes.
- Δ‑differential equations: adaptive solvers with rigorous error bounds.
- Higher dimensions: tensor grids and finite element style refinement.
- Performance optimisations: GPU support, parallel adaptive refinement.
We welcome issues, discussions, and ideas. Pull requests are generally not accepted (the library follows a planned roadmap), but exceptional contributions aligned with the vision may be considered.
Explore the discrete foundations of analysis and numerical methods with Δ‑analysis.
Star the repo, try the code, and let us know what you build!