noncomputable def
legendreTransform
{d : ℕ}
(Λ : EuclideanSpace ℝ (Fin d) → ℝ)
(x : EuclideanSpace ℝ (Fin d))
:
The Legendre transform (or Legendre dual) of a function Λ : ℝᵈ → ℝ, defined by
Λ*(x) = sup_{λ ∈ ℝᵈ} (⟨λ, x⟩ - Λ(λ)). This is the convex conjugate of Λ and appears, for
instance, as the rate function in Cramér's theorem.