# Universal Generative Deformation Calculus

**Author:** Komorebi P.  
**Version:** 1.1.0

This release implements the following construction:

```text
object
  -> every admissible direction at that object
  -> every admissible direction at every child
  -> infinite raw path forest
  -> quotient by exact path and object relations
  -> completion of convergent infinite routes
  -> certified mathematical families
```

The central point is state dependence. A child is not assigned a copy of the root's direction list. The system calls `directions(child, depth)` again, so each generated object exposes its own abstract direction fiber.

## Mathematical layers

The package keeps three layers separate.

1. **Raw paths** store every finite construction route, including different routes with the same endpoint.
2. **Quotient nodes** use an exact canonical key to identify equivalent endpoints while preserving edge and path multiplicity.
3. **Completed branches** add limits only under a declared metric, topology, inverse limit, direct limit, or other completion rule.

Unary directions produce a rooted path forest. Multi-input operations such as multiplication, tensoring, gluing, or nonlinear interaction produce an operadic hyperforest.

## Main deliverables

- `paper/Universal_Generative_Deformation_Calculus.pdf`
- `paper/Universal_Generative_Deformation_Calculus.tex`
- `generative_deformation/` reference Python package
- `tests/` independent test suite
- `results/results.json`
- `results/checks.csv`
- `examples/generated/` machine-readable explored forests
- `paper/figures/` Python-generated PDF and PNG figures
- `paper/tables/` reproducible tables
- `dist/komorebi_generative_deformation-1.1.0-py3-none-any.whl`


## Visual atlas edition

Version 1.1.0 replaces the original sparse figure set with a coherent visual atlas. It includes:

- the seed-to-forest-to-quotient-to-completion architecture
- state-dependent direction fibers in four domains
- raw-tree versus quotient-graph comparison
- certified continuous direction covers
- infinite-branch completion and stability regimes
- multi-input operadic hyperforests
- growth and path-partition phase diagrams
- family-certificate and exploration-frontier workflows
- polynomial, analytic, sequence, Gaussian, qubit, matrix, shape, graph, and congruence-lift atlases
- a cross-domain comparison of raw-route and quotient-object growth

All figures are generated by Python in vector PDF and matching PNG formats.

## Installation

From PowerShell in the extracted release directory:

```powershell
python -m pip install -e .
```

Or install the included wheel:

```powershell
python -m pip install .\dist\komorebi_generative_deformation-1.1.0-py3-none-any.whl
```

## Complete verification

```powershell
.\Run_All.ps1
```

This installs the package in editable mode, runs all experiments, executes the test suite, and recompiles the paper.

The recorded release has:

- 50 of 50 independent tests passed
- 18 of 18 experiment checks passed
- 59-page compiled paper
- 20 Python-generated figure pairs in PDF and PNG
- 11 worked finite realizations spanning algebra, analysis, probability, geometry, graphs, quantum states, sequences, and congruence lifting
- no LaTeX overfull or underfull boxes
- no undefined references
- clean PDF preflight

## Explore a built-in deformation system

Integer walk:

```powershell
python -m generative_deformation explore --example walk --depth 12 --max-paths 9000 --out .\walk_output
```

Analytic grammar from `cosh(x)`:

```powershell
python -m generative_deformation explore --example analytic --depth 3 --max-paths 1800 --out .\analytic_output
```

Polynomial grammar from `x**2 + 1`:

```powershell
python -m generative_deformation explore --example polynomial --depth 4 --max-paths 4000 --out .\polynomial_output
```

Additional exact reference systems:

```powershell
python -m generative_deformation explore --example sequence --depth 3 --max-paths 800 --out .\sequence_output
python -m generative_deformation explore --example gaussian --depth 4 --max-paths 5000 --out .\gaussian_output
python -m generative_deformation explore --example qubit --depth 5 --max-paths 1800 --out .\qubit_output
python -m generative_deformation explore --example matrix --depth 3 --max-paths 800 --out .\matrix_output
python -m generative_deformation explore --example shape --depth 3 --max-paths 600 --out .\shape_output
python -m generative_deformation explore --example graph --depth 3 --max-paths 700 --out .\graph_output
python -m generative_deformation explore --example adic-simple --depth 4 --max-paths 100 --out .\adic_simple_output
python -m generative_deformation explore --example adic-singular --depth 5 --max-paths 300 --out .\adic_singular_output
```

Each output directory contains `forest.json`, `nodes.csv`, and `edges.csv`.

## Define a new domain

Subclass `DeformationSystem` and implement:

```python
from generative_deformation import DeformationSystem, Direction

class MySystem(DeformationSystem):
    name = "my-system"

    def directions(self, state, depth):
        return [Direction("first_move"), Direction("second_move")]

    def apply(self, state, direction):
        ...

    def canonical_key(self, state):
        ...
```

Optional methods provide validation, invariants, serialization, and a metric.

```python
from generative_deformation import ExplorationConfig, PerturbationForest

forest = PerturbationForest(MySystem(), [seed]).explore(
    ExplorationConfig(max_depth=6, max_paths=100000)
)
forest.export("my_output")
```

## Continuous directions

An uncountable direction fiber is not enumerated point by point. It is represented as a parameter family and explored through certified finite covers. `IntervalDirectionFamily` supplies exact dyadic nets. `propagated_cover_error` computes the pathwise endpoint bound

```text
e[k+1] <= L[k] e[k] + M[k] epsilon[k].
```

The paper proves the closed product-sum bound.

## Multi-input interactions

`InteractionRule` and `generate_interactions` implement finite prefixes of the operadic extension. The built-in scalar realization includes addition, multiplication, and averaging.

## Family certificates

`FamilyCertificate` records:

- member nodes
- parameters
- closure directions
- invariant fields
- exact relations
- verification failures

The certificate proves internal closure relative to the declared grammar. It does not prove historical novelty.

## Scope boundary

“Every direction” means every direction in the declared admissible fiber. The framework does not pretend to enumerate every conceivable target-dependent map. A grammar that hides the target inside a custom operation is rejected by the anti-encoding condition.

Finite exploration is a prefix of an infinite object. Completeness requires a theorem about finite branching, fair enumeration, continuous coverage, convergence, or compactness. A large finite run is not a substitute for such a theorem.
