From 4d952eb857cd5c69c02848f231a88cddc7e62caa Mon Sep 17 00:00:00 2001 From: Cameron Freer Date: Sat, 15 Aug 2026 15:33:27 +0000 Subject: [PATCH 01/13] =?UTF-8?q?feat:=20extend=20a=20finite=20partial=20i?= =?UTF-8?q?njection=20of=20=E2=84=95=20to=20a=20permutation=20(#195=20stag?= =?UTF-8?q?e=203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit exists_perm_extend_of_injOn generalizes exists_perm_extend from an initial segment to an arbitrary finite domain, by the same Equiv.Set.compl argument. It is the finite-agreement step for the joint restriction theorem: on a joint cylinder, the combined vertex support is finite, and a pooled permutation must be found carrying the original embedding to an arbitrary one there. --- Graphon/PermutationExtension.lean | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Graphon/PermutationExtension.lean b/Graphon/PermutationExtension.lean index 6e40d6c..f5a7ebb 100644 --- a/Graphon/PermutationExtension.lean +++ b/Graphon/PermutationExtension.lean @@ -43,3 +43,25 @@ theorem exists_perm_extend {k : ℕ} (g : Fin k ↪ ℕ) : show ((Equiv.ofInjective g g.injective) ((Equiv.ofInjective _ Fin.val_injective).symm ⟨(↑a : ℕ), ⟨a, rfl⟩⟩) : ℕ) = g a rw [h1]; rfl + +/-- **Every finite partial injection of `ℕ` extends to a permutation**: the domain and its image +are finite, so their complements are countably infinite and hence equivalent, and +`Equiv.Set.compl` assembles the permutation. Generalizes `exists_perm_extend` from an initial +segment to an arbitrary finite domain. -/ +theorem exists_perm_extend_of_injOn {A : Finset ℕ} {g : ℕ → ℕ} (hg : Set.InjOn g ↑A) : + ∃ σ : Equiv.Perm ℕ, ∀ a ∈ A, σ a = g a := by + classical + let e₀ : (↑A : Set ℕ) ≃ (g '' ↑A : Set ℕ) := Equiv.Set.imageOfInjOn g (↑A : Set ℕ) hg + have hsc : ((↑A : Set ℕ)ᶜ).Infinite := (A.finite_toSet).infinite_compl + have htc : ((g '' ↑A : Set ℕ)ᶜ).Infinite := + ((A.finite_toSet).image g).infinite_compl + haveI := hsc.to_subtype + haveI := htc.to_subtype + haveI : Denumerable ((↑A : Set ℕ)ᶜ : Set ℕ) := Denumerable.ofEncodableOfInfinite _ + haveI : Denumerable ((g '' ↑A : Set ℕ)ᶜ : Set ℕ) := Denumerable.ofEncodableOfInfinite _ + obtain ⟨σ, hσ⟩ := (Equiv.Set.compl e₀).symm + ((Denumerable.eqv _).trans (Denumerable.eqv _).symm) + refine ⟨σ, fun a ha => ?_⟩ + have h := hσ ⟨a, ha⟩ + rw [h] + rfl From f867572c721c6d8096080c28a0bb414ddd564811 Mon Sep 17 00:00:00 2001 From: Cameron Freer Date: Sat, 15 Aug 2026 17:35:18 +0000 Subject: [PATCH 02/13] feat: the joint restriction theorem and transport characterization (#195 stage 3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PooledRankExtension.map_restrict_embedding: for EVERY sortwise embedding e into the pooled carrier, restricting jointly — structure and latents along the same e — returns C.P exactly. Joint, so it recovers the (X, U_ 389. --- Graphon.lean | 2 + Graphon/RelLatentGeometry.lean | 15 +++ Graphon/RelPooledAcceptance.lean | 207 +++++++++++++++++++++++++++++ scripts/axiom_audit.lean | 7 + scripts/check_census_and_axioms.py | 5 + 5 files changed, 236 insertions(+) create mode 100644 Graphon/RelPooledAcceptance.lean diff --git a/Graphon.lean b/Graphon.lean index ddf5012..db174f3 100644 --- a/Graphon.lean +++ b/Graphon.lean @@ -46,6 +46,7 @@ import Graphon.RelRankInjectionInvariance import Graphon.RelLatentGeometry import Graphon.RelPooledLatents import Graphon.RelPooledExtension +import Graphon.RelPooledAcceptance import Graphon.RelSingletonPeel import Graphon.RelFixingAlgebra import Graphon.RelRankAlgebra @@ -263,6 +264,7 @@ in Lean 4 using Mathlib. * `Graphon.RelLatentGeometry` — R4 converse (#107), law-free: **carrier-parametric latent geometry**. Supports of cardinality below the working rank over an arbitrary sortwise carrier, the latent cube they index, its i.i.d. uniform source, the action of a **full** sortwise permutation family with identity/composition laws and exact source invariance, restriction along a sortwise embedding of carriers, and the naturality laws — including the honest moved-window form, since a permutation crossing the image of an embedding does not commute with restriction along it. The action is by the full family deliberately: finite support is a property of a particular carrier's automorphisms, not of latent cubes, so a finitely supported subgroup is obtained by restricting this action rather than the reverse. `RankLatentIndex` is now a compatibility alias for the core at `Vinfinite S` — definitionally, with no downstream change * `Graphon.RelPooledLatents` — R4 converse (#107), stage 1 of the pooled-latent extension gate: the core instantiated at `PoolVertex S`. `PooledRankLatentIndex`/`PooledRankLatentSpace`/`pooledRankLatentSource`; `pooledRankLatentRelabel`, the action of the **full mixed** pooled family `∀ s, Equiv.Perm (PoolVertex S s)` — permutations moving vertices between halves included — with its identity and composition laws and exact source invariance; and `restrictOriginalLatents`, the measurable restriction to latents indexed by original supports, whose codomain is the rank-`n` cube itself because the index type is the carrier-parametric one. Naturality is stated in the **honest moved-window form** valid for every pooled permutation, with the commuting square available only as the split corollary. Law-free: no `RankRepresentation`, recovery, screening, or coupling appears, and those enter at later stages of the gate * `Graphon.RelPooledExtension` — R4 converse (#107), stage 2 of the pooled-latent extension gate: **the pooled rank extension**. `PooledRankExtension C` carries exactly three fields — the joint law on the pooled structure space times the pooled latent cube, its exact restriction to `C.P` along the two original restrictions, and invariance under the **full** pooled permutation family (mixed permutations included, the load-bearing quantifier). **No independence field**: an independent pool would recreate the defect of the rejected factor coupling. `RankRepresentation.pooledExtension` is the cheap constructor, and both of its laws are `map_prodMap_restrict_self` in disguise — writing `pv` for `poolVertexEquiv` and `ov` for `originalVertex`, the transport is `comap pv` on structures and restriction along `pv` on latents; `restrictOriginal ∘ transport` is `comap (pv ∘ ov)` with `pv ∘ ov` a **self-injection** of the original carrier, and `relabel ρ ∘ transport = transport ∘ relabel κ` for the conjugate `κ = pv ∘ ρ ∘ pv⁻¹`, a **permutation** of it. The structure deliberately carries **no mixed-window field**: the joint mixed-window marginal, and current-rank recovery and screening on mixed pooled supports, are separate derived consequences of the three fields rather than part of the primitive, and nothing route-specific belongs here +* `Graphon.RelPooledAcceptance` — R4 converse (#107), stage 3 of the pooled-latent extension gate, organizing result: **the joint restriction theorem**. For *every* sortwise embedding `e : ∀ s, Vinfinite S s ↪ PoolVertex S s`, restricting a pooled rank extension jointly — structure and latents along the same embedding — returns the representation exactly: `Q.law.map (Prod.map (RelStructure.restrict e) (latentRestrictOver e n)) = C.P`. Being **joint** is the point: it recovers the `(X, U_{