Skip to content
Snippets Groups Projects
Verified Commit d7d078a9 authored by Tej Chajed's avatar Tej Chajed
Browse files

Use lia to avoid omega deprecation warnings

Fixes #319
parent 5cb8bc17
No related branches found
No related tags found
No related merge requests found
......@@ -104,17 +104,17 @@ Section tests.
iIntros (Hn) "HΦ".
iInduction (Z.gt_wf n2 n1) as [n1' _] "IH" forall (Hn).
wp_rec. wp_pures. case_bool_decide; wp_if.
- iApply ("IH" with "[%] [%] HΦ"); omega.
- by assert (n1' = n2 - 1) as -> by omega.
- iApply ("IH" with "[%] [%] HΦ"); lia.
- by assert (n1' = n2 - 1) as -> by lia.
Qed.
Lemma Pred_spec n E Φ : Φ #(n - 1) -∗ WP Pred #n @ E [{ Φ }].
Proof.
iIntros "HΦ". wp_lam.
wp_op. case_bool_decide.
- wp_apply FindPred_spec; first omega. wp_pures.
by replace (n - 1) with (- (-n + 2 - 1)) by omega.
- wp_apply FindPred_spec; eauto with omega.
- wp_apply FindPred_spec; first lia. wp_pures.
by replace (n - 1) with (- (-n + 2 - 1)) by lia.
- wp_apply FindPred_spec; eauto with lia.
Qed.
Lemma Pred_user E :
......
......@@ -232,7 +232,7 @@ Section counter_proof.
wp_cmpxchg_suc. iSplitL "Hl Hγ".
{ iNext. iExists (S c). rewrite Nat2Z.inj_succ Z.add_1_l. by iFrame. }
wp_pures. rewrite {3}/C; eauto 10.
- wp_cmpxchg_fail; first (intros [=]; abstract omega).
- wp_cmpxchg_fail; first (intros [=]; abstract lia).
iSplitL "Hl Hγ"; [iNext; iExists c'; by iFrame|].
wp_pures. iApply ("IH" with "[Hγf]"). rewrite {3}/C; eauto 10.
Qed.
......@@ -248,6 +248,6 @@ Section counter_proof.
{ iApply own_op. by iFrame. }
rewrite (auth_frag_op c c); last lia; iDestruct "Hγ" as "[Hγ Hγf']".
iSplitL "Hl Hγ"; [iNext; iExists c; by iFrame|].
rewrite /C; eauto 10 with omega.
rewrite /C; eauto 10 with lia.
Qed.
End counter_proof.
......@@ -422,7 +422,7 @@ Lemma test_iInduction_wf (x : nat) P Q :
Proof.
iIntros "#HP HQ".
iInduction (lt_wf x) as [[|x] _] "IH"; simpl; first done.
rewrite (inj_iff S). by iApply ("IH" with "[%]"); first omega.
rewrite (inj_iff S). by iApply ("IH" with "[%]"); first lia.
Qed.
Lemma test_iInduction_using (m : gmap nat nat) (Φ : nat nat PROP) y :
......
......@@ -48,7 +48,7 @@ Proof.
wp_load. wp_apply ("IH" with "Hl Htl"). iIntros "[Hl Htl]".
wp_load. wp_apply ("IH1" with "Hl Htr"). iIntros "[Hl Htr]".
iApply "HΦ". iSplitL "Hl".
{ by replace (sum tl + sum tr + n) with (sum tr + (sum tl + n)) by omega. }
{ by replace (sum tl + sum tr + n) with (sum tr + (sum tl + n)) by lia. }
iExists ll, lr, vl, vr. by iFrame.
Qed.
......
......@@ -46,7 +46,7 @@ Proof.
iIntros "!> !>". iMod "H" as "(Hσ & He2 & Hefs)". iIntros "!>".
rewrite !app_length /= !app_length.
replace (length t1' + S (length t2' + length efs))
with (length efs + (length t1' + S (length t2'))) by omega. iFrame.
with (length efs + (length t1' + S (length t2'))) by lia. iFrame.
Qed.
Lemma wptp_steps s n e1 t1 κs κs' t2 σ1 σ2 Φ :
......
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