aboutsummaryrefslogtreecommitdiffstats
path: root/lib/UnionFind.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-06-21 18:22:00 +0200
committerXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-29 15:29:56 +0100
commitaba0e740f25ffa5c338dfa76cab71144802cebc2 (patch)
tree746115009aa60b802a2b5369a5106a2e971eb22f /lib/UnionFind.v
parent2e202e2b17cc3ae909628b7b3ae0b8ede3117d82 (diff)
downloadcompcert-kvx-aba0e740f25ffa5c338dfa76cab71144802cebc2.tar.gz
compcert-kvx-aba0e740f25ffa5c338dfa76cab71144802cebc2.zip
Replace `omega` tactic with `lia`
Since Coq 8.12, `omega` is flagged as deprecated and scheduled for removal. Also replace CompCert's homemade tactics `omegaContradiction`, `xomega`, and `xomegaContradiction` with `lia` and `extlia`. Turn back on the deprecation warning for uses of `omega`. Make the proof of `Ctypes.sizeof_pos` more robust to variations in `lia`.
Diffstat (limited to 'lib/UnionFind.v')
-rw-r--r--lib/UnionFind.v6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/UnionFind.v b/lib/UnionFind.v
index 20bb91cd..c4a2f5b1 100644
--- a/lib/UnionFind.v
+++ b/lib/UnionFind.v
@@ -552,10 +552,10 @@ Proof.
rewrite H; auto. simpl in G. rewrite M.gsspec in G.
destruct (M.elt_eq x0 (repr uf a)). rewrite e. rewrite repr_canonical. rewrite dec_eq_true.
inversion G. subst x'. rewrite dec_eq_false; auto.
- replace (pathlen uf (repr uf a)) with 0. omega.
+ replace (pathlen uf (repr uf a)) with 0. lia.
symmetry. apply pathlen_none. apply repr_res_none.
rewrite (repr_unroll uf x0), (pathlen_unroll uf x0); rewrite G.
- destruct (M.elt_eq (repr uf x') (repr uf a)); omega.
+ destruct (M.elt_eq (repr uf x') (repr uf a)); lia.
simpl in G. rewrite M.gsspec in G. destruct (M.elt_eq x0 (repr uf a)); try discriminate.
rewrite (repr_none uf x0) by auto. rewrite dec_eq_false; auto.
symmetry. apply pathlen_zero; auto. apply repr_none; auto.
@@ -570,7 +570,7 @@ Proof.
intros. repeat rewrite pathlen_merge.
destruct (M.elt_eq (repr uf a) (repr uf b)). auto.
rewrite H. destruct (M.elt_eq (repr uf y) (repr uf a)).
- omega. auto.
+ lia. auto.
Qed.
(* Path compression *)