Zulip Chat Archive
Stream: lean4
Topic: let telescope and have
Tomas Skrivan (Nov 11 2025 at 04:26):
Can someone explain me this behavior?
run_meta
let e := q(have a := 1
have b := 2
a + b + 10)
let e' ← letTelescope e fun xs b =>
mkLetFVars xs b
logInfo e' -- fun a b => a + b + 10
Why do those have bindings get turned into a lambda? Is this intended behavior? I find this really surprising behavior.
Henrik Böving (Nov 11 2025 at 08:32):
I can't tell you why but you can unset the generalize flag on mkLetFVars to not make it do that
Tomas Skrivan (Nov 11 2025 at 22:17):
Hmm strange, there is also a flat on letTelescope to prevent that from happening but all have gets turned into let, but I don't care too much so it works for me.
Last updated: Dec 20 2025 at 21:32 UTC