[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
x : E
r : ℝ
⊢ closedBall x r = ↑(ContinuousLinearEquiv.symm toEuclidean) '' Metric.closedBall (↑toEuclidean x) r
[PROOFSTEP]
rw [toEuclidean.image_symm_eq_preimage, closedBall_eq_preimage]
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
x : E
r : ℝ
⊢ IsCompact (closedBall x r)
[PROOFSTEP]
rw [closedBall_eq_image]
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
x : E
r : ℝ
⊢ IsCompact (↑(ContinuousLinearEquiv.symm toEuclidean) '' Metric.closedBall (↑toEuclidean x) r)
[PROOFSTEP]
exact (isCompact_closedBall _ _).image toEuclidean.symm.continuous
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
x : E
r : ℝ
h : r ≠ 0
⊢ closure (ball x r) = closedBall x r
[PROOFSTEP]
rw [ball_eq_preimage, ← toEuclidean.preimage_closure, closure_ball (toEuclidean x) h, closedBall_eq_preimage]
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
R : ℝ
s : Set E
x : E
hR : 0 < R
hs : IsClosed s
h : s ⊆ ball x R
⊢ ∃ r, r ∈ Ioo 0 R ∧ s ⊆ ball x r
[PROOFSTEP]
rw [ball_eq_preimage, ← image_subset_iff] at h 
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
R : ℝ
s : Set E
x : E
hR : 0 < R
hs : IsClosed s
h : ↑toEuclidean '' s ⊆ Metric.ball (↑toEuclidean x) R
⊢ ∃ r, r ∈ Ioo 0 R ∧ s ⊆ ball x r
[PROOFSTEP]
rcases exists_pos_lt_subset_ball hR (toEuclidean.isClosed_image.2 hs) h with ⟨r, hr, hsr⟩
[GOAL]
case intro.intro
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
R : ℝ
s : Set E
x : E
hR : 0 < R
hs : IsClosed s
h : ↑toEuclidean '' s ⊆ Metric.ball (↑toEuclidean x) R
r : ℝ
hr : r ∈ Ioo 0 R
hsr : ↑toEuclidean '' s ⊆ Metric.ball (↑toEuclidean x) r
⊢ ∃ r, r ∈ Ioo 0 R ∧ s ⊆ ball x r
[PROOFSTEP]
exact ⟨r, hr, image_subset_iff.1 hsr⟩
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
x : E
⊢ Filter.HasBasis (𝓝 x) (fun r => 0 < r) (closedBall x)
[PROOFSTEP]
rw [toEuclidean.toHomeomorph.nhds_eq_comap x]
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
x : E
⊢ Filter.HasBasis
    (Filter.comap (↑(ContinuousLinearEquiv.toHomeomorph toEuclidean))
      (𝓝 (↑(ContinuousLinearEquiv.toHomeomorph toEuclidean) x)))
    (fun r => 0 < r) (closedBall x)
[PROOFSTEP]
exact Metric.nhds_basis_closedBall.comap _
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
x : E
⊢ Filter.HasBasis (𝓝 x) (fun r => 0 < r) (ball x)
[PROOFSTEP]
rw [toEuclidean.toHomeomorph.nhds_eq_comap x]
[GOAL]
E : Type u_1
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalAddGroup E
inst✝³ : T2Space E
inst✝² : Module ℝ E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : FiniteDimensional ℝ E
x : E
⊢ Filter.HasBasis
    (Filter.comap (↑(ContinuousLinearEquiv.toHomeomorph toEuclidean))
      (𝓝 (↑(ContinuousLinearEquiv.toHomeomorph toEuclidean) x)))
    (fun r => 0 < r) (ball x)
[PROOFSTEP]
exact Metric.nhds_basis_ball.comap _
[GOAL]
E : Type u_1
inst✝¹¹ : AddCommGroup E
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : TopologicalAddGroup E
inst✝⁸ : T2Space E
inst✝⁷ : Module ℝ E
inst✝⁶ : ContinuousSMul ℝ E
inst✝⁵ : FiniteDimensional ℝ E
F : Type u_2
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
G : Type u_3
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
inst✝ : FiniteDimensional ℝ G
f g : F → G
n : ℕ∞
hf : ContDiff ℝ n f
hg : ContDiff ℝ n g
h : ∀ (x : F), f x ≠ g x
⊢ ContDiff ℝ n fun x => Euclidean.dist (f x) (g x)
[PROOFSTEP]
simp only [Euclidean.dist]
[GOAL]
E : Type u_1
inst✝¹¹ : AddCommGroup E
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : TopologicalAddGroup E
inst✝⁸ : T2Space E
inst✝⁷ : Module ℝ E
inst✝⁶ : ContinuousSMul ℝ E
inst✝⁵ : FiniteDimensional ℝ E
F : Type u_2
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
G : Type u_3
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
inst✝ : FiniteDimensional ℝ G
f g : F → G
n : ℕ∞
hf : ContDiff ℝ n f
hg : ContDiff ℝ n g
h : ∀ (x : F), f x ≠ g x
⊢ ContDiff ℝ n fun x => Dist.dist (↑toEuclidean (f x)) (↑toEuclidean (g x))
[PROOFSTEP]
apply @ContDiff.dist ℝ
[GOAL]
case hf
E : Type u_1
inst✝¹¹ : AddCommGroup E
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : TopologicalAddGroup E
inst✝⁸ : T2Space E
inst✝⁷ : Module ℝ E
inst✝⁶ : ContinuousSMul ℝ E
inst✝⁵ : FiniteDimensional ℝ E
F : Type u_2
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
G : Type u_3
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
inst✝ : FiniteDimensional ℝ G
f g : F → G
n : ℕ∞
hf : ContDiff ℝ n f
hg : ContDiff ℝ n g
h : ∀ (x : F), f x ≠ g x
⊢ ContDiff ℝ n fun y => ↑toEuclidean (f y)
case hg
E : Type u_1
inst✝¹¹ : AddCommGroup E
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : TopologicalAddGroup E
inst✝⁸ : T2Space E
inst✝⁷ : Module ℝ E
inst✝⁶ : ContinuousSMul ℝ E
inst✝⁵ : FiniteDimensional ℝ E
F : Type u_2
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
G : Type u_3
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
inst✝ : FiniteDimensional ℝ G
f g : F → G
n : ℕ∞
hf : ContDiff ℝ n f
hg : ContDiff ℝ n g
h : ∀ (x : F), f x ≠ g x
⊢ ContDiff ℝ n fun y => ↑toEuclidean (g y)
case hne
E : Type u_1
inst✝¹¹ : AddCommGroup E
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : TopologicalAddGroup E
inst✝⁸ : T2Space E
inst✝⁷ : Module ℝ E
inst✝⁶ : ContinuousSMul ℝ E
inst✝⁵ : FiniteDimensional ℝ E
F : Type u_2
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
G : Type u_3
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace ℝ G
inst✝ : FiniteDimensional ℝ G
f g : F → G
n : ℕ∞
hf : ContDiff ℝ n f
hg : ContDiff ℝ n g
h : ∀ (x : F), f x ≠ g x
⊢ ∀ (x : F), ↑toEuclidean (f x) ≠ ↑toEuclidean (g x)
[PROOFSTEP]
exacts [(@toEuclidean G _ _ _ _ _ _ _).contDiff.comp hf, (@toEuclidean G _ _ _ _ _ _ _).contDiff.comp hg, fun x =>
  toEuclidean.injective.ne (h x)]
