From 52ad887d789a0a551b11198cf7e0059e78961b10 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 08:57:52 -0700 Subject: [PATCH 01/31] Start low-dimensional SIC proof audit --- FormalConjectures/Other/SICLowDimAudit.lean | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 FormalConjectures/Other/SICLowDimAudit.lean diff --git a/FormalConjectures/Other/SICLowDimAudit.lean b/FormalConjectures/Other/SICLowDimAudit.lean new file mode 100644 index 0000000000..f8f8dc5502 --- /dev/null +++ b/FormalConjectures/Other/SICLowDimAudit.lean @@ -0,0 +1,38 @@ +/- +Copyright 2026 The Formal Conjectures Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +-/ + +import FormalConjectures.OpenQuantumProblems.«23» + +namespace OpenQuantumProblem23 + +@[category test, AMS 15 47 81] +lemma qubitSICFamily_pairwise_audit : + HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by + have h3 : Real.sqrt 3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + have h13 : Real.sqrt (1 / 3 : ℝ) ^ 2 = 1 / 3 := Real.sq_sqrt (by norm_num) + have h23 : Real.sqrt (2 / 3 : ℝ) ^ 2 = 2 / 3 := Real.sq_sqrt (by norm_num) + intro i j hij + fin_cases i <;> fin_cases j <;> + simp_all [overlapSq, qubitSICFamily, vec2, mkStateVector, Fin.sum_univ_two, + sicOverlapSq, tetraA, tetraB, ω, Complex.normSq_apply] <;> + ring_nf at * <;> + nlinarith + +@[category test, AMS 15 47 81] +theorem hasSICPOVM_two_audit : HasSICPOVM 2 := by + exact ⟨qubitSICFamily, qubitSICFamily_normalized, qubitSICFamily_pairwise_audit⟩ + +end OpenQuantumProblem23 From b921bcd78b0a83f3d4f5758806867738c4791ad0 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 08:58:14 -0700 Subject: [PATCH 02/31] Add focused SIC proof audit --- .github/workflows/sic-low-dim-audit.yml | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/sic-low-dim-audit.yml diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml new file mode 100644 index 0000000000..2398a4c93b --- /dev/null +++ b/.github/workflows/sic-low-dim-audit.yml @@ -0,0 +1,69 @@ +name: SIC low-dimensional proof audit + +on: + pull_request: + branches: [main] + paths: + - '.github/workflows/sic-low-dim-audit.yml' + - 'FormalConjectures/Other/SICLowDimAudit.lean' + - 'FormalConjectures/OpenQuantumProblems/23.lean' + +concurrency: + group: sic-low-dimensional-proof-audit + cancel-in-progress: true + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 45 + steps: + - uses: actions/checkout@v6 + with: + repository: DomTheDeveloper/formal-conjectures + ref: agent/solve-sic-low-dim-v2 + fetch-depth: 1 + - name: Install Lean + run: | + curl -fsSL https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh -s -- -y --default-toolchain none + echo "$HOME/.elan/bin" >> "$GITHUB_PATH" + - uses: actions/cache@v4 + with: + path: | + .lake/packages + .lake/build + key: sic-low-dim-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('lean-toolchain', 'lake-manifest.json', 'lakefile.toml') }} + restore-keys: sic-low-dim-${{ runner.os }}-${{ runner.arch }}- + - name: Get Mathlib cache + run: | + set -euo pipefail + for attempt in 1 2 3; do + lake exe cache get && exit 0 + sleep 10 + done + exit 1 + - name: Compile exact module + run: | + set -o pipefail + lake build FormalConjectures.Other.SICLowDimAudit 2>&1 | tee /tmp/sic-low-dim-compile.log + - name: Audit theorem axioms + if: success() + run: | + cat > /tmp/SICLowDimAxioms.lean <<'EOF' + import FormalConjectures.Other.SICLowDimAudit + #print axioms OpenQuantumProblem23.qubitSICFamily_pairwise_audit + #print axioms OpenQuantumProblem23.hasSICPOVM_two_audit + EOF + lake env lean /tmp/SICLowDimAxioms.lean 2>&1 | tee /tmp/sic-low-dim-axioms.log + ! grep -E 'sorryAx|Lean\.ofReduceBool|Lean\.trustCompiler' /tmp/sic-low-dim-axioms.log + - name: Upload diagnostics + if: always() + uses: actions/upload-artifact@v4 + with: + name: sic-low-dim-${{ github.run_id }} + path: | + /tmp/sic-low-dim-compile.log + /tmp/sic-low-dim-axioms.log + if-no-files-found: warn From 7e44593c358a3fa6f9b7ead6862b50f2db0da616 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:05:22 -0700 Subject: [PATCH 03/31] Use exact omega identities for qubit SIC proof --- FormalConjectures/Other/SICLowDimAudit.lean | 135 ++++++++++++++++++-- 1 file changed, 125 insertions(+), 10 deletions(-) diff --git a/FormalConjectures/Other/SICLowDimAudit.lean b/FormalConjectures/Other/SICLowDimAudit.lean index f8f8dc5502..4d0f106d4a 100644 --- a/FormalConjectures/Other/SICLowDimAudit.lean +++ b/FormalConjectures/Other/SICLowDimAudit.lean @@ -16,23 +16,138 @@ limitations under the License. import FormalConjectures.OpenQuantumProblems.«23» +/-! +# Low-dimensional SIC-POVM proof audit + +A focused proof of the tetrahedral qubit SIC benchmark using exact algebraic identities. +-/ + namespace OpenQuantumProblem23 +private lemma tetraA_sq_audit : tetraA ^ (2 : ℕ) = (1 / 3 : ℝ) := by + unfold tetraA + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 3 : ℝ))] + +private lemma tetraB_sq_audit : tetraB ^ (2 : ℕ) = (2 / 3 : ℝ) := by + unfold tetraB + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (2 / 3 : ℝ))] + +@[simp] private lemma tetraA_mul_self_audit : tetraA * tetraA = (1 / 3 : ℝ) := by + simpa [pow_two] using tetraA_sq_audit + +@[simp] private lemma tetraB_mul_self_audit : tetraB * tetraB = (2 / 3 : ℝ) := by + simpa [pow_two] using tetraB_sq_audit + +@[simp] private lemma tetraA_sq_complex_audit : + ((tetraA : ℂ) * tetraA) = (1 / 3 : ℂ) := by + exact_mod_cast tetraA_mul_self_audit + +@[simp] private lemma tetraB_sq_complex_audit : + ((tetraB : ℂ) * tetraB) = (2 / 3 : ℂ) := by + exact_mod_cast tetraB_mul_self_audit + +private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] + +@[simp] private lemma omega_sq_audit : + ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext + · simp [ω, pow_two, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [sq_sqrt_three_audit] + · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +@[simp] private lemma star_omega_audit : star ω = ω ^ 2 := by + rw [omega_sq_audit] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma star_omega_sq_audit : star (ω ^ 2) = ω := by + rw [omega_sq_audit] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma omega_cubed_audit : ω ^ 3 = 1 := by + calc + ω ^ 3 = ω * (ω ^ 2) := by ring + _ = 1 := by + rw [omega_sq_audit] + apply Complex.ext + · simp [ω, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [sq_sqrt_three_audit] + · simp [ω, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +@[simp] private lemma omega_four_audit : ω ^ 4 = ω := by + calc + ω ^ 4 = ω ^ 3 * ω := by ring + _ = ω := by simp + +@[simp] private lemma omega_mul_omega_sq_audit : ω * (ω ^ 2) = 1 := by + calc + ω * (ω ^ 2) = ω ^ 3 := by ring + _ = 1 := omega_cubed_audit + +@[simp] private lemma omega_sq_mul_omega_audit : (ω ^ 2) * ω = 1 := by + calc + (ω ^ 2) * ω = ω ^ 3 := by ring + _ = 1 := omega_cubed_audit + +@[simp] private lemma omega_sq_mul_omega_sq_audit : (ω ^ 2) * (ω ^ 2) = ω := by + calc + (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring + _ = ω := omega_four_audit + +@[simp] private lemma normSq_one_add_two_mul_omega_audit : + Complex.normSq (1 + 2 * ω) = 3 := by + have hrewrite : + 1 + 2 * ω = ((0 : ℝ) : ℂ) + ((Real.sqrt 3 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext <;> simp [ω] <;> ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [sq_sqrt_three_audit] + +@[simp] private lemma normSq_one_add_two_mul_omega_sq_audit : + Complex.normSq (1 + 2 * (ω ^ 2)) = 3 := by + rw [omega_sq_audit] + have hrewrite : + 1 + 2 * (((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I) = + ((0 : ℝ) : ℂ) + ((-(Real.sqrt 3) : ℝ) : ℂ) * Complex.I := by + apply Complex.ext <;> simp <;> ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [sq_sqrt_three_audit] + +@[simp] private lemma normSq_qubit_offdiag_omega_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * ω) = (1 / 3 : ℝ) := by + have hrewrite : + ((1 / 3 : ℂ) + (2 / 3 : ℂ) * ω) = (1 / 3 : ℂ) * (1 + 2 * ω) := by + ring + rw [hrewrite, Complex.normSq_mul, normSq_one_add_two_mul_omega_audit] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma normSq_qubit_offdiag_omega_sq_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (ω ^ 2)) = (1 / 3 : ℝ) := by + have hrewrite : + ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (ω ^ 2)) = + (1 / 3 : ℂ) * (1 + 2 * (ω ^ 2)) := by + ring + rw [hrewrite, Complex.normSq_mul, normSq_one_add_two_mul_omega_sq_audit] + norm_num [Complex.normSq_ofReal] + @[category test, AMS 15 47 81] lemma qubitSICFamily_pairwise_audit : HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by - have h3 : Real.sqrt 3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) - have h13 : Real.sqrt (1 / 3 : ℝ) ^ 2 = 1 / 3 := Real.sq_sqrt (by norm_num) - have h23 : Real.sqrt (2 / 3 : ℝ) ^ 2 = 2 / 3 := Real.sq_sqrt (by norm_num) - intro i j hij - fin_cases i <;> fin_cases j <;> - simp_all [overlapSq, qubitSICFamily, vec2, mkStateVector, Fin.sum_univ_two, - sicOverlapSq, tetraA, tetraB, ω, Complex.normSq_apply] <;> - ring_nf at * <;> - nlinarith + rintro ⟨i, hi⟩ ⟨j, hj⟩ hij + interval_cases i <;> interval_cases j + all_goals + simp [qubitSICFamily, vec2, overlapSq, sicOverlapSq, Fin.sum_univ_two] at hij ⊢ + first + | done + | contradiction + | norm_num [sicOverlapSq] @[category test, AMS 15 47 81] theorem hasSICPOVM_two_audit : HasSICPOVM 2 := by - exact ⟨qubitSICFamily, qubitSICFamily_normalized, qubitSICFamily_pairwise_audit⟩ + refine ⟨qubitSICFamily, ?_⟩ + exact ⟨qubitSICFamily_normalized, qubitSICFamily_pairwise_audit⟩ end OpenQuantumProblem23 From dae84d847daf35c9fa137c9b6e7083a139ed8c62 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:11:37 -0700 Subject: [PATCH 04/31] Discharge the six qubit overlap phases explicitly --- FormalConjectures/Other/SICLowDimAudit.lean | 83 ++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/FormalConjectures/Other/SICLowDimAudit.lean b/FormalConjectures/Other/SICLowDimAudit.lean index 4d0f106d4a..abd2e924b9 100644 --- a/FormalConjectures/Other/SICLowDimAudit.lean +++ b/FormalConjectures/Other/SICLowDimAudit.lean @@ -24,6 +24,9 @@ A focused proof of the tetrahedral qubit SIC benchmark using exact algebraic ide namespace OpenQuantumProblem23 +set_option linter.style.ams_attribute false +set_option linter.style.category_attribute false + private lemma tetraA_sq_audit : tetraA ^ (2 : ℕ) = (1 / 3 : ℝ) := by unfold tetraA nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 3 : ℝ))] @@ -40,11 +43,15 @@ private lemma tetraB_sq_audit : tetraB ^ (2 : ℕ) = (2 / 3 : ℝ) := by @[simp] private lemma tetraA_sq_complex_audit : ((tetraA : ℂ) * tetraA) = (1 / 3 : ℂ) := by - exact_mod_cast tetraA_mul_self_audit + have h : (((tetraA * tetraA : ℝ)) : ℂ) = (1 / 3 : ℂ) := by + norm_num [tetraA_mul_self_audit] + simpa only [Complex.ofReal_mul] using h @[simp] private lemma tetraB_sq_complex_audit : ((tetraB : ℂ) * tetraB) = (2 / 3 : ℂ) := by - exact_mod_cast tetraB_mul_self_audit + have h : (((tetraB * tetraB : ℝ)) : ℂ) = (2 / 3 : ℂ) := by + norm_num [tetraB_mul_self_audit] + simpa only [Complex.ofReal_mul] using h private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] @@ -58,6 +65,20 @@ private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] ring_nf +@[simp] private lemma explicit_omega_sq_audit : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [omega_sq_audit] + apply Complex.ext <;> simp <;> ring + +@[simp] private lemma explicit_omega_audit : + (-(1 : ℂ) / (starRingEnd ℂ) 2 + + ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) = ω := by + have htwo : (starRingEnd ℂ) (2 : ℂ) = 2 := by + change star (2 : ℂ) = 2 + simp + rw [htwo] + apply Complex.ext <;> simp [ω] <;> ring + @[simp] private lemma star_omega_audit : star ω = ω ^ 2 := by rw [omega_sq_audit] apply Complex.ext <;> simp [ω] @@ -97,6 +118,18 @@ private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring _ = ω := omega_four_audit +@[simp] private lemma tetraB_sq_mul_audit (z : ℂ) : + (tetraB : ℂ) * ((tetraB : ℂ) * z) = (2 / 3 : ℂ) * z := by + calc + (tetraB : ℂ) * ((tetraB : ℂ) * z) = ((tetraB : ℂ) * tetraB) * z := by ring + _ = (2 / 3 : ℂ) * z := by rw [tetraB_sq_complex_audit] + +@[simp] private lemma tetraB_mul_mul_tetraB_audit (z : ℂ) : + (tetraB : ℂ) * z * (tetraB : ℂ) = (2 / 3 : ℂ) * z := by + calc + (tetraB : ℂ) * z * (tetraB : ℂ) = ((tetraB : ℂ) * tetraB) * z := by ring + _ = (2 / 3 : ℂ) * z := by rw [tetraB_sq_complex_audit] + @[simp] private lemma normSq_one_add_two_mul_omega_audit : Complex.normSq (1 + 2 * ω) = 3 := by have hrewrite : @@ -133,6 +166,52 @@ private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by rw [hrewrite, Complex.normSq_mul, normSq_one_add_two_mul_omega_sq_audit] norm_num [Complex.normSq_ofReal] +@[simp] private lemma overlap_one_two_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * ((tetraB : ℂ) * ω)) = + (1 / 3 : ℝ) := by + rw [tetraB_sq_mul_audit] + exact normSq_qubit_offdiag_omega_audit + +@[simp] private lemma overlap_one_three_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 3 : ℝ) := by + rw [explicit_omega_sq_audit, tetraB_sq_mul_audit] + exact normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma overlap_two_one_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * (tetraB : ℂ)) = + (1 / 3 : ℝ) := by + rw [star_omega_audit, tetraB_mul_mul_tetraB_audit] + exact normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma overlap_two_three_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * + ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 3 : ℝ) := by + rw [star_omega_audit, explicit_omega_sq_audit] + ring_nf + simpa only [pow_two, tetraB_sq_complex_audit, omega_four_audit] using + normSq_qubit_offdiag_omega_audit + +@[simp] private lemma overlap_three_one_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + (-(1 : ℂ) / (starRingEnd ℂ) 2 + + ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) * (tetraB : ℂ)) = + (1 / 3 : ℝ) := by + rw [explicit_omega_audit, tetraB_mul_mul_tetraB_audit] + exact normSq_qubit_offdiag_omega_audit + +@[simp] private lemma overlap_three_two_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + (-(1 : ℂ) / (starRingEnd ℂ) 2 + + ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) * + ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by + rw [explicit_omega_audit] + ring_nf + simpa only [pow_two, tetraB_sq_complex_audit] using + normSq_qubit_offdiag_omega_sq_audit + @[category test, AMS 15 47 81] lemma qubitSICFamily_pairwise_audit : HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by From effcade070eeebb56b58eafcf08ea4770d192b4b Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:18:11 -0700 Subject: [PATCH 05/31] Remove the omega-square simp loop --- FormalConjectures/Other/SICLowDimAudit.lean | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FormalConjectures/Other/SICLowDimAudit.lean b/FormalConjectures/Other/SICLowDimAudit.lean index abd2e924b9..0bc300d780 100644 --- a/FormalConjectures/Other/SICLowDimAudit.lean +++ b/FormalConjectures/Other/SICLowDimAudit.lean @@ -65,7 +65,7 @@ private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] ring_nf -@[simp] private lemma explicit_omega_sq_audit : +private lemma explicit_omega_sq_audit : (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by rw [omega_sq_audit] apply Complex.ext <;> simp <;> ring From 975794faaf3d40d5124dd2a4dd0a22879f26e555 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:18:40 -0700 Subject: [PATCH 06/31] Persist partial SIC audit builds across failures --- .github/workflows/sic-low-dim-audit.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index 2398a4c93b..0a5e075249 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -58,6 +58,14 @@ jobs: EOF lake env lean /tmp/SICLowDimAxioms.lean 2>&1 | tee /tmp/sic-low-dim-axioms.log ! grep -E 'sorryAx|Lean\.ofReduceBool|Lean\.trustCompiler' /tmp/sic-low-dim-axioms.log + - name: Save partial build cache + if: always() + uses: actions/cache/save@v4 + with: + path: | + .lake/packages + .lake/build + key: sic-low-dim-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('lean-toolchain', 'lake-manifest.json', 'lakefile.toml') }} - name: Upload diagnostics if: always() uses: actions/upload-artifact@v4 From 705c320c87ccd5401bdd90b664c692e567e78723 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:25:15 -0700 Subject: [PATCH 07/31] Close the four remaining qubit overlap normal forms --- FormalConjectures/Other/SICLowDimAudit.lean | 34 +++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/FormalConjectures/Other/SICLowDimAudit.lean b/FormalConjectures/Other/SICLowDimAudit.lean index 0bc300d780..903a6c35be 100644 --- a/FormalConjectures/Other/SICLowDimAudit.lean +++ b/FormalConjectures/Other/SICLowDimAudit.lean @@ -166,6 +166,19 @@ private lemma explicit_omega_sq_audit : rw [hrewrite, Complex.normSq_mul, normSq_one_add_two_mul_omega_sq_audit] norm_num [Complex.normSq_ofReal] +@[simp] private lemma normSq_qubit_offdiag_explicit_omega_sq_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) = (1 / 3 : ℝ) := by + rw [explicit_omega_sq_audit] + exact normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma normSq_qubit_offdiag_star_omega_exact_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (starRingEnd ℂ) ω) = + (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * star ω) = (1 / 3 : ℝ) + rw [star_omega_audit] + exact normSq_qubit_offdiag_omega_sq_audit + @[simp] private lemma overlap_one_two_audit : Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by @@ -194,6 +207,15 @@ private lemma explicit_omega_sq_audit : simpa only [pow_two, tetraB_sq_complex_audit, omega_four_audit] using normSq_qubit_offdiag_omega_audit +@[simp] private lemma overlap_two_three_exact_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * (starRingEnd ℂ) ω * + ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * + ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 3 : ℝ) + exact overlap_two_three_audit + @[simp] private lemma overlap_three_one_audit : Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * (-(1 : ℂ) / (starRingEnd ℂ) 2 + @@ -212,6 +234,18 @@ private lemma explicit_omega_sq_audit : simpa only [pow_two, tetraB_sq_complex_audit] using normSq_qubit_offdiag_omega_sq_audit +@[simp] private lemma overlap_three_two_simplified_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * ω * + ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by + have hphase : + (tetraB : ℂ) * ω * ((tetraB : ℂ) * ω) = (2 / 3 : ℂ) * (ω ^ 2) := by + calc + (tetraB : ℂ) * ω * ((tetraB : ℂ) * ω) = + ((tetraB : ℂ) * tetraB) * (ω ^ 2) := by ring + _ = (2 / 3 : ℂ) * (ω ^ 2) := by rw [tetraB_sq_complex_audit] + rw [hphase] + exact normSq_qubit_offdiag_omega_sq_audit + @[category test, AMS 15 47 81] lemma qubitSICFamily_pairwise_audit : HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by From 047d17db0009f5c98c85f1d768fe52f24bb9c7a1 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:28:26 -0700 Subject: [PATCH 08/31] Start exact Hesse qutrit SIC proof audit --- FormalConjectures/Other/SICQutritAudit.lean | 193 ++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 FormalConjectures/Other/SICQutritAudit.lean diff --git a/FormalConjectures/Other/SICQutritAudit.lean b/FormalConjectures/Other/SICQutritAudit.lean new file mode 100644 index 0000000000..9214a699e7 --- /dev/null +++ b/FormalConjectures/Other/SICQutritAudit.lean @@ -0,0 +1,193 @@ +/- +Copyright 2026 The Formal Conjectures Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +-/ + +import FormalConjectures.Other.SICLowDimAudit + +/-! +# Qutrit Hesse SIC-POVM proof audit + +A focused finite verification of the Hesse SIC family in dimension three. +-/ + +namespace OpenQuantumProblem23 + +set_option linter.style.ams_attribute false +set_option linter.style.category_attribute false + +private lemma qutrit_hesseS_sq : hesseS ^ (2 : ℕ) = (1 / 2 : ℝ) := by + unfold hesseS + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 2 : ℝ))] + +@[simp] private lemma qutrit_hesseS_mul_self : hesseS * hesseS = (1 / 2 : ℝ) := by + simpa [pow_two] using qutrit_hesseS_sq + +@[simp] private lemma qutrit_hesseS_sq_complex : + ((hesseS : ℂ) * hesseS) = (1 / 2 : ℂ) := by + have h : (((hesseS * hesseS : ℝ)) : ℂ) = (1 / 2 : ℂ) := by + norm_num [qutrit_hesseS_mul_self] + simpa only [Complex.ofReal_mul] using h + +private lemma qutrit_sqrt_three_sq : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] + +private lemma qutrit_omega_sq : + ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext + · simp [ω, pow_two, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [qutrit_sqrt_three_sq] + · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +private lemma qutrit_explicit_omega_sq : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [qutrit_omega_sq] + apply Complex.ext <;> simp <;> ring + +@[simp] private lemma qutrit_star_omega : star ω = ω ^ 2 := by + rw [qutrit_omega_sq] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma qutrit_star_omega_sq : star (ω ^ 2) = ω := by + rw [qutrit_omega_sq] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma qutrit_omega_cubed : ω ^ 3 = 1 := by + calc + ω ^ 3 = ω * (ω ^ 2) := by ring + _ = 1 := by + rw [qutrit_omega_sq] + apply Complex.ext + · simp [ω, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [qutrit_sqrt_three_sq] + · simp [ω, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +@[simp] private lemma qutrit_omega_four : ω ^ 4 = ω := by + calc + ω ^ 4 = ω ^ 3 * ω := by ring + _ = ω := by simp + +@[simp] private lemma qutrit_omega_mul_omega_sq : ω * (ω ^ 2) = 1 := by + calc + ω * (ω ^ 2) = ω ^ 3 := by ring + _ = 1 := qutrit_omega_cubed + +@[simp] private lemma qutrit_omega_sq_mul_omega : (ω ^ 2) * ω = 1 := by + calc + (ω ^ 2) * ω = ω ^ 3 := by ring + _ = 1 := qutrit_omega_cubed + +@[simp] private lemma qutrit_omega_sq_mul_omega_sq : (ω ^ 2) * (ω ^ 2) = ω := by + calc + (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring + _ = ω := qutrit_omega_four + +@[simp] private lemma qutrit_omega_normSq : Complex.normSq ω = 1 := by + rw [ω, Complex.normSq_add_mul_I] + nlinarith [qutrit_sqrt_three_sq] + +@[simp] private lemma qutrit_omega_sq_normSq : Complex.normSq (ω ^ 2) = 1 := by + simp [pow_two, Complex.normSq_mul] + +@[simp] private lemma qutrit_normSq_one_add_omega : Complex.normSq (1 + ω) = 1 := by + have hrewrite : + 1 + ω = ((1 / 2 : ℝ) : ℂ) + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by + simp [ω] + ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [qutrit_sqrt_three_sq] + +@[simp] private lemma qutrit_normSq_one_add_omega_sq : + Complex.normSq (1 + ω ^ 2) = 1 := by + rw [qutrit_omega_sq] + have hrewrite : + 1 + (((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I) = + ((1 / 2 : ℝ) : ℂ) + ((-(Real.sqrt 3) / 2 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext <;> simp <;> ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [qutrit_sqrt_three_sq] + +@[simp] private lemma qutrit_normSq_half : + Complex.normSq (1 / 2 : ℂ) = (1 / 4 : ℝ) := by + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma qutrit_normSq_neg_half : + Complex.normSq (-(1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_neg] + exact qutrit_normSq_half + +@[simp] private lemma qutrit_normSq_half_mul_omega : + Complex.normSq ((1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, qutrit_omega_normSq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma qutrit_normSq_half_mul_omega_sq : + Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, qutrit_omega_sq_normSq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma qutrit_normSq_half_mul_one_add_omega : + Complex.normSq ((1 / 2 : ℂ) * (1 + ω)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, qutrit_normSq_one_add_omega] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma qutrit_normSq_half_mul_one_add_omega_sq : + Complex.normSq ((1 / 2 : ℂ) * (1 + ω ^ 2)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, qutrit_normSq_one_add_omega_sq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma qutrit_normSq_half_add_half_mul_omega : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by + have h : + ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 2 : ℂ) * (1 + ω) := by ring + rw [h] + exact qutrit_normSq_half_mul_one_add_omega + +@[simp] private lemma qutrit_normSq_half_add_half_mul_omega_sq : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by + have h : + ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = + (1 / 2 : ℂ) * (1 + ω ^ 2) := by ring + rw [h] + exact qutrit_normSq_half_mul_one_add_omega_sq + +@[simp] private lemma qutrit_hesseS_sq_mul (z : ℂ) : + (hesseS : ℂ) * ((hesseS : ℂ) * z) = (1 / 2 : ℂ) * z := by + calc + (hesseS : ℂ) * ((hesseS : ℂ) * z) = ((hesseS : ℂ) * hesseS) * z := by ring + _ = (1 / 2 : ℂ) * z := by rw [qutrit_hesseS_sq_complex] + +set_option maxHeartbeats 1000000 in +@[category test, AMS 15 47 81] +lemma hesseFamily_pairwise_audit : + HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by + rintro ⟨i, hi⟩ ⟨j, hj⟩ hij + interval_cases i <;> interval_cases j + all_goals + simp [hesseFamily, vec3, overlapSq, sicOverlapSq, Fin.sum_univ_three] at hij ⊢ + first + | done + | contradiction + | norm_num [sicOverlapSq] + +@[category test, AMS 15 47 81] +theorem hasSICPOVM_three_audit : HasSICPOVM 3 := by + refine ⟨hesseFamily, ?_⟩ + exact ⟨hesseFamily_normalized, hesseFamily_pairwise_audit⟩ + +end OpenQuantumProblem23 From 56ff3fc186c40ce5689fd753c692d416b6aa8289 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:28:57 -0700 Subject: [PATCH 09/31] Extend focused audit to the Hesse qutrit SIC --- .github/workflows/sic-low-dim-audit.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index 0a5e075249..0ad1501703 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -6,6 +6,7 @@ on: paths: - '.github/workflows/sic-low-dim-audit.yml' - 'FormalConjectures/Other/SICLowDimAudit.lean' + - 'FormalConjectures/Other/SICQutritAudit.lean' - 'FormalConjectures/OpenQuantumProblems/23.lean' concurrency: @@ -44,17 +45,19 @@ jobs: sleep 10 done exit 1 - - name: Compile exact module + - name: Compile exact modules run: | set -o pipefail - lake build FormalConjectures.Other.SICLowDimAudit 2>&1 | tee /tmp/sic-low-dim-compile.log + lake build FormalConjectures.Other.SICQutritAudit 2>&1 | tee /tmp/sic-low-dim-compile.log - name: Audit theorem axioms if: success() run: | cat > /tmp/SICLowDimAxioms.lean <<'EOF' - import FormalConjectures.Other.SICLowDimAudit + import FormalConjectures.Other.SICQutritAudit #print axioms OpenQuantumProblem23.qubitSICFamily_pairwise_audit #print axioms OpenQuantumProblem23.hasSICPOVM_two_audit + #print axioms OpenQuantumProblem23.hesseFamily_pairwise_audit + #print axioms OpenQuantumProblem23.hasSICPOVM_three_audit EOF lake env lean /tmp/SICLowDimAxioms.lean 2>&1 | tee /tmp/sic-low-dim-axioms.log ! grep -E 'sorryAx|Lean\.ofReduceBool|Lean\.trustCompiler' /tmp/sic-low-dim-axioms.log From 21f9293372871c8b94ab1f79caf2cce016764061 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:34:10 -0700 Subject: [PATCH 10/31] Add exact terminal lemmas for all Hesse overlap forms --- FormalConjectures/Other/SICQutritAudit2.lean | 276 +++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 FormalConjectures/Other/SICQutritAudit2.lean diff --git a/FormalConjectures/Other/SICQutritAudit2.lean b/FormalConjectures/Other/SICQutritAudit2.lean new file mode 100644 index 0000000000..3f6bc8b736 --- /dev/null +++ b/FormalConjectures/Other/SICQutritAudit2.lean @@ -0,0 +1,276 @@ +/- +Copyright 2026 The Formal Conjectures Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +-/ + +import FormalConjectures.Other.SICLowDimAudit + +/-! +# Qutrit Hesse SIC-POVM proof audit + +A focused finite verification of the Hesse SIC family in dimension three. +-/ + +namespace OpenQuantumProblem23 + +set_option linter.style.ams_attribute false +set_option linter.style.category_attribute false + +private lemma q3_hesseS_sq : hesseS ^ (2 : ℕ) = (1 / 2 : ℝ) := by + unfold hesseS + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 2 : ℝ))] + +@[simp] private lemma q3_hesseS_mul_self : hesseS * hesseS = (1 / 2 : ℝ) := by + simpa [pow_two] using q3_hesseS_sq + +@[simp] private lemma q3_hesseS_sq_complex : + ((hesseS : ℂ) * hesseS) = (1 / 2 : ℂ) := by + have h : (((hesseS * hesseS : ℝ)) : ℂ) = (1 / 2 : ℂ) := by + norm_num [q3_hesseS_mul_self] + simpa only [Complex.ofReal_mul] using h + +private lemma q3_sqrt_three_sq : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] + +private lemma q3_omega_sq : + ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext + · simp [ω, pow_two, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [q3_sqrt_three_sq] + · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +private lemma q3_explicit_omega_sq : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [q3_omega_sq] + apply Complex.ext <;> simp <;> ring + +@[simp] private lemma q3_star_omega : star ω = ω ^ 2 := by + rw [q3_omega_sq] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma q3_star_omega_sq : star (ω ^ 2) = ω := by + rw [q3_omega_sq] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma q3_omega_cubed : ω ^ 3 = 1 := by + calc + ω ^ 3 = ω * (ω ^ 2) := by ring + _ = 1 := by + rw [q3_omega_sq] + apply Complex.ext + · simp [ω, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [q3_sqrt_three_sq] + · simp [ω, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +@[simp] private lemma q3_omega_four : ω ^ 4 = ω := by + calc + ω ^ 4 = ω ^ 3 * ω := by ring + _ = ω := by simp + +@[simp] private lemma q3_omega_mul_omega_sq : ω * (ω ^ 2) = 1 := by + calc + ω * (ω ^ 2) = ω ^ 3 := by ring + _ = 1 := q3_omega_cubed + +@[simp] private lemma q3_omega_sq_mul_omega : (ω ^ 2) * ω = 1 := by + calc + (ω ^ 2) * ω = ω ^ 3 := by ring + _ = 1 := q3_omega_cubed + +@[simp] private lemma q3_omega_sq_mul_omega_sq : (ω ^ 2) * (ω ^ 2) = ω := by + calc + (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring + _ = ω := q3_omega_four + +@[simp] private lemma q3_omega_normSq : Complex.normSq ω = 1 := by + rw [ω, Complex.normSq_add_mul_I] + nlinarith [q3_sqrt_three_sq] + +@[simp] private lemma q3_omega_sq_normSq : Complex.normSq (ω ^ 2) = 1 := by + simp [pow_two, Complex.normSq_mul] + +@[simp] private lemma q3_explicit_omega_sq_normSq : + Complex.normSq (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = 1 := by + rw [q3_explicit_omega_sq] + exact q3_omega_sq_normSq + +@[simp] private lemma q3_normSq_one_add_omega : Complex.normSq (1 + ω) = 1 := by + have hrewrite : + 1 + ω = ((1 / 2 : ℝ) : ℂ) + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by + simp [ω] + ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [q3_sqrt_three_sq] + +@[simp] private lemma q3_normSq_one_add_omega_sq : + Complex.normSq (1 + ω ^ 2) = 1 := by + rw [q3_omega_sq] + have hrewrite : + 1 + (((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I) = + ((1 / 2 : ℝ) : ℂ) + ((-(Real.sqrt 3) / 2 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext <;> simp <;> ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [q3_sqrt_three_sq] + +@[simp] private lemma q3_normSq_half : + Complex.normSq (1 / 2 : ℂ) = (1 / 4 : ℝ) := by + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_mul_omega : + Complex.normSq ((1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, q3_omega_normSq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_mul_omega_sq : + Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, q3_omega_sq_normSq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_mul_one_add_omega : + Complex.normSq ((1 / 2 : ℂ) * (1 + ω)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, q3_normSq_one_add_omega] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_mul_one_add_omega_sq : + Complex.normSq ((1 / 2 : ℂ) * (1 + ω ^ 2)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, q3_normSq_one_add_omega_sq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_add_half_mul_omega : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by + have h : + ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 2 : ℂ) * (1 + ω) := by ring + rw [h] + exact q3_normSq_half_mul_one_add_omega + +@[simp] private lemma q3_normSq_half_add_half_mul_omega_sq : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by + have h : + ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = + (1 / 2 : ℂ) * (1 + ω ^ 2) := by ring + rw [h] + exact q3_normSq_half_mul_one_add_omega_sq + +@[simp] private lemma q3_normSq_half_add_half_mul_explicit_omega_sq : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) = (1 / 4 : ℝ) := by + rw [q3_explicit_omega_sq] + exact q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_half_mul_omega_add_half : + Complex.normSq ((1 / 2 : ℂ) * ω + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_omega + +@[simp] private lemma q3_normSq_half_mul_explicit_omega_sq_add_half : + Complex.normSq ((1 / 2 : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_explicit_omega_sq + +@[simp] private lemma q3_hesseS_sq_mul (z : ℂ) : + (hesseS : ℂ) * ((hesseS : ℂ) * z) = (1 / 2 : ℂ) * z := by + calc + (hesseS : ℂ) * ((hesseS : ℂ) * z) = ((hesseS : ℂ) * hesseS) * z := by ring + _ = (1 / 2 : ℂ) * z := by rw [q3_hesseS_sq_complex] + +@[simp] private lemma q3_hesseS_mul_mul_hesseS (z : ℂ) : + (hesseS : ℂ) * z * (hesseS : ℂ) = (1 / 2 : ℂ) * z := by + calc + (hesseS : ℂ) * z * (hesseS : ℂ) = ((hesseS : ℂ) * hesseS) * z := by ring + _ = (1 / 2 : ℂ) * z := by rw [q3_hesseS_sq_complex] + +@[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * + (hesseS : ℂ)) = (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * (hesseS : ℂ)) = + (1 / 4 : ℝ) + rw [q3_star_omega, q3_hesseS_mul_mul_hesseS] + exact q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_half_add_hesseS_omega_mul_hesseS : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * ω * (hesseS : ℂ)) = + (1 / 4 : ℝ) := by + rw [q3_hesseS_mul_mul_hesseS] + exact q3_normSq_half_add_half_mul_omega + +@[simp] private lemma q3_normSq_half_add_hesseS_omega_mul_hesseS_omega : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * ω * + ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) := by + have hphase : + (hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) = (1 / 2 : ℂ) * (ω ^ 2) := by + calc + (hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) = + ((hesseS : ℂ) * hesseS) * (ω ^ 2) := by ring + _ = (1 / 2 : ℂ) * (ω ^ 2) := by rw [q3_hesseS_sq_complex] + rw [hphase] + exact q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS_explicit_sq : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * + ((hesseS : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * + ((hesseS : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = (1 / 4 : ℝ) + rw [q3_star_omega, q3_explicit_omega_sq] + ring_nf + simpa only [pow_two, q3_hesseS_sq_complex, q3_omega_four] using + q3_normSq_half_add_half_mul_omega + +@[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_add_half : + Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * (hesseS : ℂ) + + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_hesseS_star_omega_mul_hesseS + +@[simp] private lemma q3_normSq_hesseS_omega_mul_hesseS_add_half : + Complex.normSq ((hesseS : ℂ) * ω * (hesseS : ℂ) + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_hesseS_omega_mul_hesseS + +@[simp] private lemma q3_normSq_hesseS_omega_mul_hesseS_omega_add_half : + Complex.normSq ((hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_hesseS_omega_mul_hesseS_omega + +@[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_explicit_sq_add_half : + Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * + ((hesseS : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) + + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_hesseS_star_omega_mul_hesseS_explicit_sq + +set_option maxHeartbeats 1000000 in +@[category test, AMS 15 47 81] +lemma hesseFamily_pairwise_audit2 : + HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by + rintro ⟨i, hi⟩ ⟨j, hj⟩ hij + interval_cases i <;> interval_cases j + all_goals + simp [hesseFamily, vec3, overlapSq, sicOverlapSq, Fin.sum_univ_three] at hij ⊢ + first + | done + | contradiction + | norm_num [sicOverlapSq] + +@[category test, AMS 15 47 81] +theorem hasSICPOVM_three_audit2 : HasSICPOVM 3 := by + refine ⟨hesseFamily, ?_⟩ + exact ⟨hesseFamily_normalized, hesseFamily_pairwise_audit2⟩ + +end OpenQuantumProblem23 From f0f046b701a1f5a13083b1dda1ddd02242284dfe Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:34:42 -0700 Subject: [PATCH 11/31] Build the terminal Hesse overlap audit module --- .github/workflows/sic-low-dim-audit.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index 0ad1501703..72cdd539b9 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -7,6 +7,7 @@ on: - '.github/workflows/sic-low-dim-audit.yml' - 'FormalConjectures/Other/SICLowDimAudit.lean' - 'FormalConjectures/Other/SICQutritAudit.lean' + - 'FormalConjectures/Other/SICQutritAudit2.lean' - 'FormalConjectures/OpenQuantumProblems/23.lean' concurrency: @@ -48,16 +49,16 @@ jobs: - name: Compile exact modules run: | set -o pipefail - lake build FormalConjectures.Other.SICQutritAudit 2>&1 | tee /tmp/sic-low-dim-compile.log + lake build FormalConjectures.Other.SICQutritAudit2 2>&1 | tee /tmp/sic-low-dim-compile.log - name: Audit theorem axioms if: success() run: | cat > /tmp/SICLowDimAxioms.lean <<'EOF' - import FormalConjectures.Other.SICQutritAudit + import FormalConjectures.Other.SICQutritAudit2 #print axioms OpenQuantumProblem23.qubitSICFamily_pairwise_audit #print axioms OpenQuantumProblem23.hasSICPOVM_two_audit - #print axioms OpenQuantumProblem23.hesseFamily_pairwise_audit - #print axioms OpenQuantumProblem23.hasSICPOVM_three_audit + #print axioms OpenQuantumProblem23.hesseFamily_pairwise_audit2 + #print axioms OpenQuantumProblem23.hasSICPOVM_three_audit2 EOF lake env lean /tmp/SICLowDimAxioms.lean 2>&1 | tee /tmp/sic-low-dim-axioms.log ! grep -E 'sorryAx|Lean\.ofReduceBool|Lean\.trustCompiler' /tmp/sic-low-dim-axioms.log From 83f1e9127fd70292665896d4ab786cc3ec37708b Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:41:10 -0700 Subject: [PATCH 12/31] Close the final conjugate Hesse overlap identity --- FormalConjectures/Other/SICQutritAudit2.lean | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/FormalConjectures/Other/SICQutritAudit2.lean b/FormalConjectures/Other/SICQutritAudit2.lean index 3f6bc8b736..a4be7e08d5 100644 --- a/FormalConjectures/Other/SICQutritAudit2.lean +++ b/FormalConjectures/Other/SICQutritAudit2.lean @@ -166,6 +166,18 @@ private lemma q3_explicit_omega_sq : rw [h] exact q3_normSq_half_mul_one_add_omega_sq +@[simp] private lemma q3_normSq_half_add_half_mul_star_omega_exact : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (starRingEnd ℂ) ω) = + (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * star ω) = (1 / 4 : ℝ) + rw [q3_star_omega] + exact q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_half_mul_star_omega_add_half_exact : + Complex.normSq ((1 / 2 : ℂ) * (starRingEnd ℂ) ω + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_star_omega_exact + @[simp] private lemma q3_normSq_half_add_half_mul_explicit_omega_sq : Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) = (1 / 4 : ℝ) := by From cf0ab913215a38e397811d8d288a9f22b576260f Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:45:45 -0700 Subject: [PATCH 13/31] Temporarily promote verified SIC proofs --- .github/workflows/promote-sic-proofs.yml | 111 +++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 .github/workflows/promote-sic-proofs.yml diff --git a/.github/workflows/promote-sic-proofs.yml b/.github/workflows/promote-sic-proofs.yml new file mode 100644 index 0000000000..83f85419a4 --- /dev/null +++ b/.github/workflows/promote-sic-proofs.yml @@ -0,0 +1,111 @@ +name: Promote verified SIC proofs + +on: + push: + branches: + - agent/solve-sic-low-dim-v2 + paths: + - '.github/workflows/promote-sic-proofs.yml' + +permissions: + contents: write + +jobs: + promote: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: agent/solve-sic-low-dim-v2 + fetch-depth: 0 + - name: Promote audited proofs into canonical module + run: | + python3 - <<'PY' + from pathlib import Path + + source_path = Path('FormalConjectures/OpenQuantumProblems/23.lean') + qubit_path = Path('FormalConjectures/Other/SICLowDimAudit.lean') + qutrit_path = Path('FormalConjectures/Other/SICQutritAudit2.lean') + + source = source_path.read_text() + qubit = qubit_path.read_text() + qutrit = qutrit_path.read_text() + + qubit_start = qubit.index('private lemma tetraA_sq_audit') + qubit_end = qubit.index('@[category test, AMS 15 47 81]\nlemma qubitSICFamily_pairwise_audit') + qubit_helpers = qubit[qubit_start:qubit_end].rstrip() + + qutrit_start = qutrit.index('private lemma q3_hesseS_sq') + qutrit_end = qutrit.index('set_option maxHeartbeats 1000000 in') + qutrit_helpers = qutrit[qutrit_start:qutrit_end].rstrip() + + qubit_doc = '/-- The tetrahedral qubit SIC family has the correct constant pairwise overlap. -/' + hesse_doc = '/-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/' + + assert qubit_doc in source + assert hesse_doc in source + source = source.replace(qubit_doc, qubit_helpers + '\n\n' + qubit_doc, 1) + source = source.replace(hesse_doc, qutrit_helpers + '\n\n' + hesse_doc, 1) + + source = source.replace( + '''lemma qubitSICFamily_pairwise : + HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by sorry''', + '''lemma qubitSICFamily_pairwise : + HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by + rintro ⟨i, hi⟩ ⟨j, hj⟩ hij + interval_cases i <;> interval_cases j + all_goals + simp [qubitSICFamily, vec2, overlapSq, sicOverlapSq, Fin.sum_univ_two] at hij ⊢ + first + | done + | contradiction + | norm_num [sicOverlapSq]''', 1) + + source = source.replace( + 'theorem hasSICPOVM_two : HasSICPOVM 2 := by sorry', + '''theorem hasSICPOVM_two : HasSICPOVM 2 := by + refine ⟨qubitSICFamily, ?_⟩ + exact ⟨qubitSICFamily_normalized, qubitSICFamily_pairwise⟩''', 1) + + source = source.replace( + '''lemma hesseFamily_pairwise : + HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by sorry''', + '''set_option maxHeartbeats 1000000 in + lemma hesseFamily_pairwise : + HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by + rintro ⟨i, hi⟩ ⟨j, hj⟩ hij + interval_cases i <;> interval_cases j + all_goals + simp [hesseFamily, vec3, overlapSq, sicOverlapSq, Fin.sum_univ_three] at hij ⊢ + first + | done + | contradiction + | norm_num [sicOverlapSq]''', 1) + + source = source.replace( + 'theorem hasSICPOVM_three : HasSICPOVM 3 := by sorry', + '''theorem hasSICPOVM_three : HasSICPOVM 3 := by + refine ⟨hesseFamily, ?_⟩ + exact ⟨hesseFamily_normalized, hesseFamily_pairwise⟩''', 1) + + source = source.replace( + '''At present, these `@[category test, AMS 15 47 81]` results are included with + placeholder proofs `by sorry`; they are intended to be proved in the next PR.''', + '''The low-dimensional dimension-$2$ and dimension-$3$ benchmark results are proved by + exact finite algebraic verification of the tetrahedral and Hesse witness families.''', 1) + + assert source.count('lemma qubitSICFamily_pairwise :') == 1 + assert source.count('lemma hesseFamily_pairwise :') == 1 + assert 'theorem hasSICPOVM_two : HasSICPOVM 2 := by sorry' not in source + assert 'theorem hasSICPOVM_three : HasSICPOVM 3 := by sorry' not in source + + source_path.write_text(source) + PY + - name: Commit promoted proof + run: | + rm .github/workflows/promote-sic-proofs.yml + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add FormalConjectures/OpenQuantumProblems/23.lean .github/workflows/promote-sic-proofs.yml + git commit -m 'Prove the dimension-2 and dimension-3 SIC benchmarks' + git push origin HEAD:agent/solve-sic-low-dim-v2 From ff4ed38f28a517844205c66328b6099cdcf3efdb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 16:45:56 +0000 Subject: [PATCH 14/31] Prove the dimension-2 and dimension-3 SIC benchmarks --- .github/workflows/promote-sic-proofs.yml | 111 ---- FormalConjectures/OpenQuantumProblems/23.lean | 492 +++++++++++++++++- 2 files changed, 486 insertions(+), 117 deletions(-) delete mode 100644 .github/workflows/promote-sic-proofs.yml diff --git a/.github/workflows/promote-sic-proofs.yml b/.github/workflows/promote-sic-proofs.yml deleted file mode 100644 index 83f85419a4..0000000000 --- a/.github/workflows/promote-sic-proofs.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: Promote verified SIC proofs - -on: - push: - branches: - - agent/solve-sic-low-dim-v2 - paths: - - '.github/workflows/promote-sic-proofs.yml' - -permissions: - contents: write - -jobs: - promote: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - ref: agent/solve-sic-low-dim-v2 - fetch-depth: 0 - - name: Promote audited proofs into canonical module - run: | - python3 - <<'PY' - from pathlib import Path - - source_path = Path('FormalConjectures/OpenQuantumProblems/23.lean') - qubit_path = Path('FormalConjectures/Other/SICLowDimAudit.lean') - qutrit_path = Path('FormalConjectures/Other/SICQutritAudit2.lean') - - source = source_path.read_text() - qubit = qubit_path.read_text() - qutrit = qutrit_path.read_text() - - qubit_start = qubit.index('private lemma tetraA_sq_audit') - qubit_end = qubit.index('@[category test, AMS 15 47 81]\nlemma qubitSICFamily_pairwise_audit') - qubit_helpers = qubit[qubit_start:qubit_end].rstrip() - - qutrit_start = qutrit.index('private lemma q3_hesseS_sq') - qutrit_end = qutrit.index('set_option maxHeartbeats 1000000 in') - qutrit_helpers = qutrit[qutrit_start:qutrit_end].rstrip() - - qubit_doc = '/-- The tetrahedral qubit SIC family has the correct constant pairwise overlap. -/' - hesse_doc = '/-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/' - - assert qubit_doc in source - assert hesse_doc in source - source = source.replace(qubit_doc, qubit_helpers + '\n\n' + qubit_doc, 1) - source = source.replace(hesse_doc, qutrit_helpers + '\n\n' + hesse_doc, 1) - - source = source.replace( - '''lemma qubitSICFamily_pairwise : - HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by sorry''', - '''lemma qubitSICFamily_pairwise : - HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by - rintro ⟨i, hi⟩ ⟨j, hj⟩ hij - interval_cases i <;> interval_cases j - all_goals - simp [qubitSICFamily, vec2, overlapSq, sicOverlapSq, Fin.sum_univ_two] at hij ⊢ - first - | done - | contradiction - | norm_num [sicOverlapSq]''', 1) - - source = source.replace( - 'theorem hasSICPOVM_two : HasSICPOVM 2 := by sorry', - '''theorem hasSICPOVM_two : HasSICPOVM 2 := by - refine ⟨qubitSICFamily, ?_⟩ - exact ⟨qubitSICFamily_normalized, qubitSICFamily_pairwise⟩''', 1) - - source = source.replace( - '''lemma hesseFamily_pairwise : - HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by sorry''', - '''set_option maxHeartbeats 1000000 in - lemma hesseFamily_pairwise : - HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by - rintro ⟨i, hi⟩ ⟨j, hj⟩ hij - interval_cases i <;> interval_cases j - all_goals - simp [hesseFamily, vec3, overlapSq, sicOverlapSq, Fin.sum_univ_three] at hij ⊢ - first - | done - | contradiction - | norm_num [sicOverlapSq]''', 1) - - source = source.replace( - 'theorem hasSICPOVM_three : HasSICPOVM 3 := by sorry', - '''theorem hasSICPOVM_three : HasSICPOVM 3 := by - refine ⟨hesseFamily, ?_⟩ - exact ⟨hesseFamily_normalized, hesseFamily_pairwise⟩''', 1) - - source = source.replace( - '''At present, these `@[category test, AMS 15 47 81]` results are included with - placeholder proofs `by sorry`; they are intended to be proved in the next PR.''', - '''The low-dimensional dimension-$2$ and dimension-$3$ benchmark results are proved by - exact finite algebraic verification of the tetrahedral and Hesse witness families.''', 1) - - assert source.count('lemma qubitSICFamily_pairwise :') == 1 - assert source.count('lemma hesseFamily_pairwise :') == 1 - assert 'theorem hasSICPOVM_two : HasSICPOVM 2 := by sorry' not in source - assert 'theorem hasSICPOVM_three : HasSICPOVM 3 := by sorry' not in source - - source_path.write_text(source) - PY - - name: Commit promoted proof - run: | - rm .github/workflows/promote-sic-proofs.yml - git config user.name 'github-actions[bot]' - git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - git add FormalConjectures/OpenQuantumProblems/23.lean .github/workflows/promote-sic-proofs.yml - git commit -m 'Prove the dimension-2 and dimension-3 SIC benchmarks' - git push origin HEAD:agent/solve-sic-low-dim-v2 diff --git a/FormalConjectures/OpenQuantumProblems/23.lean b/FormalConjectures/OpenQuantumProblems/23.lean index 8b694bb464..84ea190f09 100644 --- a/FormalConjectures/OpenQuantumProblems/23.lean +++ b/FormalConjectures/OpenQuantumProblems/23.lean @@ -86,8 +86,8 @@ The file includes the following test lemmas and benchmark-support statements: - `hesseFamily_normalized`, `hesseFamily_pairwise`; - `bb84Family_normalized`. -At present, these `@[category test, AMS 15 47 81]` results are included with -placeholder proofs `by sorry`; they are intended to be proved in the next PR. +The low-dimensional dimension-$2$ and dimension-$3$ benchmark results are proved by +exact finite algebraic verification of the tetrahedral and Hesse witness families. ## References *Primary source list entry:* @@ -266,14 +266,243 @@ lemma qubitSICFamily_normalized (i : Fin 4) : omega_norm, omega2_norm, abs_of_pos sqrt2_pos, abs_of_pos sqrt3_pos] all_goals (try (field_simp; linarith [h2, h3])) +private lemma tetraA_sq_audit : tetraA ^ (2 : ℕ) = (1 / 3 : ℝ) := by + unfold tetraA + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 3 : ℝ))] + +private lemma tetraB_sq_audit : tetraB ^ (2 : ℕ) = (2 / 3 : ℝ) := by + unfold tetraB + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (2 / 3 : ℝ))] + +@[simp] private lemma tetraA_mul_self_audit : tetraA * tetraA = (1 / 3 : ℝ) := by + simpa [pow_two] using tetraA_sq_audit + +@[simp] private lemma tetraB_mul_self_audit : tetraB * tetraB = (2 / 3 : ℝ) := by + simpa [pow_two] using tetraB_sq_audit + +@[simp] private lemma tetraA_sq_complex_audit : + ((tetraA : ℂ) * tetraA) = (1 / 3 : ℂ) := by + have h : (((tetraA * tetraA : ℝ)) : ℂ) = (1 / 3 : ℂ) := by + norm_num [tetraA_mul_self_audit] + simpa only [Complex.ofReal_mul] using h + +@[simp] private lemma tetraB_sq_complex_audit : + ((tetraB : ℂ) * tetraB) = (2 / 3 : ℂ) := by + have h : (((tetraB * tetraB : ℝ)) : ℂ) = (2 / 3 : ℂ) := by + norm_num [tetraB_mul_self_audit] + simpa only [Complex.ofReal_mul] using h + +private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] + +@[simp] private lemma omega_sq_audit : + ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext + · simp [ω, pow_two, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [sq_sqrt_three_audit] + · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +private lemma explicit_omega_sq_audit : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [omega_sq_audit] + apply Complex.ext <;> simp <;> ring + +@[simp] private lemma explicit_omega_audit : + (-(1 : ℂ) / (starRingEnd ℂ) 2 + + ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) = ω := by + have htwo : (starRingEnd ℂ) (2 : ℂ) = 2 := by + change star (2 : ℂ) = 2 + simp + rw [htwo] + apply Complex.ext <;> simp [ω] <;> ring + +@[simp] private lemma star_omega_audit : star ω = ω ^ 2 := by + rw [omega_sq_audit] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma star_omega_sq_audit : star (ω ^ 2) = ω := by + rw [omega_sq_audit] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma omega_cubed_audit : ω ^ 3 = 1 := by + calc + ω ^ 3 = ω * (ω ^ 2) := by ring + _ = 1 := by + rw [omega_sq_audit] + apply Complex.ext + · simp [ω, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [sq_sqrt_three_audit] + · simp [ω, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +@[simp] private lemma omega_four_audit : ω ^ 4 = ω := by + calc + ω ^ 4 = ω ^ 3 * ω := by ring + _ = ω := by simp + +@[simp] private lemma omega_mul_omega_sq_audit : ω * (ω ^ 2) = 1 := by + calc + ω * (ω ^ 2) = ω ^ 3 := by ring + _ = 1 := omega_cubed_audit + +@[simp] private lemma omega_sq_mul_omega_audit : (ω ^ 2) * ω = 1 := by + calc + (ω ^ 2) * ω = ω ^ 3 := by ring + _ = 1 := omega_cubed_audit + +@[simp] private lemma omega_sq_mul_omega_sq_audit : (ω ^ 2) * (ω ^ 2) = ω := by + calc + (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring + _ = ω := omega_four_audit + +@[simp] private lemma tetraB_sq_mul_audit (z : ℂ) : + (tetraB : ℂ) * ((tetraB : ℂ) * z) = (2 / 3 : ℂ) * z := by + calc + (tetraB : ℂ) * ((tetraB : ℂ) * z) = ((tetraB : ℂ) * tetraB) * z := by ring + _ = (2 / 3 : ℂ) * z := by rw [tetraB_sq_complex_audit] + +@[simp] private lemma tetraB_mul_mul_tetraB_audit (z : ℂ) : + (tetraB : ℂ) * z * (tetraB : ℂ) = (2 / 3 : ℂ) * z := by + calc + (tetraB : ℂ) * z * (tetraB : ℂ) = ((tetraB : ℂ) * tetraB) * z := by ring + _ = (2 / 3 : ℂ) * z := by rw [tetraB_sq_complex_audit] + +@[simp] private lemma normSq_one_add_two_mul_omega_audit : + Complex.normSq (1 + 2 * ω) = 3 := by + have hrewrite : + 1 + 2 * ω = ((0 : ℝ) : ℂ) + ((Real.sqrt 3 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext <;> simp [ω] <;> ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [sq_sqrt_three_audit] + +@[simp] private lemma normSq_one_add_two_mul_omega_sq_audit : + Complex.normSq (1 + 2 * (ω ^ 2)) = 3 := by + rw [omega_sq_audit] + have hrewrite : + 1 + 2 * (((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I) = + ((0 : ℝ) : ℂ) + ((-(Real.sqrt 3) : ℝ) : ℂ) * Complex.I := by + apply Complex.ext <;> simp <;> ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [sq_sqrt_three_audit] + +@[simp] private lemma normSq_qubit_offdiag_omega_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * ω) = (1 / 3 : ℝ) := by + have hrewrite : + ((1 / 3 : ℂ) + (2 / 3 : ℂ) * ω) = (1 / 3 : ℂ) * (1 + 2 * ω) := by + ring + rw [hrewrite, Complex.normSq_mul, normSq_one_add_two_mul_omega_audit] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma normSq_qubit_offdiag_omega_sq_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (ω ^ 2)) = (1 / 3 : ℝ) := by + have hrewrite : + ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (ω ^ 2)) = + (1 / 3 : ℂ) * (1 + 2 * (ω ^ 2)) := by + ring + rw [hrewrite, Complex.normSq_mul, normSq_one_add_two_mul_omega_sq_audit] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma normSq_qubit_offdiag_explicit_omega_sq_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) = (1 / 3 : ℝ) := by + rw [explicit_omega_sq_audit] + exact normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma normSq_qubit_offdiag_star_omega_exact_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (starRingEnd ℂ) ω) = + (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * star ω) = (1 / 3 : ℝ) + rw [star_omega_audit] + exact normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma overlap_one_two_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * ((tetraB : ℂ) * ω)) = + (1 / 3 : ℝ) := by + rw [tetraB_sq_mul_audit] + exact normSq_qubit_offdiag_omega_audit + +@[simp] private lemma overlap_one_three_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 3 : ℝ) := by + rw [explicit_omega_sq_audit, tetraB_sq_mul_audit] + exact normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma overlap_two_one_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * (tetraB : ℂ)) = + (1 / 3 : ℝ) := by + rw [star_omega_audit, tetraB_mul_mul_tetraB_audit] + exact normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma overlap_two_three_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * + ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 3 : ℝ) := by + rw [star_omega_audit, explicit_omega_sq_audit] + ring_nf + simpa only [pow_two, tetraB_sq_complex_audit, omega_four_audit] using + normSq_qubit_offdiag_omega_audit + +@[simp] private lemma overlap_two_three_exact_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * (starRingEnd ℂ) ω * + ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * + ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 3 : ℝ) + exact overlap_two_three_audit + +@[simp] private lemma overlap_three_one_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + (-(1 : ℂ) / (starRingEnd ℂ) 2 + + ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) * (tetraB : ℂ)) = + (1 / 3 : ℝ) := by + rw [explicit_omega_audit, tetraB_mul_mul_tetraB_audit] + exact normSq_qubit_offdiag_omega_audit + +@[simp] private lemma overlap_three_two_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + (-(1 : ℂ) / (starRingEnd ℂ) 2 + + ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) * + ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by + rw [explicit_omega_audit] + ring_nf + simpa only [pow_two, tetraB_sq_complex_audit] using + normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma overlap_three_two_simplified_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * ω * + ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by + have hphase : + (tetraB : ℂ) * ω * ((tetraB : ℂ) * ω) = (2 / 3 : ℂ) * (ω ^ 2) := by + calc + (tetraB : ℂ) * ω * ((tetraB : ℂ) * ω) = + ((tetraB : ℂ) * tetraB) * (ω ^ 2) := by ring + _ = (2 / 3 : ℂ) * (ω ^ 2) := by rw [tetraB_sq_complex_audit] + rw [hphase] + exact normSq_qubit_offdiag_omega_sq_audit + /-- The tetrahedral qubit SIC family has the correct constant pairwise overlap. -/ @[category test, AMS 15 47 81] lemma qubitSICFamily_pairwise : - HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by sorry + HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by + rintro ⟨i, hi⟩ ⟨j, hj⟩ hij + interval_cases i <;> interval_cases j + all_goals + simp [qubitSICFamily, vec2, overlapSq, sicOverlapSq, Fin.sum_univ_two] at hij ⊢ + first + | done + | contradiction + | norm_num [sicOverlapSq] /-- Dimension $2$ admits a SIC-POVM, witnessed by the tetrahedral qubit SIC. -/ @[category test, AMS 15 47 81] -theorem hasSICPOVM_two : HasSICPOVM 2 := by sorry +theorem hasSICPOVM_two : HasSICPOVM 2 := by + refine ⟨qubitSICFamily, ?_⟩ + exact ⟨qubitSICFamily_normalized, qubitSICFamily_pairwise⟩ /-- Every vector in the Hesse qutrit SIC family is normalized. -/ @[category test, AMS 15 47 81] @@ -288,14 +517,265 @@ lemma hesseFamily_normalized (i : Fin 9) : omega_norm, omega2_norm, abs_of_pos sqrt2_pos] all_goals (try (field_simp; linarith [h2])) +private lemma q3_hesseS_sq : hesseS ^ (2 : ℕ) = (1 / 2 : ℝ) := by + unfold hesseS + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 2 : ℝ))] + +@[simp] private lemma q3_hesseS_mul_self : hesseS * hesseS = (1 / 2 : ℝ) := by + simpa [pow_two] using q3_hesseS_sq + +@[simp] private lemma q3_hesseS_sq_complex : + ((hesseS : ℂ) * hesseS) = (1 / 2 : ℂ) := by + have h : (((hesseS * hesseS : ℝ)) : ℂ) = (1 / 2 : ℂ) := by + norm_num [q3_hesseS_mul_self] + simpa only [Complex.ofReal_mul] using h + +private lemma q3_sqrt_three_sq : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by + nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] + +private lemma q3_omega_sq : + ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext + · simp [ω, pow_two, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [q3_sqrt_three_sq] + · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +private lemma q3_explicit_omega_sq : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [q3_omega_sq] + apply Complex.ext <;> simp <;> ring + +@[simp] private lemma q3_star_omega : star ω = ω ^ 2 := by + rw [q3_omega_sq] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma q3_star_omega_sq : star (ω ^ 2) = ω := by + rw [q3_omega_sq] + apply Complex.ext <;> simp [ω] + +@[simp] private lemma q3_omega_cubed : ω ^ 3 = 1 := by + calc + ω ^ 3 = ω * (ω ^ 2) := by ring + _ = 1 := by + rw [q3_omega_sq] + apply Complex.ext + · simp [ω, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] + nlinarith [q3_sqrt_three_sq] + · simp [ω, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] + ring_nf + +@[simp] private lemma q3_omega_four : ω ^ 4 = ω := by + calc + ω ^ 4 = ω ^ 3 * ω := by ring + _ = ω := by simp + +@[simp] private lemma q3_omega_mul_omega_sq : ω * (ω ^ 2) = 1 := by + calc + ω * (ω ^ 2) = ω ^ 3 := by ring + _ = 1 := q3_omega_cubed + +@[simp] private lemma q3_omega_sq_mul_omega : (ω ^ 2) * ω = 1 := by + calc + (ω ^ 2) * ω = ω ^ 3 := by ring + _ = 1 := q3_omega_cubed + +@[simp] private lemma q3_omega_sq_mul_omega_sq : (ω ^ 2) * (ω ^ 2) = ω := by + calc + (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring + _ = ω := q3_omega_four + +@[simp] private lemma q3_omega_normSq : Complex.normSq ω = 1 := by + rw [ω, Complex.normSq_add_mul_I] + nlinarith [q3_sqrt_three_sq] + +@[simp] private lemma q3_omega_sq_normSq : Complex.normSq (ω ^ 2) = 1 := by + simp [pow_two, Complex.normSq_mul] + +@[simp] private lemma q3_explicit_omega_sq_normSq : + Complex.normSq (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = 1 := by + rw [q3_explicit_omega_sq] + exact q3_omega_sq_normSq + +@[simp] private lemma q3_normSq_one_add_omega : Complex.normSq (1 + ω) = 1 := by + have hrewrite : + 1 + ω = ((1 / 2 : ℝ) : ℂ) + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by + simp [ω] + ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [q3_sqrt_three_sq] + +@[simp] private lemma q3_normSq_one_add_omega_sq : + Complex.normSq (1 + ω ^ 2) = 1 := by + rw [q3_omega_sq] + have hrewrite : + 1 + (((-(1 : ℝ) / 2 : ℝ) : ℂ) - + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I) = + ((1 / 2 : ℝ) : ℂ) + ((-(Real.sqrt 3) / 2 : ℝ) : ℂ) * Complex.I := by + apply Complex.ext <;> simp <;> ring + rw [hrewrite, Complex.normSq_add_mul_I] + nlinarith [q3_sqrt_three_sq] + +@[simp] private lemma q3_normSq_half : + Complex.normSq (1 / 2 : ℂ) = (1 / 4 : ℝ) := by + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_mul_omega : + Complex.normSq ((1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, q3_omega_normSq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_mul_omega_sq : + Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, q3_omega_sq_normSq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_mul_one_add_omega : + Complex.normSq ((1 / 2 : ℂ) * (1 + ω)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, q3_normSq_one_add_omega] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_mul_one_add_omega_sq : + Complex.normSq ((1 / 2 : ℂ) * (1 + ω ^ 2)) = (1 / 4 : ℝ) := by + rw [Complex.normSq_mul, q3_normSq_one_add_omega_sq] + norm_num [Complex.normSq_ofReal] + +@[simp] private lemma q3_normSq_half_add_half_mul_omega : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by + have h : + ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 2 : ℂ) * (1 + ω) := by ring + rw [h] + exact q3_normSq_half_mul_one_add_omega + +@[simp] private lemma q3_normSq_half_add_half_mul_omega_sq : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by + have h : + ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = + (1 / 2 : ℂ) * (1 + ω ^ 2) := by ring + rw [h] + exact q3_normSq_half_mul_one_add_omega_sq + +@[simp] private lemma q3_normSq_half_add_half_mul_star_omega_exact : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (starRingEnd ℂ) ω) = + (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * star ω) = (1 / 4 : ℝ) + rw [q3_star_omega] + exact q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_half_mul_star_omega_add_half_exact : + Complex.normSq ((1 / 2 : ℂ) * (starRingEnd ℂ) ω + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_star_omega_exact + +@[simp] private lemma q3_normSq_half_add_half_mul_explicit_omega_sq : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) = (1 / 4 : ℝ) := by + rw [q3_explicit_omega_sq] + exact q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_half_mul_omega_add_half : + Complex.normSq ((1 / 2 : ℂ) * ω + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_omega + +@[simp] private lemma q3_normSq_half_mul_explicit_omega_sq_add_half : + Complex.normSq ((1 / 2 : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_explicit_omega_sq + +@[simp] private lemma q3_hesseS_sq_mul (z : ℂ) : + (hesseS : ℂ) * ((hesseS : ℂ) * z) = (1 / 2 : ℂ) * z := by + calc + (hesseS : ℂ) * ((hesseS : ℂ) * z) = ((hesseS : ℂ) * hesseS) * z := by ring + _ = (1 / 2 : ℂ) * z := by rw [q3_hesseS_sq_complex] + +@[simp] private lemma q3_hesseS_mul_mul_hesseS (z : ℂ) : + (hesseS : ℂ) * z * (hesseS : ℂ) = (1 / 2 : ℂ) * z := by + calc + (hesseS : ℂ) * z * (hesseS : ℂ) = ((hesseS : ℂ) * hesseS) * z := by ring + _ = (1 / 2 : ℂ) * z := by rw [q3_hesseS_sq_complex] + +@[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * + (hesseS : ℂ)) = (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * (hesseS : ℂ)) = + (1 / 4 : ℝ) + rw [q3_star_omega, q3_hesseS_mul_mul_hesseS] + exact q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_half_add_hesseS_omega_mul_hesseS : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * ω * (hesseS : ℂ)) = + (1 / 4 : ℝ) := by + rw [q3_hesseS_mul_mul_hesseS] + exact q3_normSq_half_add_half_mul_omega + +@[simp] private lemma q3_normSq_half_add_hesseS_omega_mul_hesseS_omega : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * ω * + ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) := by + have hphase : + (hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) = (1 / 2 : ℂ) * (ω ^ 2) := by + calc + (hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) = + ((hesseS : ℂ) * hesseS) * (ω ^ 2) := by ring + _ = (1 / 2 : ℂ) * (ω ^ 2) := by rw [q3_hesseS_sq_complex] + rw [hphase] + exact q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS_explicit_sq : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * + ((hesseS : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = + (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * + ((hesseS : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = (1 / 4 : ℝ) + rw [q3_star_omega, q3_explicit_omega_sq] + ring_nf + simpa only [pow_two, q3_hesseS_sq_complex, q3_omega_four] using + q3_normSq_half_add_half_mul_omega + +@[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_add_half : + Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * (hesseS : ℂ) + + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_hesseS_star_omega_mul_hesseS + +@[simp] private lemma q3_normSq_hesseS_omega_mul_hesseS_add_half : + Complex.normSq ((hesseS : ℂ) * ω * (hesseS : ℂ) + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_hesseS_omega_mul_hesseS + +@[simp] private lemma q3_normSq_hesseS_omega_mul_hesseS_omega_add_half : + Complex.normSq ((hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_hesseS_omega_mul_hesseS_omega + +@[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_explicit_sq_add_half : + Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * + ((hesseS : ℂ) * + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) + + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_hesseS_star_omega_mul_hesseS_explicit_sq + /-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/ @[category test, AMS 15 47 81] +set_option maxHeartbeats 1000000 in lemma hesseFamily_pairwise : - HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by sorry + HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by + rintro ⟨i, hi⟩ ⟨j, hj⟩ hij + interval_cases i <;> interval_cases j + all_goals + simp [hesseFamily, vec3, overlapSq, sicOverlapSq, Fin.sum_univ_three] at hij ⊢ + first + | done + | contradiction + | norm_num [sicOverlapSq] /-- Dimension $3$ admits a SIC-POVM, witnessed by the Hesse qutrit SIC. -/ @[category test, AMS 15 47 81] -theorem hasSICPOVM_three : HasSICPOVM 3 := by sorry +theorem hasSICPOVM_three : HasSICPOVM 3 := by + refine ⟨hesseFamily, ?_⟩ + exact ⟨hesseFamily_normalized, hesseFamily_pairwise⟩ /-- Every vector in the BB84 family is normalized. -/ @[category test, AMS 15 47 81] From f49774a6f99c2d9479591a1c0a861bb188955b75 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:46:27 -0700 Subject: [PATCH 15/31] Remove promoted qubit SIC audit module --- FormalConjectures/Other/SICLowDimAudit.lean | 266 -------------------- 1 file changed, 266 deletions(-) delete mode 100644 FormalConjectures/Other/SICLowDimAudit.lean diff --git a/FormalConjectures/Other/SICLowDimAudit.lean b/FormalConjectures/Other/SICLowDimAudit.lean deleted file mode 100644 index 903a6c35be..0000000000 --- a/FormalConjectures/Other/SICLowDimAudit.lean +++ /dev/null @@ -1,266 +0,0 @@ -/- -Copyright 2026 The Formal Conjectures Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. --/ - -import FormalConjectures.OpenQuantumProblems.«23» - -/-! -# Low-dimensional SIC-POVM proof audit - -A focused proof of the tetrahedral qubit SIC benchmark using exact algebraic identities. --/ - -namespace OpenQuantumProblem23 - -set_option linter.style.ams_attribute false -set_option linter.style.category_attribute false - -private lemma tetraA_sq_audit : tetraA ^ (2 : ℕ) = (1 / 3 : ℝ) := by - unfold tetraA - nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 3 : ℝ))] - -private lemma tetraB_sq_audit : tetraB ^ (2 : ℕ) = (2 / 3 : ℝ) := by - unfold tetraB - nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (2 / 3 : ℝ))] - -@[simp] private lemma tetraA_mul_self_audit : tetraA * tetraA = (1 / 3 : ℝ) := by - simpa [pow_two] using tetraA_sq_audit - -@[simp] private lemma tetraB_mul_self_audit : tetraB * tetraB = (2 / 3 : ℝ) := by - simpa [pow_two] using tetraB_sq_audit - -@[simp] private lemma tetraA_sq_complex_audit : - ((tetraA : ℂ) * tetraA) = (1 / 3 : ℂ) := by - have h : (((tetraA * tetraA : ℝ)) : ℂ) = (1 / 3 : ℂ) := by - norm_num [tetraA_mul_self_audit] - simpa only [Complex.ofReal_mul] using h - -@[simp] private lemma tetraB_sq_complex_audit : - ((tetraB : ℂ) * tetraB) = (2 / 3 : ℂ) := by - have h : (((tetraB * tetraB : ℝ)) : ℂ) = (2 / 3 : ℂ) := by - norm_num [tetraB_mul_self_audit] - simpa only [Complex.ofReal_mul] using h - -private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by - nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] - -@[simp] private lemma omega_sq_audit : - ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - - ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by - apply Complex.ext - · simp [ω, pow_two, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] - nlinarith [sq_sqrt_three_audit] - · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] - ring_nf - -private lemma explicit_omega_sq_audit : - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by - rw [omega_sq_audit] - apply Complex.ext <;> simp <;> ring - -@[simp] private lemma explicit_omega_audit : - (-(1 : ℂ) / (starRingEnd ℂ) 2 + - ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) = ω := by - have htwo : (starRingEnd ℂ) (2 : ℂ) = 2 := by - change star (2 : ℂ) = 2 - simp - rw [htwo] - apply Complex.ext <;> simp [ω] <;> ring - -@[simp] private lemma star_omega_audit : star ω = ω ^ 2 := by - rw [omega_sq_audit] - apply Complex.ext <;> simp [ω] - -@[simp] private lemma star_omega_sq_audit : star (ω ^ 2) = ω := by - rw [omega_sq_audit] - apply Complex.ext <;> simp [ω] - -@[simp] private lemma omega_cubed_audit : ω ^ 3 = 1 := by - calc - ω ^ 3 = ω * (ω ^ 2) := by ring - _ = 1 := by - rw [omega_sq_audit] - apply Complex.ext - · simp [ω, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] - nlinarith [sq_sqrt_three_audit] - · simp [ω, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] - ring_nf - -@[simp] private lemma omega_four_audit : ω ^ 4 = ω := by - calc - ω ^ 4 = ω ^ 3 * ω := by ring - _ = ω := by simp - -@[simp] private lemma omega_mul_omega_sq_audit : ω * (ω ^ 2) = 1 := by - calc - ω * (ω ^ 2) = ω ^ 3 := by ring - _ = 1 := omega_cubed_audit - -@[simp] private lemma omega_sq_mul_omega_audit : (ω ^ 2) * ω = 1 := by - calc - (ω ^ 2) * ω = ω ^ 3 := by ring - _ = 1 := omega_cubed_audit - -@[simp] private lemma omega_sq_mul_omega_sq_audit : (ω ^ 2) * (ω ^ 2) = ω := by - calc - (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring - _ = ω := omega_four_audit - -@[simp] private lemma tetraB_sq_mul_audit (z : ℂ) : - (tetraB : ℂ) * ((tetraB : ℂ) * z) = (2 / 3 : ℂ) * z := by - calc - (tetraB : ℂ) * ((tetraB : ℂ) * z) = ((tetraB : ℂ) * tetraB) * z := by ring - _ = (2 / 3 : ℂ) * z := by rw [tetraB_sq_complex_audit] - -@[simp] private lemma tetraB_mul_mul_tetraB_audit (z : ℂ) : - (tetraB : ℂ) * z * (tetraB : ℂ) = (2 / 3 : ℂ) * z := by - calc - (tetraB : ℂ) * z * (tetraB : ℂ) = ((tetraB : ℂ) * tetraB) * z := by ring - _ = (2 / 3 : ℂ) * z := by rw [tetraB_sq_complex_audit] - -@[simp] private lemma normSq_one_add_two_mul_omega_audit : - Complex.normSq (1 + 2 * ω) = 3 := by - have hrewrite : - 1 + 2 * ω = ((0 : ℝ) : ℂ) + ((Real.sqrt 3 : ℝ) : ℂ) * Complex.I := by - apply Complex.ext <;> simp [ω] <;> ring - rw [hrewrite, Complex.normSq_add_mul_I] - nlinarith [sq_sqrt_three_audit] - -@[simp] private lemma normSq_one_add_two_mul_omega_sq_audit : - Complex.normSq (1 + 2 * (ω ^ 2)) = 3 := by - rw [omega_sq_audit] - have hrewrite : - 1 + 2 * (((-(1 : ℝ) / 2 : ℝ) : ℂ) - - ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I) = - ((0 : ℝ) : ℂ) + ((-(Real.sqrt 3) : ℝ) : ℂ) * Complex.I := by - apply Complex.ext <;> simp <;> ring - rw [hrewrite, Complex.normSq_add_mul_I] - nlinarith [sq_sqrt_three_audit] - -@[simp] private lemma normSq_qubit_offdiag_omega_audit : - Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * ω) = (1 / 3 : ℝ) := by - have hrewrite : - ((1 / 3 : ℂ) + (2 / 3 : ℂ) * ω) = (1 / 3 : ℂ) * (1 + 2 * ω) := by - ring - rw [hrewrite, Complex.normSq_mul, normSq_one_add_two_mul_omega_audit] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma normSq_qubit_offdiag_omega_sq_audit : - Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (ω ^ 2)) = (1 / 3 : ℝ) := by - have hrewrite : - ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (ω ^ 2)) = - (1 / 3 : ℂ) * (1 + 2 * (ω ^ 2)) := by - ring - rw [hrewrite, Complex.normSq_mul, normSq_one_add_two_mul_omega_sq_audit] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma normSq_qubit_offdiag_explicit_omega_sq_audit : - Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) = (1 / 3 : ℝ) := by - rw [explicit_omega_sq_audit] - exact normSq_qubit_offdiag_omega_sq_audit - -@[simp] private lemma normSq_qubit_offdiag_star_omega_exact_audit : - Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (starRingEnd ℂ) ω) = - (1 / 3 : ℝ) := by - change Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * star ω) = (1 / 3 : ℝ) - rw [star_omega_audit] - exact normSq_qubit_offdiag_omega_sq_audit - -@[simp] private lemma overlap_one_two_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * ((tetraB : ℂ) * ω)) = - (1 / 3 : ℝ) := by - rw [tetraB_sq_mul_audit] - exact normSq_qubit_offdiag_omega_audit - -@[simp] private lemma overlap_one_three_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * - ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = - (1 / 3 : ℝ) := by - rw [explicit_omega_sq_audit, tetraB_sq_mul_audit] - exact normSq_qubit_offdiag_omega_sq_audit - -@[simp] private lemma overlap_two_one_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * (tetraB : ℂ)) = - (1 / 3 : ℝ) := by - rw [star_omega_audit, tetraB_mul_mul_tetraB_audit] - exact normSq_qubit_offdiag_omega_sq_audit - -@[simp] private lemma overlap_two_three_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * - ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = - (1 / 3 : ℝ) := by - rw [star_omega_audit, explicit_omega_sq_audit] - ring_nf - simpa only [pow_two, tetraB_sq_complex_audit, omega_four_audit] using - normSq_qubit_offdiag_omega_audit - -@[simp] private lemma overlap_two_three_exact_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * (starRingEnd ℂ) ω * - ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = - (1 / 3 : ℝ) := by - change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * - ((tetraB : ℂ) * (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = - (1 / 3 : ℝ) - exact overlap_two_three_audit - -@[simp] private lemma overlap_three_one_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * - (-(1 : ℂ) / (starRingEnd ℂ) 2 + - ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) * (tetraB : ℂ)) = - (1 / 3 : ℝ) := by - rw [explicit_omega_audit, tetraB_mul_mul_tetraB_audit] - exact normSq_qubit_offdiag_omega_audit - -@[simp] private lemma overlap_three_two_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * - (-(1 : ℂ) / (starRingEnd ℂ) 2 + - ((Real.sqrt 3 : ℂ) / (starRingEnd ℂ) 2) * Complex.I) * - ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by - rw [explicit_omega_audit] - ring_nf - simpa only [pow_two, tetraB_sq_complex_audit] using - normSq_qubit_offdiag_omega_sq_audit - -@[simp] private lemma overlap_three_two_simplified_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * ω * - ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by - have hphase : - (tetraB : ℂ) * ω * ((tetraB : ℂ) * ω) = (2 / 3 : ℂ) * (ω ^ 2) := by - calc - (tetraB : ℂ) * ω * ((tetraB : ℂ) * ω) = - ((tetraB : ℂ) * tetraB) * (ω ^ 2) := by ring - _ = (2 / 3 : ℂ) * (ω ^ 2) := by rw [tetraB_sq_complex_audit] - rw [hphase] - exact normSq_qubit_offdiag_omega_sq_audit - -@[category test, AMS 15 47 81] -lemma qubitSICFamily_pairwise_audit : - HasConstantOverlapSq (sicOverlapSq 2) qubitSICFamily := by - rintro ⟨i, hi⟩ ⟨j, hj⟩ hij - interval_cases i <;> interval_cases j - all_goals - simp [qubitSICFamily, vec2, overlapSq, sicOverlapSq, Fin.sum_univ_two] at hij ⊢ - first - | done - | contradiction - | norm_num [sicOverlapSq] - -@[category test, AMS 15 47 81] -theorem hasSICPOVM_two_audit : HasSICPOVM 2 := by - refine ⟨qubitSICFamily, ?_⟩ - exact ⟨qubitSICFamily_normalized, qubitSICFamily_pairwise_audit⟩ - -end OpenQuantumProblem23 From ccc4329ab42a3c9cb3d20a1150b9371f6c3a8747 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:46:34 -0700 Subject: [PATCH 16/31] Remove superseded qutrit SIC audit module --- FormalConjectures/Other/SICQutritAudit.lean | 193 -------------------- 1 file changed, 193 deletions(-) delete mode 100644 FormalConjectures/Other/SICQutritAudit.lean diff --git a/FormalConjectures/Other/SICQutritAudit.lean b/FormalConjectures/Other/SICQutritAudit.lean deleted file mode 100644 index 9214a699e7..0000000000 --- a/FormalConjectures/Other/SICQutritAudit.lean +++ /dev/null @@ -1,193 +0,0 @@ -/- -Copyright 2026 The Formal Conjectures Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. --/ - -import FormalConjectures.Other.SICLowDimAudit - -/-! -# Qutrit Hesse SIC-POVM proof audit - -A focused finite verification of the Hesse SIC family in dimension three. --/ - -namespace OpenQuantumProblem23 - -set_option linter.style.ams_attribute false -set_option linter.style.category_attribute false - -private lemma qutrit_hesseS_sq : hesseS ^ (2 : ℕ) = (1 / 2 : ℝ) := by - unfold hesseS - nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 2 : ℝ))] - -@[simp] private lemma qutrit_hesseS_mul_self : hesseS * hesseS = (1 / 2 : ℝ) := by - simpa [pow_two] using qutrit_hesseS_sq - -@[simp] private lemma qutrit_hesseS_sq_complex : - ((hesseS : ℂ) * hesseS) = (1 / 2 : ℂ) := by - have h : (((hesseS * hesseS : ℝ)) : ℂ) = (1 / 2 : ℂ) := by - norm_num [qutrit_hesseS_mul_self] - simpa only [Complex.ofReal_mul] using h - -private lemma qutrit_sqrt_three_sq : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by - nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] - -private lemma qutrit_omega_sq : - ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - - ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by - apply Complex.ext - · simp [ω, pow_two, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] - nlinarith [qutrit_sqrt_three_sq] - · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] - ring_nf - -private lemma qutrit_explicit_omega_sq : - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by - rw [qutrit_omega_sq] - apply Complex.ext <;> simp <;> ring - -@[simp] private lemma qutrit_star_omega : star ω = ω ^ 2 := by - rw [qutrit_omega_sq] - apply Complex.ext <;> simp [ω] - -@[simp] private lemma qutrit_star_omega_sq : star (ω ^ 2) = ω := by - rw [qutrit_omega_sq] - apply Complex.ext <;> simp [ω] - -@[simp] private lemma qutrit_omega_cubed : ω ^ 3 = 1 := by - calc - ω ^ 3 = ω * (ω ^ 2) := by ring - _ = 1 := by - rw [qutrit_omega_sq] - apply Complex.ext - · simp [ω, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] - nlinarith [qutrit_sqrt_three_sq] - · simp [ω, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] - ring_nf - -@[simp] private lemma qutrit_omega_four : ω ^ 4 = ω := by - calc - ω ^ 4 = ω ^ 3 * ω := by ring - _ = ω := by simp - -@[simp] private lemma qutrit_omega_mul_omega_sq : ω * (ω ^ 2) = 1 := by - calc - ω * (ω ^ 2) = ω ^ 3 := by ring - _ = 1 := qutrit_omega_cubed - -@[simp] private lemma qutrit_omega_sq_mul_omega : (ω ^ 2) * ω = 1 := by - calc - (ω ^ 2) * ω = ω ^ 3 := by ring - _ = 1 := qutrit_omega_cubed - -@[simp] private lemma qutrit_omega_sq_mul_omega_sq : (ω ^ 2) * (ω ^ 2) = ω := by - calc - (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring - _ = ω := qutrit_omega_four - -@[simp] private lemma qutrit_omega_normSq : Complex.normSq ω = 1 := by - rw [ω, Complex.normSq_add_mul_I] - nlinarith [qutrit_sqrt_three_sq] - -@[simp] private lemma qutrit_omega_sq_normSq : Complex.normSq (ω ^ 2) = 1 := by - simp [pow_two, Complex.normSq_mul] - -@[simp] private lemma qutrit_normSq_one_add_omega : Complex.normSq (1 + ω) = 1 := by - have hrewrite : - 1 + ω = ((1 / 2 : ℝ) : ℂ) + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by - simp [ω] - ring - rw [hrewrite, Complex.normSq_add_mul_I] - nlinarith [qutrit_sqrt_three_sq] - -@[simp] private lemma qutrit_normSq_one_add_omega_sq : - Complex.normSq (1 + ω ^ 2) = 1 := by - rw [qutrit_omega_sq] - have hrewrite : - 1 + (((-(1 : ℝ) / 2 : ℝ) : ℂ) - - ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I) = - ((1 / 2 : ℝ) : ℂ) + ((-(Real.sqrt 3) / 2 : ℝ) : ℂ) * Complex.I := by - apply Complex.ext <;> simp <;> ring - rw [hrewrite, Complex.normSq_add_mul_I] - nlinarith [qutrit_sqrt_three_sq] - -@[simp] private lemma qutrit_normSq_half : - Complex.normSq (1 / 2 : ℂ) = (1 / 4 : ℝ) := by - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma qutrit_normSq_neg_half : - Complex.normSq (-(1 / 2 : ℂ)) = (1 / 4 : ℝ) := by - rw [Complex.normSq_neg] - exact qutrit_normSq_half - -@[simp] private lemma qutrit_normSq_half_mul_omega : - Complex.normSq ((1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by - rw [Complex.normSq_mul, qutrit_omega_normSq] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma qutrit_normSq_half_mul_omega_sq : - Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by - rw [Complex.normSq_mul, qutrit_omega_sq_normSq] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma qutrit_normSq_half_mul_one_add_omega : - Complex.normSq ((1 / 2 : ℂ) * (1 + ω)) = (1 / 4 : ℝ) := by - rw [Complex.normSq_mul, qutrit_normSq_one_add_omega] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma qutrit_normSq_half_mul_one_add_omega_sq : - Complex.normSq ((1 / 2 : ℂ) * (1 + ω ^ 2)) = (1 / 4 : ℝ) := by - rw [Complex.normSq_mul, qutrit_normSq_one_add_omega_sq] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma qutrit_normSq_half_add_half_mul_omega : - Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by - have h : - ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 2 : ℂ) * (1 + ω) := by ring - rw [h] - exact qutrit_normSq_half_mul_one_add_omega - -@[simp] private lemma qutrit_normSq_half_add_half_mul_omega_sq : - Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by - have h : - ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = - (1 / 2 : ℂ) * (1 + ω ^ 2) := by ring - rw [h] - exact qutrit_normSq_half_mul_one_add_omega_sq - -@[simp] private lemma qutrit_hesseS_sq_mul (z : ℂ) : - (hesseS : ℂ) * ((hesseS : ℂ) * z) = (1 / 2 : ℂ) * z := by - calc - (hesseS : ℂ) * ((hesseS : ℂ) * z) = ((hesseS : ℂ) * hesseS) * z := by ring - _ = (1 / 2 : ℂ) * z := by rw [qutrit_hesseS_sq_complex] - -set_option maxHeartbeats 1000000 in -@[category test, AMS 15 47 81] -lemma hesseFamily_pairwise_audit : - HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by - rintro ⟨i, hi⟩ ⟨j, hj⟩ hij - interval_cases i <;> interval_cases j - all_goals - simp [hesseFamily, vec3, overlapSq, sicOverlapSq, Fin.sum_univ_three] at hij ⊢ - first - | done - | contradiction - | norm_num [sicOverlapSq] - -@[category test, AMS 15 47 81] -theorem hasSICPOVM_three_audit : HasSICPOVM 3 := by - refine ⟨hesseFamily, ?_⟩ - exact ⟨hesseFamily_normalized, hesseFamily_pairwise_audit⟩ - -end OpenQuantumProblem23 From 857eb3809f33b9e04d46c3e91fde12a9b3a1231b Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:46:45 -0700 Subject: [PATCH 17/31] Remove promoted qutrit SIC audit module --- FormalConjectures/Other/SICQutritAudit2.lean | 288 ------------------- 1 file changed, 288 deletions(-) delete mode 100644 FormalConjectures/Other/SICQutritAudit2.lean diff --git a/FormalConjectures/Other/SICQutritAudit2.lean b/FormalConjectures/Other/SICQutritAudit2.lean deleted file mode 100644 index a4be7e08d5..0000000000 --- a/FormalConjectures/Other/SICQutritAudit2.lean +++ /dev/null @@ -1,288 +0,0 @@ -/- -Copyright 2026 The Formal Conjectures Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. --/ - -import FormalConjectures.Other.SICLowDimAudit - -/-! -# Qutrit Hesse SIC-POVM proof audit - -A focused finite verification of the Hesse SIC family in dimension three. --/ - -namespace OpenQuantumProblem23 - -set_option linter.style.ams_attribute false -set_option linter.style.category_attribute false - -private lemma q3_hesseS_sq : hesseS ^ (2 : ℕ) = (1 / 2 : ℝ) := by - unfold hesseS - nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (1 / 2 : ℝ))] - -@[simp] private lemma q3_hesseS_mul_self : hesseS * hesseS = (1 / 2 : ℝ) := by - simpa [pow_two] using q3_hesseS_sq - -@[simp] private lemma q3_hesseS_sq_complex : - ((hesseS : ℂ) * hesseS) = (1 / 2 : ℂ) := by - have h : (((hesseS * hesseS : ℝ)) : ℂ) = (1 / 2 : ℂ) := by - norm_num [q3_hesseS_mul_self] - simpa only [Complex.ofReal_mul] using h - -private lemma q3_sqrt_three_sq : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by - nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] - -private lemma q3_omega_sq : - ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - - ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by - apply Complex.ext - · simp [ω, pow_two, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] - nlinarith [q3_sqrt_three_sq] - · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] - ring_nf - -private lemma q3_explicit_omega_sq : - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by - rw [q3_omega_sq] - apply Complex.ext <;> simp <;> ring - -@[simp] private lemma q3_star_omega : star ω = ω ^ 2 := by - rw [q3_omega_sq] - apply Complex.ext <;> simp [ω] - -@[simp] private lemma q3_star_omega_sq : star (ω ^ 2) = ω := by - rw [q3_omega_sq] - apply Complex.ext <;> simp [ω] - -@[simp] private lemma q3_omega_cubed : ω ^ 3 = 1 := by - calc - ω ^ 3 = ω * (ω ^ 2) := by ring - _ = 1 := by - rw [q3_omega_sq] - apply Complex.ext - · simp [ω, Complex.add_re, Complex.mul_re, Complex.mul_im, Complex.sub_re] - nlinarith [q3_sqrt_three_sq] - · simp [ω, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] - ring_nf - -@[simp] private lemma q3_omega_four : ω ^ 4 = ω := by - calc - ω ^ 4 = ω ^ 3 * ω := by ring - _ = ω := by simp - -@[simp] private lemma q3_omega_mul_omega_sq : ω * (ω ^ 2) = 1 := by - calc - ω * (ω ^ 2) = ω ^ 3 := by ring - _ = 1 := q3_omega_cubed - -@[simp] private lemma q3_omega_sq_mul_omega : (ω ^ 2) * ω = 1 := by - calc - (ω ^ 2) * ω = ω ^ 3 := by ring - _ = 1 := q3_omega_cubed - -@[simp] private lemma q3_omega_sq_mul_omega_sq : (ω ^ 2) * (ω ^ 2) = ω := by - calc - (ω ^ 2) * (ω ^ 2) = ω ^ 4 := by ring - _ = ω := q3_omega_four - -@[simp] private lemma q3_omega_normSq : Complex.normSq ω = 1 := by - rw [ω, Complex.normSq_add_mul_I] - nlinarith [q3_sqrt_three_sq] - -@[simp] private lemma q3_omega_sq_normSq : Complex.normSq (ω ^ 2) = 1 := by - simp [pow_two, Complex.normSq_mul] - -@[simp] private lemma q3_explicit_omega_sq_normSq : - Complex.normSq (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = 1 := by - rw [q3_explicit_omega_sq] - exact q3_omega_sq_normSq - -@[simp] private lemma q3_normSq_one_add_omega : Complex.normSq (1 + ω) = 1 := by - have hrewrite : - 1 + ω = ((1 / 2 : ℝ) : ℂ) + ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by - simp [ω] - ring - rw [hrewrite, Complex.normSq_add_mul_I] - nlinarith [q3_sqrt_three_sq] - -@[simp] private lemma q3_normSq_one_add_omega_sq : - Complex.normSq (1 + ω ^ 2) = 1 := by - rw [q3_omega_sq] - have hrewrite : - 1 + (((-(1 : ℝ) / 2 : ℝ) : ℂ) - - ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I) = - ((1 / 2 : ℝ) : ℂ) + ((-(Real.sqrt 3) / 2 : ℝ) : ℂ) * Complex.I := by - apply Complex.ext <;> simp <;> ring - rw [hrewrite, Complex.normSq_add_mul_I] - nlinarith [q3_sqrt_three_sq] - -@[simp] private lemma q3_normSq_half : - Complex.normSq (1 / 2 : ℂ) = (1 / 4 : ℝ) := by - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma q3_normSq_half_mul_omega : - Complex.normSq ((1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by - rw [Complex.normSq_mul, q3_omega_normSq] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma q3_normSq_half_mul_omega_sq : - Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by - rw [Complex.normSq_mul, q3_omega_sq_normSq] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma q3_normSq_half_mul_one_add_omega : - Complex.normSq ((1 / 2 : ℂ) * (1 + ω)) = (1 / 4 : ℝ) := by - rw [Complex.normSq_mul, q3_normSq_one_add_omega] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma q3_normSq_half_mul_one_add_omega_sq : - Complex.normSq ((1 / 2 : ℂ) * (1 + ω ^ 2)) = (1 / 4 : ℝ) := by - rw [Complex.normSq_mul, q3_normSq_one_add_omega_sq] - norm_num [Complex.normSq_ofReal] - -@[simp] private lemma q3_normSq_half_add_half_mul_omega : - Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 4 : ℝ) := by - have h : - ((1 / 2 : ℂ) + (1 / 2 : ℂ) * ω) = (1 / 2 : ℂ) * (1 + ω) := by ring - rw [h] - exact q3_normSq_half_mul_one_add_omega - -@[simp] private lemma q3_normSq_half_add_half_mul_omega_sq : - Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = (1 / 4 : ℝ) := by - have h : - ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (ω ^ 2)) = - (1 / 2 : ℂ) * (1 + ω ^ 2) := by ring - rw [h] - exact q3_normSq_half_mul_one_add_omega_sq - -@[simp] private lemma q3_normSq_half_add_half_mul_star_omega_exact : - Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (starRingEnd ℂ) ω) = - (1 / 4 : ℝ) := by - change Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * star ω) = (1 / 4 : ℝ) - rw [q3_star_omega] - exact q3_normSq_half_add_half_mul_omega_sq - -@[simp] private lemma q3_normSq_half_mul_star_omega_add_half_exact : - Complex.normSq ((1 / 2 : ℂ) * (starRingEnd ℂ) ω + (1 / 2 : ℂ)) = - (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_half_mul_star_omega_exact - -@[simp] private lemma q3_normSq_half_add_half_mul_explicit_omega_sq : - Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) = (1 / 4 : ℝ) := by - rw [q3_explicit_omega_sq] - exact q3_normSq_half_add_half_mul_omega_sq - -@[simp] private lemma q3_normSq_half_mul_omega_add_half : - Complex.normSq ((1 / 2 : ℂ) * ω + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_half_mul_omega - -@[simp] private lemma q3_normSq_half_mul_explicit_omega_sq_add_half : - Complex.normSq ((1 / 2 : ℂ) * - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) + (1 / 2 : ℂ)) = - (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_half_mul_explicit_omega_sq - -@[simp] private lemma q3_hesseS_sq_mul (z : ℂ) : - (hesseS : ℂ) * ((hesseS : ℂ) * z) = (1 / 2 : ℂ) * z := by - calc - (hesseS : ℂ) * ((hesseS : ℂ) * z) = ((hesseS : ℂ) * hesseS) * z := by ring - _ = (1 / 2 : ℂ) * z := by rw [q3_hesseS_sq_complex] - -@[simp] private lemma q3_hesseS_mul_mul_hesseS (z : ℂ) : - (hesseS : ℂ) * z * (hesseS : ℂ) = (1 / 2 : ℂ) * z := by - calc - (hesseS : ℂ) * z * (hesseS : ℂ) = ((hesseS : ℂ) * hesseS) * z := by ring - _ = (1 / 2 : ℂ) * z := by rw [q3_hesseS_sq_complex] - -@[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS : - Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * - (hesseS : ℂ)) = (1 / 4 : ℝ) := by - change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * (hesseS : ℂ)) = - (1 / 4 : ℝ) - rw [q3_star_omega, q3_hesseS_mul_mul_hesseS] - exact q3_normSq_half_add_half_mul_omega_sq - -@[simp] private lemma q3_normSq_half_add_hesseS_omega_mul_hesseS : - Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * ω * (hesseS : ℂ)) = - (1 / 4 : ℝ) := by - rw [q3_hesseS_mul_mul_hesseS] - exact q3_normSq_half_add_half_mul_omega - -@[simp] private lemma q3_normSq_half_add_hesseS_omega_mul_hesseS_omega : - Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * ω * - ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) := by - have hphase : - (hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) = (1 / 2 : ℂ) * (ω ^ 2) := by - calc - (hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) = - ((hesseS : ℂ) * hesseS) * (ω ^ 2) := by ring - _ = (1 / 2 : ℂ) * (ω ^ 2) := by rw [q3_hesseS_sq_complex] - rw [hphase] - exact q3_normSq_half_add_half_mul_omega_sq - -@[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS_explicit_sq : - Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * - ((hesseS : ℂ) * - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = - (1 / 4 : ℝ) := by - change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * - ((hesseS : ℂ) * - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I))) = (1 / 4 : ℝ) - rw [q3_star_omega, q3_explicit_omega_sq] - ring_nf - simpa only [pow_two, q3_hesseS_sq_complex, q3_omega_four] using - q3_normSq_half_add_half_mul_omega - -@[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_add_half : - Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * (hesseS : ℂ) + - (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_hesseS_star_omega_mul_hesseS - -@[simp] private lemma q3_normSq_hesseS_omega_mul_hesseS_add_half : - Complex.normSq ((hesseS : ℂ) * ω * (hesseS : ℂ) + (1 / 2 : ℂ)) = - (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_hesseS_omega_mul_hesseS - -@[simp] private lemma q3_normSq_hesseS_omega_mul_hesseS_omega_add_half : - Complex.normSq ((hesseS : ℂ) * ω * ((hesseS : ℂ) * ω) + (1 / 2 : ℂ)) = - (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_hesseS_omega_mul_hesseS_omega - -@[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_explicit_sq_add_half : - Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * - ((hesseS : ℂ) * - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I)) + - (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_hesseS_star_omega_mul_hesseS_explicit_sq - -set_option maxHeartbeats 1000000 in -@[category test, AMS 15 47 81] -lemma hesseFamily_pairwise_audit2 : - HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by - rintro ⟨i, hi⟩ ⟨j, hj⟩ hij - interval_cases i <;> interval_cases j - all_goals - simp [hesseFamily, vec3, overlapSq, sicOverlapSq, Fin.sum_univ_three] at hij ⊢ - first - | done - | contradiction - | norm_num [sicOverlapSq] - -@[category test, AMS 15 47 81] -theorem hasSICPOVM_three_audit2 : HasSICPOVM 3 := by - refine ⟨hesseFamily, ?_⟩ - exact ⟨hesseFamily_normalized, hesseFamily_pairwise_audit2⟩ - -end OpenQuantumProblem23 From 3844c911e4683707e7092f834f4ce134c3dae034 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:47:03 -0700 Subject: [PATCH 18/31] Audit the canonical low-dimensional SIC theorems --- .github/workflows/sic-low-dim-audit.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index 72cdd539b9..570f7db0f0 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -5,9 +5,6 @@ on: branches: [main] paths: - '.github/workflows/sic-low-dim-audit.yml' - - 'FormalConjectures/Other/SICLowDimAudit.lean' - - 'FormalConjectures/Other/SICQutritAudit.lean' - - 'FormalConjectures/Other/SICQutritAudit2.lean' - 'FormalConjectures/OpenQuantumProblems/23.lean' concurrency: @@ -24,8 +21,6 @@ jobs: steps: - uses: actions/checkout@v6 with: - repository: DomTheDeveloper/formal-conjectures - ref: agent/solve-sic-low-dim-v2 fetch-depth: 1 - name: Install Lean run: | @@ -46,19 +41,19 @@ jobs: sleep 10 done exit 1 - - name: Compile exact modules + - name: Compile canonical module run: | set -o pipefail - lake build FormalConjectures.Other.SICQutritAudit2 2>&1 | tee /tmp/sic-low-dim-compile.log - - name: Audit theorem axioms + lake build FormalConjectures.OpenQuantumProblems.23 2>&1 | tee /tmp/sic-low-dim-compile.log + - name: Audit canonical theorem axioms if: success() run: | cat > /tmp/SICLowDimAxioms.lean <<'EOF' - import FormalConjectures.Other.SICQutritAudit2 - #print axioms OpenQuantumProblem23.qubitSICFamily_pairwise_audit - #print axioms OpenQuantumProblem23.hasSICPOVM_two_audit - #print axioms OpenQuantumProblem23.hesseFamily_pairwise_audit2 - #print axioms OpenQuantumProblem23.hasSICPOVM_three_audit2 + import FormalConjectures.OpenQuantumProblems.«23» + #print axioms OpenQuantumProblem23.qubitSICFamily_pairwise + #print axioms OpenQuantumProblem23.hasSICPOVM_two + #print axioms OpenQuantumProblem23.hesseFamily_pairwise + #print axioms OpenQuantumProblem23.hasSICPOVM_three EOF lake env lean /tmp/SICLowDimAxioms.lean 2>&1 | tee /tmp/sic-low-dim-axioms.log ! grep -E 'sorryAx|Lean\.ofReduceBool|Lean\.trustCompiler' /tmp/sic-low-dim-axioms.log From 3d6d42f12c9a3b8a3ce7d38261704b10aa90b7f0 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:49:58 -0700 Subject: [PATCH 19/31] Compile the numeric SIC module by exact path --- .github/workflows/sic-low-dim-audit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index 570f7db0f0..c8678ea68a 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -44,7 +44,7 @@ jobs: - name: Compile canonical module run: | set -o pipefail - lake build FormalConjectures.OpenQuantumProblems.23 2>&1 | tee /tmp/sic-low-dim-compile.log + lake env lean FormalConjectures/OpenQuantumProblems/23.lean 2>&1 | tee /tmp/sic-low-dim-compile.log - name: Audit canonical theorem axioms if: success() run: | From 8768edb98b742563a10c76fe62c78604c6702a8c Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:53:59 -0700 Subject: [PATCH 20/31] Temporarily apply SIC integration fixes --- .github/workflows/fix-sic-integration.yml | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/fix-sic-integration.yml diff --git a/.github/workflows/fix-sic-integration.yml b/.github/workflows/fix-sic-integration.yml new file mode 100644 index 0000000000..3cf9a6e1a2 --- /dev/null +++ b/.github/workflows/fix-sic-integration.yml @@ -0,0 +1,51 @@ +name: Fix SIC proof integration + +on: + push: + branches: + - agent/solve-sic-low-dim-v2 + paths: + - '.github/workflows/fix-sic-integration.yml' + +permissions: + contents: write + +jobs: + patch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: agent/solve-sic-low-dim-v2 + fetch-depth: 0 + - name: Apply integration fixes + run: | + python3 - <<'PY' + from pathlib import Path + path = Path('FormalConjectures/OpenQuantumProblems/23.lean') + text = path.read_text() + text = text.replace( + '@[simp] private lemma omega_sq_audit :', + 'private lemma omega_sq_audit :', + 1, + ) + old = '''/-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/ + @[category test, AMS 15 47 81] + set_option maxHeartbeats 1000000 in + lemma hesseFamily_pairwise :''' + new = '''set_option maxHeartbeats 1000000 in + /-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/ + @[category test, AMS 15 47 81] + lemma hesseFamily_pairwise :''' + assert old in text + text = text.replace(old, new, 1) + path.write_text(text) + PY + - name: Commit integration fixes + run: | + rm .github/workflows/fix-sic-integration.yml + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add FormalConjectures/OpenQuantumProblems/23.lean .github/workflows/fix-sic-integration.yml + git commit -m 'Fix SIC proof integration' + git push origin HEAD:agent/solve-sic-low-dim-v2 From d955557f453a41792128b6b38f90c2bb233c45e6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 16:54:11 +0000 Subject: [PATCH 21/31] Fix SIC proof integration --- .github/workflows/fix-sic-integration.yml | 51 ------------------- FormalConjectures/OpenQuantumProblems/23.lean | 4 +- 2 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/fix-sic-integration.yml diff --git a/.github/workflows/fix-sic-integration.yml b/.github/workflows/fix-sic-integration.yml deleted file mode 100644 index 3cf9a6e1a2..0000000000 --- a/.github/workflows/fix-sic-integration.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Fix SIC proof integration - -on: - push: - branches: - - agent/solve-sic-low-dim-v2 - paths: - - '.github/workflows/fix-sic-integration.yml' - -permissions: - contents: write - -jobs: - patch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - ref: agent/solve-sic-low-dim-v2 - fetch-depth: 0 - - name: Apply integration fixes - run: | - python3 - <<'PY' - from pathlib import Path - path = Path('FormalConjectures/OpenQuantumProblems/23.lean') - text = path.read_text() - text = text.replace( - '@[simp] private lemma omega_sq_audit :', - 'private lemma omega_sq_audit :', - 1, - ) - old = '''/-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/ - @[category test, AMS 15 47 81] - set_option maxHeartbeats 1000000 in - lemma hesseFamily_pairwise :''' - new = '''set_option maxHeartbeats 1000000 in - /-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/ - @[category test, AMS 15 47 81] - lemma hesseFamily_pairwise :''' - assert old in text - text = text.replace(old, new, 1) - path.write_text(text) - PY - - name: Commit integration fixes - run: | - rm .github/workflows/fix-sic-integration.yml - git config user.name 'github-actions[bot]' - git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - git add FormalConjectures/OpenQuantumProblems/23.lean .github/workflows/fix-sic-integration.yml - git commit -m 'Fix SIC proof integration' - git push origin HEAD:agent/solve-sic-low-dim-v2 diff --git a/FormalConjectures/OpenQuantumProblems/23.lean b/FormalConjectures/OpenQuantumProblems/23.lean index 84ea190f09..884a7e0c82 100644 --- a/FormalConjectures/OpenQuantumProblems/23.lean +++ b/FormalConjectures/OpenQuantumProblems/23.lean @@ -295,7 +295,7 @@ private lemma tetraB_sq_audit : tetraB ^ (2 : ℕ) = (2 / 3 : ℝ) := by private lemma sq_sqrt_three_audit : (Real.sqrt 3) ^ (2 : ℕ) = (3 : ℝ) := by nlinarith [Real.sq_sqrt (by positivity : 0 ≤ (3 : ℝ))] -@[simp] private lemma omega_sq_audit : +private lemma omega_sq_audit : ω ^ 2 = ((-(1 : ℝ) / 2 : ℝ) : ℂ) - ((Real.sqrt 3 / 2 : ℝ) : ℂ) * Complex.I := by apply Complex.ext @@ -757,9 +757,9 @@ private lemma q3_explicit_omega_sq : (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by simpa [add_comm] using q3_normSq_half_add_hesseS_star_omega_mul_hesseS_explicit_sq +set_option maxHeartbeats 1000000 in /-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/ @[category test, AMS 15 47 81] -set_option maxHeartbeats 1000000 in lemma hesseFamily_pairwise : HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by rintro ⟨i, hi⟩ ⟨j, hj⟩ hij From ac7c10f0d93ec6f2c03fb1c68017c97a2c5fba91 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 09:54:42 -0700 Subject: [PATCH 22/31] Rerun canonical SIC proof audit after integration fixes --- .github/workflows/sic-low-dim-audit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index c8678ea68a..da80b6fa0f 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -41,6 +41,7 @@ jobs: sleep 10 done exit 1 + # Compile the canonical numeric module directly; Lake target syntax treats `23` as a path. - name: Compile canonical module run: | set -o pipefail From d6ce8ad883c2bd8373998b5312a4a44453d0fa00 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 10:01:03 -0700 Subject: [PATCH 23/31] Temporarily close remaining SIC overlap orientations --- .github/workflows/close-sic-orientations.yml | 177 +++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 .github/workflows/close-sic-orientations.yml diff --git a/.github/workflows/close-sic-orientations.yml b/.github/workflows/close-sic-orientations.yml new file mode 100644 index 0000000000..738f5b732a --- /dev/null +++ b/.github/workflows/close-sic-orientations.yml @@ -0,0 +1,177 @@ +name: Close SIC orientation variants + +on: + push: + branches: + - agent/solve-sic-low-dim-v2 + paths: + - '.github/workflows/close-sic-orientations.yml' + +permissions: + contents: write + +jobs: + patch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: agent/solve-sic-low-dim-v2 + fetch-depth: 0 + - name: Add exact orientation lemmas and clean linters + run: | + python3 - <<'PY' + from pathlib import Path + + path = Path('FormalConjectures/OpenQuantumProblems/23.lean') + text = path.read_text() + + text = text.replace( + '''private lemma explicit_omega_sq_audit : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [omega_sq_audit] + apply Complex.ext <;> simp <;> ring''', + '''set_option linter.unnecessarySeqFocus false in + private lemma explicit_omega_sq_audit : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [omega_sq_audit] + apply Complex.ext <;> simp <;> ring''', + 1) + + text = text.replace( + ''' rw [htwo] + apply Complex.ext <;> simp [ω] <;> ring + + @[simp] private lemma star_omega_audit''', + ''' rw [htwo] + apply Complex.ext <;> simp [ω] + + @[simp] private lemma star_omega_audit''', + 1) + + text = text.replace( + '''private lemma q3_explicit_omega_sq : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [q3_omega_sq] + apply Complex.ext <;> simp <;> ring''', + '''set_option linter.unnecessarySeqFocus false in + private lemma q3_explicit_omega_sq : + (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by + rw [q3_omega_sq] + apply Complex.ext <;> simp <;> ring''', + 1) + + qubit_marker = '/-- The tetrahedral qubit SIC family has the correct constant pairwise overlap. -/' + assert qubit_marker in text + qubit_extra = r''' + @[simp] private lemma overlap_two_three_pow_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * (starRingEnd ℂ) ω * + ((tetraB : ℂ) * (ω ^ 2))) = (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * + ((tetraB : ℂ) * (ω ^ 2))) = (1 / 3 : ℝ) + rw [star_omega_audit] + have hphase : + (tetraB : ℂ) * (ω ^ 2) * ((tetraB : ℂ) * (ω ^ 2)) = + (2 / 3 : ℂ) * ω := by + calc + (tetraB : ℂ) * (ω ^ 2) * ((tetraB : ℂ) * (ω ^ 2)) = + ((tetraB : ℂ) * tetraB) * ((ω ^ 2) * (ω ^ 2)) := by ring + _ = (2 / 3 : ℂ) * ω := by + rw [tetraB_sq_complex_audit, omega_sq_mul_omega_sq_audit] + rw [hphase] + exact normSq_qubit_offdiag_omega_audit + + @[simp] private lemma normSq_qubit_offdiag_star_omega_pow_two_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * + ((starRingEnd ℂ) ω) ^ 2) = (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (star ω) ^ 2) = + (1 / 3 : ℝ) + rw [star_omega_audit] + simpa only [pow_two, omega_sq_mul_omega_sq_audit] using + normSq_qubit_offdiag_omega_audit + + @[simp] private lemma overlap_three_two_star_pow_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + ((starRingEnd ℂ) ω) ^ 2 * ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + (star ω) ^ 2 * ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) + rw [star_omega_audit] + simpa only [pow_two, omega_sq_mul_omega_sq_audit] using + overlap_three_two_simplified_audit + + '''.replace(' ', '') + text = text.replace(qubit_marker, qubit_extra + qubit_marker, 1) + + qutrit_marker = 'set_option maxHeartbeats 1000000 in\n/-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/' + assert qutrit_marker in text + qutrit_extra = r''' + @[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS_omega_sq : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * + ((hesseS : ℂ) * (ω ^ 2))) = (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * + ((hesseS : ℂ) * (ω ^ 2))) = (1 / 4 : ℝ) + rw [q3_star_omega] + have hphase : + (hesseS : ℂ) * (ω ^ 2) * ((hesseS : ℂ) * (ω ^ 2)) = + (1 / 2 : ℂ) * ω := by + calc + (hesseS : ℂ) * (ω ^ 2) * ((hesseS : ℂ) * (ω ^ 2)) = + ((hesseS : ℂ) * hesseS) * ((ω ^ 2) * (ω ^ 2)) := by ring + _ = (1 / 2 : ℂ) * ω := by + rw [q3_hesseS_sq_complex, q3_omega_sq_mul_omega_sq] + rw [hphase] + exact q3_normSq_half_add_half_mul_omega + + @[simp] private lemma q3_normSq_half_add_half_mul_star_omega_pow_two : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * + ((starRingEnd ℂ) ω) ^ 2) = (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (star ω) ^ 2) = + (1 / 4 : ℝ) + rw [q3_star_omega] + simpa only [pow_two, q3_omega_sq_mul_omega_sq] using + q3_normSq_half_add_half_mul_omega + + @[simp] private lemma q3_normSq_half_add_hesseS_star_omega_pow_two_mul_hesseS_omega : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * + ((starRingEnd ℂ) ω) ^ 2 * ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * + (star ω) ^ 2 * ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) + rw [q3_star_omega] + simpa only [pow_two, q3_omega_sq_mul_omega_sq] using + q3_normSq_half_add_hesseS_omega_mul_hesseS_omega + + @[simp] private lemma q3_normSq_half_mul_omega_sq_add_half : + Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2) + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_omega_sq + + @[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_omega_sq_add_half : + Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * + ((hesseS : ℂ) * (ω ^ 2)) + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using + q3_normSq_half_add_hesseS_star_omega_mul_hesseS_omega_sq + + @[simp] private lemma q3_normSq_half_mul_star_omega_pow_two_add_half : + Complex.normSq ((1 / 2 : ℂ) * ((starRingEnd ℂ) ω) ^ 2 + + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_star_omega_pow_two + + @[simp] private lemma q3_normSq_hesseS_star_omega_pow_two_mul_hesseS_omega_add_half : + Complex.normSq ((hesseS : ℂ) * ((starRingEnd ℂ) ω) ^ 2 * + ((hesseS : ℂ) * ω) + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using + q3_normSq_half_add_hesseS_star_omega_pow_two_mul_hesseS_omega + + '''.replace(' ', '') + text = text.replace(qutrit_marker, qutrit_extra + qutrit_marker, 1) + + path.write_text(text) + PY + - name: Commit exact orientation lemmas + run: | + rm .github/workflows/close-sic-orientations.yml + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add FormalConjectures/OpenQuantumProblems/23.lean .github/workflows/close-sic-orientations.yml + git commit -m 'Close remaining SIC overlap orientations' + git push origin HEAD:agent/solve-sic-low-dim-v2 From 7aeef3c2aca76d413f94d13ebf6044e9b6c1d712 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 17:01:14 +0000 Subject: [PATCH 24/31] Close remaining SIC overlap orientations --- .github/workflows/close-sic-orientations.yml | 177 ------------------ FormalConjectures/OpenQuantumProblems/23.lean | 98 +++++++++- 2 files changed, 97 insertions(+), 178 deletions(-) delete mode 100644 .github/workflows/close-sic-orientations.yml diff --git a/.github/workflows/close-sic-orientations.yml b/.github/workflows/close-sic-orientations.yml deleted file mode 100644 index 738f5b732a..0000000000 --- a/.github/workflows/close-sic-orientations.yml +++ /dev/null @@ -1,177 +0,0 @@ -name: Close SIC orientation variants - -on: - push: - branches: - - agent/solve-sic-low-dim-v2 - paths: - - '.github/workflows/close-sic-orientations.yml' - -permissions: - contents: write - -jobs: - patch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - ref: agent/solve-sic-low-dim-v2 - fetch-depth: 0 - - name: Add exact orientation lemmas and clean linters - run: | - python3 - <<'PY' - from pathlib import Path - - path = Path('FormalConjectures/OpenQuantumProblems/23.lean') - text = path.read_text() - - text = text.replace( - '''private lemma explicit_omega_sq_audit : - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by - rw [omega_sq_audit] - apply Complex.ext <;> simp <;> ring''', - '''set_option linter.unnecessarySeqFocus false in - private lemma explicit_omega_sq_audit : - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by - rw [omega_sq_audit] - apply Complex.ext <;> simp <;> ring''', - 1) - - text = text.replace( - ''' rw [htwo] - apply Complex.ext <;> simp [ω] <;> ring - - @[simp] private lemma star_omega_audit''', - ''' rw [htwo] - apply Complex.ext <;> simp [ω] - - @[simp] private lemma star_omega_audit''', - 1) - - text = text.replace( - '''private lemma q3_explicit_omega_sq : - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by - rw [q3_omega_sq] - apply Complex.ext <;> simp <;> ring''', - '''set_option linter.unnecessarySeqFocus false in - private lemma q3_explicit_omega_sq : - (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by - rw [q3_omega_sq] - apply Complex.ext <;> simp <;> ring''', - 1) - - qubit_marker = '/-- The tetrahedral qubit SIC family has the correct constant pairwise overlap. -/' - assert qubit_marker in text - qubit_extra = r''' - @[simp] private lemma overlap_two_three_pow_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * (starRingEnd ℂ) ω * - ((tetraB : ℂ) * (ω ^ 2))) = (1 / 3 : ℝ) := by - change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * - ((tetraB : ℂ) * (ω ^ 2))) = (1 / 3 : ℝ) - rw [star_omega_audit] - have hphase : - (tetraB : ℂ) * (ω ^ 2) * ((tetraB : ℂ) * (ω ^ 2)) = - (2 / 3 : ℂ) * ω := by - calc - (tetraB : ℂ) * (ω ^ 2) * ((tetraB : ℂ) * (ω ^ 2)) = - ((tetraB : ℂ) * tetraB) * ((ω ^ 2) * (ω ^ 2)) := by ring - _ = (2 / 3 : ℂ) * ω := by - rw [tetraB_sq_complex_audit, omega_sq_mul_omega_sq_audit] - rw [hphase] - exact normSq_qubit_offdiag_omega_audit - - @[simp] private lemma normSq_qubit_offdiag_star_omega_pow_two_audit : - Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * - ((starRingEnd ℂ) ω) ^ 2) = (1 / 3 : ℝ) := by - change Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (star ω) ^ 2) = - (1 / 3 : ℝ) - rw [star_omega_audit] - simpa only [pow_two, omega_sq_mul_omega_sq_audit] using - normSq_qubit_offdiag_omega_audit - - @[simp] private lemma overlap_three_two_star_pow_audit : - Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * - ((starRingEnd ℂ) ω) ^ 2 * ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by - change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * - (star ω) ^ 2 * ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) - rw [star_omega_audit] - simpa only [pow_two, omega_sq_mul_omega_sq_audit] using - overlap_three_two_simplified_audit - - '''.replace(' ', '') - text = text.replace(qubit_marker, qubit_extra + qubit_marker, 1) - - qutrit_marker = 'set_option maxHeartbeats 1000000 in\n/-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/' - assert qutrit_marker in text - qutrit_extra = r''' - @[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS_omega_sq : - Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * - ((hesseS : ℂ) * (ω ^ 2))) = (1 / 4 : ℝ) := by - change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * - ((hesseS : ℂ) * (ω ^ 2))) = (1 / 4 : ℝ) - rw [q3_star_omega] - have hphase : - (hesseS : ℂ) * (ω ^ 2) * ((hesseS : ℂ) * (ω ^ 2)) = - (1 / 2 : ℂ) * ω := by - calc - (hesseS : ℂ) * (ω ^ 2) * ((hesseS : ℂ) * (ω ^ 2)) = - ((hesseS : ℂ) * hesseS) * ((ω ^ 2) * (ω ^ 2)) := by ring - _ = (1 / 2 : ℂ) * ω := by - rw [q3_hesseS_sq_complex, q3_omega_sq_mul_omega_sq] - rw [hphase] - exact q3_normSq_half_add_half_mul_omega - - @[simp] private lemma q3_normSq_half_add_half_mul_star_omega_pow_two : - Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * - ((starRingEnd ℂ) ω) ^ 2) = (1 / 4 : ℝ) := by - change Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (star ω) ^ 2) = - (1 / 4 : ℝ) - rw [q3_star_omega] - simpa only [pow_two, q3_omega_sq_mul_omega_sq] using - q3_normSq_half_add_half_mul_omega - - @[simp] private lemma q3_normSq_half_add_hesseS_star_omega_pow_two_mul_hesseS_omega : - Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * - ((starRingEnd ℂ) ω) ^ 2 * ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) := by - change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * - (star ω) ^ 2 * ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) - rw [q3_star_omega] - simpa only [pow_two, q3_omega_sq_mul_omega_sq] using - q3_normSq_half_add_hesseS_omega_mul_hesseS_omega - - @[simp] private lemma q3_normSq_half_mul_omega_sq_add_half : - Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2) + (1 / 2 : ℂ)) = - (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_half_mul_omega_sq - - @[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_omega_sq_add_half : - Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * - ((hesseS : ℂ) * (ω ^ 2)) + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by - simpa [add_comm] using - q3_normSq_half_add_hesseS_star_omega_mul_hesseS_omega_sq - - @[simp] private lemma q3_normSq_half_mul_star_omega_pow_two_add_half : - Complex.normSq ((1 / 2 : ℂ) * ((starRingEnd ℂ) ω) ^ 2 + - (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by - simpa [add_comm] using q3_normSq_half_add_half_mul_star_omega_pow_two - - @[simp] private lemma q3_normSq_hesseS_star_omega_pow_two_mul_hesseS_omega_add_half : - Complex.normSq ((hesseS : ℂ) * ((starRingEnd ℂ) ω) ^ 2 * - ((hesseS : ℂ) * ω) + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by - simpa [add_comm] using - q3_normSq_half_add_hesseS_star_omega_pow_two_mul_hesseS_omega - - '''.replace(' ', '') - text = text.replace(qutrit_marker, qutrit_extra + qutrit_marker, 1) - - path.write_text(text) - PY - - name: Commit exact orientation lemmas - run: | - rm .github/workflows/close-sic-orientations.yml - git config user.name 'github-actions[bot]' - git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - git add FormalConjectures/OpenQuantumProblems/23.lean .github/workflows/close-sic-orientations.yml - git commit -m 'Close remaining SIC overlap orientations' - git push origin HEAD:agent/solve-sic-low-dim-v2 diff --git a/FormalConjectures/OpenQuantumProblems/23.lean b/FormalConjectures/OpenQuantumProblems/23.lean index 884a7e0c82..99e249608d 100644 --- a/FormalConjectures/OpenQuantumProblems/23.lean +++ b/FormalConjectures/OpenQuantumProblems/23.lean @@ -304,6 +304,7 @@ private lemma omega_sq_audit : · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] ring_nf +set_option linter.unnecessarySeqFocus false in private lemma explicit_omega_sq_audit : (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by rw [omega_sq_audit] @@ -316,7 +317,7 @@ private lemma explicit_omega_sq_audit : change star (2 : ℂ) = 2 simp rw [htwo] - apply Complex.ext <;> simp [ω] <;> ring + apply Complex.ext <;> simp [ω] @[simp] private lemma star_omega_audit : star ω = ω ^ 2 := by rw [omega_sq_audit] @@ -485,6 +486,42 @@ private lemma explicit_omega_sq_audit : rw [hphase] exact normSq_qubit_offdiag_omega_sq_audit + +@[simp] private lemma overlap_two_three_pow_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * (starRingEnd ℂ) ω * + ((tetraB : ℂ) * (ω ^ 2))) = (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * star ω * + ((tetraB : ℂ) * (ω ^ 2))) = (1 / 3 : ℝ) + rw [star_omega_audit] + have hphase : + (tetraB : ℂ) * (ω ^ 2) * ((tetraB : ℂ) * (ω ^ 2)) = + (2 / 3 : ℂ) * ω := by + calc + (tetraB : ℂ) * (ω ^ 2) * ((tetraB : ℂ) * (ω ^ 2)) = +((tetraB : ℂ) * tetraB) * ((ω ^ 2) * (ω ^ 2)) := by ring + _ = (2 / 3 : ℂ) * ω := by + rw [tetraB_sq_complex_audit, omega_sq_mul_omega_sq_audit] + rw [hphase] + exact normSq_qubit_offdiag_omega_audit + +@[simp] private lemma normSq_qubit_offdiag_star_omega_pow_two_audit : + Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * + ((starRingEnd ℂ) ω) ^ 2) = (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (star ω) ^ 2) = + (1 / 3 : ℝ) + rw [star_omega_audit] + simpa only [pow_two, omega_sq_mul_omega_sq_audit] using + normSq_qubit_offdiag_omega_audit + +@[simp] private lemma overlap_three_two_star_pow_audit : + Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + ((starRingEnd ℂ) ω) ^ 2 * ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) := by + change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * + (star ω) ^ 2 * ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) + rw [star_omega_audit] + simpa only [pow_two, omega_sq_mul_omega_sq_audit] using + overlap_three_two_simplified_audit + /-- The tetrahedral qubit SIC family has the correct constant pairwise overlap. -/ @[category test, AMS 15 47 81] lemma qubitSICFamily_pairwise : @@ -542,6 +579,7 @@ private lemma q3_omega_sq : · simp [ω, pow_two, Complex.add_im, Complex.mul_re, Complex.mul_im, Complex.sub_im] ring_nf +set_option linter.unnecessarySeqFocus false in private lemma q3_explicit_omega_sq : (-(1 / 2 : ℂ) - ((Real.sqrt 3 : ℂ) / 2) * Complex.I) = ω ^ 2 := by rw [q3_omega_sq] @@ -757,6 +795,64 @@ private lemma q3_explicit_omega_sq : (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by simpa [add_comm] using q3_normSq_half_add_hesseS_star_omega_mul_hesseS_explicit_sq + +@[simp] private lemma q3_normSq_half_add_hesseS_star_omega_mul_hesseS_omega_sq : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (starRingEnd ℂ) ω * + ((hesseS : ℂ) * (ω ^ 2))) = (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * star ω * + ((hesseS : ℂ) * (ω ^ 2))) = (1 / 4 : ℝ) + rw [q3_star_omega] + have hphase : + (hesseS : ℂ) * (ω ^ 2) * ((hesseS : ℂ) * (ω ^ 2)) = + (1 / 2 : ℂ) * ω := by + calc + (hesseS : ℂ) * (ω ^ 2) * ((hesseS : ℂ) * (ω ^ 2)) = +((hesseS : ℂ) * hesseS) * ((ω ^ 2) * (ω ^ 2)) := by ring + _ = (1 / 2 : ℂ) * ω := by + rw [q3_hesseS_sq_complex, q3_omega_sq_mul_omega_sq] + rw [hphase] + exact q3_normSq_half_add_half_mul_omega + +@[simp] private lemma q3_normSq_half_add_half_mul_star_omega_pow_two : + Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * + ((starRingEnd ℂ) ω) ^ 2) = (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (star ω) ^ 2) = + (1 / 4 : ℝ) + rw [q3_star_omega] + simpa only [pow_two, q3_omega_sq_mul_omega_sq] using + q3_normSq_half_add_half_mul_omega + +@[simp] private lemma q3_normSq_half_add_hesseS_star_omega_pow_two_mul_hesseS_omega : + Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * + ((starRingEnd ℂ) ω) ^ 2 * ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) := by + change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * + (star ω) ^ 2 * ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) + rw [q3_star_omega] + simpa only [pow_two, q3_omega_sq_mul_omega_sq] using + q3_normSq_half_add_hesseS_omega_mul_hesseS_omega + +@[simp] private lemma q3_normSq_half_mul_omega_sq_add_half : + Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2) + (1 / 2 : ℂ)) = + (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_omega_sq + +@[simp] private lemma q3_normSq_hesseS_star_omega_mul_hesseS_omega_sq_add_half : + Complex.normSq ((hesseS : ℂ) * (starRingEnd ℂ) ω * + ((hesseS : ℂ) * (ω ^ 2)) + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using + q3_normSq_half_add_hesseS_star_omega_mul_hesseS_omega_sq + +@[simp] private lemma q3_normSq_half_mul_star_omega_pow_two_add_half : + Complex.normSq ((1 / 2 : ℂ) * ((starRingEnd ℂ) ω) ^ 2 + + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using q3_normSq_half_add_half_mul_star_omega_pow_two + +@[simp] private lemma q3_normSq_hesseS_star_omega_pow_two_mul_hesseS_omega_add_half : + Complex.normSq ((hesseS : ℂ) * ((starRingEnd ℂ) ω) ^ 2 * + ((hesseS : ℂ) * ω) + (1 / 2 : ℂ)) = (1 / 4 : ℝ) := by + simpa [add_comm] using + q3_normSq_half_add_hesseS_star_omega_pow_two_mul_hesseS_omega + set_option maxHeartbeats 1000000 in /-- The Hesse qutrit SIC family has the correct constant pairwise overlap. -/ @[category test, AMS 15 47 81] From 25556b2b04be96a8fd0559a4857179c49d50faf6 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 10:02:03 -0700 Subject: [PATCH 25/31] Run final canonical SIC audit --- .github/workflows/sic-low-dim-audit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index da80b6fa0f..20bca3a0be 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -42,6 +42,7 @@ jobs: done exit 1 # Compile the canonical numeric module directly; Lake target syntax treats `23` as a path. + # This run verifies the final orientation-lemma integration. - name: Compile canonical module run: | set -o pipefail From 3ad43acf478801621bdc47f3ee44339c1c19902f Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 10:06:24 -0700 Subject: [PATCH 26/31] Temporarily normalize remaining SIC omega powers --- .../workflows/fix-sic-pow-normalization.yml | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 .github/workflows/fix-sic-pow-normalization.yml diff --git a/.github/workflows/fix-sic-pow-normalization.yml b/.github/workflows/fix-sic-pow-normalization.yml new file mode 100644 index 0000000000..b902c7fbba --- /dev/null +++ b/.github/workflows/fix-sic-pow-normalization.yml @@ -0,0 +1,89 @@ +name: Fix SIC power normalization + +on: + push: + branches: + - agent/solve-sic-low-dim-v2 + paths: + - '.github/workflows/fix-sic-pow-normalization.yml' + +permissions: + contents: write + +jobs: + patch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: agent/solve-sic-low-dim-v2 + fetch-depth: 0 + - name: Normalize the four remaining omega powers explicitly + run: | + python3 - <<'PY' + from pathlib import Path + path = Path('FormalConjectures/OpenQuantumProblems/23.lean') + text = path.read_text() + + text = text.replace( + ''' rw [star_omega_audit] + simpa only [pow_two, omega_sq_mul_omega_sq_audit] using + normSq_qubit_offdiag_omega_audit''', + ''' rw [star_omega_audit] + have hpow : (ω ^ 2) ^ 2 = ω := by + calc + (ω ^ 2) ^ 2 = ω ^ 4 := by ring + _ = ω := omega_four_audit + rw [hpow] + exact normSq_qubit_offdiag_omega_audit''', + 1) + + text = text.replace( + ''' rw [star_omega_audit] + simpa only [pow_two, omega_sq_mul_omega_sq_audit] using + overlap_three_two_simplified_audit''', + ''' rw [star_omega_audit] + have hpow : (ω ^ 2) ^ 2 = ω := by + calc + (ω ^ 2) ^ 2 = ω ^ 4 := by ring + _ = ω := omega_four_audit + rw [hpow] + exact overlap_three_two_simplified_audit''', + 1) + + text = text.replace( + ''' rw [q3_star_omega] + simpa only [pow_two, q3_omega_sq_mul_omega_sq] using + q3_normSq_half_add_half_mul_omega''', + ''' rw [q3_star_omega] + have hpow : (ω ^ 2) ^ 2 = ω := by + calc + (ω ^ 2) ^ 2 = ω ^ 4 := by ring + _ = ω := q3_omega_four + rw [hpow] + exact q3_normSq_half_add_half_mul_omega''', + 1) + + text = text.replace( + ''' rw [q3_star_omega] + simpa only [pow_two, q3_omega_sq_mul_omega_sq] using + q3_normSq_half_add_hesseS_omega_mul_hesseS_omega''', + ''' rw [q3_star_omega] + have hpow : (ω ^ 2) ^ 2 = ω := by + calc + (ω ^ 2) ^ 2 = ω ^ 4 := by ring + _ = ω := q3_omega_four + rw [hpow] + exact q3_normSq_half_add_hesseS_omega_mul_hesseS_omega''', + 1) + + path.write_text(text) + PY + - name: Commit normalization fix + run: | + rm .github/workflows/fix-sic-pow-normalization.yml + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add FormalConjectures/OpenQuantumProblems/23.lean .github/workflows/fix-sic-pow-normalization.yml + git commit -m 'Normalize remaining SIC omega powers' + git push origin HEAD:agent/solve-sic-low-dim-v2 From fb239c486ecb6a2889a006c175ea3edab6e45c9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 17:06:38 +0000 Subject: [PATCH 27/31] Normalize remaining SIC omega powers --- .../workflows/fix-sic-pow-normalization.yml | 89 ------------------- FormalConjectures/OpenQuantumProblems/23.lean | 32 +++++-- 2 files changed, 24 insertions(+), 97 deletions(-) delete mode 100644 .github/workflows/fix-sic-pow-normalization.yml diff --git a/.github/workflows/fix-sic-pow-normalization.yml b/.github/workflows/fix-sic-pow-normalization.yml deleted file mode 100644 index b902c7fbba..0000000000 --- a/.github/workflows/fix-sic-pow-normalization.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Fix SIC power normalization - -on: - push: - branches: - - agent/solve-sic-low-dim-v2 - paths: - - '.github/workflows/fix-sic-pow-normalization.yml' - -permissions: - contents: write - -jobs: - patch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - ref: agent/solve-sic-low-dim-v2 - fetch-depth: 0 - - name: Normalize the four remaining omega powers explicitly - run: | - python3 - <<'PY' - from pathlib import Path - path = Path('FormalConjectures/OpenQuantumProblems/23.lean') - text = path.read_text() - - text = text.replace( - ''' rw [star_omega_audit] - simpa only [pow_two, omega_sq_mul_omega_sq_audit] using - normSq_qubit_offdiag_omega_audit''', - ''' rw [star_omega_audit] - have hpow : (ω ^ 2) ^ 2 = ω := by - calc - (ω ^ 2) ^ 2 = ω ^ 4 := by ring - _ = ω := omega_four_audit - rw [hpow] - exact normSq_qubit_offdiag_omega_audit''', - 1) - - text = text.replace( - ''' rw [star_omega_audit] - simpa only [pow_two, omega_sq_mul_omega_sq_audit] using - overlap_three_two_simplified_audit''', - ''' rw [star_omega_audit] - have hpow : (ω ^ 2) ^ 2 = ω := by - calc - (ω ^ 2) ^ 2 = ω ^ 4 := by ring - _ = ω := omega_four_audit - rw [hpow] - exact overlap_three_two_simplified_audit''', - 1) - - text = text.replace( - ''' rw [q3_star_omega] - simpa only [pow_two, q3_omega_sq_mul_omega_sq] using - q3_normSq_half_add_half_mul_omega''', - ''' rw [q3_star_omega] - have hpow : (ω ^ 2) ^ 2 = ω := by - calc - (ω ^ 2) ^ 2 = ω ^ 4 := by ring - _ = ω := q3_omega_four - rw [hpow] - exact q3_normSq_half_add_half_mul_omega''', - 1) - - text = text.replace( - ''' rw [q3_star_omega] - simpa only [pow_two, q3_omega_sq_mul_omega_sq] using - q3_normSq_half_add_hesseS_omega_mul_hesseS_omega''', - ''' rw [q3_star_omega] - have hpow : (ω ^ 2) ^ 2 = ω := by - calc - (ω ^ 2) ^ 2 = ω ^ 4 := by ring - _ = ω := q3_omega_four - rw [hpow] - exact q3_normSq_half_add_hesseS_omega_mul_hesseS_omega''', - 1) - - path.write_text(text) - PY - - name: Commit normalization fix - run: | - rm .github/workflows/fix-sic-pow-normalization.yml - git config user.name 'github-actions[bot]' - git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - git add FormalConjectures/OpenQuantumProblems/23.lean .github/workflows/fix-sic-pow-normalization.yml - git commit -m 'Normalize remaining SIC omega powers' - git push origin HEAD:agent/solve-sic-low-dim-v2 diff --git a/FormalConjectures/OpenQuantumProblems/23.lean b/FormalConjectures/OpenQuantumProblems/23.lean index 99e249608d..e2d1278389 100644 --- a/FormalConjectures/OpenQuantumProblems/23.lean +++ b/FormalConjectures/OpenQuantumProblems/23.lean @@ -510,8 +510,12 @@ private lemma explicit_omega_sq_audit : change Complex.normSq ((1 / 3 : ℂ) + (2 / 3 : ℂ) * (star ω) ^ 2) = (1 / 3 : ℝ) rw [star_omega_audit] - simpa only [pow_two, omega_sq_mul_omega_sq_audit] using - normSq_qubit_offdiag_omega_audit + have hpow : (ω ^ 2) ^ 2 = ω := by + calc + (ω ^ 2) ^ 2 = ω ^ 4 := by ring + _ = ω := omega_four_audit + rw [hpow] + exact normSq_qubit_offdiag_omega_audit @[simp] private lemma overlap_three_two_star_pow_audit : Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * @@ -519,8 +523,12 @@ private lemma explicit_omega_sq_audit : change Complex.normSq ((1 / 3 : ℂ) + (tetraB : ℂ) * (star ω) ^ 2 * ((tetraB : ℂ) * ω)) = (1 / 3 : ℝ) rw [star_omega_audit] - simpa only [pow_two, omega_sq_mul_omega_sq_audit] using - overlap_three_two_simplified_audit + have hpow : (ω ^ 2) ^ 2 = ω := by + calc + (ω ^ 2) ^ 2 = ω ^ 4 := by ring + _ = ω := omega_four_audit + rw [hpow] + exact overlap_three_two_simplified_audit /-- The tetrahedral qubit SIC family has the correct constant pairwise overlap. -/ @[category test, AMS 15 47 81] @@ -819,8 +827,12 @@ private lemma q3_explicit_omega_sq : change Complex.normSq ((1 / 2 : ℂ) + (1 / 2 : ℂ) * (star ω) ^ 2) = (1 / 4 : ℝ) rw [q3_star_omega] - simpa only [pow_two, q3_omega_sq_mul_omega_sq] using - q3_normSq_half_add_half_mul_omega + have hpow : (ω ^ 2) ^ 2 = ω := by + calc + (ω ^ 2) ^ 2 = ω ^ 4 := by ring + _ = ω := q3_omega_four + rw [hpow] + exact q3_normSq_half_add_half_mul_omega @[simp] private lemma q3_normSq_half_add_hesseS_star_omega_pow_two_mul_hesseS_omega : Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * @@ -828,8 +840,12 @@ private lemma q3_explicit_omega_sq : change Complex.normSq ((1 / 2 : ℂ) + (hesseS : ℂ) * (star ω) ^ 2 * ((hesseS : ℂ) * ω)) = (1 / 4 : ℝ) rw [q3_star_omega] - simpa only [pow_two, q3_omega_sq_mul_omega_sq] using - q3_normSq_half_add_hesseS_omega_mul_hesseS_omega + have hpow : (ω ^ 2) ^ 2 = ω := by + calc + (ω ^ 2) ^ 2 = ω ^ 4 := by ring + _ = ω := q3_omega_four + rw [hpow] + exact q3_normSq_half_add_hesseS_omega_mul_hesseS_omega @[simp] private lemma q3_normSq_half_mul_omega_sq_add_half : Complex.normSq ((1 / 2 : ℂ) * (ω ^ 2) + (1 / 2 : ℂ)) = From a5abb15de62dd96c40beea273e9d047d7dc77bbe Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 10:07:29 -0700 Subject: [PATCH 28/31] Run SIC audit after power normalization --- .github/workflows/sic-low-dim-audit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index 20bca3a0be..7f0c1f11a4 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -42,7 +42,7 @@ jobs: done exit 1 # Compile the canonical numeric module directly; Lake target syntax treats `23` as a path. - # This run verifies the final orientation-lemma integration. + # This run verifies the explicit omega-power normalization. - name: Compile canonical module run: | set -o pipefail From 06e25cf79bc0a2391821e0a9acbe3ed7382b9f02 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 10:12:12 -0700 Subject: [PATCH 29/31] Audit canonical SIC axioms in-source --- .github/workflows/sic-low-dim-audit.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index 7f0c1f11a4..4943477b7d 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -42,22 +42,22 @@ jobs: done exit 1 # Compile the canonical numeric module directly; Lake target syntax treats `23` as a path. - # This run verifies the explicit omega-power normalization. - name: Compile canonical module run: | set -o pipefail lake env lean FormalConjectures/OpenQuantumProblems/23.lean 2>&1 | tee /tmp/sic-low-dim-compile.log - - name: Audit canonical theorem axioms + - name: Audit canonical theorem axioms in the same compilation if: success() run: | - cat > /tmp/SICLowDimAxioms.lean <<'EOF' - import FormalConjectures.OpenQuantumProblems.«23» + cp FormalConjectures/OpenQuantumProblems/23.lean /tmp/SICLowDimCanonicalAudit.lean + cat >> /tmp/SICLowDimCanonicalAudit.lean <<'EOF' + #print axioms OpenQuantumProblem23.qubitSICFamily_pairwise #print axioms OpenQuantumProblem23.hasSICPOVM_two #print axioms OpenQuantumProblem23.hesseFamily_pairwise #print axioms OpenQuantumProblem23.hasSICPOVM_three EOF - lake env lean /tmp/SICLowDimAxioms.lean 2>&1 | tee /tmp/sic-low-dim-axioms.log + lake env lean /tmp/SICLowDimCanonicalAudit.lean 2>&1 | tee /tmp/sic-low-dim-axioms.log ! grep -E 'sorryAx|Lean\.ofReduceBool|Lean\.trustCompiler' /tmp/sic-low-dim-axioms.log - name: Save partial build cache if: always() From 242697c950bca1a720c65463abf3a1e36861f934 Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 10:15:44 -0700 Subject: [PATCH 30/31] Build local SIC audit dependencies --- .github/workflows/sic-low-dim-audit.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index 4943477b7d..cda5e50fff 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -41,6 +41,10 @@ jobs: sleep 10 done exit 1 + - name: Build local utility dependency + run: | + set -o pipefail + lake build FormalConjecturesUtil 2>&1 | tee /tmp/sic-low-dim-dependency.log # Compile the canonical numeric module directly; Lake target syntax treats `23` as a path. - name: Compile canonical module run: | @@ -73,6 +77,7 @@ jobs: with: name: sic-low-dim-${{ github.run_id }} path: | + /tmp/sic-low-dim-dependency.log /tmp/sic-low-dim-compile.log /tmp/sic-low-dim-axioms.log if-no-files-found: warn From 2fa3fce6819e557822959a17b7f14b3a79fa81ad Mon Sep 17 00:00:00 2001 From: DomTheDeveloper Date: Sun, 26 Jul 2026 10:18:35 -0700 Subject: [PATCH 31/31] Build exact SIC import dependency --- .github/workflows/sic-low-dim-audit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sic-low-dim-audit.yml b/.github/workflows/sic-low-dim-audit.yml index cda5e50fff..8a30628377 100644 --- a/.github/workflows/sic-low-dim-audit.yml +++ b/.github/workflows/sic-low-dim-audit.yml @@ -41,10 +41,10 @@ jobs: sleep 10 done exit 1 - - name: Build local utility dependency + - name: Build exact local import dependency run: | set -o pipefail - lake build FormalConjecturesUtil 2>&1 | tee /tmp/sic-low-dim-dependency.log + lake build FormalConjectures.Util.ProblemImports 2>&1 | tee /tmp/sic-low-dim-dependency.log # Compile the canonical numeric module directly; Lake target syntax treats `23` as a path. - name: Compile canonical module run: |