Tensors over a finite set of parties, restrictions and covers #
A tensor over a finite set I of parties with entries in K (Cslib.PartyTensor K I) has,
for each party p, a finite index set Index p (the leg of p), and an entry for each choice
of one index per party. The order-three tensors of bilinear complexity (Cslib.Tensor) have
three parties and index types fixed in their type; here there may be any finite set of parties,
and the index sets are part of the tensor.
Following Strassen, s is a restriction of t, written s ≤ t, when s arises from t
by one linear map on each leg: s x = ∑ y, (∏ p, L p (x p) (y p)) * t y. Restriction is a preorder
(PartyTensor.instPreorder) and is compatible with the product, party by party
(MulLeftMono, MulRightMono), so mul_le_mul' and gcongr apply to it. s is covered
by a finite family b (PartyTensor.CoveredBy) when s is a sum of restrictions of the
members of b, one of each (a restriction may be 0).
The constructions are the product s * t (Kronecker product, party by party) and its unit 1,
the product prod b of a finite family, the powers t ^ k, the push-forward push π t,
which gives the leg j of a tensor over J to the party π j, the unit tensor unit K J r
of size r and the wire wire K n p q of dimension n between two parties.
Main definitions #
Cslib.PartyTensor: tensors over a finite set of parties.Cslib.PartyTensor.localApply: one linear map on each leg, applied to an array.Cslib.PartyTensor.prod,Cslib.PartyTensor.push,Cslib.PartyTensor.unit,Cslib.PartyTensor.wire: products of families, push-forwards, unit tensors and wires.Cslib.PartyTensor.CoveredBy: sums of restrictions.
Main results #
Cslib.PartyTensor.instPreorder: restriction is a preorder, compatible with products (Cslib.PartyTensor.prod_le_prod) and push-forwards (Cslib.PartyTensor.push_le_push).Cslib.PartyTensor.le_of_map: a tensor whose entries are those oftat a leg-wise map of the indices, times leg-wise factors, is a restriction oft.Cslib.PartyTensor.CoveredBy.bind,Cslib.PartyTensor.CoveredBy.of_le,Cslib.PartyTensor.CoveredBy.mono,Cslib.PartyTensor.CoveredBy.mul,Cslib.PartyTensor.CoveredBy.push: covers compose and are compatible with the operations.
References #
- Anthropic, VP ≠ VNP over every field, paper and Lean formalization,
§A.1 of the paper; modules
Ov.Core.TensorandOv.Core.Basic
A tensor over the parties I with entries in K: for each party p a finite index set
Index p, and an entry for each choice of one index per party. The zero array is allowed.
- Index : I → Type
The index set of the leg of a party.
- decEq (p : I) : DecidableEq (self.Index p)
- entry : ((p : I) → self.Index p) → K
The entry at a choice of one index per party.
Instances For
Constructions #
The push-forward: the leg j of a tensor over J is given to the party π j. A party may
get several legs, or none (then its index set has one element).
The same legs with another array.
The tensor 1: all legs one-dimensional, the entry 1.
The product (Kronecker product, party by party).
The product of a finite family.
The k-th power, the product of k copies: its indices are k-tuples.
The unit tensor ⟨r⟩_J of size r: the entry is 1 where all indices agree.
The wire ⟨n⟩_pq of dimension n between the parties p and q.
Local maps applied to arrays #
One linear map on each leg, as a matrix L p : α p → β p → K, applied to an array f on
the index tuples of β.
Local maps compose.
Local maps applied to a sum.
Local maps applied to a product of two arrays.
Local maps applied to a product of a family of arrays.
Local maps applied to an array whose legs are sorted by parties.
Local maps whose matrices have at most one nonzero entry in each row: the row a of the
matrix of p has the entry w p a in the column g p a.
Restrictions #
s ≤ t: s is a restriction of t, it arises from t by one linear map on each leg.
If the entry of s at x is a product of leg-wise factors times the entry of t at
g x, where g acts leg by leg, then s is a restriction of t.
If the entry of s at x is the entry of t at g x, where g acts leg by leg, then s
is a restriction of t.
Restriction is a preorder.
Products of families of restrictions are restrictions.
Restrictions stay restrictions when the legs are given to other parties.
1 is a restriction of every tensor with a nonzero entry, if there is a party.
Covers: sums of restrictions #
s is covered by the family b: it is a sum of restrictions of its members, one
restriction of each b k (which may be 0).
s is covered by the b k if and only if its array is a sum of arrays, the k-th of which
is a restriction of b k.
If the array of s is the sum of the arrays v k, then s is covered by the tensors with
these arrays.
A restriction is covered by a family with one member.
A tensor whose array is 0 is covered by the empty family.
Covers compose: if s is covered by the b k and each b k by the c k m, then s is
covered by all the c k m.
A restriction of a covered tensor is covered by the same family.
Each member of a cover may be replaced by a tensor of which it is a restriction.
The members of a cover may be renamed.
The product of two covered tensors is covered by the products of two members.
A cover stays a cover when the legs are given to other parties.