@[simp]
theorem
Batteries.UnionFind.arr_push
{m : UnionFind}
:
m.push.arr = m.arr.push { parent := m.arr.size, rank := 0 }
@[simp]
@[simp]
@[simp]
theorem
Batteries.UnionFind.root_push
{x : Nat}
{self : UnionFind}
:
self.push.rootD x = self.rootD x
theorem
Batteries.UnionFind.parent_link
{self : UnionFind}
{x y : Fin self.size}
(yroot : self.parent ↑y = ↑y)
{i : Nat}
:
theorem
Batteries.UnionFind.Equiv.symm
{self : UnionFind}
{a b : Nat}
:
self.Equiv a b → self.Equiv b a
theorem
Batteries.UnionFind.Equiv.trans
{self : UnionFind}
{a b c : Nat}
:
self.Equiv a b → self.Equiv b c → self.Equiv a c
@[simp]
theorem
Batteries.UnionFind.equiv_push
{a b : Nat}
{self : UnionFind}
:
self.push.Equiv a b ↔ self.Equiv a b
@[simp]
@[simp]
theorem
Batteries.UnionFind.equiv_rootD_l
{self : UnionFind}
{a b : Nat}
:
self.Equiv (self.rootD a) b ↔ self.Equiv a b
@[simp]
theorem
Batteries.UnionFind.equiv_rootD_r
{self : UnionFind}
{a b : Nat}
:
self.Equiv a (self.rootD b) ↔ self.Equiv a b