Commit da93f357 authored by Ralf Jung's avatar Ralf Jung

use ! when possible to avoid overzealous generalization

parent 38abc449
From iris.base_logic.lib Require Import invariants.
Section tests.
Context `{invG Σ}.
Context `{!invG Σ}.
Program Definition test : (iProp Σ -n> iProp Σ) -n> (iProp Σ -n> iProp Σ) :=
λne P v, ( (P v))%I.
......
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
E : coPset
============================
--------------------------------------∗
......@@ -10,7 +10,7 @@
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
E : coPset
l : loc
============================
......@@ -21,7 +21,7 @@
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
E : coPset
l : loc
============================
......@@ -35,7 +35,7 @@
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
l : loc
============================
_ : ▷ l ↦ #0
......@@ -45,7 +45,7 @@
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
l : loc
============================
_ : l ↦ #1
......@@ -55,7 +55,7 @@
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
l : loc
============================
"Hl1" : l ↦{1 / 2} #0
......@@ -66,7 +66,7 @@
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
l : loc
============================
--------------------------------------∗
......@@ -81,7 +81,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
============================
--------------------------------------∗
WP "x" {{ _, True }}
......@@ -89,7 +89,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
fun1, fun2, fun3 : expr
============================
--------------------------------------∗
......@@ -101,7 +101,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
fun1, fun2, fun3 : expr
Φ : language.val heap_lang → iPropI Σ
============================
......@@ -114,7 +114,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
fun1, fun2, fun3 : expr
Φ : language.val heap_lang → iPropI Σ
E : coPset
......@@ -128,7 +128,7 @@ Tactic failure: wp_pure: cannot find ?y in (Var "x") or
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
fun1, fun2, fun3 : expr
============================
{{{ True }}}
......
......@@ -6,7 +6,7 @@ Set Ltac Backtrace.
Set Default Proof Using "Type".
Section tests.
Context `{heapG Σ}.
Context `{!heapG Σ}.
Implicit Types P Q : iProp Σ.
Implicit Types Φ : val iProp Σ.
......@@ -147,7 +147,7 @@ Section tests.
End tests.
Section printing_tests.
Context `{heapG Σ}.
Context `{!heapG Σ}.
(* These terms aren't even closed, but that's not what this is about. The
length of the variable names etc. has been carefully chosen to trigger
......@@ -192,7 +192,7 @@ Section printing_tests.
End printing_tests.
Section error_tests.
Context `{heapG Σ}.
Context `{!heapG Σ}.
Check "not_cas".
Lemma not_cas :
......
1 subgoal
Σ : gFunctors
H : heapG Σ
heapG0 : heapG Σ
fun1, fun2, fun3 : expr
============================
--------------------------------------∗
......
......@@ -6,7 +6,7 @@ From iris.heap_lang Require Import proofmode notation.
Set Default Proof Using "Type".
Section printing_tests.
Context `{heapG Σ}.
Context `{!heapG Σ}.
Lemma wp_print_long_expr (fun1 fun2 fun3 : expr) :
True - WP let: "val1" := fun1 #() in
......
......@@ -107,7 +107,7 @@ under max can be found in [theories/heap_lang/lib/counter.v]. *)
update modalities (which we did not cover in the paper). Normally we use these
mask changing update modalities directly in our proofs, but in this file we use
the first prove the rule as a lemma, and then use that. *)
Lemma wp_inv_open `{irisG Λ Σ} N E P e Φ :
Lemma wp_inv_open `{!irisG Λ Σ} N E P e Φ :
nclose N E Atomic WeaklyAtomic e
inv N P ( P - WP e @ E N {{ v, P Φ v }}) WP e @ E {{ Φ }}.
Proof.
......
......@@ -131,7 +131,7 @@ Tactic failure: iFrame: cannot frame Q.
1 subgoal
PROP : sbi
H : BiAffine PROP
BiAffine0 : BiAffine PROP
P, Q : PROP
============================
_ : □ P
......
......@@ -69,7 +69,7 @@ Lemma test_iDestruct_intuitionistic_2 P Q `{!Persistent P, !Affine P}:
Q (Q - P) - P.
Proof. iIntros "[HQ HQP]". iDestruct ("HQP" with "HQ") as "#HP". done. Qed.
Lemma test_iDestruct_intuitionistic_affine_bi `{BiAffine PROP} P Q `{!Persistent P}:
Lemma test_iDestruct_intuitionistic_affine_bi `{!BiAffine PROP} P Q `{!Persistent P}:
Q (Q - P) - P Q.
Proof. iIntros "[HQ HQP]". iDestruct ("HQP" with "HQ") as "#HP". by iFrame. Qed.
......@@ -180,7 +180,7 @@ Lemma test_iFrame_conjunction_2 P Q :
P - Q - (P P) (Q Q).
Proof. iIntros "HP HQ". iFrame "HP HQ". Qed.
Lemma test_iFrame_later `{BiAffine PROP} P Q : P - Q - P Q.
Lemma test_iFrame_later `{!BiAffine PROP} P Q : P - Q - P Q.
Proof. iIntros "H1 H2". by iFrame "H1". Qed.
Lemma test_iAssert_modality P : False - P.
......@@ -555,7 +555,7 @@ Proof.
Qed.
Check "test_and_sep_affine_bi".
Lemma test_and_sep_affine_bi `{BiAffine PROP} P Q : P Q P Q.
Lemma test_and_sep_affine_bi `{!BiAffine PROP} P Q : P Q P Q.
Proof.
iIntros "[??]". iSplit; last done. Show. done.
Qed.
......
1 subgoal
Σ : gFunctors
H : invG Σ
H0 : cinvG Σ
H1 : na_invG Σ
invG0 : invG Σ
cinvG0 : cinvG Σ
na_invG0 : na_invG Σ
N : namespace
P : iProp Σ
============================
......@@ -15,9 +15,9 @@
1 subgoal
Σ : gFunctors
H : invG Σ
H0 : cinvG Σ
H1 : na_invG Σ
invG0 : invG Σ
cinvG0 : cinvG Σ
na_invG0 : na_invG Σ
N : namespace
P : iProp Σ
============================
......@@ -31,9 +31,9 @@
1 subgoal
Σ : gFunctors
H : invG Σ
H0 : cinvG Σ
H1 : na_invG Σ
invG0 : invG Σ
cinvG0 : cinvG Σ
na_invG0 : na_invG Σ
γ : gname
p : Qp
N : namespace
......@@ -49,9 +49,9 @@
1 subgoal
Σ : gFunctors
H : invG Σ
H0 : cinvG Σ
H1 : na_invG Σ
invG0 : invG Σ
cinvG0 : cinvG Σ
na_invG0 : na_invG Σ
γ : gname
p : Qp
N : namespace
......@@ -68,14 +68,14 @@
1 subgoal
Σ : gFunctors
H : invG Σ
H0 : cinvG Σ
H1 : na_invG Σ
invG0 : invG Σ
cinvG0 : cinvG Σ
na_invG0 : na_invG Σ
t : na_inv_pool_name
N : namespace
E1, E2 : coPset
P : iProp Σ
H2 : ↑N ⊆ E2
H : ↑N ⊆ E2
============================
_ : na_inv t N (<pers> P)
"HP" : ▷ <pers> P
......@@ -89,14 +89,14 @@
1 subgoal
Σ : gFunctors
H : invG Σ
H0 : cinvG Σ
H1 : na_invG Σ
invG0 : invG Σ
cinvG0 : cinvG Σ
na_invG0 : na_invG Σ
t : na_inv_pool_name
N : namespace
E1, E2 : coPset
P : iProp Σ
H2 : ↑N ⊆ E2
H : ↑N ⊆ E2
============================
_ : na_inv t N (<pers> P)
"HP" : ▷ <pers> P
......@@ -132,12 +132,12 @@ Tactic failure: iInv: invariant "H2" not found.
1 subgoal
Σ : gFunctors
H : invG Σ
invG0 : invG Σ
I : biIndex
N : namespace
E : coPset
𝓟 : iProp Σ
H0 : ↑N ⊆ E
H : ↑N ⊆ E
============================
"HP" : ⎡ ▷ 𝓟 ⎤
--------------------------------------∗
......@@ -148,12 +148,12 @@ Tactic failure: iInv: invariant "H2" not found.
1 subgoal
Σ : gFunctors
H : invG Σ
invG0 : invG Σ
I : biIndex
N : namespace
E : coPset
𝓟 : iProp Σ
H0 : ↑N ⊆ E
H : ↑N ⊆ E
============================
"HP" : ⎡ ▷ 𝓟 ⎤
"Hclose" : ⎡ ▷ 𝓟 ={E ∖ ↑N,E}=∗ emp ⎤
......
......@@ -50,7 +50,7 @@ Section base_logic_tests.
End base_logic_tests.
Section iris_tests.
Context `{invG Σ, cinvG Σ, na_invG Σ}.
Context `{!invG Σ, !cinvG Σ, !na_invG Σ}.
Implicit Types P Q R : iProp Σ.
Lemma test_masks N E P Q R :
......@@ -223,7 +223,7 @@ Section iris_tests.
End iris_tests.
Section monpred_tests.
Context `{invG Σ}.
Context `{!invG Σ}.
Context {I : biIndex}.
Local Notation monPred := (monPred I (iPropI Σ)).
Local Notation monPredI := (monPredI I (iPropI Σ)).
......
......@@ -266,7 +266,7 @@ Lemma agree_map_to_agree {A B} (f : A → B) (x : A) :
Proof. by apply agree_eq. Qed.
Section agree_map.
Context {A B : ofeT} (f : A B) `{Hf: NonExpansive f}.
Context {A B : ofeT} (f : A B) {Hf: NonExpansive f}.
Instance agree_map_ne : NonExpansive (agree_map f).
Proof.
......
......@@ -43,7 +43,7 @@ Definition auth_ofe_mixin : OfeMixin (auth A).
Proof. by apply (iso_ofe_mixin (λ x, (authoritative x, auth_own x))). Qed.
Canonical Structure authC := OfeT (auth A) auth_ofe_mixin.
Global Instance auth_cofe `{Cofe A} : Cofe authC.
Global Instance auth_cofe `{!Cofe A} : Cofe authC.
Proof.
apply (iso_cofe (λ y : _ * _, Auth (y.1) (y.2))
(λ x, (authoritative x, auth_own x))); by repeat intro.
......@@ -113,7 +113,7 @@ Proof.
destruct x as [[[]|]]; naive_solver eauto using cmra_validN_includedN.
Qed.
Lemma auth_valid_discrete `{CmraDiscrete A} x :
Lemma auth_valid_discrete `{!CmraDiscrete A} x :
x match authoritative x with
| Excl' a => auth_own x a a
| None => auth_own x
......@@ -125,12 +125,12 @@ Proof.
Qed.
Lemma auth_validN_2 n a b : {n} ( a b) b {n} a {n} a.
Proof. by rewrite auth_validN_eq /= left_id. Qed.
Lemma auth_valid_discrete_2 `{CmraDiscrete A} a b : ( a b) b a a.
Lemma auth_valid_discrete_2 `{!CmraDiscrete A} a b : ( a b) b a a.
Proof. by rewrite auth_valid_discrete /= left_id. Qed.
Lemma authoritative_valid x : x authoritative x.
Proof. by destruct x as [[[]|]]. Qed.
Lemma auth_own_valid `{CmraDiscrete A} x : x auth_own x.
Lemma auth_own_valid `{!CmraDiscrete A} x : x auth_own x.
Proof.
rewrite auth_valid_discrete.
destruct x as [[[]|]]; naive_solver eauto using cmra_valid_included.
......
......@@ -52,7 +52,7 @@ Proof.
Qed.
Canonical Structure exclC : ofeT := OfeT (excl A) excl_ofe_mixin.
Global Instance excl_cofe `{Cofe A} : Cofe exclC.
Global Instance excl_cofe `{!Cofe A} : Cofe exclC.
Proof.
apply (iso_cofe (from_option Excl ExclBot) (maybe Excl)).
- by intros n [a|] [b|]; split; inversion_clear 1; constructor.
......
......@@ -353,7 +353,7 @@ Qed.
Section freshness.
Local Set Default Proof Using "Type*".
Context `{Infinite K}.
Context `{!Infinite K}.
Lemma alloc_updateP_strong (Q : gmap K A Prop) (I : gset K) m x :
x ( i, m !! i = None i I Q (<[i:=x]>m)) m ~~>: Q.
Proof.
......
......@@ -163,7 +163,7 @@ Section gset_disj.
Section fresh_updates.
Local Set Default Proof Using "Type*".
Context `{Infinite K}.
Context `{!Infinite K}.
Lemma gset_disj_alloc_updateP (Q : gset_disj K Prop) X :
( i, i X Q (GSet ({[i]} X))) GSet X ~~>: Q.
......
......@@ -58,12 +58,12 @@ Program Definition list_chain
(c : chain listC) (x : A) (k : nat) : chain A :=
{| chain_car n := default x (c n !! k) |}.
Next Obligation. intros c x k n i ?. by rewrite /= (chain_cauchy c n i). Qed.
Definition list_compl `{Cofe A} : Compl listC := λ c,
Definition list_compl `{!Cofe A} : Compl listC := λ c,
match c 0 with
| [] => []
| x :: _ => compl list_chain c x <$> seq 0 (length (c 0))
end.
Global Program Instance list_cofe `{Cofe A} : Cofe listC :=
Global Program Instance list_cofe `{!Cofe A} : Cofe listC :=
{| compl := list_compl |}.
Next Obligation.
intros ? n c; rewrite /compl /list_compl.
......
......@@ -202,7 +202,7 @@ Lemma option_validI {A : cmraT} (mx : option A) :
Proof. exact: uPred_primitive.option_validI. Qed.
Lemma discrete_valid {A : cmraT} `{!CmraDiscrete A} (a : A) : a ⌜✓ a.
Proof. exact: uPred_primitive.discrete_valid. Qed.
Lemma ofe_fun_validI `{B : A ucmraT} (g : ofe_fun B) : g i, g i.
Lemma ofe_fun_validI {A} {B : A ucmraT} (g : ofe_fun B) : g i, g i.
Proof. exact: uPred_primitive.ofe_fun_validI. Qed.
(** Consistency/soundness statement *)
......
......@@ -60,7 +60,7 @@ Proof.
Qed.
(** Timeless instances *)
Global Instance valid_timeless {A : cmraT} `{CmraDiscrete A} (a : A) :
Global Instance valid_timeless {A : cmraT} `{!CmraDiscrete A} (a : A) :
Timeless ( a : uPred M)%I.
Proof. rewrite /Timeless !discrete_valid. apply (timeless _). Qed.
Global Instance ownM_timeless (a : M) : Discrete a Timeless (uPred_ownM a).
......
......@@ -16,7 +16,7 @@ Instance subG_authΣ Σ A : subG (authΣ A) Σ → CmraDiscrete A → authG Σ A
Proof. solve_inG. Qed.
Section definitions.
Context `{invG Σ, authG Σ A} {T : Type} (γ : gname).
Context `{!invG Σ, !authG Σ A} {T : Type} (γ : gname).
Definition auth_own (a : A) : iProp Σ :=
own γ ( a).
......@@ -60,7 +60,7 @@ Instance: Params (@auth_inv) 5 := {}.
Instance: Params (@auth_ctx) 7 := {}.
Section auth.
Context `{invG Σ, authG Σ A}.
Context `{!invG Σ, !authG Σ A}.
Context {T : Type} `{!Inhabited T}.
Context (f : T A) (φ : T iProp Σ).
Implicit Types N : namespace.
......
......@@ -17,7 +17,7 @@ Instance subG_boxΣ Σ : subG boxΣ Σ → boxG Σ.
Proof. solve_inG. Qed.
Section box_defs.
Context `{invG Σ, boxG Σ} (N : namespace).
Context `{!invG Σ, !boxG Σ} (N : namespace).
Definition slice_name := gname.
......@@ -46,7 +46,7 @@ Instance: Params (@slice) 5 := {}.
Instance: Params (@box) 5 := {}.
Section box.
Context `{invG Σ, boxG Σ} (N : namespace).
Context `{!invG Σ, !boxG Σ} (N : namespace).
Implicit Types P Q : iProp Σ.
Global Instance box_own_prop_ne γ : NonExpansive (box_own_prop γ).
......
......@@ -12,7 +12,7 @@ Instance subG_cinvΣ {Σ} : subG cinvΣ Σ → cinvG Σ.
Proof. solve_inG. Qed.
Section defs.
Context `{invG Σ, cinvG Σ}.
Context `{!invG Σ, !cinvG Σ}.
Definition cinv_own (γ : gname) (p : frac) : iProp Σ := own γ p.
......@@ -23,7 +23,7 @@ End defs.
Instance: Params (@cinv) 5 := {}.
Section proofs.
Context `{invG Σ, cinvG Σ}.
Context `{!invG Σ, !cinvG Σ}.
Global Instance cinv_own_timeless γ p : Timeless (cinv_own γ p).
Proof. rewrite /cinv_own; apply _. Qed.
......
......@@ -7,14 +7,14 @@ Set Default Proof Using "Type".
Export invG.
Import uPred.
Definition uPred_fupd_def `{invG Σ} (E1 E2 : coPset) (P : iProp Σ) : iProp Σ :=
Definition uPred_fupd_def `{!invG Σ} (E1 E2 : coPset) (P : iProp Σ) : iProp Σ :=
(wsat ownE E1 == (wsat ownE E2 P))%I.
Definition uPred_fupd_aux `{invG Σ} : seal uPred_fupd_def. by eexists. Qed.
Definition uPred_fupd `{invG Σ} : FUpd (iProp Σ):= uPred_fupd_aux.(unseal).
Definition uPred_fupd_eq `{invG Σ} : @fupd _ uPred_fupd = uPred_fupd_def :=
Definition uPred_fupd_aux `{!invG Σ} : seal uPred_fupd_def. by eexists. Qed.
Definition uPred_fupd `{!invG Σ} : FUpd (iProp Σ):= uPred_fupd_aux.(unseal).
Definition uPred_fupd_eq `{!invG Σ} : @fupd _ uPred_fupd = uPred_fupd_def :=
uPred_fupd_aux.(seal_eq).
Lemma uPred_fupd_mixin `{invG Σ} : BiFUpdMixin (uPredSI (iResUR Σ)) uPred_fupd.
Lemma uPred_fupd_mixin `{!invG Σ} : BiFUpdMixin (uPredSI (iResUR Σ)) uPred_fupd.
Proof.
split.
- rewrite uPred_fupd_eq. solve_proper.
......@@ -32,13 +32,13 @@ Proof.
iIntros "!> !>". by iApply "HP".
- rewrite uPred_fupd_eq /uPred_fupd_def. by iIntros (????) "[HwP $]".
Qed.
Instance uPred_bi_fupd `{invG Σ} : BiFUpd (uPredSI (iResUR Σ)) :=
Instance uPred_bi_fupd `{!invG Σ} : BiFUpd (uPredSI (iResUR Σ)) :=
{| bi_fupd_mixin := uPred_fupd_mixin |}.
Instance uPred_bi_bupd_fupd `{invG Σ} : BiBUpdFUpd (uPredSI (iResUR Σ)).
Instance uPred_bi_bupd_fupd `{!invG Σ} : BiBUpdFUpd (uPredSI (iResUR Σ)).
Proof. rewrite /BiBUpdFUpd uPred_fupd_eq. by iIntros (E P) ">? [$ $] !> !>". Qed.
Instance uPred_bi_fupd_plainly `{invG Σ} : BiFUpdPlainly (uPredSI (iResUR Σ)).
Instance uPred_bi_fupd_plainly `{!invG Σ} : BiFUpdPlainly (uPredSI (iResUR Σ)).
Proof.
split.
- rewrite uPred_fupd_eq /uPred_fupd_def. iIntros (E P) "H [Hw HE]".
......@@ -59,8 +59,8 @@ Proof.
by iFrame.
Qed.
Lemma fupd_plain_soundness `{invPreG Σ} E (P: iProp Σ) `{!Plain P}:
( `{Hinv: invG Σ}, (|={,E}=> P)%I) ( P)%I.
Lemma fupd_plain_soundness `{!invPreG Σ} E (P: iProp Σ) `{!Plain P}:
( `{Hinv: !invG Σ}, (|={,E}=> P)%I) ( P)%I.
Proof.
iIntros (Hfupd). iMod wsat_alloc as (Hinv) "[Hw HE]".
iPoseProof (Hfupd Hinv) as "H".
......@@ -68,8 +68,8 @@ Proof.
iMod ("H" with "[$]") as "[Hw [HE >H']]"; iFrame.
Qed.
Lemma step_fupdN_soundness `{invPreG Σ} φ n :
( `{Hinv: invG Σ}, (|={,}=>^n |={,}=> φ : iProp Σ)%I)
Lemma step_fupdN_soundness `{!invPreG Σ} φ n :
( `{Hinv: !invG Σ}, (|={,}=>^n |={,}=> φ : iProp Σ)%I)
φ.
Proof.
intros Hiter.
......@@ -86,8 +86,8 @@ Proof.
iNext. by iMod "Hφ".
Qed.
Lemma step_fupdN_soundness' `{invPreG Σ} φ n :
( `{Hinv: invG Σ}, (|={,}=>^n φ : iProp Σ)%I)
Lemma step_fupdN_soundness' `{!invPreG Σ} φ n :
( `{Hinv: !invG Σ}, (|={,}=>^n φ : iProp Σ)%I)
φ.
Proof.
iIntros (Hiter). eapply (step_fupdN_soundness _ n).
......
......@@ -28,7 +28,7 @@ Instance subG_gen_heapPreG {Σ L V} `{Countable L} :
Proof. solve_inG. Qed.
Section definitions.
Context `{hG : gen_heapG L V Σ}.
Context `{Countable L, hG : !gen_heapG L V Σ}.
Definition gen_heap_ctx (σ : gmap L V) : iProp Σ :=
own (gen_heap_name hG) ( (to_gen_heap σ)).
......@@ -72,7 +72,7 @@ Section to_gen_heap.
Proof. by rewrite /to_gen_heap fmap_delete. Qed.
End to_gen_heap.
Lemma gen_heap_init `{gen_heapPreG L V Σ} σ :
Lemma gen_heap_init `{Countable L, !gen_heapPreG L V Σ} σ :
(|==> _ : gen_heapG L V Σ, gen_heap_ctx σ)%I.
Proof.
iMod (own_alloc ( to_gen_heap σ)) as (γ) "Hh".
......@@ -81,7 +81,7 @@ Proof.
Qed.
Section gen_heap.
Context `{gen_heapG L V Σ}.
Context `{Countable L, !gen_heapG L V Σ}.
Implicit Types P Q : iProp Σ.
Implicit Types Φ : V iProp Σ.
Implicit Types σ : gmap L V.
......
......@@ -7,7 +7,7 @@ Set Default Proof Using "Type".
Import uPred.
(** Derived forms and lemmas about them. *)
Definition inv_def `{invG Σ} (N : namespace) (P : iProp Σ) : iProp Σ :=
Definition inv_def `{!invG Σ} (N : namespace) (P : iProp Σ) : iProp Σ :=
( i P', i (N:coPset) (P' P) ownI i P')%I.
Definition inv_aux : seal (@inv_def). by eexists. Qed.
Definition inv {Σ i} := inv_aux.(unseal) Σ i.
......@@ -16,7 +16,7 @@ Instance: Params (@inv) 3 := {}.
Typeclasses Opaque inv.
Section inv.
Context `{invG Σ}.
Context `{!invG Σ}.
Implicit Types i : positive.
Implicit Types N : namespace.
Implicit Types P Q R : iProp Σ.
......
......@@ -16,7 +16,7 @@ Instance subG_na_invG {Σ} : subG na_invΣ Σ → na_invG Σ.
Proof. solve_inG. Qed.
Section defs.
Context `{invG Σ, na_invG Σ}.
Context `{!invG Σ, !na_invG Σ}.
Definition na_own (p : na_inv_pool_name) (E : coPset) : iProp Σ :=
own p (CoPset E, GSet ).
......@@ -30,7 +30,7 @@ Instance: Params (@na_inv) 3 := {}.
Typeclasses Opaque na_own na_inv.
Section proofs.
Context `{invG Σ, na_invG Σ}.
Context `{!invG Σ, !na_invG Σ}.
Global Instance na_own_timeless p E : Timeless (na_own p E).
Proof. rewrite /na_own; apply _. Qed.
......
......@@ -47,11 +47,11 @@ Ltac solve_inG :=
split; (assumption || by apply _).
(** * Definition of the connective [own] *)
Definition iRes_singleton `{i : inG Σ A} (γ : gname) (a : A) : iResUR Σ :=
Definition iRes_singleton {Σ A} {i : inG Σ A} (γ : gname) (a : A) : iResUR Σ :=
ofe_fun_singleton (inG_id i) {[ γ := cmra_transport inG_prf a ]}.
Instance: Params (@iRes_singleton) 4 := {}.
Definition own_def `{inG Σ A} (γ : gname) (a : A) : iProp Σ :=
Definition own_def `{!inG Σ A} (γ : gname) (a : A) : iProp Σ :=
uPred_ownM (iRes_singleton γ a).
Definition own_aux : seal (@own_def). by eexists. Qed.
Definition own {Σ A i} := own_aux.(unseal) Σ A i.
......@@ -61,7 +61,7 @@ Typeclasses Opaque own.
(** * Properties about ghost ownership *)
Section global.
Context `{inG Σ A}.
Context `{Hin: !inG Σ A}.
Implicit Types a : A.
(** ** Properties of [iRes_singleton] *)
......@@ -113,9 +113,9 @@ Proof. rewrite !own_eq /own_def; apply _. Qed.
Lemma later_own γ a : own γ a - ( b, own γ b (a b)).
Proof.
rewrite own_eq /own_def later_ownM. apply exist_elim=> r.
assert (NonExpansive (λ r : iResUR Σ, r (inG_id H) !! γ)).
assert (NonExpansive (λ r : iResUR Σ, r (inG_id Hin) !! γ)).
{ intros n r1 r2 Hr. f_equiv. by specialize (Hr (inG_id _)). }
rewrite (f_equiv (λ r : iResUR Σ, r (inG_id H) !! γ) _ r).
rewrite (f_equiv (λ r : iResUR Σ, r (inG_id H