Skip to content
Snippets Groups Projects
Commit 8081b69c authored by Ralf Jung's avatar Ralf Jung
Browse files

stronger fixpoint unfolding lemmas

parent f10f7c6c
No related branches found
No related tags found
No related merge requests found
Pipeline #69669 passed
...@@ -17,4 +17,11 @@ Section fixpoint. ...@@ -17,4 +17,11 @@ Section fixpoint.
Qed. Qed.
Definition my_list := type_fixpoint my_list_pre. Definition my_list := type_fixpoint my_list_pre.
Local Lemma my_list_unfold :
my_list my_list_pre my_list.
Proof. apply type_fixpoint_unfold. Qed.
Lemma my_list_size : my_list.(ty_size) = 2%nat.
Proof. rewrite my_list_unfold. done. Qed.
End fixpoint. End fixpoint.
...@@ -46,7 +46,7 @@ Section fixpoint. ...@@ -46,7 +46,7 @@ Section fixpoint.
Context `{!typeGS Σ}. Context `{!typeGS Σ}.
Context (T : type type) {HT: TypeContractive T}. Context (T : type type) {HT: TypeContractive T}.
Global Instance fixpoint_copy : Global Instance type_fixpoint_copy :
( `(!Copy ty), Copy (T ty)) Copy (type_fixpoint T). ( `(!Copy ty), Copy (T ty)) Copy (type_fixpoint T).
Proof. Proof.
intros ?. unfold type_fixpoint. apply fixpointK_ind. intros ?. unfold type_fixpoint. apply fixpointK_ind.
...@@ -65,7 +65,7 @@ Section fixpoint. ...@@ -65,7 +65,7 @@ Section fixpoint.
solve_proper_core ltac:(fun _ => eapply ty_size_ne || f_equiv). solve_proper_core ltac:(fun _ => eapply ty_size_ne || f_equiv).
Qed. Qed.
Global Instance fixpoint_send : Global Instance type_fixpoint_send :
( `(!Send ty), Send (T ty)) Send (type_fixpoint T). ( `(!Send ty), Send (T ty)) Send (type_fixpoint T).
Proof. Proof.
intros ?. unfold type_fixpoint. apply fixpointK_ind. intros ?. unfold type_fixpoint. apply fixpointK_ind.
...@@ -77,7 +77,7 @@ Section fixpoint. ...@@ -77,7 +77,7 @@ Section fixpoint.
apply bi.limit_preserving_entails; solve_proper. apply bi.limit_preserving_entails; solve_proper.
Qed. Qed.
Global Instance fixpoint_sync : Global Instance type_fixpoint_sync :
( `(!Sync ty), Sync (T ty)) Sync (type_fixpoint T). ( `(!Sync ty), Sync (T ty)) Sync (type_fixpoint T).
Proof. Proof.
intros ?. unfold type_fixpoint. apply fixpointK_ind. intros ?. unfold type_fixpoint. apply fixpointK_ind.
...@@ -89,12 +89,11 @@ Section fixpoint. ...@@ -89,12 +89,11 @@ Section fixpoint.
apply bi.limit_preserving_entails; solve_proper. apply bi.limit_preserving_entails; solve_proper.
Qed. Qed.
Lemma type_fixpoint_unfold : type_fixpoint T T (type_fixpoint T).
Proof. apply fixpointK_unfold. by apply type_contractive_ne. Qed.
Lemma fixpoint_unfold_eqtype E L : eqtype E L (type_fixpoint T) (T (type_fixpoint T)). Lemma fixpoint_unfold_eqtype E L : eqtype E L (type_fixpoint T) (T (type_fixpoint T)).
Proof. Proof. apply type_equal_eqtype, type_equal_equiv, type_fixpoint_unfold. Qed.
unfold eqtype, subtype, type_incl.
setoid_rewrite <-fixpointK_unfold; [| by apply type_contractive_ne, _..].
split; iIntros (qmax qL) "_ !> _"; (iSplit; first done); iSplit; iIntros "!>*$".
Qed.
End fixpoint. End fixpoint.
Section subtyping. Section subtyping.
......
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