# geoit v0.0.2 — CHANGELOG
## Breaking Changes
- **Codec version bumped to 2.** Files encoded with v0.0.1 cannot be decoded by v0.0.2.
The codec now includes `GeneratorProfile` and `ProofTerm` in `GeoitSnapshot`.
- **`RadicalElement` coefficients are now `Vec<Coeff>` instead of `Vec<Rat>`.**
The `Coeff` type (`Rat | Big`) allows radical tower coefficients to carry
arbitrary-precision values. Code accessing `.coeffs` directly must use `Coeff`.
- **`Geoit` and `GeoitSnapshot` have two new fields: `profile` and `proof`.**
Code constructing these structs directly must provide both fields.
- **`GeomClass` has a new field: `expected_profile: Option<GeneratorProfile>`.**
All direct `GeomClass` construction must include this field (use `None` to
preserve v0.0.1 behavior).
- **`Governance` has a new field: `transform_rules: Vec<TransformRule>`.**
All direct `Governance` construction must include this field (use `vec![]`
to preserve v0.0.1 behavior).
- **`Morphism::new` now checks anti-commutativity** in addition to quadratic form
preservation. Generator images that commute instead of anti-commute are rejected
with `MorphismError::AnticommutativityViolation`.
## Critical Fix
- **Scalar tower no longer panics on BigRat + Radical arithmetic.**
The `Coeff` type bridges `Rat` and `BigRat` inside radical tower coefficients,
eliminating the panic path when i128 overflow met radical extensions.
## New Features
### Algebra Families and Registry
- `GovernanceFamily`: parameterized governance generator (VGA, CGA, PGA)
- `GovernanceRegistry`: collects families with inter-family morphisms
- `standard_registry()`: ships VGA + CGA + PGA with all cross-links
- `registry.instantiate(n)`: produces a complete `GovernanceCategory` at dimension n
- `registry.instantiate_family("CGA", 3)`: produces CGA(3) governance
- PGA point construction generates correct oriented n-blade formula with alternating signs
### Transform Rules and Proof Composition
- `TransformRule`: declares operation(ClassA, ClassB) → ClassC as data
- `TransformOp`: Sandwich, Outer, Geometric, Regressive, Reverse, Dual, etc.
- `ProofTerm::Checked` (direct verification) and `ProofTerm::Derived` (from rule + input proofs)
- `apply_transform()`: produces new Geoits with derived proofs, no re-verification
- `Governance.transform_rules`: rules live on the governance alongside classes
- `validate_transform_rule()`: grid-evaluates rules at registration time
- `ValidationResult.grade_valid`: grade violations tracked separately from equation violations
- `GovernanceBuilder::rule()`: string-keyed rule registration
- `NamedGovernance::transform()`: apply rules by name
### Generator Profiles
- `GeneratorProfile`: i/d/h bitmasks on every Geoit, computed in `govern()`
- `is_euclidean()`, `has_degenerate()`, `has_imaginary()` queries
- Propagation rules: `predict_geometric`, `predict_outer`, `predict_sandwich`
- `GeomClass.expected_profile`: prescriptive constraint rejects unexpected generators
- `GovernanceError::ProfileMismatch` with expected/actual profiles
- `GeomClassBuilder::expected_profile()` builder method
### Governance Category
- `GovernanceCategory`: multiple governances connected by morphisms
- `GovernedMorphism`: algebra embedding + class preservation map
- `embed_geoit()`: map across algebras preserving governance
- `compose_morphisms()`: chain generator maps and class maps
- `MorphismError::AnticommutativityViolation`: anti-commutativity verified on construction
### Pencil Hierarchy and Constructibility
- `build_full_hierarchy(gov, max_depth)`: recursive pencil iteration to fixpoint
- `PencilType` enum: Elliptic, Parabolic, Hyperbolic, Homogeneous
- `classify_pencil(a, b, class, sig)`: 3-point Lagrange interpolation + discriminant
- `is_pencil_constructible(level)`: equation degree must be 0, 1, or power of 2
- `pencil_levels_to_rules(levels, gov)`: emit TransformRules from Join/Meet levels
- `Poly::max_degree()`: public method for polynomial degree queries
### Expr Compilation
- `PartialMv`: Mv with `IntPoly` coefficients (polynomial blade coefficients)
- `partial_eval_expr()`: walk Expr tree producing PartialMv (handles CGA quadratic terms)
- `compile_field_eval_from_construction()`: compile from probe Expr body
- All six `FieldOp` compilers: ScalarProduct, InnerProduct, OuterProduct, LeftContraction, GeometricProduct, GradeProduct
- `IntPoly`: integer polynomial with add, mul, scale, eval at integer coordinates
### Coeff Type
- `Coeff` enum: `Rat | Big` — coefficient type for radical tower elements
- Full arithmetic with automatic overflow promotion and demotion
- Comparison, ordering, Display implementations
## Metrics
| Source LoC | 14,503 | 17,795 | +3,292 |
| Source files | 39 | 45 | +6 |
| Tests passing | ~526 | 665 | +139 |
| Dependencies | 0 | 0 | — |
| `unsafe` blocks | 0 | 0 | — |