l3lab/ntp-mathlib huggingface dataset:
open Function in
/-- Given a finite-dimensional subspace `W` of a space `V` with separating dual, any
  linear functional on `W` extends to a continuous linear functional on `V`.
  This is stated more generally for an injective linear map from `W` to `V`. -/
theorem dualMap_surjective_iff {W} [AddCommGroup W] [Module R W] [FiniteDimensional R W]
    {f : W →ₗ[R] V} : Surjective (f.dualMap ∘ ContinuousLinearMap.toLinearMap) ↔ Injective f := by
  constructor <;> 

Proof state:
case mp
R : Type u_1
V : Type u_2
inst✝¹⁰ : Field R
inst✝⁹ : AddCommGroup V
inst✝⁸ : TopologicalSpace R
inst✝⁷ : TopologicalSpace V
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup V
inst✝⁴ : Module R V
inst✝³ : SeparatingDual R V
W : Type u_3
inst✝² : AddCommGroup W
inst✝¹ : Module R W
inst✝ : FiniteDimensional R W
f : W →ₗ[R] V
⊢ Surjective (⇑(LinearMap.dualMap f) ∘ ContinuousLinearMap.toLinearMap) → Injective ⇑f

Next tactic:
intro hf
open Function in
/-- Given a finite-dimensional subspace `W` of a space `V` with separating dual, any
  linear functional on `W` extends to a continuous linear functional on `V`.
  This is stated more generally for an injective linear map from `W` to `V`. -/
theorem dualMap_surjective_iff {W} [AddCommGroup W] [Module R W] [FiniteDimensional R W]
    {f : W →ₗ[R] V} : Surjective (f.dualMap ∘ ContinuousLinearMap.toLinearMap) ↔ Injective f := by
  constructor <;> 

Proof state:
case mpr
R : Type u_1
V : Type u_2
inst✝¹⁰ : Field R
inst✝⁹ : AddCommGroup V
inst✝⁸ : TopologicalSpace R
inst✝⁷ : TopologicalSpace V
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup V
inst✝⁴ : Module R V
inst✝³ : SeparatingDual R V
W : Type u_3
inst✝² : AddCommGroup W
inst✝¹ : Module R W
inst✝ : FiniteDimensional R W
f : W →ₗ[R] V
⊢ Injective ⇑f → Surjective (⇑(LinearMap.dualMap f) ∘ ContinuousLinearMap.toLinearMap)

Next tactic:
intro hf
open Function in
/-- Given a finite-dimensional subspace `W` of a space `V` with separating dual, any
  linear functional on `W` extends to a continuous linear functional on `V`.
  This is stated more generally for an injective linear map from `W` to `V`. -/
theorem dualMap_surjective_iff {W} [AddCommGroup W] [Module R W] [FiniteDimensional R W]
    {f : W →ₗ[R] V} : Surjective (f.dualMap ∘ ContinuousLinearMap.toLinearMap) ↔ Injective f := by
  constructor <;> intro hf
  · 

Proof state:
case mp
R : Type u_1
V : Type u_2
inst✝¹⁰ : Field R
inst✝⁹ : AddCommGroup V
inst✝⁸ : TopologicalSpace R
inst✝⁷ : TopologicalSpace V
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup V
inst✝⁴ : Module R V
inst✝³ : SeparatingDual R V
W : Type u_3
inst✝² : AddCommGroup W
inst✝¹ : Module R W
inst✝ : FiniteDimensional R W
f : W →ₗ[R] V
hf : Surjective (⇑(LinearMap.dualMap f) ∘ ContinuousLinearMap.toLinearMap)
⊢ Injective ⇑f

Next tactic:
exact LinearMap.dualMap_surjective_iff.mp hf.of_comp
open Function in
/-- Given a finite-dimensional subspace `W` of a space `V` with separating dual, any
  linear functional on `W` extends to a continuous linear functional on `V`.
  This is stated more generally for an injective linear map from `W` to `V`. -/
theorem dualMap_surjective_iff {W} [AddCommGroup W] [Module R W] [FiniteDimensional R W]
    {f : W →ₗ[R] V} : Surjective (f.dualMap ∘ ContinuousLinearMap.toLinearMap) ↔ Injective f := by
  constructor <;> intro hf
  · exact LinearMap.dualMap_surjective_iff.mp hf.of_comp
  

Proof state:
case mpr
R : Type u_1
V : Type u_2
inst✝¹⁰ : Field R
inst✝⁹ : AddCommGroup V
inst✝⁸ : TopologicalSpace R
inst✝⁷ : TopologicalSpace V
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup V
inst✝⁴ : Module R V
inst✝³ : SeparatingDual R V
W : Type u_3
inst✝² : AddCommGroup W
inst✝¹ : Module R W
inst✝ : FiniteDimensional R W
f : W →ₗ[R] V
hf : Injective ⇑f
⊢ Surjective (⇑(LinearMap.dualMap f) ∘ ContinuousLinearMap.toLinearMap)

Next tactic:
have := (separatingDual_iff_injective.mp ‹_›).comp hf
open Function in
/-- Given a finite-dimensional subspace `W` of a space `V` with separating dual, any
  linear functional on `W` extends to a continuous linear functional on `V`.
  This is stated more generally for an injective linear map from `W` to `V`. -/
theorem dualMap_surjective_iff {W} [AddCommGroup W] [Module R W] [FiniteDimensional R W]
    {f : W →ₗ[R] V} : Surjective (f.dualMap ∘ ContinuousLinearMap.toLinearMap) ↔ Injective f := by
  constructor <;> intro hf
  · exact LinearMap.dualMap_surjective_iff.mp hf.of_comp
  have := (separatingDual_iff_injective.mp ‹_›).comp hf
  

Proof state:
case mpr
R : Type u_1
V : Type u_2
inst✝¹⁰ : Field R
inst✝⁹ : AddCommGroup V
inst✝⁸ : TopologicalSpace R
inst✝⁷ : TopologicalSpace V
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup V
inst✝⁴ : Module R V
inst✝³ : SeparatingDual R V
W : Type u_3
inst✝² : AddCommGroup W
inst✝¹ : Module R W
inst✝ : FiniteDimensional R W
f : W →ₗ[R] V
hf : Injective ⇑f
this : Injective (⇑(LinearMap.flip (ContinuousLinearMap.coeLM R)) ∘ ⇑f)
⊢ Surjective (⇑(LinearMap.dualMap f) ∘ ContinuousLinearMap.toLinearMap)

Next tactic:
rw [← LinearMap.coe_comp] at this
open Function in
/-- Given a finite-dimensional subspace `W` of a space `V` with separating dual, any
  linear functional on `W` extends to a continuous linear functional on `V`.
  This is stated more generally for an injective linear map from `W` to `V`. -/
theorem dualMap_surjective_iff {W} [AddCommGroup W] [Module R W] [FiniteDimensional R W]
    {f : W →ₗ[R] V} : Surjective (f.dualMap ∘ ContinuousLinearMap.toLinearMap) ↔ Injective f := by
  constructor <;> intro hf
  · exact LinearMap.dualMap_surjective_iff.mp hf.of_comp
  have := (separatingDual_iff_injective.mp ‹_›).comp hf
  rw [← LinearMap.coe_comp] at this
  

Proof state:
case mpr
R : Type u_1
V : Type u_2
inst✝¹⁰ : Field R
inst✝⁹ : AddCommGroup V
inst✝⁸ : TopologicalSpace R
inst✝⁷ : TopologicalSpace V
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup V
inst✝⁴ : Module R V
inst✝³ : SeparatingDual R V
W : Type u_3
inst✝² : AddCommGroup W
inst✝¹ : Module R W
inst✝ : FiniteDimensional R W
f : W →ₗ[R] V
hf : Injective ⇑f
this : Injective ⇑(LinearMap.flip (ContinuousLinearMap.coeLM R) ∘ₗ f)
⊢ Surjective (⇑(LinearMap.dualMap f) ∘ ContinuousLinearMap.toLinearMap)

Next tactic:
exact LinearMap.flip_surjective_iff₁.mpr this
lemma exists_eq_one {x : V} (hx : x ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 := by
  

Proof state:
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x : V
hx : x ≠ 0
⊢ ∃ f, f x = 1

Next tactic:
rcases exists_ne_zero (R := R) hx with ⟨f, hf⟩
lemma exists_eq_one {x : V} (hx : x ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 := by
  rcases exists_ne_zero (R := R) hx with ⟨f, hf⟩
  

Proof state:
case intro
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x : V
hx : x ≠ 0
f : V →L[R] R
hf : f x ≠ 0
⊢ ∃ f, f x = 1

Next tactic:
exact ⟨(f x)⁻¹ • f, inv_mul_cancel hf⟩
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  

Proof state:
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ ∃ f, f x = 1 ∧ f y ≠ 0

Next tactic:
obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  

Proof state:
case intro
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
⊢ ∃ f, f x = 1 ∧ f y ≠ 0

Next tactic:
rcases ne_or_eq (u y) 0 with uy|uy
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  rcases ne_or_eq (u y) 0 with uy|uy
  · 

Proof state:
case intro.inl
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
uy : u y ≠ 0
⊢ ∃ f, f x = 1 ∧ f y ≠ 0

Next tactic:
exact ⟨u, ux, uy⟩
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  rcases ne_or_eq (u y) 0 with uy|uy
  · exact ⟨u, ux, uy⟩
  

Proof state:
case intro.inr
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
uy : u y = 0
⊢ ∃ f, f x = 1 ∧ f y ≠ 0

Next tactic:
obtain ⟨v, vy⟩ : ∃ v : V →L[R] R, v y = 1 := exists_eq_one hy
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  rcases ne_or_eq (u y) 0 with uy|uy
  · exact ⟨u, ux, uy⟩
  obtain ⟨v, vy⟩ : ∃ v : V →L[R] R, v y = 1 := exists_eq_one hy
  

Proof state:
case intro.inr.intro
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
uy : u y = 0
v : V →L[R] R
vy : v y = 1
⊢ ∃ f, f x = 1 ∧ f y ≠ 0

Next tactic:
rcases ne_or_eq (v x) 0 with vx|vx
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  rcases ne_or_eq (u y) 0 with uy|uy
  · exact ⟨u, ux, uy⟩
  obtain ⟨v, vy⟩ : ∃ v : V →L[R] R, v y = 1 := exists_eq_one hy
  rcases ne_or_eq (v x) 0 with vx|vx
  · 

Proof state:
case intro.inr.intro.inl
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
uy : u y = 0
v : V →L[R] R
vy : v y = 1
vx : v x ≠ 0
⊢ ∃ f, f x = 1 ∧ f y ≠ 0

Next tactic:
exact ⟨(v x)⁻¹ • v, inv_mul_cancel vx, show (v x)⁻¹ * v y ≠ 0 by simp [vx, vy]⟩
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  rcases ne_or_eq (u y) 0 with uy|uy
  · exact ⟨u, ux, uy⟩
  obtain ⟨v, vy⟩ : ∃ v : V →L[R] R, v y = 1 := exists_eq_one hy
  rcases ne_or_eq (v x) 0 with vx|vx
  · exact ⟨(v x)⁻¹ • v, inv_mul_cancel vx, show (v x)⁻¹ * v y ≠ 0 by 

Proof state:
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
uy : u y = 0
v : V →L[R] R
vy : v y = 1
vx : v x ≠ 0
⊢ (v x)⁻¹ * v y ≠ 0

Next tactic:
simp [vx, vy]
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  rcases ne_or_eq (u y) 0 with uy|uy
  · exact ⟨u, ux, uy⟩
  obtain ⟨v, vy⟩ : ∃ v : V →L[R] R, v y = 1 := exists_eq_one hy
  rcases ne_or_eq (v x) 0 with vx|vx
  · exact ⟨(v x)⁻¹ • v, inv_mul_cancel vx, show (v x)⁻¹ * v y ≠ 0 by simp [vx, vy]⟩
  · 

Proof state:
case intro.inr.intro.inr
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
uy : u y = 0
v : V →L[R] R
vy : v y = 1
vx : v x = 0
⊢ ∃ f, f x = 1 ∧ f y ≠ 0

Next tactic:
exact ⟨u + v, by simp [ux, vx], by simp [uy, vy]⟩
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  rcases ne_or_eq (u y) 0 with uy|uy
  · exact ⟨u, ux, uy⟩
  obtain ⟨v, vy⟩ : ∃ v : V →L[R] R, v y = 1 := exists_eq_one hy
  rcases ne_or_eq (v x) 0 with vx|vx
  · exact ⟨(v x)⁻¹ • v, inv_mul_cancel vx, show (v x)⁻¹ * v y ≠ 0 by simp [vx, vy]⟩
  · exact ⟨u + v, by 

Proof state:
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
uy : u y = 0
v : V →L[R] R
vy : v y = 1
vx : v x = 0
⊢ (u + v) x = 1

Next tactic:
simp [ux, vx]
theorem exists_eq_one_ne_zero_of_ne_zero_pair {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ f : V →L[R] R, f x = 1 ∧ f y ≠ 0 := by
  obtain ⟨u, ux⟩ : ∃ u : V →L[R] R, u x = 1 := exists_eq_one hx
  rcases ne_or_eq (u y) 0 with uy|uy
  · exact ⟨u, ux, uy⟩
  obtain ⟨v, vy⟩ : ∃ v : V →L[R] R, v y = 1 := exists_eq_one hy
  rcases ne_or_eq (v x) 0 with vx|vx
  · exact ⟨(v x)⁻¹ • v, inv_mul_cancel vx, show (v x)⁻¹ * v y ≠ 0 by simp [vx, vy]⟩
  · exact ⟨u + v, by simp [ux, vx], by 

Proof state:
R : Type u_1
V : Type u_2
inst✝⁷ : Field R
inst✝⁶ : AddCommGroup V
inst✝⁵ : TopologicalSpace R
inst✝⁴ : TopologicalSpace V
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup V
inst✝¹ : Module R V
inst✝ : SeparatingDual R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
u : V →L[R] R
ux : u x = 1
uy : u y = 0
v : V →L[R] R
vy : v y = 1
vx : v x = 0
⊢ (u + v) y ≠ 0

Next tactic:
simp [uy, vy]
/-- In a topological vector space with separating dual, the group of continuous linear equivalences
acts transitively on the set of nonzero vectors: given two nonzero vectors `x` and `y`, there
exists `A : V ≃L[R] V` mapping `x` to `y`. -/
theorem exists_continuousLinearEquiv_apply_eq [ContinuousSMul R V]
    {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ A : V ≃L[R] V, A x = y := by
  

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : TopologicalRing R
inst✝³ : TopologicalAddGroup V
inst✝² : Module R V
inst✝¹ : SeparatingDual R V
inst✝ : ContinuousSMul R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ ∃ A, A x = y

Next tactic:
obtain ⟨G, Gx, Gy⟩ : ∃ G : V →L[R] R, G x = 1 ∧ G y ≠ 0 :=
    exists_eq_one_ne_zero_of_ne_zero_pair hx hy
/-- In a topological vector space with separating dual, the group of continuous linear equivalences
acts transitively on the set of nonzero vectors: given two nonzero vectors `x` and `y`, there
exists `A : V ≃L[R] V` mapping `x` to `y`. -/
theorem exists_continuousLinearEquiv_apply_eq [ContinuousSMul R V]
    {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ A : V ≃L[R] V, A x = y := by
  obtain ⟨G, Gx, Gy⟩ : ∃ G : V →L[R] R, G x = 1 ∧ G y ≠ 0 :=
    exists_eq_one_ne_zero_of_ne_zero_pair hx hy
  

Proof state:
case intro.intro
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : TopologicalRing R
inst✝³ : TopologicalAddGroup V
inst✝² : Module R V
inst✝¹ : SeparatingDual R V
inst✝ : ContinuousSMul R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
G : V →L[R] R
Gx : G x = 1
Gy : G y ≠ 0
⊢ ∃ A, A x = y

Next tactic:
let A : V ≃L[R] V :=
  { toFun := fun z ↦ z + G z • (y - x)
    invFun := fun z ↦ z + ((G y) ⁻¹ * G z) • (x - y)
    map_add' := fun a b ↦ by simp [add_smul]; abel
    map_smul' := by simp [smul_smul]
    left_inv := fun z ↦ by
      simp only [id_eq, eq_mpr_eq_cast, RingHom.id_apply, smul_eq_mul, AddHom.toFun_eq_coe,
        AddHom.coe_mk, map_add, map_smulₛₗ, map_sub, Gx, mul_sub, mul_one, add_sub_cancel'_right]
      rw [mul_comm (G z), ← mul_assoc, inv_mul_cancel Gy]
      simp only [smul_sub, one_mul]
      abel
    right_inv := fun z ↦ by
      simp only [map_add, map_smulₛₗ, map_mul, map_inv₀, RingHom.id_apply, map_sub, Gx,
        smul_eq_mul, mul_sub, mul_one]
      rw [mul_comm _ (G y), ← mul_assoc, mul_inv_cancel Gy]
      simp only [smul_sub, one_mul, add_sub_cancel'_right]
      abel
    continuous_toFun := continuous_id.add (G.continuous.smul continuous_const)
    continuous_invFun :=
      continuous_id.add ((continuous_const.mul G.continuous).smul continuous_const) }
/-- In a topological vector space with separating dual, the group of continuous linear equivalences
acts transitively on the set of nonzero vectors: given two nonzero vectors `x` and `y`, there
exists `A : V ≃L[R] V` mapping `x` to `y`. -/
theorem exists_continuousLinearEquiv_apply_eq [ContinuousSMul R V]
    {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ A : V ≃L[R] V, A x = y := by
  obtain ⟨G, Gx, Gy⟩ : ∃ G : V →L[R] R, G x = 1 ∧ G y ≠ 0 :=
    exists_eq_one_ne_zero_of_ne_zero_pair hx hy
  let A : V ≃L[R] V :=
  { toFun := fun z ↦ z + G z • (y - x)
    invFun := fun z ↦ z + ((G y) ⁻¹ * G z) • (x - y)
    map_add' := fun a b ↦ by 

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : TopologicalRing R
inst✝³ : TopologicalAddGroup V
inst✝² : Module R V
inst✝¹ : SeparatingDual R V
inst✝ : ContinuousSMul R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
G : V →L[R] R
Gx : G x = 1
Gy : G y ≠ 0
a b : V
⊢ (fun z => z + G z • (y - x)) (a + b) = (fun z => z + G z • (y - x)) a + (fun z => z + G z • (y - x)) b

Next tactic:
simp [add_smul]
/-- In a topological vector space with separating dual, the group of continuous linear equivalences
acts transitively on the set of nonzero vectors: given two nonzero vectors `x` and `y`, there
exists `A : V ≃L[R] V` mapping `x` to `y`. -/
theorem exists_continuousLinearEquiv_apply_eq [ContinuousSMul R V]
    {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ A : V ≃L[R] V, A x = y := by
  obtain ⟨G, Gx, Gy⟩ : ∃ G : V →L[R] R, G x = 1 ∧ G y ≠ 0 :=
    exists_eq_one_ne_zero_of_ne_zero_pair hx hy
  let A : V ≃L[R] V :=
  { toFun := fun z ↦ z + G z • (y - x)
    invFun := fun z ↦ z + ((G y) ⁻¹ * G z) • (x - y)
    map_add' := fun a b ↦ by simp [add_smul]; 

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : TopologicalRing R
inst✝³ : TopologicalAddGroup V
inst✝² : Module R V
inst✝¹ : SeparatingDual R V
inst✝ : ContinuousSMul R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
G : V →L[R] R
Gx : G x = 1
Gy : G y ≠ 0
a b : V
⊢ a + b + (G a • (y - x) + G b • (y - x)) = a + G a • (y - x) + (b + G b • (y - x))

Next tactic:
abel
/-- In a topological vector space with separating dual, the group of continuous linear equivalences
acts transitively on the set of nonzero vectors: given two nonzero vectors `x` and `y`, there
exists `A : V ≃L[R] V` mapping `x` to `y`. -/
theorem exists_continuousLinearEquiv_apply_eq [ContinuousSMul R V]
    {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ A : V ≃L[R] V, A x = y := by
  obtain ⟨G, Gx, Gy⟩ : ∃ G : V →L[R] R, G x = 1 ∧ G y ≠ 0 :=
    exists_eq_one_ne_zero_of_ne_zero_pair hx hy
  let A : V ≃L[R] V :=
  { toFun := fun z ↦ z + G z • (y - x)
    invFun := fun z ↦ z + ((G y) ⁻¹ * G z) • (x - y)
    map_add' := fun a b ↦ by simp [add_smul]; abel
    map_smul' := by 

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : TopologicalRing R
inst✝³ : TopologicalAddGroup V
inst✝² : Module R V
inst✝¹ : SeparatingDual R V
inst✝ : ContinuousSMul R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
G : V →L[R] R
Gx : G x = 1
Gy : G y ≠ 0
⊢ ∀ (r : R) (x_1 : V),
    AddHom.toFun
        { toFun := fun z => z + G z • (y - x),
          map_add' :=
            (_ :
              ∀ (a b : V),
                (fun z => z + G z • (y - x)) (a + b) =
                  (fun z => z + G z • (y - x)) a + (fun z => z + G z • (y - x)) b) }
        (r • x_1) =
      (RingHom.id R) r •
        AddHom.toFun
          { toFun := fun z => z + G z • (y - x),
            map_add' :=
              (_ :
                ∀ (a b : V),
                  (fun z => z + G z • (y - x)) (a + b) =
                    (fun z => z + G z • (y - x)) a + (fun z => z + G z • (y - x)) b) }
          x_1

Next tactic:
simp [smul_smul]
/-- In a topological vector space with separating dual, the group of continuous linear equivalences
acts transitively on the set of nonzero vectors: given two nonzero vectors `x` and `y`, there
exists `A : V ≃L[R] V` mapping `x` to `y`. -/
theorem exists_continuousLinearEquiv_apply_eq [ContinuousSMul R V]
    {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ A : V ≃L[R] V, A x = y := by
  obtain ⟨G, Gx, Gy⟩ : ∃ G : V →L[R] R, G x = 1 ∧ G y ≠ 0 :=
    exists_eq_one_ne_zero_of_ne_zero_pair hx hy
  let A : V ≃L[R] V :=
  { toFun := fun z ↦ z + G z • (y - x)
    invFun := fun z ↦ z + ((G y) ⁻¹ * G z) • (x - y)
    map_add' := fun a b ↦ by simp [add_smul]; abel
    map_smul' := by simp [smul_smul]
    left_inv := fun z ↦ by
      

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : TopologicalRing R
inst✝³ : TopologicalAddGroup V
inst✝² : Module R V
inst✝¹ : SeparatingDual R V
inst✝ : ContinuousSMul R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
G : V →L[R] R
Gx : G x = 1
Gy : G y ≠ 0
z : V
⊢ (fun z => z + ((G y)⁻¹ * G z) • (x - y))
      (AddHom.toFun
        {
            toAddHom :=
              { toFun := fun z => z + G z • (y - x),
                map_add' :=
                  (_ :
                    ∀ (a b : V),
                      (fun z => z + G z • (y - x)) (a + b) =
                        (fun z => z + G z • (y - x)) a + (fun z => z + G z • (y - x)) b) },
            map_smul' :=
              (_ : ∀ (a : R) (a_1 : V), a • a_1 + G (a • a_1) • (y - x) = a • (a_1 + G a_1 • (y - x))) }.toAddHom
        z) =
    z

Next tactic:
simp only [id_eq, eq_mpr_eq_cast, RingHom.id_apply, smul_eq_mul, AddHom.toFun_eq_coe,
        AddHom.coe_mk, map_add, map_smulₛₗ, map_sub, Gx, mul_sub, mul_one, add_sub_cancel'_right]
/-- In a topological vector space with separating dual, the group of continuous linear equivalences
acts transitively on the set of nonzero vectors: given two nonzero vectors `x` and `y`, there
exists `A : V ≃L[R] V` mapping `x` to `y`. -/
theorem exists_continuousLinearEquiv_apply_eq [ContinuousSMul R V]
    {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ A : V ≃L[R] V, A x = y := by
  obtain ⟨G, Gx, Gy⟩ : ∃ G : V →L[R] R, G x = 1 ∧ G y ≠ 0 :=
    exists_eq_one_ne_zero_of_ne_zero_pair hx hy
  let A : V ≃L[R] V :=
  { toFun := fun z ↦ z + G z • (y - x)
    invFun := fun z ↦ z + ((G y) ⁻¹ * G z) • (x - y)
    map_add' := fun a b ↦ by simp [add_smul]; abel
    map_smul' := by simp [smul_smul]
    left_inv := fun z ↦ by
      simp only [id_eq, eq_mpr_eq_cast, RingHom.id_apply, smul_eq_mul, AddHom.toFun_eq_coe,
        AddHom.coe_mk, map_add, map_smulₛₗ, map_sub, Gx, mul_sub, mul_one, add_sub_cancel'_right]
      

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : TopologicalRing R
inst✝³ : TopologicalAddGroup V
inst✝² : Module R V
inst✝¹ : SeparatingDual R V
inst✝ : ContinuousSMul R V
x y : V
hx : x ≠ 0
hy : y ≠ 0
G : V →L[R] R
Gx : G x = 1
Gy : G y ≠ 0
z : V
⊢ z + G z • (y - x) + ((G y)⁻¹ * (G z * G y)) • (x - y) = z

Next tactic:
rw [mul_comm (G z), ← mul_assoc, inv_mul_cancel Gy]