Compare commits

...

1 Commits

Author SHA1 Message Date
Kim Morrison
d812a62c3f chore: missing Option lemma 2025-06-27 17:16:52 +10:00

View File

@@ -645,6 +645,10 @@ theorem get_none_eq_iff_true {h} : (none : Option α).get h = a ↔ True := by
simp only [guard]
split <;> simp
@[grind =] theorem getD_guard : (guard p a).getD b = if p a then a else b := by
simp only [guard]
split <;> simp
@[grind]
theorem guard_def (p : α Bool) :
Option.guard p = fun x => if p x then some x else none := rfl