AFTD Auto-Formalizing Theoretical Domains

bipartite_mub_basis

def

The family of p+1 bases in EuclideanSpace ℂ (Fin (p * q)) constructed in arXiv:2611.18232: for k = 0 and t : Fin (p * q), it is the computational basis vector EuclideanSpace.basisFun (Fin (p * q)) ℂ t; for k ≠ 0, it is the vector in EuclideanSpace ℂ (Fin (p * q)) whose n-th coordinate (for n : Fin (p * q)) equals (1 / Real.sqrt (p * q : ℝ) : ℂ) * Complex.exp (Complex.I * Real.pi * (((p : ℤ) + (q : ℤ)) * ((k.val : ℤ) * (n.val : ℤ)^2 - 2 * (t.val : ℤ) * (n.val : ℤ)) : ℂ) * ((p * q : ℂ) + 1) / (p * q : ℂ)).

Statement

noncomputable def bipartite_mub_basis (p q : ℕ) (k : Fin (p + 1)) (t : Fin (p * q)) :
    EuclideanSpace ℂ (Fin (p * q))
Defined in
arXiv:2611.18232 Thm. 4, Eq. (33)
Verified
16 Nov 2026
Axioms
none listed

Read back from the Lean

For natural numbers p and q, an index k : Fin (p + 1), and an index t : Fin (p * q), bipartite_mub_basis p q k t is the vector in EuclideanSpace ℂ (Fin (p * q)) defined by cases on k: - If k = 0, it is the t-th standard basis vector EuclideanSpace.basisFun (Fin (p * q)) ℂ t. - If k ≠ 0, let d = p * q. It is the vector whose n-th component (for n : Fin (p * q)) is $$\frac{1}{\sqrt{d}} \exp\left( i \pi \frac{(p + q)(k n^2 - 2tn)(d + 1)}{d} \right),$$ where k, n, and t are treated as integers via their underlying values in ℕ.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The p+1 mutually unbiased bases in dimension pq constructed in arXiv:2611.18232. -/
noncomputable def bipartite_mub_basis (p q : ℕ) (k : Fin (p + 1)) (t : Fin (p * q)) :
    EuclideanSpace ℂ (Fin (p * q)) :=
  if k = 0 then
    EuclideanSpace.basisFun (Fin (p * q)) ℂ t
  else
    let d : ℕ := p * q
    let coeff : ℂ := (1 : ℂ) / (Real.sqrt (d : ℝ) : ℂ)
    (WithLp.equiv 2 _).symm fun n : Fin (p * q) =>
      let n_val : ℤ := (n.val : ℤ)
      let t_val : ℤ := (t.val : ℤ)
      let r_val : ℤ := (k.val : ℤ)
      let exponent : ℤ := ((p : ℤ) + (q : ℤ)) * (r_val * n_val ^ 2 - 2 * t_val * n_val)
      coeff * Complex.exp (Complex.I * Real.pi * (exponent : ℂ) * ((d : ℂ) + 1) / (d : ℂ))
See it in the graphDiscuss this resultChallenge it