Repository navigation
Expand file tree
/
Copy pathprocess.json
More file actions
161 lines (161 loc) · 23.4 KB
/
Copy pathprocess.json
File metadata and controls
161 lines (161 loc) · 23.4 KB
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
"runs": [
{
"runId": "3f2c13eb-fbf3-47d4-bff5-aed2489d23aa",
"startedAt": "2026-10-22T19:21:36.545Z",
"finishedAt": "2026-10-22T19:37:43.061Z",
"phase": "finished",
"resultStatus": "evaluated_passed",
"turns": 4,
"workers": 4,
"tasks": [
{
"id": "initial_goal_1",
"theorem": "OAI.HadamardSix.rowRatio_cubeFiber_sum_zero",
"objective": "Deliver the full frozen original theorem using this independently kernel-, source-guard-, and sealed-publisher-comparator-checked reference. Preserve exact original imports, definitions, namespaces and target header. Copy mathematical proof into owned Submission.lean, run check-lean, publish ordinary proof delivery, then require native fixed review and all-target final evaluation. Do not count the external receipt as host acceptance. Reference source follows:\nimport Mathlib",
"status": "integrated",
"attempts": 1,
"dependencies": [],
"proofCommit": "84d892b38fd60e300a5c426d977042984aeebd81",
"checkStatus": "kernel_verified",
"receiptIds": [
"lean-23956e90813a4393b99198f9"
]
}
],
"knowledgeApplications": [],
"review": {
"status": "accepted",
"summary": "The fixed candidate proves OAI.HadamardSix.rowRatio_cubeFiber_sum_zero with the frozen declaration type and imports. The proof derives the first and second moments from row orthogonality, uses unimodularity to get v * star v = 1, and applies the cubic-fibre indicator identity; it compiles with no sorry or admitted subgoal and depends only on propext, Classical.choice, and Quot.sound."
},
"events": [
{
"at": "2026-10-22T19:21:36.573Z",
"kind": "baseline",
"status": "not-assessed",
"message": ""
},
{
"at": "2026-10-22T19:22:51.820Z",
"kind": "plan-edit",
"status": "applied",
"message": "initial_goal_1"
},
{
"at": "2026-10-22T19:22:51.821Z",
"kind": "transition",
"status": "not-assessed",
"message": ""
},
{
"at": "2026-10-22T19:30:11.276Z",
"kind": "transition",
"status": "not-assessed",
"message": ""
},
{
"at": "2026-10-22T19:30:32.404Z",
"kind": "lean-check",
"taskId": "initial_goal_1",
"status": "kernel_verified"
},
{
"at": "2026-10-22T19:30:32.463Z",
"kind": "transition",
"status": "not-assessed",
"message": ""
}
],
"checks": [
{
"id": "check-49c40fde2a52cf6b2b27",
"at": "2026-10-22T19:30:11.216Z",
"scope": "task",
"taskId": "initial_goal_1",
"commit": "a5e0fdcb8f689a0990e10e83f8a8b1e240775450",
"status": "kernel_verified",
"receiptIds": [
"lean-755b9ba8bc189dbd347db761"
],
"diagnostics": "OAI.HadamardSix.rowRatio_cubeFiber_sum_zero {H : OAI.HadamardSix.Matrix6} (hH : OAI.HadamardSix.IsComplexHadamard H)\n (hs : OAI.HadamardSix.IsComplexHadamard (OAI.HadamardSix.entrywiseSquare H)) {i j : OAI.HadamardSix.Index}\n (hij : i ≠ j) (a b : ℂ) (hne : a ≠ b)\n (hab :\n ∀ (k : OAI.HadamardSix.Index),\n OAI.HadamardSix.rowRatio H i j k ^ 3 = a ∨ OAI.HadamardSix.rowRatio H i j k ^ 3 = b) :\n ∑ k ∈ OAI.HadamardSix.cubeFiber (OAI.HadamardSix.rowRatio H i j) a, H i k * star (H j k) = 0\n'OAI.HadamardSix.rowRatio_cubeFiber_sum_zero' depends on axioms: [propext, Classical.choice, Quot.sound]",
"sourceDigest": "e5efcc24b920e2ef54aa890c9d131d8f8aee5230f23f7e46b0d26f6325eb6f9a"
},
{
"id": "check-4ca8f5e41f175aa59c17",
"at": "2026-10-22T19:30:32.404Z",
"scope": "task",
"taskId": "initial_goal_1",
"commit": "92e47d0a3dcbadc0c2613d9957c624e2643d5c0e",
"status": "kernel_verified",
"receiptIds": [
"lean-23956e90813a4393b99198f9"
],
"diagnostics": "OAI.HadamardSix.rowRatio_cubeFiber_sum_zero {H : OAI.HadamardSix.Matrix6} (hH : OAI.HadamardSix.IsComplexHadamard H)\n (hs : OAI.HadamardSix.IsComplexHadamard (OAI.HadamardSix.entrywiseSquare H)) {i j : OAI.HadamardSix.Index}\n (hij : i ≠ j) (a b : ℂ) (hne : a ≠ b)\n (hab :\n ∀ (k : OAI.HadamardSix.Index),\n OAI.HadamardSix.rowRatio H i j k ^ 3 = a ∨ OAI.HadamardSix.rowRatio H i j k ^ 3 = b) :\n ∑ k ∈ OAI.HadamardSix.cubeFiber (OAI.HadamardSix.rowRatio H i j) a, H i k * star (H j k) = 0\n'OAI.HadamardSix.rowRatio_cubeFiber_sum_zero' depends on axioms: [propext, Classical.choice, Quot.sound]",
"sourceDigest": "c90a9b049352bd0d3fbc1a3ae3a6bcc1e36696fa0a4db0be5fe8d81fad2ee35a"
},
{
"id": "check-2569016300b5c39ae71c",
"at": "2026-10-22T19:30:52.823Z",
"scope": "original",
"commit": "be3ac1e85859e7f88229dd3eab02a492b9ca2d5a",
"status": "kernel_verified",
"receiptIds": [
"lean-56712d405ce90b7537a528c4"
],
"diagnostics": "OAI.HadamardSix.rowRatio_cubeFiber_sum_zero {H : OAI.HadamardSix.Matrix6} (hH : OAI.HadamardSix.IsComplexHadamard H)\n (hs : OAI.HadamardSix.IsComplexHadamard (OAI.HadamardSix.entrywiseSquare H)) {i j : OAI.HadamardSix.Index}\n (hij : i ≠ j) (a b : ℂ) (hne : a ≠ b)\n (hab :\n ∀ (k : OAI.HadamardSix.Index),\n OAI.HadamardSix.rowRatio H i j k ^ 3 = a ∨ OAI.HadamardSix.rowRatio H i j k ^ 3 = b) :\n ∑ k ∈ OAI.HadamardSix.cubeFiber (OAI.HadamardSix.rowRatio H i j) a, H i k * star (H j k) = 0\n'OAI.HadamardSix.rowRatio_cubeFiber_sum_zero' depends on axioms: [propext, Classical.choice, Quot.sound]",
"sourceDigest": "d818e4c8217e53057b254f92285bb22930f2b47504ed68d7e8def9d2547fa3a1"
}
],
"deliveries": [
{
"id": "3778f8c1-6399-465f-b1fb-bfffa64bceff",
"at": "2026-10-22T19:29:10.560Z",
"kind": "progress",
"status": "advisory",
"taskId": "initial_goal_1",
"workerId": "researcher-1",
"role": "researcher",
"summary": "Complete kernel-checked Lean proof of OAI.HadamardSix.rowRatio_cubeFiber_sum_zero; Submission.lean compiles with no sorry and check-lean exits 0 (captureComplete true, sourceDigest 8f29f1b46b938bae918e539ae67bd45ee2864682961f7f6825cf8e49a72daf87)."
},
{
"id": "3e7eae39-ed4d-476e-8543-2428de0bf26a",
"at": "2026-10-22T19:30:52.835Z",
"kind": "proof",
"status": "verified",
"taskId": "initial_goal_1",
"workerId": "researcher-1",
"role": "researcher",
"commit": "84d892b38fd60e300a5c426d977042984aeebd81",
"summary": "Fixed declaration checked; unresolved lemma assumptions remain obligations."
},
{
"id": "088446aa-ce23-4c0a-9d25-4909137192d6",
"at": "2026-10-22T19:37:43.010Z",
"kind": "review",
"status": "accepted",
"workerId": "researcher-1",
"role": "researcher",
"commit": "be3ac1e85859e7f88229dd3eab02a492b9ca2d5a",
"summary": "The fixed candidate proves OAI.HadamardSix.rowRatio_cubeFiber_sum_zero with the frozen declaration type and imports. The proof derives the first and second moments from row orthogonality, uses unimodularity to get v * star v = 1, and applies the cubic-fibre indicator identity; it compiles with no sorry or admitted subgoal and depends only on propext, Classical.choice, and Quot.sound."
}
]
}
],
"sources": {
"e5efcc24b920e2ef54aa890c9d131d8f8aee5230f23f7e46b0d26f6325eb6f9a": {
"path": "Submission.lean",
"code": "import Mathlib\n\nnamespace OAI\n\n \n\nopen scoped BigOperators Matrix\n\nnamespace HadamardSix\n\nabbrev Index := Fin 6\nabbrev Matrix6 := Matrix Index Index ℂ\n\ndef Unimodular (H : Matrix6) : Prop := ∀ i j, ‖H i j‖ = 1\n\ndef IsComplexHadamard (H : Matrix6) : Prop :=\n Unimodular H ∧ H.conjTranspose * H = (6 : ℂ) • (1 : Matrix6)\n\ndef entrywiseSquare (H : Matrix6) : Matrix6 := fun i j => H i j ^ 2\n\nnoncomputable def cubeFiber (v : Index → ℂ) (z : ℂ) : Finset Index := by\n classical\n exact Finset.univ.filter (fun i => v i ^ 3 = z)\n\nnoncomputable def rowRatio (H : Matrix6) (i j : Index) : Index → ℂ :=\n fun k => H i k * star (H j k)\n\nlemma rowRatio_cubeFiber_sum_zero {H : Matrix6} (hH : IsComplexHadamard H)\n (hs : IsComplexHadamard (entrywiseSquare H)) {i j : Index} (hij : i ≠ j)\n (a b : ℂ) (hne : a ≠ b)\n (hab : ∀ k, rowRatio H i j k ^ 3 = a ∨ rowRatio H i j k ^ 3 = b) :\n ∑ k ∈ cubeFiber (rowRatio H i j) a, H i k * star (H j k) = 0 := by\n classical\n have hrow_orthogonality : H * H.conjTranspose = (6 : ℂ) • (1 : Matrix6) := by\n have hl : ((6 : ℂ)⁻¹ • H.conjTranspose) * H = 1 := by\n rw [Matrix.smul_mul, hH.2, smul_smul]\n norm_num\n have hr : H * ((6 : ℂ)⁻¹ • H.conjTranspose) = 1 := mul_eq_one_comm.mp hl\n calc\n H * H.conjTranspose =\n (6 : ℂ) • (H * ((6 : ℂ)⁻¹ • H.conjTranspose)) := by\n rw [Matrix.mul_smul, smul_smul]\n norm_num\n _ = (6 : ℂ) • (1 : Matrix6) := by rw [hr]\n have hfirst : ∑ k, rowRatio H i j k = 0 := by\n have h := congrArg (fun M : Matrix6 ↦ M i j) hrow_orthogonality\n simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.smul_apply,\n Matrix.one_apply, smul_eq_mul] at h\n simpa [rowRatio, hij] using h\n have hsecond : ∑ k, rowRatio H i j k ^ 2 = 0 := by\n \n have h' : ∑ k, entrywiseSquare H i k * star (entrywiseSquare H j k) = 0 := by\n have horth : entrywiseSquare H * (entrywiseSquare H).conjTranspose =\n (6 : ℂ) • (1 : Matrix6) := by\n have hl : ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose) *\n entrywiseSquare H = 1 := by\n rw [Matrix.smul_mul, hs.2, smul_smul]\n norm_num\n have hr : entrywiseSquare H *\n ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose) = 1 :=\n mul_eq_one_comm.mp hl\n calc\n entrywiseSquare H * (entrywiseSquare H).conjTranspose =\n (6 : ℂ) • (entrywiseSquare H *\n ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose)) := by\n rw [Matrix.mul_smul, smul_smul]\n norm_num\n _ = (6 : ℂ) • (1 : Matrix6) := by rw [hr]\n have h := congrArg (fun M : Matrix6 ↦ M i j) horth\n simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.smul_apply,\n Matrix.one_apply, smul_eq_mul] at h\n simpa [rowRatio, hij] using h\n simpa [rowRatio, entrywiseSquare, mul_pow, star_pow] using h'\n have hu : ∀ k, rowRatio H i j k * star (rowRatio H i j k) = 1 := by\n intro k\n have hnorm : ‖rowRatio H i j k‖ = 1 := by\n simp [rowRatio, hH.1 i k, hH.1 j k]\n have hsq := Complex.mul_conj' (rowRatio H i j k)\n rw [Complex.star_def, hsq, hnorm]\n norm_num\n have hmain : ∀ (v : Index → ℂ), (∀ k, v k * star (v k) = 1) →\n (∑ k, v k = 0) → (∑ k, v k ^ 2 = 0) → ∀ (c d : ℂ), c ≠ d →\n (∀ k, v k ^ 3 = c ∨ v k ^ 3 = d) →\n ∑ k ∈ cubeFiber v c, v k = 0 := by\n intro v hu hfirst hsecond c d hne hab\n have hstar : ∑ k, (star (v k)) ^ 2 = 0 := by\n simpa only [star_sum, star_pow, star_zero] using congrArg star hsecond\n have hpoint (k : Index) :\n (if v k ^ 3 = c then (c - d) * v k else 0) =\n c * (v k - d * (star (v k)) ^ 2) := by\n have hz : v k ^ 3 * (star (v k)) ^ 2 = v k := by\n have h : v k ^ 3 * (star (v k)) ^ 2 =\n v k * (v k * star (v k)) ^ 2 := by ring\n rw [h, hu k]\n ring\n rcases hab k with ha | hb\n · rw [ha] at hz\n rw [ite_eq_left ha]\n linear_combination d * hz\n · have hna : v k ^ 3 ≠ c := by rw [hb]; exact Ne.symm hne\n rw [hb] at hz\n rw [ite_eq_right hna]\n linear_combination c * hz\n have hsum := Finset.sum_congr (s₁ := Finset.univ) rfl (fun k _ ↦ hpoint k)\n have hrhs : (∑ k, c * (v k - d * (star (v k)) ^ 2)) = 0 := by\n rw [← Finset.mul_sum, Finset.sum_sub_distrib, ← Finset.mul_sum, hfirst, hstar]\n ring\n have hlhs : (c - d) * ∑ k ∈ cubeFiber v c, v k =\n ∑ k, if v k ^ 3 = c then (c - d) * v k else 0 := by\n rw [cubeFiber, Finset.mul_sum, Finset.sum_filter]\n have hmul : (c - d) * ∑ k ∈ cubeFiber v c, v k = 0 := by\n rw [hlhs, hsum, hrhs]\n exact (mul_eq_zero.mp hmul).resolve_left (sub_ne_zero.mpr hne)\n exact hmain (rowRatio H i j) hu hfirst hsecond a b hne hab\n\nend HadamardSix\n\nend OAI\n",
"sha256": "e5efcc24b920e2ef54aa890c9d131d8f8aee5230f23f7e46b0d26f6325eb6f9a"
},
"c90a9b049352bd0d3fbc1a3ae3a6bcc1e36696fa0a4db0be5fe8d81fad2ee35a": {
"path": "Submission.lean",
"code": "import Mathlib\n\nnamespace OAI\n\n \n\nopen scoped BigOperators Matrix\n\nnamespace HadamardSix\n\nabbrev Index := Fin 6\nabbrev Matrix6 := Matrix Index Index ℂ\n\ndef Unimodular (H : Matrix6) : Prop := ∀ i j, ‖H i j‖ = 1\n\ndef IsComplexHadamard (H : Matrix6) : Prop :=\n Unimodular H ∧ H.conjTranspose * H = (6 : ℂ) • (1 : Matrix6)\n\ndef entrywiseSquare (H : Matrix6) : Matrix6 := fun i j => H i j ^ 2\n\nnoncomputable def cubeFiber (v : Index → ℂ) (z : ℂ) : Finset Index := by\n classical\n exact Finset.univ.filter (fun i => v i ^ 3 = z)\n\nnoncomputable def rowRatio (H : Matrix6) (i j : Index) : Index → ℂ :=\n fun k => H i k * star (H j k)\n\nlemma rowRatio_cubeFiber_sum_zero {H : Matrix6} (hH : IsComplexHadamard H)\n (hs : IsComplexHadamard (entrywiseSquare H)) {i j : Index} (hij : i ≠ j)\n (a b : ℂ) (hne : a ≠ b)\n (hab : ∀ k, rowRatio H i j k ^ 3 = a ∨ rowRatio H i j k ^ 3 = b) :\n ∑ k ∈ cubeFiber (rowRatio H i j) a, H i k * star (H j k) = 0 := by\n classical\n have hrow_orthogonality : H * H.conjTranspose = (6 : ℂ) • (1 : Matrix6) := by\n have hl : ((6 : ℂ)⁻¹ • H.conjTranspose) * H = 1 := by\n rw [Matrix.smul_mul, hH.2, smul_smul]\n norm_num\n have hr : H * ((6 : ℂ)⁻¹ • H.conjTranspose) = 1 := mul_eq_one_comm.mp hl\n calc\n H * H.conjTranspose =\n (6 : ℂ) • (H * ((6 : ℂ)⁻¹ • H.conjTranspose)) := by\n rw [Matrix.mul_smul, smul_smul]\n norm_num\n _ = (6 : ℂ) • (1 : Matrix6) := by rw [hr]\n have hfirst : ∑ k, rowRatio H i j k = 0 := by\n have h := congrArg (fun M : Matrix6 ↦ M i j) hrow_orthogonality\n simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.smul_apply,\n Matrix.one_apply, smul_eq_mul] at h\n simpa [rowRatio, hij] using h\n have hsecond : ∑ k, rowRatio H i j k ^ 2 = 0 := by\n \n have h' : ∑ k, entrywiseSquare H i k * star (entrywiseSquare H j k) = 0 := by\n have horth : entrywiseSquare H * (entrywiseSquare H).conjTranspose =\n (6 : ℂ) • (1 : Matrix6) := by\n have hl : ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose) *\n entrywiseSquare H = 1 := by\n rw [Matrix.smul_mul, hs.2, smul_smul]\n norm_num\n have hr : entrywiseSquare H *\n ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose) = 1 :=\n mul_eq_one_comm.mp hl\n calc\n entrywiseSquare H * (entrywiseSquare H).conjTranspose =\n (6 : ℂ) • (entrywiseSquare H *\n ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose)) := by\n rw [Matrix.mul_smul, smul_smul]\n norm_num\n _ = (6 : ℂ) • (1 : Matrix6) := by rw [hr]\n have h := congrArg (fun M : Matrix6 ↦ M i j) horth\n simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.smul_apply,\n Matrix.one_apply, smul_eq_mul] at h\n simpa [rowRatio, hij] using h\n simpa [rowRatio, entrywiseSquare, mul_pow, star_pow] using h'\n have hu : ∀ k, rowRatio H i j k * star (rowRatio H i j k) = 1 := by\n intro k\n have hnorm : ‖rowRatio H i j k‖ = 1 := by\n simp [rowRatio, hH.1 i k, hH.1 j k]\n have hsq := Complex.mul_conj' (rowRatio H i j k)\n rw [Complex.star_def, hsq, hnorm]\n norm_num\n have hmain : ∀ (v : Index → ℂ), (∀ k, v k * star (v k) = 1) →\n (∑ k, v k = 0) → (∑ k, v k ^ 2 = 0) → ∀ (c d : ℂ), c ≠ d →\n (∀ k, v k ^ 3 = c ∨ v k ^ 3 = d) →\n ∑ k ∈ cubeFiber v c, v k = 0 := by\n intro v hu hfirst hsecond c d hne hab\n have hstar : ∑ k, (star (v k)) ^ 2 = 0 := by\n simpa only [star_sum, star_pow, star_zero] using congrArg star hsecond\n have hpoint (k : Index) :\n (if v k ^ 3 = c then (c - d) * v k else 0) =\n c * (v k - d * (star (v k)) ^ 2) := by\n have hz : v k ^ 3 * (star (v k)) ^ 2 = v k := by\n have h : v k ^ 3 * (star (v k)) ^ 2 =\n v k * (v k * star (v k)) ^ 2 := by ring\n rw [h, hu k]\n ring\n rcases hab k with ha | hb\n · rw [ha] at hz\n rw [ite_eq_left ha]\n linear_combination d * hz\n · have hna : v k ^ 3 ≠ c := by rw [hb]; exact Ne.symm hne\n rw [hb] at hz\n rw [ite_eq_right hna]\n linear_combination c * hz\n have hsum := Finset.sum_congr (s₁ := Finset.univ) rfl (fun k _ ↦ hpoint k)\n have hrhs : (∑ k, c * (v k - d * (star (v k)) ^ 2)) = 0 := by\n rw [← Finset.mul_sum, Finset.sum_sub_distrib, ← Finset.mul_sum, hfirst, hstar]\n ring\n have hlhs : (c - d) * ∑ k ∈ cubeFiber v c, v k =\n ∑ k, if v k ^ 3 = c then (c - d) * v k else 0 := by\n rw [cubeFiber, Finset.mul_sum, Finset.sum_filter]\n have hmul : (c - d) * ∑ k ∈ cubeFiber v c, v k = 0 := by\n rw [hlhs, hsum, hrhs]\n exact (mul_eq_zero.mp hmul).resolve_left (sub_ne_zero.mpr hne)\n exact hmain (rowRatio H i j) hu hfirst hsecond a b hne hab\nend HadamardSix\n\nend OAI\n",
"sha256": "c90a9b049352bd0d3fbc1a3ae3a6bcc1e36696fa0a4db0be5fe8d81fad2ee35a"
},
"d818e4c8217e53057b254f92285bb22930f2b47504ed68d7e8def9d2547fa3a1": {
"path": "Submission.lean",
"code": "import Mathlib\n\nnamespace OAI\n\n/-! Cancellation of row ratios on a prescribed cubic fibre. -/\n\nopen scoped BigOperators Matrix\n\nnamespace HadamardSix\n\nabbrev Index := Fin 6\nabbrev Matrix6 := Matrix Index Index ℂ\n\ndef Unimodular (H : Matrix6) : Prop := ∀ i j, ‖H i j‖ = 1\n\ndef IsComplexHadamard (H : Matrix6) : Prop :=\n Unimodular H ∧ H.conjTranspose * H = (6 : ℂ) • (1 : Matrix6)\n\ndef entrywiseSquare (H : Matrix6) : Matrix6 := fun i j => H i j ^ 2\n\nnoncomputable def cubeFiber (v : Index → ℂ) (z : ℂ) : Finset Index := by\n classical\n exact Finset.univ.filter (fun i => v i ^ 3 = z)\n\nnoncomputable def rowRatio (H : Matrix6) (i j : Index) : Index → ℂ :=\n fun k => H i k * star (H j k)\n\nlemma rowRatio_cubeFiber_sum_zero {H : Matrix6} (hH : IsComplexHadamard H)\n (hs : IsComplexHadamard (entrywiseSquare H)) {i j : Index} (hij : i ≠ j)\n (a b : ℂ) (hne : a ≠ b)\n (hab : ∀ k, rowRatio H i j k ^ 3 = a ∨ rowRatio H i j k ^ 3 = b) :\n ∑ k ∈ cubeFiber (rowRatio H i j) a, H i k * star (H j k) = 0 := by\n classical\n have hrow_orthogonality : H * H.conjTranspose = (6 : ℂ) • (1 : Matrix6) := by\n have hl : ((6 : ℂ)⁻¹ • H.conjTranspose) * H = 1 := by\n rw [Matrix.smul_mul, hH.2, smul_smul]\n norm_num\n have hr : H * ((6 : ℂ)⁻¹ • H.conjTranspose) = 1 := mul_eq_one_comm.mp hl\n calc\n H * H.conjTranspose =\n (6 : ℂ) • (H * ((6 : ℂ)⁻¹ • H.conjTranspose)) := by\n rw [Matrix.mul_smul, smul_smul]\n norm_num\n _ = (6 : ℂ) • (1 : Matrix6) := by rw [hr]\n have hfirst : ∑ k, rowRatio H i j k = 0 := by\n have h := congrArg (fun M : Matrix6 ↦ M i j) hrow_orthogonality\n simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.smul_apply,\n Matrix.one_apply, smul_eq_mul] at h\n simpa [rowRatio, hij] using h\n have hsecond : ∑ k, rowRatio H i j k ^ 2 = 0 := by\n -- The first moment for the entrywise square of `H`.\n have h' : ∑ k, entrywiseSquare H i k * star (entrywiseSquare H j k) = 0 := by\n have horth : entrywiseSquare H * (entrywiseSquare H).conjTranspose =\n (6 : ℂ) • (1 : Matrix6) := by\n have hl : ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose) *\n entrywiseSquare H = 1 := by\n rw [Matrix.smul_mul, hs.2, smul_smul]\n norm_num\n have hr : entrywiseSquare H *\n ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose) = 1 :=\n mul_eq_one_comm.mp hl\n calc\n entrywiseSquare H * (entrywiseSquare H).conjTranspose =\n (6 : ℂ) • (entrywiseSquare H *\n ((6 : ℂ)⁻¹ • (entrywiseSquare H).conjTranspose)) := by\n rw [Matrix.mul_smul, smul_smul]\n norm_num\n _ = (6 : ℂ) • (1 : Matrix6) := by rw [hr]\n have h := congrArg (fun M : Matrix6 ↦ M i j) horth\n simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.smul_apply,\n Matrix.one_apply, smul_eq_mul] at h\n simpa [rowRatio, hij] using h\n simpa [rowRatio, entrywiseSquare, mul_pow, star_pow] using h'\n have hu : ∀ k, rowRatio H i j k * star (rowRatio H i j k) = 1 := by\n intro k\n have hnorm : ‖rowRatio H i j k‖ = 1 := by\n simp [rowRatio, hH.1 i k, hH.1 j k]\n have hsq := Complex.mul_conj' (rowRatio H i j k)\n rw [Complex.star_def, hsq, hnorm]\n norm_num\n have hmain : ∀ (v : Index → ℂ), (∀ k, v k * star (v k) = 1) →\n (∑ k, v k = 0) → (∑ k, v k ^ 2 = 0) → ∀ (c d : ℂ), c ≠ d →\n (∀ k, v k ^ 3 = c ∨ v k ^ 3 = d) →\n ∑ k ∈ cubeFiber v c, v k = 0 := by\n intro v hu hfirst hsecond c d hne hab\n have hstar : ∑ k, (star (v k)) ^ 2 = 0 := by\n simpa only [star_sum, star_pow, star_zero] using congrArg star hsecond\n have hpoint (k : Index) :\n (if v k ^ 3 = c then (c - d) * v k else 0) =\n c * (v k - d * (star (v k)) ^ 2) := by\n have hz : v k ^ 3 * (star (v k)) ^ 2 = v k := by\n have h : v k ^ 3 * (star (v k)) ^ 2 =\n v k * (v k * star (v k)) ^ 2 := by ring\n rw [h, hu k]\n ring\n rcases hab k with ha | hb\n · rw [ha] at hz\n rw [ite_eq_left ha]\n linear_combination d * hz\n · have hna : v k ^ 3 ≠ c := by rw [hb]; exact Ne.symm hne\n rw [hb] at hz\n rw [ite_eq_right hna]\n linear_combination c * hz\n have hsum := Finset.sum_congr (s₁ := Finset.univ) rfl (fun k _ ↦ hpoint k)\n have hrhs : (∑ k, c * (v k - d * (star (v k)) ^ 2)) = 0 := by\n rw [← Finset.mul_sum, Finset.sum_sub_distrib, ← Finset.mul_sum, hfirst, hstar]\n ring\n have hlhs : (c - d) * ∑ k ∈ cubeFiber v c, v k =\n ∑ k, if v k ^ 3 = c then (c - d) * v k else 0 := by\n rw [cubeFiber, Finset.mul_sum, Finset.sum_filter]\n have hmul : (c - d) * ∑ k ∈ cubeFiber v c, v k = 0 := by\n rw [hlhs, hsum, hrhs]\n exact (mul_eq_zero.mp hmul).resolve_left (sub_ne_zero.mpr hne)\n exact hmain (rowRatio H i j) hu hfirst hsecond a b hne hab\nend HadamardSix\n\nend OAI\n",
"sha256": "d818e4c8217e53057b254f92285bb22930f2b47504ed68d7e8def9d2547fa3a1"
}
}
}