NLA-lib Explorer

NLAlib.walshHadamard_apply

Library · theorem

Entries of the Walsh–Hadamard matrix, unfolded: \mathbf{H}_{\mathbf{x},y} = 1 if \sum_i \mathbf{x}_i y_i = 0 in \mathbb{Z}/2\mathbb{Z}, and -1 otherwise.

NLAlib.walshHadamard_apply.{u_1} {R : Type u_1} [Ring R] {b : ℕ} (x y : Fin b → ZMod 2) :
  walshHadamard R b x y = if ∑ i, x i * y i = 0 then 1 else -1

Full source on GitHub

Import NLAlib.Matrix.Structured.Walsh.