total_adequacy.v 715 Bytes
Newer Older
1 2 3 4 5 6 7 8
From iris.program_logic Require Export total_adequacy.
From iris.heap_lang Require Export adequacy.
From iris.heap_lang Require Import proofmode notation.
From iris.proofmode Require Import tactics.
Set Default Proof Using "Type".

Definition heap_total Σ `{heapPreG Σ} s e σ φ :
  ( `{heapG Σ}, WP e @ s;  [{ v, ⌜φ v }]%I) 
9
  sn erased_step ([e], σ).
10
Proof.
Ralf Jung's avatar
Ralf Jung committed
11
  intros Hwp; eapply (twp_total _ _); iIntros (?) "".
Ralf Jung's avatar
Ralf Jung committed
12
  iMod (gen_heap_init σ.(heap)) as (?) "Hh".
13
  iMod (proph_map_init [] σ.(used_proph_id)) as (?) "Hp".
Ralf Jung's avatar
Ralf Jung committed
14
  iModIntro.
15 16
  iExists
    (λ σ κs _, (gen_heap_ctx σ.(heap)  proph_map_ctx κs σ.(used_proph_id))%I),
17
    (λ _, True%I); iFrame.
Ralf Jung's avatar
Ralf Jung committed
18
  iApply (Hwp (HeapG _ _ _ _)).
19
Qed.