Documentation

Complexitylib.Algebraic.LinearAlgebra.Tensor.DeletionGame.Internal

The deletion game: proof internals #

Proofs behind Complexitylib.Algebraic.LinearAlgebra.Tensor.DeletionGame. Write n = 2k + 1.

The width function #

theorem Algebraic.Tensor3.DeletionGame.Internal.phi_le_add {n r s r' s' d e : ℤ} (hr : |r - r'| ≤ d) (hs : |s - s'| ≤ e) :
phi n r s ≤ phi n r' s' + 2 * d + 2 * e

The two-interval lemma #

theorem Algebraic.Tensor3.DeletionGame.Internal.filter_phi_le_subset (k : ℕ) (s T : ℤ) :
{r ∈ Finset.Icc 1 ↑k | phi (2 * ↑k + 1) r s ≤ T} ⊆ Finset.Icc (2 * ↑k + 1 - T) (T / 2 - s) ∪ Finset.Icc ((2 * (2 * ↑k + 1) - 2 * s - T + 1) / 2) (min (↑k) (T - s))
theorem Algebraic.Tensor3.DeletionGame.Internal.two_mul_card_filter_phi_le {k : ℕ} {s T : ℤ} (hs : 0 ≤ s) (hT : 2 * (2 * ↑k + 1) ≤ 3 * T + 3) :
2 * ↑{r ∈ Finset.Icc 1 ↑k | phi (2 * ↑k + 1) r s ≤ T}.card ≤ 3 * T - 2 * (2 * ↑k + 1) + 3

Blocks #

theorem Algebraic.Tensor3.DeletionGame.Internal.mem_sideBlock {α : Type u_1} [Fintype α] {f : α → ℤ} {L i : ℕ} {a : α} :
a ∈ sideBlock f L i ↔ ↑i * ↑L + 1 ≤ f a ∧ f a ≤ (↑i + 1) * ↑L
theorem Algebraic.Tensor3.DeletionGame.Internal.one_le_of_mem_sideBlock {α : Type u_1} [Fintype α] {f : α → ℤ} {L i : ℕ} {a : α} (ha : a ∈ sideBlock f L i) :
1 ≤ f a
theorem Algebraic.Tensor3.DeletionGame.Internal.abs_sub_le_of_mem_sideBlock {α : Type u_1} [Fintype α] {f : α → ℤ} {L i : ℕ} {a b : α} (ha : a ∈ sideBlock f L i) (hb : b ∈ sideBlock f L i) :
|f a - f b| ≤ ↑L

Two elements of one block are at distance at most L (indeed L - 1).

theorem Algebraic.Tensor3.DeletionGame.Internal.exists_mem_sideBlock {α : Type u_1} [Fintype α] {f : α → ℤ} {k L : ℕ} {a : α} (hL : 0 < L) (h1 : 1 ≤ f a) (hk : f a ≤ ↑k) :
∃ i < k / L + 1, a ∈ sideBlock f L i

A value f a ∈ [1, k] lies in the block of index (f a - 1) / L < k / L + 1.

theorem Algebraic.Tensor3.DeletionGame.Internal.le_card_sideBlock_zero {α : Type u_1} [Fintype α] {f : α → ℤ} {L : ℕ} (hf : ∀ (p : ℤ), 1 ≤ p → p ≤ ↑L → ∃ (a : α), f a = p) :
L ≤ (sideBlock f L 0).card

A side whose values include 1, …, L has a first block of at least L elements.

Counting survivors #

theorem Algebraic.Tensor3.DeletionGame.Internal.card_filter_le_sum {α : Type u_1} [Fintype α] (f : α → ℤ) {k L : ℕ} (hL : 0 < L) (hf : ∀ (a : α), f a ≤ ↑k) [DecidableEq α] (U : Finset α) :
{a ∈ U | 1 ≤ f a}.card ≤ ∑ i ∈ Finset.range (k / L + 1), (U ∩ sideBlock f L i).card

The elements of U with f a ∈ [1, k] lie in the blocks of index < k / L + 1.

theorem Algebraic.Tensor3.DeletionGame.Internal.card_filter_le_of_forall_lt {α : Type u_1} [Fintype α] (f : α → ℤ) {k L R : ℕ} (hL : 0 < L) (hf : ∀ (a : α), f a ≤ ↑k) [DecidableEq α] {U : Finset α} (hU : ∀ (i : ℕ), (U ∩ sideBlock f L i).card < R) :
{a ∈ U | 1 ≤ f a}.card ≤ (k / L + 1) * (R - 1)

A side with no good block holds at most R - 1 elements per block.

theorem Algebraic.Tensor3.DeletionGame.Internal.card_filter_le_add_of_good {α : Type u_1} [Fintype α] [DecidableEq α] {f : α → ℤ} {k L R : ℕ} (hL : 0 < L) (hf : ∀ (a : α), f a ≤ ↑k) (S : Finset α) :
{a ∈ S | 1 ≤ f a}.card ≤ ({i ∈ Finset.range (k / L + 1) | R ≤ (S ∩ sideBlock f L i).card}.biUnion fun (i : ℕ) => S ∩ sideBlock f L i).card + (k / L + 1) * (R - 1)

The elements of S on the side f lie in its good blocks, or in one of the at most k / L + 1 other blocks, each holding at most R - 1 of them.

theorem Algebraic.Tensor3.DeletionGame.Internal.card_le_of_lost {α : Type u_1} [Fintype α] [DecidableEq α] {f : α → ℤ} {k L R : ℕ} (hL : 0 < L) (hf : ∀ (a : α), -↑k ≤ f a) {S S' : Finset α} (hSS' : (S \ S').card ≤ 1) (hlost : ∀ (j : ℕ), (S' ∩ sideBlock (fun (a : α) => -f a) L j).card < R) :
{a ∈ S | 1 ≤ -f a}.card ≤ (k / L + 1) * (R - 1) + 1

If deleting at most one element of S leaves no good block on the side -f, then S has at most (k / L + 1) (R - 1) + 1 elements on that side.

theorem Algebraic.Tensor3.DeletionGame.Internal.card_le_card_filter_add {α : Type u_1} [DecidableEq α] (f : α → ℤ) (S : Finset α) :
S.card ≤ {a ∈ S | 1 ≤ f a}.card + {a ∈ S | 1 ≤ -f a}.card + {a ∈ S | f a = 0}.card

The count at the stopping time #

theorem Algebraic.Tensor3.DeletionGame.Internal.le_sub_card_add_of_lost {α : Type u_1} [Fintype α] [DecidableEq α] {k L R : ℕ} {D E V : ℝ} {f : α → ℤ} (hf : Function.Injective f) (hfk : ∀ (a : α), -↑k ≤ f a ∧ f a ≤ ↑k) (hR : 1 ≤ R) (hRL : R ≤ L) (hD : 3 / 2 ≤ D) {S S' : Finset α} (hSS' : (S \ S').card ≤ 1) (hlost : ∀ (j : ℕ), (S' ∩ sideBlock (fun (a : α) => -f a) L j).card < R) {i₁ j₀ : ℕ} (hi₁ : R ≤ (S ∩ sideBlock f L i₁).card) (hH : ∀ (i : ℕ), R ≤ (S ∩ sideBlock f L i).card → ∃ a ∈ sideBlock f L i, ∃ b ∈ sideBlock (fun (a : α) => -f a) L j₀, D * (↑(phi (2 * ↑k + 1) (f a) (-f b)) - E) ≤ V) :
(1 + 2 * D / 3) * (2 * ↑k + 1) - D * E - (8 * ↑L + ↑R * (2 * ↑k + 1) / ↑L + 2) ≤ 2 * ↑k + 1 - ↑S.card + V

Offsets #

theorem Algebraic.Tensor3.DeletionGame.Internal.exists_offset_eq {k : ℕ} {p : ℤ} (h1 : -↑k ≤ p) (h2 : p ≤ ↑k) :
∃ (a : Fin (2 * k + 1)), offset k a = p

The stopping time #

Deleting one more element of a list removes at most one element from the survivors.

theorem Algebraic.Tensor3.DeletionGame.Internal.pairedClusterBound_mono {k L R : ℕ} {D E : ℝ} {LB LB' : Finset (Fin (2 * k + 1)) → ℕ} (h : PairedClusterBound k L R D E LB) (hle : ∀ (S : Finset (Fin (2 * k + 1))), LB S ≤ LB' S) :
PairedClusterBound k L R D E LB'
theorem Algebraic.Tensor3.DeletionGame.Internal.exists_stage {k L R : ℕ} {D E : ℝ} {LB : Finset (Fin (2 * k + 1)) → ℕ} (hLB : PairedClusterBound k L R D E LB) (hR : 1 ≤ R) (hRL : R ≤ L) (hLk : L ≤ k) (hD : 3 / 2 ≤ D) {l : List (Fin (2 * k + 1))} (hl : l.Nodup) (hlu : l.toFinset = Finset.univ) :
∃ q ≤ 2 * k + 1, (1 + 2 * D / 3) * (2 * ↑k + 1) - D * E - (8 * ↑L + ↑R * (2 * ↑k + 1) / ↑L + 2) ≤ ↑q + ↑(LB (Finset.univ \ (List.take q l).toFinset))