l3lab/ntp-mathlib huggingface dataset:
/-- `inv' 1` has exactly the same moves as `1`. -/
def inv'One : inv' 1 ≡r (1 : PGame.{u}) := by
  change Relabelling (mk _ _ _ _) 1
  have : IsEmpty { _i : PUnit.{u + 1} // (0 : PGame.{u}) < 0 } := by
    rw [lt_self_iff_false]
    infer_instance
  refine' ⟨_, _, fun i => _, IsEmpty.elim _⟩ <;> dsimp
  · apply Equiv.equivPUnit
  · apply Equiv.equivOfIsEmpty
  · -- Porting note: had to add `rfl`, because `simp` only uses the built-in `rfl`.
    simp; rfl
  · 

Proof state:
case refine'_4
this : IsEmpty { _i // 0 < 0 }
⊢ IsEmpty (InvTy { i // 0 < 0 } PEmpty.{u + 1} true)

Next tactic:
infer_instance
/-- The inverse of a pre-game in terms of the inverse on positive pre-games. -/
noncomputable instance : Inv PGame :=
  ⟨by 

Proof state:
⊢ PGame → PGame

Next tactic:
classical exact fun x => if x ≈ 0 then 0 else if 0 < x then inv' x else -inv' (-x)
/-- The inverse of a pre-game in terms of the inverse on positive pre-games. -/
noncomputable instance : Inv PGame :=
  ⟨by classical 

Proof state:
⊢ PGame → PGame

Next tactic:
exact fun x => if x ≈ 0 then 0 else if 0 < x then inv' x else -inv' (-x)
theorem inv_eq_of_equiv_zero {x : PGame} (h : x ≈ 0) : x⁻¹ = 0 := by 

Proof state:
x : PGame
h : x ≈ 0
⊢ x⁻¹ = 0

Next tactic:
classical exact if_pos h
theorem inv_eq_of_equiv_zero {x : PGame} (h : x ≈ 0) : x⁻¹ = 0 := by classical 

Proof state:
x : PGame
h : x ≈ 0
⊢ x⁻¹ = 0

Next tactic:
exact if_pos h
theorem inv_eq_of_pos {x : PGame} (h : 0 < x) : x⁻¹ = inv' x := by
  

Proof state:
x : PGame
h : 0 < x
⊢ x⁻¹ = inv' x

Next tactic:
classical exact (if_neg h.lf.not_equiv').trans (if_pos h)
theorem inv_eq_of_pos {x : PGame} (h : 0 < x) : x⁻¹ = inv' x := by
  classical 

Proof state:
x : PGame
h : 0 < x
⊢ x⁻¹ = inv' x

Next tactic:
exact (if_neg h.lf.not_equiv').trans (if_pos h)
theorem inv_eq_of_lf_zero {x : PGame} (h : x ⧏ 0) : x⁻¹ = -inv' (-x) := by
  

Proof state:
x : PGame
h : x ⧏ 0
⊢ x⁻¹ = -inv' (-x)

Next tactic:
classical exact (if_neg h.not_equiv).trans (if_neg h.not_gt)
theorem inv_eq_of_lf_zero {x : PGame} (h : x ⧏ 0) : x⁻¹ = -inv' (-x) := by
  classical 

Proof state:
x : PGame
h : x ⧏ 0
⊢ x⁻¹ = -inv' (-x)

Next tactic:
exact (if_neg h.not_equiv).trans (if_neg h.not_gt)
/-- `1⁻¹` has exactly the same moves as `1`. -/
def invOne : 1⁻¹ ≡r 1 := by
  

Proof state:
⊢ 1⁻¹ ≡r 1

Next tactic:
rw [inv_eq_of_pos PGame.zero_lt_one]
/-- `1⁻¹` has exactly the same moves as `1`. -/
def invOne : 1⁻¹ ≡r 1 := by
  rw [inv_eq_of_pos PGame.zero_lt_one]
  

Proof state:
⊢ inv' 1 ≡r 1

Next tactic:
exact inv'One
theorem IsSymmetric.conj_inner_sym {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) (x y : E) :
    conj ⟪T x, y⟫ = ⟪T y, x⟫ := by 

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T : E →ₗ[𝕜] E
hT : IsSymmetric T
x y : E
⊢ (starRingEnd 𝕜) (inner (T x) y) = inner (T y) x

Next tactic:
rw [hT x y, inner_conj_symm]
theorem IsSymmetric.add {T S : E →ₗ[𝕜] E} (hT : T.IsSymmetric) (hS : S.IsSymmetric) :
    (T + S).IsSymmetric := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T S : E →ₗ[𝕜] E
hT : IsSymmetric T
hS : IsSymmetric S
⊢ IsSymmetric (T + S)

Next tactic:
intro x y
theorem IsSymmetric.add {T S : E →ₗ[𝕜] E} (hT : T.IsSymmetric) (hS : S.IsSymmetric) :
    (T + S).IsSymmetric := by
  intro x y
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T S : E →ₗ[𝕜] E
hT : IsSymmetric T
hS : IsSymmetric S
x y : E
⊢ inner ((T + S) x) y = inner x ((T + S) y)

Next tactic:
rw [LinearMap.add_apply, inner_add_left, hT x y, hS x y, ← inner_add_right]
theorem IsSymmetric.add {T S : E →ₗ[𝕜] E} (hT : T.IsSymmetric) (hS : S.IsSymmetric) :
    (T + S).IsSymmetric := by
  intro x y
  rw [LinearMap.add_apply, inner_add_left, hT x y, hS x y, ← inner_add_right]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T S : E →ₗ[𝕜] E
hT : IsSymmetric T
hS : IsSymmetric S
x y : E
⊢ inner x (T y + S y) = inner x ((T + S) y)

Next tactic:
rfl
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
⊢ Continuous ⇑T

Next tactic:
refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
⊢ y = T x

Next tactic:
rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
⊢ inner (y - T x) (y - T x) = 0

Next tactic:
have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    intro k
    rw [← T.map_sub, hT]
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
⊢ ∀ (k : ℕ), inner (T (u k) - T x) (y - T x) = inner (u k - x) (T (y - T x))

Next tactic:
intro k
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    intro k
    

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
k : ℕ
⊢ inner (T (u k) - T x) (y - T x) = inner (u k - x) (T (y - T x))

Next tactic:
rw [← T.map_sub, hT]
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    intro k
    rw [← T.map_sub, hT]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
hlhs : ∀ (k : ℕ), inner (T (u k) - T x) (y - T x) = inner (u k - x) (T (y - T x))
⊢ inner (y - T x) (y - T x) = 0

Next tactic:
refine' tendsto_nhds_unique ((hTu.sub_const _).inner tendsto_const_nhds) _
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    intro k
    rw [← T.map_sub, hT]
  refine' tendsto_nhds_unique ((hTu.sub_const _).inner tendsto_const_nhds) _
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
hlhs : ∀ (k : ℕ), inner (T (u k) - T x) (y - T x) = inner (u k - x) (T (y - T x))
⊢ Filter.Tendsto (fun t => inner ((⇑T ∘ u) t - T x) (y - T x)) Filter.atTop (nhds 0)

Next tactic:
simp_rw [Function.comp_apply, hlhs]
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    intro k
    rw [← T.map_sub, hT]
  refine' tendsto_nhds_unique ((hTu.sub_const _).inner tendsto_const_nhds) _
  simp_rw [Function.comp_apply, hlhs]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
hlhs : ∀ (k : ℕ), inner (T (u k) - T x) (y - T x) = inner (u k - x) (T (y - T x))
⊢ Filter.Tendsto (fun t => inner (u t - x) (T (y - T x))) Filter.atTop (nhds 0)

Next tactic:
rw [← inner_zero_left (T (y - T x))]
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    intro k
    rw [← T.map_sub, hT]
  refine' tendsto_nhds_unique ((hTu.sub_const _).inner tendsto_const_nhds) _
  simp_rw [Function.comp_apply, hlhs]
  rw [← inner_zero_left (T (y - T x))]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
hlhs : ∀ (k : ℕ), inner (T (u k) - T x) (y - T x) = inner (u k - x) (T (y - T x))
⊢ Filter.Tendsto (fun t => inner (u t - x) (T (y - T x))) Filter.atTop (nhds (inner 0 (T (y - T x))))

Next tactic:
refine' Filter.Tendsto.inner _ tendsto_const_nhds
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    intro k
    rw [← T.map_sub, hT]
  refine' tendsto_nhds_unique ((hTu.sub_const _).inner tendsto_const_nhds) _
  simp_rw [Function.comp_apply, hlhs]
  rw [← inner_zero_left (T (y - T x))]
  refine' Filter.Tendsto.inner _ tendsto_const_nhds
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
hlhs : ∀ (k : ℕ), inner (T (u k) - T x) (y - T x) = inner (u k - x) (T (y - T x))
⊢ Filter.Tendsto (fun t => u t - x) Filter.atTop (nhds 0)

Next tactic:
rw [← sub_self x]
/-- The **Hellinger--Toeplitz theorem**: if a symmetric operator is defined on a complete space,
  then it is automatically continuous. -/
theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
    Continuous T := by
  -- We prove it by using the closed graph theorem
  refine' T.continuous_of_seq_closed_graph fun u x y hu hTu => _
  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
  have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
    intro k
    rw [← T.map_sub, hT]
  refine' tendsto_nhds_unique ((hTu.sub_const _).inner tendsto_const_nhds) _
  simp_rw [Function.comp_apply, hlhs]
  rw [← inner_zero_left (T (y - T x))]
  refine' Filter.Tendsto.inner _ tendsto_const_nhds
  rw [← sub_self x]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : NormedAddCommGroup G
inst✝³ : InnerProductSpace 𝕜 G
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℝ E'
inst✝ : CompleteSpace E
T : E →ₗ[𝕜] E
hT : IsSymmetric T
u : ℕ → E
x y : E
hu : Filter.Tendsto u Filter.atTop (nhds x)
hTu : Filter.Tendsto (⇑T ∘ u) Filter.atTop (nhds y)
hlhs : ∀ (k : ℕ), inner (T (u k) - T x) (y - T x) = inner (u k - x) (T (y - T x))
⊢ Filter.Tendsto (fun t => u t - x) Filter.atTop (nhds (x - x))

Next tactic:
exact hu.sub_const _
/-- For a symmetric operator `T`, the function `fun x ↦ ⟪T x, x⟫` is real-valued. -/
@[simp]
theorem IsSymmetric.coe_reApplyInnerSelf_apply {T : E →L[𝕜] E} (hT : IsSymmetric (T : E →ₗ[𝕜] E))
    (x : E) : (T.reApplyInnerSelf x : 𝕜) = ⟪T x, x⟫ := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T : E →L[𝕜] E
hT : IsSymmetric ↑T
x : E
⊢ ↑(ContinuousLinearMap.reApplyInnerSelf T x) = inner (T x) x

Next tactic:
rsuffices ⟨r, hr⟩ : ∃ r : ℝ, ⟪T x, x⟫ = r
/-- For a symmetric operator `T`, the function `fun x ↦ ⟪T x, x⟫` is real-valued. -/
@[simp]
theorem IsSymmetric.coe_reApplyInnerSelf_apply {T : E →L[𝕜] E} (hT : IsSymmetric (T : E →ₗ[𝕜] E))
    (x : E) : (T.reApplyInnerSelf x : 𝕜) = ⟪T x, x⟫ := by
  rsuffices ⟨r, hr⟩ : ∃ r : ℝ, ⟪T x, x⟫ = r
  · 

Proof state:
case intro
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T : E →L[𝕜] E
hT : IsSymmetric ↑T
x : E
r : ℝ
hr : inner (T x) x = ↑r
⊢ ↑(ContinuousLinearMap.reApplyInnerSelf T x) = inner (T x) x

Next tactic:
simp [hr, T.reApplyInnerSelf_apply]
/-- For a symmetric operator `T`, the function `fun x ↦ ⟪T x, x⟫` is real-valued. -/
@[simp]
theorem IsSymmetric.coe_reApplyInnerSelf_apply {T : E →L[𝕜] E} (hT : IsSymmetric (T : E →ₗ[𝕜] E))
    (x : E) : (T.reApplyInnerSelf x : 𝕜) = ⟪T x, x⟫ := by
  rsuffices ⟨r, hr⟩ : ∃ r : ℝ, ⟪T x, x⟫ = r
  · simp [hr, T.reApplyInnerSelf_apply]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T : E →L[𝕜] E
hT : IsSymmetric ↑T
x : E
⊢ ∃ r, inner (T x) x = ↑r

Next tactic:
rw [← conj_eq_iff_real]
/-- For a symmetric operator `T`, the function `fun x ↦ ⟪T x, x⟫` is real-valued. -/
@[simp]
theorem IsSymmetric.coe_reApplyInnerSelf_apply {T : E →L[𝕜] E} (hT : IsSymmetric (T : E →ₗ[𝕜] E))
    (x : E) : (T.reApplyInnerSelf x : 𝕜) = ⟪T x, x⟫ := by
  rsuffices ⟨r, hr⟩ : ∃ r : ℝ, ⟪T x, x⟫ = r
  · simp [hr, T.reApplyInnerSelf_apply]
  rw [← conj_eq_iff_real]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T : E →L[𝕜] E
hT : IsSymmetric ↑T
x : E
⊢ (starRingEnd 𝕜) (inner (T x) x) = inner (T x) x

Next tactic:
exact hT.conj_inner_sym x x
theorem IsSymmetric.restrictScalars {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) :
    @LinearMap.IsSymmetric ℝ E _ _ (InnerProductSpace.isROrCToReal 𝕜 E)
      (@LinearMap.restrictScalars ℝ 𝕜 _ _ _ _ _ _ (InnerProductSpace.isROrCToReal 𝕜 E).toModule
        (InnerProductSpace.isROrCToReal 𝕜 E).toModule _ _ _ T) :=
  fun x y => by 

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝⁸ : IsROrC 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 F
inst✝³ : NormedAddCommGroup G
inst✝² : InnerProductSpace 𝕜 G
inst✝¹ : NormedAddCommGroup E'
inst✝ : InnerProductSpace ℝ E'
T : E →ₗ[𝕜] E
hT : IsSymmetric T
x y : E
⊢ inner ((↑ℝ T) x) y = inner x ((↑ℝ T) y)

Next tactic:
simp [hT x y, real_inner_eq_re_inner, LinearMap.coe_restrictScalars ℝ]
/-- A linear operator on a complex inner product space is symmetric precisely when
`⟪T v, v⟫_ℂ` is real for all v.-/
theorem isSymmetric_iff_inner_map_self_real (T : V →ₗ[ℂ] V) :
    IsSymmetric T ↔ ∀ v : V, conj ⟪T v, v⟫_ℂ = ⟪T v, v⟫_ℂ := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝¹⁰ : IsROrC 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : InnerProductSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup G
inst✝⁴ : InnerProductSpace 𝕜 G
inst✝³ : NormedAddCommGroup E'
inst✝² : InnerProductSpace ℝ E'
V : Type u_6
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℂ V
T : V →ₗ[ℂ] V
⊢ IsSymmetric T ↔ ∀ (v : V), (starRingEnd ℂ) (inner (T v) v) = inner (T v) v

Next tactic:
constructor
/-- A linear operator on a complex inner product space is symmetric precisely when
`⟪T v, v⟫_ℂ` is real for all v.-/
theorem isSymmetric_iff_inner_map_self_real (T : V →ₗ[ℂ] V) :
    IsSymmetric T ↔ ∀ v : V, conj ⟪T v, v⟫_ℂ = ⟪T v, v⟫_ℂ := by
  constructor
  · 

Proof state:
case mp
𝕜 : Type u_1
E : Type u_2
E' : Type u_3
F : Type u_4
G : Type u_5
inst✝¹⁰ : IsROrC 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : InnerProductSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup G
inst✝⁴ : InnerProductSpace 𝕜 G
inst✝³ : NormedAddCommGroup E'
inst✝² : InnerProductSpace ℝ E'
V : Type u_6
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℂ V
T : V →ₗ[ℂ] V
⊢ IsSymmetric T → ∀ (v : V), (starRingEnd ℂ) (inner (T v) v) = inner (T v) v

Next tactic:
intro hT v