Skip to content
Snippets Groups Projects
Commit a9310945 authored by William Mansky's avatar William Mansky
Browse files

add fixpoint lemmas for plainly

parent 03eaffa3
No related branches found
No related tags found
No related merge requests found
Pipeline #79970 failed
...@@ -659,6 +659,39 @@ Section plainly_derived. ...@@ -659,6 +659,39 @@ Section plainly_derived.
Global Instance except_0_plain P : Plain P Plain ( P). Global Instance except_0_plain P : Plain P Plain ( P).
Proof. rewrite /bi_except_0; apply _. Qed. Proof. rewrite /bi_except_0; apply _. Qed.
(* Interaction with fixpoint *)
Lemma fixpoint_plain {A} (F : (A -d> bi_ofeO PROP) -> A -d> bi_ofeO PROP) `{Contractive F}:
( Φ, ( x, Plain (Φ x)) ( x, Plain (F Φ x)))
x, Plain (fixpoint F x).
Proof.
intros ?.
apply fixpoint_ind.
- intros ?? Heq ??. by rewrite -(Heq _).
- exists (fun _ => bi_emp); intros; apply emp_plain.
- auto.
- apply limit_preserving_forall; intros; apply limit_preserving_Plain.
intros ??; auto.
Qed.
Lemma fixpoint_plain_absorbing {A} (F : (A -d> bi_ofeO PROP) -> A -d> bi_ofeO PROP) `{Contractive F}:
( Φ, ( x, Plain (Φ x)) ( x, Absorbing (Φ x)) ( x, Plain (F Φ x)))
( Φ, ( x, Plain (Φ x)) ( x, Absorbing (Φ x)) ( x, Absorbing (F Φ x)))
x, Plain (fixpoint F x) Absorbing (fixpoint F x).
Proof.
intros ??.
apply fixpoint_ind.
- intros ?? Heq ??. by rewrite -(Heq _).
- exists (fun _ => bi_pure True); intros; split; [apply pure_plain | apply bi.pure_absorbing].
- intros ? Hpa y.
assert ((y, Plain (x y)) (y, Absorbing (x y))) as [??] by (split; intros; eapply Hpa; eauto).
eauto.
- apply limit_preserving_forall; intros.
apply limit_preserving_and; [apply limit_preserving_Plain; intros ??; auto|].
apply bi.limit_preserving_entails.
+ intros ????. by apply bi.absorbingly_ne.
+ intros ??; auto.
Qed.
End plainly_derived. End plainly_derived.
(* When declared as an actual instance, [plain_persistent] will cause (* When declared as an actual instance, [plain_persistent] will cause
......
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