Zulip Chat Archive
Stream: mathlib4
Topic: Standard euclidean space
lennox (Jan 24 2025 at 06:43):
What is the standard implementation of
in mathlib? Neither
nor
EuclideanSpace Real (Fin 2)
can be used for elementary operations such as angle, apparently because they are not AddCommGroups.
Jireh Loreaux (Jan 24 2025 at 07:07):
Can you make an #mwe ? These are definitely AddCommGroups. Are you wanting to use docs#InnerProductGeometry.angle, or something else?
Jireh Loreaux (Jan 24 2025 at 07:09):
This works in the live editor:
import Mathlib
#synth AddCommGroup (EuclideanSpace ℝ (Fin 2))
noncomputable
example (x y : EuclideanSpace ℝ (Fin 2)) := InnerProductGeometry.angle x y
lennox (Jan 24 2025 at 09:07):
Thank you! I had no idea about the #synth command -- I am very new to Lean.
Eric Wieser (Jan 24 2025 at 10:30):
When you have something that "apparently" doesn't work, it is very helpful to provide a #mwe or at least an error message; no one else with the same problem is likely to find this thread helpful if no one can tell what your actual problem was!
Last updated: May 02 2025 at 03:31 UTC