Documentation

CslibFrontier.Probability.PairwiseIndependentHash.FrameSubstitution

Affine substitution invariance of frame-conditioned channels #

A frame-conditioned channel A = (a₀, F) (Cslib.Probability.FrameChannel) evaluates an identifier y as the polynomial a₀ + ∑ j, y ^ (j + 1) • F j. Substituting α y + β for y, with α ≠ 0, gives another polynomial of the same degree. Its constant column is a₀ + ∑ j, β ^ (j + 1) • F j, and its coefficient columns are B F, where B is the upper-triangular matrix of binomial coefficients with diagonal α, α ^ 2, …, α ^ r. Since B is invertible, B F is again a frame, so the substitution is a map of frame-conditioned channels (FrameChannel.affineSubst) with (A.affineSubst β hα).eval y = A.eval (α * y + β) (FrameChannel.eval_affineSubst). The map is injective, hence a permutation of the finite channel space (FrameChannel.affineSubstEquiv). So it preserves the uniform law.

Consequently, replacing every identifier y by α y + β leaves the joint law of all evaluations unchanged, for one channel (dens_eval_comp_affine) and for any finite family of independent channels (dens_pi_eval_comp_affine). This is item 4 of Lemma 3.1 of the OpenAI preprint [OpenAI2026LogSpace, Lemma 3.1 and its proof, pp. 9–10]. There it covers, in particular, a common fixed padding suffix appended to all identifiers.

Main definitions #

Main results #

References #

def Cslib.Probability.FrameChannel.affineSubst {P H r : ℕ} [Fact (Nat.Prime P)] {α : ZMod P} (β : ZMod P) (hα : α ≠ 0) (A : FrameChannel P H r) :

The channel obtained by substituting α y + β into A, for α ≠ 0: its value at y is the value of A at α y + β (eval_affineSubst).

theorem Cslib.Probability.FrameChannel.eval_affineSubst {P H r : ℕ} [Fact (Nat.Prime P)] {α : ZMod P} (β : ZMod P) (hα : α ≠ 0) (A : FrameChannel P H r) (y : ZMod P) :
(affineSubst β hα A).eval y = A.eval (α * y + β)

Substitution: the substituted channel evaluates y as the original channel evaluates α y + β.

theorem Cslib.Probability.FrameChannel.eval_comp_affineSubst {P H r : ℕ} [Fact (Nat.Prime P)] {α : ZMod P} (β : ZMod P) (hα : α ≠ 0) (A : FrameChannel P H r) :
(affineSubst β hα A).eval = fun (y : ZMod P) => A.eval (α * y + β)

The substituted channel, as a function of the identifier.

theorem Cslib.Probability.FrameChannel.affineSubst_injective {P H r : ℕ} [Fact (Nat.Prime P)] {α : ZMod P} (β : ZMod P) (hα : α ≠ 0) :

Substitution is injective: the substitution matrix is invertible, so it recovers the frame, and then the constant column.

noncomputable def Cslib.Probability.FrameChannel.affineSubstEquiv {P H r : ℕ} [Fact (Nat.Prime P)] {α : ZMod P} (β : ZMod P) (hα : α ≠ 0) :

Substituting α y + β, for α ≠ 0, permutes the frame-conditioned channels.

theorem Cslib.Probability.FrameChannel.affineSubstEquiv_apply {P H r : ℕ} [Fact (Nat.Prime P)] {α : ZMod P} (β : ZMod P) (hα : α ≠ 0) (A : FrameChannel P H r) :
(affineSubstEquiv β hα) A = affineSubst β hα A
theorem Cslib.Probability.dens_eval_comp_affine {P H r : ℕ} [Fact (Nat.Prime P)] {α : ZMod P} (hα : α ≠ 0) (β : ZMod P) (E : (ZMod P → Fin H → ZMod P) → Prop) [DecidablePred E] :
{A : FrameChannel P H r | E fun (y : ZMod P) => A.eval (α * y + β)}.dens = {A : FrameChannel P H r | E A.eval}.dens

Affine substitution invariance: for α ≠ 0, the evaluations y ↦ A.eval (α y + β) of a uniformly random frame-conditioned channel have the same law as the evaluations y ↦ A.eval y [OpenAI2026LogSpace, Lemma 3.1, item 4].

theorem Cslib.Probability.dens_pi_eval_comp_affine {P H r : ℕ} [Fact (Nat.Prime P)] {α : ZMod P} (hα : α ≠ 0) (β : ZMod P) {ι : Type u_1} [Fintype ι] [DecidableEq ι] (E : (ι → ZMod P → Fin H → ZMod P) → Prop) [DecidablePred E] :
{As : ι → FrameChannel P H r | E fun (c : ι) (y : ZMod P) => (As c).eval (α * y + β)}.dens = {As : ι → FrameChannel P H r | E fun (c : ι) => (As c).eval}.dens

Affine substitution invariance for independent channels: for α ≠ 0, replacing every identifier y by α y + β in a finite family of independent uniformly random frame-conditioned channels leaves the joint law of all their evaluations unchanged [OpenAI2026LogSpace, Lemma 3.1, item 4].