Accepted proof145 lines of Lean 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145 import FormalConjectures.OpenQuantumProblems.«23»
namespace Submission
open OpenQuantumProblem23
theorem hs3 : Real.sqrt 3 ^ 2 = 3 := Real.sq_sqrt (by norm_num)
theorem hω2 : ω ^ 2 = ((-1 / 2 : ℝ) : ℂ) + ((-(Real.sqrt 3 / 2) : ℝ) : ℂ) * Complex.I := by
apply Complex.ext
· rw [pow_two, Complex.mul_re]
simp [ω] <;> nlinarith [hs3]
· rw [pow_two, Complex.mul_im]
simp [ω] <;> ring
theorem hh2 : hesseS ^ 2 = 1 / 2 := by unfold hesseS; exact Real.sq_sqrt (by norm_num)
theorem hh4 : hesseS ^ 4 = 1 / 4 := by
rw [show hesseS ^ 4 = (hesseS ^ 2) ^ 2 by ring, hh2]; norm_num
theorem hs34 : Real.sqrt 3 ^ 4 = 9 := by
rw [show Real.sqrt 3 ^ 4 = (Real.sqrt 3 ^ 2) ^ 2 by ring, hs3]; norm_num
theorem hs33 : Real.sqrt 3 ^ 3 = 3 * Real.sqrt 3 := by
rw [show Real.sqrt 3 ^ 3 = Real.sqrt 3 ^ 2 * Real.sqrt 3 by ring, hs3]
set_option maxHeartbeats 1000000 in
theorem row0 (j : Fin 9) (hij : (0 : Fin 9) ≠ j) :
overlapSq (hesseFamily 0) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
set_option maxHeartbeats 1000000 in
theorem row1 (j : Fin 9) (hij : (1 : Fin 9) ≠ j) :
overlapSq (hesseFamily 1) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
set_option maxHeartbeats 1000000 in
theorem row2 (j : Fin 9) (hij : (2 : Fin 9) ≠ j) :
overlapSq (hesseFamily 2) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
set_option maxHeartbeats 1000000 in
theorem row3 (j : Fin 9) (hij : (3 : Fin 9) ≠ j) :
overlapSq (hesseFamily 3) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
set_option maxHeartbeats 1000000 in
theorem row4 (j : Fin 9) (hij : (4 : Fin 9) ≠ j) :
overlapSq (hesseFamily 4) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
set_option maxHeartbeats 1000000 in
theorem row5 (j : Fin 9) (hij : (5 : Fin 9) ≠ j) :
overlapSq (hesseFamily 5) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
set_option maxHeartbeats 1000000 in
theorem row6 (j : Fin 9) (hij : (6 : Fin 9) ≠ j) :
overlapSq (hesseFamily 6) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
set_option maxHeartbeats 1000000 in
theorem row7 (j : Fin 9) (hij : (7 : Fin 9) ≠ j) :
overlapSq (hesseFamily 7) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
set_option maxHeartbeats 1000000 in
theorem row8 (j : Fin 9) (hij : (8 : Fin 9) ≠ j) :
overlapSq (hesseFamily 8) (hesseFamily j) = sicOverlapSq 3 := by
fin_cases j
all_goals first
| exact absurd rfl hij
| (simp [overlapSq, hesseFamily, vec3, Fin.sum_univ_three, hω2] <;>
simp [ω, Complex.normSq_apply, sicOverlapSq_three] <;>
(try ring_nf) <;>
(try simp only [hh2, hh4, hs3, hs34, hs33]) <;>
norm_num <;> nlinarith [hs3, hs34, hs33, hh2, hh4])
theorem pairwise3 : HasConstantOverlapSq (sicOverlapSq 3) hesseFamily := by
intro i j hij
fin_cases i
· exact row0 j hij
· exact row1 j hij
· exact row2 j hij
· exact row3 j hij
· exact row4 j hij
· exact row5 j hij
· exact row6 j hij
· exact row7 j hij
· exact row8 j hij
theorem solution : type_of% @OpenQuantumProblem23.hasSICPOVM_three :=
⟨hesseFamily, hesseFamily_normalized, pairwise3⟩
end Submission
Check it yourself
Project formal-conjectures
Commit f606af160664c5a10952e9a957b100a1cd45bbeb
Lean leanprover/lean4:v4.33.1
Mathlib 0df444a360eaa60ab8c11dca51a86af692955474 With Git and Elan installed, put the download in a fresh working directory and run this there. Use a disposable environment. Lean prints the axioms at the end. The checker allows propext, Classical.choice, and Quot.sound.
(
set -eu
proof="$PWD/f9f8b0f4-94e5-4eca-9364-6eee7d17bc8f.lean"
git clone https://github.com/google-deepmind/formal-conjectures.git formal-conjectures
git -C formal-conjectures checkout --detach f606af160664c5a10952e9a957b100a1cd45bbeb
cd formal-conjectures
elan toolchain install leanprover/lean4:v4.33.1
lake +leanprover/lean4:v4.33.1 exe cache get
lake +leanprover/lean4:v4.33.1 build '+FormalConjectures.OpenQuantumProblems.«23»'
check_dir="$(mktemp -d)"
trap 'rm -f "$check_dir/Check.lean"; rmdir "$check_dir"' EXIT
printf "%s\n" "import Lean" > "$check_dir/Check.lean"
cat "$proof" >> "$check_dir/Check.lean"
cat >> "$check_dir/Check.lean" <<'SOLVE_CHECK'
example : type_of% @_root_.OpenQuantumProblem23.hasSICPOVM_three := @_root_.Submission.solution
#print axioms Submission.solution
SOLVE_CHECK
lake +leanprover/lean4:v4.33.1 env lean "$check_dir/Check.lean"
)Copy command Download the receipt verifier and public key . Run python3 verify-proof.py certificate.json f9f8b0f4-94e5-4eca-9364-6eee7d17bc8f.lean proof-key.pem with OpenSSL 3.