AFTD Auto-Formalizing Theoretical Domains

magic_square_winning_op_det_row0

def

Given dimensions dA and dB, Alice's matrix effects A : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dA) (Fin dA) ℂ, Bob's matrix effects B : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dB) (Fin dB) ℂ, and an answer string k : Fin 3 → Bool, the deterministic row-0 winning operator is the winning operator magic_square_winning_op where Alice's row-0 measurement is replaced by the deterministic output k: that is, Alice's effects on row 0 are the identity matrix if s = k and 0 otherwise, while for rows x ≠ 0 they remain A x s.

Statement

noncomputable def magic_square_winning_op_det_row0 {dA dB : ℕ}
    (A : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dA) (Fin dA) ℂ)
    (B : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dB) (Fin dB) ℂ)
    (k : Fin 3 → Bool) :
    Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ
Defined in
arXiv:2610.12001, page 19, line 1029
Verified
08 Nov 2026
Axioms
none listed
Built on 1
  • magic_square_winning_opGiven dimensions dA and dB, Alice's matrix effects A : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dA) (Fin dA) ℂ and Bob's matrix effects B :…
Used by 1

Read back from the Lean

Given implicit natural numbers dA and dB, two families of complex matrices A : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dA) (Fin dA) ℂ and B : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dB) (Fin dB) ℂ, and a function k : Fin 3 → Bool, magic_square_winning_op_det_row0 A B k is defined as the matrix of size (Fin dA × Fin dB) × (Fin dA × Fin dB) given by magic_square_winning_op A' B, where A' is the family of matrices defined by setting A' 0 k = 1 (the identity matrix), A' 0 s = 0 (the zero matrix) for s ≠ k, and A' x s = A x s for all x ≠ 0.

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 winning operator for the magic square game where Alice's row 0 measurement is replaced by the deterministic output k. -/
noncomputable def magic_square_winning_op_det_row0 {dA dB : ℕ}
    (A : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dA) (Fin dA) ℂ)
    (B : Fin 3 → (Fin 3 → Bool) → Matrix (Fin dB) (Fin dB) ℂ)
    (k : Fin 3 → Bool) :
    Matrix (Fin dA × Fin dB) (Fin dA × Fin dB) ℂ := magic_square_winning_op (fun x s => if x = 0 then (if s = k then 1 else 0) else A x s) B
See it in the graphDiscuss this resultChallenge it