Zulip Chat Archive
Stream: Is there code for X?
Topic: ignore proof obligations
Aaron Liu (Feb 09 2026 at 03:57):
Is there a canonical way to get an element hidden under a proof obligation if it's defined and get an arbitrary thing otherwise? Something like this:
noncomputable example {α : Sort u} [Nonempty α] {P : Prop} (x : P → α) : α :=
open scoped Classical in
if h : P then x h else Classical.ofNonempty
Jakub Nowak (Feb 09 2026 at 06:42):
Part.getOrElse is somewhat similar. It takes the default as an argument though.
Sébastien Gouëzel (Feb 09 2026 at 07:22):
Last updated: Feb 28 2026 at 14:05 UTC