AFTD Auto-Formalizing Theoretical Domains

two_sided_shadow_optimal_score

def

The optimal score s_k for a k-qubit Clifford unitary in the two-sided locally randomized classical shadow architecture, defined as a natural number: if k % 2 = 1 then (3 * 5^k + 3^k - 6) / 4 else (3 * 5^k - 3^k + 2) / 4 using natural number arithmetic.

Statement

def two_sided_shadow_optimal_score (k : ℕ) : ℕ
Defined in
scout/2610-04621-exact-clifford-optimality-for-two-sided-locally-randomized.md:378
Verified
30 Oct 2026
Axioms
none listed
Used by 4

Read back from the Lean

The function two_sided_shadow_optimal_score, which takes a natural number $k$ and produces a natural number, is defined by cases on the parity of $k$: if $k \pmod 2 = 1$ (i.e., $k$ is odd), it evaluates to $(3 \cdot 5^k + 3^k - 6) / 4$; otherwise (i.e., $k$ is even), it evaluates to $(3 \cdot 5^k - 3^k + 2) / 4$, with operations being natural number arithmetic (truncated subtraction and integer division).

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 optimal integer score s_k for a k-qubit Clifford unitary in the two-sided locally randomized classical shadow architecture. -/
def two_sided_shadow_optimal_score (k : ℕ) : ℕ := if k % 2 = 1 then (3 * 5 ^ k + 3 ^ k - 6) / 4
  else (3 * 5 ^ k - 3 ^ k + 2) / 4
See it in the graphDiscuss this resultChallenge it