Development/AutomorphicArithmetic/DedekindLFunctions/LandauTheorems/LandauDichotomy.lean
51push_neg at hex52set d := dist ρs (σ : ℂ) with hd53have hreal : ∀ w ∈ F, dist w (σ : ℂ) = d → w = ((σ - d : ℝ) : ℂ) :=54fun w hw he => eq_ofReal_sub_of_dist_le_of_le_sub_re (le_of_eq he) (hex w hw.1)55have hρs := hreal ρs hρsF rfl56have hdlt : d < σ - θ := by57rcases lt_or_eq_of_le hdle with h | h58· exact h59· exfalso60have := hex ρ₀ h₀61linarith62refine ⟨σ - d, hρs ▸ hρsF.1, by linarith, ?_⟩63have hT : ∀ t ∈ F \ {((σ - d : ℝ) : ℂ)}, d < dist t (σ : ℂ) := by64intro t ht65have hm : d ≤ dist t (σ : ℂ) := hmin t ht.166rcases lt_or_eq_of_le hm with h | h67· exact h68· exact absurd (hreal t ht.1 h.symm) ht.269obtain ⟨r, hr, hrT⟩ : ∃ r, d < r ∧ ∀ t ∈ F \ {((σ - d : ℝ) : ℂ)}, r ≤ dist t (σ : ℂ) := by70rcases (F \ {((σ - d : ℝ) : ℂ)}).eq_empty_or_nonempty with hTe | hTne71· refine ⟨d + 1, by linarith, ?_⟩72intro t ht73rw [hTe] at ht74exact absurd ht (Set.notMem_empty t)75· obtain ⟨t₀, ht₀, htmin⟩ := Set.exists_min_image (F \ {((σ - d : ℝ) : ℂ)})76(fun w => dist w (σ : ℂ)) (hfin.subset Set.diff_subset) hTne77exact ⟨dist t₀ (σ : ℂ), hT t₀ ht₀, htmin⟩78refine ⟨min r (σ - θ), ?_, min_le_right _ _, ?_⟩79· rw [sub_sub_cancel]80exact lt_min hr hdlt81· intro w hw hb82rw [Metric.mem_ball] at hb83have hwF : w ∈ F := ⟨hw, Metric.mem_closedBall.mpr (le_trans hb.le (min_le_right _ _))⟩84by_contra hne85have h3 := hrT w ⟨hwF, hne⟩86have h4 := min_le_left r (σ - θ)87linarith8889end Deduction9091end