Theorem: IsUnifLocDoublingMeasure.exists_eventually_forall_measure_closedBall_le_mul
File: Mathlib/MeasureTheory/Measure/Doubling.lean

tactic: let C := doublingConstant μ
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
⊢ ∃ C, ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α) (t : ℝ), t ≤ K → ↑↑μ (closedBall x (t * ε)) ≤ ↑C * ↑↑μ (closedBall x ε)

tactic: rcases lt_or_le K 1 with (hK | hK)
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
⊢ ∃ C, ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α) (t : ℝ), t ≤ K → ↑↑μ (closedBall x (t * ε)) ≤ ↑C * ↑↑μ (closedBall x ε)

tactic: intro n
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
⊢ ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)

tactic: induction' n with n ih
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
n : ℕ
⊢ ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)

tactic: replace ih := eventually_nhdsWithin_pos_mul_left (two_pos : 0 < (2 : ℝ)) ih
state_before: case succ
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
n : ℕ
ih : ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
⊢ ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0,
    ∀ (x : α), ↑↑μ (closedBall x (2 ^ Nat.succ n * ε)) ≤ ↑(C ^ Nat.succ n) * ↑↑μ (closedBall x ε)

tactic: refine' (ih.and (exists_measure_closedBall_le_mul' μ)).mono fun ε hε x => _
state_before: case succ
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
n : ℕ
ih : ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))
⊢ ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0,
    ∀ (x : α), ↑↑μ (closedBall x (2 ^ Nat.succ n * ε)) ≤ ↑(C ^ Nat.succ n) * ↑↑μ (closedBall x ε)

tactic: calc
  μ (closedBall x ((2 : ℝ) ^ (n + 1) * ε)) = μ (closedBall x ((2 : ℝ) ^ n * (2 * ε))) := by
    rw [pow_succ', mul_assoc]
  _ ≤ ↑(C ^ n) * μ (closedBall x (2 * ε)) := (hε.1 x)
  _ ≤ ↑(C ^ n) * (C * μ (closedBall x ε)) := by gcongr; exact hε.2 x
  _ = ↑(C ^ (n + 1)) * μ (closedBall x ε) := by rw [← mul_assoc, pow_succ', ENNReal.coe_mul]
state_before: case succ
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
n : ℕ
ih : ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))) ∧
    ∀ (x : α), ↑↑μ (closedBall x (2 * ε)) ≤ ↑(doublingConstant μ) * ↑↑μ (closedBall x ε)
x : α
⊢ ↑↑μ (closedBall x (2 ^ Nat.succ n * ε)) ≤ ↑(C ^ Nat.succ n) * ↑↑μ (closedBall x ε)

tactic: simp
state_before: case zero
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
⊢ ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ Nat.zero * ε)) ≤ ↑(C ^ Nat.zero) * ↑↑μ (closedBall x ε)

tactic: rw [pow_succ', mul_assoc]
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
n : ℕ
ih : ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))) ∧
    ∀ (x : α), ↑↑μ (closedBall x (2 * ε)) ≤ ↑(doublingConstant μ) * ↑↑μ (closedBall x ε)
x : α
⊢ ↑↑μ (closedBall x (2 ^ (n + 1) * ε)) = ↑↑μ (closedBall x (2 ^ n * (2 * ε)))

tactic: gcongr
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
n : ℕ
ih : ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))) ∧
    ∀ (x : α), ↑↑μ (closedBall x (2 * ε)) ≤ ↑(doublingConstant μ) * ↑↑μ (closedBall x ε)
x : α
⊢ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε)) ≤ ↑(C ^ n) * (↑C * ↑↑μ (closedBall x ε))

tactic: exact hε.2 x
state_before: case bc
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
n : ℕ
ih : ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))) ∧
    ∀ (x : α), ↑↑μ (closedBall x (2 * ε)) ≤ ↑(doublingConstant μ) * ↑↑μ (closedBall x ε)
x : α
⊢ ↑↑μ (closedBall x (2 * ε)) ≤ ↑C * ↑↑μ (closedBall x ε)

tactic: rw [← mul_assoc, pow_succ', ENNReal.coe_mul]
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
n : ℕ
ih : ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ n * (2 * ε))) ≤ ↑(C ^ n) * ↑↑μ (closedBall x (2 * ε))) ∧
    ∀ (x : α), ↑↑μ (closedBall x (2 * ε)) ≤ ↑(doublingConstant μ) * ↑↑μ (closedBall x ε)
x : α
⊢ ↑(C ^ n) * (↑C * ↑↑μ (closedBall x ε)) = ↑(C ^ (n + 1)) * ↑↑μ (closedBall x ε)

tactic: refine' ⟨1, _⟩
state_before: case inl
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : K < 1
⊢ ∃ C, ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α) (t : ℝ), t ≤ K → ↑↑μ (closedBall x (t * ε)) ≤ ↑C * ↑↑μ (closedBall x ε)

tactic: simp only [ENNReal.coe_one, one_mul]
state_before: case inl
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : K < 1
⊢ ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α) (t : ℝ), t ≤ K → ↑↑μ (closedBall x (t * ε)) ≤ ↑1 * ↑↑μ (closedBall x ε)

tactic: exact
  eventually_mem_nhdsWithin.mono fun ε hε x t ht =>
    measure_mono <| closedBall_subset_closedBall (by nlinarith [mem_Ioi.mp hε])
state_before: case inl
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : K < 1
⊢ ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α) (t : ℝ), t ≤ K → ↑↑μ (closedBall x (t * ε)) ≤ ↑↑μ (closedBall x ε)

tactic: nlinarith [mem_Ioi.mp hε]
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : K < 1
ε : ℝ
hε : ε ∈ Ioi 0
x : α
t : ℝ
ht : t ≤ K
⊢ t * ε ≤ ε

tactic: refine'
  ⟨C ^ ⌈Real.logb 2 K⌉₊,
    ((hμ ⌈Real.logb 2 K⌉₊).and eventually_mem_nhdsWithin).mono fun ε hε x t ht =>
      le_trans (measure_mono <| closedBall_subset_closedBall _) (hε.1 x)⟩
state_before: case inr
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : 1 ≤ K
⊢ ∃ C, ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α) (t : ℝ), t ≤ K → ↑↑μ (closedBall x (t * ε)) ≤ ↑C * ↑↑μ (closedBall x ε)

tactic: refine' mul_le_mul_of_nonneg_right (ht.trans _) (mem_Ioi.mp hε.2).le
state_before: case inr
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : 1 ≤ K
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ ⌈Real.logb 2 K⌉₊ * ε)) ≤ ↑(C ^ ⌈Real.logb 2 K⌉₊) * ↑↑μ (closedBall x ε)) ∧
    ε ∈ Ioi 0
x : α
t : ℝ
ht : t ≤ K
⊢ t * ε ≤ 2 ^ ⌈Real.logb 2 K⌉₊ * ε

tactic: conv_lhs => rw [← Real.rpow_logb two_pos (by norm_num) (by linarith : 0 < K)]
state_before: case inr
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : 1 ≤ K
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ ⌈Real.logb 2 K⌉₊ * ε)) ≤ ↑(C ^ ⌈Real.logb 2 K⌉₊) * ↑↑μ (closedBall x ε)) ∧
    ε ∈ Ioi 0
x : α
t : ℝ
ht : t ≤ K
⊢ K ≤ 2 ^ ⌈Real.logb 2 K⌉₊

tactic: rw [← Real.rpow_nat_cast]
state_before: case inr
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : 1 ≤ K
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ ⌈Real.logb 2 K⌉₊ * ε)) ≤ ↑(C ^ ⌈Real.logb 2 K⌉₊) * ↑↑μ (closedBall x ε)) ∧
    ε ∈ Ioi 0
x : α
t : ℝ
ht : t ≤ K
⊢ 2 ^ Real.logb 2 K ≤ 2 ^ ⌈Real.logb 2 K⌉₊

tactic: exact Real.rpow_le_rpow_of_exponent_le one_le_two (Nat.le_ceil (Real.logb 2 K))
state_before: case inr
α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : 1 ≤ K
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ ⌈Real.logb 2 K⌉₊ * ε)) ≤ ↑(C ^ ⌈Real.logb 2 K⌉₊) * ↑↑μ (closedBall x ε)) ∧
    ε ∈ Ioi 0
x : α
t : ℝ
ht : t ≤ K
⊢ 2 ^ Real.logb 2 K ≤ 2 ^ ↑⌈Real.logb 2 K⌉₊

tactic: norm_num
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : 1 ≤ K
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ ⌈Real.logb 2 K⌉₊ * ε)) ≤ ↑(C ^ ⌈Real.logb 2 K⌉₊) * ↑↑μ (closedBall x ε)) ∧
    ε ∈ Ioi 0
x : α
t : ℝ
ht : t ≤ K
⊢ 2 ≠ 1

tactic: linarith
state_before: α : Type u_1
inst✝² : MetricSpace α
inst✝¹ : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝ : IsUnifLocDoublingMeasure μ
K : ℝ
C : ℝ≥0 := doublingConstant μ
hμ : ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : α), ↑↑μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * ↑↑μ (closedBall x ε)
hK : 1 ≤ K
ε : ℝ
hε :
  (∀ (x : α), ↑↑μ (closedBall x (2 ^ ⌈Real.logb 2 K⌉₊ * ε)) ≤ ↑(C ^ ⌈Real.logb 2 K⌉₊) * ↑↑μ (closedBall x ε)) ∧
    ε ∈ Ioi 0
x : α
t : ℝ
ht : t ≤ K
⊢ 0 < K