diff --git a/theories/algebra/cmra.v b/theories/algebra/cmra.v index 3ea70b65a0f24fd8b5f715016cad68a014b8e460..1ef0004d9817ad48bbb0cbd47a5f4ec044251144 100644 --- a/theories/algebra/cmra.v +++ b/theories/algebra/cmra.v @@ -1313,6 +1313,13 @@ Section option. + exists None; by constructor. + exists (Some c); by constructor. Qed. + Lemma option_included_total `{!CmraTotal A} ma mb : + ma ≼ mb ↔ ma = None ∨ ∃ a b, ma = Some a ∧ mb = Some b ∧ a ≼ b. + Proof. + rewrite option_included. split; last naive_solver. + intros [->|(a&b&->&->&[Hab|?])]; [by eauto| |by eauto 10]. + right. exists a, b. by rewrite {3}Hab. + Qed. Lemma option_includedN n ma mb : ma ≼{n} mb ↔ ma = None ∨ ∃ x y, ma = Some x ∧ mb = Some y ∧ (x ≡{n}≡ y ∨ x ≼{n} y). @@ -1328,6 +1335,13 @@ Section option. + exists None; by constructor. + exists (Some c); by constructor. Qed. + Lemma option_includedN_total `{!CmraTotal A} n ma mb : + ma ≼{n} mb ↔ ma = None ∨ ∃ a b, ma = Some a ∧ mb = Some b ∧ a ≼{n} b. + Proof. + rewrite option_includedN. split; last naive_solver. + intros [->|(a&b&->&->&[Hab|?])]; [by eauto| |by eauto 10]. + right. exists a, b. by rewrite {3}Hab. + Qed. Lemma option_cmra_mixin : CmraMixin (option A). Proof.