Documentation

CslibFrontier.Foundations.LinearAlgebra.Tensor.Party.Unit

Unit tensors and wires #

Relations between unit tensors, whose legs may be held by any parties, several by one party, and between wires: a smaller unit tensor is a restriction of a larger one, sizes multiply under the product, several legs of a unit tensor at one party are as good as one, and a pushed unit tensor depends only on the set of parties holding a leg. Wires can be read in both directions, parallel wires multiply their dimensions, a wire at one party is a restriction of 1, a wire is a restriction of a path of two wires (PartyTensor.wire_le_mul_wire), and legs can be moved along wires (PartyTensor.push_le_mul_push). An upper functional, in particular a spectral point, is between 1 and n at a unit tensor of size n ≥ 1. The wire exponent log₂ F ⟨2⟩_pq of a spectral point F is the d_φ(p, q) of Lemma A.2 of [Ant26].

Main definitions #

Main results #

References #

Unit tensors #

theorem Cslib.PartyTensor.unit_entry_of {K : Type} [CommSemiring K] {J : Type} [Fintype J] {r : ℕ} {x : J → Fin r} (h : ∀ (i j : J), x i = x j) :
(unit K J r).entry x = 1

The entry of a unit tensor at equal indices is 1.

theorem Cslib.PartyTensor.unit_entry_of_not {K : Type} [CommSemiring K] {J : Type} [Fintype J] {r : ℕ} {x : J → Fin r} (h : ¬∀ (i j : J), x i = x j) :
(unit K J r).entry x = 0

The other entries of a unit tensor are 0.

theorem Cslib.PartyTensor.unit_entry_congr {K : Type} [CommSemiring K] {J : Type} [Fintype J] {L : Type} [Fintype L] {r r' : ℕ} {x : J → Fin r} {y : L → Fin r'} (h : (∀ (i j : J), x i = x j) ↔ ∀ (i j : L), y i = y j) :
(unit K J r).entry x = (unit K L r').entry y

Entries of unit tensors at index tuples that are constant together are equal.

theorem Cslib.PartyTensor.unit_le_unit {K : Type} [CommSemiring K] {J : Type} [Fintype J] [DecidableEq J] {m n : ℕ} (h : m ≤ n) :
unit K J m ≤ unit K J n

A smaller unit tensor is a restriction of a larger one.

theorem Cslib.PartyTensor.antisymmRel_unit_mul {K : Type} [CommSemiring K] {J : Type} [Fintype J] [DecidableEq J] (m n : ℕ) :
AntisymmRel (fun (x1 x2 : PartyTensor K J) => x1 ≤ x2) (unit K J (m * n)) (unit K J m * unit K J n)

The product of the unit tensors of sizes m and n is the one of size m * n.

theorem Cslib.PartyTensor.antisymmRel_unit_one {K : Type} [CommSemiring K] {J : Type} [Fintype J] [DecidableEq J] :
AntisymmRel (fun (x1 x2 : PartyTensor K J) => x1 ≤ x2) (unit K J 1) 1

The unit tensor of size 1 is 1.

theorem Cslib.PartyTensor.antisymmRel_push_unit {K : Type} [CommSemiring K] {J : Type} [Fintype J] [DecidableEq J] {L : Type} [Fintype L] [DecidableEq L] (ρ : L → J) (hρ : Function.Surjective ρ) (n : ℕ) :
AntisymmRel (fun (x1 x2 : PartyTensor K J) => x1 ≤ x2) (push ρ (unit K L n)) (unit K J n)

Several legs of a unit tensor at one party are as good as one leg.

theorem Cslib.PartyTensor.antisymmRel_push_unit_congr {K : Type} [CommSemiring K] {I J : Type} [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] {L : Type} [Fintype L] [DecidableEq L] (π : J → I) (π' : L → I) (h : Set.range π = Set.range π') (n : ℕ) :
AntisymmRel (fun (x1 x2 : PartyTensor K I) => x1 ≤ x2) (push π (unit K J n)) (push π' (unit K L n))

A pushed unit tensor depends only on the set of parties that hold a leg.

theorem Cslib.PartyTensor.push_const_le_one {K : Type} [CommSemiring K] {I J : Type} [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] (q : I) (t : PartyTensor K J) :
push (fun (x : J) => q) t ≤ 1

A tensor with all its legs at one party is a restriction of 1.

Wires #

theorem Cslib.PartyTensor.antisymmRel_wire_comm {K : Type} [CommSemiring K] {I : Type} [Fintype I] [DecidableEq I] (n : ℕ) (p q : I) :
AntisymmRel (fun (x1 x2 : PartyTensor K I) => x1 ≤ x2) (wire K n p q) (wire K n q p)

A wire may be read in both directions.

theorem Cslib.PartyTensor.wire_self_le_one {K : Type} [CommSemiring K] {I : Type} [Fintype I] [DecidableEq I] (n : ℕ) (p : I) :
wire K n p p ≤ 1

A wire with both ends at one party is a restriction of 1.

theorem Cslib.PartyTensor.antisymmRel_wire_mul {K : Type} [CommSemiring K] {I : Type} [Fintype I] [DecidableEq I] (m n : ℕ) (p q : I) :
AntisymmRel (fun (x1 x2 : PartyTensor K I) => x1 ≤ x2) (wire K (m * n) p q) (wire K m p q * wire K n p q)

Two parallel wires are one wire, whose dimension is the product.

theorem Cslib.PartyTensor.antisymmRel_wire_one {K : Type} [CommSemiring K] {I : Type} [Fintype I] [DecidableEq I] (p q : I) :
AntisymmRel (fun (x1 x2 : PartyTensor K I) => x1 ≤ x2) (wire K 1 p q) 1

A wire of dimension 1 is 1.

theorem Cslib.PartyTensor.wire_le_mul_wire {K : Type} [CommSemiring K] {I : Type} [Fintype I] [DecidableEq I] (n : ℕ) (p q r : I) :
wire K n p q ≤ wire K n p r * wire K n r q

The wire from p to q is a restriction of the product of the wires from p to r and from r to q.

theorem Cslib.PartyTensor.push_le_mul_push {K : Type} [CommSemiring K] {I J : Type} [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] (π π' : J → I) (t : PartyTensor K J) :
push π t ≤ (prod fun (j : J) => wire K (Fintype.card (t.Index j)) (π j) (π' j)) * push π' t

Moving legs: the leg j can be moved from π' j to π j through a wire of its dimension.

theorem Cslib.PartyTensor.UpperFunctional.one_le_unit {I J : Type} [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] {K : Type} [Field K] (P : UpperFunctional K I) [Nonempty I] (π : J → I) {n : ℕ} (hn : 1 ≤ n) :
1 ≤ P.toFun (push π (unit K J n))

An upper functional at a pushed unit tensor of size at least 1 is at least 1.

theorem Cslib.PartyTensor.UpperFunctional.unit_le {K : Type} [CommSemiring K] {I J : Type} [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J] (P : UpperFunctional K I) [Nonempty J] (π : J → I) (n : ℕ) :
P.toFun (push π (unit K J n)) ≤ ↑n

An upper functional at a unit tensor that has a leg is at most its size.

noncomputable def Cslib.PartyTensor.SpectralPoint.wireExponent {K : Type} [CommSemiring K] {I : Type} [Fintype I] [DecidableEq I] (F : SpectralPoint K I) (p q : I) :

The wire exponent of a spectral point between the parties p and q: log₂ of its value at the wire of dimension 2 (the d_φ(p, q) of Lemma A.2 of [Ant26]).