Zulip Chat Archive
Stream: new members
Topic: new to Lean 4: sorryAx?
Paula Neeley (Feb 12 2024 at 19:00):
I've looked at the documentation for sorryAx, but it's not helping to clarify why I'm getting it here. Can somebody please ELI5?
import Std.Data.BitVec.Basic
variable (bv32 : BitVec 32)
#check bv32
Ruben Van de Velde (Feb 12 2024 at 19:05):
Looks like it doesn't recognise docs#BitVec because it's actually Std.BitVec
Paula Neeley (Feb 12 2024 at 19:12):
Ruben Van de Velde said:
Looks like it doesn't recognise docs#BitVec because it's actually
Std.BitVec
Thank you, prefixing it with Std fixed the issue
Eric Wieser (Feb 12 2024 at 19:14):
Note that set_option autoImplicit false
would have given you a better error message
Mario Carneiro (Feb 12 2024 at 23:43):
Actually I don't think this is an autoImplicit issue, this is lean4#2226 (variable
eats errors without reporting)
Mario Carneiro (Feb 12 2024 at 23:44):
note that
set_option autoImplicit true
set_option relaxedAutoImplicit true
example (bv32 : BitVec 32) : True := trivial
fails
Ashley Blacquiere (Feb 13 2024 at 05:52):
I had asked a question about BitVec
on another thread, so this caught my eye.
I stuck the example above into my code and noticed something that seems odd:
import Mathlib.Probability.ProbabilityMassFunction.Basic
namespace Std
variable (bv32 : BitVec 32)
#check bv32
The above works fine, but should it? I haven't imported Std
directly, but I'm able to open the namespace as long as import Mathlib.Probability.ProbabilityMassFunction.Basic
. If I comment out only the import statement I end up with an error onBitVec
... Seems weird that that import would also make Std
available, no?
Damiano Testa (Feb 13 2024 at 07:12):
Imports are transitive, so, to me, it does not seem particularly strange. I would definitely say that this is expected.
Last updated: May 02 2025 at 03:31 UTC