aboutsummaryrefslogtreecommitdiffstats
path: root/lib/UnionFind.v
diff options
context:
space:
mode:
Diffstat (limited to 'lib/UnionFind.v')
-rw-r--r--lib/UnionFind.v8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/UnionFind.v b/lib/UnionFind.v
index bd1b763b..ae2c30d2 100644
--- a/lib/UnionFind.v
+++ b/lib/UnionFind.v
@@ -563,10 +563,10 @@ Proof.
destruct (M.elt_eq x0 (repr uf a)).
- rewrite e, repr_canonical, dec_eq_true.
inversion G. subst x'. rewrite dec_eq_false; auto.
- replace (pathlen uf (repr uf a)) with 0; try omega.
+ replace (pathlen uf (repr uf a)) with 0; try lia.
symmetry. apply pathlen_none. apply repr_res_none.
- rewrite (repr_unroll uf x0), (pathlen_unroll uf x0), G.
- destruct (M.elt_eq (repr uf x') (repr uf a)); omega.
+ destruct (M.elt_eq (repr uf x') (repr uf a)); lia.
+ clear H; 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.
@@ -595,7 +595,7 @@ Proof.
- inversion G; clear G. subst.
rewrite !repr_canonical, dec_eq_true.
rewrite dec_eq_false; auto.
- rewrite LENa. rewrite (pathlen_none uf (repr uf b)); try omega.
+ rewrite LENa. rewrite (pathlen_none uf (repr uf b)); try lia.
apply repr_res_none.
- rewrite (repr_unroll uf x0), G, ! (pathlen_some _ _ _ G).
destruct (M.elt_eq _ _); auto.
@@ -613,7 +613,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 *)