Inflation for pair-source graphs: definitions #
Definitions for the pair-source generalization of TriangleInflation: a finite simple
graph G without isolated vertices, one binary observed variable per vertex, one independent
latent source per edge. The triangle of TriangleInflation is the case G = C₃.
The mathematics formalized here is the 2026-09-13 packet as corrected in
papers/inflation-nontermination/research-handoffs/2026-09-13/claude-code/review/AUDIT-NOTES.md,
items A1–A7 and B; the source is sources/B5-pair-source-classification.md (§1, §3, §5).
This file carries definitions only. The statements live in
the per-topic modules of this directory (proved) and InflationGraphOpen/ (statements not
yet proved).
Representational decisions #
Reuse of the triangle file.
IsLaw,pushforward,prodLaw,bern,respMass,ThreeBit, and the triangle hierarchies are imported fromTriangleInflation.Defsrather than redefined. Laws stay bare real weight functions with the predicateIsLaw, for the reasons given in that file's header.A scenario is a bundled
PairGraph. The vertex type, itsFintypeandDecidableEqinstances, theSimpleGraph, decidable adjacency and the no-isolated-vertex condition are fields of one structure, so that a scenario can be quantified over. Edges are the subtype{e : Sym2 V // e ∈ G.edgeFinset}; incidencePairGraph.inc vis theFinsetof edges containingv.Copied observations are dependent pairs.
GObs Γ t = Σ v : Γ.V, (Γ.inc v → Fin t): a copied observation is a vertex together with one copy index per incident edge. For the triangle this has3t²elements, matchingTriangleInflation.Obs t, but the identification is a theorem (Statements.exists_triObsEquiv) and not a definitional coincidence:GObscarries the incidence structure in its second component,TriangleInflation.Obsin its constructor names.Bit convention and signs. Outcomes are
Bool;falseis the paper's0. The sign of a bit issgn false = 1,sgn true = -1, the convention of AUDIT-NOTES ("signs ±1 with false = 0 ↔ +1").d-separation is the trail criterion for the depth-one inflation DAG, not a general Pearl definition; see the docstring ofdsep. AUDIT-NOTES A2 corrects the packet's stated criterion, anddsepformalizes the corrected one.Finite latent alphabets.
GCompatiblequantifies over aGModel, whose latent spaces are arbitraryFintypes, while the mathematics allows arbitrary measurable latent spaces. As AUDIT-NOTES D1 phrases it: the formal incompatibility statements are for the finite-latent compatible set; the arbitrary-latent statement needs either the Rosset–Gisin–Wolfe cardinality reduction (quoted, not formalized) or a direct measure-theoretic proof. So the finite-latent compatible set is a subset of the general one, and a Lean theorem¬ GCompatible Γ Pis the weaker statement: it does not by itself say thatPhas no model with an infinite latent alphabet.Division conventions. Real division by zero is zero in Lean.
glueLawnonetheless branches explicitly on0 < μ_Z(z), because Definition 7 of Wolfe–Spekkens–Fritz prescribes the value0on null fibres and the branch records that prescription rather than relying on the junk value.fivePathCorrdoes rely on it, and every statement about it assumes the conditioning cell is positive.
Pair-source scenarios #
A pair-source scenario (AUDIT-NOTES A1): a finite simple graph without isolated vertices. Each vertex carries one binary observed variable, each edge one independent latent source shared by its two endpoints.
- V : Type
The observed vertices.
- decEqV : DecidableEq self.V
- G : SimpleGraph self.V
The source graph; an edge is an independent latent source.
- decAdj : DecidableRel self.G.Adj
No isolated vertices: an observation with no source has no copying convention.
Instances For
The latent sources of a pair-source scenario: the edges of its graph.
Equations
- Γ.Edge = ↥Γ.G.edgeFinset
Instances For
A target law: a weight function on the binary observed vertices.
Equations
- TriangleInflation.Graph.GTarget Γ = ((Γ.V → Bool) → ℝ)
Instances For
Order-t copied observations #
The copied observations of the order-t inflation (AUDIT-NOTES A1): one observation for
each vertex v and each choice of a copy index for every source incident to v.
Equations
- TriangleInflation.Graph.GObs Γ t = ((v : Γ.V) × (↥(Γ.inc v) → Fin t))
Instances For
A deterministic assignment of all copied observations.
Equations
Instances For
The copied latent sources: a source together with a copy index.
Equations
- TriangleInflation.Graph.GLatent Γ t = (Γ.Edge × Fin t)
Instances For
The action of a per-source permutation of copy indices on copied observations.
Instances For
The induced action on assignments.
Equations
- TriangleInflation.Graph.gRelabel π ω o = ω (TriangleInflation.Graph.gPerm π o)
Instances For
Symmetry of a witness under independent permutations of the copy indices of each source
(AUDIT-NOTES A1; the pair-source form of TriangleInflation.SymmetricLaw).
Equations
- TriangleInflation.Graph.GSymmetric t Δ = ∀ (π : Γ.Edge → Equiv.Perm (Fin t)) (ω : TriangleInflation.Graph.GAssign Γ t), Δ (TriangleInflation.Graph.gRelabel π ω) = Δ ω
Instances For
The copied original scenarios #
The copied observation of the vertex v in the copy of the original scenario selected by
the index vector ι.
Equations
- TriangleInflation.Graph.copyObs ι v = ⟨v, fun (e : ↥(Γ.inc v)) => ι ↑e⟩
Instances For
The copied original scenario selected by ι: one copied observation per vertex.
Equations
Instances For
The observed outcome that an assignment gives to the copied scenario selected by ι.
Equations
- TriangleInflation.Graph.readCopy ι ω v = ω (TriangleInflation.Graph.copyObs ι v)
Instances For
The t diagonal rows: row r takes the copy index r on every source
(AUDIT-NOTES A1).
Equations
- TriangleInflation.Graph.readDiag ω r = TriangleInflation.Graph.readCopy (fun (x : Γ.Edge) => r) ω
Instances For
Ancestry #
The copied latent ancestors of a copied observation: for each incident source, the copy selected by that observation.
Equations
- TriangleInflation.Graph.gAncestors o = Finset.image (fun (e : ↥(Γ.inc o.fst)) => (↑e, o.snd e)) Finset.univ
Instances For
The copied latent ancestors of a set of copied observations.
Instances For
Two sets of copied observations are ancestrally independent when their copied latent
ancestors are disjoint (TriangleInflation.AncestrallyIndependent for a general pair
graph).
Equations
Instances For
The sources that a set of copied observations touches, ignoring copy indices. Two blocks
with disjoint edgesOf are the "source-disjoint blocks" of AUDIT-NOTES A3(i).
Equations
- TriangleInflation.Graph.edgesOf S = S.biUnion fun (o : TriangleInflation.Graph.GObs Γ t) => Γ.inc o.fst
Instances For
Injectable sets #
The working definition of injectability: a set of copied observations lies inside one copied original scenario.
Equations
- TriangleInflation.Graph.GInjectable S = ∃ (ι : Γ.Edge → Fin t), S ⊆ TriangleInflation.Graph.copySet ι
Instances For
The primitive Wolfe–Spekkens–Fritz condition (Definition 4) for a pair-source scenario:
erasing copy indices is injective on the set, and any two members agree in the copy index of
every shared source. Statements.gInjectable_iff_raw records the equivalence with
GInjectable, as TriangleInflation.injectable_iff_injectableRaw does for the triangle.
Equations
- TriangleInflation.Graph.GInjectableRaw S = ((∀ o ∈ S, ∀ p ∈ S, o.fst = p.fst → o = p) ∧ ∀ o ∈ S, ∀ p ∈ S, TriangleInflation.Graph.GSharedAgree o p)
Instances For
The restriction of an assignment to a set of copied observations.
Equations
- TriangleInflation.Graph.gRestrict S ω o = ω ↑o
Instances For
The outcome pattern that a target law prescribes on a set of copied observations: each member reads the bit of the vertex it is a copy of.
Equations
- TriangleInflation.Graph.gPartyRead S w o = w (↑o).fst
Instances For
Reading a block inside an ambient set. When B ⊆ S this is subRestrict; the else
branch is unreachable and is present only so that the block may be given as a bare Finset,
without carrying the inclusion proof.
Instances For
The finite inflation tests #
Every finite family of pairwise ancestrally independent injectable sets carries the product of the corresponding marginals.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Navascués–Wolfe feasible set of a pair-source scenario (AUDIT-NOTES A1): a symmetric law on the copied observations whose diagonal law is the tensor power of the target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Recursive expressibility #
The inflation DAG of a pair-source scenario has depth one: the copied latent sources are
roots, the copied observations are sinks, and the parents of a copied observation are exactly
its gAncestors.
A trail from X to Y that is active given Z: a sequence of copied observations
o₀ ∈ X, mid, o₁ ∈ Y (so of length at least two) in which consecutive members share a
copied latent parent and every internal member lies in Z.
Equations
- TriangleInflation.Graph.ActiveTrail X Y Z o₀ mid o₁ = (o₀ ∈ X ∧ o₁ ∈ Y ∧ (∀ o ∈ mid, o ∈ Z) ∧ List.IsChain TriangleInflation.Graph.SharesParent (o₀ :: (mid ++ [o₁])))
Instances For
d-separation in the order-t inflation DAG, by the trail criterion.
This is the specialization of Pearl d-separation to a DAG in which every latent node is a
root and every observed node is a sink. In such a DAG a trail between two observed nodes
alternates observed node, shared latent parent, observed node; every latent on it is a fork
and every internal observed node is a collider; and no node has descendants, so a collider is
unblocked exactly when it is itself conditioned on. Hence a trail is active given Z exactly
when all of its internal observed nodes lie in Z, and X ⊥_d Y | Z exactly when no such
trail exists.
AUDIT-NOTES A2 corrects the packet's stated criterion ("no component of the shared-parent
graph on X ∪ Y ∪ Z meets both X and Y", which is only sufficient); this definition is
the corrected trail criterion, and the component statement becomes a theorem for AI sets
(Statements.expressible_iff_ai).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The glued law of Wolfe–Spekkens–Fritz Definition 7:
μ(x,y,z) = μ₁(x,z) μ₂(y,z) / μ_Z(z) when the common Z-marginal μ_Z(z) is positive, and
0 otherwise. μ_Z is taken as the Z-marginal of μ₁; on the sets where the rule is
applied the two marginals agree.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The recursively expressible sets of the order-t inflation, each with its prescribed
law (paper Definition 2.5, Wolfe–Spekkens–Fritz Definition 7). Expressible t P S μ says
that the closure prescribes the law μ on the set S of copied observations.
The three rules are: an injectable set carries the pushforward of the target under the
party-read map; two prescribed sets X ∪ Z and Y ∪ Z with X, Y, Z pairwise disjoint
and dsep X Y Z glue to X ∪ Y ∪ Z; and marginals of prescribed sets are prescribed.
This is the definition that TriangleInflation.Defs deliberately omits.
- inj {Γ : PairGraph} {t : ℕ} {P : GTarget Γ} {S : Finset (GObs Γ t)} (h : GInjectable S) : Expressible t P S (pushforward P (gPartyRead S))
- glue {Γ : PairGraph} {t : ℕ} {P : GTarget Γ} {X Y Z : Finset (GObs Γ t)} {μ₁ : (↥(X ∪ Z) → Bool) → ℝ} {μ₂ : (↥(Y ∪ Z) → Bool) → ℝ} (h₁ : Expressible t P (X ∪ Z) μ₁) (h₂ : Expressible t P (Y ∪ Z) μ₂) (hXY : Disjoint X Y) (hXZ : Disjoint X Z) (hYZ : Disjoint Y Z) (hd : dsep X Y Z) : Expressible t P (X ∪ Y ∪ Z) (glueLaw X Y Z μ₁ μ₂)
- marg {Γ : PairGraph} {t : ℕ} {P : GTarget Γ} {S T : Finset (GObs Γ t)} {μ : (↥T → Bool) → ℝ} (hST : S ⊆ T) (h : Expressible t P T μ) : Expressible t P S (pushforward μ (subRestrict hST))
Instances For
AI sets #
The sets and laws that the ancestral-independence prescriptions cover. AUDIT-NOTES A2 identifies these with the recursively expressible ones.
An AI set: every connected component of the shared-parent graph on S is injectable
(AUDIT-NOTES A2). The component of o is described by its membership predicate rather than
constructed, so that no decidability of sharedComponent is needed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A presentation of a set of copied observations as a union of pairwise ancestrally independent injectable blocks.
- n : ℕ
The number of blocks.
The blocks.
- inj (m : Fin self.n) : GInjectable (self.block m)
Instances For
The AI product law of a decomposition: the product of the injectable marginals of the blocks.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compatibility #
A model of a pair-source scenario with finite latent alphabets: one latent alphabet and
source law per edge, and for each vertex the probability resp v of the outcome
false = 0 given the values of the sources incident to it.
The latent alphabet of each source.
The law of each source.
resp v c = Pr(outcome at v is 0 | incident sources take the values c).
Instances For
A model is valid when every source law is a law and every response probability lies in
[0,1].
Equations
Instances For
The observed law of a model: the sources are independent and the responses are conditionally independent given the sources.
Equations
Instances For
The compatible set C_G of a pair-source scenario, with the finite-latent-alphabet
boundary described in the file header (AUDIT-NOTES D1).
Equations
- TriangleInflation.Graph.GCompatible Γ P = ∃ (M : TriangleInflation.Graph.GModel Γ), M.Valid ∧ M.law = P
Instances For
Named scenarios #
The cycle C_m on Fin m. For m ≥ 3 the adjacency a ≠ b ∧ (a+1 ≡ b ∨ b+1 ≡ a) is
the m-cycle; the explicit a ≠ b makes the relation irreflexive for every m.
Equations
Instances For
The vertices of a double star: two centres and their leaves.
- left {p q : ℕ} : DoubleStarV p q
- right {p q : ℕ} : DoubleStarV p q
- leftLeaf {p q : ℕ} (i : Fin p) : DoubleStarV p q
- rightLeaf {p q : ℕ} (j : Fin q) : DoubleStarV p q
Instances For
Equations
- One or more equations did not get rendered due to their size.
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq TriangleInflation.Graph.DoubleStarV.left TriangleInflation.Graph.DoubleStarV.left = isTrue ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq TriangleInflation.Graph.DoubleStarV.left TriangleInflation.Graph.DoubleStarV.right = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq TriangleInflation.Graph.DoubleStarV.left (TriangleInflation.Graph.DoubleStarV.leftLeaf i) = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq TriangleInflation.Graph.DoubleStarV.left (TriangleInflation.Graph.DoubleStarV.rightLeaf j) = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq TriangleInflation.Graph.DoubleStarV.right TriangleInflation.Graph.DoubleStarV.left = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq TriangleInflation.Graph.DoubleStarV.right TriangleInflation.Graph.DoubleStarV.right = isTrue ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq TriangleInflation.Graph.DoubleStarV.right (TriangleInflation.Graph.DoubleStarV.leftLeaf i) = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq TriangleInflation.Graph.DoubleStarV.right (TriangleInflation.Graph.DoubleStarV.rightLeaf j) = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq (TriangleInflation.Graph.DoubleStarV.leftLeaf i) TriangleInflation.Graph.DoubleStarV.left = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq (TriangleInflation.Graph.DoubleStarV.leftLeaf i) TriangleInflation.Graph.DoubleStarV.right = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq (TriangleInflation.Graph.DoubleStarV.leftLeaf i) (TriangleInflation.Graph.DoubleStarV.rightLeaf j) = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq (TriangleInflation.Graph.DoubleStarV.rightLeaf j) TriangleInflation.Graph.DoubleStarV.left = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq (TriangleInflation.Graph.DoubleStarV.rightLeaf j) TriangleInflation.Graph.DoubleStarV.right = isFalse ⋯
- TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq (TriangleInflation.Graph.DoubleStarV.rightLeaf j) (TriangleInflation.Graph.DoubleStarV.leftLeaf i) = isFalse ⋯
Instances For
Equations
Adjacency of the double star: the centre edge, and each leaf to its centre.
Equations
- TriangleInflation.Graph.doubleStarRel p q TriangleInflation.Graph.DoubleStarV.left TriangleInflation.Graph.DoubleStarV.right = True
- TriangleInflation.Graph.doubleStarRel p q TriangleInflation.Graph.DoubleStarV.right TriangleInflation.Graph.DoubleStarV.left = True
- TriangleInflation.Graph.doubleStarRel p q TriangleInflation.Graph.DoubleStarV.left (TriangleInflation.Graph.DoubleStarV.leftLeaf i) = True
- TriangleInflation.Graph.doubleStarRel p q (TriangleInflation.Graph.DoubleStarV.leftLeaf i) TriangleInflation.Graph.DoubleStarV.left = True
- TriangleInflation.Graph.doubleStarRel p q TriangleInflation.Graph.DoubleStarV.right (TriangleInflation.Graph.DoubleStarV.rightLeaf j) = True
- TriangleInflation.Graph.doubleStarRel p q (TriangleInflation.Graph.DoubleStarV.rightLeaf j) TriangleInflation.Graph.DoubleStarV.right = True
- TriangleInflation.Graph.doubleStarRel p q x✝¹ x✝ = False
Instances For
Equations
- One or more equations did not get rendered due to their size.
The double star with p left leaves and q right leaves.
Equations
- TriangleInflation.Graph.doubleStarAdj p q = { Adj := TriangleInflation.Graph.doubleStarRel p q, symm := ⋯, loopless := ⋯ }
Instances For
The path scenario P_k, k ≥ 2.
Equations
- TriangleInflation.Graph.path k hk = { V := Fin k, fintypeV := inferInstance, decEqV := inferInstance, G := TriangleInflation.Graph.pathAdj k, decAdj := inferInstance, no_isolated := ⋯ }
Instances For
The cycle scenario C_m, m ≥ 3.
Equations
- TriangleInflation.Graph.cycle m hm = { V := Fin m, fintypeV := inferInstance, decEqV := inferInstance, G := TriangleInflation.Graph.cycleAdj m, decAdj := inferInstance, no_isolated := ⋯ }
Instances For
The double-star scenario with p and q leaves.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The triangle scenario, C₃.
Equations
Instances For
The square scenario, C₄.
Equations
Instances For
The five-observer path P₅ (AUDIT-NOTES A4).
Equations
Instances For
A double-star forest: every connected component is a tree of diameter at most three (AUDIT-NOTES A3). Stated as acyclicity together with a diameter bound inside each component.
Equations
Instances For
Signs, flips and explicit laws #
A law after independent flips of each coordinate with probability η. Applied to a
target on Γ.V → Bool it is the noisy target of AUDIT-NOTES A7; applied to a witness on
GObs Γ t → Bool it is the local flip of every copied observation.
Equations
- TriangleInflation.Graph.flipLaw η P y = ∑ x : ι → Bool, P x * TriangleInflation.Graph.flipKernel η x y
Instances For
The total variation distance from a target to the compatible set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The five-path target of AUDIT-NOTES A4 (packet equation (1)):
P_h(x,b,c,d,z) = (1/32)[1 + bcd (1+h)/4 (1 + (−1)^{x+z})], with vertex 0 the left
endpoint A, vertices 1,2,3 the middle observations B,C,D and vertex 4 the right
endpoint E.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The conditional correlator f_{xz} = E[BCD | A = x, E = z] of AUDIT-NOTES A4. The
denominator is the conditioning cell; the value is junk 0 when that cell is null, and every
statement about it assumes the cell is positive.
Equations
- One or more equations did not get rendered due to their size.
Instances For
I = ¼ Σ_{x,z} f_{xz} (AUDIT-NOTES A4).
Equations
- TriangleInflation.Graph.fivePathI P = 1 / 4 * ∑ x : Bool, ∑ z : Bool, TriangleInflation.Graph.fivePathCorr P x z
Instances For
J = ¼ Σ_{x,z} (−1)^{x+z} f_{xz} (AUDIT-NOTES A4).
Equations
- TriangleInflation.Graph.fivePathJ P = 1 / 4 * ∑ x : Bool, ∑ z : Bool, TriangleInflation.Graph.sgn x * TriangleInflation.Graph.sgn z * TriangleInflation.Graph.fivePathCorr P x z
Instances For
The source boundary ∂F of a set of vertices of the cycle C_m, encoded by its lower
endpoint: the edge {v, v+1} is recorded by v, and lies in ∂F exactly when exactly one
of v, v+1 lies in F (AUDIT-NOTES A5).
Equations
Instances For
The cycle target P_{m,q} of AUDIT-NOTES A5, given by its Fourier expansion: the
character of F ⊆ V has moment (−q)^{|∂F|/2}. The boundary has even size, so the natural
division is exact.
Equations
- TriangleInflation.Graph.cycleTarget m q w = (1 / 2) ^ m * ∑ F : Finset (Fin m), (-q) ^ ((TriangleInflation.Graph.cycleBoundary m F).card / 2) * ∏ v ∈ F, TriangleInflation.Graph.sgn (w v)
Instances For
The square parity target of AUDIT-NOTES B2(i): the case m = 4 of cycleTarget.
Instances For
The parity-perfect triangle target Π(−q,−q,−q) of AUDIT-NOTES B2(ii): supported on the
even-parity triples, where it equals (1 − q(α+β+γ))/4 with α,β,γ the signs of the three
bits. All one- and two-point moments are −q and the triple moment is 1. Stated in the
three-bit type of TriangleInflation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
E[A] for a three-bit law, in the sign convention.
Equations
Instances For
E[B] for a three-bit law.
Equations
- TriangleInflation.Graph.triMeanB P = ∑ w : TriangleInflation.ThreeBit, TriangleInflation.Graph.sgn w.2.1 * P w
Instances For
E[C] for a three-bit law.
Equations
- TriangleInflation.Graph.triMeanC P = ∑ w : TriangleInflation.ThreeBit, TriangleInflation.Graph.sgn w.2.2 * P w
Instances For
The transported target of AUDIT-NOTES A6: the H-target on the image of an induced
embedding, tensored with fair bits on the remaining vertices of G.
Equations
- TriangleInflation.Graph.transportTarget G H φ P w = (P fun (u : H.V) => w (φ u)) * (1 / 2) ^ (Fintype.card G.V - Fintype.card H.V)
Instances For
The triangle re-encoding #
The triangle scenario triangleGraph has vertex type Fin 3; the triangle file uses
ThreeBit = Bool × Bool × Bool. Under the identification below, vertex 0 is the party A
(sources {0,1} and {2,0}, the paper's X and Z), vertex 1 is B (sources {0,1}
and {1,2}, the paper's X and Y) and vertex 2 is C (sources {1,2} and {2,0}, the
paper's Y and Z).