Documentation

CslibFrontier.Computability.Communication.SignRank

Sign-rank #

A real matrix A sign-represents a Boolean function f : X → Y → Bool when each entry of A is nonzero with the sign of the corresponding entry of the sign matrix signMatrix ℝ f: negative where f is true and positive where f is false (SignRepresents). The sign-rank of f is the least rank of such a matrix (signRank) Paturi and Simon Sherstov and Wu, §2.8. It is invariant under negating f (signRank_not) and exchanging the players (signRank_swap), does not increase on submatrices (signRank_comap_le), and is at most the rank of the sign matrix (signRank_le_rank_signMatrix). A sign-representation of least rank factors through signRank f dimensions (exists_mul_signRepresents), and by scaling and rounding every factorization can be replaced by an integer one (exists_int_mul_signRepresents).

The sign-rank can be much smaller than the rank. The communication matrix of equality on n inputs is the identity, of rank n, but its sign-rank is at most three: for an injective numbering e of the inputs, the matrix (e x - e y) ^ 2 - 1 / 4 sign-represents equality and has rank at most three (signRank_equality_le_three). With three or more inputs it is at least two (two_le_signRank_equality), and for four or more it is at least three (three_le_signRank_equality), hence equal to three (signRank_equality_eq_three), the sign-rank step of Claim 3 in Alon, Moran and Yehudayoff (arXiv:1503.07648v2, §1.2 and §3.2.1; the VC-dimension part of Claim 3 is tracked in #3262).

The sign-rank characterizes unbounded-error communication; see CslibFrontier.Computability.Communication.PaturiSimon.

Main definitions #

Main results #

References #

def Cslib.Communication.SignRepresents {X : Type u_1} {Y : Type u_2} (A : Matrix X Y ℝ) (f : X → Y → Bool) :

A real matrix A sign-represents a Boolean function f when each of its entries has the sign of the corresponding entry of the sign matrix of f: negative where f is true and positive where f is false. In particular every entry is nonzero.

theorem Cslib.Communication.SignRepresents.iff_lt {X : Type u_1} {Y : Type u_2} {A : Matrix X Y ℝ} {f : X → Y → Bool} :
SignRepresents A f ↔ ∀ (x : X) (y : Y), if f x y = true then A x y < 0 else 0 < A x y

Sign-representation entry by entry.

theorem Cslib.Communication.SignRepresents.neg_of_true {X : Type u_1} {Y : Type u_2} {A : Matrix X Y ℝ} {f : X → Y → Bool} (hA : SignRepresents A f) {x : X} {y : Y} (h : f x y = true) :
A x y < 0
theorem Cslib.Communication.SignRepresents.pos_of_false {X : Type u_1} {Y : Type u_2} {A : Matrix X Y ℝ} {f : X → Y → Bool} (hA : SignRepresents A f) {x : X} {y : Y} (h : f x y = false) :
0 < A x y
theorem Cslib.Communication.SignRepresents.ne_zero {X : Type u_1} {Y : Type u_2} {A : Matrix X Y ℝ} {f : X → Y → Bool} (hA : SignRepresents A f) (x : X) (y : Y) :
A x y ≠ 0
theorem Cslib.Communication.SignRepresents.smul {X : Type u_1} {Y : Type u_2} {A : Matrix X Y ℝ} {f : X → Y → Bool} (hA : SignRepresents A f) {c : ℝ} (hc : 0 < c) :

Scaling by a positive constant preserves sign-representation.

theorem Cslib.Communication.SignRepresents.neg {X : Type u_1} {Y : Type u_2} {A : Matrix X Y ℝ} {f : X → Y → Bool} (hA : SignRepresents A f) :
SignRepresents (-A) fun (x : X) (y : Y) => !f x y

Negating a matrix sign-represents the negated function.

theorem Cslib.Communication.SignRepresents.transpose {X : Type u_1} {Y : Type u_2} {A : Matrix X Y ℝ} {f : X → Y → Bool} (hA : SignRepresents A f) :
SignRepresents A.transpose fun (y : Y) (x : X) => f x y

Transposing a matrix sign-represents the function with its arguments exchanged.

theorem Cslib.Communication.SignRepresents.submatrix {X : Type u_1} {Y : Type u_2} {X' : Type u_3} {Y' : Type u_4} {A : Matrix X Y ℝ} {f : X → Y → Bool} (hA : SignRepresents A f) (a : X' → X) (b : Y' → Y) :
SignRepresents (A.submatrix a b) fun (x : X') (y : Y') => f (a x) (b y)

Submatrices sign-represent the restricted function.

theorem Cslib.Communication.signRepresents_signMatrix {X : Type u_1} {Y : Type u_2} (f : X → Y → Bool) :

The sign matrix of f sign-represents f.

noncomputable def Cslib.Communication.signRank {X : Type u_1} {Y : Type u_2} (f : X → Y → Bool) :

The sign-rank of a Boolean function f: the least rank of a real matrix that sign-represents f Sherstov and Wu, §2.8. The sign matrix itself is such a matrix, so the infimum is attained (exists_signRepresents_rank_eq).

theorem Cslib.Communication.signRank_le_rank {X : Type u_1} {Y : Type u_2} {f : X → Y → Bool} {A : Matrix X Y ℝ} (hA : SignRepresents A f) :
theorem Cslib.Communication.exists_signRepresents_rank_eq {X : Type u_1} {Y : Type u_2} (f : X → Y → Bool) :
∃ (A : Matrix X Y ℝ), SignRepresents A f ∧ A.rank = signRank f

Some sign-representation has rank exactly the sign-rank.

theorem Cslib.Communication.signRank_le_iff {X : Type u_1} {Y : Type u_2} {f : X → Y → Bool} {r : ℕ} :
signRank f ≤ r ↔ ∃ (A : Matrix X Y ℝ), SignRepresents A f ∧ A.rank ≤ r
theorem Cslib.Communication.le_signRank_iff {X : Type u_1} {Y : Type u_2} {f : X → Y → Bool} {r : ℕ} :
r ≤ signRank f ↔ ∀ (A : Matrix X Y ℝ), SignRepresents A f → r ≤ A.rank
theorem Cslib.Communication.signRank_le_card_of_mul {X : Type u_1} {Y : Type u_2} {f : X → Y → Bool} [Finite Y] {ι : Type u_5} [Fintype ι] {U : Matrix X ι ℝ} {V : Matrix ι Y ℝ} (h : SignRepresents (U * V) f) :

A sign-representation by a product through k dimensions bounds the sign-rank by k.

theorem Cslib.Communication.exists_mul_signRepresents {X : Type u_1} {Y : Type u_2} [Finite Y] (f : X → Y → Bool) :
∃ (U : Matrix X (Fin (signRank f)) ℝ) (V : Matrix (Fin (signRank f)) Y ℝ), SignRepresents (U * V) f

Sign-rank factorization: f is sign-represented by a product through signRank f dimensions.

theorem Cslib.Communication.signRank_le_rank_signMatrix {X : Type u_1} {Y : Type u_2} (f : X → Y → Bool) :

The sign-rank is at most the rank of the sign matrix.

The sign-rank is at most the rank of the communication matrix plus one.

theorem Cslib.Communication.signRank_le_card_right {X : Type u_1} {Y : Type u_2} [Fintype Y] (f : X → Y → Bool) :

The sign-rank is at most the number of columns.

theorem Cslib.Communication.signRank_le_card_left {X : Type u_1} {Y : Type u_2} [Fintype X] (f : X → Y → Bool) :

The sign-rank is at most the number of rows.

theorem Cslib.Communication.signRank_comap_le {X : Type u_1} {Y : Type u_2} {X' : Type u_3} {Y' : Type u_4} [Finite Y] [Finite Y'] (f : X → Y → Bool) (a : X' → X) (b : Y' → Y) :
(signRank fun (x : X') (y : Y') => f (a x) (b y)) ≤ signRank f

Monotonicity under submatrices: restricting (or repeating) rows and columns does not increase the sign-rank.

@[simp]
theorem Cslib.Communication.signRank_not {X : Type u_1} {Y : Type u_2} [Finite Y] (f : X → Y → Bool) :
(signRank fun (x : X) (y : Y) => !f x y) = signRank f

Negating a function does not change its sign-rank.

theorem Cslib.Communication.signRank_swap {X : Type u_1} {Y : Type u_2} [Finite Y] [Finite X] (f : X → Y → Bool) :
(signRank fun (y : Y) (x : X) => f x y) = signRank f

Exchanging the arguments does not change the sign-rank.

theorem Cslib.Communication.signRank_pos {X : Type u_1} {Y : Type u_2} [Finite Y] [Nonempty X] [Nonempty Y] (f : X → Y → Bool) :

When both players have inputs, the sign-rank is positive: the zero matrix sign-represents nothing.

theorem Cslib.Communication.exists_mul_of_signRank_le_one {X : Type u_1} {Y : Type u_2} {f : X → Y → Bool} [Finite Y] [Nonempty X] [Nonempty Y] (h : signRank f ≤ 1) :
∃ (u : X → ℝ) (v : Y → ℝ), ∀ (x : X) (y : Y), 0 < signMatrix ℝ f x y * (u x * v y)

If f has sign-rank at most one, it is sign-represented by a product u x * v y.

Integer sign-representations #

theorem Cslib.Communication.exists_int_mul_signRepresents {X : Type u_1} {Y : Type u_2} {f : X → Y → Bool} [Finite X] [Finite Y] {ι : Type u_5} [Fintype ι] {U : Matrix X ι ℝ} {V : Matrix ι Y ℝ} (h : SignRepresents (U * V) f) :
∃ (U' : Matrix X ι ℤ) (V' : Matrix ι Y ℤ), SignRepresents ((U' * V').map Int.cast) f

Integer sign-representations. If a product U * V of real matrices through ι sign-represents f on finite sets of inputs, so does a product of integer matrices through the same ι: for large N, the matrices ⌊N U⌋ and ⌊N V⌋ have a product within o(N ^ 2) of N ^ 2 (U * V), whose entries are bounded away from zero.

Equality #

Equality has sign-rank at most three: for an injective numbering e of the inputs, the matrix (e x - e y) ^ 2 - 1 / 4 sign-represents equality and has rank at most three.

On three or more inputs, equality has sign-rank at least two: a product u x * v y takes the same sign on two rows x₁ ≠ x₂ with u x₁, u x₂ of the same sign, but equality separates them in column x₁.

On four or more inputs, equality has sign-rank at least three: in a rank-two factorization U * V on four inputs, the first three rows of U satisfy a nontrivial linear relation in ℝ²; testing that relation against the fourth column of V rules out coefficients all of one sign, and testing against the first three columns rules out a single positive or single negative coefficient.

The sign-rank step of Claim 3 in Alon, Moran and Yehudayoff (arXiv:1503.07648v2, §1.2 and §3.2.1): on four or more inputs, equality has sign-rank three. The source states Claim 3 for the N × N signed identity matrix (+1 on the diagonal and -1 off the diagonal, i.e. -signMatrix ℝ equality, which has the same sign-rank by signRank_not), and pairs it with a VC-dimension assertion not formalized here (see #3262).