Theorem: SeparatingDual.exists_continuousLinearEquiv_apply_eq
File: Mathlib/Analysis/NormedSpace/HahnBanach/SeparatingDual.lean

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
state_before: 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
state_after: 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

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]
    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]
    abel
  continuous_toFun := continuous_id.add (G.continuous.smul continuous_const)
  continuous_invFun :=
    continuous_id.add ((continuous_const.mul G.continuous).smul continuous_const) }
state_before: 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
state_after: 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 : 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]⟩
state_before: 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 : 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
state_after: no goals

tactic: simp [add_smul]
state_before: 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
state_after: 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))

tactic: abel
state_before: 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))
state_after: no goals

tactic: simp [smul_smul]
state_before: 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
⊢ ∀ (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
state_after: no goals

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]
state_before: 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))
      ({ toFun := fun z => z + G z • (y - x), map_add' := ⋯, map_smul' := ⋯ }.toFun z) =
    z
state_after: 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

tactic: rw [mul_comm (G z), ← mul_assoc, inv_mul_cancel Gy]
state_before: 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
state_after: 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) + (1 * G z) • (x - y) = z

tactic: simp only [smul_sub, one_mul]
state_before: 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) + (1 * G z) • (x - y) = z
state_after: 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 - G z • x) + (G z • x - G z • y) = z

tactic: abel
state_before: 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 - G z • x) + (G z • x - G z • y) = z
state_after: no goals

tactic: simp only [map_add, map_smulₛₗ _, map_mul, map_inv₀, RingHom.id_apply, map_sub, Gx,
  smul_eq_mul, mul_sub, mul_one]
state_before: 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
⊢ { toFun := fun z => z + G z • (y - x), map_add' := ⋯, map_smul' := ⋯ }.toFun
      ((fun z => z + ((G y)⁻¹ * G z) • (x - y)) z) =
    z
state_after: 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 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]
state_before: 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 y)⁻¹ * G z) • (x - y) + (G z + ((G y)⁻¹ * G z - (G y)⁻¹ * G z * G y)) • (y - x) = z
state_after: 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 y)⁻¹ * G z) • (x - y) + (G z + ((G y)⁻¹ * G z - 1 * G z)) • (y - x) = z

tactic: simp only [smul_sub, one_mul, add_sub_cancel]
state_before: 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 y)⁻¹ * G z) • (x - y) + (G z + ((G y)⁻¹ * G z - 1 * G z)) • (y - x) = z
state_after: 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 y)⁻¹ * G z) • x - ((G y)⁻¹ * G z) • y) + (((G y)⁻¹ * G z) • y - ((G y)⁻¹ * G z) • x) = z

tactic: abel
state_before: 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 y)⁻¹ * G z) • x - ((G y)⁻¹ * G z) • y) + (((G y)⁻¹ * G z) • y - ((G y)⁻¹ * G z) • x) = z
state_after: no goals

tactic: simp [Gx]
state_before: 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 : 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
state_after: no goals