Skip to content

Increment 3 step 1 (#107): boundary/exact splitting and the factor laws - #153

Merged
cameronfreer merged 2 commits into
masterfrom
r4-factor-laws
Jul 26, 2026
Merged

Increment 3 step 1 (#107): boundary/exact splitting and the factor laws#153
cameronfreer merged 2 commits into
masterfrom
r4-factor-laws

Conversation

@cameronfreer

@cameronfreer cameronfreer commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Increment 3, step 1: the boundary/exact splitting and the factor laws. #107 remains open.

The decomposition

The factor at A splits by anchor:

  • BoundaryIndex A — indices whose anchor is a proper subset of A;
  • ExactIndex A — the exact-anchor layer: indices whose anchor is exactly A;
  • factorSpaceProdEquiv : FactorSpace A ≃ᵐ BoundarySpace A × ExactSpace A.

Both index types are countable and both spaces standard Borel.

This partitions coordinates by anchor, not information. Anchors are not minimal: a Boolean expression can carry anchor A while naming an event already measurable over a proper subset, since the seeds at A live in fixingAlgebra AfixingAlgebra C for every C ⊆ A. So the exact-anchor layer is not "the new information at A", and the splitting alone rules out no redundancy between layers.

This is the shape the recursion needs — one kernel per finite A, conditioned on the whole proper-subset boundary, recursing by |A|. The module docstring records why, rather than the two obvious alternatives:

  • Kernels for every pair C ⊆ A are redundant, and would force compatibility conditions between different versions of conditional distributions, each only defined a.e.
  • A linear chain over an enumeration imposes an arbitrary ordering, and lets the value at A depend on sets incomparable to A — breaking the subset-locality of the AHK formula.

Sampling only ExactSpace A, rather than resampling all of FactorSpace A, means the recursion never overwrites coordinate slots already generated at proper subsets — that much is structural, from the coordinate partition. Consistency with lower-anchor events that an exact-anchor coordinate happens to duplicate semantically is a separate matter: an almost-sure/support property of stepKernel, which conditions on the boundary, not something the partition delivers on its own.

The laws

factorLaw, boundaryLaw, exactLaw as pushforwards of M.law, each a probability measure, with boundaryLaw_eq_map and exactLaw_eq_map identifying the latter two as the marginals of the factor law through the product decomposition. Then:

  • factorLaw_map_factorProjection — projection consistency, immediate because factorProjection_factorMap is rfl;
  • factorLaw_map_factorSpaceEquiv — relabeling invariance. This is the first place in this layer where exchangeability of the law is used; everything before it was law-free.

Note

In the product equivalence the branch condition depends on the index, not the point, so the proofs go through dif_pos/dif_neg plus an explicit function equality. Rewriting with the hypothesis anchor i = A itself also rewrites inside the subtype and breaks the match — recorded in the source.

Not in this PR

stepKernel, and the mutual-independence theorem for same-rank exact layers given the lower-rank boundary. Pairwise conditional independence is not automatically mutual, so that will be an explicit theorem in step 2. Randomization via #140 and the recursion on |A| are step 3.

Gates

Full build 3358 jobs green; zero sorries; audit 187 to 191, new declarations [propext, Classical.choice, Quot.sound]-clean; documentation drift checks pass.

…ctor laws

New `Graphon/RelFactorLaws.lean`. The factor at `A` splits into what proper subsets
already determine and what is new at `A`:

* `BoundaryIndex A` — anchor a *proper* subset of `A`; `ExactIndex A` — anchor exactly
  `A`; both countable, both spaces standard Borel;
* `factorSpaceProdEquiv : FactorSpace A ≃ᵐ BoundarySpace A × ExactSpace A`, since an
  index anchored inside `A` is anchored either properly inside it or exactly at it, and
  never both;
* `boundaryMap` / `exactMap` with their measurability;
* `factorLaw`, `boundaryLaw`, `exactLaw` as pushforwards of `M.law`, each a probability
  measure, with `boundaryLaw_eq_map` identifying the boundary law as a marginal;
* `factorLaw_map_factorProjection` — projection consistency, immediate because
  `factorProjection_factorMap` is `rfl`;
* `factorLaw_map_factorSpaceEquiv` — relabeling invariance, the first place in this
  layer where exchangeability of the law is used; everything before it was law-free.

The module docstring records why this decomposition rather than the alternatives:
kernels for every pair `C ⊆ A` are redundant and would force compatibility between
different a.e. versions of conditional distributions; a linear chain imposes an
arbitrary ordering and lets the value at `A` depend on sets incomparable to `A`,
breaking the subset-locality of the AHK formula. Sampling only `ExactSpace A` also
removes structurally any risk of disagreeing with layers already generated at proper
subsets.

Elaboration note: in the product equivalence the branch condition depends on the index,
not the point, so the proofs go through `dif_pos`/`dif_neg` and an explicit function
equality. Rewriting with the hypothesis `anchor i = A` itself also rewrites inside the
subtype and breaks the match.

No `stepKernel` here — that, and the mutual-independence theorem for same-rank exact
layers, are step 2.

Audit 187 → 190. Full build 3358 jobs green; census, axiom audit, and documentation
drift checks pass.
…d exactLaw_eq_map

The prose called `ExactIndex A` "the layer that is genuinely new at `A`". That is
wrong: anchors are not minimal. A Boolean expression can carry anchor `A` while naming
an event already measurable over a proper subset, since the seeds at `A` live in
`fixingAlgebra A`, which contains `fixingAlgebra C` for every `C ⊆ A`. It is now called
the **exact-anchor layer** throughout, and the module docstring states explicitly that
the splitting partitions *coordinates by anchor*, not information.

The consequence for the recursion is restated with the right scope. Sampling only
`ExactSpace A` means the recursion never overwrites coordinate slots already generated
at proper subsets — that much is structural, from the coordinate partition. Consistency
with lower-anchor events that an exact-anchor coordinate happens to duplicate
semantically is a different matter: an almost-sure/support property of `stepKernel`,
which conditions on the boundary, and not something the partition delivers on its own.

Adds `exactLaw_eq_map`, symmetric to `boundaryLaw_eq_map`, identifying the exact law as
the second marginal of the factor law — used immediately when checking that
`stepKernel` disintegrates the factor law.

The names `ExactIndex` and `ExactSpace` are unchanged.

Audit 190 → 191. Full build 3358 jobs green; census, axiom audit, and documentation
drift checks pass.
@cameronfreer
cameronfreer merged commit e660929 into master Jul 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant