-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_formatting_docs.py
More file actions
393 lines (297 loc) · 15.2 KB
/
create_formatting_docs.py
File metadata and controls
393 lines (297 loc) · 15.2 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# Script to create all formatting deliverable docs for Tasks 6-11, 13-20
import os
docs_dir = r'docs'
os.makedirs(docs_dir, exist_ok=True)
files = {
'abstract_shortening_revision.md': '''# Deliverable: abstract_shortening_revision.md
# Task 6 — Shorten Abstract to 180-250 Words
## Replacement Abstract (205 words)
We verify that the Riemann--Jacobi kernel $\\Phi(u)$, appearing in the cosine
transform representation $\\Xi(t) = \\int_0^\\infty \\Phi(u)\\cos(tu)\\,du$ of the
Riemann Xi function, is strictly log-concave on $[0,\\infty)$.
Subject to the cited form of Pólya's 1927 theorem, this implies that all zeros
of $\\Xi(t)$ are real, equivalently the Riemann Hypothesis.
The proof has four components: an elementary algebraic core for the dominant term
$\\varphi_1$; rigorous interval arithmetic certifying $Q_\\Phi < 0$ on $[0,1]$
across 52,898 subintervals at 60-digit precision (independently verified by
Arb/FLINT); a no-cancellation algebraic approach certifying $(\\log\\Phi)'' < 0$
on $[1.0, 3.0]$ across 101 overlapping interval checks; and an explicit
monotonicity-based tail bound covering $[3.0,\\infty)$.
All computational claims are accompanied by reproducible Python scripts,
certificate JSON files with SHA256 hashes, and a corrected tail prefactor
(using $2n^4$ in place of the invalid $n^4$ bound). A Lean 4 formalization
verifies the algebraic core and records external dependencies as explicit
axioms with zero \\texttt{sorry} declarations. All proof-critical dependencies
are identified in a separate table; the remaining non-formalized inputs are
Pólya's theorem, the Fourier representation of $\\Xi$, and the computational
certificates, which have not yet been derived inside Lean.
## Removed from abstract
- Detailed Lean build information (moved to Section 12)
- CvS spectral paragraph (moved to Appendix A)
- Code identifier list (moved to Section 12)
- Falsification-suite details (kept in Section 11)
''',
'remove_cvs_from_abstract.md': '''# Deliverable: remove_cvs_from_abstract.md
# Task 7 — Remove CvS/Spectral Paragraph from Abstract
## Required change
Remove from abstract:
> "We also provide new independent numerical evidence for the CvS spectral framework..."
> (entire paragraph about eigenvectors, overlaps, Sliwinski bound)
Replace with single sentence at end of abstract or omit entirely.
Suggested single sentence if any trace is needed:
> "Additional contextual comparisons with the Connes--van Suijlekom spectral
> framework are collected in Appendix A."
Or simply omit entirely — the paper stands without it.
## Rationale
The abstract should focus on the proof chain. CvS material is interesting but
peripheral. A specialist reviewer will focus on the Fourier/Pólya structure,
not spectral theory.
''',
'certificate_hash_formatting_fix.md': '''# Deliverable: certificate_hash_formatting_fix.md
# Task 8 — Fix Certificate Hash Table Formatting
## Option B (recommended): Label as prefixes explicitly
Change the column header from:
"SHA256 (full 64 hex, see docs/certificate_hash_table.md)"
To:
"SHA256 prefix (16 chars); full hashes in docs/certificate\\_hash\\_table.md"
Then add below the table:
> The SHA256 column shows 16-character prefixes for readability. Full 64-character
> hashes are in \\texttt{docs/certificate\\_hash\\_table.md}. Updated certificate for
> \\texttt{verify\\_ia\\_1\\_to\\_3.json}: \\texttt{1BB9E9DECF13580C...}
## Full updated hashes
C4 (verify_logconcavity_rigorous.json): 0D0841DAB32396D9...
C4b (verify_logconcavity_arb.json): 974B67CC58B96117...
C5 (verify_ia_1_to_3.json): 1BB9E9DECF13580C... [NEW — corrected epsilon]
Main (proof_certificate_v2.json): 8B538345D589638A...
''',
'appendix_b_table_formatting.md': '''# Deliverable: appendix_b_table_formatting.md
# Task 9 — Improve Appendix B Certificate Table
## Required changes
1. Add lmodern and microtype to preamble for better text rendering
2. Use tabularx or p-column widths to prevent script name overflow
3. Split C3 into three rows (C3a, C3b, C3c) for Phi>0, Phi even, Phi in L1
4. Update C5 to reference verify_ia_1_to_3.py and corrected epsilon
## LaTeX replacement for Appendix B table
\\begin{center}\\small
\\begin{tabular}{@{}p{0.5cm}p{3.0cm}p{1.8cm}p{1.0cm}p{4.0cm}@{}}
\\toprule
Step & Claim & Type & Status & Script / Source \\\\
\\midrule
C1 & $\\varphi_1 > 0$ & Lean & PROVED & \\texttt{phi1\\_pos} \\\\
C2 & $(\\log\\varphi_1)'' < 0$ & Lean & PROVED & \\texttt{log\\_phi1\\_d2\\_neg} \\\\
C3a & $\\Phi > 0$ & Classical & CITED & \\cite{csordas1989} Thm~A \\\\
C3b & $\\Phi$ even & Classical & CITED & \\cite{titchmarsh1986} \\S2.10 \\\\
C3c & $\\Phi \\in L^1$ & Classical & CITED & \\cite{titchmarsh1986} \\S2.10 \\\\
C4 & $Q_\\Phi < 0$ on $[0,1]$ & IA (mpmath.iv) & CERT. & \\texttt{verify\\_logconcavity\\_rigorous.py} \\\\
C4b & C4 reproduced & IA (Arb) & CERT. & \\texttt{verify\\_logconcavity\\_arb.py} \\\\
C5 & $(\\log\\Phi)'' < 0$ on $[1,3]$ & Alg.+pert. & CERT. & \\texttt{verify\\_ia\\_1\\_to\\_3.py} \\\\
C6 & $(\\log\\Phi)'' < 0$, $u\\geq 3$ & Monotone & PROVED & \\texttt{verify\\_algebraic\\_core.py} \\\\
C7 & $\\Phi$ real analytic & Structural & PROVED & \\S\\ref{sec:phi} (disk proof) \\\\
C8 & $\\Phi = O(e^{-\\pi e^{2u}})$ & Structural & PROVED & \\texttt{phi1\\_decay\\_bound} \\\\
C9 & Pólya 1927 Satz~II & Cited thm. & CITED & \\cite{csordas1989} Thm~2.2 \\\\
C10 & RH $\\Leftrightarrow$ $\\Xi$ real zeros & Cited thm. & CITED & \\cite{titchmarsh1986} \\S2.1 \\\\
\\bottomrule
\\end{tabular}
\\end{center}
''',
'appendix_c_table_formatting.md': '''# Deliverable: appendix_c_table_formatting.md
# Task 10 — Fix Appendix C Pólya Table Formatting
## Required LaTeX fix
Use a wider table and proper math in all cells.
\\begin{center}\\small
\\begin{tabular}{@{}p{3.5cm}p{4.5cm}p{3.5cm}@{}}
\\toprule
Pólya 1927 (Satz II) & Csordas--Varga 1989 (Thm~2.2) & Our $\\Phi$ satisfies \\\\
\\midrule
$K(-t)=K(t)$ (even) & Assumed; their eq.~(2.2) & Prop.~\\ref{prop:phi_properties}~(ii) \\\\
$K(t) > 0$ & Thm~A (cited) & Prop.~\\ref{prop:phi_properties}~(i) \\\\
$K \\in L^1$ & Implicitly via decay & Prop.~\\ref{prop:phi_properties}~(iii) \\\\
$(\\log K)'' \\leq 0$ & Their eq.~(2.3) & Thms~\\ref{thm:ia},~\\ref{thm:extended},~\\ref{thm:perturbation_tail} \\\\
$K = O(e^{-|t|^{2+\\delta}})$ & Eq.~(2.4), $\\delta>0$ & Prop.~\\ref{prop:phi_properties}~(iv), $\\delta=1$ \\\\
$K$ real analytic near $0$ & Eq.~(2.5) & Prop.~\\ref{prop:phi_properties}~(v) \\\\
\\bottomrule
\\end{tabular}
\\end{center}
Note: Remove raw text like "(log K)'' leq 0" — replace all with LaTeX math.
''',
'qed_symbol_layout_fix.md': '''# Deliverable: qed_symbol_layout_fix.md
# Task 11 — Fix QED Symbol Placement
## Problem
In Theorem 6 proof, the SHA256 hash reference appears at the end of the proof,
causing the QED square to appear awkwardly after code text.
## Fix
Remove the SHA256 parenthetical from the Theorem 6 proof body.
The hash belongs in Appendix B only.
In Theorem 6 proof, change:
"See \\texttt{proof/verify\\_algebraic\\_core.py} (SHA256 of output: \\texttt{7D65253C...})."
To:
"See \\texttt{proof/verify\\_algebraic\\_core.py}."
In Theorem 5 proof, similarly remove the inline SHA reference:
"See \\texttt{proof/verify\\_ia\\_1\\_to\\_3.py} (SHA256 of output: \\texttt{7D65253C...})."
To:
"See \\texttt{proof/verify\\_ia\\_1\\_to\\_3.py} and Appendix~\\ref{sec:cert}."
The QED marker will then appear cleanly after a mathematical sentence.
''',
'theorem_reference_consistency_audit.md': '''# Deliverable: theorem_reference_consistency_audit.md
# Task 13 — Theorem Reference Consistency Audit
## Current Numbering (LaTeX auto-numbered)
With the current paper structure:
Thm 1: Pólya 1927
Lem 2: h_pos_for_nonneg (from Lean remark, not in text)
Prop 3: Phi properties
Thm 4: Algebraic Core
Lem 5: tail_decay
Prop 6: tail_ratio
Def 7: log-concavity numerator
Thm 8: IA verification [0,1]
Lem 9: Uniform tail bound (Lemma W)
Thm 10: Extended Certification [1,3]
Thm 11: Tail Bound [3,inf)
Thm 12: Main log-concavity result
Cor 13: RH Corollary
These are automatically assigned by LaTeX. The paper refers to them only by
\\ref{} labels, so no manual number tracking is needed.
## Stale references to fix in paper
1. Abstract: "Theorem~5 in Section~\\ref{sec:extended}" should just be
"Theorem~\\ref{thm:extended} in Section~\\ref{sec:extended}" — already fixed.
2. Section 12 (Reproducibility):
"\\texttt{proof/verify\\_ia\\_1\\_to\\_1\\_5.py}" → "\\texttt{proof/verify\\_ia\\_1\\_to\\_3.py}"
"\\texttt{results/verify\\_ia\\_1\\_to\\_1\\_5.json}" → "\\texttt{results/verify\\_ia\\_1\\_to\\_3.json}"
3. Lean axiom name: "\\texttt{ia\\_verification\\_1\\_0\\_to\\_1\\_5}" should still be
updated to reflect [1,3] coverage in the next Lean revision.
4. Appendix B: C5 row should reference verify_ia_1_to_3.py and new hash.
''',
'title_typography_consistency.md': '''# Deliverable: title_typography_consistency.md
# Task 14 — Title Typography
## Recommended title
Keep: "Log-Concavity of the Riemann Xi Kernel and the Riemann Hypothesis"
The current title is conventional and clear. "Riemann Xi" is standard terminology.
The $\\Xi$ symbol in the title could cause metadata/indexing issues.
No change needed unless the author has a strong preference.
If changing: "Log-Concavity of the Riemann $\\Xi$-Kernel and the Riemann Hypothesis"
''',
'abstract_code_identifier_cleanup.md': '''# Deliverable: abstract_code_identifier_cleanup.md
# Task 15 — Remove Code Identifiers from Abstract
## Required removals from abstract
Remove all of the following from the abstract (move to Section 12):
- "\\texttt{lean4/RHProof/Basic.lean}"
- "\\texttt{lake build}"
- "leanprover/lean4:v4.16.0"
- "Mathlib commit \\texttt{a6276f4c}"
- "\\texttt{h\\_pos\\_for\\_nonneg}, \\texttt{log\\_h\\_d2\\_neg}, ..."
- "13 project-specific axioms"
- "3 universal Lean kernel axioms"
- "\\texttt{propext}, \\texttt{Classical.choice}, \\texttt{Quot.sound}"
Replace with:
"A Lean 4 formalization verifies the algebraic core with zero \\texttt{sorry}
declarations; remaining dependencies are recorded as explicit axioms."
This is already handled in the shortened abstract (Task 6).
''',
'encoding_extraction_cleanup.md': '''# Deliverable: encoding_extraction_cleanup.md
# Task 16 — Encoding and Text Extraction Cleanup
## Required preamble additions
Add to preamble after existing packages:
\\usepackage{lmodern}
\\usepackage{microtype}
## Character replacements in paper source
All math inside text environments should use LaTeX:
- § already uses \\S{} where needed
- Replace -- with \\text{--} in math contexts if needed
- The table cells containing "(log K)'' leq 0" → "$({\\log K})'' \\leq 0$"
## Check for non-ASCII characters
The source currently has "Pólya" written as P\\'olya (correct for pdfLaTeX).
The Appendix C table had "((log K)'' leq0)" as raw text — fixed in Task 10.
No encoding issues found in the main proof sections.
''',
'url_path_linebreak_cleanup.md': '''# Deliverable: url_path_linebreak_cleanup.md
# Task 17 — URL and Path Linebreak Cleanup
## Required additions to preamble
Add:
\\usepackage{xurl}
This allows URLs to break at more points including hyphens and underscores.
## Path formatting in tables
In Section 12 and Appendix B, long script paths like:
verify_logconcavity_rigorous.py
should use \\path{} or \\texttt{} with \\allowbreak hints if they overflow.
The current pdfLaTeX compilation shows Overfull hboxes in the tables. Fix by:
1. Using p{} columns instead of l columns in Section 12 table
2. Adding \\footnotesize to the Section 12 table (already uses \\small)
3. Breaking long names: \\texttt{verify\\_log\\-concavity\\_\\-rigorous.py}
No hyperref changes needed (already included).
''',
'acceptance_checklist_table_format.md': '''# Deliverable: acceptance_checklist_table_format.md
# Task 18 — Acceptance Checklist Table Format
## Convert Appendix D enumerate to tabular format
Replace the current enumerate list with:
\\begin{center}\\small
\\begin{tabular}{@{}p{0.5cm}p{7.5cm}p{1.2cm}@{}}
\\toprule
ID & Criterion & Status \\\\
\\midrule
C-1 & All theorems proved or cited with explicit hypothesis matching & MET \\\\
C-2 & All computational claims carry rigorous certificates & MET \\\\
C-3 & Lean build: zero \\texttt{sorry}, zero correctness warnings & MET \\\\
C-4 & Lean certificates derived (not axiomatized) & NOT MET \\\\
C-5 & Pólya theorem formalized in Lean & NOT MET \\\\
C-6 & Specialist peer review completed & NOT MET \\\\
C-7 & Analytic implications explicitly conditioned & MET \\\\
C-8 & No OPEN entries in dependency table & MET \\\\
C-9 & $\\Phi$ analyticity proves local real analyticity only & MET \\\\
C-10 & Uniform $|W_{\\mathrm{tail}}|$ bound proved & MET \\\\
C-11 & Theorem~\\ref{thm:extended} interval coverage explicit & MET \\\\
C-12 & Theorem~\\ref{thm:perturbation_tail} monotonicity proved & MET \\\\
C-13 & $F(z)=2\\Xi(z)$ justified by analytic continuation & MET \\\\
C-14 & Abstract/intro language conditional & MET \\\\
C-15 & Certificate SHA256 hashes listed & MET \\\\
C-16 & Pólya Satz~II source audit with verdict & PARTIAL \\\\
C-17 & Tail prefactor bound corrected ($2n^4$ instead of $n^4$) & MET \\\\
C-18 & Script renamed to \\texttt{verify\\_ia\\_1\\_to\\_3.py} & MET \\\\
\\bottomrule
\\end{tabular}
\\end{center}
\\medskip
\\noindent Status: MET = criterion satisfied; PARTIAL = addressed but not fully closed;
NOT MET = open action required.
\\medskip
\\noindent \\textbf{Overall: 15 of 18 met; 3 open (C-4, C-5, C-6); 1 partial (C-16).}
''',
'falsification_language_softening.md': '''# Deliverable: falsification_language_softening.md
# Task 19 — Soften Falsification Suite Language
## Required changes to Section 11
Change:
"All 36 attacks failed."
To:
"No attack detected an inconsistency or counterexample."
Change the opening sentence from:
"Each attack attempts to break the proof by finding a counterexample or inconsistency."
To:
"Each test attempts to detect inconsistencies or find counterexamples.
These tests are confidence-building; they do not substitute for the
proof-critical certificates in Section~\\ref{sec:deps}."
Change in summary line:
"All 36 attacks failed."
To:
"All 36 tests passed (no inconsistency detected)."
''',
'appendix_d_final_verdict_update.md': '''# Deliverable: appendix_d_final_verdict_update.md
# Task 20 — Update Appendix D Final Verdict
## Updated verdict text (replace in paper)
Replace the current overall verdict with:
"\\textbf{Overall: 15 of 18 criteria met; C-4, C-5, C-6 open; C-16 partial.}
The proof is computationally well-founded, analytically structured, and
mathematically consistent under all audit checks. It is ready for specialist
peer review as a conditional proof package. Three items remain before top-journal
submission: Lean formalization of the IA certificates (C-4), Lean formalization
of Pólya's theorem (C-5), and specialist peer review (C-6). The Pólya source
audit is partially complete (C-16): five independent English restatements confirm
the conditions, but the 1927 German original has not been directly verified."
## Allowed final verdicts
VERDICT: READY FOR SPECIALIST PEER REVIEW AS CONDITIONAL PROOF PACKAGE
''',
}
for filename, content in files.items():
path = os.path.join(docs_dir, filename)
with open(path, 'w', encoding='utf-8') as f:
f.write(content)
print(f'Created: {filename}')
print('Done.')