Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 WhatsYourWhy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# lambda_ratio_explorer

[![CI](https://github.com/WhatsYourWhy/lambda_ratio_explorer/actions/workflows/ci.yml/badge.svg)](https://github.com/WhatsYourWhy/lambda_ratio_explorer/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

> Factorization splits the multiplicative group into independent cyclic
> components. φ(n) counts the total elements; λ(n) is the maximum order of
> any element. Their ratio measures how badly those components fail to
Expand Down Expand Up @@ -45,6 +48,8 @@ For derivations, worked examples, and a connection to every figure here,
see [`THEOREM.md`](./THEOREM.md). A renderable PDF can be produced via
`render_theorem.ps1` (requires pandoc plus a LaTeX engine).

![Collapse index C(n) at scale](./collapse_at_scale.png)

## Install

```bash
Expand Down Expand Up @@ -79,6 +84,8 @@ python group_structure.py
# -> group_structure.png
```

![Group structure analysis](./group_structure.png)

### Order distributions (`order_distributions.py`)

The synchronization model made visible at the level of individual
Expand All @@ -94,6 +101,8 @@ python order_distributions.py
# -> order_distributions.png
```

![Element order distributions](./order_distributions.png)

### Wedge envelopes (`wedge_envelopes.py`)

A focused plot showing that the upper edges of the `lambda(q)` wedge
Expand All @@ -106,6 +115,8 @@ python wedge_envelopes.py
# -> wedge_envelopes.png
```

![Wedge envelopes](./wedge_envelopes.png)

### Collapse propagation (`propagation.py`)

Iterative demonstration of the propagation theorem. Builds three example
Expand All @@ -118,6 +129,8 @@ python propagation.py
# -> propagation.png
```

![Collapse propagation](./propagation.png)

### Distribution of `gcd(p-1, q-1)` (`gcd_distribution_theory.py`)

Empirical verification of Theorem C. Computes the divisibility rate
Expand All @@ -134,6 +147,8 @@ python gcd_distribution_theory.py
# -> gcd_distribution.png
```

![Theorem C verification](./gcd_distribution.png)

### Collapse at scale (`collapse_at_scale.py`)

The full-range scan of `C(n)` to `n = 10^6`, using a smallest-prime-factor
Expand Down Expand Up @@ -247,3 +262,7 @@ identity at runtime, so they double as tests for the theorem in
for backward compatibility, but `log(n)` is just a constant scalar
and does not enter the structural story. The interesting metrics are
`lambda(q)`, `phi(q)`, and `C(q)`.

## License

[MIT](./LICENSE)
Loading