Skip to content
Snippets Groups Projects
Commit 3f996021 authored by Janggun Lee's avatar Janggun Lee
Browse files

Apply review comments and add `discrete_fun_updateP'`.

parent fe3f50a8
No related branches found
No related tags found
No related merge requests found
...@@ -162,21 +162,22 @@ Section cmra. ...@@ -162,21 +162,22 @@ Section cmra.
eauto using discrete_fun_singleton_updateP_empty with subst. eauto using discrete_fun_singleton_updateP_empty with subst.
Qed. Qed.
Lemma discrete_fun_updateP `{Hfin: Finite A} f P : Lemma discrete_fun_updateP `{!Finite A} f P Q :
( a, f a ~~>: P a) f ~~>: (λ f', a, P a (f' a)). ( a, f a ~~>: P a) ( f', ( a, P a (f' a)) Q f') f ~~>: Q.
Proof. Proof.
rewrite cmra_total_updateP. setoid_rewrite cmra_total_updateP. repeat setoid_rewrite cmra_total_updateP. intros Hf HP n h Hh.
intros Hf n z Hfz.
destruct (finite_choice destruct (finite_choice
(λ a y, P a y {n} (y (z a))) (λ a y, P a y {n} (y (h a)))) as [f' Hf']; first naive_solver.
ltac:(naive_solver)) as [f' Hf'].
naive_solver. naive_solver.
Qed. Qed.
Lemma discrete_fun_updateP' `{!Finite A} f P :
( a, f a ~~>: P a) f ~~>: λ f', a, P a (f' a).
Proof. eauto using discrete_fun_updateP. Qed.
Lemma discrete_fun_update f g : Lemma discrete_fun_update f g :
( a, f a ~~> g a) f ~~> g. ( a, f a ~~> g a) f ~~> g.
Proof. Proof.
rewrite cmra_total_update. setoid_rewrite cmra_total_update. repeat setoid_rewrite cmra_total_update.
intros Hfg n zf Hz a. apply (Hfg a), Hz. intros Hfg n h Hh a. apply (Hfg a), Hh.
Qed. Qed.
End cmra. End cmra.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment