NLA-lib Explorer

NLAlib.QueryAlgorithm.gramSimulation

Library ยท def

The Gram simulation: from an algorithm with q queries to \mathbf{A} = \mathbf{X}\mathbf{X}^{\mathsf{H}} (X : Matrix d k ๐•œ), an algorithm with 2q rounds against twoSidedMulVec X with the same output. Round 2i is the left query (\mathbf{0}, \mathbf{x}_i), which returns \mathbf{X}^{\mathsf{H}}\mathbf{x}_i in the second component; round 2i + 1 is the right query (\mathbf{X}^{\mathsf{H}}\mathbf{x}_i, \mathbf{0}), which returns \mathbf{X}\mathbf{X}^{\mathsf{H}}\mathbf{x}_i in the first. So it makes at most q products with each of \mathbf{X} and \mathbf{X}^{\mathsf{H}}. The original responses are the first components of the odd responses (QueryAlgorithm.gramDecode, QueryAlgorithm.run_gramSimulation). It makes explicit what [ZhangEtAl2026, Section 4.1] uses implicitly: the analysis works with the factor \mathbf{X} while the queries are to \mathbf{X}\mathbf{X}^{\mathsf{T}}.

NLAlib.QueryAlgorithm.gramSimulation.{u_3, u_4, u_5, u_6} {ฮฒ : Type u_3} {q : โ„•} {๐•œ : Type u_4}
  {d : Type u_5} [Zero ๐•œ] (k : Type u_6) (alg : QueryAlgorithm (d โ†’ ๐•œ) (d โ†’ ๐•œ) q ฮฒ) :
  QueryAlgorithm ((k โ†’ ๐•œ) ร— (d โ†’ ๐•œ)) ((d โ†’ ๐•œ) ร— (k โ†’ ๐•œ)) (2 * q) ฮฒ

Full source on GitHub

Import NLAlib.LowerBounds.QueryModel.Basic.