[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
⊢ ‖x‖ = infDist 0 {m | ↑m = x}
[PROOFSTEP]
simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M
⊢ ‖↑x‖ = infDist x ↑S
[PROOFSTEP]
rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ←
  IsometryEquiv.preimage_symm]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M
⊢ infDist x (↑(IsometryEquiv.symm (IsometryEquiv.subLeft x)) ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S
[PROOFSTEP]
congr 1 with y
[GOAL]
case e_s.h
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
⊢ y ∈ ↑(IsometryEquiv.symm (IsometryEquiv.subLeft x)) ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S
[PROOFSTEP]
simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg,
  neg_add_cancel_right, SetLike.mem_coe]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
⊢ ‖-x‖ = ‖x‖
[PROOFSTEP]
simp only [AddSubgroup.quotient_norm_eq]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
⊢ sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})
[PROOFSTEP]
congr 1 with r
[GOAL]
case e_a.h
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
r : ℝ
⊢ r ∈ norm '' {m | ↑m = -x} ↔ r ∈ norm '' {m | ↑m = x}
[PROOFSTEP]
constructor
[GOAL]
case e_a.h.mp
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
r : ℝ
⊢ r ∈ norm '' {m | ↑m = -x} → r ∈ norm '' {m | ↑m = x}
[PROOFSTEP]
{rintro ⟨m, hm, rfl⟩; use-m; simpa [neg_eq_iff_eq_neg] using hm
}
[GOAL]
case e_a.h.mp
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
r : ℝ
⊢ r ∈ norm '' {m | ↑m = -x} → r ∈ norm '' {m | ↑m = x}
[PROOFSTEP]
rintro ⟨m, hm, rfl⟩
[GOAL]
case e_a.h.mp.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
m : M
hm : m ∈ {m | ↑m = -x}
⊢ ‖m‖ ∈ norm '' {m | ↑m = x}
[PROOFSTEP]
use-m
[GOAL]
case h
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
m : M
hm : m ∈ {m | ↑m = -x}
⊢ -m ∈ {m | ↑m = x} ∧ ‖-m‖ = ‖m‖
[PROOFSTEP]
simpa [neg_eq_iff_eq_neg] using hm
[GOAL]
case e_a.h.mpr
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
r : ℝ
⊢ r ∈ norm '' {m | ↑m = x} → r ∈ norm '' {m | ↑m = -x}
[PROOFSTEP]
{rintro ⟨m, hm, rfl⟩; use-m; simpa [neg_eq_iff_eq_neg] using hm
}
[GOAL]
case e_a.h.mpr
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
r : ℝ
⊢ r ∈ norm '' {m | ↑m = x} → r ∈ norm '' {m | ↑m = -x}
[PROOFSTEP]
rintro ⟨m, hm, rfl⟩
[GOAL]
case e_a.h.mpr.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
m : M
hm : m ∈ {m | ↑m = x}
⊢ ‖m‖ ∈ norm '' {m | ↑m = -x}
[PROOFSTEP]
use-m
[GOAL]
case h
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
m : M
hm : m ∈ {m | ↑m = x}
⊢ -m ∈ {m | ↑m = -x} ∧ ‖-m‖ = ‖m‖
[PROOFSTEP]
simpa [neg_eq_iff_eq_neg] using hm
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M ⧸ S
⊢ ‖x - y‖ = ‖y - x‖
[PROOFSTEP]
rw [← neg_sub, quotient_norm_neg]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ‖↑(mk' S) m‖ = sInf ((fun x => ‖m + x‖) '' ↑S)
[PROOFSTEP]
rw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg, neg_coe_set (H := S), infDist_eq_iInf]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ⨅ (y : ↑↑S), dist (-m) ↑y = ⨅ (a : ↑↑S), ‖m + ↑a‖
[PROOFSTEP]
simp only [dist_eq_norm', sub_neg_eq_add, add_comm]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ‖↑(mk' S) m‖ = 0 ↔ m ∈ closure ↑S
[PROOFSTEP]
rw [mk'_apply, norm_mk, ← mem_closure_iff_infDist_zero]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ Set.Nonempty ↑S
[PROOFSTEP]
exact ⟨0, S.zero_mem⟩
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
r : ℝ
⊢ ‖x‖ < r ↔ ∃ m, ↑m = x ∧ ‖m‖ < r
[PROOFSTEP]
rw [isGLB_lt_iff (isGLB_quotient_norm _), bex_image_iff]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
r : ℝ
⊢ (∃ x_1, x_1 ∈ {m | ↑(mk' S) m = x} ∧ ‖x_1‖ < r) ↔ ∃ m, ↑m = x ∧ ‖m‖ < r
[PROOFSTEP]
rfl
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
ε : ℝ
hε : 0 < ε
⊢ ∃ s, s ∈ S ∧ ‖m + s‖ < ‖↑(mk' S) m‖ + ε
[PROOFSTEP]
obtain ⟨n : M, hn : mk' S n = mk' S m, hn' : ‖n‖ < ‖mk' S m‖ + ε⟩ := norm_mk_lt (QuotientAddGroup.mk' S m) hε
[GOAL]
case intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
ε : ℝ
hε : 0 < ε
n : M
hn : ↑(mk' S) n = ↑(mk' S) m
hn' : ‖n‖ < ‖↑(mk' S) m‖ + ε
⊢ ∃ s, s ∈ S ∧ ‖m + s‖ < ‖↑(mk' S) m‖ + ε
[PROOFSTEP]
erw [eq_comm, QuotientAddGroup.eq] at hn
[GOAL]
case intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
ε : ℝ
hε : 0 < ε
n : M
hn : -m + n ∈ S
hn' : ‖n‖ < ‖↑(mk' S) m‖ + ε
⊢ ∃ s, s ∈ S ∧ ‖m + s‖ < ‖↑(mk' S) m‖ + ε
[PROOFSTEP]
use-m + n, hn
[GOAL]
case right
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
ε : ℝ
hε : 0 < ε
n : M
hn : -m + n ∈ S
hn' : ‖n‖ < ‖↑(mk' S) m‖ + ε
⊢ ‖m + (-m + n)‖ < ‖↑(mk' S) m‖ + ε
[PROOFSTEP]
rwa [add_neg_cancel_left]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M ⧸ S
⊢ ‖x + y‖ ≤ ‖x‖ + ‖y‖
[PROOFSTEP]
rcases And.intro (mk_surjective x) (mk_surjective y) with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩
[GOAL]
case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
⊢ ‖↑x + ↑y‖ ≤ ‖↑x‖ + ‖↑y‖
[PROOFSTEP]
simp only [← mk'_apply, ← map_add, quotient_norm_mk_eq, sInf_image']
[GOAL]
case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
⊢ ⨅ (a : ↑↑S), ‖x + y + ↑a‖ ≤ (⨅ (a : ↑↑S), ‖x + ↑a‖) + ⨅ (a : ↑↑S), ‖y + ↑a‖
[PROOFSTEP]
refine le_ciInf_add_ciInf fun a b ↦ ?_
[GOAL]
case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
a b : ↑↑S
⊢ ⨅ (a : ↑↑S), ‖x + y + ↑a‖ ≤ ‖x + ↑a‖ + ‖y + ↑b‖
[PROOFSTEP]
refine ciInf_le_of_le ⟨0, forall_range_iff.2 fun _ ↦ norm_nonneg _⟩ (a + b) ?_
[GOAL]
case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
a b : ↑↑S
⊢ ‖x + y + ↑(a + b)‖ ≤ ‖x + ↑a‖ + ‖y + ↑b‖
[PROOFSTEP]
exact (congr_arg norm (add_add_add_comm _ _ _ _)).trans_le (norm_add_le _ _)
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
⊢ ‖0‖ = 0
[PROOFSTEP]
erw [quotient_norm_eq_zero_iff]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
⊢ 0 ∈ closure ↑S
[PROOFSTEP]
exact subset_closure S.zero_mem
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
hS : IsClosed ↑S
m : M
h : ‖↑(mk' S) m‖ = 0
⊢ m ∈ S
[PROOFSTEP]
rwa [quotient_norm_eq_zero_iff, hS.closure_eq] at h
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
⊢ Filter.HasBasis (𝓝 0) (fun ε => 0 < ε) fun ε => {x | ‖x‖ < ε}
[PROOFSTEP]
have : ∀ ε : ℝ, mk '' ball (0 : M) ε = {x : M ⧸ S | ‖x‖ < ε}
[GOAL]
case this
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
⊢ ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}
[PROOFSTEP]
refine fun ε ↦ Set.ext <| forall_mk.2 fun x ↦ ?_
[GOAL]
case this
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
ε : ℝ
x : M
⊢ ↑x ∈ mk '' ball 0 ε ↔ ↑x ∈ {x | ‖x‖ < ε}
[PROOFSTEP]
rw [ball_zero_eq, mem_setOf_eq, norm_lt_iff, mem_image]
[GOAL]
case this
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
ε : ℝ
x : M
⊢ (∃ x_1, x_1 ∈ {x | ‖x‖ < ε} ∧ ↑x_1 = ↑x) ↔ ∃ m, ↑m = ↑x ∧ ‖m‖ < ε
[PROOFSTEP]
exact exists_congr fun _ ↦ and_comm
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
this : ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}
⊢ Filter.HasBasis (𝓝 0) (fun ε => 0 < ε) fun ε => {x | ‖x‖ < ε}
[PROOFSTEP]
rw [← mk_zero, nhds_eq, ← funext this]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
this : ∀ (ε : ℝ), mk '' ball 0 ε = {x | ‖x‖ < ε}
⊢ Filter.HasBasis (Filter.map mk (𝓝 0)) (fun ε => 0 < ε) fun x => mk '' ball 0 x
[PROOFSTEP]
exact .map _ Metric.nhds_basis_ball
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x : M ⧸ S
⊢ dist x x = 0
[PROOFSTEP]
simp only [norm_mk_zero, sub_self]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y z : M ⧸ S
⊢ dist x z ≤ dist x y + dist y z
[PROOFSTEP]
refine le_trans ?_ (quotient_norm_add_le _ _ _)
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y z : M ⧸ S
⊢ dist x z ≤ ‖x - y + (y - z)‖
[PROOFSTEP]
exact (congr_arg norm (sub_add_sub_cancel _ _ _).symm).le
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M ⧸ S
⊢ (fun x y => ↑{ val := ‖x - y‖, property := (_ : 0 ≤ ‖x - y‖) }) x y = ENNReal.ofReal (dist x y)
[PROOFSTEP]
exact ENNReal.coe_nnreal_eq _
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
⊢ uniformity (M ⧸ S) = ⨅ (ε : ℝ) (_ : ε > 0), Filter.principal {p | dist p.fst p.snd < ε}
[PROOFSTEP]
rw [uniformity_eq_comap_nhds_zero', ((quotient_nhd_basis S).comap _).eq_biInf]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
⊢ ⨅ (i : ℝ) (_ : 0 < i), Filter.principal ((fun p => p.snd - p.fst) ⁻¹' {x | ‖x‖ < i}) =
    ⨅ (ε : ℝ) (_ : ε > 0), Filter.principal {p | dist p.fst p.snd < ε}
[PROOFSTEP]
simp only [dist, quotient_norm_sub_rev (Prod.fst _), preimage_setOf_eq]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
src✝ : M →+ M ⧸ S := mk' S
m : M
⊢ ‖ZeroHom.toFun (↑src✝) m‖ ≤ 1 * ‖m‖
[PROOFSTEP]
simpa [one_mul] using quotient_norm_mk_le _ m
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ‖↑(normedMk S) m‖ ≤ 1 * ‖m‖
[PROOFSTEP]
simp [quotient_norm_mk_le']
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
x : M ⧸ S
⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖
[PROOFSTEP]
cases (norm_nonneg f).eq_or_gt with
| inl h =>
  rcases mk_surjective x with ⟨x, rfl⟩
  simpa [h] using le_opNorm f x
| inr h =>
  rw [← not_lt, ← _root_.lt_div_iff' h, norm_lt_iff]
  rintro ⟨x, rfl, hx⟩
  exact ((lt_div_iff' h).1 hx).not_le (le_opNorm f x)
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
x : M ⧸ S
x✝ : ‖f‖ = 0 ∨ 0 < ‖f‖
⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖
[PROOFSTEP]
cases (norm_nonneg f).eq_or_gt with
| inl h =>
  rcases mk_surjective x with ⟨x, rfl⟩
  simpa [h] using le_opNorm f x
| inr h =>
  rw [← not_lt, ← _root_.lt_div_iff' h, norm_lt_iff]
  rintro ⟨x, rfl, hx⟩
  exact ((lt_div_iff' h).1 hx).not_le (le_opNorm f x)
[GOAL]
case inl
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
x : M ⧸ S
h : ‖f‖ = 0
⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖
[PROOFSTEP]

| inl h =>
  rcases mk_surjective x with ⟨x, rfl⟩
  simpa [h] using le_opNorm f x
[GOAL]
case inl
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
x : M ⧸ S
h : ‖f‖ = 0
⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖
[PROOFSTEP]
rcases mk_surjective x with ⟨x, rfl⟩
[GOAL]
case inl.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
h : ‖f‖ = 0
x : M
⊢ ‖↑(lift S (toAddMonoidHom f) hf) ↑x‖ ≤ ‖f‖ * ‖↑x‖
[PROOFSTEP]
simpa [h] using le_opNorm f x
[GOAL]
case inr
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
x : M ⧸ S
h : 0 < ‖f‖
⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖
[PROOFSTEP]

| inr h =>
  rw [← not_lt, ← _root_.lt_div_iff' h, norm_lt_iff]
  rintro ⟨x, rfl, hx⟩
  exact ((lt_div_iff' h).1 hx).not_le (le_opNorm f x)
[GOAL]
case inr
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
x : M ⧸ S
h : 0 < ‖f‖
⊢ ‖↑(lift S (toAddMonoidHom f) hf) x‖ ≤ ‖f‖ * ‖x‖
[PROOFSTEP]
rw [← not_lt, ← _root_.lt_div_iff' h, norm_lt_iff]
[GOAL]
case inr
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
x : M ⧸ S
h : 0 < ‖f‖
⊢ ¬∃ m, ↑m = x ∧ ‖m‖ < ‖↑(lift S (toAddMonoidHom f) hf) x‖ / ‖f‖
[PROOFSTEP]
rintro ⟨x, rfl, hx⟩
[GOAL]
case inr.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (x : M), x ∈ S → ↑f x = 0
h : 0 < ‖f‖
x : M
hx : ‖x‖ < ‖↑(lift S (toAddMonoidHom f) hf) ↑x‖ / ‖f‖
⊢ False
[PROOFSTEP]
exact ((lt_div_iff' h).1 hx).not_le (le_opNorm f x)
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) ≠ univ
⊢ ‖normedMk S‖ = 1
[PROOFSTEP]
refine le_antisymm (norm_normedMk_le S) ?_
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) ≠ univ
⊢ 1 ≤ ‖normedMk S‖
[PROOFSTEP]
obtain ⟨x, hx⟩ : ∃ x : M, 0 < ‖(x : M ⧸ S)‖
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) ≠ univ
⊢ ∃ x, 0 < ‖↑x‖
[PROOFSTEP]
refine (Set.nonempty_compl.2 h).imp fun x hx ↦ ?_
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) ≠ univ
x : M
hx : x ∈ (↑(topologicalClosure S))ᶜ
⊢ 0 < ‖↑x‖
[PROOFSTEP]
exact (norm_nonneg _).lt_of_ne' <| mt (quotient_norm_eq_zero_iff S x).1 hx
[GOAL]
case intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) ≠ univ
x : M
hx : 0 < ‖↑x‖
⊢ 1 ≤ ‖normedMk S‖
[PROOFSTEP]
refine (le_mul_iff_one_le_left hx).1 ?_
[GOAL]
case intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) ≠ univ
x : M
hx : 0 < ‖↑x‖
⊢ ‖↑x‖ ≤ ‖normedMk S‖ * ‖↑x‖
[PROOFSTEP]
exact norm_lift_apply_le S.normedMk (fun x ↦ (eq_zero_iff x).2) x
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) = univ
⊢ ‖normedMk S‖ = 0
[PROOFSTEP]
refine' le_antisymm (opNorm_le_bound _ le_rfl fun x => _) (norm_nonneg _)
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) = univ
x : M
⊢ ‖↑(normedMk S) x‖ ≤ 0 * ‖x‖
[PROOFSTEP]
have hker : x ∈ S.normedMk.ker.topologicalClosure :=
  by
  rw [S.ker_normedMk, ← SetLike.mem_coe, h]
  trivial
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) = univ
x : M
⊢ x ∈ topologicalClosure (ker (normedMk S))
[PROOFSTEP]
rw [S.ker_normedMk, ← SetLike.mem_coe, h]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) = univ
x : M
⊢ x ∈ univ
[PROOFSTEP]
trivial
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) = univ
x : M
hker : x ∈ topologicalClosure (ker (normedMk S))
⊢ ‖↑(normedMk S) x‖ ≤ 0 * ‖x‖
[PROOFSTEP]
rw [ker_normedMk] at hker
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
h : ↑(topologicalClosure S) = univ
x : M
hker : x ∈ topologicalClosure S
⊢ ‖↑(normedMk S) x‖ ≤ 0 * ‖x‖
[PROOFSTEP]
simp only [(quotient_norm_eq_zero_iff S x).mpr hker, normedMk.apply, zero_mul, le_rfl]
[GOAL]
M : Type u_1
N✝ : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_3
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
g : NormedAddGroupHom (M ⧸ S) N
h : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f
⊢ g = lift S f hf
[PROOFSTEP]
ext x
[GOAL]
case H
M : Type u_1
N✝ : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_3
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
g : NormedAddGroupHom (M ⧸ S) N
h : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f
x : M ⧸ S
⊢ ↑g x = ↑(lift S f hf) x
[PROOFSTEP]
rcases AddSubgroup.surjective_normedMk _ x with ⟨x, rfl⟩
[GOAL]
case H.intro
M : Type u_1
N✝ : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_3
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
g : NormedAddGroupHom (M ⧸ S) N
h : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f
x : M
⊢ ↑g (↑(AddSubgroup.normedMk S) x) = ↑(lift S f hf) (↑(AddSubgroup.normedMk S) x)
[PROOFSTEP]
change g.comp S.normedMk x = _
[GOAL]
case H.intro
M : Type u_1
N✝ : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_3
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
g : NormedAddGroupHom (M ⧸ S) N
h : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f
x : M
⊢ ↑(NormedAddGroupHom.comp g (AddSubgroup.normedMk S)) x = ↑(lift S f hf) (↑(AddSubgroup.normedMk S) x)
[PROOFSTEP]
simp only [h]
[GOAL]
case H.intro
M : Type u_1
N✝ : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_3
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
g : NormedAddGroupHom (M ⧸ S) N
h : NormedAddGroupHom.comp g (AddSubgroup.normedMk S) = f
x : M
⊢ ↑f x = ↑(lift S f hf) (↑(AddSubgroup.normedMk S) x)
[PROOFSTEP]
rfl
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ‖↑(AddSubgroup.normedMk S) m‖ = sInf ((fun m_1 => ‖m + m_1‖) '' ↑(ker (AddSubgroup.normedMk S)))
[PROOFSTEP]
simpa [S.ker_normedMk] using quotient_norm_mk_eq _ m
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
ε : ℝ
hε : 0 < ε
n : N
⊢ ∃ m, ↑f m = n ∧ ‖m‖ < ‖n‖ + ε
[PROOFSTEP]
obtain ⟨m, rfl⟩ := hquot.surjective n
[GOAL]
case intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
ε : ℝ
hε : 0 < ε
m : M
⊢ ∃ m_1, ↑f m_1 = ↑f m ∧ ‖m_1‖ < ‖↑f m‖ + ε
[PROOFSTEP]
have nonemp : ((fun m' => ‖m + m'‖) '' f.ker).Nonempty :=
  by
  rw [Set.nonempty_image_iff]
  exact ⟨0, f.ker.zero_mem⟩
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
ε : ℝ
hε : 0 < ε
m : M
⊢ Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))
[PROOFSTEP]
rw [Set.nonempty_image_iff]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
ε : ℝ
hε : 0 < ε
m : M
⊢ Set.Nonempty ↑(ker f)
[PROOFSTEP]
exact ⟨0, f.ker.zero_mem⟩
[GOAL]
case intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
ε : ℝ
hε : 0 < ε
m : M
nonemp : Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))
⊢ ∃ m_1, ↑f m_1 = ↑f m ∧ ‖m_1‖ < ‖↑f m‖ + ε
[PROOFSTEP]
rcases Real.lt_sInf_add_pos nonemp hε with
  ⟨_, ⟨⟨x, hx, rfl⟩, H : ‖m + x‖ < sInf ((fun m' : M => ‖m + m'‖) '' f.ker) + ε⟩⟩
[GOAL]
case intro.intro.intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
ε : ℝ
hε : 0 < ε
m : M
nonemp : Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))
x : M
hx : x ∈ ↑(ker f)
H : ‖m + x‖ < sInf ((fun m' => ‖m + m'‖) '' ↑(ker f)) + ε
⊢ ∃ m_1, ↑f m_1 = ↑f m ∧ ‖m_1‖ < ‖↑f m‖ + ε
[PROOFSTEP]
exact ⟨m + x, by rw [map_add, (NormedAddGroupHom.mem_ker f x).mp hx, add_zero], by rwa [hquot.norm]⟩
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
ε : ℝ
hε : 0 < ε
m : M
nonemp : Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))
x : M
hx : x ∈ ↑(ker f)
H : ‖m + x‖ < sInf ((fun m' => ‖m + m'‖) '' ↑(ker f)) + ε
⊢ ↑f (m + x) = ↑f m
[PROOFSTEP]
rw [map_add, (NormedAddGroupHom.mem_ker f x).mp hx, add_zero]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
ε : ℝ
hε : 0 < ε
m : M
nonemp : Set.Nonempty ((fun m' => ‖m + m'‖) '' ↑(ker f))
x : M
hx : x ∈ ↑(ker f)
H : ‖m + x‖ < sInf ((fun m' => ‖m + m'‖) '' ↑(ker f)) + ε
⊢ ‖m + x‖ < ‖↑f m‖ + ε
[PROOFSTEP]
rwa [hquot.norm]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
m : M
⊢ ‖↑f m‖ ≤ ‖m‖
[PROOFSTEP]
rw [hquot.norm]
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
m : M
⊢ sInf ((fun m_1 => ‖m + m_1‖) '' ↑(ker f)) ≤ ‖m‖
[PROOFSTEP]
apply csInf_le
[GOAL]
case h₁
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
m : M
⊢ BddBelow ((fun m_1 => ‖m + m_1‖) '' ↑(ker f))
[PROOFSTEP]
use 0
[GOAL]
case h
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
m : M
⊢ 0 ∈ lowerBounds ((fun m_1 => ‖m + m_1‖) '' ↑(ker f))
[PROOFSTEP]
rintro _ ⟨m', -, rfl⟩
[GOAL]
case h.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
m m' : M
⊢ 0 ≤ (fun m_1 => ‖m + m_1‖) m'
[PROOFSTEP]
apply norm_nonneg
[GOAL]
case h₂
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
m : M
⊢ ‖m‖ ∈ (fun m_1 => ‖m + m_1‖) '' ↑(ker f)
[PROOFSTEP]
exact ⟨0, f.ker.zero_mem, by simp⟩
[GOAL]
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
f : NormedAddGroupHom M N
hquot : IsQuotient f
m : M
⊢ (fun m_1 => ‖m + m_1‖) 0 = ‖m‖
[PROOFSTEP]
simp
[GOAL]
M : Type u_1
N✝ : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_3
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
fb : NormNoninc f
x : M ⧸ S
⊢ ‖↑(lift S f hf) x‖ ≤ ‖x‖
[PROOFSTEP]
have fb' : ‖f‖ ≤ (1 : ℝ≥0) := NormNoninc.normNoninc_iff_norm_le_one.mp fb
[GOAL]
M : Type u_1
N✝ : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N✝
N : Type u_3
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
f : NormedAddGroupHom M N
hf : ∀ (s : M), s ∈ S → ↑f s = 0
fb : NormNoninc f
x : M ⧸ S
fb' : ‖f‖ ≤ ↑1
⊢ ‖↑(lift S f hf) x‖ ≤ ‖x‖
[PROOFSTEP]
simpa using le_of_opNorm_le _ (f.lift_norm_le _ _ fb') _
[GOAL]
M : Type u_1
N : Type u_2
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
R : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Module R M
S : Submodule R M
𝕜 : Type u_4
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 M
inst✝¹ : SMul 𝕜 R
inst✝ : IsScalarTower 𝕜 R M
src✝ : Module 𝕜 (M ⧸ S) := module' S
k : 𝕜
x : M ⧸ S
ε : ℝ
hε : 0 < ε
⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖ + ε
[PROOFSTEP]
have :=
  (nhds_basis_ball.tendsto_iff nhds_basis_ball).mp ((@Real.uniformContinuous_const_mul ‖k‖).continuous.tendsto ‖x‖) ε hε
[GOAL]
M : Type u_1
N : Type u_2
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
R : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Module R M
S : Submodule R M
𝕜 : Type u_4
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 M
inst✝¹ : SMul 𝕜 R
inst✝ : IsScalarTower 𝕜 R M
src✝ : Module 𝕜 (M ⧸ S) := module' S
k : 𝕜
x : M ⧸ S
ε : ℝ
hε : 0 < ε
this :
  ∃ ia,
    0 < ia ∧ ∀ (x_1 : ℝ), x_1 ∈ ball ‖x‖ ia → (fun x x_2 => x * x_2) ‖k‖ x_1 ∈ ball ((fun x x_2 => x * x_2) ‖k‖ ‖x‖) ε
⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖ + ε
[PROOFSTEP]
simp only [mem_ball, exists_prop, dist, abs_sub_lt_iff] at this
[GOAL]
M : Type u_1
N : Type u_2
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
R : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Module R M
S : Submodule R M
𝕜 : Type u_4
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 M
inst✝¹ : SMul 𝕜 R
inst✝ : IsScalarTower 𝕜 R M
src✝ : Module 𝕜 (M ⧸ S) := module' S
k : 𝕜
x : M ⧸ S
ε : ℝ
hε : 0 < ε
this :
  ∃ ia, 0 < ia ∧ ∀ (x_1 : ℝ), x_1 - ‖x‖ < ia ∧ ‖x‖ - x_1 < ia → ‖k‖ * x_1 - ‖k‖ * ‖x‖ < ε ∧ ‖k‖ * ‖x‖ - ‖k‖ * x_1 < ε
⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖ + ε
[PROOFSTEP]
rcases this with ⟨δ, hδ, h⟩
[GOAL]
case intro.intro
M : Type u_1
N : Type u_2
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
R : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Module R M
S : Submodule R M
𝕜 : Type u_4
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 M
inst✝¹ : SMul 𝕜 R
inst✝ : IsScalarTower 𝕜 R M
src✝ : Module 𝕜 (M ⧸ S) := module' S
k : 𝕜
x : M ⧸ S
ε : ℝ
hε : 0 < ε
δ : ℝ
hδ : 0 < δ
h : ∀ (x_1 : ℝ), x_1 - ‖x‖ < δ ∧ ‖x‖ - x_1 < δ → ‖k‖ * x_1 - ‖k‖ * ‖x‖ < ε ∧ ‖k‖ * ‖x‖ - ‖k‖ * x_1 < ε
⊢ ‖k • x‖ ≤ ‖k‖ * ‖x‖ + ε
[PROOFSTEP]
obtain ⟨a, rfl, ha⟩ := Submodule.Quotient.norm_mk_lt x hδ
[GOAL]
case intro.intro.intro.intro
M : Type u_1
N : Type u_2
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
R : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Module R M
S : Submodule R M
𝕜 : Type u_4
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 M
inst✝¹ : SMul 𝕜 R
inst✝ : IsScalarTower 𝕜 R M
src✝ : Module 𝕜 (M ⧸ S) := module' S
k : 𝕜
ε : ℝ
hε : 0 < ε
δ : ℝ
hδ : 0 < δ
a : M
h : ∀ (x : ℝ), x - ‖mk a‖ < δ ∧ ‖mk a‖ - x < δ → ‖k‖ * x - ‖k‖ * ‖mk a‖ < ε ∧ ‖k‖ * ‖mk a‖ - ‖k‖ * x < ε
ha : ‖a‖ < ‖mk a‖ + δ
⊢ ‖k • mk a‖ ≤ ‖k‖ * ‖mk a‖ + ε
[PROOFSTEP]
specialize h ‖a‖ ⟨by linarith, by linarith [Submodule.Quotient.norm_mk_le S a]⟩
[GOAL]
M : Type u_1
N : Type u_2
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
R : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Module R M
S : Submodule R M
𝕜 : Type u_4
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 M
inst✝¹ : SMul 𝕜 R
inst✝ : IsScalarTower 𝕜 R M
src✝ : Module 𝕜 (M ⧸ S) := module' S
k : 𝕜
ε : ℝ
hε : 0 < ε
δ : ℝ
hδ : 0 < δ
a : M
h : ∀ (x : ℝ), x - ‖mk a‖ < δ ∧ ‖mk a‖ - x < δ → ‖k‖ * x - ‖k‖ * ‖mk a‖ < ε ∧ ‖k‖ * ‖mk a‖ - ‖k‖ * x < ε
ha : ‖a‖ < ‖mk a‖ + δ
⊢ ‖a‖ - ‖mk a‖ < δ
[PROOFSTEP]
linarith
[GOAL]
M : Type u_1
N : Type u_2
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
R : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Module R M
S : Submodule R M
𝕜 : Type u_4
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 M
inst✝¹ : SMul 𝕜 R
inst✝ : IsScalarTower 𝕜 R M
src✝ : Module 𝕜 (M ⧸ S) := module' S
k : 𝕜
ε : ℝ
hε : 0 < ε
δ : ℝ
hδ : 0 < δ
a : M
h : ∀ (x : ℝ), x - ‖mk a‖ < δ ∧ ‖mk a‖ - x < δ → ‖k‖ * x - ‖k‖ * ‖mk a‖ < ε ∧ ‖k‖ * ‖mk a‖ - ‖k‖ * x < ε
ha : ‖a‖ < ‖mk a‖ + δ
⊢ ‖mk a‖ - ‖a‖ < δ
[PROOFSTEP]
linarith [Submodule.Quotient.norm_mk_le S a]
[GOAL]
case intro.intro.intro.intro
M : Type u_1
N : Type u_2
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
R : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Module R M
S : Submodule R M
𝕜 : Type u_4
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 M
inst✝¹ : SMul 𝕜 R
inst✝ : IsScalarTower 𝕜 R M
src✝ : Module 𝕜 (M ⧸ S) := module' S
k : 𝕜
ε : ℝ
hε : 0 < ε
δ : ℝ
hδ : 0 < δ
a : M
ha : ‖a‖ < ‖mk a‖ + δ
h : ‖k‖ * ‖a‖ - ‖k‖ * ‖mk a‖ < ε ∧ ‖k‖ * ‖mk a‖ - ‖k‖ * ‖a‖ < ε
⊢ ‖k • mk a‖ ≤ ‖k‖ * ‖mk a‖ + ε
[PROOFSTEP]
calc
  _ ≤ ‖k‖ * ‖a‖ := (quotient_norm_mk_le S.toAddSubgroup (k • a)).trans_eq (norm_smul k a)
  _ ≤ _ := (sub_lt_iff_lt_add'.mp h.1).le
[GOAL]
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
x y : R ⧸ I
ε : ℝ
hε : 0 < ε
⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖ + ε
[PROOFSTEP]
have :=
  ((nhds_basis_ball.prod_nhds nhds_basis_ball).tendsto_iff nhds_basis_ball).mp (continuous_mul.tendsto (‖x‖, ‖y‖)) ε hε
[GOAL]
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
x y : R ⧸ I
ε : ℝ
hε : 0 < ε
this :
  ∃ ia,
    (0 < ia.fst ∧ 0 < ia.snd) ∧
      ∀ (x_1 : ℝ × ℝ),
        x_1 ∈ ball ‖x‖ ia.fst ×ˢ ball ‖y‖ ia.snd → x_1.fst * x_1.snd ∈ ball ((‖x‖, ‖y‖).fst * (‖x‖, ‖y‖).snd) ε
⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖ + ε
[PROOFSTEP]
simp only [Set.mem_prod, mem_ball, and_imp, Prod.forall, exists_prop, Prod.exists] at this
[GOAL]
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
x y : R ⧸ I
ε : ℝ
hε : 0 < ε
this : ∃ a b, (0 < a ∧ 0 < b) ∧ ∀ (a_1 b_1 : ℝ), dist a_1 ‖x‖ < a → dist b_1 ‖y‖ < b → dist (a_1 * b_1) (‖x‖ * ‖y‖) < ε
⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖ + ε
[PROOFSTEP]
rcases this with ⟨ε₁, ε₂, ⟨h₁, h₂⟩, h⟩
[GOAL]
case intro.intro.intro.intro
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
x y : R ⧸ I
ε : ℝ
hε : 0 < ε
ε₁ ε₂ : ℝ
h : ∀ (a b : ℝ), dist a ‖x‖ < ε₁ → dist b ‖y‖ < ε₂ → dist (a * b) (‖x‖ * ‖y‖) < ε
h₁ : 0 < ε₁
h₂ : 0 < ε₂
⊢ ‖x * y‖ ≤ ‖x‖ * ‖y‖ + ε
[PROOFSTEP]
obtain ⟨⟨a, rfl, ha⟩, ⟨b, rfl, hb⟩⟩ := Ideal.Quotient.norm_mk_lt x h₁, Ideal.Quotient.norm_mk_lt y h₂
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
ε : ℝ
hε : 0 < ε
ε₁ ε₂ : ℝ
h₁ : 0 < ε₁
h₂ : 0 < ε₂
a : R
ha : ‖a‖ < ‖↑(mk I) a‖ + ε₁
b : R
h :
  ∀ (a_1 b_1 : ℝ),
    dist a_1 ‖↑(mk I) a‖ < ε₁ → dist b_1 ‖↑(mk I) b‖ < ε₂ → dist (a_1 * b_1) (‖↑(mk I) a‖ * ‖↑(mk I) b‖) < ε
hb : ‖b‖ < ‖↑(mk I) b‖ + ε₂
⊢ ‖↑(mk I) a * ↑(mk I) b‖ ≤ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ + ε
[PROOFSTEP]
simp only [dist, abs_sub_lt_iff] at h
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
ε : ℝ
hε : 0 < ε
ε₁ ε₂ : ℝ
h₁ : 0 < ε₁
h₂ : 0 < ε₂
a : R
ha : ‖a‖ < ‖↑(mk I) a‖ + ε₁
b : R
hb : ‖b‖ < ‖↑(mk I) b‖ + ε₂
h :
  ∀ (a_1 b_1 : ℝ),
    a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →
      b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →
        a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε
⊢ ‖↑(mk I) a * ↑(mk I) b‖ ≤ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ + ε
[PROOFSTEP]
specialize
  h ‖a‖ ‖b‖ ⟨by linarith, by linarith [Ideal.Quotient.norm_mk_le I a]⟩
    ⟨by linarith, by linarith [Ideal.Quotient.norm_mk_le I b]⟩
[GOAL]
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
ε : ℝ
hε : 0 < ε
ε₁ ε₂ : ℝ
h₁ : 0 < ε₁
h₂ : 0 < ε₂
a : R
ha : ‖a‖ < ‖↑(mk I) a‖ + ε₁
b : R
hb : ‖b‖ < ‖↑(mk I) b‖ + ε₂
h :
  ∀ (a_1 b_1 : ℝ),
    a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →
      b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →
        a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε
⊢ ‖a‖ - ‖↑(mk I) a‖ < ε₁
[PROOFSTEP]
linarith
[GOAL]
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
ε : ℝ
hε : 0 < ε
ε₁ ε₂ : ℝ
h₁ : 0 < ε₁
h₂ : 0 < ε₂
a : R
ha : ‖a‖ < ‖↑(mk I) a‖ + ε₁
b : R
hb : ‖b‖ < ‖↑(mk I) b‖ + ε₂
h :
  ∀ (a_1 b_1 : ℝ),
    a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →
      b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →
        a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε
⊢ ‖↑(mk I) a‖ - ‖a‖ < ε₁
[PROOFSTEP]
linarith [Ideal.Quotient.norm_mk_le I a]
[GOAL]
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
ε : ℝ
hε : 0 < ε
ε₁ ε₂ : ℝ
h₁ : 0 < ε₁
h₂ : 0 < ε₂
a : R
ha : ‖a‖ < ‖↑(mk I) a‖ + ε₁
b : R
hb : ‖b‖ < ‖↑(mk I) b‖ + ε₂
h :
  ∀ (a_1 b_1 : ℝ),
    a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →
      b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →
        a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε
⊢ ‖b‖ - ‖↑(mk I) b‖ < ε₂
[PROOFSTEP]
linarith
[GOAL]
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
ε : ℝ
hε : 0 < ε
ε₁ ε₂ : ℝ
h₁ : 0 < ε₁
h₂ : 0 < ε₂
a : R
ha : ‖a‖ < ‖↑(mk I) a‖ + ε₁
b : R
hb : ‖b‖ < ‖↑(mk I) b‖ + ε₂
h :
  ∀ (a_1 b_1 : ℝ),
    a_1 - ‖↑(mk I) a‖ < ε₁ ∧ ‖↑(mk I) a‖ - a_1 < ε₁ →
      b_1 - ‖↑(mk I) b‖ < ε₂ ∧ ‖↑(mk I) b‖ - b_1 < ε₂ →
        a_1 * b_1 - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - a_1 * b_1 < ε
⊢ ‖↑(mk I) b‖ - ‖b‖ < ε₂
[PROOFSTEP]
linarith [Ideal.Quotient.norm_mk_le I b]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
M : Type u_1
N : Type u_2
inst✝² : SeminormedAddCommGroup M
inst✝¹ : SeminormedAddCommGroup N
R : Type u_3
inst✝ : SeminormedCommRing R
I : Ideal R
ε : ℝ
hε : 0 < ε
ε₁ ε₂ : ℝ
h₁ : 0 < ε₁
h₂ : 0 < ε₂
a : R
ha : ‖a‖ < ‖↑(mk I) a‖ + ε₁
b : R
hb : ‖b‖ < ‖↑(mk I) b‖ + ε₂
h : ‖a‖ * ‖b‖ - ‖↑(mk I) a‖ * ‖↑(mk I) b‖ < ε ∧ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ - ‖a‖ * ‖b‖ < ε
⊢ ‖↑(mk I) a * ↑(mk I) b‖ ≤ ‖↑(mk I) a‖ * ‖↑(mk I) b‖ + ε
[PROOFSTEP]
calc
  _ ≤ ‖a‖ * ‖b‖ := (Ideal.Quotient.norm_mk_le I (a * b)).trans (norm_mul_le a b)
  _ ≤ _ := (sub_lt_iff_lt_add'.mp h.1).le


[GOAL]
r : ℝ
hr : 0 ≤ r
⊢ Real.toNNReal r = { val := r, property := hr }
[PROOFSTEP]
simp_rw [Real.toNNReal, max_eq_left hr]
[GOAL]
⊢ Zero ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ One ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ Add ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ Sub ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ Mul ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ Inv ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ Div ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ LE ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ Bot ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ Inhabited ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ Nontrivial ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
r₁ r₂ : ℝ≥0
h : r₂ ≤ r₁
⊢ ↑r₂ ≤ ↑r₁ - 0
[PROOFSTEP]
simp [show (r₂ : ℝ) ≤ r₁ from h]
[GOAL]
r : ℝ≥0
⊢ ↑r = 0 ↔ r = 0
[PROOFSTEP]
rw [← NNReal.coe_zero, NNReal.coe_eq]
[GOAL]
r : ℝ≥0
⊢ ↑r = 1 ↔ r = 1
[PROOFSTEP]
rw [← NNReal.coe_one, NNReal.coe_eq]
[GOAL]
⊢ CommSemiring ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra ℝ A
r : ℝ≥0
x : (fun x => A) r
⊢ ↑(RingHom.comp (algebraMap ℝ A) toRealHom) r * x = x * ↑(RingHom.comp (algebraMap ℝ A) toRealHom) r
[PROOFSTEP]
simp [Algebra.commutes]
[GOAL]
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra ℝ A
r : ℝ≥0
x : (fun x => A) r
⊢ r • x = ↑(RingHom.comp (algebraMap ℝ A) toRealHom) r * x
[PROOFSTEP]
simp [← Algebra.smul_def (r : ℝ) x, smul_def]
[GOAL]
⊢ Algebra ℝ≥0 ℝ
[PROOFSTEP]
infer_instance
[GOAL]
⊢ DistribMulAction ℝ≥0ˣ ℝ
[PROOFSTEP]
infer_instance
[GOAL]
⊢ MonoidWithZero ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ CommMonoidWithZero ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ CommGroupWithZero ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
⊢ Real.toNNReal (∑ a in s, f a) = ∑ a in s, Real.toNNReal (f a)
[PROOFSTEP]
rw [← NNReal.coe_eq, NNReal.coe_sum, Real.coe_toNNReal _ (Finset.sum_nonneg hf)]
[GOAL]
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
⊢ ∑ i in s, f i = ∑ a in s, ↑(Real.toNNReal (f a))
[PROOFSTEP]
exact Finset.sum_congr rfl fun x hxs => by rw [Real.coe_toNNReal _ (hf x hxs)]
[GOAL]
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
x : α
hxs : x ∈ s
⊢ f x = ↑(Real.toNNReal (f x))
[PROOFSTEP]
rw [Real.coe_toNNReal _ (hf x hxs)]
[GOAL]
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
⊢ Real.toNNReal (∏ a in s, f a) = ∏ a in s, Real.toNNReal (f a)
[PROOFSTEP]
rw [← NNReal.coe_eq, NNReal.coe_prod, Real.coe_toNNReal _ (Finset.prod_nonneg hf)]
[GOAL]
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
⊢ ∏ i in s, f i = ∏ a in s, ↑(Real.toNNReal (f a))
[PROOFSTEP]
exact Finset.prod_congr rfl fun x hxs => by rw [Real.coe_toNNReal _ (hf x hxs)]
[GOAL]
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
x : α
hxs : x ∈ s
⊢ f x = ↑(Real.toNNReal (f x))
[PROOFSTEP]
rw [Real.coe_toNNReal _ (hf x hxs)]
[GOAL]
⊢ LinearOrder ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
n : ℕ
⊢ ↑(Real.toNNReal ↑n) = ↑↑n
[PROOFSTEP]
simp [Real.coe_toNNReal]
[GOAL]
⊢ OrderBot ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ PartialOrder ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ CanonicallyLinearOrderedAddMonoid ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ LinearOrderedAddCommMonoid ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ DistribLattice ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ SemilatticeInf ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ SemilatticeSup ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ LinearOrderedSemiring ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ OrderedCommSemiring ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ LinearOrderedCommMonoid ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ LinearOrderedCommMonoidWithZero ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ LinearOrderedCommGroupWithZero ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ CanonicallyOrderedCommSemiring ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ DenselyOrdered ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
⊢ NoMaxOrder ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
ι : Sort u_1
s : ι → ℝ≥0
⊢ ↑(⨆ (i : ι), s i) = ⨆ (i : ι), ↑(s i)
[PROOFSTEP]
rw [iSup, iSup, coe_sSup, ← Set.range_comp]
[GOAL]
ι : Sort u_1
s : ι → ℝ≥0
⊢ sSup (Set.range (toReal ∘ fun i => s i)) = sSup (Set.range fun i => ↑(s i))
[PROOFSTEP]
rfl
[GOAL]
⊢ sInf ∅ = 0
[PROOFSTEP]
rw [← NNReal.coe_eq_zero, coe_sInf, Set.image_empty, Real.sInf_empty]
[GOAL]
ι : Sort u_1
s : ι → ℝ≥0
⊢ ↑(⨅ (i : ι), s i) = ⨅ (i : ι), ↑(s i)
[PROOFSTEP]
rw [iInf, iInf, coe_sInf, ← Set.range_comp]
[GOAL]
ι : Sort u_1
s : ι → ℝ≥0
⊢ sInf (Set.range (toReal ∘ fun i => s i)) = sInf (Set.range fun i => ↑(s i))
[PROOFSTEP]
rfl
[GOAL]
ι : Sort u_1
ι' : Sort u_2
inst✝¹ : Nonempty ι
inst✝ : Nonempty ι'
f : ι → ℝ≥0
g : ι' → ℝ≥0
a : ℝ≥0
h : ∀ (i : ι) (j : ι'), a ≤ f i + g j
⊢ a ≤ (⨅ (i : ι), f i) + ⨅ (j : ι'), g j
[PROOFSTEP]
rw [← NNReal.coe_le_coe, NNReal.coe_add, coe_iInf, coe_iInf]
[GOAL]
ι : Sort u_1
ι' : Sort u_2
inst✝¹ : Nonempty ι
inst✝ : Nonempty ι'
f : ι → ℝ≥0
g : ι' → ℝ≥0
a : ℝ≥0
h : ∀ (i : ι) (j : ι'), a ≤ f i + g j
⊢ ↑a ≤ (⨅ (i : ι), ↑(f i)) + ⨅ (i : ι'), ↑(g i)
[PROOFSTEP]
exact le_ciInf_add_ciInf h
[GOAL]
⊢ Archimedean ℝ≥0
[PROOFSTEP]
infer_instance
  -- porting note: TODO: remove?
[GOAL]
a b : ℝ≥0
h : ↑a < ↑b
q : ℚ
haq : ↑a < ↑q
hqb : ↑q < ↑b
this : 0 ≤ ↑q
⊢ a < Real.toNNReal ↑q ∧ Real.toNNReal ↑q < b
[PROOFSTEP]
simp [Real.coe_toNNReal _ this, NNReal.coe_lt_coe.symm, haq, hqb]
[GOAL]
α : Type u_1
f : α → ℝ≥0
s : Finset α
r : ℝ≥0
⊢ Finset.sup s f / r = Finset.sup s fun a => f a / r
[PROOFSTEP]
simp only [div_eq_inv_mul, mul_finset_sup]
[GOAL]
r : ℝ
⊢ 0 < toNNReal r ↔ 0 < r
[PROOFSTEP]
simp [← NNReal.coe_lt_coe, lt_irrefl]
[GOAL]
r : ℝ
⊢ toNNReal r = 0 ↔ r ≤ 0
[PROOFSTEP]
simpa [-toNNReal_pos] using not_iff_not.2 (@toNNReal_pos r)
[GOAL]
r p : ℝ
hp : 0 ≤ p
⊢ toNNReal r ≤ toNNReal p ↔ r ≤ p
[PROOFSTEP]
simp [← NNReal.coe_le_coe, hp]
[GOAL]
r p : ℝ
hr : 0 ≤ r
hp : 0 ≤ p
⊢ toNNReal r = toNNReal p ↔ r = p
[PROOFSTEP]
simp [← NNReal.coe_eq, coe_toNNReal, hr, hp]
[GOAL]
r p : ℝ
hr : 0 ≤ r
hp : 0 ≤ p
⊢ ↑(toNNReal (r + p)) = ↑(toNNReal r + toNNReal p)
[PROOFSTEP]
simp [hr, hp, add_nonneg]
[GOAL]
r : ℝ≥0
p : ℝ
hp : 0 ≤ p
⊢ r ≤ toNNReal p ↔ ↑r ≤ p
[PROOFSTEP]
rw [← NNReal.coe_le_coe, Real.coe_toNNReal p hp]
[GOAL]
r : ℝ≥0
p : ℝ
hr : 0 < r
hp : p < 0
⊢ r ≤ toNNReal p ↔ ↑r ≤ p
[PROOFSTEP]
simp only [(hp.trans_le r.coe_nonneg).not_le, toNNReal_eq_zero.2 hp.le, hr.not_le]
[GOAL]
r : ℝ
p : ℝ≥0
ha : 0 ≤ r
⊢ toNNReal r < p ↔ r < ↑p
[PROOFSTEP]
rw [← NNReal.coe_lt_coe, Real.coe_toNNReal r ha]
[GOAL]
x : ℝ
hx : 0 ≤ x
n : ℕ
⊢ toNNReal (x ^ n) = toNNReal x ^ n
[PROOFSTEP]
rw [← NNReal.coe_eq, NNReal.coe_pow, Real.coe_toNNReal _ (pow_nonneg hx _), Real.coe_toNNReal x hx]
[GOAL]
p q : ℝ
hp : 0 ≤ p
⊢ ↑(toNNReal (p * q)) = ↑(toNNReal p * toNNReal q)
[PROOFSTEP]
simp [mul_max_of_nonneg, hp]
[GOAL]
a b c : ℝ≥0
h : a ≠ 0
⊢ a * b = a * c ↔ b = c
[PROOFSTEP]
rw [mul_eq_mul_left_iff, or_iff_left h]
[GOAL]
a b : ℝ≥0
ha : 0 < a
hb : b < 1
⊢ ∃ n, b ^ n < a
[PROOFSTEP]
simpa only [← coe_pow, NNReal.coe_lt_coe] using exists_pow_lt_of_lt_one (NNReal.coe_pos.2 ha) (NNReal.coe_lt_coe.2 hb)
[GOAL]
⊢ OrderedSub ℝ≥0
[PROOFSTEP]
infer_instance
[GOAL]
r p : ℝ≥0
h : r ≠ 0
⊢ r⁻¹ ≤ p ↔ 1 ≤ r * p
[PROOFSTEP]
rw [← mul_le_mul_left (pos_iff_ne_zero.2 h), mul_inv_cancel h]
[GOAL]
r p : ℝ≥0
h : 1 ≤ r * p
⊢ r⁻¹ ≤ p
[PROOFSTEP]
by_cases r = 0
[GOAL]
r p : ℝ≥0
h : 1 ≤ r * p
⊢ r⁻¹ ≤ p
[PROOFSTEP]
by_cases r = 0
[GOAL]
case pos
r p : ℝ≥0
h✝ : 1 ≤ r * p
h : r = 0
⊢ r⁻¹ ≤ p
[PROOFSTEP]
simp [*, inv_le]
[GOAL]
case neg
r p : ℝ≥0
h✝ : 1 ≤ r * p
h : ¬r = 0
⊢ r⁻¹ ≤ p
[PROOFSTEP]
simp [*, inv_le]
[GOAL]
r p : ℝ≥0
h : p ≠ 0
⊢ r ≤ p⁻¹ ↔ r * p ≤ 1
[PROOFSTEP]
rw [← mul_le_mul_left (pos_iff_ne_zero.2 h), mul_inv_cancel h, mul_comm]
[GOAL]
r p : ℝ≥0
h : p ≠ 0
⊢ r < p⁻¹ ↔ r * p < 1
[PROOFSTEP]
rw [← mul_lt_mul_left (pos_iff_ne_zero.2 h), mul_inv_cancel h, mul_comm]
[GOAL]
a b r : ℝ≥0
hr : r ≠ 0
⊢ r * a ≤ b ↔ a ≤ r⁻¹ * b
[PROOFSTEP]
have : 0 < r := lt_of_le_of_ne (zero_le r) hr.symm
[GOAL]
a b r : ℝ≥0
hr : r ≠ 0
this : 0 < r
⊢ r * a ≤ b ↔ a ≤ r⁻¹ * b
[PROOFSTEP]
rw [← mul_le_mul_left (inv_pos.mpr this), ← mul_assoc, inv_mul_cancel hr, one_mul]
[GOAL]
a b c : ℝ≥0
h : a ≤ b * c
h0 : c = 0
⊢ a / c ≤ b
[PROOFSTEP]
simp [h0]
[GOAL]
a b r : ℝ≥0
h : a < b / r
hr : r = 0
⊢ False
[PROOFSTEP]
simp [hr] at h
[GOAL]
x y : ℝ≥0
h : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y
a : ℝ≥0
ha : a < x
⊢ a ≤ y
[PROOFSTEP]
have hx : x ≠ 0 := pos_iff_ne_zero.1 (lt_of_le_of_lt (zero_le _) ha)
[GOAL]
x y : ℝ≥0
h : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y
a : ℝ≥0
ha : a < x
hx : x ≠ 0
⊢ a ≤ y
[PROOFSTEP]
have hx' : x⁻¹ ≠ 0 := by rwa [Ne.def, inv_eq_zero]
[GOAL]
x y : ℝ≥0
h : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y
a : ℝ≥0
ha : a < x
hx : x ≠ 0
⊢ x⁻¹ ≠ 0
[PROOFSTEP]
rwa [Ne.def, inv_eq_zero]
[GOAL]
x y : ℝ≥0
h : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y
a : ℝ≥0
ha : a < x
hx : x ≠ 0
hx' : x⁻¹ ≠ 0
⊢ a ≤ y
[PROOFSTEP]
have : a * x⁻¹ < 1 := by rwa [← lt_inv_iff_mul_lt hx', inv_inv]
[GOAL]
x y : ℝ≥0
h : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y
a : ℝ≥0
ha : a < x
hx : x ≠ 0
hx' : x⁻¹ ≠ 0
⊢ a * x⁻¹ < 1
[PROOFSTEP]
rwa [← lt_inv_iff_mul_lt hx', inv_inv]
[GOAL]
x y : ℝ≥0
h : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y
a : ℝ≥0
ha : a < x
hx : x ≠ 0
hx' : x⁻¹ ≠ 0
this : a * x⁻¹ < 1
⊢ a ≤ y
[PROOFSTEP]
have : a * x⁻¹ * x ≤ y := h _ this
[GOAL]
x y : ℝ≥0
h : ∀ (a : ℝ≥0), a < 1 → a * x ≤ y
a : ℝ≥0
ha : a < x
hx : x ≠ 0
hx' : x⁻¹ ≠ 0
this✝ : a * x⁻¹ < 1
this : a * x⁻¹ * x ≤ y
⊢ a ≤ y
[PROOFSTEP]
rwa [mul_assoc, inv_mul_cancel hx, mul_one] at this
[GOAL]
a b : ℝ≥0
h : a < b
⊢ a / b < 1
[PROOFSTEP]
rwa [div_lt_iff, one_mul]
[GOAL]
a b : ℝ≥0
h : a < b
⊢ b ≠ 0
[PROOFSTEP]
exact ne_of_gt (lt_of_le_of_lt (zero_le _) h)
[GOAL]
x : ℝ
⊢ toNNReal x⁻¹ = (toNNReal x)⁻¹
[PROOFSTEP]
cases' le_total 0 x with hx hx
[GOAL]
case inl
x : ℝ
hx : 0 ≤ x
⊢ toNNReal x⁻¹ = (toNNReal x)⁻¹
[PROOFSTEP]
nth_rw 1 [← Real.coe_toNNReal x hx]
[GOAL]
case inl
x : ℝ
hx : 0 ≤ x
⊢ toNNReal (↑(toNNReal x))⁻¹ = (toNNReal x)⁻¹
[PROOFSTEP]
rw [← NNReal.coe_inv, Real.toNNReal_coe]
[GOAL]
case inr
x : ℝ
hx : x ≤ 0
⊢ toNNReal x⁻¹ = (toNNReal x)⁻¹
[PROOFSTEP]
rw [toNNReal_eq_zero.mpr hx, inv_zero, toNNReal_eq_zero.mpr (inv_nonpos.mpr hx)]
[GOAL]
x y : ℝ
hx : 0 ≤ x
⊢ toNNReal (x / y) = toNNReal x / toNNReal y
[PROOFSTEP]
rw [div_eq_mul_inv, div_eq_mul_inv, ← Real.toNNReal_inv, ← Real.toNNReal_mul hx]
[GOAL]
x y : ℝ
hy : 0 ≤ y
⊢ toNNReal (x / y) = toNNReal x / toNNReal y
[PROOFSTEP]
rw [div_eq_inv_mul, div_eq_inv_mul, Real.toNNReal_mul (inv_nonneg.2 hy), Real.toNNReal_inv]
[GOAL]
x : ℝ≥0
hx : x ≠ 0
⊢ x⁻¹ < 1 ↔ 1 < x
[PROOFSTEP]
rw [← one_div, div_lt_iff hx, one_mul]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
s : Set ℝ≥0
hs : ¬BddAbove s
⊢ sSup s = 0
[PROOFSTEP]
rw [← bddAbove_coe] at hs
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
s : Set ℝ≥0
hs : ¬BddAbove (toReal '' s)
⊢ sSup s = 0
[PROOFSTEP]
rw [← NNReal.coe_eq, coe_sSup, NNReal.coe_zero]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
s : Set ℝ≥0
hs : ¬BddAbove (toReal '' s)
⊢ sSup (toReal '' s) = 0
[PROOFSTEP]
exact sSup_of_not_bddAbove hs
[GOAL]
ι : Sort u_1
f✝ : ι → ℝ≥0
inst✝ : IsEmpty ι
f : ι → ℝ≥0
⊢ ⨅ (i : ι), f i = 0
[PROOFSTEP]
rw [iInf_of_empty', sInf_empty]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
α : Sort u_2
⊢ ⨅ (x : α), 0 = 0
[PROOFSTEP]
rw [← NNReal.coe_eq, coe_iInf]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
α : Sort u_2
⊢ ⨅ (i : α), ↑0 = ↑0
[PROOFSTEP]
exact Real.ciInf_const_zero
[GOAL]
ι : Sort u_1
f✝ f : ι → ℝ≥0
a : ℝ≥0
⊢ iInf f * a = ⨅ (i : ι), f i * a
[PROOFSTEP]
rw [← NNReal.coe_eq, NNReal.coe_mul, coe_iInf, coe_iInf]
[GOAL]
ι : Sort u_1
f✝ f : ι → ℝ≥0
a : ℝ≥0
⊢ (⨅ (i : ι), ↑(f i)) * ↑a = ⨅ (i : ι), ↑(f i * a)
[PROOFSTEP]
exact Real.iInf_mul_of_nonneg (NNReal.coe_nonneg _) _
[GOAL]
ι : Sort u_1
f✝ f : ι → ℝ≥0
a : ℝ≥0
⊢ a * iInf f = ⨅ (i : ι), a * f i
[PROOFSTEP]
simpa only [mul_comm] using iInf_mul f a
[GOAL]
ι : Sort u_1
f✝ f : ι → ℝ≥0
a : ℝ≥0
⊢ a * ⨆ (i : ι), f i = ⨆ (i : ι), a * f i
[PROOFSTEP]
rw [← NNReal.coe_eq, NNReal.coe_mul, NNReal.coe_iSup, NNReal.coe_iSup]
[GOAL]
ι : Sort u_1
f✝ f : ι → ℝ≥0
a : ℝ≥0
⊢ ↑a * ⨆ (i : ι), ↑(f i) = ⨆ (i : ι), ↑(a * f i)
[PROOFSTEP]
exact Real.mul_iSup_of_nonneg (NNReal.coe_nonneg _) _
[GOAL]
ι : Sort u_1
f✝ f : ι → ℝ≥0
a : ℝ≥0
⊢ (⨆ (i : ι), f i) * a = ⨆ (i : ι), f i * a
[PROOFSTEP]
rw [mul_comm, mul_iSup]
[GOAL]
ι : Sort u_1
f✝ f : ι → ℝ≥0
a : ℝ≥0
⊢ ⨆ (i : ι), a * f i = ⨆ (i : ι), f i * a
[PROOFSTEP]
simp_rw [mul_comm]
[GOAL]
ι : Sort u_1
f✝ f : ι → ℝ≥0
a : ℝ≥0
⊢ (⨆ (i : ι), f i) / a = ⨆ (i : ι), f i / a
[PROOFSTEP]
simp only [div_eq_mul_inv, iSup_mul]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
a g : ℝ≥0
h : ι → ℝ≥0
H : ∀ (j : ι), g * h j ≤ a
⊢ g * iSup h ≤ a
[PROOFSTEP]
rw [mul_iSup]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
a g : ℝ≥0
h : ι → ℝ≥0
H : ∀ (j : ι), g * h j ≤ a
⊢ ⨆ (i : ι), g * h i ≤ a
[PROOFSTEP]
exact ciSup_le' H
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
a : ℝ≥0
g : ι → ℝ≥0
h : ℝ≥0
H : ∀ (i : ι), g i * h ≤ a
⊢ iSup g * h ≤ a
[PROOFSTEP]
rw [iSup_mul]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
a : ℝ≥0
g : ι → ℝ≥0
h : ℝ≥0
H : ∀ (i : ι), g i * h ≤ a
⊢ ⨆ (i : ι), g i * h ≤ a
[PROOFSTEP]
exact ciSup_le' H
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
inst✝ : Nonempty ι
a g : ℝ≥0
h : ι → ℝ≥0
H : ∀ (j : ι), a ≤ g * h j
⊢ a ≤ g * iInf h
[PROOFSTEP]
rw [mul_iInf]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
inst✝ : Nonempty ι
a g : ℝ≥0
h : ι → ℝ≥0
H : ∀ (j : ι), a ≤ g * h j
⊢ a ≤ ⨅ (i : ι), g * h i
[PROOFSTEP]
exact le_ciInf H
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
inst✝ : Nonempty ι
a : ℝ≥0
g : ι → ℝ≥0
h : ℝ≥0
H : ∀ (i : ι), a ≤ g i * h
⊢ a ≤ iInf g * h
[PROOFSTEP]
rw [iInf_mul]
[GOAL]
ι : Sort u_1
f : ι → ℝ≥0
inst✝ : Nonempty ι
a : ℝ≥0
g : ι → ℝ≥0
h : ℝ≥0
H : ∀ (i : ι), a ≤ g i * h
⊢ a ≤ ⨅ (i : ι), g i * h
[PROOFSTEP]
exact le_ciInf H
[GOAL]
s : Set ℝ
t : Set ℝ≥0
h : OrdConnected s
⊢ OrdConnected (toNNReal '' s)
[PROOFSTEP]
refine' ⟨ball_image_iff.2 fun x hx => ball_image_iff.2 fun y hy z hz => _⟩
[GOAL]
s : Set ℝ
t : Set ℝ≥0
h : OrdConnected s
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc (toNNReal x) (toNNReal y)
⊢ z ∈ toNNReal '' s
[PROOFSTEP]
cases' le_total y 0 with hy₀ hy₀
[GOAL]
case inl
s : Set ℝ
t : Set ℝ≥0
h : OrdConnected s
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc (toNNReal x) (toNNReal y)
hy₀ : y ≤ 0
⊢ z ∈ toNNReal '' s
[PROOFSTEP]
rw [mem_Icc, Real.toNNReal_of_nonpos hy₀, nonpos_iff_eq_zero] at hz
[GOAL]
case inl
s : Set ℝ
t : Set ℝ≥0
h : OrdConnected s
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : toNNReal x ≤ z ∧ z = 0
hy₀ : y ≤ 0
⊢ z ∈ toNNReal '' s
[PROOFSTEP]
exact ⟨y, hy, (toNNReal_of_nonpos hy₀).trans hz.2.symm⟩
[GOAL]
case inr
s : Set ℝ
t : Set ℝ≥0
h : OrdConnected s
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc (toNNReal x) (toNNReal y)
hy₀ : 0 ≤ y
⊢ z ∈ toNNReal '' s
[PROOFSTEP]
lift y to ℝ≥0 using hy₀
[GOAL]
case inr.intro
s : Set ℝ
t : Set ℝ≥0
h : OrdConnected s
x : ℝ
hx : x ∈ s
z y : ℝ≥0
hy : ↑y ∈ s
hz : z ∈ Icc (toNNReal x) (toNNReal ↑y)
⊢ z ∈ toNNReal '' s
[PROOFSTEP]
rw [toNNReal_coe] at hz
[GOAL]
case inr.intro
s : Set ℝ
t : Set ℝ≥0
h : OrdConnected s
x : ℝ
hx : x ∈ s
z y : ℝ≥0
hy : ↑y ∈ s
hz : z ∈ Icc (toNNReal x) y
⊢ z ∈ toNNReal '' s
[PROOFSTEP]
exact ⟨z, h.out hx hy ⟨toNNReal_le_iff_le_coe.1 hz.1, hz.2⟩, toNNReal_coe⟩
[GOAL]
⊢ (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0
[PROOFSTEP]
ext
[GOAL]
case a
⊢ ↑((fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0) = ↑0
[PROOFSTEP]
simp
[GOAL]
⊢ ZeroHom.toFun
      { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },
        map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }
      1 =
    1
[PROOFSTEP]
ext
[GOAL]
case a
⊢ ↑(ZeroHom.toFun
        { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },
          map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }
        1) =
    ↑1
[PROOFSTEP]
simp
[GOAL]
x y : ℝ
⊢ ZeroHom.toFun
      { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },
        map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }
      (x * y) =
    ZeroHom.toFun
        { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },
          map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }
        x *
      ZeroHom.toFun
        { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },
          map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }
        y
[PROOFSTEP]
ext
[GOAL]
case a
x y : ℝ
⊢ ↑(ZeroHom.toFun
        { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },
          map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }
        (x * y)) =
    ↑(ZeroHom.toFun
          { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },
            map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }
          x *
        ZeroHom.toFun
          { toFun := fun x => { val := |x|, property := (_ : 0 ≤ |x|) },
            map_zero' := (_ : (fun x => { val := |x|, property := (_ : 0 ≤ |x|) }) 0 = 0) }
          y)
[PROOFSTEP]
simp [abs_mul]
[GOAL]
x : ℝ
h : 0 ≤ x
⊢ ↑nnabs x = toNNReal x
[PROOFSTEP]
ext
[GOAL]
case a
x : ℝ
h : 0 ≤ x
⊢ ↑(↑nnabs x) = ↑(toNNReal x)
[PROOFSTEP]
rw [coe_toNNReal x h, coe_nnabs, abs_of_nonneg h]
[GOAL]
x : ℝ≥0
⊢ ↑nnabs ↑x = x
[PROOFSTEP]
simp
[GOAL]
n : ℤ
⊢ ↑(Int.natAbs n) = ↑nnabs ↑n
[PROOFSTEP]
ext
[GOAL]
case a
n : ℤ
⊢ ↑↑(Int.natAbs n) = ↑(↑nnabs ↑n)
[PROOFSTEP]
rw [NNReal.coe_nat_cast, Int.cast_natAbs, Real.coe_nnabs, Int.cast_abs]


[GOAL]
R : Type u_1
inst✝ : Zero R
n : R
⊢ ¬NeZero n ↔ n = 0
[PROOFSTEP]
simp [neZero_iff]


[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
A B : Set (Finset α)
r : ℕ
f : ι → Set (Finset α)
⊢ Sized r (⋃ (i : ι), f i) ↔ ∀ (i : ι), Sized r (f i)
[PROOFSTEP]
simp_rw [Set.Sized, Set.mem_iUnion, forall_exists_index]
[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
A B : Set (Finset α)
r : ℕ
f : ι → Set (Finset α)
⊢ (∀ ⦃x : Finset α⦄ (x_1 : ι), x ∈ f x_1 → card x = r) ↔ ∀ (i : ι) ⦃x : Finset α⦄, x ∈ f i → card x = r
[PROOFSTEP]
exact forall_swap
[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
A B : Set (Finset α)
r : ℕ
f : (i : ι) → κ i → Set (Finset α)
⊢ Sized r (⋃ (i : ι) (j : κ i), f i j) ↔ ∀ (i : ι) (j : κ i), Sized r (f i j)
[PROOFSTEP]
simp only [Set.sized_iUnion]
[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s : Finset α
r : ℕ
A : Finset α
⊢ A ∈ 𝒜 → A ∈ powersetLen r univ ↔ A ∈ ↑𝒜 → card A = r
[PROOFSTEP]
rw [mem_powerset_len_univ_iff, mem_coe]
[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s : Finset α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ card 𝒜 ≤ Nat.choose (Fintype.card α) r
[PROOFSTEP]
rw [Fintype.card, ← card_powersetLen]
[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s : Finset α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ card 𝒜 ≤ card (powersetLen r univ)
[PROOFSTEP]
exact card_le_of_subset (subset_powersetLen_univ_iff.mpr h𝒜)
[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
𝒜 : Finset (Finset α)
A A₁ A₂ : Finset α
r r₁ r₂ : ℕ
inst✝ : Fintype α
⊢ ∑ r in Iic (Fintype.card α), card (𝒜 # r) = card 𝒜
[PROOFSTEP]
letI := Classical.decEq α
[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
𝒜 : Finset (Finset α)
A A₁ A₂ : Finset α
r r₁ r₂ : ℕ
inst✝ : Fintype α
this : DecidableEq α := Classical.decEq α
⊢ ∑ r in Iic (Fintype.card α), card (𝒜 # r) = card 𝒜
[PROOFSTEP]
rw [← card_biUnion, biUnion_slice]
[GOAL]
α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
𝒜 : Finset (Finset α)
A A₁ A₂ : Finset α
r r₁ r₂ : ℕ
inst✝ : Fintype α
this : DecidableEq α := Classical.decEq α
⊢ ∀ (x : ℕ), x ∈ Iic (Fintype.card α) → ∀ (y : ℕ), y ∈ Iic (Fintype.card α) → x ≠ y → Disjoint (𝒜 # x) (𝒜 # y)
[PROOFSTEP]
exact Finset.pairwiseDisjoint_slice.subset (Set.subset_univ _)


[GOAL]
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
⊢ EquitableOn s f ↔ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
refine' ⟨_, fun ⟨b, hb⟩ x y hx hy => (hb x hx).2.trans (add_le_add_right (hb y hy).1 _)⟩
[GOAL]
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
⊢ EquitableOn s f → ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
obtain rfl | ⟨x, hx⟩ := s.eq_empty_or_nonempty
[GOAL]
case inl
α : Type u_1
β : Type u_2
f : α → ℕ
⊢ EquitableOn ∅ f → ∃ b, ∀ (a : α), a ∈ ∅ → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
simp
[GOAL]
case inr.intro
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
x : α
hx : x ∈ s
⊢ EquitableOn s f → ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
intro hs
[GOAL]
case inr.intro
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
x : α
hx : x ∈ s
hs : EquitableOn s f
⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
by_cases h : ∀ y ∈ s, f x ≤ f y
[GOAL]
case pos
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
x : α
hx : x ∈ s
hs : EquitableOn s f
h : ∀ (y : α), y ∈ s → f x ≤ f y
⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
exact ⟨f x, fun y hy => ⟨h _ hy, hs hy hx⟩⟩
[GOAL]
case neg
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
x : α
hx : x ∈ s
hs : EquitableOn s f
h : ¬∀ (y : α), y ∈ s → f x ≤ f y
⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
push_neg at h
[GOAL]
case neg
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
x : α
hx : x ∈ s
hs : EquitableOn s f
h : ∃ y, y ∈ s ∧ f y < f x
⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
obtain ⟨w, hw, hwx⟩ := h
[GOAL]
case neg.intro.intro
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
x : α
hx : x ∈ s
hs : EquitableOn s f
w : α
hw : w ∈ s
hwx : f w < f x
⊢ ∃ b, ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
refine' ⟨f w, fun y hy => ⟨Nat.le_of_succ_le_succ _, hs hy hw⟩⟩
[GOAL]
case neg.intro.intro
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
x : α
hx : x ∈ s
hs : EquitableOn s f
w : α
hw : w ∈ s
hwx : f w < f x
y : α
hy : y ∈ s
⊢ Nat.succ (f w) ≤ Nat.succ (f y)
[PROOFSTEP]
rw [(Nat.succ_le_of_lt hwx).antisymm (hs hx hw)]
[GOAL]
case neg.intro.intro
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
x : α
hx : x ∈ s
hs : EquitableOn s f
w : α
hw : w ∈ s
hwx : f w < f x
y : α
hy : y ∈ s
⊢ f x ≤ Nat.succ (f y)
[PROOFSTEP]
exact hs hx hy
[GOAL]
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
⊢ EquitableOn s f ↔ ∃ b, f '' s ⊆ Icc b (b + 1)
[PROOFSTEP]
simpa only [image_subset_iff] using equitableOn_iff_exists_le_le_add_one
[GOAL]
α : Type u_1
β : Type u_2
s : Set α
f : α → ℕ
⊢ EquitableOn s f ↔ ∃ b, ∀ (a : α), a ∈ s → f a = b ∨ f a = b + 1
[PROOFSTEP]
simp_rw [equitableOn_iff_exists_le_le_add_one, Nat.le_and_le_add_one_iff]
[GOAL]
α : Type u_1
β : Type u_2
inst✝ : OrderedSemiring β
s : Set α
hs : Set.Subsingleton s
f : α → β
i j : α
hi : i ∈ s
hj : j ∈ s
⊢ f i ≤ f j + 1
[PROOFSTEP]
rw [hs hi hj]
[GOAL]
α : Type u_1
β : Type u_2
inst✝ : OrderedSemiring β
s : Set α
hs : Set.Subsingleton s
f : α → β
i j : α
hi : i ∈ s
hj : j ∈ s
⊢ f j ≤ f j + 1
[PROOFSTEP]
exact le_add_of_nonneg_right zero_le_one
[GOAL]
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
⊢ EquitableOn (↑s) f ↔ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
rw [Set.equitableOn_iff_exists_le_le_add_one]
[GOAL]
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
⊢ (∃ b, ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1) ↔
    ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
refine' ⟨_, fun h => ⟨_, h⟩⟩
[GOAL]
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
⊢ (∃ b, ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1) →
    ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
rintro ⟨b, hb⟩
[GOAL]
case intro
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
by_cases h : ∀ a ∈ s, f a = b + 1
[GOAL]
case pos
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
h : ∀ (a : α), a ∈ s → f a = b + 1
⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
intro a ha
[GOAL]
case pos
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a✝ : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
h : ∀ (a : α), a ∈ s → f a = b + 1
a : α
ha : a ∈ s
⊢ (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
rw [h _ ha, sum_const_nat h, Nat.mul_div_cancel_left _ (card_pos.2 ⟨a, ha⟩)]
[GOAL]
case pos
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a✝ : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
h : ∀ (a : α), a ∈ s → f a = b + 1
a : α
ha : a ∈ s
⊢ b + 1 ≤ b + 1 ∧ b + 1 ≤ b + 1 + 1
[PROOFSTEP]
exact ⟨le_rfl, Nat.le_succ _⟩
[GOAL]
case neg
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
h : ¬∀ (a : α), a ∈ s → f a = b + 1
⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
push_neg at h
[GOAL]
case neg
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
h : ∃ a, a ∈ s ∧ f a ≠ b + 1
⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
obtain ⟨x, hx₁, hx₂⟩ := h
[GOAL]
case neg.intro.intro
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
x : α
hx₁ : x ∈ s
hx₂ : f x ≠ b + 1
⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
suffices h : b = (∑ i in s, f i) / s.card
[GOAL]
case neg.intro.intro
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
x : α
hx₁ : x ∈ s
hx₂ : f x ≠ b + 1
h : b = (∑ i in s, f i) / card s
⊢ ∀ (a : α), a ∈ s → (∑ i in s, f i) / card s ≤ f a ∧ f a ≤ (∑ i in s, f i) / card s + 1
[PROOFSTEP]
simp_rw [← h]
[GOAL]
case neg.intro.intro
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
x : α
hx₁ : x ∈ s
hx₂ : f x ≠ b + 1
h : b = (∑ i in s, f i) / card s
⊢ ∀ (a : α), a ∈ s → b ≤ f a ∧ f a ≤ b + 1
[PROOFSTEP]
apply hb
[GOAL]
case h
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
x : α
hx₁ : x ∈ s
hx₂ : f x ≠ b + 1
⊢ b = (∑ i in s, f i) / card s
[PROOFSTEP]
symm
[GOAL]
case h
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
x : α
hx₁ : x ∈ s
hx₂ : f x ≠ b + 1
⊢ (∑ i in s, f i) / card s = b
[PROOFSTEP]
refine'
  Nat.div_eq_of_lt_le (le_trans (by simp [mul_comm]) (sum_le_sum fun a ha => (hb a ha).1))
    ((sum_lt_sum (fun a ha => (hb a ha).2) ⟨_, hx₁, (hb _ hx₁).2.lt_of_ne hx₂⟩).trans_le _)
[GOAL]
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
x : α
hx₁ : x ∈ s
hx₂ : f x ≠ b + 1
⊢ b * card s ≤ ∑ i in s, b
[PROOFSTEP]
simp [mul_comm]
[GOAL]
case h
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
x : α
hx₁ : x ∈ s
hx₂ : f x ≠ b + 1
⊢ ∑ i in s, (b + 1) ≤ Nat.succ b * card s
[PROOFSTEP]
rw [mul_comm, sum_const_nat]
[GOAL]
case h
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
b : ℕ
hb : ∀ (a : α), a ∈ ↑s → b ≤ f a ∧ f a ≤ b + 1
x : α
hx₁ : x ∈ s
hx₂ : f x ≠ b + 1
⊢ ∀ (x : α), x ∈ s → b + 1 = Nat.succ b
[PROOFSTEP]
exact fun _ _ => rfl
[GOAL]
α : Type u_1
β : Type u_2
s : Finset α
f : α → ℕ
a : α
⊢ EquitableOn (↑s) f ↔ ∀ (a : α), a ∈ s → f a = (∑ i in s, f i) / card s ∨ f a = (∑ i in s, f i) / card s + 1
[PROOFSTEP]
simp_rw [equitableOn_iff_le_le_add_one, Nat.le_and_le_add_one_iff]


[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
⊢ (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1
[PROOFSTEP]
have : 0 < 1 + ‖x‖ ^ 2 := by positivity
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
⊢ 0 < 1 + ‖x‖ ^ 2
[PROOFSTEP]
positivity
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
this : 0 < 1 + ‖x‖ ^ 2
⊢ (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1
[PROOFSTEP]
rw [mem_ball_zero_iff, norm_smul, Real.norm_eq_abs, abs_inv, ← _root_.div_eq_inv_mul,
  div_lt_one (abs_pos.mpr <| Real.sqrt_ne_zero'.mpr this), ← abs_norm x, ← sq_lt_sq, abs_norm, Real.sq_sqrt this.le]
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
this : 0 < 1 + ‖x‖ ^ 2
⊢ ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2
[PROOFSTEP]
exact lt_one_add _
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
⊢ (fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x) = x
[PROOFSTEP]
field_simp [norm_smul, smul_smul, (zero_lt_one_add_norm_sq x).ne', sq_abs, Real.sq_sqrt (zero_lt_one_add_norm_sq x).le,
  ← Real.sqrt_div (zero_lt_one_add_norm_sq x).le]
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
y : E
hy : y ∈ ball 0 1
⊢ (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y) y) = y
[PROOFSTEP]
have : 0 < 1 - ‖y‖ ^ 2 := by nlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
y : E
hy : y ∈ ball 0 1
⊢ 0 < 1 - ‖y‖ ^ 2
[PROOFSTEP]
nlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
y : E
hy : y ∈ ball 0 1
this : 0 < 1 - ‖y‖ ^ 2
⊢ (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y) y) = y
[PROOFSTEP]
field_simp [norm_smul, smul_smul, this.ne', sq_abs, Real.sq_sqrt this.le, ← Real.sqrt_div this.le]
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ ContinuousOn
    ↑{ toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,
        source := univ, target := ball 0 1,
        map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),
        map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),
        left_inv' :=
          (_ :
            ∀ (x : E),
              x ∈ univ →
                (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),
        right_inv' :=
          (_ :
            ∀ (y : E),
              y ∈ ball 0 1 →
                (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y = y) }
    { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,
        source := univ, target := ball 0 1,
        map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),
        map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),
        left_inv' :=
          (_ :
            ∀ (x : E),
              x ∈ univ →
                (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),
        right_inv' :=
          (_ :
            ∀ (y : E),
              y ∈ ball 0 1 →
                (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =
                  y) }.source
[PROOFSTEP]
suffices Continuous fun (x : E) => (1 + ‖x‖ ^ 2).sqrt⁻¹ from (this.smul continuous_id).continuousOn
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹
[PROOFSTEP]
refine' Continuous.inv₀ _ fun x => Real.sqrt_ne_zero'.mpr (by positivity)
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
⊢ 0 < 1 + ‖x‖ ^ 2
[PROOFSTEP]
positivity
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => Real.sqrt (1 + ‖x‖ ^ 2)
[PROOFSTEP]
continuity
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ ContinuousOn
    { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,
        source := univ, target := ball 0 1,
        map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),
        map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),
        left_inv' :=
          (_ :
            ∀ (x : E),
              x ∈ univ →
                (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),
        right_inv' :=
          (_ :
            ∀ (y : E),
              y ∈ ball 0 1 →
                (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =
                  y) }.invFun
    { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,
        source := univ, target := ball 0 1,
        map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),
        map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),
        left_inv' :=
          (_ :
            ∀ (x : E),
              x ∈ univ →
                (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),
        right_inv' :=
          (_ :
            ∀ (y : E),
              y ∈ ball 0 1 →
                (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =
                  y) }.target
[PROOFSTEP]
have : ∀ y ∈ ball (0 : E) 1, (1 - ‖(y : E)‖ ^ 2).sqrt ≠ 0 := fun y hy ↦
  by
  rw [Real.sqrt_ne_zero']
  nlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
y : E
hy : y ∈ ball 0 1
⊢ Real.sqrt (1 - ‖y‖ ^ 2) ≠ 0
[PROOFSTEP]
rw [Real.sqrt_ne_zero']
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
y : E
hy : y ∈ ball 0 1
⊢ 0 < 1 - ‖y‖ ^ 2
[PROOFSTEP]
nlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
this : ∀ (y : E), y ∈ ball 0 1 → Real.sqrt (1 - ‖y‖ ^ 2) ≠ 0
⊢ ContinuousOn
    { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,
        source := univ, target := ball 0 1,
        map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),
        map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),
        left_inv' :=
          (_ :
            ∀ (x : E),
              x ∈ univ →
                (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),
        right_inv' :=
          (_ :
            ∀ (y : E),
              y ∈ ball 0 1 →
                (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =
                  y) }.invFun
    { toFun := fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y,
        source := univ, target := ball 0 1,
        map_source' := (_ : ∀ (x : E), x ∈ univ → (fun x => (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1),
        map_target' := (_ : ∀ (x : E), x ∈ ball 0 1 → True),
        left_inv' :=
          (_ :
            ∀ (x : E),
              x ∈ univ →
                (Real.sqrt (1 - ‖(Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x‖ ^ 2))⁻¹ • (Real.sqrt (1 + ‖x‖ ^ 2))⁻¹ • x = x),
        right_inv' :=
          (_ :
            ∀ (y : E),
              y ∈ ball 0 1 →
                (Real.sqrt (1 + ‖(Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y‖ ^ 2))⁻¹ • (Real.sqrt (1 - ‖y‖ ^ 2))⁻¹ • y =
                  y) }.target
[PROOFSTEP]
exact
  ContinuousOn.smul (ContinuousOn.inv₀ (continuousOn_const.sub (continuous_norm.continuousOn.pow _)).sqrt this)
    continuousOn_id
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ ↑univUnitBall 0 = 0
[PROOFSTEP]
simp [LocalHomeomorph.univUnitBall_apply]
[GOAL]
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ ↑(LocalHomeomorph.symm univUnitBall) 0 = 0
[PROOFSTEP]
simp [LocalHomeomorph.univUnitBall_symm_apply]
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
hr : 0 < r
⊢ ↑(Homeomorph.trans (Homeomorph.smulOfNeZero r (_ : r ≠ 0))
          (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))) ''
      ball 0 1 =
    ball c r
[PROOFSTEP]
change (IsometryEquiv.vaddConst c) ∘ (r • ·) '' ball (0 : E) 1 = ball c r
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
hr : 0 < r
⊢ (↑(IsometryEquiv.vaddConst c) ∘ fun x => r • x) '' ball 0 1 = ball c r
[PROOFSTEP]
rw [image_comp, image_smul, smul_unitBall hr.ne', IsometryEquiv.image_ball]
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
hr : 0 < r
⊢ ball (↑(IsometryEquiv.vaddConst c) 0) ‖r‖ = ball c r
[PROOFSTEP]
simp [abs_of_pos hr]
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ (univBall c r).toLocalEquiv.source = univ
[PROOFSTEP]
unfold univBall
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ (if h : 0 < r then
          LocalHomeomorph.trans' univUnitBall (unitBallBall c r h)
            (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)
        else
          Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))).toLocalEquiv.source =
    univ
[PROOFSTEP]
split_ifs
[GOAL]
case pos
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
h✝ : 0 < r
⊢ (LocalHomeomorph.trans' univUnitBall (unitBallBall c r h✝)
          (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)).toLocalEquiv.source =
    univ
[PROOFSTEP]
rfl
[GOAL]
case neg
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
h✝ : ¬0 < r
⊢ (Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))).toLocalEquiv.source = univ
[PROOFSTEP]
rfl
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
hr : 0 < r
⊢ (univBall c r).toLocalEquiv.target = ball c r
[PROOFSTEP]
rw [univBall, dif_pos hr]
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
hr : 0 < r
⊢ (LocalHomeomorph.trans' univUnitBall (unitBallBall c r hr)
          (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)).toLocalEquiv.target =
    ball c r
[PROOFSTEP]
rfl
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ ball c r ⊆ (univBall c r).toLocalEquiv.target
[PROOFSTEP]
by_cases hr : 0 < r
[GOAL]
case pos
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
hr : 0 < r
⊢ ball c r ⊆ (univBall c r).toLocalEquiv.target
[PROOFSTEP]
rw [univBall_target c hr]
[GOAL]
case neg
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
hr : ¬0 < r
⊢ ball c r ⊆ (univBall c r).toLocalEquiv.target
[PROOFSTEP]
rw [univBall, dif_neg hr]
[GOAL]
case neg
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
hr : ¬0 < r
⊢ ball c r ⊆ (Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))).toLocalEquiv.target
[PROOFSTEP]
exact subset_univ _
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ ↑(univBall c r) 0 = c
[PROOFSTEP]
unfold univBall
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ ↑(if h : 0 < r then
          LocalHomeomorph.trans' univUnitBall (unitBallBall c r h)
            (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)
        else Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c)))
      0 =
    c
[PROOFSTEP]
split_ifs
[GOAL]
case pos
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
h✝ : 0 < r
⊢ ↑(LocalHomeomorph.trans' univUnitBall (unitBallBall c r h✝)
          (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target))
      0 =
    c
[PROOFSTEP]
simp
[GOAL]
case neg
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
h✝ : ¬0 < r
⊢ ↑(Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c))) 0 = c
[PROOFSTEP]
simp
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ ↑(LocalHomeomorph.symm (univBall c r)) c = 0
[PROOFSTEP]
have : 0 ∈ (univBall c r).source := by simp
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ 0 ∈ (univBall c r).toLocalEquiv.source
[PROOFSTEP]
simp
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
this : 0 ∈ (univBall c r).toLocalEquiv.source
⊢ ↑(LocalHomeomorph.symm (univBall c r)) c = 0
[PROOFSTEP]
simpa only [univBall_apply_zero] using (univBall c r).left_inv this
[GOAL]
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
P : Type u_2
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor E P
c : P
r : ℝ
⊢ Continuous ↑(univBall c r)
[PROOFSTEP]
simpa [continuous_iff_continuousOn_univ] using (univBall c r).continuousOn