l3lab/ntp-mathlib huggingface dataset:
theorem logb_lt_iff_lt_rpow (hx : 0 < x) : logb b x < y ↔ x < b ^ y := by
  

Proof state:
b x y : ℝ
hb : 1 < b
hx : 0 < x
⊢ logb b x < y ↔ x < b ^ y

Next tactic:
rw [← rpow_lt_rpow_left_iff hb, rpow_logb (b_pos hb) (b_ne_one' hb) hx]
theorem le_logb_iff_rpow_le (hy : 0 < y) : x ≤ logb b y ↔ b ^ x ≤ y := by
  

Proof state:
b x y : ℝ
hb : 1 < b
hy : 0 < y
⊢ x ≤ logb b y ↔ b ^ x ≤ y

Next tactic:
rw [← rpow_le_rpow_left_iff hb, rpow_logb (b_pos hb) (b_ne_one' hb) hy]
theorem lt_logb_iff_rpow_lt (hy : 0 < y) : x < logb b y ↔ b ^ x < y := by
  

Proof state:
b x y : ℝ
hb : 1 < b
hy : 0 < y
⊢ x < logb b y ↔ b ^ x < y

Next tactic:
rw [← rpow_lt_rpow_left_iff hb, rpow_logb (b_pos hb) (b_ne_one' hb) hy]
theorem logb_pos_iff (hx : 0 < x) : 0 < logb b x ↔ 1 < x := by
  

Proof state:
b x y : ℝ
hb : 1 < b
hx : 0 < x
⊢ 0 < logb b x ↔ 1 < x

Next tactic:
rw [← @logb_one b]
theorem logb_pos_iff (hx : 0 < x) : 0 < logb b x ↔ 1 < x := by
  rw [← @logb_one b]
  

Proof state:
b x y : ℝ
hb : 1 < b
hx : 0 < x
⊢ logb b 1 < logb b x ↔ 1 < x

Next tactic:
rw [logb_lt_logb_iff hb zero_lt_one hx]
theorem logb_pos (hx : 1 < x) : 0 < logb b x := by
  

Proof state:
b x y : ℝ
hb : 1 < b
hx : 1 < x
⊢ 0 < logb b x

Next tactic:
rw [logb_pos_iff hb (lt_trans zero_lt_one hx)]
theorem logb_pos (hx : 1 < x) : 0 < logb b x := by
  rw [logb_pos_iff hb (lt_trans zero_lt_one hx)]
  

Proof state:
b x y : ℝ
hb : 1 < b
hx : 1 < x
⊢ 1 < x

Next tactic:
exact hx
theorem logb_neg_iff (h : 0 < x) : logb b x < 0 ↔ x < 1 := by
  

Proof state:
b x y : ℝ
hb : 1 < b
h : 0 < x
⊢ logb b x < 0 ↔ x < 1

Next tactic:
rw [← logb_one]
theorem logb_neg_iff (h : 0 < x) : logb b x < 0 ↔ x < 1 := by
  rw [← logb_one]
  

Proof state:
b x y : ℝ
hb : 1 < b
h : 0 < x
⊢ logb b x < logb ?m.52635 1 ↔ x < 1
b x y : ℝ hb : 1 < b h : 0 < x ⊢ ℝ

Next tactic:
exact logb_lt_logb_iff hb h zero_lt_one
theorem logb_nonneg_iff (hx : 0 < x) : 0 ≤ logb b x ↔ 1 ≤ x := by
  

Proof state:
b x y : ℝ
hb : 1 < b
hx : 0 < x
⊢ 0 ≤ logb b x ↔ 1 ≤ x

Next tactic:
rw [← not_lt, logb_neg_iff hb hx, not_lt]
theorem logb_nonpos_iff (hx : 0 < x) : logb b x ≤ 0 ↔ x ≤ 1 := by
  

Proof state:
b x y : ℝ
hb : 1 < b
hx : 0 < x
⊢ logb b x ≤ 0 ↔ x ≤ 1

Next tactic:
rw [← not_lt, logb_pos_iff hb hx, not_lt]
theorem logb_nonpos_iff' (hx : 0 ≤ x) : logb b x ≤ 0 ↔ x ≤ 1 := by
  

Proof state:
b x y : ℝ
hb : 1 < b
hx : 0 ≤ x
⊢ logb b x ≤ 0 ↔ x ≤ 1

Next tactic:
rcases hx.eq_or_lt with (rfl | hx)
theorem logb_nonpos_iff' (hx : 0 ≤ x) : logb b x ≤ 0 ↔ x ≤ 1 := by
  rcases hx.eq_or_lt with (rfl | hx)
  · 

Proof state:
case inl
b y : ℝ
hb : 1 < b
hx : 0 ≤ 0
⊢ logb b 0 ≤ 0 ↔ 0 ≤ 1

Next tactic:
simp [le_refl, zero_le_one]
theorem logb_nonpos_iff' (hx : 0 ≤ x) : logb b x ≤ 0 ↔ x ≤ 1 := by
  rcases hx.eq_or_lt with (rfl | hx)
  · simp [le_refl, zero_le_one]
  

Proof state:
case inr
b x y : ℝ
hb : 1 < b
hx✝ : 0 ≤ x
hx : 0 < x
⊢ logb b x ≤ 0 ↔ x ≤ 1

Next tactic:
exact logb_nonpos_iff hb hx
theorem strictAntiOn_logb : StrictAntiOn (logb b) (Set.Iio 0) := by
  

Proof state:
b x y : ℝ
hb : 1 < b
⊢ StrictAntiOn (logb b) (Iio 0)

Next tactic:
rintro x (hx : x < 0) y (hy : y < 0) hxy
theorem strictAntiOn_logb : StrictAntiOn (logb b) (Set.Iio 0) := by
  rintro x (hx : x < 0) y (hy : y < 0) hxy
  

Proof state:
b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ logb b y < logb b x

Next tactic:
rw [← logb_abs y, ← logb_abs x]
theorem strictAntiOn_logb : StrictAntiOn (logb b) (Set.Iio 0) := by
  rintro x (hx : x < 0) y (hy : y < 0) hxy
  rw [← logb_abs y, ← logb_abs x]
  

Proof state:
b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ logb b |y| < logb b |x|

Next tactic:
refine' logb_lt_logb hb (abs_pos.2 hy.ne) _
theorem strictAntiOn_logb : StrictAntiOn (logb b) (Set.Iio 0) := by
  rintro x (hx : x < 0) y (hy : y < 0) hxy
  rw [← logb_abs y, ← logb_abs x]
  refine' logb_lt_logb hb (abs_pos.2 hy.ne) _
  

Proof state:
b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ |y| < |x|

Next tactic:
rwa [abs_of_neg hy, abs_of_neg hx, neg_lt_neg_iff]
private theorem b_ne_one : b ≠ 1 := by 

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
⊢ b ≠ 1

Next tactic:
linarith
@[simp]
theorem logb_le_logb_of_base_lt_one (h : 0 < x) (h₁ : 0 < y) : logb b x ≤ logb b y ↔ y ≤ x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
h : 0 < x
h₁ : 0 < y
⊢ logb b x ≤ logb b y ↔ y ≤ x

Next tactic:
rw [logb, logb, div_le_div_right_of_neg (log_neg b_pos b_lt_one), log_le_log_iff h₁ h]
theorem logb_lt_logb_of_base_lt_one (hx : 0 < x) (hxy : x < y) : logb b y < logb b x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hxy : x < y
⊢ logb b y < logb b x

Next tactic:
rw [logb, logb, div_lt_div_right_of_neg (log_neg b_pos b_lt_one)]
theorem logb_lt_logb_of_base_lt_one (hx : 0 < x) (hxy : x < y) : logb b y < logb b x := by
  rw [logb, logb, div_lt_div_right_of_neg (log_neg b_pos b_lt_one)]
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hxy : x < y
⊢ log x < log y

Next tactic:
exact log_lt_log hx hxy
@[simp]
theorem logb_lt_logb_iff_of_base_lt_one (hx : 0 < x) (hy : 0 < y) :
    logb b x < logb b y ↔ y < x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hy : 0 < y
⊢ logb b x < logb b y ↔ y < x

Next tactic:
rw [logb, logb, div_lt_div_right_of_neg (log_neg b_pos b_lt_one)]
@[simp]
theorem logb_lt_logb_iff_of_base_lt_one (hx : 0 < x) (hy : 0 < y) :
    logb b x < logb b y ↔ y < x := by
  rw [logb, logb, div_lt_div_right_of_neg (log_neg b_pos b_lt_one)]
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hy : 0 < y
⊢ log y < log x ↔ y < x

Next tactic:
exact log_lt_log_iff hy hx
theorem logb_le_iff_le_rpow_of_base_lt_one (hx : 0 < x) : logb b x ≤ y ↔ b ^ y ≤ x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
⊢ logb b x ≤ y ↔ b ^ y ≤ x

Next tactic:
rw [← rpow_le_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hx]
theorem logb_lt_iff_lt_rpow_of_base_lt_one (hx : 0 < x) : logb b x < y ↔ b ^ y < x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
⊢ logb b x < y ↔ b ^ y < x

Next tactic:
rw [← rpow_lt_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hx]
theorem le_logb_iff_rpow_le_of_base_lt_one (hy : 0 < y) : x ≤ logb b y ↔ y ≤ b ^ x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hy : 0 < y
⊢ x ≤ logb b y ↔ y ≤ b ^ x

Next tactic:
rw [← rpow_le_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hy]
theorem lt_logb_iff_rpow_lt_of_base_lt_one (hy : 0 < y) : x < logb b y ↔ y < b ^ x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hy : 0 < y
⊢ x < logb b y ↔ y < b ^ x

Next tactic:
rw [← rpow_lt_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hy]
theorem logb_pos_iff_of_base_lt_one (hx : 0 < x) : 0 < logb b x ↔ x < 1 := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
⊢ 0 < logb b x ↔ x < 1

Next tactic:
rw [← @logb_one b, logb_lt_logb_iff_of_base_lt_one b_pos b_lt_one zero_lt_one hx]
theorem logb_pos_of_base_lt_one (hx : 0 < x) (hx' : x < 1) : 0 < logb b x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hx' : x < 1
⊢ 0 < logb b x

Next tactic:
rw [logb_pos_iff_of_base_lt_one b_pos b_lt_one hx]
theorem logb_pos_of_base_lt_one (hx : 0 < x) (hx' : x < 1) : 0 < logb b x := by
  rw [logb_pos_iff_of_base_lt_one b_pos b_lt_one hx]
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hx' : x < 1
⊢ x < 1

Next tactic:
exact hx'
theorem logb_neg_iff_of_base_lt_one (h : 0 < x) : logb b x < 0 ↔ 1 < x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
h : 0 < x
⊢ logb b x < 0 ↔ 1 < x

Next tactic:
rw [← @logb_one b, logb_lt_logb_iff_of_base_lt_one b_pos b_lt_one h zero_lt_one]
theorem logb_nonneg_iff_of_base_lt_one (hx : 0 < x) : 0 ≤ logb b x ↔ x ≤ 1 := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
⊢ 0 ≤ logb b x ↔ x ≤ 1

Next tactic:
rw [← not_lt, logb_neg_iff_of_base_lt_one b_pos b_lt_one hx, not_lt]
theorem logb_nonneg_of_base_lt_one (hx : 0 < x) (hx' : x ≤ 1) : 0 ≤ logb b x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hx' : x ≤ 1
⊢ 0 ≤ logb b x

Next tactic:
rw [logb_nonneg_iff_of_base_lt_one b_pos b_lt_one hx]
theorem logb_nonneg_of_base_lt_one (hx : 0 < x) (hx' : x ≤ 1) : 0 ≤ logb b x := by
  rw [logb_nonneg_iff_of_base_lt_one b_pos b_lt_one hx]
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hx' : x ≤ 1
⊢ x ≤ 1

Next tactic:
exact hx'
theorem logb_nonpos_iff_of_base_lt_one (hx : 0 < x) : logb b x ≤ 0 ↔ 1 ≤ x := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
⊢ logb b x ≤ 0 ↔ 1 ≤ x

Next tactic:
rw [← not_lt, logb_pos_iff_of_base_lt_one b_pos b_lt_one hx, not_lt]
theorem strictMonoOn_logb_of_base_lt_one : StrictMonoOn (logb b) (Set.Iio 0) := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
⊢ StrictMonoOn (logb b) (Iio 0)

Next tactic:
rintro x (hx : x < 0) y (hy : y < 0) hxy
theorem strictMonoOn_logb_of_base_lt_one : StrictMonoOn (logb b) (Set.Iio 0) := by
  rintro x (hx : x < 0) y (hy : y < 0) hxy
  

Proof state:
b x✝ y✝ : ℝ
b_pos : 0 < b
b_lt_one : b < 1
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ logb b x < logb b y

Next tactic:
rw [← logb_abs y, ← logb_abs x]
theorem strictMonoOn_logb_of_base_lt_one : StrictMonoOn (logb b) (Set.Iio 0) := by
  rintro x (hx : x < 0) y (hy : y < 0) hxy
  rw [← logb_abs y, ← logb_abs x]
  

Proof state:
b x✝ y✝ : ℝ
b_pos : 0 < b
b_lt_one : b < 1
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ logb b |x| < logb b |y|

Next tactic:
refine' logb_lt_logb_of_base_lt_one b_pos b_lt_one (abs_pos.2 hy.ne) _
theorem strictMonoOn_logb_of_base_lt_one : StrictMonoOn (logb b) (Set.Iio 0) := by
  rintro x (hx : x < 0) y (hy : y < 0) hxy
  rw [← logb_abs y, ← logb_abs x]
  refine' logb_lt_logb_of_base_lt_one b_pos b_lt_one (abs_pos.2 hy.ne) _
  

Proof state:
b x✝ y✝ : ℝ
b_pos : 0 < b
b_lt_one : b < 1
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ |y| < |x|

Next tactic:
rwa [abs_of_neg hy, abs_of_neg hx, neg_lt_neg_iff]
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
⊢ Tendsto (logb b) atTop atBot

Next tactic:
rw [tendsto_atTop_atBot]
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  rw [tendsto_atTop_atBot]
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
⊢ ∀ (b_1 : ℝ), ∃ i, ∀ (a : ℝ), i ≤ a → logb b a ≤ b_1

Next tactic:
intro e
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  rw [tendsto_atTop_atBot]
  intro e
  

Proof state:
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
e : ℝ
⊢ ∃ i, ∀ (a : ℝ), i ≤ a → logb b a ≤ e

Next tactic:
use 1 ⊔ b ^ e
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  rw [tendsto_atTop_atBot]
  intro e
  use 1 ⊔ b ^ e
  

Proof state:
case h
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
e : ℝ
⊢ ∀ (a : ℝ), 1 ⊔ b ^ e ≤ a → logb b a ≤ e

Next tactic:
intro a
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  rw [tendsto_atTop_atBot]
  intro e
  use 1 ⊔ b ^ e
  intro a
  

Proof state:
case h
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
e a : ℝ
⊢ 1 ⊔ b ^ e ≤ a → logb b a ≤ e

Next tactic:
simp only [and_imp, sup_le_iff]
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  rw [tendsto_atTop_atBot]
  intro e
  use 1 ⊔ b ^ e
  intro a
  simp only [and_imp, sup_le_iff]
  

Proof state:
case h
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
e a : ℝ
⊢ 1 ≤ a → b ^ e ≤ a → logb b a ≤ e

Next tactic:
intro ha
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  rw [tendsto_atTop_atBot]
  intro e
  use 1 ⊔ b ^ e
  intro a
  simp only [and_imp, sup_le_iff]
  intro ha
  

Proof state:
case h
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
e a : ℝ
ha : 1 ≤ a
⊢ b ^ e ≤ a → logb b a ≤ e

Next tactic:
rw [logb_le_iff_le_rpow_of_base_lt_one b_pos b_lt_one]
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  rw [tendsto_atTop_atBot]
  intro e
  use 1 ⊔ b ^ e
  intro a
  simp only [and_imp, sup_le_iff]
  intro ha
  rw [logb_le_iff_le_rpow_of_base_lt_one b_pos b_lt_one]
  

Proof state:
case h
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
e a : ℝ
ha : 1 ≤ a
⊢ b ^ e ≤ a → b ^ e ≤ a
case h b x y : ℝ b_pos : 0 < b b_lt_one : b < 1 e a : ℝ ha : 1 ≤ a ⊢ 0 < a

Next tactic:
tauto
theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot := by
  rw [tendsto_atTop_atBot]
  intro e
  use 1 ⊔ b ^ e
  intro a
  simp only [and_imp, sup_le_iff]
  intro ha
  rw [logb_le_iff_le_rpow_of_base_lt_one b_pos b_lt_one]
  tauto
  

Proof state:
case h
b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
e a : ℝ
ha : 1 ≤ a
⊢ 0 < a

Next tactic:
exact lt_of_lt_of_le zero_lt_one ha
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  

Proof state:
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr : 0 ≤ r
⊢ ⌊logb (↑b) r⌋ = Int.log b r

Next tactic:
obtain rfl | hr := hr.eq_or_lt
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  obtain rfl | hr := hr.eq_or_lt
  · 

Proof state:
case inl
b✝ x y : ℝ
b : ℕ
hb : 1 < b
hr : 0 ≤ 0
⊢ ⌊logb (↑b) 0⌋ = Int.log b 0

Next tactic:
rw [logb_zero, Int.log_zero_right, Int.floor_zero]
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.log_zero_right, Int.floor_zero]
  

Proof state:
case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
⊢ ⌊logb (↑b) r⌋ = Int.log b r

Next tactic:
have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.log_zero_right, Int.floor_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  

Proof state:
case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌊logb (↑b) r⌋ = Int.log b r

Next tactic:
apply le_antisymm
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.log_zero_right, Int.floor_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · 

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌊logb (↑b) r⌋ ≤ Int.log b r

Next tactic:
rw [← Int.zpow_le_iff_le_log hb hr, ← rpow_int_cast b]
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.log_zero_right, Int.floor_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · rw [← Int.zpow_le_iff_le_log hb hr, ← rpow_int_cast b]
    

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ r

Next tactic:
refine' le_of_le_of_eq _ (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr)
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.log_zero_right, Int.floor_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · rw [← Int.zpow_le_iff_le_log hb hr, ← rpow_int_cast b]
    refine' le_of_le_of_eq _ (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr)
    

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ ↑b ^ logb (↑b) r

Next tactic:
exact rpow_le_rpow_of_exponent_le hb1'.le (Int.floor_le _)
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.log_zero_right, Int.floor_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · rw [← Int.zpow_le_iff_le_log hb hr, ← rpow_int_cast b]
    refine' le_of_le_of_eq _ (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr)
    exact rpow_le_rpow_of_exponent_le hb1'.le (Int.floor_le _)
  · 

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ Int.log b r ≤ ⌊logb (↑b) r⌋

Next tactic:
rw [Int.le_floor, le_logb_iff_rpow_le hb1' hr, rpow_int_cast]
theorem floor_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.log_zero_right, Int.floor_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · rw [← Int.zpow_le_iff_le_log hb hr, ← rpow_int_cast b]
    refine' le_of_le_of_eq _ (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr)
    exact rpow_le_rpow_of_exponent_le hb1'.le (Int.floor_le _)
  · rw [Int.le_floor, le_logb_iff_rpow_le hb1' hr, rpow_int_cast]
    

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ Int.log b r ≤ r

Next tactic:
exact Int.zpow_log_le_self hb hr
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  

Proof state:
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr : 0 ≤ r
⊢ ⌈logb (↑b) r⌉ = Int.clog b r

Next tactic:
obtain rfl | hr := hr.eq_or_lt
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  obtain rfl | hr := hr.eq_or_lt
  · 

Proof state:
case inl
b✝ x y : ℝ
b : ℕ
hb : 1 < b
hr : 0 ≤ 0
⊢ ⌈logb (↑b) 0⌉ = Int.clog b 0

Next tactic:
rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
  

Proof state:
case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
⊢ ⌈logb (↑b) r⌉ = Int.clog b r

Next tactic:
have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  

Proof state:
case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌈logb (↑b) r⌉ = Int.clog b r

Next tactic:
apply le_antisymm
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · 

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌈logb (↑b) r⌉ ≤ Int.clog b r

Next tactic:
rw [Int.ceil_le, logb_le_iff_le_rpow hb1' hr, rpow_int_cast]
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · rw [Int.ceil_le, logb_le_iff_le_rpow hb1' hr, rpow_int_cast]
    

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ r ≤ ↑b ^ Int.clog b r

Next tactic:
refine' Int.self_le_zpow_clog hb r
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · rw [Int.ceil_le, logb_le_iff_le_rpow hb1' hr, rpow_int_cast]
    refine' Int.self_le_zpow_clog hb r
  · 

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ Int.clog b r ≤ ⌈logb (↑b) r⌉

Next tactic:
rw [← Int.le_zpow_iff_clog_le hb hr, ← rpow_int_cast b]
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · rw [Int.ceil_le, logb_le_iff_le_rpow hb1' hr, rpow_int_cast]
    refine' Int.self_le_zpow_clog hb r
  · rw [← Int.le_zpow_iff_clog_le hb hr, ← rpow_int_cast b]
    

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ r ≤ ↑b ^ ↑⌈logb (↑b) r⌉

Next tactic:
refine' (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr).symm.trans_le _
theorem ceil_logb_nat_cast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌈logb b r⌉ = Int.clog b r := by
  obtain rfl | hr := hr.eq_or_lt
  · rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
  have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
  apply le_antisymm
  · rw [Int.ceil_le, logb_le_iff_le_rpow hb1' hr, rpow_int_cast]
    refine' Int.self_le_zpow_clog hb r
  · rw [← Int.le_zpow_iff_clog_le hb hr, ← rpow_int_cast b]
    refine' (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr).symm.trans_le _
    

Proof state:
case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ logb (↑b) r ≤ ↑b ^ ↑⌈logb (↑b) r⌉

Next tactic:
exact rpow_le_rpow_of_exponent_le hb1'.le (Int.le_ceil _)
@[simp]
theorem logb_eq_zero : logb b x = 0 ↔ b = 0 ∨ b = 1 ∨ b = -1 ∨ x = 0 ∨ x = 1 ∨ x = -1 := by
  

Proof state:
b x y : ℝ
⊢ logb b x = 0 ↔ b = 0 ∨ b = 1 ∨ b = -1 ∨ x = 0 ∨ x = 1 ∨ x = -1

Next tactic:
simp_rw [logb, div_eq_zero_iff, log_eq_zero]
@[simp]
theorem logb_eq_zero : logb b x = 0 ↔ b = 0 ∨ b = 1 ∨ b = -1 ∨ x = 0 ∨ x = 1 ∨ x = -1 := by
  simp_rw [logb, div_eq_zero_iff, log_eq_zero]
  

Proof state:
b x y : ℝ
⊢ (x = 0 ∨ x = 1 ∨ x = -1) ∨ b = 0 ∨ b = 1 ∨ b = -1 ↔ b = 0 ∨ b = 1 ∨ b = -1 ∨ x = 0 ∨ x = 1 ∨ x = -1

Next tactic:
tauto
theorem logb_prod {α : Type*} (s : Finset α) (f : α → ℝ) (hf : ∀ x ∈ s, f x ≠ 0) :
    logb b (∏ i in s, f i) = ∑ i in s, logb b (f i) := by
  

Proof state:
b x y : ℝ
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ x ∈ s, f x ≠ 0
⊢ logb b (∏ i in s, f i) = ∑ i in s, logb b (f i)

Next tactic:
classical
    induction' s using Finset.induction_on with a s ha ih
    · simp
    simp only [Finset.mem_insert, forall_eq_or_imp] at hf
    simp [ha, ih hf.2, logb_mul hf.1 (Finset.prod_ne_zero_iff.2 hf.2)]
theorem logb_prod {α : Type*} (s : Finset α) (f : α → ℝ) (hf : ∀ x ∈ s, f x ≠ 0) :
    logb b (∏ i in s, f i) = ∑ i in s, logb b (f i) := by
  classical
    

Proof state:
b x y : ℝ
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ x ∈ s, f x ≠ 0
⊢ logb b (∏ i in s, f i) = ∑ i in s, logb b (f i)

Next tactic:
induction' s using Finset.induction_on with a s ha ih
theorem logb_prod {α : Type*} (s : Finset α) (f : α → ℝ) (hf : ∀ x ∈ s, f x ≠ 0) :
    logb b (∏ i in s, f i) = ∑ i in s, logb b (f i) := by
  classical
    induction' s using Finset.induction_on with a s ha ih
    · 

Proof state:
case empty
b x y : ℝ
α : Type u_1
f : α → ℝ
hf : ∀ x ∈ ∅, f x ≠ 0
⊢ logb b (∏ i in ∅, f i) = ∑ i in ∅, logb b (f i)

Next tactic:
simp
theorem logb_prod {α : Type*} (s : Finset α) (f : α → ℝ) (hf : ∀ x ∈ s, f x ≠ 0) :
    logb b (∏ i in s, f i) = ∑ i in s, logb b (f i) := by
  classical
    induction' s using Finset.induction_on with a s ha ih
    · simp
    

Proof state:
case insert
b x y : ℝ
α : Type u_1
f : α → ℝ
a : α
s : Finset α
ha : a ∉ s
ih : (∀ x ∈ s, f x ≠ 0) → logb b (∏ i in s, f i) = ∑ i in s, logb b (f i)
hf : ∀ x ∈ insert a s, f x ≠ 0
⊢ logb b (∏ i in insert a s, f i) = ∑ i in insert a s, logb b (f i)

Next tactic:
simp only [Finset.mem_insert, forall_eq_or_imp] at hf