Zulip Chat Archive

Stream: new members

Topic: duality between gradient and directional derivative


Johannes Riesterer (Oct 16 2024 at 12:17):

Hello. I need help to prove the duality between gradient and directional derivative.

-- Definition der Richtungsableitung
def directional_deriv (f : F  ) (x : F) (v : F) :  :=
  (fderiv  f x) v
-- Beweis, dass die Richtungsableitung gleich dem inneren Produkt des Gradienten mit dem Vektor ist
theorem directional_deriv_eq_inner_product:
  directional_deriv f x v = gradient f x, v :=
by
  rw [directional_deriv, gradient]
  sorry

Thanx for any help

Notification Bot (Oct 16 2024 at 12:19):

A message was moved here from #new members > Help with simple proof by Ruben Van de Velde.

Ruben Van de Velde (Oct 16 2024 at 12:20):

Please provide a #mwe, but probably the next question is "what's the proof in English?"

Johannes Riesterer (Oct 16 2024 at 12:23):

I want to prove that the gradient points into the direction of the steepest ascend. This part is missing. Here is my code:

import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.Calculus.FDeriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Gradient.Basic

open Topology InnerProductSpace Set Filter Real

noncomputable section

variable {𝕜 F : Type*} [RCLike 𝕜]
variable [NormedAddCommGroup F] [InnerProductSpace   F] [CompleteSpace F]
variable {f : F   } {f' x : F}
local notation "⟪" x ", " y "⟫" => @inner  _ _ x y
scoped[Gradient] notation "∇" => gradient
-- Beweis, dass der Gradient in die Richtung des steilsten Anstiegs zeigt
theorem gradient_csu (hf : DifferentiableAt   f x) (v : F) :
gradient f x, v * gradient f x, v   gradient f x, gradient f x *  v, v :=
by
  exact real_inner_mul_inner_self_le (gradient f x) v
-- Definition der Richtungsableitung
def directional_deriv (f : F  ) (x : F) (v : F) :  :=
  (fderiv  f x) v
-- Beweis, dass die Richtungsableitung gleich dem inneren Produkt des Gradienten mit dem Vektor ist
theorem directional_deriv_eq_inner_product:
  directional_deriv f x v = gradient f x, v :=
by
  rw [directional_deriv, gradient]
  sorry
-- Beweis, dass der Gradient in die Richtung des steilsten Anstiegs zeigt
theorem gradient_max_directional_deriv (hf : DifferentiableAt  f x) (v : F) :
directional_deriv f x v  gradient f x * v :=
by
  rw [directional_deriv_eq_inner_product]
  exact real_inner_le_norm (gradient f x) v

Richard Copley (Oct 16 2024 at 16:54):

rw? says rw [toDual_symm_apply].

Johannes Riesterer (Oct 16 2024 at 19:01):

That works. Thank you very much Richard


Last updated: May 02 2025 at 03:31 UTC