Zulip Chat Archive
Stream: mathlib4
Topic: Correct formulation: Existence statement for canonical elts
Stefan Kebekus (Jun 28 2024 at 17:10):
Dear all,
I would greatly appreciate any help you can give me in formulating an existence statement for a canonical element. I have little experience in lean4 and wonder about the most idiomatic (and valuable) formulation.
Long story: If is a finite-dimensional inner product space, then there exists a canonical element . The element is the image of the inner product under the natural identification and can be computed from any orthonormal basis as .
The fact that is canonical allows me to write down the Laplacian in a coordinate-free manner: if is a function on , then . Analogous coordinate-free presentations exist for gradients and other differential operators.
Should I write an existence statement, "There exists such that …", or should I be writing a map from "finite-dimensional inner product spaces" to "their elements"? Is there a formulation allowing me to take a space E
and write something like E.canonicalTensor
?
Best,
Stefan.
Sébastien Gouëzel (Jun 28 2024 at 17:34):
Note that currently second derivatives are defined as bilinear maps, not as maps on the tensor product (and this is genuinely different, since the former approach also works in infinite dimension while the latter only makes sense in finite dimension). So it means you will need some manipulations to follow this approach.
As for your question, the answer is the second approach: construct an element associated to the space. And then show that whatever basis you use, it gives rise to the same element. A good example of this, already in mathlib, is the canonical volume form on a finite-dimensional inner product space. It is defined in docs#measureSpaceOfInnerProductSpace using one specific choice of a basis, but there are several lemmas (see e.g. docs#Orientation.volumeForm_robust or docs#OrthonormalBasis.addHaar_eq_volume) showing that it is in fact independent of the choice.
Stefan Kebekus (Jun 28 2024 at 19:51):
@Sébastien Gouëzel Understood. I will proceed as you suggested. I learned that you use a "def" in your example while I was unsuccessfully experimenting with an "instance" instead. Copying your code solved all my problems.
As usual, Thank you for your incredibly prompt and helpful reply!
Last updated: May 02 2025 at 03:31 UTC