plumial 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plumial-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
plumial-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,220 @@
1
+ Metadata-Version: 2.4
2
+ Name: plumial
3
+ Version: 0.1.0
4
+ Summary: A Python package for exploring cyclic structures in polynomial rings
5
+ Author-email: Jon Seymour <jon@wildducktheories.com>
6
+ Maintainer-email: Jon Seymour <jon@wuldducktheories.com>
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/wildducktheories/plumial
9
+ Project-URL: Repository, https://github.com/wildducktheories/plumial
10
+ Project-URL: Documentation, https://plumial.readthedocs.io
11
+ Project-URL: Bug Tracker, https://github.com/wildducktheories/plumial/issues
12
+ Keywords: collatz,conjecture,mathematics,number-theory
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: sympy
28
+ Requires-Dist: numpy
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=7.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
32
+ Requires-Dist: black>=22.0; extra == "dev"
33
+ Requires-Dist: isort>=5.0; extra == "dev"
34
+ Requires-Dist: flake8>=5.0; extra == "dev"
35
+ Requires-Dist: mypy>=1.0; extra == "dev"
36
+ Requires-Dist: pre-commit>=2.0; extra == "dev"
37
+ Requires-Dist: jupyter; extra == "dev"
38
+ Provides-Extra: docs
39
+ Requires-Dist: sphinx>=5.0; extra == "docs"
40
+ Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"
41
+ Dynamic: license-file
42
+
43
+ # Plumial: Collatz Conjecture Analysis
44
+
45
+ [![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://your-docs-url.com)
46
+ [![PyPI version](https://badge.fury.io/py/plumial.svg)](https://badge.fury.io/py/plumial)
47
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
48
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
49
+
50
+ Plumial is a powerful Python library for mathematical analysis of the Collatz conjecture using polynomial representations. It transforms the discrete dynamics of Collatz sequences into algebraic operations on polynomial spaces, enabling systematic analysis of cycle structures and their properties.
51
+
52
+ ## ✨ Key Features
53
+
54
+ - **Path Objects (P class)**: Hydrated path identifiers that encode Collatz sequence paths
55
+ - **Polynomial Representations**: UV polynomials and k polynomials for algebraic analysis
56
+ - **Cycle Analysis**: Complete cycle navigation, detection, and mathematical properties
57
+ - **Symbolic Mathematics**: Full SymPy integration with comprehensive mathematical operations
58
+ - **Performance Optimized**: LRU caching and efficient algorithms for large-scale analysis
59
+ - **Type Safe**: Comprehensive type hints and modern Python practices
60
+
61
+ ## 🌀 The Mystery Revealed
62
+
63
+ <div align="center">
64
+
65
+ ![Plumial Animation](https://raw.githubusercontent.com/yourusername/plumial/main/docs/_static/watch-animation.gif)
66
+
67
+ *Witness the hypnotic σ₂₈₁(u,v) polynomial visualization - a glimpse into the hidden mathematical beauty of "glitched" Collatz cycles*
68
+
69
+ </div>
70
+
71
+ This mesmerizing animation reveals something remarkable: **p=281** represents a glitched Collatz cycle that challenges our understanding of the 3x+1 conjecture. The visualization shows σ₂₈₁(u,v) = u² + uv² + v⁴ evaluated with complex roots of unity, transforming discrete binary patterns into continuous geometric flows.
72
+
73
+ ## 🔗 Mathematical Foundations
74
+
75
+ **[📖 Read the Complete Mathematical Foundations](docs/mathematical_foundations.html)**
76
+
77
+ Dive deep into the theoretical framework that powers Plumial:
78
+ - **UV-Polynomial Theory**: Bijection between natural numbers and algebraic forms
79
+ - **Cycle Element Identity**: The fundamental relationship x·d = a·k for cycle elements
80
+ - **Binary Decomposition**: How p = 2^(n_p) + Σb_{p,i}2^i encodes path structure
81
+ - **Successor Operations**: Bit rotation operations that preserve polynomial structure
82
+ - **Advanced Topics**: Cyclotomic connections, forced vs unforced cycles, and more
83
+
84
+ ## 🚀 Quick Start
85
+
86
+ ### Installation
87
+
88
+ ```bash
89
+ pip install plumial
90
+ ```
91
+
92
+ ### Basic Usage
93
+
94
+ ```python
95
+ from plumial import P
96
+ from plumial.core import B
97
+ from plumial.utils import S, I, F
98
+
99
+ # Create a polynomial for p-value 133
100
+ p = P(133)
101
+
102
+ # Get bit counts and binary representation
103
+ print(f"n={p.n()}, o={p.o()}, e={p.e()}") # n=7, o=2, e=5
104
+ print(f"Binary: {p.b()}") # Binary: 10000101
105
+
106
+ # Work with polynomial representations
107
+ print(p.d()) # h**5 - g**2 (d-polynomial)
108
+ print(p.k()) # k polynomial (symbolic)
109
+ print(p.uv()) # UV polynomial representation
110
+
111
+ # Evaluate numerically using basis encoding
112
+ print(p.encode(B.Collatz).d()) # Evaluates with g=3, h=2: 23
113
+
114
+ # Cycle operations with functional style
115
+ collatz_p293 = P(293).encode(B.Collatz)
116
+ odd_k_values = list(collatz_p293.cycle(map=F.k(), filter=F.isodd))
117
+
118
+ # Binary string constructor
119
+ assert P(133) == P("10000101") # Equivalent results
120
+ ```
121
+
122
+ ### Advanced Analysis
123
+
124
+ ```python
125
+ # Explore the famous glitched cycle
126
+ p281 = P(281)
127
+ cycle = list(p281.cycle())
128
+ print(f"Cycle length: {len(cycle)}")
129
+ print(f"Sigma polynomial: {p281.uv()}") # u**2 + u*v**2 + v**4
130
+
131
+ # Mathematical verification
132
+ for p in cycle:
133
+ print(f"{p.p():3d}: forced={p.isforced()}")
134
+
135
+ # Symbolic mathematics
136
+ import sympy as sy
137
+ a, x = p.ax() # Get reduced cycle polynomials
138
+ assert sy.expand(x * p.d()) == sy.expand(a * p.k()) # Verify identity
139
+ ```
140
+
141
+ ## 📚 Documentation
142
+
143
+ - **[Mathematical Foundations](docs/mathematical_foundations.html)** - Complete theoretical framework
144
+ - **[API Reference](docs/api_reference.html)** - Comprehensive function documentation
145
+ - **[Tutorial](docs/tutorial.html)** - Step-by-step learning guide
146
+ - **[Examples](docs/examples.html)** - Interactive Jupyter notebooks
147
+
148
+ ## 🧮 Mathematical Capabilities
149
+
150
+ ### Polynomial Representations
151
+ - **σ-polynomials**: Binary path encoding as σₚ(u,v) polynomials
152
+ - **k-polynomials**: Transformation polynomials for cycle analysis
153
+ - **d-polynomials**: d-polynomials - d(g,h) = h^e - g^o an important term in the cycle element identity
154
+
155
+ ### Cycle Analysis
156
+ - **Complete cycle enumeration** with efficient navigation
157
+ - **Forced vs unforced cycle classification**
158
+ - **Cycle element identity verification**: x·d = a·k relationships
159
+ - **Multiple Collatz variants**: (3x+1,x/2), (5x+1,x/2), (7x+1,x/2), etc.
160
+
161
+ ### Advanced Mathematics
162
+ - **Cyclotomic polynomial factorization** for d-polynomials
163
+ - **Matrix representations** for polynomial manipulation
164
+ - **GCD analysis** and solution theory for cycle constraints
165
+ - **Binary operations** with complete bit-level analysis
166
+
167
+ ## 🔬 Research Applications
168
+
169
+ Plumial enables systematic investigation of:
170
+ - **Cycle existence theorems** through polynomial constraint analysis
171
+ - **Uniqueness proofs** using GH-form canonical representations
172
+ - **Statistical analysis** of cycle length distributions
173
+ - **Visualization** of polynomial surfaces and cycle behavior
174
+
175
+ ## 🛠 Development Installation
176
+
177
+ ```bash
178
+ git clone https://github.com/yourusername/plumial.git
179
+ cd plumial
180
+ pip install -e ".[dev]"
181
+ ```
182
+
183
+ ### Running Tests
184
+
185
+ ```bash
186
+ pytest # Run all tests
187
+ pytest tests/test_p_class.py # Run specific test file
188
+ ```
189
+
190
+ ### Building Documentation
191
+
192
+ ```bash
193
+ cd docs
194
+ make html # HTML documentation
195
+ make latexpdf # PDF documentation
196
+ ```
197
+
198
+ ## 🤝 Contributing
199
+
200
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
201
+
202
+ 1. Fork the repository
203
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
204
+ 3. Make your changes with tests
205
+ 4. Run the test suite (`pytest`)
206
+ 5. Submit a pull request
207
+
208
+ ## 📄 License
209
+
210
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
211
+
212
+ ## 🙏 Acknowledgments
213
+
214
+ - Built with [SymPy](https://www.sympy.org/) for symbolic mathematics
215
+ - Documentation powered by [Sphinx](https://www.sphinx-doc.org/)
216
+ - Inspired by decades of Collatz conjecture research
217
+
218
+ ---
219
+
220
+ *"The polynomial framework transforms Collatz analysis from computational iteration to algebraic constraint solving, revealing deep mathematical structures while maintaining computational accessibility."*
@@ -0,0 +1,178 @@
1
+ # Plumial: Collatz Conjecture Analysis
2
+
3
+ [![Documentation Status](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://your-docs-url.com)
4
+ [![PyPI version](https://badge.fury.io/py/plumial.svg)](https://badge.fury.io/py/plumial)
5
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ Plumial is a powerful Python library for mathematical analysis of the Collatz conjecture using polynomial representations. It transforms the discrete dynamics of Collatz sequences into algebraic operations on polynomial spaces, enabling systematic analysis of cycle structures and their properties.
9
+
10
+ ## ✨ Key Features
11
+
12
+ - **Path Objects (P class)**: Hydrated path identifiers that encode Collatz sequence paths
13
+ - **Polynomial Representations**: UV polynomials and k polynomials for algebraic analysis
14
+ - **Cycle Analysis**: Complete cycle navigation, detection, and mathematical properties
15
+ - **Symbolic Mathematics**: Full SymPy integration with comprehensive mathematical operations
16
+ - **Performance Optimized**: LRU caching and efficient algorithms for large-scale analysis
17
+ - **Type Safe**: Comprehensive type hints and modern Python practices
18
+
19
+ ## 🌀 The Mystery Revealed
20
+
21
+ <div align="center">
22
+
23
+ ![Plumial Animation](https://raw.githubusercontent.com/yourusername/plumial/main/docs/_static/watch-animation.gif)
24
+
25
+ *Witness the hypnotic σ₂₈₁(u,v) polynomial visualization - a glimpse into the hidden mathematical beauty of "glitched" Collatz cycles*
26
+
27
+ </div>
28
+
29
+ This mesmerizing animation reveals something remarkable: **p=281** represents a glitched Collatz cycle that challenges our understanding of the 3x+1 conjecture. The visualization shows σ₂₈₁(u,v) = u² + uv² + v⁴ evaluated with complex roots of unity, transforming discrete binary patterns into continuous geometric flows.
30
+
31
+ ## 🔗 Mathematical Foundations
32
+
33
+ **[📖 Read the Complete Mathematical Foundations](docs/mathematical_foundations.html)**
34
+
35
+ Dive deep into the theoretical framework that powers Plumial:
36
+ - **UV-Polynomial Theory**: Bijection between natural numbers and algebraic forms
37
+ - **Cycle Element Identity**: The fundamental relationship x·d = a·k for cycle elements
38
+ - **Binary Decomposition**: How p = 2^(n_p) + Σb_{p,i}2^i encodes path structure
39
+ - **Successor Operations**: Bit rotation operations that preserve polynomial structure
40
+ - **Advanced Topics**: Cyclotomic connections, forced vs unforced cycles, and more
41
+
42
+ ## 🚀 Quick Start
43
+
44
+ ### Installation
45
+
46
+ ```bash
47
+ pip install plumial
48
+ ```
49
+
50
+ ### Basic Usage
51
+
52
+ ```python
53
+ from plumial import P
54
+ from plumial.core import B
55
+ from plumial.utils import S, I, F
56
+
57
+ # Create a polynomial for p-value 133
58
+ p = P(133)
59
+
60
+ # Get bit counts and binary representation
61
+ print(f"n={p.n()}, o={p.o()}, e={p.e()}") # n=7, o=2, e=5
62
+ print(f"Binary: {p.b()}") # Binary: 10000101
63
+
64
+ # Work with polynomial representations
65
+ print(p.d()) # h**5 - g**2 (d-polynomial)
66
+ print(p.k()) # k polynomial (symbolic)
67
+ print(p.uv()) # UV polynomial representation
68
+
69
+ # Evaluate numerically using basis encoding
70
+ print(p.encode(B.Collatz).d()) # Evaluates with g=3, h=2: 23
71
+
72
+ # Cycle operations with functional style
73
+ collatz_p293 = P(293).encode(B.Collatz)
74
+ odd_k_values = list(collatz_p293.cycle(map=F.k(), filter=F.isodd))
75
+
76
+ # Binary string constructor
77
+ assert P(133) == P("10000101") # Equivalent results
78
+ ```
79
+
80
+ ### Advanced Analysis
81
+
82
+ ```python
83
+ # Explore the famous glitched cycle
84
+ p281 = P(281)
85
+ cycle = list(p281.cycle())
86
+ print(f"Cycle length: {len(cycle)}")
87
+ print(f"Sigma polynomial: {p281.uv()}") # u**2 + u*v**2 + v**4
88
+
89
+ # Mathematical verification
90
+ for p in cycle:
91
+ print(f"{p.p():3d}: forced={p.isforced()}")
92
+
93
+ # Symbolic mathematics
94
+ import sympy as sy
95
+ a, x = p.ax() # Get reduced cycle polynomials
96
+ assert sy.expand(x * p.d()) == sy.expand(a * p.k()) # Verify identity
97
+ ```
98
+
99
+ ## 📚 Documentation
100
+
101
+ - **[Mathematical Foundations](docs/mathematical_foundations.html)** - Complete theoretical framework
102
+ - **[API Reference](docs/api_reference.html)** - Comprehensive function documentation
103
+ - **[Tutorial](docs/tutorial.html)** - Step-by-step learning guide
104
+ - **[Examples](docs/examples.html)** - Interactive Jupyter notebooks
105
+
106
+ ## 🧮 Mathematical Capabilities
107
+
108
+ ### Polynomial Representations
109
+ - **σ-polynomials**: Binary path encoding as σₚ(u,v) polynomials
110
+ - **k-polynomials**: Transformation polynomials for cycle analysis
111
+ - **d-polynomials**: d-polynomials - d(g,h) = h^e - g^o an important term in the cycle element identity
112
+
113
+ ### Cycle Analysis
114
+ - **Complete cycle enumeration** with efficient navigation
115
+ - **Forced vs unforced cycle classification**
116
+ - **Cycle element identity verification**: x·d = a·k relationships
117
+ - **Multiple Collatz variants**: (3x+1,x/2), (5x+1,x/2), (7x+1,x/2), etc.
118
+
119
+ ### Advanced Mathematics
120
+ - **Cyclotomic polynomial factorization** for d-polynomials
121
+ - **Matrix representations** for polynomial manipulation
122
+ - **GCD analysis** and solution theory for cycle constraints
123
+ - **Binary operations** with complete bit-level analysis
124
+
125
+ ## 🔬 Research Applications
126
+
127
+ Plumial enables systematic investigation of:
128
+ - **Cycle existence theorems** through polynomial constraint analysis
129
+ - **Uniqueness proofs** using GH-form canonical representations
130
+ - **Statistical analysis** of cycle length distributions
131
+ - **Visualization** of polynomial surfaces and cycle behavior
132
+
133
+ ## 🛠 Development Installation
134
+
135
+ ```bash
136
+ git clone https://github.com/yourusername/plumial.git
137
+ cd plumial
138
+ pip install -e ".[dev]"
139
+ ```
140
+
141
+ ### Running Tests
142
+
143
+ ```bash
144
+ pytest # Run all tests
145
+ pytest tests/test_p_class.py # Run specific test file
146
+ ```
147
+
148
+ ### Building Documentation
149
+
150
+ ```bash
151
+ cd docs
152
+ make html # HTML documentation
153
+ make latexpdf # PDF documentation
154
+ ```
155
+
156
+ ## 🤝 Contributing
157
+
158
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
159
+
160
+ 1. Fork the repository
161
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
162
+ 3. Make your changes with tests
163
+ 4. Run the test suite (`pytest`)
164
+ 5. Submit a pull request
165
+
166
+ ## 📄 License
167
+
168
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
169
+
170
+ ## 🙏 Acknowledgments
171
+
172
+ - Built with [SymPy](https://www.sympy.org/) for symbolic mathematics
173
+ - Documentation powered by [Sphinx](https://www.sphinx-doc.org/)
174
+ - Inspired by decades of Collatz conjecture research
175
+
176
+ ---
177
+
178
+ *"The polynomial framework transforms Collatz analysis from computational iteration to algebraic constraint solving, revealing deep mathematical structures while maintaining computational accessibility."*
@@ -0,0 +1,127 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "plumial"
7
+ version = "0.1.0"
8
+ description = "A Python package for exploring cyclic structures in polynomial rings"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Jon Seymour", email = "jon@wildducktheories.com"},
14
+ ]
15
+ maintainers = [
16
+ {name = "Jon Seymour", email = "jon@wuldducktheories.com"},
17
+ ]
18
+ keywords = ["collatz", "conjecture", "mathematics", "number-theory"]
19
+ classifiers = [
20
+ "Development Status :: 3 - Alpha",
21
+ "Intended Audience :: Science/Research",
22
+ "License :: OSI Approved :: MIT License",
23
+ "Operating System :: OS Independent",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.8",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Topic :: Scientific/Engineering :: Mathematics",
31
+ ]
32
+ dependencies = [
33
+ "sympy",
34
+ "numpy",
35
+ ]
36
+
37
+ [project.optional-dependencies]
38
+ dev = [
39
+ "pytest>=7.0",
40
+ "pytest-cov>=4.0",
41
+ "black>=22.0",
42
+ "isort>=5.0",
43
+ "flake8>=5.0",
44
+ "mypy>=1.0",
45
+ "pre-commit>=2.0",
46
+ "jupyter",
47
+ ]
48
+ docs = [
49
+ "sphinx>=5.0",
50
+ "sphinx-rtd-theme>=1.0",
51
+ ]
52
+
53
+ [project.urls]
54
+ Homepage = "https://github.com/wildducktheories/plumial"
55
+ Repository = "https://github.com/wildducktheories/plumial"
56
+ Documentation = "https://plumial.readthedocs.io"
57
+ "Bug Tracker" = "https://github.com/wildducktheories/plumial/issues"
58
+
59
+ [tool.setuptools]
60
+ package-dir = {"" = "src"}
61
+
62
+ [tool.setuptools.packages.find]
63
+ where = ["src"]
64
+
65
+ [tool.pytest.ini_options]
66
+ testpaths = ["tests"]
67
+ python_files = ["test_*.py", "*_test.py"]
68
+ python_classes = ["Test*"]
69
+ python_functions = ["test_*"]
70
+
71
+ [tool.black]
72
+ line-length = 88
73
+ target-version = ['py38']
74
+ include = '\.pyi?$'
75
+ extend-exclude = '''
76
+ /(
77
+ # directories
78
+ \.eggs
79
+ | \.git
80
+ | \.hg
81
+ | \.mypy_cache
82
+ | \.tox
83
+ | \.venv
84
+ | build
85
+ | dist
86
+ )/
87
+ '''
88
+
89
+ [tool.isort]
90
+ profile = "black"
91
+ multi_line_output = 3
92
+ line_length = 88
93
+ include_trailing_comma = true
94
+ force_grid_wrap = 0
95
+ use_parentheses = true
96
+ ensure_newline_before_comments = true
97
+
98
+ [tool.mypy]
99
+ python_version = "3.8"
100
+ warn_return_any = true
101
+ warn_unused_configs = true
102
+ disallow_untyped_defs = true
103
+ disallow_incomplete_defs = true
104
+ check_untyped_defs = true
105
+ disallow_untyped_decorators = true
106
+ no_implicit_optional = true
107
+ warn_redundant_casts = true
108
+ warn_unused_ignores = true
109
+ warn_no_return = true
110
+ warn_unreachable = true
111
+ strict_equality = true
112
+
113
+ [tool.coverage.run]
114
+ source = ["src"]
115
+ omit = ["tests/*"]
116
+
117
+ [tool.coverage.report]
118
+ exclude_lines = [
119
+ "pragma: no cover",
120
+ "def __repr__",
121
+ "if self.debug:",
122
+ "if settings.DEBUG",
123
+ "raise AssertionError",
124
+ "raise NotImplementedError",
125
+ "if 0:",
126
+ "if __name__ == .__main__.:",
127
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,83 @@
1
+ """
2
+ Plumial: A Python package for Collatz conjecture analysis and computation.
3
+
4
+ This package provides comprehensive tools and mathematical frameworks for analyzing
5
+ the Collatz conjecture through polynomial representations, d-polynomials,
6
+ and binary path analysis.
7
+
8
+ Key Features:
9
+ - Path Polynomials (P class): Represent Collatz sequence paths as mathematical polynomials
10
+ - D Objects (D class): Analyze d-polynomials d_p(g,h) = h^e - g^o fundamental to Collatz analysis
11
+ - Binary Operations: Comprehensive bit-level analysis and cycle navigation
12
+ - Symbolic Mathematics: Full SymPy integration for symbolic computation
13
+ - High Performance: LRU caching and optimized algorithms
14
+ - Type Safety: Comprehensive type hints and modern Python practices
15
+
16
+ Core Classes:
17
+ P: path object class for sequence analysis
18
+ - uv polynomial representations
19
+ - Mathematical relationships (x*d = a*k)
20
+ - Cycle navigation and analysis
21
+
22
+ D: d-polynomial class for algebraic analysis
23
+ - Symbolic form h^e - g^o
24
+ - GCD computation and factorization
25
+ - Polynomial evaluation and manipulation
26
+
27
+ Mathematical Background:
28
+ The Collatz conjecture studies sequences defined by:
29
+ - If n is even: n → n/2
30
+ - If n is odd: n → 3n+1
31
+
32
+ This package encodes these operations using polynomial representations where:
33
+ - h represents halving operations (typically h=2)
34
+ - g represents the 3x+1 operation (typically g=3)
35
+ - Path polynomials encode the sequence of operations
36
+ - Difference polynomials h^e - g^o capture cycle behavior
37
+
38
+ Examples:
39
+ >>> from plumial import P, D
40
+ >>>
41
+ >>> # Create a path polynomial for p-value 133
42
+ >>> p = P(133)
43
+ >>> print(f"Path bits: n={p.n()}, odd={p.o()}, even={p.e()}")
44
+ >>>
45
+ >>> # Get uv polynomial representation
46
+ >>> uv_poly = p.uv()
47
+ >>> print(f"uv polynomial: {uv_poly}")
48
+ >>>
49
+ >>> # Evaluate k polynomial using modern encoding approach
50
+ >>> collatz_p = p.encode(g=3, h=2)
51
+ >>> k_value = collatz_p.k()
52
+ >>> print(f"k(3,2) = {k_value}")
53
+ >>>
54
+ >>> # Create d-polynomial
55
+ >>> d = D(2, 5)
56
+ >>> print(f"Difference polynomial: {d.d()}") # h^5 - g^2
57
+ >>> collatz_d = d.encode(g=3, h=2)
58
+ >>> print(f"Evaluated at g=3, h=2: {collatz_d.d()}") # 23
59
+
60
+ Installation:
61
+ pip install plumial
62
+
63
+ Dependencies:
64
+ - sympy: Symbolic mathematics
65
+ - numpy: Numerical computing
66
+ - typing: Type hints (Python 3.8+)
67
+
68
+ Author: Jon Seymour <jon@wildducktheories.com>
69
+ License: MIT
70
+ Version: 0.1.0
71
+ """
72
+
73
+ __version__ = "0.1.0"
74
+ __author__ = "Jon Seymour"
75
+ __email__ = "jon@wildducktheories.com"
76
+
77
+ from .core import D, P
78
+
79
+ __all__ = [
80
+ "__version__",
81
+ "P",
82
+ "D",
83
+ ]