| Crates.io | ppflib |
| lib.rs | ppflib |
| version | 0.1.0 |
| created_at | 2025-07-09 15:26:04.984824+00 |
| updated_at | 2025-07-09 15:26:04.984824+00 |
| description | Advanced computational library for Physics-Prime Factorization (PPF): quantum mechanics through number theory, featuring Sign Prime (-1), state space collapse, topological analysis, and IOT geometric realizations |
| homepage | https://github.com/IreGaddr/ppflib |
| repository | https://github.com/IreGaddr/ppflib |
| max_upload_size | |
| id | 1745037 |
| size | 374,812 |
A comprehensive Rust library implementing the Physics-Prime Factorization (PPF) mathematical framework for exploring quantum mechanics through number theory.
The PPF framework extends classical number theory by treating -1 as a special "Sign Prime", creating multiple valid factorizations for integers and enabling a number-theoretic model of quantum phenomena. This library provides a complete implementation with algebraic, topological, and geometric realizations.
Add this to your Cargo.toml:
[dependencies]
ppflib = "0.1.0"
use ppflib::prelude::*;
fn main() -> Result<(), FactorizationError> {
// Create factorization state spaces
let classical = FactorizationStateSpace::new(6)?; // S(6) - classical state
let quantum = FactorizationStateSpace::new(-6)?; // S(-6) - quantum state
println!("S(6) has {} factorizations", classical.size());
println!("S(-6) has {} factorizations", quantum.size());
// Demonstrate quantum collapse: (-2) × (-3) = 6
let s_neg2 = FactorizationStateSpace::new(-2)?;
let s_neg3 = FactorizationStateSpace::new(-3)?;
let result = StateSpaceOperations::multiply(&s_neg2, &s_neg3)?;
if result.collapse_info.collapsed {
println!("✓ Quantum collapse: (-2) × (-3) → 6");
println!("Collapse ratio: {:.2}", result.collapse_info.collapse_ratio);
}
Ok(())
}
Every integer n has a state space S(n) containing all valid P-factorizations:
use ppflib::prelude::*;
let s6 = FactorizationStateSpace::new(6)?;
for factorization in s6.factorizations() {
println!("{}", factorization); // "2 × 3", "-2 × -3"
}
// Negative integers create quantum state spaces
let s_neg6 = FactorizationStateSpace::new(-6)?;
for factorization in s_neg6.factorizations() {
println!("{}", factorization); // "-1 × 2 × 3", "-2 × 3", "2 × -3"
}
When two quantum states multiply, they can collapse to classical states:
let s_neg2 = FactorizationStateSpace::new(-2)?; // Quantum state
let s_neg3 = FactorizationStateSpace::new(-3)?; // Quantum state
let result = StateSpaceOperations::multiply(&s_neg2, &s_neg3)?;
// Result is S(6) - a classical state!
assert!(result.collapse_info.collapsed);
assert_eq!(result.result_space.value(), 6);
See the complete quantum collapse demonstration:
cargo run --example 01_basic_factorization
This example shows:
Explore the rich algebraic framework:
cargo run --example 02_algebraic_structures
Features demonstrated:
Dive into topological properties:
cargo run --example 03_topological_analysis
Includes:
Experience the geometric realization:
cargo run --example 04_geometric_structures
Showcases:
See everything working together:
cargo run --example 05_comprehensive_demo
PPF introduces -1 as a "Sign Prime", creating quantum behavior in number theory:
The IOT (Involuted Oblate Toroidal) metric provides geometric realization:
Factorization spaces have rich topological properties:
FactorizationStateSpace]: The fundamental state space S(n)PFactorization]: Individual P-factorizationsStateSpaceOperations]: Operations between state spacesCollapseInfo]: Information about quantum collapse eventsStateSpaceIdeal]: Ideals IS(n) in the state space ringPPrimeSpectrum]: The spectrum of P-primesMultiplicationAlgebra]: Multiplicative structureHomologyGroups]: Homological computationsFactorizationSimplex]: Simplicial complex K(n)PPFGaloisGroup]: Galois group Gal_P(n)BettiNumberComputer]: Topological invariantsComplexStatistics]: Complex analysis toolsIOTMetric]: The IOT metric tensorTautochroneOperator]: Geodesic and transport operatorsPPFHilbertSpace]: Quantum Hilbert space realizationQuantumState]: Quantum states and operatorsPPF provides novel approaches to ML challenges:
See ideas.md for detailed ML/NLP integration strategies.
Optimized for high-performance computing:
See ideas2.md for GPU optimization details.
Contributions are welcome! Please see our contributing guidelines.
The PPF framework is based on research in:
For detailed mathematical exposition, see the papers in /docs.
ppflib is designed for performance:
Benchmarks coming soon with criterion integration.
Licensed under either of
at your option.
If you use ppflib in academic research, please cite:
@software{ppflib,
title = {ppflib: Physics-Prime Factorization Library},
author = {PPF Research Team},
year = {2024},
url = {https://github.com/your-org/ppflib},
version = {0.1.0}
}
Explore the quantum structure hidden in numbers with ppflib! 🔢⚛️