AFTD Auto-Formalizing Theoretical Domains

Space.euclid_gradient_eq_sum

theoremverifiedformalizationimported Lean

Space.euclid_gradient_eq_sum

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open InnerProductSpace in
lemma Space.euclid_gradient_eq_sum {d} (f : EuclideanSpace ℝ (Fin d) → ℝ) (x : EuclideanSpace ℝ (Fin d)) :
    gradient f x = ∑ i, fderiv ℝ f x (EuclideanSpace.single i 1) • EuclideanSpace.single i 1
Formalizes
Physlib, `Space.euclid_gradient_eq_sum`
Lean proof
By Zhi Kai Pong, Joseph Tooby-Smith, Lode Vermeulen, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
10 Oct 2026
Axioms
Classical.choiceQuot.soundpropext

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen InnerProductSpace inlemma Space.euclid_gradient_eq_sum {d} (f : EuclideanSpace ℝ (Fin d) → ℝ) (x : EuclideanSpace ℝ (Fin d)) :    gradient f x = ∑ i, fderiv ℝ f x (EuclideanSpace.single i 1) • EuclideanSpace.single i 1 := by  apply ext_inner_right (𝕜 := ℝ) fun y => ?_  simp [gradient]  have hy : y = ∑ i, y i • EuclideanSpace.single i 1 := by    conv_lhs => rw [← OrthonormalBasis.sum_repr (EuclideanSpace.basisFun (Fin d) ℝ) y]    simp  conv_lhs => rw [hy]  simp [sum_inner, inner_smul_left, EuclideanSpace.inner_single_left, mul_comm]
See it in the graphDiscuss this resultChallenge it