Theorem: Real.exists_extension_norm_eq
File: Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean

tactic: rcases exists_extension_of_le_sublinear ⟨p, f⟩ (fun x => ‖f‖ * ‖x‖)
    (fun c hc x => by simp only [norm_smul c x, Real.norm_eq_abs, abs_of_pos hc, mul_left_comm])
    (fun x y => by rw [← left_distrib]
      exact mul_le_mul_of_nonneg_left (norm_add_le x y) (@norm_nonneg _ _ f))
    fun x => le_trans (le_abs_self _) (f.le_op_norm _) with ⟨g, g_eq, g_le⟩
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
⊢ ∃ g, (∀ (x : { x // x ∈ p }), ↑g ↑x = ↑f x) ∧ ‖g‖ = ‖f‖

tactic: set g' :=
  g.mkContinuous ‖f‖ fun x => abs_le.2 ⟨neg_le.1 <| g.map_neg x ▸ norm_neg x ▸ g_le (-x), g_le x⟩
state_before: case intro.intro
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
g : E →ₗ[ℝ] ℝ
g_eq : ∀ (x : { x // x ∈ { domain := p, toFun := ↑f }.domain }), ↑g ↑x = ↑{ domain := p, toFun := ↑f } x
g_le : ∀ (x : E), ↑g x ≤ ‖f‖ * ‖x‖
⊢ ∃ g, (∀ (x : { x // x ∈ p }), ↑g ↑x = ↑f x) ∧ ‖g‖ = ‖f‖

tactic: simp only [norm_smul c x, Real.norm_eq_abs, abs_of_pos hc, mul_left_comm]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
c : ℝ
hc : 0 < c
x : E
⊢ (fun x => ‖f‖ * ‖x‖) (c • x) = c * (fun x => ‖f‖ * ‖x‖) x

tactic: rw [← left_distrib]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
x y : E
⊢ (fun x => ‖f‖ * ‖x‖) (x + y) ≤ (fun x => ‖f‖ * ‖x‖) x + (fun x => ‖f‖ * ‖x‖) y

tactic: exact mul_le_mul_of_nonneg_left (norm_add_le x y) (@norm_nonneg _ _ f)
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
x y : E
⊢ (fun x => ‖f‖ * ‖x‖) (x + y) ≤ ‖f‖ * (‖x‖ + ‖y‖)

tactic: refine' ⟨g', g_eq, _⟩
state_before: case intro.intro
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
g : E →ₗ[ℝ] ℝ
g_eq : ∀ (x : { x // x ∈ { domain := p, toFun := ↑f }.domain }), ↑g ↑x = ↑{ domain := p, toFun := ↑f } x
g_le : ∀ (x : E), ↑g x ≤ ‖f‖ * ‖x‖
g' : E →L[ℝ] ℝ := LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)
⊢ ∃ g, (∀ (x : { x // x ∈ p }), ↑g ↑x = ↑f x) ∧ ‖g‖ = ‖f‖

tactic: apply le_antisymm (g.mkContinuous_norm_le (norm_nonneg f) _)
state_before: case intro.intro
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
g : E →ₗ[ℝ] ℝ
g_eq : ∀ (x : { x // x ∈ { domain := p, toFun := ↑f }.domain }), ↑g ↑x = ↑{ domain := p, toFun := ↑f } x
g_le : ∀ (x : E), ↑g x ≤ ‖f‖ * ‖x‖
g' : E →L[ℝ] ℝ := LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)
⊢ ‖g'‖ = ‖f‖

tactic: refine' f.op_norm_le_bound (norm_nonneg _) fun x => _
state_before: case intro.intro
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
g : E →ₗ[ℝ] ℝ
g_eq : ∀ (x : { x // x ∈ { domain := p, toFun := ↑f }.domain }), ↑g ↑x = ↑{ domain := p, toFun := ↑f } x
g_le : ∀ (x : E), ↑g x ≤ ‖f‖ * ‖x‖
g' : E →L[ℝ] ℝ := LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)
⊢ ‖f‖ ≤ ‖LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)‖

tactic: dsimp at g_eq
state_before: case intro.intro
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
g : E →ₗ[ℝ] ℝ
g_eq : ∀ (x : { x // x ∈ { domain := p, toFun := ↑f }.domain }), ↑g ↑x = ↑{ domain := p, toFun := ↑f } x
g_le : ∀ (x : E), ↑g x ≤ ‖f‖ * ‖x‖
g' : E →L[ℝ] ℝ := LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)
x : { x // x ∈ p }
⊢ ‖↑f x‖ ≤ ‖LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)‖ * ‖x‖

tactic: rw [← g_eq]
state_before: case intro.intro
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
g : E →ₗ[ℝ] ℝ
g_eq : ∀ (x : { x // x ∈ p }), ↑g ↑x = ↑f x
g_le : ∀ (x : E), ↑g x ≤ ‖f‖ * ‖x‖
g' : E →L[ℝ] ℝ := LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)
x : { x // x ∈ p }
⊢ ‖↑f x‖ ≤ ‖LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)‖ * ‖x‖

tactic: apply g'.le_op_norm
state_before: case intro.intro
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
p : Subspace ℝ E
f : { x // x ∈ p } →L[ℝ] ℝ
g : E →ₗ[ℝ] ℝ
g_eq : ∀ (x : { x // x ∈ p }), ↑g ↑x = ↑f x
g_le : ∀ (x : E), ↑g x ≤ ‖f‖ * ‖x‖
g' : E →L[ℝ] ℝ := LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)
x : { x // x ∈ p }
⊢ ‖↑g ↑x‖ ≤ ‖LinearMap.mkContinuous g ‖f‖ (_ : ∀ (x : E), abs (↑g x) ≤ ‖f‖ * ‖x‖)‖ * ‖x‖