Documentation

HexMatrixTheory.Packed

theorem HexMatrixTheory.dotNat_eq_sum' (a b : List ℕ) (r : ℕ) (ha : a.length = r) :
Hex.Matrix.Packed.dotNat a b = ∑ i : Fin r, a.getD (↑i) 0 * b.getD (↑i) 0

Pointwise sum, the shorter list padded with zeros.

Equations
Instances For
    theorem HexMatrixTheory.addLists_getD (l m : List ℕ) (t : ℕ) :
    (addLists l m).getD t 0 = l.getD t 0 + m.getD t 0
    theorem HexMatrixTheory.ofDigits_map_mul (B a : ℕ) (l : List ℕ) :
    Nat.ofDigits B (List.map (fun (x : ℕ) => a * x) l) = a * Nat.ofDigits B l

    The coefficient list of the product of two coefficient lists.

    Equations
    Instances For
      theorem HexMatrixTheory.map_mul_getD (a : ℕ) (m : List ℕ) (t : ℕ) :
      (List.map (fun (x : ℕ) => a * x) m).getD t 0 = a * m.getD t 0
      theorem HexMatrixTheory.conv_getD (l m : List ℕ) (t : ℕ) :
      (conv l m).getD t 0 = ∑ i ∈ Finset.range (t + 1), l.getD i 0 * m.getD (t - i) 0
      theorem HexMatrixTheory.conv_getD_le (M : ℕ) (l m : List ℕ) (hl : ∀ x ∈ l, x < M) (hm : ∀ x ∈ m, x < M) (t : ℕ) :
      (conv l m).getD t 0 ≤ l.length * (M * M)
      theorem HexMatrixTheory.dotNat_eq_conv_reverse (b c : List ℕ) (r : ℕ) (hb : b.length = r) (hc : c.length = r) :
      theorem HexMatrixTheory.ofDigits_digit (B : ℕ) (hB : 1 < B) (D : List ℕ) (hD : ∀ d ∈ D, d < B) (k : ℕ) :
      Nat.ofDigits B D / B ^ k % B = D.getD k 0
      theorem HexMatrixTheory.dotPacked_eq (M W r : ℕ) (b c : List ℕ) (hb : b.length = r) (hc : c.length = r) (hbM : ∀ x ∈ b, x < M) (hcM : ∀ x ∈ c, x < M) (hW : r * (M * M) < 2 ^ W) :
      theorem HexMatrixTheory.padded_lt (M r : ℕ) (hM : 0 < M) (c : List ℕ) (hc : ∀ x ∈ c, x < M) (x : ℕ) :
      x ∈ List.take r c ++ List.replicate (r - c.length) 0 → x < M
      theorem HexMatrixTheory.dotInt_eq_sum (a b : List ℤ) (r : ℕ) (h : a.length ≤ r) :
      Hex.Matrix.Packed.dotInt a b = ∑ k : Fin r, a.getD (↑k) 0 * b.getD (↑k) 0
      theorem HexMatrixTheory.column_getD (j : ℕ) (A : List (List ℤ)) (k : ℕ) :
      theorem HexMatrixTheory.consCols_getD (r : List ℤ) (cs : List (List ℤ)) (l : ℕ) (hl : l < cs.length) :

      Cutting or zero-padding the first list to the length of the second changes nothing.

      theorem HexMatrixTheory.allAbsLtRows_iff (k : ℕ) (rs : List (List ℤ)) :
      Hex.Matrix.Packed.allAbsLtRows k rs = true ↔ ∀ r ∈ rs, ∀ x ∈ r, x.natAbs < k
      theorem HexMatrixTheory.posPart_lt (k : ℕ) (l : List ℤ) (h : ∀ x ∈ l, x.natAbs < k) (x : ℕ) :
      theorem HexMatrixTheory.negPart_lt (k : ℕ) (l : List ℤ) (h : ∀ x ∈ l, x.natAbs < k) (x : ℕ) :
      theorem HexMatrixTheory.dotIntPacked_eq (W r k : ℕ) (t c : List ℤ) (hc : c.length = r) (ht : ∀ x ∈ t, x.natAbs < k) (hck : ∀ x ∈ c, x.natAbs < k) (hW : r * (k * k) < 2 ^ W) :

      The packed signed dot product of a row (cut or padded to r) with a column of r entries, both with absolute values below k and r · k² < 2^W.

      theorem HexMatrixTheory.mem_column (j : ℕ) (A : List (List ℤ)) (x : ℤ) (hx : x ∈ Hex.Matrix.Packed.column j A) :
      (∃ r ∈ A, x ∈ r) ∨ x = 0
      theorem HexMatrixTheory.columns_bound (m k : ℕ) (hk : 0 < k) (P : List (List ℤ)) (hb : ∀ r ∈ P, ∀ x ∈ r, x.natAbs < k) (c : List ℤ) :
      c ∈ Hex.Matrix.Packed.columns m P → c.length = P.length ∧ ∀ x ∈ c, x.natAbs < k

      The m columns of a matrix with entries below k > 0 in absolute value have as many entries as the matrix has rows, all below k.

      theorem HexMatrixTheory.dotInt_eq_sum_right (a b : List ℤ) (r : ℕ) (hb : b.length = r) :
      Hex.Matrix.Packed.dotInt a b = ∑ l : Fin r, a.getD (↑l) 0 * b.getD (↑l) 0
      theorem HexMatrixTheory.list_ext_getD (l₁ l₂ : List ℤ) (hlen : l₁.length = l₂.length) (h : ∀ j < l₁.length, l₁.getD j 0 = l₂.getD j 0) :
      l₁ = l₂