Theorem: Complex.affine_of_mapsTo_ball_of_exists_norm_dslope_eq_div
File: Mathlib/Analysis/Complex/Schwarz.lean

tactic: set g := dslope f c
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
h_eq : ‖dslope f c z₀‖ = R₂ / R₁
⊢ EqOn f (fun z => f c + (z - c) • dslope f c z₀) (ball c R₁)

tactic: rintro z hz
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
⊢ EqOn f (fun z => f c + (z - c) • g z₀) (ball c R₁)

tactic: by_cases z = c
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
⊢ f z = (fun z => f c + (z - c) • g z₀) z

tactic: have h_R₁ : 0 < R₁ := nonempty_ball.mp ⟨_, h_z₀⟩
state_before: case neg
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
h : ¬z = c
⊢ f z = (fun z => f c + (z - c) • g z₀) z

tactic: have g_le_div : ∀ z ∈ ball c R₁, ‖g z‖ ≤ R₂ / R₁ := fun z hz =>
  norm_dslope_le_div_of_mapsTo_ball hd h_maps hz
state_before: case neg
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
h : ¬z = c
h_R₁ : 0 < R₁
⊢ f z = (fun z => f c + (z - c) • g z₀) z

tactic: have g_max : IsMaxOn (norm ∘ g) (ball c R₁) z₀ :=
  isMaxOn_iff.mpr fun z hz => by simpa [h_eq] using g_le_div z hz
state_before: case neg
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
h : ¬z = c
h_R₁ : 0 < R₁
g_le_div : ∀ (z : ℂ), z ∈ ball c R₁ → ‖g z‖ ≤ R₂ / R₁
⊢ f z = (fun z => f c + (z - c) • g z₀) z

tactic: have g_diff : DifferentiableOn ℂ g (ball c R₁) :=
  (differentiableOn_dslope (isOpen_ball.mem_nhds (mem_ball_self h_R₁))).mpr hd
state_before: case neg
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
h : ¬z = c
h_R₁ : 0 < R₁
g_le_div : ∀ (z : ℂ), z ∈ ball c R₁ → ‖g z‖ ≤ R₂ / R₁
g_max : IsMaxOn (norm ∘ g) (ball c R₁) z₀
⊢ f z = (fun z => f c + (z - c) • g z₀) z

tactic: have : g z = g z₀ := eqOn_of_isPreconnected_of_isMaxOn_norm (convex_ball c R₁).isPreconnected
  isOpen_ball g_diff h_z₀ g_max hz
state_before: case neg
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
h : ¬z = c
h_R₁ : 0 < R₁
g_le_div : ∀ (z : ℂ), z ∈ ball c R₁ → ‖g z‖ ≤ R₂ / R₁
g_max : IsMaxOn (norm ∘ g) (ball c R₁) z₀
g_diff : DifferentiableOn ℂ g (ball c R₁)
⊢ f z = (fun z => f c + (z - c) • g z₀) z

tactic: simp [← this]
state_before: case neg
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
h : ¬z = c
h_R₁ : 0 < R₁
g_le_div : ∀ (z : ℂ), z ∈ ball c R₁ → ‖g z‖ ≤ R₂ / R₁
g_max : IsMaxOn (norm ∘ g) (ball c R₁) z₀
g_diff : DifferentiableOn ℂ g (ball c R₁)
this : g z = g z₀
⊢ f z = (fun z => f c + (z - c) • g z₀) z

tactic: simp [h]
state_before: case pos
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
h : z = c
⊢ f z = (fun z => f c + (z - c) • g z₀) z

tactic: simpa [h_eq] using g_le_div z hz
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℂ E
R R₁ R₂ : ℝ
f : ℂ → E
c z✝¹ z₀ : ℂ
inst✝¹ : CompleteSpace E
inst✝ : StrictConvexSpace ℝ E
hd : DifferentiableOn ℂ f (ball c R₁)
h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)
h_z₀ : z₀ ∈ ball c R₁
g : ℂ → E := dslope f c
h_eq : ‖g z₀‖ = R₂ / R₁
z✝ : ℂ
hz✝ : z✝ ∈ ball c R₁
h : ¬z✝ = c
h_R₁ : 0 < R₁
g_le_div : ∀ (z : ℂ), z ∈ ball c R₁ → ‖g z‖ ≤ R₂ / R₁
z : ℂ
hz : z ∈ ball c R₁
⊢ (norm ∘ g) z ≤ (norm ∘ g) z₀