Commit 0160850a authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Add lemma `option_guard_True_pi`.

parent d9aa2025
......@@ -341,6 +341,10 @@ Tactic Notation "case_option_guard" :=
Lemma option_guard_True {A} P `{Decision P} (mx : option A) :
P (guard P; mx) = mx.
Proof. intros. by case_option_guard. Qed.
Lemma option_guard_True_pi {A} P `{Decision P, ProofIrrel P} (f : P option A)
(HP : P) :
mguard P f = f HP.
Proof. intros. case_option_guard; [|done]. f_equal; apply proof_irrel. Qed.
Lemma option_guard_False {A} P `{Decision P} (mx : option A) :
¬P (guard P; mx) = None.
Proof. intros. by case_option_guard. Qed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment