l3lab/ntp-mathlib huggingface dataset:
theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x } := by
  rcases _root_.em (Infinite x) with (hx|hx)
  · rw [hx.st_eq]
    

Proof state:
case inl
x : ℝ*
hx : Infinite x
⊢ 0 = sSup {y | ↑y < x}

Next tactic:
cases hx with
    | inl hx =>
      convert Real.sSup_univ.symm
      exact Set.eq_univ_of_forall hx
    | inr hx =>
      convert Real.sSup_empty.symm
      exact Set.eq_empty_of_forall_not_mem fun y hy ↦ hy.out.not_lt (hx _)
theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x } := by
  rcases _root_.em (Infinite x) with (hx|hx)
  · rw [hx.st_eq]
    cases hx with
    

Proof state:
case inl.inl
x : ℝ*
hx : InfinitePos x
⊢ 0 = sSup {y | ↑y < x}

Next tactic:
| inl hx =>
      convert Real.sSup_univ.symm
      exact Set.eq_univ_of_forall hx
theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x } := by
  rcases _root_.em (Infinite x) with (hx|hx)
  · rw [hx.st_eq]
    cases hx with
    | inl hx =>
      

Proof state:
case inl.inl
x : ℝ*
hx : InfinitePos x
⊢ 0 = sSup {y | ↑y < x}

Next tactic:
convert Real.sSup_univ.symm
theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x } := by
  rcases _root_.em (Infinite x) with (hx|hx)
  · rw [hx.st_eq]
    cases hx with
    | inl hx =>
      convert Real.sSup_univ.symm
      

Proof state:
case h.e'_3.h.e'_3
x : ℝ*
hx : InfinitePos x
⊢ {y | ↑y < x} = Set.univ

Next tactic:
exact Set.eq_univ_of_forall hx
theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x } := by
  rcases _root_.em (Infinite x) with (hx|hx)
  · rw [hx.st_eq]
    cases hx with
    | inl hx =>
      convert Real.sSup_univ.symm
      exact Set.eq_univ_of_forall hx
    

Proof state:
case inl.inr
x : ℝ*
hx : InfiniteNeg x
⊢ 0 = sSup {y | ↑y < x}

Next tactic:
| inr hx =>
      convert Real.sSup_empty.symm
      exact Set.eq_empty_of_forall_not_mem fun y hy ↦ hy.out.not_lt (hx _)
theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x } := by
  rcases _root_.em (Infinite x) with (hx|hx)
  · rw [hx.st_eq]
    cases hx with
    | inl hx =>
      convert Real.sSup_univ.symm
      exact Set.eq_univ_of_forall hx
    | inr hx =>
      

Proof state:
case inl.inr
x : ℝ*
hx : InfiniteNeg x
⊢ 0 = sSup {y | ↑y < x}

Next tactic:
convert Real.sSup_empty.symm
theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x } := by
  rcases _root_.em (Infinite x) with (hx|hx)
  · rw [hx.st_eq]
    cases hx with
    | inl hx =>
      convert Real.sSup_univ.symm
      exact Set.eq_univ_of_forall hx
    | inr hx =>
      convert Real.sSup_empty.symm
      

Proof state:
case h.e'_3.h.e'_3
x : ℝ*
hx : InfiniteNeg x
⊢ {y | ↑y < x} = ∅

Next tactic:
exact Set.eq_empty_of_forall_not_mem fun y hy ↦ hy.out.not_lt (hx _)
theorem st_eq_sSup {x : ℝ*} : st x = sSup { y : ℝ | (y : ℝ*) < x } := by
  rcases _root_.em (Infinite x) with (hx|hx)
  · rw [hx.st_eq]
    cases hx with
    | inl hx =>
      convert Real.sSup_univ.symm
      exact Set.eq_univ_of_forall hx
    | inr hx =>
      convert Real.sSup_empty.symm
      exact Set.eq_empty_of_forall_not_mem fun y hy ↦ hy.out.not_lt (hx _)
  · 

Proof state:
case inr
x : ℝ*
hx : ¬Infinite x
⊢ st x = sSup {y | ↑y < x}

Next tactic:
exact (isSt_sSup hx).st_eq
theorem IsSt.isSt_st {x : ℝ*} {r : ℝ} (hxr : IsSt x r) : IsSt x (st x) := by
  

Proof state:
x : ℝ*
r : ℝ
hxr : IsSt x r
⊢ IsSt x (st x)

Next tactic:
rwa [hxr.st_eq]
theorem isSt_symm_real {r s : ℝ} : IsSt r s ↔ IsSt s r := by
  

Proof state:
r s : ℝ
⊢ IsSt (↑r) s ↔ IsSt (↑s) r

Next tactic:
rw [isSt_real_iff_eq, isSt_real_iff_eq, eq_comm]
theorem isSt_trans_real {r s t : ℝ} : IsSt r s → IsSt s t → IsSt r t := by
  

Proof state:
r s t : ℝ
⊢ IsSt (↑r) s → IsSt (↑s) t → IsSt (↑r) t

Next tactic:
rw [isSt_real_iff_eq, isSt_real_iff_eq, isSt_real_iff_eq]
theorem isSt_trans_real {r s t : ℝ} : IsSt r s → IsSt s t → IsSt r t := by
  rw [isSt_real_iff_eq, isSt_real_iff_eq, isSt_real_iff_eq]; 

Proof state:
r s t : ℝ
⊢ r = s → s = t → r = t

Next tactic:
exact Eq.trans
theorem isSt_iff_abs_sub_lt_delta {x : ℝ*} {r : ℝ} : IsSt x r ↔ ∀ δ : ℝ, 0 < δ → |x - ↑r| < δ := by
  

Proof state:
x : ℝ*
r : ℝ
⊢ IsSt x r ↔ ∀ (δ : ℝ), 0 < δ → |x - ↑r| < ↑δ

Next tactic:
simp only [abs_sub_lt_iff, sub_lt_iff_lt_add, IsSt, and_comm, add_comm]
theorem IsSt.map {x : ℝ*} {r : ℝ} (hxr : IsSt x r) {f : ℝ → ℝ} (hf : ContinuousAt f r) :
    IsSt (x.map f) (f r) := by
  

Proof state:
x : ℝ*
r : ℝ
hxr : IsSt x r
f : ℝ → ℝ
hf : ContinuousAt f r
⊢ IsSt (Germ.map f x) (f r)

Next tactic:
rcases ofSeq_surjective x with ⟨g, rfl⟩
theorem IsSt.map {x : ℝ*} {r : ℝ} (hxr : IsSt x r) {f : ℝ → ℝ} (hf : ContinuousAt f r) :
    IsSt (x.map f) (f r) := by
  rcases ofSeq_surjective x with ⟨g, rfl⟩
  

Proof state:
case intro
r : ℝ
f : ℝ → ℝ
hf : ContinuousAt f r
g : ℕ → ℝ
hxr : IsSt (ofSeq g) r
⊢ IsSt (Germ.map f (ofSeq g)) (f r)

Next tactic:
exact isSt_ofSeq_iff_tendsto.2 <| hf.tendsto.comp (isSt_ofSeq_iff_tendsto.1 hxr)
theorem IsSt.map₂ {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) {f : ℝ → ℝ → ℝ}
    (hf : ContinuousAt (Function.uncurry f) (r, s)) : IsSt (x.map₂ f y) (f r s) := by
  

Proof state:
x y : ℝ*
r s : ℝ
hxr : IsSt x r
hys : IsSt y s
f : ℝ → ℝ → ℝ
hf : ContinuousAt (Function.uncurry f) (r, s)
⊢ IsSt (Germ.map₂ f x y) (f r s)

Next tactic:
rcases ofSeq_surjective x with ⟨x, rfl⟩
theorem IsSt.map₂ {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) {f : ℝ → ℝ → ℝ}
    (hf : ContinuousAt (Function.uncurry f) (r, s)) : IsSt (x.map₂ f y) (f r s) := by
  rcases ofSeq_surjective x with ⟨x, rfl⟩
  

Proof state:
case intro
y : ℝ*
r s : ℝ
hys : IsSt y s
f : ℝ → ℝ → ℝ
hf : ContinuousAt (Function.uncurry f) (r, s)
x : ℕ → ℝ
hxr : IsSt (ofSeq x) r
⊢ IsSt (Germ.map₂ f (ofSeq x) y) (f r s)

Next tactic:
rcases ofSeq_surjective y with ⟨y, rfl⟩
theorem IsSt.map₂ {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) {f : ℝ → ℝ → ℝ}
    (hf : ContinuousAt (Function.uncurry f) (r, s)) : IsSt (x.map₂ f y) (f r s) := by
  rcases ofSeq_surjective x with ⟨x, rfl⟩
  rcases ofSeq_surjective y with ⟨y, rfl⟩
  

Proof state:
case intro.intro
r s : ℝ
f : ℝ → ℝ → ℝ
hf : ContinuousAt (Function.uncurry f) (r, s)
x : ℕ → ℝ
hxr : IsSt (ofSeq x) r
y : ℕ → ℝ
hys : IsSt (ofSeq y) s
⊢ IsSt (Germ.map₂ f (ofSeq x) (ofSeq y)) (f r s)

Next tactic:
rw [isSt_ofSeq_iff_tendsto] at hxr hys
theorem IsSt.map₂ {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) {f : ℝ → ℝ → ℝ}
    (hf : ContinuousAt (Function.uncurry f) (r, s)) : IsSt (x.map₂ f y) (f r s) := by
  rcases ofSeq_surjective x with ⟨x, rfl⟩
  rcases ofSeq_surjective y with ⟨y, rfl⟩
  rw [isSt_ofSeq_iff_tendsto] at hxr hys
  

Proof state:
case intro.intro
r s : ℝ
f : ℝ → ℝ → ℝ
hf : ContinuousAt (Function.uncurry f) (r, s)
x : ℕ → ℝ
hxr : Tendsto x (↑(hyperfilter ℕ)) (𝓝 r)
y : ℕ → ℝ
hys : Tendsto y (↑(hyperfilter ℕ)) (𝓝 s)
⊢ IsSt (Germ.map₂ f (ofSeq x) (ofSeq y)) (f r s)

Next tactic:
exact isSt_ofSeq_iff_tendsto.2 <| hf.tendsto.comp (hxr.prod_mk_nhds hys)
@[simp] theorem infinite_abs_iff {x : ℝ*} : Infinite |x| ↔ Infinite x := by
  

Proof state:
x : ℝ*
⊢ Infinite |x| ↔ Infinite x

Next tactic:
cases le_total 0 x
@[simp] theorem infinite_abs_iff {x : ℝ*} : Infinite |x| ↔ Infinite x := by
  cases le_total 0 x <;> 

Proof state:
case inl
x : ℝ*
h✝ : 0 ≤ x
⊢ Infinite |x| ↔ Infinite x

Next tactic:
simp [*, abs_of_nonneg, abs_of_nonpos, infinite_neg]
@[simp] theorem infinite_abs_iff {x : ℝ*} : Infinite |x| ↔ Infinite x := by
  cases le_total 0 x <;> 

Proof state:
case inr
x : ℝ*
h✝ : x ≤ 0
⊢ Infinite |x| ↔ Infinite x

Next tactic:
simp [*, abs_of_nonneg, abs_of_nonpos, infinite_neg]
theorem infinitePos_add_not_infiniteNeg {x y : ℝ*} :
    InfinitePos x → ¬InfiniteNeg y → InfinitePos (x + y) := by
  

Proof state:
x y : ℝ*
⊢ InfinitePos x → ¬InfiniteNeg y → InfinitePos (x + y)

Next tactic:
intro hip hnin r
theorem infinitePos_add_not_infiniteNeg {x y : ℝ*} :
    InfinitePos x → ¬InfiniteNeg y → InfinitePos (x + y) := by
  intro hip hnin r
  

Proof state:
x y : ℝ*
hip : InfinitePos x
hnin : ¬InfiniteNeg y
r : ℝ
⊢ ↑r < x + y

Next tactic:
cases' not_forall.mp hnin with r₂ hr₂
theorem infinitePos_add_not_infiniteNeg {x y : ℝ*} :
    InfinitePos x → ¬InfiniteNeg y → InfinitePos (x + y) := by
  intro hip hnin r
  cases' not_forall.mp hnin with r₂ hr₂
  

Proof state:
case intro
x y : ℝ*
hip : InfinitePos x
hnin : ¬InfiniteNeg y
r r₂ : ℝ
hr₂ : ¬y < ↑r₂
⊢ ↑r < x + y

Next tactic:
convert add_lt_add_of_lt_of_le (hip (r + -r₂)) (not_lt.mp hr₂) using 1
theorem infinitePos_add_not_infiniteNeg {x y : ℝ*} :
    InfinitePos x → ¬InfiniteNeg y → InfinitePos (x + y) := by
  intro hip hnin r
  cases' not_forall.mp hnin with r₂ hr₂
  convert add_lt_add_of_lt_of_le (hip (r + -r₂)) (not_lt.mp hr₂) using 1
  

Proof state:
case h.e'_3
x y : ℝ*
hip : InfinitePos x
hnin : ¬InfiniteNeg y
r r₂ : ℝ
hr₂ : ¬y < ↑r₂
⊢ ↑r = ↑(r + -r₂) + ↑r₂

Next tactic:
simp
theorem infiniteNeg_add_not_infinitePos {x y : ℝ*} :
    InfiniteNeg x → ¬InfinitePos y → InfiniteNeg (x + y) := by
  

Proof state:
x y : ℝ*
⊢ InfiniteNeg x → ¬InfinitePos y → InfiniteNeg (x + y)

Next tactic:
rw [← infinitePos_neg, ← infinitePos_neg, ← @infiniteNeg_neg y, neg_add]
theorem infiniteNeg_add_not_infinitePos {x y : ℝ*} :
    InfiniteNeg x → ¬InfinitePos y → InfiniteNeg (x + y) := by
  rw [← infinitePos_neg, ← infinitePos_neg, ← @infiniteNeg_neg y, neg_add]
  

Proof state:
x y : ℝ*
⊢ InfinitePos (-x) → ¬InfiniteNeg (-y) → InfinitePos (-x + -y)

Next tactic:
exact infinitePos_add_not_infiniteNeg
theorem infinitePos_of_tendsto_top {f : ℕ → ℝ} (hf : Tendsto f atTop atTop) :
    InfinitePos (ofSeq f) := fun r =>
  have hf' := tendsto_atTop_atTop.mp hf
  let ⟨i, hi⟩ := hf' (r + 1)
  have hi' : ∀ a : ℕ, f a < r + 1 → a < i := fun a => lt_imp_lt_of_le_imp_le (hi a)
  have hS : { a : ℕ | r < f a }ᶜ ⊆ { a : ℕ | a ≤ i } := by
    

Proof state:
f : ℕ → ℝ
hf : Tendsto f atTop atTop
r : ℝ
hf' : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ f a
i : ℕ
hi : ∀ (a : ℕ), i ≤ a → r + 1 ≤ f a
hi' : ∀ (a : ℕ), f a < r + 1 → a < i
⊢ {a | r < f a}ᶜ ⊆ {a | a ≤ i}

Next tactic:
simp only [Set.compl_setOf, not_lt]
theorem infinitePos_of_tendsto_top {f : ℕ → ℝ} (hf : Tendsto f atTop atTop) :
    InfinitePos (ofSeq f) := fun r =>
  have hf' := tendsto_atTop_atTop.mp hf
  let ⟨i, hi⟩ := hf' (r + 1)
  have hi' : ∀ a : ℕ, f a < r + 1 → a < i := fun a => lt_imp_lt_of_le_imp_le (hi a)
  have hS : { a : ℕ | r < f a }ᶜ ⊆ { a : ℕ | a ≤ i } := by
    simp only [Set.compl_setOf, not_lt]
    

Proof state:
f : ℕ → ℝ
hf : Tendsto f atTop atTop
r : ℝ
hf' : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ f a
i : ℕ
hi : ∀ (a : ℕ), i ≤ a → r + 1 ≤ f a
hi' : ∀ (a : ℕ), f a < r + 1 → a < i
⊢ {a | f a ≤ r} ⊆ {a | a ≤ i}

Next tactic:
exact fun a har => le_of_lt (hi' a (lt_of_le_of_lt har (lt_add_one _)))
theorem infiniteNeg_of_tendsto_bot {f : ℕ → ℝ} (hf : Tendsto f atTop atBot) :
    InfiniteNeg (ofSeq f) := fun r =>
  have hf' := tendsto_atTop_atBot.mp hf
  let ⟨i, hi⟩ := hf' (r - 1)
  have hi' : ∀ a : ℕ, r - 1 < f a → a < i := fun a => lt_imp_lt_of_le_imp_le (hi a)
  have hS : { a : ℕ | f a < r }ᶜ ⊆ { a : ℕ | a ≤ i } := by
    

Proof state:
f : ℕ → ℝ
hf : Tendsto f atTop atBot
r : ℝ
hf' : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → f a ≤ b
i : ℕ
hi : ∀ (a : ℕ), i ≤ a → f a ≤ r - 1
hi' : ∀ (a : ℕ), r - 1 < f a → a < i
⊢ {a | f a < r}ᶜ ⊆ {a | a ≤ i}

Next tactic:
simp only [Set.compl_setOf, not_lt]
theorem infiniteNeg_of_tendsto_bot {f : ℕ → ℝ} (hf : Tendsto f atTop atBot) :
    InfiniteNeg (ofSeq f) := fun r =>
  have hf' := tendsto_atTop_atBot.mp hf
  let ⟨i, hi⟩ := hf' (r - 1)
  have hi' : ∀ a : ℕ, r - 1 < f a → a < i := fun a => lt_imp_lt_of_le_imp_le (hi a)
  have hS : { a : ℕ | f a < r }ᶜ ⊆ { a : ℕ | a ≤ i } := by
    simp only [Set.compl_setOf, not_lt]
    

Proof state:
f : ℕ → ℝ
hf : Tendsto f atTop atBot
r : ℝ
hf' : ∀ (b : ℝ), ∃ i, ∀ (a : ℕ), i ≤ a → f a ≤ b
i : ℕ
hi : ∀ (a : ℕ), i ≤ a → f a ≤ r - 1
hi' : ∀ (a : ℕ), r - 1 < f a → a < i
⊢ {a | r ≤ f a} ⊆ {a | a ≤ i}

Next tactic:
exact fun a har => le_of_lt (hi' a (lt_of_lt_of_le (sub_one_lt _) har))
theorem not_infinite_real (r : ℝ) : ¬Infinite r := by
  

Proof state:
r : ℝ
⊢ ¬Infinite ↑r

Next tactic:
rw [not_infinite_iff_exist_lt_gt]
theorem not_infinite_real (r : ℝ) : ¬Infinite r := by
  rw [not_infinite_iff_exist_lt_gt]
  

Proof state:
r : ℝ
⊢ ∃ r_1 s, ↑r_1 < ↑r ∧ ↑r < ↑s

Next tactic:
exact ⟨r - 1, r + 1, coe_lt_coe.2 <| sub_one_lt r, coe_lt_coe.2 <| lt_add_one r⟩
theorem st_neg (x : ℝ*) : st (-x) = -st x :=
  if h : Infinite x then by
    

Proof state:
x : ℝ*
h : Infinite x
⊢ st (-x) = -st x

Next tactic:
rw [h.st_eq, (infinite_neg.2 h).st_eq, neg_zero]
theorem infinitesimal_def {x : ℝ*} : Infinitesimal x ↔ ∀ r : ℝ, 0 < r → -(r : ℝ*) < x ∧ x < r := by
  

Proof state:
x : ℝ*
⊢ Infinitesimal x ↔ ∀ (r : ℝ), 0 < r → -↑r < x ∧ x < ↑r

Next tactic:
simp [Infinitesimal, IsSt]
nonrec theorem Infinitesimal.add {x y : ℝ*} (hx : Infinitesimal x) (hy : Infinitesimal y) :
    Infinitesimal (x + y) := by 

Proof state:
x y : ℝ*
hx : Infinitesimal x
hy : Infinitesimal y
⊢ Infinitesimal (x + y)

Next tactic:
simpa only [add_zero] using hx.add hy
nonrec theorem Infinitesimal.neg {x : ℝ*} (hx : Infinitesimal x) : Infinitesimal (-x) := by
  

Proof state:
x : ℝ*
hx : Infinitesimal x
⊢ Infinitesimal (-x)

Next tactic:
simpa only [neg_zero] using hx.neg
nonrec theorem Infinitesimal.mul {x y : ℝ*} (hx : Infinitesimal x) (hy : Infinitesimal y) :
    Infinitesimal (x * y) := by 

Proof state:
x y : ℝ*
hx : Infinitesimal x
hy : Infinitesimal y
⊢ Infinitesimal (x * y)

Next tactic:
simpa only [mul_zero] using hx.mul hy
theorem IsSt.infinitesimal_sub {x : ℝ*} {r : ℝ} (hxr : IsSt x r) : Infinitesimal (x - ↑r) := by
  

Proof state:
x : ℝ*
r : ℝ
hxr : IsSt x r
⊢ Infinitesimal (x - ↑r)

Next tactic:
simpa only [sub_self] using hxr.sub (isSt_refl_real r)
theorem infinitePos_iff_infinitesimal_inv_pos {x : ℝ*} :
    InfinitePos x ↔ Infinitesimal x⁻¹ ∧ 0 < x⁻¹ :=
  ⟨fun hip =>
    ⟨infinitesimal_def.mpr fun r hr =>
        ⟨lt_trans (coe_lt_coe.2 (neg_neg_of_pos hr)) (inv_pos.2 (hip 0)),
          (inv_lt (coe_lt_coe.2 hr) (hip 0)).mp (by 

Proof state:
x : ℝ*
hip : InfinitePos x
r : ℝ
hr : 0 < r
⊢ (↑r)⁻¹ < x

Next tactic:
convert hip r⁻¹
theorem infiniteNeg_iff_infinitesimal_inv_neg {x : ℝ*} :
    InfiniteNeg x ↔ Infinitesimal x⁻¹ ∧ x⁻¹ < 0 := by
  

Proof state:
x : ℝ*
⊢ InfiniteNeg x ↔ Infinitesimal x⁻¹ ∧ x⁻¹ < 0

Next tactic:
rw [← infinitePos_neg, infinitePos_iff_infinitesimal_inv_pos, inv_neg, neg_pos, infinitesimal_neg]
theorem infinite_of_infinitesimal_inv {x : ℝ*} (h0 : x ≠ 0) (hi : Infinitesimal x⁻¹) :
    Infinite x := by
  

Proof state:
x : ℝ*
h0 : x ≠ 0
hi : Infinitesimal x⁻¹
⊢ Infinite x

Next tactic:
cases' lt_or_gt_of_ne h0 with hn hp
theorem infinite_of_infinitesimal_inv {x : ℝ*} (h0 : x ≠ 0) (hi : Infinitesimal x⁻¹) :
    Infinite x := by
  cases' lt_or_gt_of_ne h0 with hn hp
  · 

Proof state:
case inl
x : ℝ*
h0 : x ≠ 0
hi : Infinitesimal x⁻¹
hn : x < 0
⊢ Infinite x

Next tactic:
exact Or.inr (infiniteNeg_iff_infinitesimal_inv_neg.mpr ⟨hi, inv_lt_zero.mpr hn⟩)
theorem infinite_of_infinitesimal_inv {x : ℝ*} (h0 : x ≠ 0) (hi : Infinitesimal x⁻¹) :
    Infinite x := by
  cases' lt_or_gt_of_ne h0 with hn hp
  · exact Or.inr (infiniteNeg_iff_infinitesimal_inv_neg.mpr ⟨hi, inv_lt_zero.mpr hn⟩)
  · 

Proof state:
case inr
x : ℝ*
h0 : x ≠ 0
hi : Infinitesimal x⁻¹
hp : x > 0
⊢ Infinite x

Next tactic:
exact Or.inl (infinitePos_iff_infinitesimal_inv_pos.mpr ⟨hi, inv_pos.mpr hp⟩)
theorem infinitesimal_pos_iff_infinitePos_inv {x : ℝ*} :
    InfinitePos x⁻¹ ↔ Infinitesimal x ∧ 0 < x :=
  infinitePos_iff_infinitesimal_inv_pos.trans <| by 

Proof state:
x : ℝ*
⊢ Infinitesimal x⁻¹⁻¹ ∧ 0 < x⁻¹⁻¹ ↔ Infinitesimal x ∧ 0 < x

Next tactic:
rw [inv_inv]
theorem infinitesimal_neg_iff_infiniteNeg_inv {x : ℝ*} :
    InfiniteNeg x⁻¹ ↔ Infinitesimal x ∧ x < 0 :=
  infiniteNeg_iff_infinitesimal_inv_neg.trans <| by 

Proof state:
x : ℝ*
⊢ Infinitesimal x⁻¹⁻¹ ∧ x⁻¹⁻¹ < 0 ↔ Infinitesimal x ∧ x < 0

Next tactic:
rw [inv_inv]
theorem infinitesimal_iff_infinite_inv {x : ℝ*} (h : x ≠ 0) : Infinitesimal x ↔ Infinite x⁻¹ :=
  Iff.trans (by 

Proof state:
x : ℝ*
h : x ≠ 0
⊢ Infinitesimal x ↔ Infinitesimal x⁻¹⁻¹

Next tactic:
rw [inv_inv]
theorem IsSt.inv {x : ℝ*} {r : ℝ} (hi : ¬Infinitesimal x) (hr : IsSt x r) : IsSt x⁻¹ r⁻¹ :=
  hr.map <| continuousAt_inv₀ <| by 

Proof state:
x : ℝ*
r : ℝ
hi : ¬Infinitesimal x
hr : IsSt x r
⊢ r ≠ 0

Next tactic:
rintro rfl
theorem IsSt.inv {x : ℝ*} {r : ℝ} (hi : ¬Infinitesimal x) (hr : IsSt x r) : IsSt x⁻¹ r⁻¹ :=
  hr.map <| continuousAt_inv₀ <| by rintro rfl; 

Proof state:
x : ℝ*
hi : ¬Infinitesimal x
hr : IsSt x 0
⊢ False

Next tactic:
exact hi hr
theorem st_inv (x : ℝ*) : st x⁻¹ = (st x)⁻¹ := by
  

Proof state:
x : ℝ*
⊢ st x⁻¹ = (st x)⁻¹

Next tactic:
by_cases h0 : x = 0
theorem st_inv (x : ℝ*) : st x⁻¹ = (st x)⁻¹ := by
  by_cases h0 : x = 0
  

Proof state:
case pos
x : ℝ*
h0 : x = 0
⊢ st x⁻¹ = (st x)⁻¹
case neg x : ℝ* h0 : ¬x = 0 ⊢ st x⁻¹ = (st x)⁻¹

Next tactic:
rw [h0, inv_zero, ← coe_zero, st_id_real, inv_zero]
theorem st_inv (x : ℝ*) : st x⁻¹ = (st x)⁻¹ := by
  by_cases h0 : x = 0
  rw [h0, inv_zero, ← coe_zero, st_id_real, inv_zero]
  

Proof state:
case neg
x : ℝ*
h0 : ¬x = 0
⊢ st x⁻¹ = (st x)⁻¹

Next tactic:
by_cases h1 : Infinitesimal x
theorem st_inv (x : ℝ*) : st x⁻¹ = (st x)⁻¹ := by
  by_cases h0 : x = 0
  rw [h0, inv_zero, ← coe_zero, st_id_real, inv_zero]
  by_cases h1 : Infinitesimal x
  

Proof state:
case pos
x : ℝ*
h0 : ¬x = 0
h1 : Infinitesimal x
⊢ st x⁻¹ = (st x)⁻¹
case neg x : ℝ* h0 : ¬x = 0 h1 : ¬Infinitesimal x ⊢ st x⁻¹ = (st x)⁻¹

Next tactic:
rw [((infinitesimal_iff_infinite_inv h0).mp h1).st_eq, h1.st_eq, inv_zero]
theorem st_inv (x : ℝ*) : st x⁻¹ = (st x)⁻¹ := by
  by_cases h0 : x = 0
  rw [h0, inv_zero, ← coe_zero, st_id_real, inv_zero]
  by_cases h1 : Infinitesimal x
  rw [((infinitesimal_iff_infinite_inv h0).mp h1).st_eq, h1.st_eq, inv_zero]
  

Proof state:
case neg
x : ℝ*
h0 : ¬x = 0
h1 : ¬Infinitesimal x
⊢ st x⁻¹ = (st x)⁻¹

Next tactic:
by_cases h2 : Infinite x
theorem st_inv (x : ℝ*) : st x⁻¹ = (st x)⁻¹ := by
  by_cases h0 : x = 0
  rw [h0, inv_zero, ← coe_zero, st_id_real, inv_zero]
  by_cases h1 : Infinitesimal x
  rw [((infinitesimal_iff_infinite_inv h0).mp h1).st_eq, h1.st_eq, inv_zero]
  by_cases h2 : Infinite x
  

Proof state:
case pos
x : ℝ*
h0 : ¬x = 0
h1 : ¬Infinitesimal x
h2 : Infinite x
⊢ st x⁻¹ = (st x)⁻¹
case neg x : ℝ* h0 : ¬x = 0 h1 : ¬Infinitesimal x h2 : ¬Infinite x ⊢ st x⁻¹ = (st x)⁻¹

Next tactic:
rw [(infinitesimal_inv_of_infinite h2).st_eq, h2.st_eq, inv_zero]
theorem st_inv (x : ℝ*) : st x⁻¹ = (st x)⁻¹ := by
  by_cases h0 : x = 0
  rw [h0, inv_zero, ← coe_zero, st_id_real, inv_zero]
  by_cases h1 : Infinitesimal x
  rw [((infinitesimal_iff_infinite_inv h0).mp h1).st_eq, h1.st_eq, inv_zero]
  by_cases h2 : Infinite x
  rw [(infinitesimal_inv_of_infinite h2).st_eq, h2.st_eq, inv_zero]
  

Proof state:
case neg
x : ℝ*
h0 : ¬x = 0
h1 : ¬Infinitesimal x
h2 : ¬Infinite x
⊢ st x⁻¹ = (st x)⁻¹

Next tactic:
exact ((isSt_st' h2).inv h1).st_eq
theorem infinitePos_mul_of_infinitePos_not_infinitesimal_pos {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → 0 < y → InfinitePos (x * y) := fun hx hy₁ hy₂ r => by
  

Proof state:
x y : ℝ*
hx : InfinitePos x
hy₁ : ¬Infinitesimal y
hy₂ : 0 < y
r : ℝ
⊢ ↑r < x * y

Next tactic:
have hy₁' := not_forall.mp (mt infinitesimal_def.2 hy₁)
theorem infinitePos_mul_of_infinitePos_not_infinitesimal_pos {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → 0 < y → InfinitePos (x * y) := fun hx hy₁ hy₂ r => by
  have hy₁' := not_forall.mp (mt infinitesimal_def.2 hy₁)
  

Proof state:
x y : ℝ*
hx : InfinitePos x
hy₁ : ¬Infinitesimal y
hy₂ : 0 < y
r : ℝ
hy₁' : ∃ x, ¬(0 < x → -↑x < y ∧ y < ↑x)
⊢ ↑r < x * y

Next tactic:
let ⟨r₁, hy₁''⟩ := hy₁'
theorem infinitePos_mul_of_infinitePos_not_infinitesimal_pos {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → 0 < y → InfinitePos (x * y) := fun hx hy₁ hy₂ r => by
  have hy₁' := not_forall.mp (mt infinitesimal_def.2 hy₁)
  let ⟨r₁, hy₁''⟩ := hy₁'
  

Proof state:
x y : ℝ*
hx : InfinitePos x
hy₁ : ¬Infinitesimal y
hy₂ : 0 < y
r : ℝ
hy₁' : ∃ x, ¬(0 < x → -↑x < y ∧ y < ↑x)
r₁ : ℝ
hy₁'' : ¬(0 < r₁ → -↑r₁ < y ∧ y < ↑r₁)
⊢ ↑r < x * y

Next tactic:
have hyr : 0 < r₁ ∧ ↑r₁ ≤ y := by
    rwa [not_imp, ← abs_lt, not_lt, abs_of_pos hy₂] at hy₁''
theorem infinitePos_mul_of_infinitePos_not_infinitesimal_pos {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → 0 < y → InfinitePos (x * y) := fun hx hy₁ hy₂ r => by
  have hy₁' := not_forall.mp (mt infinitesimal_def.2 hy₁)
  let ⟨r₁, hy₁''⟩ := hy₁'
  have hyr : 0 < r₁ ∧ ↑r₁ ≤ y := by
    

Proof state:
x y : ℝ*
hx : InfinitePos x
hy₁ : ¬Infinitesimal y
hy₂ : 0 < y
r : ℝ
hy₁' : ∃ x, ¬(0 < x → -↑x < y ∧ y < ↑x)
r₁ : ℝ
hy₁'' : ¬(0 < r₁ → -↑r₁ < y ∧ y < ↑r₁)
⊢ 0 < r₁ ∧ ↑r₁ ≤ y

Next tactic:
rwa [not_imp, ← abs_lt, not_lt, abs_of_pos hy₂] at hy₁''
theorem infinitePos_mul_of_infinitePos_not_infinitesimal_pos {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → 0 < y → InfinitePos (x * y) := fun hx hy₁ hy₂ r => by
  have hy₁' := not_forall.mp (mt infinitesimal_def.2 hy₁)
  let ⟨r₁, hy₁''⟩ := hy₁'
  have hyr : 0 < r₁ ∧ ↑r₁ ≤ y := by
    rwa [not_imp, ← abs_lt, not_lt, abs_of_pos hy₂] at hy₁''
  

Proof state:
x y : ℝ*
hx : InfinitePos x
hy₁ : ¬Infinitesimal y
hy₂ : 0 < y
r : ℝ
hy₁' : ∃ x, ¬(0 < x → -↑x < y ∧ y < ↑x)
r₁ : ℝ
hy₁'' : ¬(0 < r₁ → -↑r₁ < y ∧ y < ↑r₁)
hyr : 0 < r₁ ∧ ↑r₁ ≤ y
⊢ ↑r < x * y

Next tactic:
rw [← div_mul_cancel r (ne_of_gt hyr.1), coe_mul]
theorem infinitePos_mul_of_infinitePos_not_infinitesimal_pos {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → 0 < y → InfinitePos (x * y) := fun hx hy₁ hy₂ r => by
  have hy₁' := not_forall.mp (mt infinitesimal_def.2 hy₁)
  let ⟨r₁, hy₁''⟩ := hy₁'
  have hyr : 0 < r₁ ∧ ↑r₁ ≤ y := by
    rwa [not_imp, ← abs_lt, not_lt, abs_of_pos hy₂] at hy₁''
  rw [← div_mul_cancel r (ne_of_gt hyr.1), coe_mul]
  

Proof state:
x y : ℝ*
hx : InfinitePos x
hy₁ : ¬Infinitesimal y
hy₂ : 0 < y
r : ℝ
hy₁' : ∃ x, ¬(0 < x → -↑x < y ∧ y < ↑x)
r₁ : ℝ
hy₁'' : ¬(0 < r₁ → -↑r₁ < y ∧ y < ↑r₁)
hyr : 0 < r₁ ∧ ↑r₁ ≤ y
⊢ ↑(r / r₁) * ↑r₁ < x * y

Next tactic:
exact mul_lt_mul (hx (r / r₁)) hyr.2 (coe_lt_coe.2 hyr.1) (le_of_lt (hx 0))
theorem infinitePos_mul_of_infiniteNeg_not_infinitesimal_neg {x y : ℝ*} :
    InfiniteNeg x → ¬Infinitesimal y → y < 0 → InfinitePos (x * y) := by
  

Proof state:
x y : ℝ*
⊢ InfiniteNeg x → ¬Infinitesimal y → y < 0 → InfinitePos (x * y)

Next tactic:
rw [← infinitePos_neg, ← neg_pos, ← neg_mul_neg, ← infinitesimal_neg]
theorem infinitePos_mul_of_infiniteNeg_not_infinitesimal_neg {x y : ℝ*} :
    InfiniteNeg x → ¬Infinitesimal y → y < 0 → InfinitePos (x * y) := by
  rw [← infinitePos_neg, ← neg_pos, ← neg_mul_neg, ← infinitesimal_neg]
  

Proof state:
x y : ℝ*
⊢ InfinitePos (-x) → ¬Infinitesimal (-y) → 0 < -y → InfinitePos (-x * -y)

Next tactic:
exact infinitePos_mul_of_infinitePos_not_infinitesimal_pos
theorem infiniteNeg_mul_of_infinitePos_not_infinitesimal_neg {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → y < 0 → InfiniteNeg (x * y) := by
  

Proof state:
x y : ℝ*
⊢ InfinitePos x → ¬Infinitesimal y → y < 0 → InfiniteNeg (x * y)

Next tactic:
rw [← infinitePos_neg, ← neg_pos, neg_mul_eq_mul_neg, ← infinitesimal_neg]
theorem infiniteNeg_mul_of_infinitePos_not_infinitesimal_neg {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → y < 0 → InfiniteNeg (x * y) := by
  rw [← infinitePos_neg, ← neg_pos, neg_mul_eq_mul_neg, ← infinitesimal_neg]
  

Proof state:
x y : ℝ*
⊢ InfinitePos x → ¬Infinitesimal (-y) → 0 < -y → InfinitePos (x * -y)

Next tactic:
exact infinitePos_mul_of_infinitePos_not_infinitesimal_pos
theorem infiniteNeg_mul_of_infiniteNeg_not_infinitesimal_pos {x y : ℝ*} :
    InfiniteNeg x → ¬Infinitesimal y → 0 < y → InfiniteNeg (x * y) := by
  

Proof state:
x y : ℝ*
⊢ InfiniteNeg x → ¬Infinitesimal y → 0 < y → InfiniteNeg (x * y)

Next tactic:
rw [← infinitePos_neg, ← infinitePos_neg, neg_mul_eq_neg_mul]
theorem infiniteNeg_mul_of_infiniteNeg_not_infinitesimal_pos {x y : ℝ*} :
    InfiniteNeg x → ¬Infinitesimal y → 0 < y → InfiniteNeg (x * y) := by
  rw [← infinitePos_neg, ← infinitePos_neg, neg_mul_eq_neg_mul]
  

Proof state:
x y : ℝ*
⊢ InfinitePos (-x) → ¬Infinitesimal y → 0 < y → InfinitePos (-x * y)

Next tactic:
exact infinitePos_mul_of_infinitePos_not_infinitesimal_pos