Theorem: TopologicalRing.of_norm
File: Mathlib/Topology/Algebra/Order/Field.lean

tactic: have h0 : ∀ f : R → R, ∀ c ≥ (0 : 𝕜), (∀ x, norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
state_before: R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
⊢ TopologicalRing R

tactic: apply TopologicalRing.of_addGroup_of_nhds_zero
state_before: R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
⊢ TopologicalRing R

tactic: case hmul =>
  refine ((nhds_basis.prod nhds_basis).tendsto_iff nhds_basis).2 fun ε ε0 ↦ ?_
  refine ⟨(1, ε), ⟨one_pos, ε0⟩, fun (x, y) ⟨hx, hy⟩ => ?_⟩
  simp only [sub_zero] at *
  calc norm (x * y) ≤ norm x * norm y := norm_mul_le _ _
  _ < ε := mul_lt_of_le_one_of_lt_of_nonneg hx.le hy (norm_nonneg _)
state_before: case hmul
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
⊢ Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)

case hmul_left
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
⊢ ∀ (x₀ : R), Tendsto (fun x => x₀ * x) (𝓝 0) (𝓝 0)

case hmul_right
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
⊢ ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)

tactic: case hmul_left => exact fun x => h0 _ (norm x) (norm_nonneg _) (norm_mul_le x)
state_before: case hmul_left
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
⊢ ∀ (x₀ : R), Tendsto (fun x => x₀ * x) (𝓝 0) (𝓝 0)

case hmul_right
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
⊢ ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)

tactic: refine fun f c c0 hf ↦ (nhds_basis.tendsto_iff nhds_basis).2 fun ε ε0 ↦ ?_
state_before: case h0
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
⊢ ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)

tactic: rcases exists_pos_mul_lt ε0 c with ⟨δ, δ0, hδ⟩
state_before: case h0
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
f : R → R
c : 𝕜
c0 : c ≥ 0
hf : ∀ (x : R), norm (f x) ≤ c * norm x
ε : 𝕜
ε0 : 0 < ε
⊢ ∃ ia, 0 < ia ∧ ∀ (x : R), x ∈ {x | norm x < ia} → f x ∈ {x | norm x < ε}

tactic: refine ⟨δ, δ0, fun x hx ↦ (hf _).trans_lt ?_⟩
state_before: case h0.intro.intro
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
f : R → R
c : 𝕜
c0 : c ≥ 0
hf : ∀ (x : R), norm (f x) ≤ c * norm x
ε : 𝕜
ε0 : 0 < ε
δ : 𝕜
δ0 : 0 < δ
hδ : c * δ < ε
⊢ ∃ ia, 0 < ia ∧ ∀ (x : R), x ∈ {x | norm x < ia} → f x ∈ {x | norm x < ε}

tactic: exact (mul_le_mul_of_nonneg_left (le_of_lt hx) c0).trans_lt hδ
state_before: case h0.intro.intro
R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
f : R → R
c : 𝕜
c0 : c ≥ 0
hf : ∀ (x : R), norm (f x) ≤ c * norm x
ε : 𝕜
ε0 : 0 < ε
δ : 𝕜
δ0 : 0 < δ
hδ : c * δ < ε
x : R
hx : x ∈ {x | norm x < δ}
⊢ c * norm x < ε

tactic: refine ((nhds_basis.prod nhds_basis).tendsto_iff nhds_basis).2 fun ε ε0 ↦ ?_
state_before: R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
⊢ Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0)

tactic: refine ⟨(1, ε), ⟨one_pos, ε0⟩, fun (x, y) ⟨hx, hy⟩ => ?_⟩
state_before: R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
ε : 𝕜
ε0 : 0 < ε
⊢ ∃ ia,
    (0 < ia.fst ∧ 0 < ia.snd) ∧
      ∀ (x : R × R),
        x ∈ {x | norm x < ia.fst} ×ˢ {x | norm x < ia.snd} → uncurry (fun x x_1 => x * x_1) x ∈ {x | norm x < ε}

tactic: simp only [sub_zero] at *
state_before: R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
ε : 𝕜
ε0 : 0 < ε
x✝¹ : R × R
x y : R
x✝ : (x, y) ∈ {x | norm x < (1, ε).fst} ×ˢ {x | norm x < (1, ε).snd}
hx : (x, y).fst ∈ {x | norm x < (1, ε).fst}
hy : (x, y).snd ∈ {x | norm x < (1, ε).snd}
⊢ uncurry (fun x x_1 => x * x_1) (x, y) ∈ {x | norm x < ε}

tactic: calc norm (x * y) ≤ norm x * norm y := norm_mul_le _ _
_ < ε := mul_lt_of_le_one_of_lt_of_nonneg hx.le hy (norm_nonneg _)
state_before: R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
ε : 𝕜
ε0 : 0 < ε
x✝¹ : R × R
x y : R
x✝ : (x, y) ∈ {x | norm x < 1} ×ˢ {x | norm x < ε}
hx : x ∈ {x | norm x < 1}
hy : y ∈ {x | norm x < ε}
⊢ uncurry (fun x x_1 => x * x_1) (x, y) ∈ {x | norm x < ε}

tactic: exact fun x => h0 _ (norm x) (norm_nonneg _) (norm_mul_le x)
state_before: R : Type u_1
𝕜 : Type u_2
inst✝³ : NonUnitalNonAssocRing R
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalAddGroup R
norm : R → 𝕜
norm_nonneg : ∀ (x : R), 0 ≤ norm x
norm_mul_le : ∀ (x y : R), norm (x * y) ≤ norm x * norm y
nhds_basis : HasBasis (𝓝 0) (fun x => 0 < x) fun ε => {x | norm x < ε}
h0 : ∀ (f : R → R) (c : 𝕜), c ≥ 0 → (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)
⊢ ∀ (x₀ : R), Tendsto (fun x => x₀ * x) (𝓝 0) (𝓝 0)