Documentation

CslibFrontier.Foundations.LinearAlgebra.Tensor.Party.Hubs

Routing a tensor through two hubs #

Lemma A.3 of VP ≠ VNP over every field [Ant26]. A tensor that is a sum of r products of a tensor on one part of its parties and a tensor on the other is a restriction of the product of the wires from its parties to two hubs and one wire of dimension r between the hubs (Cslib.PartyTensor.push_le_prod_wire_hubs). With two further parties as hubs this is Cslib.PartyTensor.push_inl_le_prod_wire_hubs.

Main results #

References #

theorem Cslib.PartyTensor.push_le_prod_wire_hubs {K : Type} [CommSemiring K] {I : Type} [Fintype I] [DecidableEq I] {A : Type} [Fintype A] [DecidableEq A] (π : A → I) (t : PartyTensor K A) (S : A → Prop) [DecidablePred S] {r : ℕ} (α β : Fin r → ((a : A) → t.Index a) → K) (hα : ∀ (j : Fin r) (x x' : (a : A) → t.Index a), (∀ (a : A), S a → x a = x' a) → α j x = α j x') (hβ : ∀ (j : Fin r) (x x' : (a : A) → t.Index a), (∀ (a : A), ¬S a → x a = x' a) → β j x = β j x') (hs : ∀ (x : (p : A) → t.Index p), t.entry x = ∑ j : Fin r, α j x * β j x) (o₁ o₂ : I) :
push π t ≤ (prod fun (a : A) => wire K (Fintype.card (t.Index a)) (π a) (if S a then o₁ else o₂)) * wire K r o₁ o₂

Paper: Lemma A.3 (lem:hubs). Let I = I₁ ⊔ I₂, and let a tensor t on I with index sizes n_p be a sum of r products of a tensor on I₁ and one on I₂. For two further parties o₁, o₂, t is a restriction of ∏_{p ∈ I₁} ⟨n_p⟩_{p o₁} · ⟨r⟩_{o₁ o₂} · ∏_{p ∈ I₂} ⟨n_p⟩_{p o₂}, also when o₁, o₂ are identified with given parties. In Lean the paper's I is A, its part I₁ is given by the predicate S, and α j, β j are the factors of the j-th product, functions of the indices in I₁ and in I₂. The map π places the parties of A among those of a set I that also contains o₁ and o₂, in any way; push_inl_le_prod_wire_hubs is the case of two further parties.

theorem Cslib.PartyTensor.push_inl_le_prod_wire_hubs {K : Type} [CommSemiring K] {I₁ I₂ : Type} [Fintype I₁] [DecidableEq I₁] [Fintype I₂] [DecidableEq I₂] (t : PartyTensor K (I₁ ⊕ I₂)) {r : ℕ} (α : Fin r → ((p : I₁) → t.Index (Sum.inl p)) → K) (β : Fin r → ((p : I₂) → t.Index (Sum.inr p)) → K) (hs : ∀ (x : (p : I₁ ⊕ I₂) → t.Index p), t.entry x = ∑ j : Fin r, (α j fun (p : I₁) => x (Sum.inl p)) * β j fun (p : I₂) => x (Sum.inr p)) :
push Sum.inl t ≤ (prod fun (p : I₁) => wire K (Fintype.card (t.Index (Sum.inl p))) (Sum.inl (Sum.inl p)) (Sum.inr true)) * wire K r (Sum.inr true) (Sum.inr false) * prod fun (p : I₂) => wire K (Fintype.card (t.Index (Sum.inr p))) (Sum.inl (Sum.inr p)) (Sum.inr false)

Lemma A.3 for two further parties o₁, o₂: the parties are I₁ ⊔ I₂ and the two hubs.