Lean / Reader
Lean readerDeskStatementAudit.lean
Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports Solution, which it does not have: you can read it there, but it will not check. Build the project itself to check it.
import Solutionimport Mathlib.Data.Finset.Maxopen scoped BigOperatorsopen Finsetnoncomputable sectionnamespace DeskAuditdef powerMagnitude (n : ℕ) (z : ℕ → ℂ) (k : ℕ) : ℝ :=‖∑ i ∈ Icc 1 n, z i ^ k‖def magnitudes (n : ℕ) (z : ℕ → ℂ) : Finset ℝ :=(Icc 2 (n + 1)).image (powerMagnitude n z)theorem magnitudes_nonempty {n : ℕ} (hn : 2 ≤ n) (z : ℕ → ℂ) :(magnitudes n z).Nonempty :=⟨powerMagnitude n z 2, mem_image_of_mem _ (mem_Icc.mpr ⟨le_rfl, by omega⟩)⟩def publishedQuestion : Prop :=∃ C : ℝ, C > 1 ∧∀ (n : ℕ) (hn : 2 ≤ n), ∃ z : ℕ → ℂ,z 1 = 1 ∧ (∀ i ∈ Icc 1 n, 1 ≤ ‖z i‖) ∧(magnitudes n z).max' (magnitudes_nonempty hn z) < C ^ (-(n : ℝ))theorem pointwise_iff_max {n : ℕ} (hn : 2 ≤ n) (z : ℕ → ℂ) (bound : ℝ) :(∀ k ∈ Icc 2 (n + 1), powerMagnitude n z k < bound) ↔(magnitudes n z).max' (magnitudes_nonempty hn z) < bound := byrw [Finset.max'_lt_iff]constructor· intro h y hyobtain ⟨k, hk, rfl⟩ := Finset.mem_image.mp hyexact h k hk· intro h k hkexact h _ (Finset.mem_image_of_mem _ hk)theorem formal_statement_iff_published :Erdos973.Palomar.OriginalStatement ↔ publishedQuestion := byconstructor· rintro ⟨C, hC, hall⟩refine ⟨C, hC, fun n hn => ?_⟩obtain ⟨z, hOne, hExt, hBound⟩ := hall n hnexact ⟨z, hOne, hExt, (pointwise_iff_max hn z _).mp hBound⟩· rintro ⟨C, hC, hall⟩refine ⟨C, hC, fun n hn => ?_⟩obtain ⟨z, hOne, hExt, hBound⟩ := hall n hnexact ⟨z, hOne, hExt, (pointwise_iff_max hn z _).mpr hBound⟩theorem negative_answer : ¬ publishedQuestion :=fun h => Erdos973.Palomar.not_erdos_973 (formal_statement_iff_published.mpr h)#print axioms DeskAudit.negative_answerend DeskAudit