[GOAL]
x : ℝ
⊢ LiouvilleWith 1 x
[PROOFSTEP]
use 2
[GOAL]
case h
x : ℝ
⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1
[PROOFSTEP]
refine ((eventually_gt_atTop 0).mono fun n hn => ?_).frequently
[GOAL]
case h
x : ℝ
n : ℕ
hn : 0 < n
⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1
[PROOFSTEP]
have hn' : (0 : ℝ) < n := by simpa
[GOAL]
x : ℝ
n : ℕ
hn : 0 < n
⊢ 0 < ↑n
[PROOFSTEP]
simpa
[GOAL]
case h
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1
[PROOFSTEP]
have : x < ↑(⌊x * ↑n⌋ + 1) / ↑n := by rw [lt_div_iff hn', Int.cast_add, Int.cast_one]; exact Int.lt_floor_add_one _
[GOAL]
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
⊢ x < ↑(⌊x * ↑n⌋ + 1) / ↑n
[PROOFSTEP]
rw [lt_div_iff hn', Int.cast_add, Int.cast_one]
[GOAL]
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
⊢ x * ↑n < ↑⌊x * ↑n⌋ + 1
[PROOFSTEP]
exact Int.lt_floor_add_one _
[GOAL]
case h
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1
[PROOFSTEP]
refine ⟨⌊x * n⌋ + 1, this.ne, ?_⟩
[GOAL]
case h
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1
[PROOFSTEP]
rw [abs_sub_comm, abs_of_pos (sub_pos.2 this), rpow_one, sub_lt_iff_lt_add', add_div_eq_mul_add_div _ _ hn'.ne',
  div_lt_div_right hn']
[GOAL]
case h
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ ↑(⌊x * ↑n⌋ + 1) < x * ↑n + 2
[PROOFSTEP]
convert add_lt_add_right ((Int.floor_le (x * n)).trans_lt (lt_add_one _)) 1 using 1
[GOAL]
case h.e'_3
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ ↑(⌊x * ↑n⌋ + 1) = ↑⌊x * ↑n⌋ + 1
[PROOFSTEP]
try push_cast
[GOAL]
case h.e'_3
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ ↑(⌊x * ↑n⌋ + 1) = ↑⌊x * ↑n⌋ + 1
[PROOFSTEP]
push_cast
[GOAL]
case h.e'_4
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ x * ↑n + 2 = x * ↑n + 1 + 1
[PROOFSTEP]
try push_cast
[GOAL]
case h.e'_4
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ x * ↑n + 2 = x * ↑n + 1 + 1
[PROOFSTEP]
push_cast
[GOAL]
case h.e'_3
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ ↑⌊x * ↑n⌋ + 1 = ↑⌊x * ↑n⌋ + 1
[PROOFSTEP]
ring
[GOAL]
case h.e'_4
x : ℝ
n : ℕ
hn : 0 < n
hn' : 0 < ↑n
this : x < ↑(⌊x * ↑n⌋ + 1) / ↑n
⊢ x * ↑n + 2 = x * ↑n + 1 + 1
[PROOFSTEP]
ring
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
⊢ ∃ C _h₀, ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
[PROOFSTEP]
rcases h with ⟨C, hC⟩
[GOAL]
case intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∃ C _h₀, ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
[PROOFSTEP]
refine ⟨max C 1, zero_lt_one.trans_le <| le_max_right _ _, ?_⟩
[GOAL]
case intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < max C 1 / ↑n ^ p
[PROOFSTEP]
refine ((eventually_ge_atTop 1).and_frequently hC).mono ?_
[GOAL]
case intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∀ (x_1 : ℕ),
    (1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →
      1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < max C 1 / ↑x_1 ^ p
[PROOFSTEP]
rintro n ⟨hle, m, hne, hlt⟩
[GOAL]
case intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hle : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < max C 1 / ↑n ^ p
[PROOFSTEP]
refine ⟨hle, m, hne, hlt.trans_le ?_⟩
[GOAL]
case intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hle : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ C / ↑n ^ p ≤ max C 1 / ↑n ^ p
[PROOFSTEP]
exact div_le_div_of_le (rpow_nonneg_of_nonneg n.cast_nonneg _) (le_max_left _ _)
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hle : q ≤ p
⊢ LiouvilleWith q x
[PROOFSTEP]
rcases h.exists_pos with ⟨C, hC₀, hC⟩
[GOAL]
case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hle : q ≤ p
C : ℝ
hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ LiouvilleWith q x
[PROOFSTEP]
refine ⟨C, hC.mono ?_⟩
[GOAL]
case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hle : q ≤ p
C : ℝ
hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∀ (x_1 : ℕ),
    (1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →
      ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ q
[PROOFSTEP]
rintro n ⟨hn, m, hne, hlt⟩
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hle : q ≤ p
C : ℝ
hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ q
[PROOFSTEP]
refine ⟨m, hne, hlt.trans_le <| div_le_div_of_le_left hC₀.le ?_ ?_⟩
[GOAL]
case intro.intro.intro.intro.intro.refine_1
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hle : q ≤ p
C : ℝ
hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ 0 < ↑n ^ q
case intro.intro.intro.intro.intro.refine_2
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hle : q ≤ p
C : ℝ
hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ↑n ^ q ≤ ↑n ^ p
[PROOFSTEP]
exacts [rpow_pos_of_pos (Nat.cast_pos.2 hn) _, rpow_le_rpow_of_exponent_le (Nat.one_le_cast.2 hn) hle]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hlt : q < p
⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)
[PROOFSTEP]
rcases h.exists_pos with ⟨C, _hC₀, hC⟩
[GOAL]
case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hlt : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)
[PROOFSTEP]
have : ∀ᶠ n : ℕ in atTop, C < n ^ (p - q) := by
  simpa only [(· ∘ ·), neg_sub, one_div] using
    ((tendsto_rpow_atTop (sub_pos.2 hlt)).comp tendsto_nat_cast_atTop_atTop).eventually (eventually_gt_atTop C)
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hlt : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
[PROOFSTEP]
simpa only [(· ∘ ·), neg_sub, one_div] using
  ((tendsto_rpow_atTop (sub_pos.2 hlt)).comp tendsto_nat_cast_atTop_atTop).eventually (eventually_gt_atTop C)
[GOAL]
case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hlt : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
⊢ ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)
[PROOFSTEP]
refine (this.and_frequently hC).mono ?_
[GOAL]
case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hlt : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
⊢ ∀ (x_1 : ℕ),
    (C < ↑x_1 ^ (p - q) ∧ 1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →
      ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < ↑x_1 ^ (-q)
[PROOFSTEP]
rintro n ⟨hnC, hn, m, hne, hlt⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hlt✝ : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
n : ℕ
hnC : C < ↑n ^ (p - q)
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)
[PROOFSTEP]
replace hn : (0 : ℝ) < n := Nat.cast_pos.2 hn
[GOAL]
case intro.intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hlt✝ : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
n : ℕ
hnC : C < ↑n ^ (p - q)
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hn : 0 < ↑n
⊢ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < ↑n ^ (-q)
[PROOFSTEP]
refine ⟨m, hne, hlt.trans <| (div_lt_iff <| rpow_pos_of_pos hn _).2 ?_⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hlt✝ : q < p
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
this : ∀ᶠ (n : ℕ) in atTop, C < ↑n ^ (p - q)
n : ℕ
hnC : C < ↑n ^ (p - q)
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hn : 0 < ↑n
⊢ C < ↑n ^ (-q) * ↑n ^ p
[PROOFSTEP]
rwa [mul_comm, ← rpow_add hn, ← sub_eq_add_neg]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
⊢ LiouvilleWith p (x * ↑r)
[PROOFSTEP]
rcases h.exists_pos with ⟨C, _hC₀, hC⟩
[GOAL]
case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ LiouvilleWith p (x * ↑r)
[PROOFSTEP]
refine ⟨r.den ^ p * (|r| * C), (tendsto_id.nsmul_atTop r.pos).frequently (hC.mono ?_)⟩
[GOAL]
case intro.intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∀ (x_1 : ℕ),
    (1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →
      ∃ m,
        x * ↑r ≠ ↑m / ↑(r.den • id x_1) ∧
          |x * ↑r - ↑m / ↑(r.den • id x_1)| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id x_1) ^ p
[PROOFSTEP]
rintro n ⟨_hn, m, hne, hlt⟩
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∃ m, x * ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x * ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id n) ^ p
[PROOFSTEP]
have A : (↑(r.num * m) : ℝ) / ↑(r.den • id n) = m / n * r := by simp [← div_mul_div_comm, ← r.cast_def, mul_comm]
[GOAL]
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
[PROOFSTEP]
simp [← div_mul_div_comm, ← r.cast_def, mul_comm]
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ ∃ m, x * ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x * ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id n) ^ p
[PROOFSTEP]
refine ⟨r.num * m, ?_, ?_⟩
[GOAL]
case intro.intro.intro.intro.intro.refine_1
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ x * ↑r ≠ ↑(r.num * m) / ↑(r.den • id n)
[PROOFSTEP]
rw [A]
[GOAL]
case intro.intro.intro.intro.intro.refine_1
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ x * ↑r ≠ ↑m / ↑n * ↑r
[PROOFSTEP]
simp [hne, hr]
[GOAL]
case intro.intro.intro.intro.intro.refine_2
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ |x * ↑r - ↑(r.num * m) / ↑(r.den • id n)| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id n) ^ p
[PROOFSTEP]
rw [A, ← sub_mul, abs_mul]
[GOAL]
case intro.intro.intro.intro.intro.refine_2
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ |x - ↑m / ↑n| * |↑r| < ↑r.den ^ p * (↑|r| * C) / ↑(r.den • id n) ^ p
[PROOFSTEP]
simp only [smul_eq_mul, id.def, Nat.cast_mul]
[GOAL]
case intro.intro.intro.intro.intro.refine_2
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ |x - ↑m / ↑n| * |↑r| < ↑r.den ^ p * (↑|r| * C) / (↑r.den * ↑n) ^ p
[PROOFSTEP]
refine (mul_lt_mul_of_pos_right hlt <| abs_pos.2 <| Rat.cast_ne_zero.2 hr).trans_le ?_
[GOAL]
case intro.intro.intro.intro.intro.refine_2
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ C / ↑n ^ p * |↑r| ≤ ↑r.den ^ p * (↑|r| * C) / (↑r.den * ↑n) ^ p
[PROOFSTEP]
rw [mul_rpow, mul_div_mul_left, mul_comm, mul_div_assoc]
[GOAL]
case intro.intro.intro.intro.intro.refine_2
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ |↑r| * (C / ↑n ^ p) ≤ ↑|r| * (C / ↑n ^ p)
[PROOFSTEP]
simp only [Rat.cast_abs, le_refl]
[GOAL]
case intro.intro.intro.intro.intro.refine_2.hc
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ ↑r.den ^ p ≠ 0
[PROOFSTEP]
exact (rpow_pos_of_pos (Nat.cast_pos.2 r.pos) _).ne'
[GOAL]
case intro.intro.intro.intro.intro.refine_2.h
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ 0 ≤ ↑r.den
[PROOFSTEP]
exact Nat.cast_nonneg _
[GOAL]
case intro.intro.intro.intro.intro.refine_2.h₁
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
hr : r ≠ 0
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
_hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
A : ↑(r.num * m) / ↑(r.den • id n) = ↑m / ↑n * ↑r
⊢ 0 ≤ ↑n
[PROOFSTEP]
exact Nat.cast_nonneg _
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
hr : r ≠ 0
h : LiouvilleWith p (x * ↑r)
⊢ LiouvilleWith p x
[PROOFSTEP]
simpa only [mul_assoc, ← Rat.cast_mul, mul_inv_cancel hr, Rat.cast_one, mul_one] using h.mul_rat (inv_ne_zero hr)
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
hr : r ≠ 0
⊢ LiouvilleWith p (↑r * x) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [mul_comm, mul_rat_iff hr]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
hm : m ≠ 0
⊢ LiouvilleWith p (x * ↑m) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [← Rat.cast_coe_int, mul_rat_iff (Int.cast_ne_zero.2 hm)]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
hm : m ≠ 0
⊢ LiouvilleWith p (↑m * x) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [mul_comm, mul_int_iff hm]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
hn : n ≠ 0
⊢ LiouvilleWith p (x * ↑n) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [← Rat.cast_coe_nat, mul_rat_iff (Nat.cast_ne_zero.2 hn)]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
hn : n ≠ 0
⊢ LiouvilleWith p (↑n * x) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [mul_comm, mul_nat_iff hn]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hn : n ≠ 0
⊢ LiouvilleWith p (↑n * x)
[PROOFSTEP]
rw [mul_comm]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hn : n ≠ 0
⊢ LiouvilleWith p (x * ↑n)
[PROOFSTEP]
exact h.mul_nat hn
[GOAL]
p q x y : ℝ
r✝ : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
r : ℚ
⊢ LiouvilleWith p (x + ↑r)
[PROOFSTEP]
rcases h.exists_pos with ⟨C, _hC₀, hC⟩
[GOAL]
case intro.intro
p q x y : ℝ
r✝ : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ LiouvilleWith p (x + ↑r)
[PROOFSTEP]
refine ⟨r.den ^ p * C, (tendsto_id.nsmul_atTop r.pos).frequently (hC.mono ?_)⟩
[GOAL]
case intro.intro
p q x y : ℝ
r✝ : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∀ (x_1 : ℕ),
    (1 ≤ x_1 ∧ ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) →
      ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id x_1) ∧ |x + ↑r - ↑m / ↑(r.den • id x_1)| < ↑r.den ^ p * C / ↑(r.den • id x_1) ^ p
[PROOFSTEP]
rintro n ⟨hn, m, hne, hlt⟩
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x + ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p
[PROOFSTEP]
have hr : (0 : ℝ) < r.den := Nat.cast_pos.2 r.pos
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
⊢ ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x + ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p
[PROOFSTEP]
have hn' : (n : ℝ) ≠ 0 := Nat.cast_ne_zero.2 (zero_lt_one.trans_le hn).ne'
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
⊢ ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x + ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p
[PROOFSTEP]
have : (↑(r.den * m + r.num * n : ℤ) / ↑(r.den • id n) : ℝ) = m / n + r :=
  by
  rw [Algebra.id.smul_eq_mul, id.def]
  nth_rewrite 4 [← Rat.num_div_den r]
  push_cast
  rw [add_div, mul_div_mul_left _ _ (ne_of_gt hr), mul_div_mul_right _ _ hn']
[GOAL]
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
⊢ ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r
[PROOFSTEP]
rw [Algebra.id.smul_eq_mul, id.def]
[GOAL]
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
⊢ ↑(↑r.den * m + r.num * ↑n) / ↑(r.den * n) = ↑m / ↑n + ↑r
[PROOFSTEP]
nth_rewrite 4 [← Rat.num_div_den r]
[GOAL]
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
⊢ ↑(↑r.den * m + r.num * ↑n) / ↑(r.den * n) = ↑m / ↑n + ↑(↑r.num / ↑r.den)
[PROOFSTEP]
push_cast
[GOAL]
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
⊢ (↑r.den * ↑m + ↑r.num * ↑n) / (↑r.den * ↑n) = ↑m / ↑n + ↑r.num / ↑r.den
[PROOFSTEP]
rw [add_div, mul_div_mul_left _ _ (ne_of_gt hr), mul_div_mul_right _ _ hn']
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
this : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r
⊢ ∃ m, x + ↑r ≠ ↑m / ↑(r.den • id n) ∧ |x + ↑r - ↑m / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p
[PROOFSTEP]
refine ⟨r.den * m + r.num * n, ?_⟩
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
this : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r
⊢ x + ↑r ≠ ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) ∧
    |x + ↑r - ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n)| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p
[PROOFSTEP]
rw [this, add_sub_add_right_eq_sub]
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
this : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r
⊢ x + ↑r ≠ ↑m / ↑n + ↑r ∧ |x - ↑m / ↑n| < ↑r.den ^ p * C / ↑(r.den • id n) ^ p
[PROOFSTEP]
refine ⟨by simpa, hlt.trans_le (le_of_eq ?_)⟩
[GOAL]
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
this : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r
⊢ x + ↑r ≠ ↑m / ↑n + ↑r
[PROOFSTEP]
simpa
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
this : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r
⊢ C / ↑n ^ p = ↑r.den ^ p * C / ↑(r.den • id n) ^ p
[PROOFSTEP]
have : (r.den ^ p : ℝ) ≠ 0 := (rpow_pos_of_pos hr _).ne'
[GOAL]
case intro.intro.intro.intro.intro
p q x y : ℝ
r✝ : ℚ
m✝ : ℤ
n✝ : ℕ
h : LiouvilleWith p x
r : ℚ
C : ℝ
_hC₀ : 0 < C
hC : ∃ᶠ (n : ℕ) in atTop, 1 ≤ n ∧ ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
hn : 1 ≤ n
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
hr : 0 < ↑r.den
hn' : ↑n ≠ 0
this✝ : ↑(↑r.den * m + r.num * ↑n) / ↑(r.den • id n) = ↑m / ↑n + ↑r
this : ↑r.den ^ p ≠ 0
⊢ C / ↑n ^ p = ↑r.den ^ p * C / ↑(r.den • id n) ^ p
[PROOFSTEP]
simp [mul_rpow, Nat.cast_nonneg, mul_div_mul_left, this]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p (x + ↑r)
⊢ LiouvilleWith p x
[PROOFSTEP]
simpa using h.add_rat (-r)
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (↑r + x) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [add_comm, add_rat_iff]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x + ↑m) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [← Rat.cast_coe_int m, add_rat_iff]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (↑m + x) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [add_comm, add_int_iff]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x + ↑n) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [← Rat.cast_coe_nat n, add_rat_iff]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (↑n + x) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [add_comm, add_nat_iff]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
⊢ LiouvilleWith p (-x)
[PROOFSTEP]
rcases h with ⟨C, hC⟩
[GOAL]
case intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ LiouvilleWith p (-x)
[PROOFSTEP]
refine ⟨C, hC.mono ?_⟩
[GOAL]
case intro
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∀ (x_1 : ℕ),
    (∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < C / ↑x_1 ^ p) → ∃ m, -x ≠ ↑m / ↑x_1 ∧ |-x - ↑m / ↑x_1| < C / ↑x_1 ^ p
[PROOFSTEP]
rintro n ⟨m, hne, hlt⟩
[GOAL]
case intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ∃ m, -x ≠ ↑m / ↑n ∧ |-x - ↑m / ↑n| < C / ↑n ^ p
[PROOFSTEP]
refine ⟨-m, by simp [neg_div, hne], ?_⟩
[GOAL]
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ -x ≠ ↑(-m) / ↑n
[PROOFSTEP]
simp [neg_div, hne]
[GOAL]
case intro.intro.intro
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ |-x - ↑(-m) / ↑n| < C / ↑n ^ p
[PROOFSTEP]
convert hlt using 1
[GOAL]
case h.e'_3
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ |-x - ↑(-m) / ↑n| = |x - ↑m / ↑n|
[PROOFSTEP]
rw [abs_sub_comm]
[GOAL]
case h.e'_3
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ |↑(-m) / ↑n - -x| = |x - ↑m / ↑n|
[PROOFSTEP]
congr! 1
[GOAL]
case h.e'_3.h.e'_3
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ ↑(-m) / ↑n - -x = x - ↑m / ↑n
[PROOFSTEP]
push_cast
[GOAL]
case h.e'_3.h.e'_3
p q x y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
C : ℝ
hC : ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < C / ↑n ^ p
n : ℕ
m : ℤ
hne : x ≠ ↑m / ↑n
hlt : |x - ↑m / ↑n| < C / ↑n ^ p
⊢ -↑m / ↑n - -x = x - ↑m / ↑n
[PROOFSTEP]
ring
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x - ↑r) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [sub_eq_add_neg, ← Rat.cast_neg, add_rat_iff]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x - ↑m) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [← Rat.cast_coe_int, sub_rat_iff]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x - ↑n) ↔ LiouvilleWith p x
[PROOFSTEP]
rw [← Rat.cast_coe_nat, sub_rat_iff]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (↑r - x) ↔ LiouvilleWith p x
[PROOFSTEP]
simp [sub_eq_add_neg]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (↑m - x) ↔ LiouvilleWith p x
[PROOFSTEP]
simp [sub_eq_add_neg]
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (↑n - x) ↔ LiouvilleWith p x
[PROOFSTEP]
simp [sub_eq_add_neg]
[GOAL]
p q x y : ℝ
r : ℚ
m✝ : ℤ
n : ℕ
h : LiouvilleWith p x
hp : 1 < p
m : ℤ
⊢ x ≠ ↑m
[PROOFSTEP]
rintro rfl
[GOAL]
p q y : ℝ
r : ℚ
m✝ : ℤ
n : ℕ
hp : 1 < p
m : ℤ
h : LiouvilleWith p ↑m
⊢ False
[PROOFSTEP]
rename' m => M
[GOAL]
p q y : ℝ
r : ℚ
m : ℤ
n : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
⊢ False
[PROOFSTEP]
rcases((eventually_gt_atTop 0).and_frequently (h.frequently_lt_rpow_neg hp)).exists with
  ⟨n : ℕ, hn : 0 < n, m : ℤ, hne : (M : ℝ) ≠ m / n, hlt : |(M - m / n : ℝ)| < n ^ (-1 : ℝ)⟩
[GOAL]
case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)
⊢ False
[PROOFSTEP]
refine hlt.not_le ?_
[GOAL]
case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)
⊢ ↑n ^ (-1) ≤ |↑M - ↑m / ↑n|
[PROOFSTEP]
have hn' : (0 : ℝ) < n := by simpa
[GOAL]
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)
⊢ 0 < ↑n
[PROOFSTEP]
simpa
[GOAL]
case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ ↑n ^ (-1) ≤ |↑M - ↑m / ↑n|
[PROOFSTEP]
rw [rpow_neg_one, ← one_div, sub_div' _ _ _ hn'.ne', abs_div, Nat.abs_cast, div_le_div_right hn']
[GOAL]
case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ 1 ≤ |↑M * ↑n - ↑m|
[PROOFSTEP]
norm_cast
[GOAL]
case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ 1 ≤ |M * ↑n - m|
[PROOFSTEP]
rw [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
[GOAL]
case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ↑M ≠ ↑m / ↑n
hlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ M * ↑n ≠ m
[PROOFSTEP]
rw [Ne.def, eq_div_iff hn'.ne'] at hne
[GOAL]
case intro.intro.intro.intro
p q y : ℝ
r : ℚ
m✝ : ℤ
n✝ : ℕ
hp : 1 < p
M : ℤ
h : LiouvilleWith p ↑M
n : ℕ
hn : 0 < n
m : ℤ
hne : ¬↑M * ↑n = ↑m
hlt : |↑M - ↑m / ↑n| < ↑n ^ (-1)
hn' : 0 < ↑n
⊢ M * ↑n ≠ m
[PROOFSTEP]
exact_mod_cast hne
[GOAL]
p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hp : 1 < p
⊢ Irrational x
[PROOFSTEP]
rintro ⟨r, rfl⟩
[GOAL]
case intro
p q y : ℝ
r✝ : ℚ
m : ℤ
n : ℕ
hp : 1 < p
r : ℚ
h : LiouvilleWith p ↑r
⊢ False
[PROOFSTEP]
rcases eq_or_ne r 0 with (rfl | h0)
[GOAL]
case intro.inl
p q y : ℝ
r : ℚ
m : ℤ
n : ℕ
hp : 1 < p
h : LiouvilleWith p ↑0
⊢ False
[PROOFSTEP]
refine h.ne_cast_int hp 0 ?_
[GOAL]
case intro.inl
p q y : ℝ
r : ℚ
m : ℤ
n : ℕ
hp : 1 < p
h : LiouvilleWith p ↑0
⊢ ↑0 = ↑0
[PROOFSTEP]
rw [Rat.cast_zero, Int.cast_zero]
[GOAL]
case intro.inr
p q y : ℝ
r✝ : ℚ
m : ℤ
n : ℕ
hp : 1 < p
r : ℚ
h : LiouvilleWith p ↑r
h0 : r ≠ 0
⊢ False
[PROOFSTEP]
refine (h.mul_rat (inv_ne_zero h0)).ne_cast_int hp 1 ?_
[GOAL]
case intro.inr
p q y : ℝ
r✝ : ℚ
m : ℤ
n : ℕ
hp : 1 < p
r : ℚ
h : LiouvilleWith p ↑r
h0 : r ≠ 0
⊢ ↑r * ↑r⁻¹ = ↑1
[PROOFSTEP]
rw [Rat.cast_inv, mul_inv_cancel]
[GOAL]
case intro.inr
p q y : ℝ
r✝ : ℚ
m : ℤ
n : ℕ
hp : 1 < p
r : ℚ
h : LiouvilleWith p ↑r
h0 : r ≠ 0
⊢ 1 = ↑1
case intro.inr p q y : ℝ r✝ : ℚ m : ℤ n : ℕ hp : 1 < p r : ℚ h : LiouvilleWith p ↑r h0 : r ≠ 0 ⊢ ↑r ≠ 0
[PROOFSTEP]
exacts [Int.cast_one.symm, Rat.cast_ne_zero.mpr h0]
[GOAL]
x : ℝ
hx : Liouville x
n : ℕ
⊢ ∃ᶠ (b : ℕ) in atTop, ∃ a, x ≠ ↑a / ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ n
[PROOFSTEP]
refine Classical.not_not.1 fun H => ?_
[GOAL]
x : ℝ
hx : Liouville x
n : ℕ
H : ¬∃ᶠ (b : ℕ) in atTop, ∃ a, x ≠ ↑a / ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ n
⊢ False
[PROOFSTEP]
simp only [Liouville, not_forall, not_exists, not_frequently, not_and, not_lt, eventually_atTop] at H
[GOAL]
x : ℝ
hx : Liouville x
n : ℕ
H : ∃ a, ∀ (b : ℕ), b ≥ a → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
⊢ False
[PROOFSTEP]
rcases H with ⟨N, hN⟩
[GOAL]
case intro
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
⊢ False
[PROOFSTEP]
have : ∀ b > (1 : ℕ), ∀ᶠ m : ℕ in atTop, ∀ a : ℤ, 1 / (b : ℝ) ^ m ≤ |x - a / b| :=
  by
  intro b hb
  replace hb : (1 : ℝ) < b := Nat.one_lt_cast.2 hb
  have H : Tendsto (fun m => 1 / (b : ℝ) ^ m : ℕ → ℝ) atTop (𝓝 0) :=
    by
    simp only [one_div]
    exact tendsto_inv_atTop_zero.comp (tendsto_pow_atTop_atTop_of_one_lt hb)
  refine (H.eventually (hx.irrational.eventually_forall_le_dist_cast_div b)).mono ?_
  exact fun m hm a => hm a
[GOAL]
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
⊢ ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
[PROOFSTEP]
intro b hb
[GOAL]
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
b : ℕ
hb : b > 1
⊢ ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
[PROOFSTEP]
replace hb : (1 : ℝ) < b := Nat.one_lt_cast.2 hb
[GOAL]
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
b : ℕ
hb : 1 < ↑b
⊢ ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
[PROOFSTEP]
have H : Tendsto (fun m => 1 / (b : ℝ) ^ m : ℕ → ℝ) atTop (𝓝 0) :=
  by
  simp only [one_div]
  exact tendsto_inv_atTop_zero.comp (tendsto_pow_atTop_atTop_of_one_lt hb)
[GOAL]
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
b : ℕ
hb : 1 < ↑b
⊢ Tendsto (fun m => 1 / ↑b ^ m) atTop (𝓝 0)
[PROOFSTEP]
simp only [one_div]
[GOAL]
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
b : ℕ
hb : 1 < ↑b
⊢ Tendsto (fun m => (↑b ^ m)⁻¹) atTop (𝓝 0)
[PROOFSTEP]
exact tendsto_inv_atTop_zero.comp (tendsto_pow_atTop_atTop_of_one_lt hb)
[GOAL]
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
b : ℕ
hb : 1 < ↑b
H : Tendsto (fun m => 1 / ↑b ^ m) atTop (𝓝 0)
⊢ ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
[PROOFSTEP]
refine (H.eventually (hx.irrational.eventually_forall_le_dist_cast_div b)).mono ?_
[GOAL]
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
b : ℕ
hb : 1 < ↑b
H : Tendsto (fun m => 1 / ↑b ^ m) atTop (𝓝 0)
⊢ ∀ (x_1 : ℕ), (∀ (m : ℤ), 1 / ↑b ^ x_1 ≤ dist x (↑m / ↑b)) → ∀ (a : ℤ), 1 / ↑b ^ x_1 ≤ |x - ↑a / ↑b|
[PROOFSTEP]
exact fun m hm a => hm a
[GOAL]
case intro
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
⊢ False
[PROOFSTEP]
have : ∀ᶠ m : ℕ in atTop, ∀ b < N, 1 < b → ∀ a : ℤ, 1 / (b : ℝ) ^ m ≤ |x - a / b| :=
  (finite_lt_nat N).eventually_all.2 fun b _hb => eventually_imp_distrib_left.2 (this b)
[GOAL]
case intro
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
⊢ False
[PROOFSTEP]
rcases(this.and (eventually_ge_atTop n)).exists with ⟨m, hm, hnm⟩
[GOAL]
case intro.intro.intro
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
⊢ False
[PROOFSTEP]
rcases hx m with ⟨a, b, hb, hne, hlt⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a b : ℤ
hb : 1 < b
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ m
⊢ False
[PROOFSTEP]
lift b to ℕ using zero_le_one.trans hb.le
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a : ℤ
b : ℕ
hb : 1 < ↑b
hne : x ≠ ↑a / ↑↑b
hlt : |x - ↑a / ↑↑b| < 1 / ↑↑b ^ m
⊢ False
[PROOFSTEP]
norm_cast at hb
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a : ℤ
b : ℕ
hne : x ≠ ↑a / ↑↑b
hlt : |x - ↑a / ↑↑b| < 1 / ↑↑b ^ m
hb : 1 < b
⊢ False
[PROOFSTEP]
push_cast at hne hlt
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a : ℤ
b : ℕ
hb : 1 < b
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ m
⊢ False
[PROOFSTEP]
cases' le_or_lt N b with h h
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.inl
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a : ℤ
b : ℕ
hb : 1 < b
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ m
h : N ≤ b
⊢ False
[PROOFSTEP]
refine' (hN b h a hne).not_lt (hlt.trans_le _)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.inl
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a : ℤ
b : ℕ
hb : 1 < b
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ m
h : N ≤ b
⊢ 1 / ↑b ^ m ≤ 1 / ↑b ^ n
[PROOFSTEP]
replace hb : (1 : ℝ) < b := Nat.one_lt_cast.2 hb
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.inl
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a : ℤ
b : ℕ
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ m
h : N ≤ b
hb : 1 < ↑b
⊢ 1 / ↑b ^ m ≤ 1 / ↑b ^ n
[PROOFSTEP]
have hb0 : (0 : ℝ) < b := zero_lt_one.trans hb
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.inl
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a : ℤ
b : ℕ
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ m
h : N ≤ b
hb : 1 < ↑b
hb0 : 0 < ↑b
⊢ 1 / ↑b ^ m ≤ 1 / ↑b ^ n
[PROOFSTEP]
exact one_div_le_one_div_of_le (pow_pos hb0 _) (pow_le_pow hb.le hnm)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.inr
x : ℝ
hx : Liouville x
n N : ℕ
hN : ∀ (b : ℕ), b ≥ N → ∀ (x_1 : ℤ), x ≠ ↑x_1 / ↑b → 1 / ↑b ^ n ≤ |x - ↑x_1 / ↑b|
this✝ : ∀ (b : ℕ), b > 1 → ∀ᶠ (m : ℕ) in atTop, ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
this : ∀ᶠ (m : ℕ) in atTop, ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
m : ℕ
hm : ∀ (b : ℕ), b < N → 1 < b → ∀ (a : ℤ), 1 / ↑b ^ m ≤ |x - ↑a / ↑b|
hnm : n ≤ m
a : ℤ
b : ℕ
hb : 1 < b
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ m
h : b < N
⊢ False
[PROOFSTEP]
exact (hm b h hb _).not_lt hlt
[GOAL]
x : ℝ
hx : Liouville x
p : ℝ
⊢ LiouvilleWith p x
[PROOFSTEP]
suffices : LiouvilleWith ⌈p⌉₊ x
[GOAL]
x : ℝ
hx : Liouville x
p : ℝ
this : LiouvilleWith (↑⌈p⌉₊) x
⊢ LiouvilleWith p x
case this x : ℝ hx : Liouville x p : ℝ ⊢ LiouvilleWith (↑⌈p⌉₊) x
[PROOFSTEP]
exact this.mono (Nat.le_ceil p)
[GOAL]
case this
x : ℝ
hx : Liouville x
p : ℝ
⊢ LiouvilleWith (↑⌈p⌉₊) x
[PROOFSTEP]
refine ⟨1, ((eventually_gt_atTop 1).and_frequently (hx.frequently_exists_num ⌈p⌉₊)).mono ?_⟩
[GOAL]
case this
x : ℝ
hx : Liouville x
p : ℝ
⊢ ∀ (x_1 : ℕ),
    (1 < x_1 ∧ ∃ a, x ≠ ↑a / ↑x_1 ∧ |x - ↑a / ↑x_1| < 1 / ↑x_1 ^ ⌈p⌉₊) →
      ∃ m, x ≠ ↑m / ↑x_1 ∧ |x - ↑m / ↑x_1| < 1 / ↑x_1 ^ ↑⌈p⌉₊
[PROOFSTEP]
rintro b ⟨_hb, a, hne, hlt⟩
[GOAL]
case this.intro.intro.intro
x : ℝ
hx : Liouville x
p : ℝ
b : ℕ
_hb : 1 < b
a : ℤ
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ ⌈p⌉₊
⊢ ∃ m, x ≠ ↑m / ↑b ∧ |x - ↑m / ↑b| < 1 / ↑b ^ ↑⌈p⌉₊
[PROOFSTEP]
refine ⟨a, hne, ?_⟩
[GOAL]
case this.intro.intro.intro
x : ℝ
hx : Liouville x
p : ℝ
b : ℕ
_hb : 1 < b
a : ℤ
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < 1 / ↑b ^ ⌈p⌉₊
⊢ |x - ↑a / ↑b| < 1 / ↑b ^ ↑⌈p⌉₊
[PROOFSTEP]
rwa [rpow_nat_cast]
[GOAL]
x : ℝ
⊢ (∀ (p : ℝ), LiouvilleWith p x) ↔ Liouville x
[PROOFSTEP]
refine ⟨fun H n => ?_, Liouville.liouvilleWith⟩
[GOAL]
x : ℝ
H : ∀ (p : ℝ), LiouvilleWith p x
n : ℕ
⊢ ∃ a b, 1 < b ∧ x ≠ ↑a / ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ n
[PROOFSTEP]
rcases((eventually_gt_atTop 1).and_frequently ((H (n + 1)).frequently_lt_rpow_neg (lt_add_one (n : ℝ)))).exists with
  ⟨b, hb, a, hne, hlt⟩
[GOAL]
case intro.intro.intro.intro
x : ℝ
H : ∀ (p : ℝ), LiouvilleWith p x
n b : ℕ
hb : 1 < b
a : ℤ
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < ↑b ^ (-↑n)
⊢ ∃ a b, 1 < b ∧ x ≠ ↑a / ↑b ∧ |x - ↑a / ↑b| < 1 / ↑b ^ n
[PROOFSTEP]
exact ⟨a, b, by exact_mod_cast hb, hne, by simpa [rpow_neg] using hlt⟩
[GOAL]
x : ℝ
H : ∀ (p : ℝ), LiouvilleWith p x
n b : ℕ
hb : 1 < b
a : ℤ
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < ↑b ^ (-↑n)
⊢ 1 < ↑b
[PROOFSTEP]
exact_mod_cast hb
[GOAL]
x : ℝ
H : ∀ (p : ℝ), LiouvilleWith p x
n b : ℕ
hb : 1 < b
a : ℤ
hne : x ≠ ↑a / ↑b
hlt : |x - ↑a / ↑b| < ↑b ^ (-↑n)
⊢ |x - ↑a / ↑↑b| < 1 / ↑↑b ^ n
[PROOFSTEP]
simpa [rpow_neg] using hlt


[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdrop [] n = []
[PROOFSTEP]
simp [rdrop]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdrop l 0 = l
[PROOFSTEP]
simp [rdrop]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdrop l n = reverse (drop n (reverse l))
[PROOFSTEP]
rw [rdrop]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ take (length l - n) l = reverse (drop n (reverse l))
[PROOFSTEP]
induction' l using List.reverseRecOn with xs x IH generalizing n
[GOAL]
case H0
α : Type u_1
p : α → Bool
l : List α
n✝ n : ℕ
⊢ take (length [] - n) [] = reverse (drop n (reverse []))
[PROOFSTEP]
simp
[GOAL]
case H1
α : Type u_1
p : α → Bool
l : List α
n✝ : ℕ
xs : List α
x : α
IH : ∀ (n : ℕ), take (length xs - n) xs = reverse (drop n (reverse xs))
n : ℕ
⊢ take (length (xs ++ [x]) - n) (xs ++ [x]) = reverse (drop n (reverse (xs ++ [x])))
[PROOFSTEP]
cases n
[GOAL]
case H1.zero
α : Type u_1
p : α → Bool
l : List α
n : ℕ
xs : List α
x : α
IH : ∀ (n : ℕ), take (length xs - n) xs = reverse (drop n (reverse xs))
⊢ take (length (xs ++ [x]) - Nat.zero) (xs ++ [x]) = reverse (drop Nat.zero (reverse (xs ++ [x])))
[PROOFSTEP]
simp [take_append]
[GOAL]
case H1.succ
α : Type u_1
p : α → Bool
l : List α
n : ℕ
xs : List α
x : α
IH : ∀ (n : ℕ), take (length xs - n) xs = reverse (drop n (reverse xs))
n✝ : ℕ
⊢ take (length (xs ++ [x]) - Nat.succ n✝) (xs ++ [x]) = reverse (drop (Nat.succ n✝) (reverse (xs ++ [x])))
[PROOFSTEP]
simp [take_append_eq_append_take, IH]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ rdrop (l ++ [x]) (n + 1) = rdrop l n
[PROOFSTEP]
simp [rdrop_eq_reverse_drop_reverse]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtake [] n = []
[PROOFSTEP]
simp [rtake]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtake l 0 = []
[PROOFSTEP]
simp [rtake]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtake l n = reverse (take n (reverse l))
[PROOFSTEP]
rw [rtake]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ drop (length l - n) l = reverse (take n (reverse l))
[PROOFSTEP]
induction' l using List.reverseRecOn with xs x IH generalizing n
[GOAL]
case H0
α : Type u_1
p : α → Bool
l : List α
n✝ n : ℕ
⊢ drop (length [] - n) [] = reverse (take n (reverse []))
[PROOFSTEP]
simp
[GOAL]
case H1
α : Type u_1
p : α → Bool
l : List α
n✝ : ℕ
xs : List α
x : α
IH : ∀ (n : ℕ), drop (length xs - n) xs = reverse (take n (reverse xs))
n : ℕ
⊢ drop (length (xs ++ [x]) - n) (xs ++ [x]) = reverse (take n (reverse (xs ++ [x])))
[PROOFSTEP]
cases n
[GOAL]
case H1.zero
α : Type u_1
p : α → Bool
l : List α
n : ℕ
xs : List α
x : α
IH : ∀ (n : ℕ), drop (length xs - n) xs = reverse (take n (reverse xs))
⊢ drop (length (xs ++ [x]) - Nat.zero) (xs ++ [x]) = reverse (take Nat.zero (reverse (xs ++ [x])))
[PROOFSTEP]
exact drop_length _
[GOAL]
case H1.succ
α : Type u_1
p : α → Bool
l : List α
n : ℕ
xs : List α
x : α
IH : ∀ (n : ℕ), drop (length xs - n) xs = reverse (take n (reverse xs))
n✝ : ℕ
⊢ drop (length (xs ++ [x]) - Nat.succ n✝) (xs ++ [x]) = reverse (take (Nat.succ n✝) (reverse (xs ++ [x])))
[PROOFSTEP]
simp [drop_append_eq_append_drop, IH]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ rtake (l ++ [x]) (n + 1) = rtake l n ++ [x]
[PROOFSTEP]
simp [rtake_eq_reverse_take_reverse]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdropWhile p [] = []
[PROOFSTEP]
simp [rdropWhile, dropWhile]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ rdropWhile p (l ++ [x]) = if p x = true then rdropWhile p l else l ++ [x]
[PROOFSTEP]
simp only [rdropWhile, dropWhile, reverse_append, reverse_singleton, singleton_append]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ reverse
      (match p x with
      | true => dropWhile p (reverse l)
      | false => x :: reverse l) =
    if p x = true then reverse (dropWhile p (reverse l)) else l ++ [x]
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : p x = true
⊢ reverse
      (match p x with
      | true => dropWhile p (reverse l)
      | false => x :: reverse l) =
    reverse (dropWhile p (reverse l))
[PROOFSTEP]
simp [h]
[GOAL]
case neg
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : ¬p x = true
⊢ reverse
      (match p x with
      | true => dropWhile p (reverse l)
      | false => x :: reverse l) =
    l ++ [x]
[PROOFSTEP]
simp [h]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : p x = true
⊢ rdropWhile p (l ++ [x]) = rdropWhile p l
[PROOFSTEP]
rw [rdropWhile_concat, if_pos h]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : ¬p x = true
⊢ rdropWhile p (l ++ [x]) = l ++ [x]
[PROOFSTEP]
rw [rdropWhile_concat, if_neg h]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ rdropWhile p [x] = if p x = true then [] else [x]
[PROOFSTEP]
rw [← nil_append [x], rdropWhile_concat, rdropWhile_nil]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
hl : rdropWhile p l ≠ []
⊢ ¬p (getLast (rdropWhile p l) hl) = true
[PROOFSTEP]
simp_rw [rdropWhile]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
hl : rdropWhile p l ≠ []
⊢ ¬p (getLast (reverse (dropWhile p (reverse l))) (_ : reverse (dropWhile p (reverse l)) ≠ [])) = true
[PROOFSTEP]
rw [getLast_reverse]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
hl : rdropWhile p l ≠ []
⊢ ¬p (get (dropWhile p (reverse l)) { val := 0, isLt := (_ : 0 < length (dropWhile p (reverse l))) }) = true
[PROOFSTEP]
exact dropWhile_nthLe_zero_not _ _ _
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdropWhile p l <+: l
[PROOFSTEP]
rw [← reverse_suffix, rdropWhile, reverse_reverse]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ dropWhile p (reverse l) <:+ reverse l
[PROOFSTEP]
exact dropWhile_suffix _
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdropWhile p l = [] ↔ ∀ (x : α), x ∈ l → p x = true
[PROOFSTEP]
simp [rdropWhile]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ dropWhile p l = l ↔ ∀ (hl : 0 < length l), ¬p (nthLe l 0 hl) = true
[PROOFSTEP]
cases' l with hd tl
[GOAL]
case nil
α : Type u_1
p : α → Bool
n : ℕ
⊢ dropWhile p [] = [] ↔ ∀ (hl : 0 < length []), ¬p (nthLe [] 0 hl) = true
[PROOFSTEP]
simp only [dropWhile, true_iff]
[GOAL]
case nil
α : Type u_1
p : α → Bool
n : ℕ
⊢ ∀ (hl : 0 < length []), ¬p (nthLe [] 0 hl) = true
[PROOFSTEP]
intro h
[GOAL]
case nil
α : Type u_1
p : α → Bool
n : ℕ
h : 0 < length []
⊢ ¬p (nthLe [] 0 h) = true
[PROOFSTEP]
by_contra
[GOAL]
case nil
α : Type u_1
p : α → Bool
n : ℕ
h : 0 < length []
a✝ : p (nthLe [] 0 h) = true
⊢ False
[PROOFSTEP]
rwa [length_nil, lt_self_iff_false] at h
[GOAL]
case cons
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
⊢ dropWhile p (hd :: tl) = hd :: tl ↔ ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true
[PROOFSTEP]
rw [dropWhile]
[GOAL]
case cons
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
⊢ (match p hd with
      | true => dropWhile p tl
      | false => hd :: tl) =
      hd :: tl ↔
    ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true
[PROOFSTEP]
refine' ⟨fun h => _, fun h => _⟩
[GOAL]
case cons.refine'_1
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h :
  (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
⊢ ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true
[PROOFSTEP]
intro _ H
[GOAL]
case cons.refine'_1
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h :
  (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
hl✝ : 0 < length (hd :: tl)
H : p (nthLe (hd :: tl) 0 hl✝) = true
⊢ False
[PROOFSTEP]
rw [nthLe, get] at H
[GOAL]
case cons.refine'_1
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h :
  (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
hl✝ : 0 < length (hd :: tl)
H : p hd = true
⊢ False
[PROOFSTEP]
refine' (cons_ne_self hd tl) (Sublist.antisymm _ (sublist_cons _ _))
[GOAL]
case cons.refine'_1
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h :
  (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
hl✝ : 0 < length (hd :: tl)
H : p hd = true
⊢ hd :: tl <+ tl
[PROOFSTEP]
rw [← h]
[GOAL]
case cons.refine'_1
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h :
  (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
hl✝ : 0 < length (hd :: tl)
H : p hd = true
⊢ (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) <+
    tl
[PROOFSTEP]
simp only [H]
[GOAL]
case cons.refine'_1
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h :
  (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
hl✝ : 0 < length (hd :: tl)
H : p hd = true
⊢ dropWhile p tl <+ tl
[PROOFSTEP]
exact List.isSuffix.sublist (dropWhile_suffix p)
[GOAL]
case cons.refine'_2
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h : ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true
⊢ (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
[PROOFSTEP]
have := h (by simp only [length, Nat.succ_pos])
[GOAL]
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h : ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true
⊢ 0 < length (hd :: tl)
[PROOFSTEP]
simp only [length, Nat.succ_pos]
[GOAL]
case cons.refine'_2
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h : ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true
this : ¬p (nthLe (hd :: tl) 0 (_ : 0 < Nat.succ (length tl))) = true
⊢ (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
[PROOFSTEP]
rw [nthLe, get] at this
[GOAL]
case cons.refine'_2
α : Type u_1
p : α → Bool
n : ℕ
hd : α
tl : List α
h : ∀ (hl : 0 < length (hd :: tl)), ¬p (nthLe (hd :: tl) 0 hl) = true
this : ¬p hd = true
⊢ (match p hd with
    | true => dropWhile p tl
    | false => hd :: tl) =
    hd :: tl
[PROOFSTEP]
simp_rw [this]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdropWhile p l = l ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true
[PROOFSTEP]
simp only [rdropWhile, reverse_eq_iff, dropWhile_eq_self_iff, getLast_eq_get]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ (∀ (hl : 0 < length (reverse l)), ¬p (nthLe (reverse l) 0 hl) = true) ↔
    ∀ (hl : l ≠ []), ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true
[PROOFSTEP]
refine' ⟨fun h hl => _, fun h hl => _⟩
[GOAL]
case refine'_1
α : Type u_1
p : α → Bool
l : List α
n : ℕ
h : ∀ (hl : 0 < length (reverse l)), ¬p (nthLe (reverse l) 0 hl) = true
hl : l ≠ []
⊢ ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true
[PROOFSTEP]
rw [← length_pos, ← length_reverse] at hl
[GOAL]
case refine'_1
α : Type u_1
p : α → Bool
l : List α
n : ℕ
h : ∀ (hl : 0 < length (reverse l)), ¬p (nthLe (reverse l) 0 hl) = true
hl✝ : l ≠ []
hl : 0 < length (reverse l)
⊢ ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true
[PROOFSTEP]
have := h hl
[GOAL]
case refine'_1
α : Type u_1
p : α → Bool
l : List α
n : ℕ
h : ∀ (hl : 0 < length (reverse l)), ¬p (nthLe (reverse l) 0 hl) = true
hl✝ : l ≠ []
hl : 0 < length (reverse l)
this : ¬p (nthLe (reverse l) 0 hl) = true
⊢ ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true
[PROOFSTEP]
rwa [nthLe, get_reverse'] at this
[GOAL]
case refine'_2
α : Type u_1
p : α → Bool
l : List α
n : ℕ
h : ∀ (hl : l ≠ []), ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true
hl : 0 < length (reverse l)
⊢ ¬p (nthLe (reverse l) 0 hl) = true
[PROOFSTEP]
rw [length_reverse, length_pos] at hl
[GOAL]
case refine'_2
α : Type u_1
p : α → Bool
l : List α
n : ℕ
h : ∀ (hl : l ≠ []), ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true
hl✝ : 0 < length (reverse l)
hl : l ≠ []
⊢ ¬p (nthLe (reverse l) 0 hl✝) = true
[PROOFSTEP]
have := h hl
[GOAL]
case refine'_2
α : Type u_1
p : α → Bool
l : List α
n : ℕ
h : ∀ (hl : l ≠ []), ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true
hl✝ : 0 < length (reverse l)
hl : l ≠ []
this : ¬p (get l { val := length l - 1, isLt := (_ : length l - 1 < length l) }) = true
⊢ ¬p (nthLe (reverse l) 0 hl✝) = true
[PROOFSTEP]
rwa [nthLe, get_reverse']
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ dropWhile p (dropWhile p l) = dropWhile p l
[PROOFSTEP]
simp only [dropWhile_eq_self_iff]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ ∀ (hl : 0 < length (dropWhile p l)), ¬p (nthLe (dropWhile p l) 0 hl) = true
[PROOFSTEP]
exact fun h => dropWhile_nthLe_zero_not p l h
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtakeWhile p [] = []
[PROOFSTEP]
simp [rtakeWhile, takeWhile]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ rtakeWhile p (l ++ [x]) = if p x = true then rtakeWhile p l ++ [x] else []
[PROOFSTEP]
simp only [rtakeWhile, takeWhile, reverse_append, reverse_singleton, singleton_append]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ reverse
      (match p x with
      | true => x :: takeWhile p (reverse l)
      | false => []) =
    if p x = true then reverse (takeWhile p (reverse l)) ++ [x] else []
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : p x = true
⊢ reverse
      (match p x with
      | true => x :: takeWhile p (reverse l)
      | false => []) =
    reverse (takeWhile p (reverse l)) ++ [x]
[PROOFSTEP]
simp [h]
[GOAL]
case neg
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : ¬p x = true
⊢ reverse
      (match p x with
      | true => x :: takeWhile p (reverse l)
      | false => []) =
    []
[PROOFSTEP]
simp [h]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : p x = true
⊢ rtakeWhile p (l ++ [x]) = rtakeWhile p l ++ [x]
[PROOFSTEP]
rw [rtakeWhile_concat, if_pos h]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : ¬p x = true
⊢ rtakeWhile p (l ++ [x]) = []
[PROOFSTEP]
rw [rtakeWhile_concat, if_neg h]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtakeWhile p l <:+ l
[PROOFSTEP]
rw [← reverse_prefix, rtakeWhile, reverse_reverse]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ takeWhile p (reverse l) <+: reverse l
[PROOFSTEP]
exact takeWhile_prefix _
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtakeWhile p l = l ↔ ∀ (x : α), x ∈ l → p x = true
[PROOFSTEP]
simp [rtakeWhile, reverse_eq_iff]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true
[PROOFSTEP]
induction' l using List.reverseRecOn with l a
[GOAL]
case H0
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtakeWhile p [] = [] ↔ ∀ (hl : [] ≠ []), ¬p (getLast [] hl) = true
[PROOFSTEP]
simp only [rtakeWhile, takeWhile, reverse_nil, true_iff]
[GOAL]
case H0
α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ ∀ (hl : [] ≠ []), ¬p (getLast [] hl) = true
[PROOFSTEP]
intro f
[GOAL]
case H0
α : Type u_1
p : α → Bool
l : List α
n : ℕ
f : [] ≠ []
⊢ ¬p (getLast [] f) = true
[PROOFSTEP]
contradiction
[GOAL]
case H1
α : Type u_1
p : α → Bool
l✝ : List α
n : ℕ
l : List α
a : α
a✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true
⊢ rtakeWhile p (l ++ [a]) = [] ↔ ∀ (hl : l ++ [a] ≠ []), ¬p (getLast (l ++ [a]) hl) = true
[PROOFSTEP]
simp only [rtakeWhile, reverse_append, takeWhile, reverse_eq_nil, getLast_append, ne_eq, append_eq_nil, and_false,
  forall_true_left]
[GOAL]
case H1
α : Type u_1
p : α → Bool
l✝ : List α
n : ℕ
l : List α
a : α
a✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true
⊢ (match p a with
      | true => a :: takeWhile p (List.append [] (reverse l))
      | false => []) =
      [] ↔
    ¬p a = true
[PROOFSTEP]
refine' ⟨fun h => _, fun h => _⟩
[GOAL]
case H1.refine'_1
α : Type u_1
p : α → Bool
l✝ : List α
n : ℕ
l : List α
a : α
a✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true
h :
  (match p a with
    | true => a :: takeWhile p (List.append [] (reverse l))
    | false => []) =
    []
⊢ ¬p a = true
[PROOFSTEP]
intro pa
[GOAL]
case H1.refine'_1
α : Type u_1
p : α → Bool
l✝ : List α
n : ℕ
l : List α
a : α
a✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true
h :
  (match p a with
    | true => a :: takeWhile p (List.append [] (reverse l))
    | false => []) =
    []
pa : p a = true
⊢ False
[PROOFSTEP]
simp only [pa] at h
[GOAL]
case H1.refine'_2
α : Type u_1
p : α → Bool
l✝ : List α
n : ℕ
l : List α
a : α
a✝ : rtakeWhile p l = [] ↔ ∀ (hl : l ≠ []), ¬p (getLast l hl) = true
h : ¬p a = true
⊢ (match p a with
    | true => a :: takeWhile p (List.append [] (reverse l))
    | false => []) =
    []
[PROOFSTEP]
simp only [h]
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
hx : x ∈ rtakeWhile p l
⊢ p x = true
[PROOFSTEP]
rw [rtakeWhile, mem_reverse] at hx
[GOAL]
α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
hx : x ∈ takeWhile p (reverse l)
⊢ p x = true
[PROOFSTEP]
exact mem_takeWhile_imp hx


[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : One α
f : Filter α
s : Set α
inst✝¹ : One β
inst✝ : OneHomClass F α β
φ : F
⊢ map (↑φ) 1 = 1
[PROOFSTEP]
rw [Filter.map_one', map_one, pure_one]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : InvolutiveInv α
f g : Filter α
s : Set α
hs : s ∈ f
⊢ s⁻¹ ∈ f⁻¹
[PROOFSTEP]
rwa [mem_inv, inv_preimage, inv_inv]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : InvolutiveInv α
f✝ g : Filter α
s : Set α
src✝ : Inv (Filter α) := instInv
f : Filter α
⊢ map (Inv.inv ∘ Inv.inv) f = f
[PROOFSTEP]
rw [inv_involutive.comp_self, map_id]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : InvolutiveInv α
f g : Filter α
s : Set α
⊢ f⁻¹ ≤ g ↔ f ≤ g⁻¹
[PROOFSTEP]
rw [← Filter.inv_le_inv_iff, inv_inv]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n : ℕ
hs : s ∈ f
⊢ s ^ 0 ∈ f ^ 0
[PROOFSTEP]
rw [pow_zero]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n : ℕ
hs : s ∈ f
⊢ 1 ∈ f ^ 0
[PROOFSTEP]
exact one_mem_one
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n✝ : ℕ
hs : s ∈ f
n : ℕ
⊢ s ^ (n + 1) ∈ f ^ (n + 1)
[PROOFSTEP]
rw [pow_succ]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n✝ : ℕ
hs : s ∈ f
n : ℕ
⊢ s * s ^ n ∈ f ^ (n + 1)
[PROOFSTEP]
exact mul_mem_mul hs (pow_mem_pow hs n)
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n✝ n : ℕ
hn : n ≠ 0
⊢ ⊥ ^ n = ⊥
[PROOFSTEP]
rw [← tsub_add_cancel_of_le (Nat.succ_le_of_lt <| Nat.pos_of_ne_zero hn), pow_succ, bot_mul]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n : ℕ
hf : 1 ≤ f
⊢ f * ⊤ = ⊤
[PROOFSTEP]
refine' top_le_iff.1 fun s => _
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s✝ : Set α
a : α
m n : ℕ
hf : 1 ≤ f
s : Set α
⊢ s ∈ f * ⊤ → s ∈ ⊤
[PROOFSTEP]
simp only [mem_mul, mem_top, exists_and_left, exists_eq_left]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s✝ : Set α
a : α
m n : ℕ
hf : 1 ≤ f
s : Set α
⊢ (∃ t₁, t₁ ∈ f ∧ t₁ * univ ⊆ s) → s = univ
[PROOFSTEP]
rintro ⟨t, ht, hs⟩
[GOAL]
case intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s✝ : Set α
a : α
m n : ℕ
hf : 1 ≤ f
s t : Set α
ht : t ∈ f
hs : t * univ ⊆ s
⊢ s = univ
[PROOFSTEP]
rwa [mul_univ_of_one_mem (mem_one.1 <| hf ht), univ_subset_iff] at hs
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n : ℕ
hf : 1 ≤ f
⊢ ⊤ * f = ⊤
[PROOFSTEP]
refine' top_le_iff.1 fun s => _
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s✝ : Set α
a : α
m n : ℕ
hf : 1 ≤ f
s : Set α
⊢ s ∈ ⊤ * f → s ∈ ⊤
[PROOFSTEP]
simp only [mem_mul, mem_top, exists_and_left, exists_eq_left]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s✝ : Set α
a : α
m n : ℕ
hf : 1 ≤ f
s : Set α
⊢ (∃ x, x ∈ f ∧ univ * x ⊆ s) → s = univ
[PROOFSTEP]
rintro ⟨t, ht, hs⟩
[GOAL]
case intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s✝ : Set α
a : α
m n : ℕ
hf : 1 ≤ f
s t : Set α
ht : t ∈ f
hs : univ * t ⊆ s
⊢ s = univ
[PROOFSTEP]
rwa [univ_mul_of_one_mem (mem_one.1 <| hf ht), univ_subset_iff] at hs
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : Monoid α
f g : Filter α
s : Set α
a : α
m n✝ n : ℕ
x✝ : n + 2 ≠ 0
⊢ ⊤ ^ (n + 2) = ⊤
[PROOFSTEP]
rw [pow_succ, top_pow n.succ_ne_zero, top_mul_top]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
⊢ f * g = 1 ↔ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1
[PROOFSTEP]
refine' ⟨fun hfg => _, _⟩
[GOAL]
case refine'_1
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
hfg : f * g = 1
⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1
[PROOFSTEP]
obtain ⟨t₁, t₂, h₁, h₂, h⟩ : (1 : Set α) ∈ f * g := hfg.symm.subst one_mem_one
[GOAL]
case refine'_1.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
hfg : f * g = 1
t₁ t₂ : Set α
h₁ : t₁ ∈ f
h₂ : t₂ ∈ g
h : t₁ * t₂ ⊆ 1
⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1
[PROOFSTEP]
have hfg : (f * g).NeBot := hfg.symm.subst one_neBot
[GOAL]
case refine'_1.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
hfg✝ : f * g = 1
t₁ t₂ : Set α
h₁ : t₁ ∈ f
h₂ : t₂ ∈ g
h : t₁ * t₂ ⊆ 1
hfg : NeBot (f * g)
⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1
[PROOFSTEP]
rw [(hfg.nonempty_of_mem <| mul_mem_mul h₁ h₂).subset_one_iff, Set.mul_eq_one_iff] at h
[GOAL]
case refine'_1.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
hfg✝ : f * g = 1
t₁ t₂ : Set α
h₁ : t₁ ∈ f
h₂ : t₂ ∈ g
h : ∃ a b, t₁ = {a} ∧ t₂ = {b} ∧ a * b = 1
hfg : NeBot (f * g)
⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1
[PROOFSTEP]
obtain ⟨a, b, rfl, rfl, h⟩ := h
[GOAL]
case refine'_1.intro.intro.intro.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
hfg✝ : f * g = 1
hfg : NeBot (f * g)
a b : α
h₁ : {a} ∈ f
h : a * b = 1
h₂ : {b} ∈ g
⊢ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1
[PROOFSTEP]
refine' ⟨a, b, _, _, h⟩
[GOAL]
case refine'_1.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
hfg✝ : f * g = 1
hfg : NeBot (f * g)
a b : α
h₁ : {a} ∈ f
h : a * b = 1
h₂ : {b} ∈ g
⊢ f = pure a
[PROOFSTEP]
rwa [← hfg.of_mul_left.le_pure_iff, le_pure_iff]
[GOAL]
case refine'_1.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
hfg✝ : f * g = 1
hfg : NeBot (f * g)
a b : α
h₁ : {a} ∈ f
h : a * b = 1
h₂ : {b} ∈ g
⊢ g = pure b
[PROOFSTEP]
rwa [← hfg.of_mul_right.le_pure_iff, le_pure_iff]
[GOAL]
case refine'_2
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
⊢ (∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1) → f * g = 1
[PROOFSTEP]
rintro ⟨a, b, rfl, rfl, h⟩
[GOAL]
case refine'_2.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
a b : α
h : a * b = 1
⊢ pure a * pure b = 1
[PROOFSTEP]
rw [pure_mul_pure, h, pure_one]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
src✝³ : Monoid (Filter α) := Filter.monoid
src✝² : InvolutiveInv (Filter α) := Filter.instInvolutiveInv
src✝¹ : Div (Filter α) := Filter.instDiv
src✝ : Pow (Filter α) ℤ := Filter.instZPow
s t : Filter α
h : s * t = 1
⊢ s⁻¹ = t
[PROOFSTEP]
obtain ⟨a, b, rfl, rfl, hab⟩ := Filter.mul_eq_one_iff.1 h
[GOAL]
case intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
src✝³ : Monoid (Filter α) := Filter.monoid
src✝² : InvolutiveInv (Filter α) := Filter.instInvolutiveInv
src✝¹ : Div (Filter α) := Filter.instDiv
src✝ : Pow (Filter α) ℤ := Filter.instZPow
a b : α
hab : a * b = 1
h : pure a * pure b = 1
⊢ (pure a)⁻¹ = pure b
[PROOFSTEP]
rw [inv_pure, inv_eq_of_mul_eq_one_right hab]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
⊢ IsUnit f ↔ ∃ a, f = pure a ∧ IsUnit a
[PROOFSTEP]
constructor
[GOAL]
case mp
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
⊢ IsUnit f → ∃ a, f = pure a ∧ IsUnit a
[PROOFSTEP]
rintro ⟨u, rfl⟩
[GOAL]
case mp.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
g : Filter α
u : (Filter α)ˣ
⊢ ∃ a, ↑u = pure a ∧ IsUnit a
[PROOFSTEP]
obtain ⟨a, b, ha, hb, h⟩ := Filter.mul_eq_one_iff.1 u.mul_inv
[GOAL]
case mp.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
g : Filter α
u : (Filter α)ˣ
a b : α
ha : ↑u = pure a
hb : ↑u⁻¹ = pure b
h : a * b = 1
⊢ ∃ a, ↑u = pure a ∧ IsUnit a
[PROOFSTEP]
refine' ⟨a, ha, ⟨a, b, h, pure_injective _⟩, rfl⟩
[GOAL]
case mp.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
g : Filter α
u : (Filter α)ˣ
a b : α
ha : ↑u = pure a
hb : ↑u⁻¹ = pure b
h : a * b = 1
⊢ pure (b * a) = pure 1
[PROOFSTEP]
rw [← pure_mul_pure, ← ha, ← hb]
[GOAL]
case mp.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
g : Filter α
u : (Filter α)ˣ
a b : α
ha : ↑u = pure a
hb : ↑u⁻¹ = pure b
h : a * b = 1
⊢ ↑u⁻¹ * ↑u = pure 1
[PROOFSTEP]
exact u.inv_mul
[GOAL]
case mpr
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
f g : Filter α
⊢ (∃ a, f = pure a ∧ IsUnit a) → IsUnit f
[PROOFSTEP]
rintro ⟨a, rfl, ha⟩
[GOAL]
case mpr.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝ : DivisionMonoid α
g : Filter α
a : α
ha : IsUnit a
⊢ IsUnit (pure a)
[PROOFSTEP]
exact ha.filter
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
⊢ 1 ≤ f / g ↔ ¬Disjoint f g
[PROOFSTEP]
refine' ⟨fun h hfg => _, _⟩
[GOAL]
case refine'_1
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : 1 ≤ f / g
hfg : Disjoint f g
⊢ False
[PROOFSTEP]
obtain ⟨s, hs, t, ht, hst⟩ := hfg.le_bot (mem_bot : ∅ ∈ ⊥)
[GOAL]
case refine'_1.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : 1 ≤ f / g
hfg : Disjoint f g
s : Set α
hs : s ∈ f
t : Set α
ht : t ∈ g
hst : ∅ = s ∩ t
⊢ False
[PROOFSTEP]
exact Set.one_mem_div_iff.1 (h <| div_mem_div hs ht) (disjoint_iff.2 hst.symm)
[GOAL]
case refine'_2
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
⊢ ¬Disjoint f g → 1 ≤ f / g
[PROOFSTEP]
rintro h s ⟨t₁, t₂, h₁, h₂, hs⟩
[GOAL]
case refine'_2.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : ¬Disjoint f g
s t₁ t₂ : Set α
h₁ : t₁ ∈ f
h₂ : t₂ ∈ g
hs : t₁ / t₂ ⊆ s
⊢ s ∈ 1
[PROOFSTEP]
exact hs (Set.one_mem_div_iff.2 fun ht => h <| disjoint_of_disjoint_of_mem ht h₁ h₂)
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : NeBot f
⊢ 1 ≤ f / f
[PROOFSTEP]
rintro s ⟨t₁, t₂, h₁, h₂, hs⟩
[GOAL]
case intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : NeBot f
s t₁ t₂ : Set α
h₁ : t₁ ∈ f
h₂ : t₂ ∈ f
hs : t₁ / t₂ ⊆ s
⊢ s ∈ 1
[PROOFSTEP]
obtain ⟨a, ha₁, ha₂⟩ := Set.not_disjoint_iff.1 (h.not_disjoint h₁ h₂)
[GOAL]
case intro.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : NeBot f
s t₁ t₂ : Set α
h₁ : t₁ ∈ f
h₂ : t₂ ∈ f
hs : t₁ / t₂ ⊆ s
a : α
ha₁ : a ∈ t₁
ha₂ : a ∈ t₂
⊢ s ∈ 1
[PROOFSTEP]
rw [mem_one, ← div_self' a]
[GOAL]
case intro.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : NeBot f
s t₁ t₂ : Set α
h₁ : t₁ ∈ f
h₂ : t₂ ∈ f
hs : t₁ / t₂ ⊆ s
a : α
ha₁ : a ∈ t₁
ha₂ : a ∈ t₂
⊢ a / a ∈ s
[PROOFSTEP]
exact hs (Set.div_mem_div ha₁ ha₂)
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
⊢ IsUnit f ↔ ∃ a, f = pure a
[PROOFSTEP]
simp only [isUnit_iff, Group.isUnit, and_true_iff]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝³ : SMul α β
inst✝² : SMul α γ
inst✝¹ : SMul β γ
inst✝ : IsScalarTower α β γ
a : α
b : β
f : Filter γ
⊢ (a • b) • f = a • b • f
[PROOFSTEP]
simp only [← map_smul, map_map, smul_assoc]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝³ : SMul α β
inst✝² : SMul α γ
inst✝¹ : SMul β γ
inst✝ : IsScalarTower α β γ
a : α
b : β
f : Filter γ
⊢ map (fun b_1 => a • b • b_1) f = map ((fun b => a • b) ∘ fun b_1 => b • b_1) f
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝³ : SMul α β
inst✝² : SMul α γ
inst✝¹ : SMul β γ
inst✝ : IsScalarTower α β γ
a : α
f : Filter β
g : Filter γ
⊢ (a • f) • g = a • f • g
[PROOFSTEP]
refine' (map_map₂_distrib_left fun _ _ => _).symm
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝³ : SMul α β
inst✝² : SMul α γ
inst✝¹ : SMul β γ
inst✝ : IsScalarTower α β γ
a : α
f : Filter β
g : Filter γ
x✝¹ : β
x✝ : γ
⊢ (fun x x_1 => x • x_1) a (x✝¹ • x✝) = (fun x x_1 => x • x_1) a x✝¹ • x✝
[PROOFSTEP]
exact (smul_assoc a _ _).symm
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝¹ : Monoid α
inst✝ : MulAction α β
f : Filter β
⊢ map (fun b => 1 • b) f = f
[PROOFSTEP]
simp_rw [one_smul, map_id']
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝¹ : Monoid α
inst✝ : MulAction α β
f : Filter β
⊢ 1 • f = f
[PROOFSTEP]
simp only [← map_smul, one_smul, map_id']
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝¹ : Monoid α
inst✝ : MulAction α β
a b : α
f : Filter β
⊢ (a * b) • f = a • b • f
[PROOFSTEP]
simp only [← map_smul, map_map, Function.comp, ← mul_smul]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Monoid α
inst✝¹ : AddMonoid β
inst✝ : DistribMulAction α β
x✝ : α
⊢ pure ((fun x x_1 => x • x_1) x✝ 0) = 0
[PROOFSTEP]
dsimp only
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Monoid α
inst✝¹ : AddMonoid β
inst✝ : DistribMulAction α β
x✝ : α
⊢ pure (x✝ • 0) = 0
[PROOFSTEP]
rw [smul_zero, pure_zero]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Monoid α
inst✝¹ : Monoid β
inst✝ : MulDistribMulAction α β
x✝ : α
⊢ {x✝ • 1} = 1
[PROOFSTEP]
rw [smul_one, singleton_one]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
f : Filter α
g : Filter β
⊢ 0 • g ≤ 0
[PROOFSTEP]
refine' fun s hs => mem_smul_filter.2 _
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
f : Filter α
g : Filter β
s : Set β
hs : s ∈ 0
⊢ (fun x x_1 => x • x_1) 0 ⁻¹' s ∈ g
[PROOFSTEP]
convert @univ_mem _ g
[GOAL]
case h.e'_4
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
f : Filter α
g : Filter β
s : Set β
hs : s ∈ 0
⊢ (fun x x_1 => x • x_1) 0 ⁻¹' s = univ
[PROOFSTEP]
refine' eq_univ_iff_forall.2 fun a => _
[GOAL]
case h.e'_4
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
f : Filter α
g : Filter β
s : Set β
hs : s ∈ 0
a : β
⊢ a ∈ (fun x x_1 => x • x_1) 0 ⁻¹' s
[PROOFSTEP]
dsimp only
[GOAL]
case h.e'_4
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
f : Filter α
g : Filter β
s : Set β
hs : s ∈ 0
a : β
⊢ a ∈ (fun x => 0 • x) ⁻¹' s
[PROOFSTEP]
rwa [mem_preimage, zero_smul]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
f : Filter α
g : Filter β
hg : NeBot g
s : Set β
hs : s ∈ g
⊢ (fun x x_1 => x • x_1) 0 '' s ∈ 0
[PROOFSTEP]
simp_rw [zero_smul, (hg.nonempty_of_mem hs).image_const]
[GOAL]
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
ε : Type u_6
inst✝² : Zero α
inst✝¹ : Zero β
inst✝ : SMulWithZero α β
f : Filter α
g : Filter β
hg : NeBot g
s : Set β
hs : s ∈ g
⊢ {0} ∈ 0
[PROOFSTEP]
exact zero_mem_zero


[GOAL]
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
⊢ FinStronglyMeasurable f μ
[PROOFSTEP]
borelize G
[GOAL]
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
⊢ FinStronglyMeasurable f μ
[PROOFSTEP]
haveI : SeparableSpace (Set.range f ∪ {0} : Set G) := hf_meas.separableSpace_range_union_singleton
[GOAL]
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
⊢ FinStronglyMeasurable f μ
[PROOFSTEP]
let fs := SimpleFunc.approxOn f hf_meas.measurable (Set.range f ∪ {0}) 0 (by simp)
[GOAL]
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
⊢ 0 ∈ Set.range f ∪ {0}
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
fs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})
⊢ FinStronglyMeasurable f μ
[PROOFSTEP]
refine' ⟨fs, _, _⟩
[GOAL]
case refine'_1
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
fs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})
⊢ ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤
[PROOFSTEP]
have h_fs_Lp : ∀ n, Memℒp (fs n) p μ := SimpleFunc.memℒp_approxOn_range hf_meas.measurable hf
[GOAL]
case refine'_1
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
fs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})
h_fs_Lp : ∀ (n : ℕ), Memℒp (↑(fs n)) p
⊢ ∀ (n : ℕ), ↑↑μ (support ↑(fs n)) < ⊤
[PROOFSTEP]
exact fun n => (fs n).measure_support_lt_top_of_memℒp (h_fs_Lp n) hp_ne_zero hp_ne_top
[GOAL]
case refine'_2
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
fs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})
⊢ ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))
[PROOFSTEP]
intro x
[GOAL]
case refine'_2
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
fs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})
x : α
⊢ Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))
[PROOFSTEP]
apply SimpleFunc.tendsto_approxOn
[GOAL]
case refine'_2.hx
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
fs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})
x : α
⊢ f x ∈ closure (Set.range f ∪ {0})
[PROOFSTEP]
apply subset_closure
[GOAL]
case refine'_2.hx.a
α : Type u_1
G : Type u_2
p : ℝ≥0∞
m m0 : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup G
f : α → G
hf : Memℒp f p
hf_meas : StronglyMeasurable f
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
this✝¹ : MeasurableSpace G := borel G
this✝ : BorelSpace G
this : SeparableSpace ↑(Set.range f ∪ {0})
fs : ℕ → α →ₛ G := SimpleFunc.approxOn f (_ : Measurable f) (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0})
x : α
⊢ f x ∈ Set.range f ∪ {0}
[PROOFSTEP]
simp