Documentation

LeanPool.InflationTermination.TriangleInflation.Graph.Defs

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 #

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.

  • fintypeV : Fintype self.V
  • 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 (v : self.V) : ∃ (w : self.V), self.G.Adj v w

    No isolated vertices: an observation with no source has no copying convention.

Instances For
    @[reducible, inline]

    The latent sources of a pair-source scenario: the edges of its graph.

    Equations
    Instances For

      The sources incident to a vertex.

      Equations
      Instances For
        @[reducible, inline]

        A target law: a weight function on the binary observed vertices.

        Equations
        Instances For

          Order-t copied observations #

          @[reducible, inline]

          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
          Instances For
            @[reducible, inline]

            A deterministic assignment of all copied observations.

            Equations
            Instances For
              @[reducible, inline]

              The copied latent sources: a source together with a copy index.

              Equations
              Instances For
                def TriangleInflation.Graph.gPerm {Γ : PairGraph} {t : ℕ} (π : Γ.Edge → Equiv.Perm (Fin t)) (o : GObs Γ t) :
                GObs Γ t

                The action of a per-source permutation of copy indices on copied observations.

                Equations
                Instances For
                  def TriangleInflation.Graph.gRelabel {Γ : PairGraph} {t : ℕ} (π : Γ.Edge → Equiv.Perm (Fin t)) (ω : GAssign Γ t) :
                  GAssign Γ t

                  The induced action on assignments.

                  Equations
                  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
                    Instances For

                      The copied original scenarios #

                      def TriangleInflation.Graph.copyObs {Γ : PairGraph} {t : ℕ} (ι : Γ.Edge → Fin t) (v : Γ.V) :
                      GObs Γ t

                      The copied observation of the vertex v in the copy of the original scenario selected by the index vector ι.

                      Equations
                      Instances For
                        def TriangleInflation.Graph.copySet {Γ : PairGraph} {t : ℕ} (ι : Γ.Edge → Fin t) :
                        Finset (GObs Γ t)

                        The copied original scenario selected by ι: one copied observation per vertex.

                        Equations
                        Instances For
                          def TriangleInflation.Graph.readCopy {Γ : PairGraph} {t : ℕ} (ι : Γ.Edge → Fin t) (ω : GAssign Γ t) :
                          Γ.V → Bool

                          The observed outcome that an assignment gives to the copied scenario selected by ι.

                          Equations
                          Instances For
                            def TriangleInflation.Graph.readDiag {Γ : PairGraph} {t : ℕ} (ω : GAssign Γ t) :
                            Fin t → Γ.V → Bool

                            The t diagonal rows: row r takes the copy index r on every source (AUDIT-NOTES A1).

                            Equations
                            Instances For
                              def TriangleInflation.Graph.gTensorPow {Γ : PairGraph} (t : ℕ) (P : GTarget Γ) :
                              (Fin t → Γ.V → Bool) → ℝ

                              The t-fold tensor power of a target law.

                              Equations
                              Instances For

                                Ancestry #

                                The copied latent ancestors of a copied observation: for each incident source, the copy selected by that observation.

                                Equations
                                Instances For

                                  The copied latent ancestors of a set of copied observations.

                                  Equations
                                  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
                                      Instances For

                                        Injectable sets #

                                        The working definition of injectability: a set of copied observations lies inside one copied original scenario.

                                        Equations
                                        Instances For

                                          Two copied observations agree in the copy index of every source incident to both.

                                          Equations
                                          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
                                            Instances For
                                              def TriangleInflation.Graph.gRestrict {Γ : PairGraph} {t : ℕ} (S : Finset (GObs Γ t)) (ω : GAssign Γ t) :
                                              ↥S → Bool

                                              The restriction of an assignment to a set of copied observations.

                                              Equations
                                              Instances For
                                                def TriangleInflation.Graph.gPartyRead {Γ : PairGraph} {t : ℕ} (S : Finset (GObs Γ t)) (w : Γ.V → Bool) :
                                                ↥S → Bool

                                                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
                                                Instances For
                                                  def TriangleInflation.Graph.subRestrict {Γ : PairGraph} {t : ℕ} {S T : Finset (GObs Γ t)} (h : S ⊆ T) (φ : ↥T → Bool) :
                                                  ↥S → Bool

                                                  The restriction map between laws on nested sets of copied observations.

                                                  Equations
                                                  Instances For
                                                    def TriangleInflation.Graph.readOnBlock {Γ : PairGraph} {t : ℕ} (B S : Finset (GObs Γ t)) (φ : ↥S → Bool) :
                                                    ↥B → Bool

                                                    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.

                                                    Equations
                                                    Instances For

                                                      The finite inflation tests #

                                                      Every injectable set carries the corresponding marginal of the target.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For

                                                        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

                                                            The ancestral-independence feasible set of a pair-source scenario (AUDIT-NOTES A1).

                                                            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.

                                                              Two copied observations share a copied latent parent.

                                                              Equations
                                                              Instances For
                                                                def TriangleInflation.Graph.ActiveTrail {Γ : PairGraph} {t : ℕ} (X Y Z : Finset (GObs Γ t)) (o₀ : GObs Γ t) (mid : List (GObs Γ t)) (o₁ : GObs Γ t) :

                                                                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
                                                                Instances For
                                                                  def TriangleInflation.Graph.dsep {Γ : PairGraph} {t : ℕ} (X Y Z : Finset (GObs Γ t)) :

                                                                  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
                                                                    theorem TriangleInflation.Graph.sub_left_union {Γ : PairGraph} {t : ℕ} (X Y Z : Finset (GObs Γ t)) :
                                                                    X ∪ Z ⊆ X ∪ Y ∪ Z
                                                                    theorem TriangleInflation.Graph.sub_right_union {Γ : PairGraph} {t : ℕ} (X Y Z : Finset (GObs Γ t)) :
                                                                    Y ∪ Z ⊆ X ∪ Y ∪ Z
                                                                    theorem TriangleInflation.Graph.sub_mid_union {Γ : PairGraph} {t : ℕ} (X Y Z : Finset (GObs Γ t)) :
                                                                    Z ⊆ X ∪ Y ∪ Z
                                                                    theorem TriangleInflation.Graph.sub_mid_left {Γ : PairGraph} {t : ℕ} (X Z : Finset (GObs Γ t)) :
                                                                    Z ⊆ X ∪ Z
                                                                    noncomputable def TriangleInflation.Graph.glueLaw {Γ : PairGraph} {t : ℕ} (X Y Z : Finset (GObs Γ t)) (μ₁ : (↥(X ∪ Z) → Bool) → ℝ) (μ₂ : (↥(Y ∪ Z) → Bool) → ℝ) :
                                                                    (↥(X ∪ Y ∪ Z) → Bool) → ℝ

                                                                    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
                                                                      inductive TriangleInflation.Graph.Expressible {Γ : PairGraph} (t : ℕ) (P : GTarget Γ) (S : Finset (GObs Γ t)) :
                                                                      ((↥S → Bool) → ℝ) → Prop

                                                                      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.

                                                                      Instances For

                                                                        The recursively expressible feasible set of a pair-source scenario (paper Definition 2.3).

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For

                                                                          AI sets #

                                                                          The sets and laws that the ancestral-independence prescriptions cover. AUDIT-NOTES A2 identifies these with the recursively expressible ones.

                                                                          def TriangleInflation.Graph.sharedComponent {Γ : PairGraph} {t : ℕ} (S : Finset (GObs Γ t)) :
                                                                          ↥S → ↥S → Prop

                                                                          Connectivity in the shared-parent graph on a set of copied observations.

                                                                          Equations
                                                                          Instances For

                                                                            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.

                                                                              Instances For
                                                                                def TriangleInflation.Graph.aiProduct {Γ : PairGraph} {t : ℕ} (S : Finset (GObs Γ t)) (D : AIDecomposition S) (P : GTarget Γ) :
                                                                                (↥S → Bool) → ℝ

                                                                                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.

                                                                                  • L : Γ.Edge → Type

                                                                                    The latent alphabet of each source.

                                                                                  • fintypeL (e : Γ.Edge) : Fintype (self.L e)
                                                                                  • μ (e : Γ.Edge) : self.L e → ℝ

                                                                                    The law of each source.

                                                                                  • resp (v : Γ.V) : ((e : ↥(Γ.inc v)) → self.L ↑e) → ℝ

                                                                                    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
                                                                                        Instances For

                                                                                          Named scenarios #

                                                                                          The path P_k on Fin k.

                                                                                          Equations
                                                                                          Instances For
                                                                                            @[instance_reducible]
                                                                                            Equations
                                                                                            theorem TriangleInflation.Graph.path_no_isolated {k : ℕ} (hk : 2 ≤ k) (v : Fin k) :
                                                                                            ∃ (w : Fin k), (pathAdj k).Adj v w

                                                                                            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
                                                                                              @[instance_reducible]
                                                                                              Equations
                                                                                              theorem TriangleInflation.Graph.cycle_no_isolated {m : ℕ} (hm : 3 ≤ m) (v : Fin m) :
                                                                                              ∃ (w : Fin m), (cycleAdj m).Adj v w

                                                                                              The vertices of a double star: two centres and their leaves.

                                                                                              Instances For
                                                                                                def TriangleInflation.Graph.instDecidableEqDoubleStarV.decEq {p✝ q✝ : ℕ} (x✝ x✝¹ : DoubleStarV p✝ q✝) :
                                                                                                Decidable (x✝ = x✝¹)
                                                                                                Equations
                                                                                                Instances For
                                                                                                  @[instance_reducible]
                                                                                                  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
                                                                                                  Instances For

                                                                                                    The path scenario P_k, k ≥ 2.

                                                                                                    Equations
                                                                                                    Instances For

                                                                                                      The cycle scenario C_m, m ≥ 3.

                                                                                                      Equations
                                                                                                      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

                                                                                                          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 #

                                                                                                            The sign of a bit: sgn false = 1, sgn true = -1 (AUDIT-NOTES convention).

                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              def TriangleInflation.Graph.flipKernel {ι : Type} [Fintype ι] (η : ℝ) (x y : ι → Bool) :

                                                                                                              The kernel of independent flips with probability η at every coordinate.

                                                                                                              Equations
                                                                                                              Instances For
                                                                                                                def TriangleInflation.Graph.flipLaw {ι : Type} [Fintype ι] [DecidableEq ι] (η : ℝ) (P : (ι → Bool) → ℝ) :
                                                                                                                (ι → Bool) → ℝ

                                                                                                                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
                                                                                                                Instances For
                                                                                                                  noncomputable def TriangleInflation.Graph.dTV {α : Type u_1} [Fintype α] (P Q : α → ℝ) :

                                                                                                                  The total variation distance, half the ℓ¹ distance.

                                                                                                                  Equations
                                                                                                                  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
                                                                                                                      noncomputable def TriangleInflation.Graph.fivePathTarget (h : ℝ) :
                                                                                                                      (Fin 5 → Bool) → ℝ

                                                                                                                      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
                                                                                                                        noncomputable def TriangleInflation.Graph.fivePathCorr (P : (Fin 5 → Bool) → ℝ) (x z : Bool) :

                                                                                                                        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
                                                                                                                          noncomputable def TriangleInflation.Graph.fivePathI (P : (Fin 5 → Bool) → ℝ) :

                                                                                                                          I = ¼ Σ_{x,z} f_{xz} (AUDIT-NOTES A4).

                                                                                                                          Equations
                                                                                                                          Instances For
                                                                                                                            noncomputable def TriangleInflation.Graph.fivePathJ (P : (Fin 5 → Bool) → ℝ) :

                                                                                                                            J = ¼ Σ_{x,z} (−1)^{x+z} f_{xz} (AUDIT-NOTES A4).

                                                                                                                            Equations
                                                                                                                            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
                                                                                                                                noncomputable def TriangleInflation.Graph.cycleTarget (m : ℕ) (q : ℝ) :
                                                                                                                                (Fin m → Bool) → ℝ

                                                                                                                                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
                                                                                                                                Instances For
                                                                                                                                  noncomputable def TriangleInflation.Graph.squareTarget (q : ℝ) :
                                                                                                                                  (Fin 4 → Bool) → ℝ

                                                                                                                                  The square parity target of AUDIT-NOTES B2(i): the case m = 4 of cycleTarget.

                                                                                                                                  Equations
                                                                                                                                  Instances For
                                                                                                                                    noncomputable def TriangleInflation.Graph.triParity (q : ℝ) :

                                                                                                                                    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
                                                                                                                                        noncomputable def TriangleInflation.Graph.transportTarget (G H : PairGraph) (φ : H.V → G.V) (P : GTarget H) :

                                                                                                                                        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
                                                                                                                                        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).

                                                                                                                                          The re-encoding of a three-bit outcome as a function on Fin 3.

                                                                                                                                          Equations
                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                          Instances For