Documentation

CslibFrontier.Foundations.LinearAlgebra.Tensor.Indicator

0-1 indicator tensors, coordinate-factoring rank, and high-rank existence #

General constructions and rank bounds for 0-1 order-three tensors (Cslib.Tensor):

  1. Coordinate-factoring rank bound (rank_of_factors_left_mid): any order-three tensor over a commutative semiring K factoring on its first two legs through finite types Y₀, Y₁ has rank at most |Y₀| * |Y₁|.
  2. High-rank 0-1 order-three tensors over arbitrary fields (card_rank_indicatorThreeTensor_le, exists_not_rank_indicatorThreeTensor): over any field K (finite or infinite, including ZMod 2 and ℚ), multilinear Lagrange interpolation on {0, 1} ^ (X₀ × X₁ × X₂) composed with the degree-3 CP-rank parameterization shows that at most (3 * N + 1) ^ (r * (|X₀| + |X₁| + |X₂|)) subsets S : Finset (X₀ × X₁ × X₂) have CP-rank ≤ r (where N = |X₀| * |X₁| * |X₂|). Whenever that bound is strictly below 2 ^ N, some subset T ⊆ X₀ × X₁ × X₂ satisfies ¬Tensor.Rank r (indicatorThreeTensor K T). Note that this witness is a nonconstructive finite dimension/counting result, not an explicit tensor family.

Main definitions #

Main results #

0-1 indicator tensors and coordinate factoring #

noncomputable def Cslib.Tensor.indicatorThreeTensor (K : Type u_1) [Zero K] [One K] {X₀ : Type u_2} {X₁ : Type u_3} {X₂ : Type u_4} (T : Set (X₀ × X₁ × X₂)) :
Tensor K X₀ X₁ X₂

The 0-1 order-three tensor over K indicating membership in T ⊆ X₀ × X₁ × X₂.

@[simp]
theorem Cslib.Tensor.indicatorThreeTensor_apply (K : Type u_1) [Zero K] [One K] {X₀ : Type u_2} {X₁ : Type u_3} {X₂ : Type u_4} (T : Set (X₀ × X₁ × X₂)) [DecidablePred fun (x : X₀ × X₁ × X₂) => x ∈ T] (x₀ : X₀) (x₁ : X₁) (x₂ : X₂) :
indicatorThreeTensor K T x₀ x₁ x₂ = if (x₀, x₁, x₂) ∈ T then 1 else 0
theorem Cslib.Tensor.rank_of_factors_left_mid {K : Type u_1} {X₀ : Type u_2} {X₁ : Type u_3} {X₂ : Type u_4} {Y₀ : Type u_5} {Y₁ : Type u_6} [CommSemiring K] [Fintype Y₀] [Fintype Y₁] (π₀ : X₀ → Y₀) (π₁ : X₁ → Y₁) (g : Y₀ → Y₁ → X₂ → K) :
Rank (Fintype.card Y₀ * Fintype.card Y₁) fun (x₀ : X₀) (x₁ : X₁) (x₂ : X₂) => g (π₀ x₀) (π₁ x₁) x₂

Any order-three tensor factoring on its first two legs through finite types Y₀, Y₁ has rank at most |Y₀| * |Y₁| over any commutative semiring K.

High-rank 0-1 order-three tensors over arbitrary fields #

theorem Cslib.Tensor.card_rank_indicatorThreeTensor_le (K : Type u_1) [Field K] (X₀ : Type u_2) (X₁ : Type u_3) (X₂ : Type u_4) [Fintype X₀] [Fintype X₁] [Fintype X₂] (r : ℕ) :
{S : Finset (X₀ × X₁ × X₂) | Rank r (indicatorThreeTensor K ↑S)}.card ≤ (3 * (Fintype.card X₀ * Fintype.card X₁ * Fintype.card X₂) + 1) ^ (r * (Fintype.card X₀ + Fintype.card X₁ + Fintype.card X₂))

Number of 0-1 order-three tensors of CP-rank at most r. Over any field K (finite or infinite), the number of subsets S : Finset (X₀ × X₁ × X₂) whose indicator tensor indicatorThreeTensor K (S : Set _) has CP-rank at most r is at most (3 * N + 1) ^ (r * (|X₀| + |X₁| + |X₂|)), where N = |X₀| * |X₁| * |X₂|.

theorem Cslib.Tensor.exists_not_rank_indicatorThreeTensor (K : Type u_1) [Field K] {X₀ : Type u_2} {X₁ : Type u_3} {X₂ : Type u_4} [Fintype X₀] [Fintype X₁] [Fintype X₂] {r : ℕ} (hcount : (3 * (Fintype.card X₀ * Fintype.card X₁ * Fintype.card X₂) + 1) ^ (r * (Fintype.card X₀ + Fintype.card X₁ + Fintype.card X₂)) < 2 ^ (Fintype.card X₀ * Fintype.card X₁ * Fintype.card X₂)) :
∃ (T : Set (X₀ × X₁ × X₂)), ¬Rank r (indicatorThreeTensor K T)

Existence of high-rank 0-1 order-three tensors over any field. Let X₀, X₁, X₂ be finite index types with N = |X₀| * |X₁| * |X₂| and d = r * (|X₀| + |X₁| + |X₂|). If (3 * N + 1) ^ d < 2 ^ N, then over any field K (finite or infinite) there exists a subset T ⊆ X₀ × X₁ × X₂ whose 0-1 tensor indicatorThreeTensor K T does not have CP-rank ≤ r.