Zulip Chat Archive
Stream: new members
Topic: to_has_scalar
Winston Yin (Jun 06 2021 at 14:53):
I'm defining a representation k A V (...) := A →ₐ[k] V →ₗ[k] V
, and I'm trying to define a to_has_scalar
, so it would be convenient to write a • v
and define a module structure. However, when I define an instance to_has_scalar (r : representation k A V) : has_scalar A V
, subsequent use of the notation a • v
results in the error:
maximum class-instance resolution depth has been reached (the limit can be increased by setting option
'class.instance_max_depth') (the class-instance resolution trace can be visualized by setting option
'trace.class_instances')
Winston Yin (Jun 06 2021 at 14:55):
What am I doing wrong?
Eric Wieser (Jun 06 2021 at 15:03):
Lean has no way to figure out k
Eric Wieser (Jun 06 2021 at 15:03):
Or for that matter r
Eric Wieser (Jun 06 2021 at 15:03):
#lint
would probably tell you that
Winston Yin (Jun 06 2021 at 15:11):
You mean the •
itself doesn't have enough info about r
and k
?
Last updated: Dec 20 2023 at 11:08 UTC