Zulip Chat Archive
Stream: new members
Topic: Dangerous instance vs elaboration problems
FrΓ©dΓ©ric Dupuis (Sep 19 2020 at 03:28):
In #4057 (which defines inner products based on is_R_or_C
), the main outstanding issue is that the linter reports a dangerous instance in the definition:
class inner_product_space (π : Type*) (Ξ± : Type*)
[nondiscrete_normed_field π] [normed_algebra β π] [is_R_or_C π]
extends normed_group Ξ±, normed_space π Ξ±, has_inner π Ξ± := sorry
which presumably comes from the fact that normed_group Ξ±
doesn't have π
as a parameter. I gather that the usual way to fix this is to move normed_group Ξ±
into the assumptions, as in
class inner_product_space (π : Type*) (Ξ± : Type*)
[nondiscrete_normed_field π] [normed_algebra β π] [is_R_or_C π] [normed_group Ξ±]
extends normed_space π Ξ±, has_inner π Ξ± := sorry
However, when I do that, I run into some very annoying elaboration issues where I have to constantly spoonfeed it π
and/or Ξ±
in lemmas that rewrite norms in terms of inner products, even though the relevant instance is directly present in the context.
So: just how dangerous is an instance like this? Would it still send the search algorithm into a wild goose chase, even though the only possibilities for π
should always remain only β
and β
?
Heather Macbeth (Sep 19 2020 at 15:58):
I think you could have asked this in #maths! :) @Yury G. Kudryashov @Sebastien Gouezel ?
Last updated: Dec 20 2023 at 11:08 UTC