UnionFind monad#195
Draft
hsegoufin wants to merge 28 commits into
Draft
Conversation
hsegoufin
force-pushed
the
UnionFindMonad
branch
from
June 25, 2026 05:26
d8d0f20 to
f923c92
Compare
Owner
|
Please remove the file |
| Require Import preamble. | ||
| From HB Require Import structures. | ||
|
|
||
|
|
Owner
There was a problem hiding this comment.
Please don't add blank lines.
| End join_laws. | ||
| End JoinLaws. | ||
|
|
||
| HB.mixin Record isMonad (F : UU0 -> UU0) of Functor F := { |
Owner
There was a problem hiding this comment.
There is already a factory with the same name.
t6s
reviewed
Jun 26, 2026
| #[short(type=functor)] | ||
| HB.structure Definition Functor := {F of isFunctor F}. | ||
|
|
||
|
|
Comment on lines
+323
to
+324
|
|
||
|
|
Comment on lines
+55
to
+56
|
|
||
|
|
Comment on lines
+185
to
+194
| (*set u := union f x y. | ||
| rewrite find_equation; symmetry; rewrite find_equation. | ||
| case: (ltngtP (find f x) (find f y)) => xy. | ||
| - have Hx : is_root u (find f x) by exact/is_root_unionL/ltnW. | ||
| rewrite Hx /= /union' xy eqxx (ltn_eqF xy). | ||
| exact/find_root. | ||
| - have Hy : is_root u (find f y) by exact/is_root_unionR/ltnW. | ||
| rewrite Hy /= /union' xy ltnNge (ltnW xy) /= eqxx (ltn_eqF xy). | ||
| exact/esym/find_root. | ||
| - by rewrite /= /union' xy ltnn find_is_root.*) |
Collaborator
There was a problem hiding this comment.
Is this comment left intentionally?
Collaborator
There was a problem hiding this comment.
No need to comment, all this is wip.
Yes, it is intentional to compare different proof styles, but it will certainly not be in the final PR.
…ne new that is needed), I also added the changes of the PR preorder and adapted my code accordingly
…ne new that is needed), I also added the changes of the PR preorder and adapted my code accordingly
added 3 commits
July 10, 2026 14:12
… wip in example_union
…el of UnionFail to be FailR0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Interface for UnionFind as a monad and a draft of the model.