diff options
Diffstat (limited to 'lib/UnionFind.v')
-rw-r--r-- | lib/UnionFind.v | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/UnionFind.v b/lib/UnionFind.v index bd1b763b..ee24a9a7 100644 --- a/lib/UnionFind.v +++ b/lib/UnionFind.v @@ -6,10 +6,11 @@ (* *) (* Copyright Institut National de Recherche en Informatique et en *) (* Automatique. All rights reserved. This file is distributed *) -(* under the terms of the GNU General Public License as published by *) -(* the Free Software Foundation, either version 2 of the License, or *) -(* (at your option) any later version. This file is also distributed *) -(* under the terms of the INRIA Non-Commercial License Agreement. *) +(* under the terms of the GNU Lesser General Public License as *) +(* published by the Free Software Foundation, either version 2.1 of *) +(* the License, or (at your option) any later version. *) +(* This file is also distributed under the terms of the *) +(* INRIA Non-Commercial License Agreement. *) (* *) (* *********************************************************************) @@ -563,10 +564,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 +596,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 +614,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 *) |