nevanlinna/Nevanlinna/logpos.lean

37 lines
891 B
Plaintext
Raw Normal View History

2024-12-19 16:10:51 +01:00
import Mathlib.MeasureTheory.Integral.CircleIntegral
import Nevanlinna.divisor
import Nevanlinna.stronglyMeromorphicOn
import Nevanlinna.meromorphicOn_divisor
open Real
noncomputable def logpos : := fun r ↦ max 0 (log r)
theorem loglogpos {r : } : log r = logpos r - logpos r⁻¹ := by
unfold logpos
rw [log_inv]
by_cases h : 0 ≤ log r
· simp [h]
· simp at h
have : 0 ≤ -log r := Left.nonneg_neg_iff.2 (le_of_lt h)
simp [h, this]
exact neg_nonneg.mp this
theorem logpos_norm {r : } : logpos r = 2⁻¹ * (log r + ‖log r‖) := by
by_cases hr : 0 ≤ log r
· rw [norm_of_nonneg hr]
have : logpos r = log r := by
unfold logpos
simp [hr]
rw [this]
ring
· rw [norm_of_nonpos (le_of_not_ge hr)]
have : logpos r = 0 := by
unfold logpos
simp
exact le_of_not_ge hr
rw [this]
ring