Skip to content
Snippets Groups Projects
Commit 0160850a authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Add lemma `option_guard_True_pi`.

parent d9aa2025
Branches
Tags
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment