l3lab/ntp-mathlib huggingface dataset:
/-- If a function has compact multiplicative support, then either the function is trivial or the
space is finite-dimensional. -/
@[to_additive
      "If a function has compact support, then either the function is trivial or the space is
      finite-dimensional."]
theorem HasCompactMulSupport.eq_one_or_finiteDimensional {X : Type*} [TopologicalSpace X] [One X]
    [T2Space X] {f : E → X} (hf : HasCompactMulSupport f) (h'f : Continuous f) :
    f = 1 ∨ FiniteDimensional 𝕜 E := by
  by_cases h : ∀ x, f x = 1
  · apply Or.inl
    ext x
    exact h x
  apply Or.inr
  push_neg at h
  obtain ⟨x, hx⟩ : ∃ x, f x ≠ 1 := h
  have : Function.mulSupport f ∈ 𝓝 x := h'f.isOpen_mulSupport.mem_nhds hx
  -- Porting note: moved type ascriptions because of exists_prop changes
  

Proof state:
case neg.h.intro
𝕜 : Type u
inst✝¹³ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : NormedSpace 𝕜 E
F : Type w
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
F' : Type x
inst✝⁸ : AddCommGroup F'
inst✝⁷ : Module 𝕜 F'
inst✝⁶ : TopologicalSpace F'
inst✝⁵ : TopologicalAddGroup F'
inst✝⁴ : ContinuousSMul 𝕜 F'
inst✝³ : CompleteSpace 𝕜
X : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : One X
inst✝ : T2Space X
f : E → X
hf : HasCompactMulSupport f
h'f : Continuous f
x : E
hx : f x ≠ 1
this : Function.mulSupport f ∈ 𝓝 x
⊢ FiniteDimensional 𝕜 E

Next tactic:
obtain ⟨r : ℝ, rpos : 0 < r, hr : Metric.closedBall x r ⊆ Function.mulSupport f⟩ :=
    Metric.nhds_basis_closedBall.mem_iff.1 this
/-- If a function has compact multiplicative support, then either the function is trivial or the
space is finite-dimensional. -/
@[to_additive
      "If a function has compact support, then either the function is trivial or the space is
      finite-dimensional."]
theorem HasCompactMulSupport.eq_one_or_finiteDimensional {X : Type*} [TopologicalSpace X] [One X]
    [T2Space X] {f : E → X} (hf : HasCompactMulSupport f) (h'f : Continuous f) :
    f = 1 ∨ FiniteDimensional 𝕜 E := by
  by_cases h : ∀ x, f x = 1
  · apply Or.inl
    ext x
    exact h x
  apply Or.inr
  push_neg at h
  obtain ⟨x, hx⟩ : ∃ x, f x ≠ 1 := h
  have : Function.mulSupport f ∈ 𝓝 x := h'f.isOpen_mulSupport.mem_nhds hx
  -- Porting note: moved type ascriptions because of exists_prop changes
  obtain ⟨r : ℝ, rpos : 0 < r, hr : Metric.closedBall x r ⊆ Function.mulSupport f⟩ :=
    Metric.nhds_basis_closedBall.mem_iff.1 this
  

Proof state:
case neg.h.intro.intro.intro
𝕜 : Type u
inst✝¹³ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : NormedSpace 𝕜 E
F : Type w
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
F' : Type x
inst✝⁸ : AddCommGroup F'
inst✝⁷ : Module 𝕜 F'
inst✝⁶ : TopologicalSpace F'
inst✝⁵ : TopologicalAddGroup F'
inst✝⁴ : ContinuousSMul 𝕜 F'
inst✝³ : CompleteSpace 𝕜
X : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : One X
inst✝ : T2Space X
f : E → X
hf : HasCompactMulSupport f
h'f : Continuous f
x : E
hx : f x ≠ 1
this : Function.mulSupport f ∈ 𝓝 x
r : ℝ
rpos : 0 < r
hr : closedBall x r ⊆ Function.mulSupport f
⊢ FiniteDimensional 𝕜 E

Next tactic:
have : IsCompact (Metric.closedBall x r) :=
    hf.of_isClosed_subset Metric.isClosed_ball (hr.trans (subset_mulTSupport _))
/-- If a function has compact multiplicative support, then either the function is trivial or the
space is finite-dimensional. -/
@[to_additive
      "If a function has compact support, then either the function is trivial or the space is
      finite-dimensional."]
theorem HasCompactMulSupport.eq_one_or_finiteDimensional {X : Type*} [TopologicalSpace X] [One X]
    [T2Space X] {f : E → X} (hf : HasCompactMulSupport f) (h'f : Continuous f) :
    f = 1 ∨ FiniteDimensional 𝕜 E := by
  by_cases h : ∀ x, f x = 1
  · apply Or.inl
    ext x
    exact h x
  apply Or.inr
  push_neg at h
  obtain ⟨x, hx⟩ : ∃ x, f x ≠ 1 := h
  have : Function.mulSupport f ∈ 𝓝 x := h'f.isOpen_mulSupport.mem_nhds hx
  -- Porting note: moved type ascriptions because of exists_prop changes
  obtain ⟨r : ℝ, rpos : 0 < r, hr : Metric.closedBall x r ⊆ Function.mulSupport f⟩ :=
    Metric.nhds_basis_closedBall.mem_iff.1 this
  have : IsCompact (Metric.closedBall x r) :=
    hf.of_isClosed_subset Metric.isClosed_ball (hr.trans (subset_mulTSupport _))
  

Proof state:
case neg.h.intro.intro.intro
𝕜 : Type u
inst✝¹³ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : NormedSpace 𝕜 E
F : Type w
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 F
F' : Type x
inst✝⁸ : AddCommGroup F'
inst✝⁷ : Module 𝕜 F'
inst✝⁶ : TopologicalSpace F'
inst✝⁵ : TopologicalAddGroup F'
inst✝⁴ : ContinuousSMul 𝕜 F'
inst✝³ : CompleteSpace 𝕜
X : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : One X
inst✝ : T2Space X
f : E → X
hf : HasCompactMulSupport f
h'f : Continuous f
x : E
hx : f x ≠ 1
this✝ : Function.mulSupport f ∈ 𝓝 x
r : ℝ
rpos : 0 < r
hr : closedBall x r ⊆ Function.mulSupport f
this : IsCompact (closedBall x r)
⊢ FiniteDimensional 𝕜 E

Next tactic:
exact finiteDimensional_of_isCompact_closedBall 𝕜 rpos this
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  

Proof state:
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
⊢ ProperSpace E

Next tactic:
rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  

Proof state:
case intro.intro
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
⊢ ProperSpace E

Next tactic:
rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  

Proof state:
case intro.intro.intro
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
⊢ ProperSpace E

Next tactic:
have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
    have A : closedBall x (‖c‖^n * r) ⊆ f '' (closedBall 0 r) := by
      rintro y hy
      refine ⟨(c^n)⁻¹ • (y - x), ?_, ?_⟩
      · simpa [dist_eq_norm, norm_smul, inv_mul_le_iff (pow_pos (zero_lt_one.trans hc) _)] using hy
      · have : c^n ≠ 0 := pow_ne_zero _ (norm_pos_iff.1 (zero_lt_one.trans hc))
        simp [smul_smul, mul_inv_cancel this]
    exact (hr.image Cf).of_isClosed_subset isClosed_ball A
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    

Proof state:
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
⊢ ∀ (n : ℕ) (x : E), IsCompact (closedBall x (‖c‖ ^ n * r))

Next tactic:
intro n x
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    

Proof state:
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
⊢ IsCompact (closedBall x (‖c‖ ^ n * r))

Next tactic:
let f : E → E := fun y ↦ c^n • y + x
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    

Proof state:
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
f : E → E := fun y => c ^ n • y + x
⊢ IsCompact (closedBall x (‖c‖ ^ n * r))

Next tactic:
have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
    

Proof state:
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
f : E → E := fun y => c ^ n • y + x
Cf : Continuous f
⊢ IsCompact (closedBall x (‖c‖ ^ n * r))

Next tactic:
have A : closedBall x (‖c‖^n * r) ⊆ f '' (closedBall 0 r) := by
      rintro y hy
      refine ⟨(c^n)⁻¹ • (y - x), ?_, ?_⟩
      · simpa [dist_eq_norm, norm_smul, inv_mul_le_iff (pow_pos (zero_lt_one.trans hc) _)] using hy
      · have : c^n ≠ 0 := pow_ne_zero _ (norm_pos_iff.1 (zero_lt_one.trans hc))
        simp [smul_smul, mul_inv_cancel this]
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
    have A : closedBall x (‖c‖^n * r) ⊆ f '' (closedBall 0 r) := by
      

Proof state:
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
f : E → E := fun y => c ^ n • y + x
Cf : Continuous f
⊢ closedBall x (‖c‖ ^ n * r) ⊆ f '' closedBall 0 r

Next tactic:
rintro y hy
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
    have A : closedBall x (‖c‖^n * r) ⊆ f '' (closedBall 0 r) := by
      rintro y hy
      

Proof state:
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
f : E → E := fun y => c ^ n • y + x
Cf : Continuous f
y : E
hy : y ∈ closedBall x (‖c‖ ^ n * r)
⊢ y ∈ f '' closedBall 0 r

Next tactic:
refine ⟨(c^n)⁻¹ • (y - x), ?_, ?_⟩
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
    have A : closedBall x (‖c‖^n * r) ⊆ f '' (closedBall 0 r) := by
      rintro y hy
      refine ⟨(c^n)⁻¹ • (y - x), ?_, ?_⟩
      · 

Proof state:
case refine_1
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
f : E → E := fun y => c ^ n • y + x
Cf : Continuous f
y : E
hy : y ∈ closedBall x (‖c‖ ^ n * r)
⊢ (c ^ n)⁻¹ • (y - x) ∈ closedBall 0 r

Next tactic:
simpa [dist_eq_norm, norm_smul, inv_mul_le_iff (pow_pos (zero_lt_one.trans hc) _)] using hy
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
    have A : closedBall x (‖c‖^n * r) ⊆ f '' (closedBall 0 r) := by
      rintro y hy
      refine ⟨(c^n)⁻¹ • (y - x), ?_, ?_⟩
      · simpa [dist_eq_norm, norm_smul, inv_mul_le_iff (pow_pos (zero_lt_one.trans hc) _)] using hy
      · 

Proof state:
case refine_2
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
f : E → E := fun y => c ^ n • y + x
Cf : Continuous f
y : E
hy : y ∈ closedBall x (‖c‖ ^ n * r)
⊢ f ((c ^ n)⁻¹ • (y - x)) = y

Next tactic:
have : c^n ≠ 0 := pow_ne_zero _ (norm_pos_iff.1 (zero_lt_one.trans hc))
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
    have A : closedBall x (‖c‖^n * r) ⊆ f '' (closedBall 0 r) := by
      rintro y hy
      refine ⟨(c^n)⁻¹ • (y - x), ?_, ?_⟩
      · simpa [dist_eq_norm, norm_smul, inv_mul_le_iff (pow_pos (zero_lt_one.trans hc) _)] using hy
      · have : c^n ≠ 0 := pow_ne_zero _ (norm_pos_iff.1 (zero_lt_one.trans hc))
        

Proof state:
case refine_2
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
f : E → E := fun y => c ^ n • y + x
Cf : Continuous f
y : E
hy : y ∈ closedBall x (‖c‖ ^ n * r)
this : c ^ n ≠ 0
⊢ f ((c ^ n)⁻¹ • (y - x)) = y

Next tactic:
simp [smul_smul, mul_inv_cancel this]
/-- A locally compact normed vector space is proper. -/
lemma properSpace_of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [LocallyCompactSpace E] : ProperSpace E := by
  rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
  rcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩
  have M : ∀ n (x : E), IsCompact (closedBall x (‖c‖^n * r)) := by
    intro n x
    let f : E → E := fun y ↦ c^n • y + x
    have Cf : Continuous f := (continuous_id.const_smul _).add continuous_const
    have A : closedBall x (‖c‖^n * r) ⊆ f '' (closedBall 0 r) := by
      rintro y hy
      refine ⟨(c^n)⁻¹ • (y - x), ?_, ?_⟩
      · simpa [dist_eq_norm, norm_smul, inv_mul_le_iff (pow_pos (zero_lt_one.trans hc) _)] using hy
      · have : c^n ≠ 0 := pow_ne_zero _ (norm_pos_iff.1 (zero_lt_one.trans hc))
        simp [smul_smul, mul_inv_cancel this]
    

Proof state:
𝕜✝ : Type u
inst✝¹⁴ : NontriviallyNormedField 𝕜✝
E✝ : Type v
inst✝¹³ : NormedAddCommGroup E✝
inst✝¹² : NormedSpace 𝕜✝ E✝
F : Type w
inst✝¹¹ : NormedAddCommGroup F
inst✝¹⁰ : NormedSpace 𝕜✝ F
F' : Type x
inst✝⁹ : AddCommGroup F'
inst✝⁸ : Module 𝕜✝ F'
inst✝⁷ : TopologicalSpace F'
inst✝⁶ : TopologicalAddGroup F'
inst✝⁵ : ContinuousSMul 𝕜✝ F'
inst✝⁴ : CompleteSpace 𝕜✝
𝕜 : Type u_1
inst✝³ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
c : 𝕜
hc : 1 < ‖c‖
n : ℕ
x : E
f : E → E := fun y => c ^ n • y + x
Cf : Continuous f
A : closedBall x (‖c‖ ^ n * r) ⊆ f '' closedBall 0 r
⊢ IsCompact (closedBall x (‖c‖ ^ n * r))

Next tactic:
exact (hr.image Cf).of_isClosed_subset isClosed_ball A