l3lab/ntp-mathlib huggingface dataset:
/-- **Riesz's theorem**: if a closed ball with center zero of positive radius is compact in a vector
space, then the space is finite-dimensional. -/
theorem finiteDimensional_of_isCompact_closedBall₀ {r : ℝ} (rpos : 0 < r)
    (h : IsCompact (Metric.closedBall (0 : E) r)) : FiniteDimensional 𝕜 E := by
  by_contra hfin
  obtain ⟨R, f, Rgt, fle, lef⟩ :
    ∃ (R : ℝ) (f : ℕ → E), 1 < R ∧ (∀ n, ‖f n‖ ≤ R) ∧ ∀ m n, m ≠ n → 1 ≤ ‖f m - f n‖ :=
    exists_seq_norm_le_one_le_norm_sub hfin
  have rRpos : 0 < r / R := div_pos rpos (zero_lt_one.trans Rgt)
  obtain ⟨c, hc⟩ : ∃ c : 𝕜, 0 < ‖c‖ ∧ ‖c‖ < r / R := NormedField.exists_norm_lt _ rRpos
  let g := fun n : ℕ => c • f n
  have A : ∀ n, g n ∈ Metric.closedBall (0 : E) r := by
    intro n
    simp only [norm_smul, dist_zero_right, Metric.mem_closedBall]
    calc
      ‖c‖ * ‖f n‖ ≤ r / R * R := by gcongr; exact hc.2.le; apply fle
      _ = r := by field_simp [(zero_lt_one.trans Rgt).ne']
  -- Porting note: moved type ascriptions because of exists_prop changes
  obtain ⟨x : E, _ : x ∈ Metric.closedBall (0 : E) r, φ : ℕ → ℕ, φmono : StrictMono φ,
    φlim : Tendsto (g ∘ φ) atTop (𝓝 x)⟩ := h.tendsto_subseq A
  have B : CauchySeq (g ∘ φ) := φlim.cauchySeq
  obtain ⟨N, hN⟩ : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖ :=
    Metric.cauchySeq_iff'.1 B ‖c‖ hc.1
  apply lt_irrefl ‖c‖
  calc
    ‖c‖ ≤ dist (g (φ (N + 1))) (g (φ N)) := by
      conv_lhs => rw [← mul_one ‖c‖]
      

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 𝕜
r : ℝ
rpos : 0 < r
h : IsCompact (closedBall 0 r)
hfin : ¬FiniteDimensional 𝕜 E
R : ℝ
f : ℕ → E
Rgt : 1 < R
fle : ∀ (n : ℕ), ‖f n‖ ≤ R
lef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖
rRpos : 0 < r / R
c : 𝕜
hc : 0 < ‖c‖ ∧ ‖c‖ < r / R
g : ℕ → E := fun n => c • f n
A : ∀ (n : ℕ), g n ∈ closedBall 0 r
x : E
left✝ : x ∈ closedBall 0 r
φ : ℕ → ℕ
φmono : StrictMono φ
φlim : Tendsto (g ∘ φ) atTop (𝓝 x)
B : CauchySeq (g ∘ φ)
N : ℕ
hN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖
⊢ ‖c‖ * 1 ≤ dist (g (φ (N + 1))) (g (φ N))

Next tactic:
simp only [dist_eq_norm, ← smul_sub, norm_smul]
/-- **Riesz's theorem**: if a closed ball with center zero of positive radius is compact in a vector
space, then the space is finite-dimensional. -/
theorem finiteDimensional_of_isCompact_closedBall₀ {r : ℝ} (rpos : 0 < r)
    (h : IsCompact (Metric.closedBall (0 : E) r)) : FiniteDimensional 𝕜 E := by
  by_contra hfin
  obtain ⟨R, f, Rgt, fle, lef⟩ :
    ∃ (R : ℝ) (f : ℕ → E), 1 < R ∧ (∀ n, ‖f n‖ ≤ R) ∧ ∀ m n, m ≠ n → 1 ≤ ‖f m - f n‖ :=
    exists_seq_norm_le_one_le_norm_sub hfin
  have rRpos : 0 < r / R := div_pos rpos (zero_lt_one.trans Rgt)
  obtain ⟨c, hc⟩ : ∃ c : 𝕜, 0 < ‖c‖ ∧ ‖c‖ < r / R := NormedField.exists_norm_lt _ rRpos
  let g := fun n : ℕ => c • f n
  have A : ∀ n, g n ∈ Metric.closedBall (0 : E) r := by
    intro n
    simp only [norm_smul, dist_zero_right, Metric.mem_closedBall]
    calc
      ‖c‖ * ‖f n‖ ≤ r / R * R := by gcongr; exact hc.2.le; apply fle
      _ = r := by field_simp [(zero_lt_one.trans Rgt).ne']
  -- Porting note: moved type ascriptions because of exists_prop changes
  obtain ⟨x : E, _ : x ∈ Metric.closedBall (0 : E) r, φ : ℕ → ℕ, φmono : StrictMono φ,
    φlim : Tendsto (g ∘ φ) atTop (𝓝 x)⟩ := h.tendsto_subseq A
  have B : CauchySeq (g ∘ φ) := φlim.cauchySeq
  obtain ⟨N, hN⟩ : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖ :=
    Metric.cauchySeq_iff'.1 B ‖c‖ hc.1
  apply lt_irrefl ‖c‖
  calc
    ‖c‖ ≤ dist (g (φ (N + 1))) (g (φ N)) := by
      conv_lhs => rw [← mul_one ‖c‖]
      simp only [dist_eq_norm, ← smul_sub, norm_smul]
      

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 𝕜
r : ℝ
rpos : 0 < r
h : IsCompact (closedBall 0 r)
hfin : ¬FiniteDimensional 𝕜 E
R : ℝ
f : ℕ → E
Rgt : 1 < R
fle : ∀ (n : ℕ), ‖f n‖ ≤ R
lef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖
rRpos : 0 < r / R
c : 𝕜
hc : 0 < ‖c‖ ∧ ‖c‖ < r / R
g : ℕ → E := fun n => c • f n
A : ∀ (n : ℕ), g n ∈ closedBall 0 r
x : E
left✝ : x ∈ closedBall 0 r
φ : ℕ → ℕ
φmono : StrictMono φ
φlim : Tendsto (g ∘ φ) atTop (𝓝 x)
B : CauchySeq (g ∘ φ)
N : ℕ
hN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖
⊢ ‖c‖ * 1 ≤ ‖c‖ * ‖f (φ (N + 1)) - f (φ N)‖

Next tactic:
gcongr
/-- **Riesz's theorem**: if a closed ball with center zero of positive radius is compact in a vector
space, then the space is finite-dimensional. -/
theorem finiteDimensional_of_isCompact_closedBall₀ {r : ℝ} (rpos : 0 < r)
    (h : IsCompact (Metric.closedBall (0 : E) r)) : FiniteDimensional 𝕜 E := by
  by_contra hfin
  obtain ⟨R, f, Rgt, fle, lef⟩ :
    ∃ (R : ℝ) (f : ℕ → E), 1 < R ∧ (∀ n, ‖f n‖ ≤ R) ∧ ∀ m n, m ≠ n → 1 ≤ ‖f m - f n‖ :=
    exists_seq_norm_le_one_le_norm_sub hfin
  have rRpos : 0 < r / R := div_pos rpos (zero_lt_one.trans Rgt)
  obtain ⟨c, hc⟩ : ∃ c : 𝕜, 0 < ‖c‖ ∧ ‖c‖ < r / R := NormedField.exists_norm_lt _ rRpos
  let g := fun n : ℕ => c • f n
  have A : ∀ n, g n ∈ Metric.closedBall (0 : E) r := by
    intro n
    simp only [norm_smul, dist_zero_right, Metric.mem_closedBall]
    calc
      ‖c‖ * ‖f n‖ ≤ r / R * R := by gcongr; exact hc.2.le; apply fle
      _ = r := by field_simp [(zero_lt_one.trans Rgt).ne']
  -- Porting note: moved type ascriptions because of exists_prop changes
  obtain ⟨x : E, _ : x ∈ Metric.closedBall (0 : E) r, φ : ℕ → ℕ, φmono : StrictMono φ,
    φlim : Tendsto (g ∘ φ) atTop (𝓝 x)⟩ := h.tendsto_subseq A
  have B : CauchySeq (g ∘ φ) := φlim.cauchySeq
  obtain ⟨N, hN⟩ : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖ :=
    Metric.cauchySeq_iff'.1 B ‖c‖ hc.1
  apply lt_irrefl ‖c‖
  calc
    ‖c‖ ≤ dist (g (φ (N + 1))) (g (φ N)) := by
      conv_lhs => rw [← mul_one ‖c‖]
      simp only [dist_eq_norm, ← smul_sub, norm_smul]
      gcongr
      

Proof state:
case h
𝕜 : 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 𝕜
r : ℝ
rpos : 0 < r
h : IsCompact (closedBall 0 r)
hfin : ¬FiniteDimensional 𝕜 E
R : ℝ
f : ℕ → E
Rgt : 1 < R
fle : ∀ (n : ℕ), ‖f n‖ ≤ R
lef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖
rRpos : 0 < r / R
c : 𝕜
hc : 0 < ‖c‖ ∧ ‖c‖ < r / R
g : ℕ → E := fun n => c • f n
A : ∀ (n : ℕ), g n ∈ closedBall 0 r
x : E
left✝ : x ∈ closedBall 0 r
φ : ℕ → ℕ
φmono : StrictMono φ
φlim : Tendsto (g ∘ φ) atTop (𝓝 x)
B : CauchySeq (g ∘ φ)
N : ℕ
hN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖
⊢ 1 ≤ ‖f (φ (N + 1)) - f (φ N)‖

Next tactic:
apply lef _ _ (ne_of_gt _)
/-- **Riesz's theorem**: if a closed ball with center zero of positive radius is compact in a vector
space, then the space is finite-dimensional. -/
theorem finiteDimensional_of_isCompact_closedBall₀ {r : ℝ} (rpos : 0 < r)
    (h : IsCompact (Metric.closedBall (0 : E) r)) : FiniteDimensional 𝕜 E := by
  by_contra hfin
  obtain ⟨R, f, Rgt, fle, lef⟩ :
    ∃ (R : ℝ) (f : ℕ → E), 1 < R ∧ (∀ n, ‖f n‖ ≤ R) ∧ ∀ m n, m ≠ n → 1 ≤ ‖f m - f n‖ :=
    exists_seq_norm_le_one_le_norm_sub hfin
  have rRpos : 0 < r / R := div_pos rpos (zero_lt_one.trans Rgt)
  obtain ⟨c, hc⟩ : ∃ c : 𝕜, 0 < ‖c‖ ∧ ‖c‖ < r / R := NormedField.exists_norm_lt _ rRpos
  let g := fun n : ℕ => c • f n
  have A : ∀ n, g n ∈ Metric.closedBall (0 : E) r := by
    intro n
    simp only [norm_smul, dist_zero_right, Metric.mem_closedBall]
    calc
      ‖c‖ * ‖f n‖ ≤ r / R * R := by gcongr; exact hc.2.le; apply fle
      _ = r := by field_simp [(zero_lt_one.trans Rgt).ne']
  -- Porting note: moved type ascriptions because of exists_prop changes
  obtain ⟨x : E, _ : x ∈ Metric.closedBall (0 : E) r, φ : ℕ → ℕ, φmono : StrictMono φ,
    φlim : Tendsto (g ∘ φ) atTop (𝓝 x)⟩ := h.tendsto_subseq A
  have B : CauchySeq (g ∘ φ) := φlim.cauchySeq
  obtain ⟨N, hN⟩ : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖ :=
    Metric.cauchySeq_iff'.1 B ‖c‖ hc.1
  apply lt_irrefl ‖c‖
  calc
    ‖c‖ ≤ dist (g (φ (N + 1))) (g (φ N)) := by
      conv_lhs => rw [← mul_one ‖c‖]
      simp only [dist_eq_norm, ← smul_sub, norm_smul]
      gcongr
      apply lef _ _ (ne_of_gt _)
      

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 𝕜
r : ℝ
rpos : 0 < r
h : IsCompact (closedBall 0 r)
hfin : ¬FiniteDimensional 𝕜 E
R : ℝ
f : ℕ → E
Rgt : 1 < R
fle : ∀ (n : ℕ), ‖f n‖ ≤ R
lef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖
rRpos : 0 < r / R
c : 𝕜
hc : 0 < ‖c‖ ∧ ‖c‖ < r / R
g : ℕ → E := fun n => c • f n
A : ∀ (n : ℕ), g n ∈ closedBall 0 r
x : E
left✝ : x ∈ closedBall 0 r
φ : ℕ → ℕ
φmono : StrictMono φ
φlim : Tendsto (g ∘ φ) atTop (𝓝 x)
B : CauchySeq (g ∘ φ)
N : ℕ
hN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖
⊢ φ N < φ (N + 1)

Next tactic:
exact φmono (Nat.lt_succ_self N)
/-- **Riesz's theorem**: if a closed ball of positive radius is compact in a vector space, then the
space is finite-dimensional. -/
theorem finiteDimensional_of_isCompact_closedBall {r : ℝ} (rpos : 0 < r) {c : E}
    (h : IsCompact (Metric.closedBall c r)) : FiniteDimensional 𝕜 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 𝕜
r : ℝ
rpos : 0 < r
c : E
h : IsCompact (closedBall c r)
⊢ FiniteDimensional 𝕜 E

Next tactic:
apply finiteDimensional_of_isCompact_closedBall₀ 𝕜 rpos
/-- **Riesz's theorem**: if a closed ball of positive radius is compact in a vector space, then the
space is finite-dimensional. -/
theorem finiteDimensional_of_isCompact_closedBall {r : ℝ} (rpos : 0 < r) {c : E}
    (h : IsCompact (Metric.closedBall c r)) : FiniteDimensional 𝕜 E := by
  apply finiteDimensional_of_isCompact_closedBall₀ 𝕜 rpos
  

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 𝕜
r : ℝ
rpos : 0 < r
c : E
h : IsCompact (closedBall c r)
⊢ IsCompact (closedBall 0 r)

Next tactic:
have : Continuous fun x => -c + x := continuous_const.add continuous_id
/-- **Riesz's theorem**: if a closed ball of positive radius is compact in a vector space, then the
space is finite-dimensional. -/
theorem finiteDimensional_of_isCompact_closedBall {r : ℝ} (rpos : 0 < r) {c : E}
    (h : IsCompact (Metric.closedBall c r)) : FiniteDimensional 𝕜 E := by
  apply finiteDimensional_of_isCompact_closedBall₀ 𝕜 rpos
  have : Continuous fun x => -c + x := continuous_const.add continuous_id
  

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 𝕜
r : ℝ
rpos : 0 < r
c : E
h : IsCompact (closedBall c r)
this : Continuous fun x => -c + x
⊢ IsCompact (closedBall 0 r)

Next tactic:
simpa using h.image this
/-- **Riesz's theorem**: a locally compact normed vector space is finite-dimensional. -/
theorem finiteDimensional_of_locallyCompactSpace [LocallyCompactSpace E] :
    FiniteDimensional 𝕜 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 𝕜
inst✝ : LocallyCompactSpace E
⊢ FiniteDimensional 𝕜 E

Next tactic:
rcases exists_isCompact_closedBall (0 : E) with ⟨r, rpos, hr⟩
/-- **Riesz's theorem**: a locally compact normed vector space is finite-dimensional. -/
theorem finiteDimensional_of_locallyCompactSpace [LocallyCompactSpace E] :
    FiniteDimensional 𝕜 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 𝕜
inst✝ : LocallyCompactSpace E
r : ℝ
rpos : 0 < r
hr : IsCompact (closedBall 0 r)
⊢ FiniteDimensional 𝕜 E

Next tactic:
exact finiteDimensional_of_isCompact_closedBall₀ 𝕜 rpos hr
/-- 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
  

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 𝕜
X : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : One X
inst✝ : T2Space X
f : E → X
hf : HasCompactMulSupport f
h'f : Continuous f
⊢ f = 1 ∨ FiniteDimensional 𝕜 E

Next tactic:
by_cases h : ∀ x, f x = 1
/-- 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
  · 

Proof state:
case pos
𝕜 : 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
h : ∀ (x : E), f x = 1
⊢ f = 1 ∨ FiniteDimensional 𝕜 E

Next tactic:
apply Or.inl
/-- 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
    

Proof state:
case pos.h
𝕜 : 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
h : ∀ (x : E), f x = 1
⊢ f = 1

Next tactic:
ext x
/-- 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
    

Proof state:
case pos.h.h
𝕜 : 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
h : ∀ (x : E), f x = 1
x : E
⊢ f x = OfNat.ofNat 1 x

Next tactic:
exact h x
/-- 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
  

Proof state:
case neg
𝕜 : 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
h : ¬∀ (x : E), f x = 1
⊢ f = 1 ∨ FiniteDimensional 𝕜 E

Next tactic:
apply Or.inr
/-- 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
  

Proof state:
case neg.h
𝕜 : 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
h : ¬∀ (x : E), f x = 1
⊢ FiniteDimensional 𝕜 E

Next tactic:
push_neg at h
/-- 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
  

Proof state:
case neg.h
𝕜 : 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
h : ∃ x, f x ≠ 1
⊢ FiniteDimensional 𝕜 E

Next tactic:
obtain ⟨x, hx⟩ : ∃ x, f x ≠ 1 := h
/-- 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
  

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
⊢ FiniteDimensional 𝕜 E

Next tactic:
have : Function.mulSupport f ∈ 𝓝 x := h'f.isOpen_mulSupport.mem_nhds hx