Zulip Chat Archive
Stream: general
Topic: noncomputable tainting
Eric Wieser (Oct 19 2021 at 10:56):
Is this expected behavior:
noncomputable def foo : ℕ := classical.some (show ∃ x, x = 1, from ⟨1, rfl⟩)
structure bar (n : ℕ) :=
(x : ℕ)
def baz : bar foo := ⟨1⟩ -- error: not marked noncomputable
Surely the computability of types is irrelevant, so foo
shouldn't poison baz
Gabriel Ebner (Oct 19 2021 at 10:59):
I'm pretty sure it complains about the foo
in @bar.mk foo 1
.
Eric Wieser (Oct 19 2021 at 11:00):
Ah right, and then this is just the simpler case that lean doesn't track computability at that level
Eric Wieser (Oct 19 2021 at 11:00):
This came up when wanting to show a galois_insertion
between two noncomputable functions, with a computable choice operation
Last updated: Dec 20 2023 at 11:08 UTC