@@ -26,8 +26,8 @@ import Mathlib.Algebra.Group.Pointwise.Finset.Density
2626import Mathlib.Algebra.Order.Floor.Semifield
2727import Mathlib.Analysis.Complex.ExponentialBounds
2828import Mathlib.Data.Real.StarOrdered
29- import Mathlib.MeasureTheory.Integral.Bochner.Basic
3029import Mathlib.FieldTheory.Finiteness
30+ import Mathlib.MeasureTheory.Integral.Bochner.Basic
3131
3232/-!
3333# Finite field case
@@ -44,22 +44,21 @@ variable {G : Type u} [AddCommGroup G] [Fintype G] {A C : Finset G} {x y γ ε :
4444
4545local notation "𝓛" x:arg => 1 + log x⁻¹
4646
47- private lemma one_le_curlog (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1 ) : 1 ≤ 𝓛 x := by
47+ lemma one_le_curlog (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1 ) : 1 ≤ 𝓛 x := by
4848 obtain rfl | hx₀ := hx₀.eq_or_lt
4949 · simp
5050 have : 0 ≤ log x⁻¹ := by bound
5151 linarith
5252
53- private lemma curlog_pos (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1 ) : 0 < 𝓛 x := by
53+ lemma curlog_pos (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1 ) : 0 < 𝓛 x := by
5454 obtain rfl | hx₀ := hx₀.eq_or_lt
5555 · simp
5656 have : 0 ≤ log x⁻¹ := by bound
5757 positivity
5858
59- set_option linter.flexible false in
60- private lemma rpow_inv_neg_curlog_le (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1 ) : x⁻¹ ^ (𝓛 x)⁻¹ ≤ exp 1 := by
59+ lemma rpow_inv_neg_curlog_le (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1 ) : x⁻¹ ^ (𝓛 x)⁻¹ ≤ exp 1 := by
6160 obtain rfl | hx₀ := hx₀.eq_or_lt
62- · simp; positivity
61+ · simp [(exp_pos _).le]
6362 obtain rfl | hx₁ := hx₁.eq_or_lt
6463 · simp
6564 have hx := (one_lt_inv₀ hx₀).2 hx₁
@@ -71,7 +70,7 @@ private lemma rpow_inv_neg_curlog_le (hx₀ : 0 ≤ x) (hx₁ : x ≤ 1) : x⁻
7170 · simp
7271 _ ≤ exp 1 := x⁻¹.rpow_inv_log_le_exp_one
7372
74- private lemma curlog_mul_le (hx₀ : 0 < x) (hx₁ : x ≤ 1 ) (hy₀ : 0 < y) (hy₁ : y ≤ 1 ) :
73+ lemma curlog_mul_le (hx₀ : 0 < x) (hx₁ : x ≤ 1 ) (hy₀ : 0 < y) (hy₁ : y ≤ 1 ) :
7574 𝓛 (x * y) ≤ x⁻¹ * 𝓛 y := by
7675 suffices h : log x⁻¹ - (x⁻¹ - 1 ) ≤ (x⁻¹ - 1 ) * log y⁻¹ by
7776 rw [← sub_nonneg] at h ⊢
@@ -83,11 +82,10 @@ private lemma curlog_mul_le (hx₀ : 0 < x) (hx₁ : x ≤ 1) (hy₀ : 0 < y) (h
8382 log x⁻¹ - (x⁻¹ - 1 ) ≤ 0 := sub_nonpos.2 <| log_le_sub_one_of_pos <| by positivity
8483 _ ≤ (x⁻¹ - 1 ) * log y⁻¹ := mul_nonneg (sub_nonneg.2 <| (one_le_inv₀ hx₀).2 hx₁) <| by bound
8584
86- private lemma curlog_div_le (hx₀ : 0 < x) (hx₁ : x ≤ 1 ) (hy : 1 ≤ y) :
87- 𝓛 (x / y) ≤ y * 𝓛 x := by
85+ lemma curlog_div_le (hx₀ : 0 < x) (hx₁ : x ≤ 1 ) (hy : 1 ≤ y) : 𝓛 (x / y) ≤ y * 𝓛 x := by
8886 simpa [div_eq_inv_mul] using curlog_mul_le (by positivity) (inv_le_one_of_one_le₀ hy) hx₀ hx₁
8987
90- private lemma curlog_rpow_le' (hx₀ : 0 < x) (hx₁ : x ≤ 1 ) (hy₀ : 0 < y) (hy₁ : y ≤ 1 ) :
88+ lemma curlog_rpow_le' (hx₀ : 0 < x) (hx₁ : x ≤ 1 ) (hy₀ : 0 < y) (hy₁ : y ≤ 1 ) :
9189 𝓛 (x ^ y) ≤ y⁻¹ * 𝓛 x := by
9290 suffices h : 1 - y⁻¹ ≤ (y⁻¹ - y) * log x⁻¹ by
9391 rw [← sub_nonneg] at h ⊢
@@ -99,12 +97,10 @@ private lemma curlog_rpow_le' (hx₀ : 0 < x) (hx₁ : x ≤ 1) (hy₀ : 0 < y)
9997 1 - y⁻¹ ≤ 0 := sub_nonpos.2 <| (one_le_inv₀ hy₀).2 hy₁
10098 _ ≤ (y⁻¹ - y) * log x⁻¹ := mul_nonneg (sub_nonneg.2 <| hy₁.trans <| by bound) <| by bound
10199
102- private lemma curlog_rpow_le (hx₀ : 0 < x) (hy : 1 ≤ y) : 𝓛 (x ^ y) ≤ y * 𝓛 x := by
103- rw [← inv_rpow, log_rpow, mul_one_add]
104- any_goals positivity
105- gcongr
100+ lemma curlog_rpow_le (hx₀ : 0 < x) (hy : 1 ≤ y) : 𝓛 (x ^ y) ≤ y * 𝓛 x := by
101+ grw [← inv_rpow, log_rpow, mul_one_add, hy] <;> positivity
106102
107- private lemma curlog_pow_le {n : ℕ} (hx₀ : 0 < x) (hn : n ≠ 0 ) : 𝓛 (x ^ n) ≤ n * 𝓛 x := by
103+ lemma curlog_pow_le {n : ℕ} (hx₀ : 0 < x) (hn : n ≠ 0 ) : 𝓛 (x ^ n) ≤ n * 𝓛 x := by
108104 rw [← rpow_natCast]; exact curlog_rpow_le hx₀ <| mod_cast Nat.one_le_iff_ne_zero.2 hn
109105
110106set_option backward.isDefEq.respectTransparency false in
0 commit comments