Theorem: hasFDerivAt_stereoInvFunAux
File: Mathlib/Geometry/Manifold/Instances/Sphere.lean

tactic: have h₀ : HasFDerivAt (fun w : E => ‖w‖ ^ 2) (0 : E →L[ℝ] ℝ) 0 := by
  convert (hasStrictFDerivAt_norm_sq (0 : E)).hasFDerivAt
  simp
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0

tactic: have h₁ : HasFDerivAt (fun w : E => (‖w‖ ^ 2 + 4)⁻¹) (0 : E →L[ℝ] ℝ) 0 := by
  convert (hasFDerivAt_inv _).comp _ (h₀.add (hasFDerivAt_const 4 0)) <;> simp
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0

tactic: have h₂ : HasFDerivAt (fun w => (4 : ℝ) • w + (‖w‖ ^ 2 - 4) • v)
    ((4 : ℝ) • ContinuousLinearMap.id ℝ E) 0 := by
  convert ((hasFDerivAt_const (4 : ℝ) 0).smul (hasFDerivAt_id 0)).add
    ((h₀.sub (hasFDerivAt_const (4 : ℝ) 0)).smul (hasFDerivAt_const v 0)) using 1
  ext w
  simp
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
h₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0
⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0

tactic: convert h₁.smul h₂ using 1
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
h₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0
⊢ HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0
state_after: case h.e'_10
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
h₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0
⊢ ContinuousLinearMap.id ℝ E =
    (‖0‖ ^ 2 + 4)⁻¹ • 4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (4 • 0 + (‖0‖ ^ 2 - 4) • v)

tactic: ext w
state_before: case h.e'_10
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
h₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0
⊢ ContinuousLinearMap.id ℝ E =
    (‖0‖ ^ 2 + 4)⁻¹ • 4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (4 • 0 + (‖0‖ ^ 2 - 4) • v)
state_after: case h.e'_10.h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
h₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0
w : E
⊢ (ContinuousLinearMap.id ℝ E) w =
    ((‖0‖ ^ 2 + 4)⁻¹ • 4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (4 • 0 + (‖0‖ ^ 2 - 4) • v)) w

tactic: simp
state_before: case h.e'_10.h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
h₂ : HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0
w : E
⊢ (ContinuousLinearMap.id ℝ E) w =
    ((‖0‖ ^ 2 + 4)⁻¹ • 4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (4 • 0 + (‖0‖ ^ 2 - 4) • v)) w
state_after: no goals

tactic: convert (hasStrictFDerivAt_norm_sq (0 : E)).hasFDerivAt
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
⊢ HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
state_after: case h.e'_10
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
⊢ 0 = 2 • (innerSL ℝ) 0

tactic: simp
state_before: case h.e'_10
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
⊢ 0 = 2 • (innerSL ℝ) 0
state_after: no goals

tactic: convert (hasFDerivAt_inv _).comp _ (h₀.add (hasFDerivAt_const 4 0)) <;> simp
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
⊢ HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
state_after: no goals

tactic: convert ((hasFDerivAt_const (4 : ℝ) 0).smul (hasFDerivAt_id 0)).add
  ((h₀.sub (hasFDerivAt_const (4 : ℝ) 0)).smul (hasFDerivAt_const v 0)) using 1
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
⊢ HasFDerivAt (fun w => 4 • w + (‖w‖ ^ 2 - 4) • v) (4 • ContinuousLinearMap.id ℝ E) 0
state_after: case h.e'_10
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
⊢ 4 • ContinuousLinearMap.id ℝ E =
    4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (id 0) + ((‖0‖ ^ 2 - 4) • 0 + (0 - 0).smulRight v)

tactic: ext w
state_before: case h.e'_10
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
⊢ 4 • ContinuousLinearMap.id ℝ E =
    4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (id 0) + ((‖0‖ ^ 2 - 4) • 0 + (0 - 0).smulRight v)
state_after: case h.e'_10.h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
w : E
⊢ (4 • ContinuousLinearMap.id ℝ E) w =
    (4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (id 0) +
        ((‖0‖ ^ 2 - 4) • 0 + (0 - 0).smulRight v))
      w

tactic: simp
state_before: case h.e'_10.h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
v✝ v : E
h₀ : HasFDerivAt (fun w => ‖w‖ ^ 2) 0 0
h₁ : HasFDerivAt (fun w => (‖w‖ ^ 2 + 4)⁻¹) 0 0
w : E
⊢ (4 • ContinuousLinearMap.id ℝ E) w =
    (4 • ContinuousLinearMap.id ℝ E + ContinuousLinearMap.smulRight 0 (id 0) +
        ((‖0‖ ^ 2 - 4) • 0 + (0 - 0).smulRight v))
      w
state_after: no goals