diff --git a/theories/option.v b/theories/option.v
index 13de994cee7ef9cc060e4084ea8b4d7a27b75a22..f9b9e6ee9e574f749fbee920b0f5c9a286928305 100644
--- a/theories/option.v
+++ b/theories/option.v
@@ -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.