This is a (work-in-progress) database of additively indecomposable totally positive integral elements over number fields.
For a given a number field
Given a number field
Sage code to enumerate all additively indecomposable elements (modulo totally positive units) is provided in the scripts folder, tables of data is given in the data folder, and various plots of the data is given in the plots folder.
Any contributions to either the code or data are very welcome!
After installing Sage (see Development section below), you can compute indecomposables for totally real number fields using the provided shell script.
Compute indecomposables for degree 3 fields with discriminants between 1 and 100:
./compute_indecomposables.sh 3 1 100This will:
- Process all degree 3 fields from
totally_real_fields/deg3.txt - Filter fields with discriminants in the range [1, 100]
- Output results to
results_deg3.txt - Show basic progress information
./compute_indecomposables.sh DEGREE DISC_MIN DISC_MAX [options]
Required Arguments:
DEGREE: Degree of number fields to process (3, 4, 5, etc.)DISC_MIN: Minimum discriminant valueDISC_MAX: Maximum discriminant value (required)
Options:
-v, --verbose: Enable verbose console output (shows detailed progress)-d, --debug: Enable debug console logging--num-threads N: Set total thread count for parallel processing (default: 1)--thread-id I: Set thread ID for distributed computation (default: 0)-h, --help: Show help message
# Degree 3 fields, discriminants 1-100, basic mode
./compute_indecomposables.sh 3 1 100
# Degree 4 fields, discriminants 1-500, with verbose output
./compute_indecomposables.sh 4 1 500 --verbose
# Large computation with multiple threads
./compute_indecomposables.sh 5 1 10000 --num-threads 4
# Distributed computation (process part of a larger range)
./compute_indecomposables.sh 3 1 10000 --num-threads 4 --thread-id 0
# With debug logging
./compute_indecomposables.sh 3 1 100 --debugThe script supports distributed computation across multiple processes. Use run_parallel.sh to automatically split the work:
./run_parallel.sh DEGREE DISC_MIN DISC_MAX NUM_PROCESSESThis project requires Sage for number field computations.
indecomposables/
├── scripts/ # Core computation code
│ ├── main.py # NumberFieldData class with optimized algorithm selection
│ ├── real_quadratic.py # Dress-Scharlau algorithm for quadratic fields
│ ├── simplest_cubic.py # Kala-Tinková classification for cubic fields
│ ├── demo_real_quadratic.py # Performance demo for quadratic fields
│ └── demo_simplest_cubic.py # Performance demo for cubic fields
├── data/ # Database files (pipe-delimited, PostgreSQL-compatible)
├── plots/ # Visualization and analysis
├── tests/ # Test suite
│ ├── test_main.py # Main NumberFieldData tests
│ ├── test_real_quadratic.py # RealQuadraticField tests
│ └── test_simplest_cubic.py # SimplestCubicField tests
└── Makefile # Development commands
See scripts/README.md for detailed API documentation of the NumberFieldData class.
Quick example:
from sage.all import QQ, PolynomialRing
from main import NumberFieldData
# Create a number field
R = PolynomialRing(QQ, 'x')
K = QQ.extension(R.gen()**3 - 2, names='a')
# Compute indecomposables
nfd = NumberFieldData(label="3.3.49.1", field=K)
indecomps = nfd.compute_indecomposables()
print(f"Found {len(indecomps)} indecomposables")