-- Mathlib/Analysis/NormedSpace/HahnBanach/SeparatingDual.lean
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

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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

Tactic:
simp [add_smul]

Result:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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))

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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
⊢ ∀ (m : R) (x_1 : V),
    { toFun := fun z => z + G z • (y - x), map_add' := ⋯ }.toFun (m • x_1) =
      (RingHom.id R) m • { toFun := fun z => z + G z • (y - x), map_add' := ⋯ }.toFun x_1

Tactic:
simp [smul_smul]

Result:
no goals

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✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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 : V ≃L[R] V :=
  { toFun := fun z => z + G z • (y - x), map_add' := ⋯, map_smul' := ⋯,
    invFun := fun z => z + ((G y)⁻¹ * G z) • (x - y), left_inv := ⋯, right_inv := ⋯, continuous_toFun := ⋯,
    continuous_invFun := ⋯ }
⊢ ∃ A, A x = y

Tactic:
exact ⟨A, show x + G x • (y - x) = y by simp [Gx]⟩

Result:
no goals

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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))
      ({ toFun := fun z => z + G z • (y - x), map_add' := ⋯, map_smul' := ⋯ }.toFun z) =
    z

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]

Result:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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 y)⁻¹ * G z) • (x - y) + (G z + ((G y)⁻¹ * G z - (G y)⁻¹ * G z * G y)) • (y - x) = z

Tactic:
rw [mul_comm _ (G y), ← mul_assoc, mul_inv_cancel₀ Gy]

Result:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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 y)⁻¹ * G z) • (x - y) + (G z + ((G y)⁻¹ * G z - 1 * G z)) • (y - x) = z

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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))

Tactic:
abel

Result:
no goals

Proof state:
R : Type u_1
V : Type u_2
inst✝⁸ : Field R
inst✝⁷ : AddCommGroup V
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace V
inst✝⁴ : IsTopologicalRing R
inst✝³ : Module R V
inst✝² : SeparatingDual R V
inst✝¹ : IsTopologicalAddGroup 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 : V ≃L[R] V :=
  { toFun := fun z => z + G z • (y - x), map_add' := ⋯, map_smul' := ⋯,
    invFun := fun z => z + ((G y)⁻¹ * G z) • (x - y), left_inv := ⋯, right_inv := ⋯, continuous_toFun := ⋯,
    continuous_invFun := ⋯ }
⊢ x + G x • (y - x) = y

Tactic:
simp [Gx]

Result:
no goals