Zulip Chat Archive
Stream: lean4
Topic: Nontermination when reducing floats
Logan Weber (May 13 2022 at 14:54):
Hi all. I think I found a nontermination bug when inductive types have floats as indices. Code snippet:
inductive Test where
| c : Float → Test
#reduce Test.c 0.0
The reduce gives the following output:
maximum recursion depth has been reached (use `set_option maxRecDepth <num>` to increase limit)
Version:
Lean (version 4.0.0, commit 96de208a6b1a, Release)
I get the same behavior with structures too:
structure Test where
(c : Float)
#reduce (⟨1.0⟩ : Test)
Eric Wieser (May 13 2022 at 14:56):
Is #reduce (1 : Float)
ok?
Logan Weber (May 13 2022 at 14:58):
Oh. That doesn't terminate either. Looks like this has nothing to do with inductive types.
Logan Weber (May 13 2022 at 14:59):
(Changing topic name)
Logan Weber (May 13 2022 at 15:00):
Eval seems to be fine though:
#eval (1 : Float)
Last updated: Dec 20 2023 at 11:08 UTC