Documentation

HexPermGroup.Partition.Merge

The discrete partition, including the empty partition in degree zero.

Equations
Instances For
    @[simp]
    theorem Hex.PermGroup.Partition.discrete_same {n : Nat} (x y : Fin n) :
    (discrete n).Same x y ↔ x = y

    The single-block partition; in degree zero there are no blocks.

    Equations
    Instances For
      @[simp]
      def Hex.PermGroup.Partition.Refines {n : Nat} (p : Partition n) (R : Fin n → Fin n → Prop) :

      Every block of p lies in one equivalence class of R.

      Equations
      Instances For

        Block representatives in increasing point order.

        Equations
        Instances For
          @[simp]
          theorem Hex.PermGroup.Partition.mem_roots {n : Nat} (p : Partition n) (x : Fin n) :
          x ∈ p.roots ↔ p.labels[↑x] = x
          theorem Hex.PermGroup.Partition.roots_pos {n : Nat} (p : Partition n) (hn : 0 < n) :
          def Hex.PermGroup.Partition.mergeRoots {n : Nat} (p : Partition n) (a b : Fin n) (ha : p.labels[↑a] = a) (_hb : p.labels[↑b] = b) (hab : a ≤ b) :

          Quick-find union: redirect one root and all its points to a smaller root. The direct label array keeps each find constant-time and each union linear.

          Equations
          Instances For
            theorem Hex.PermGroup.Partition.mergeRoots_coarsens {n : Nat} (p : Partition n) (a b : Fin n) (ha : p.labels[↑a] = a) (hb : p.labels[↑b] = b) (hab : a ≤ b) :
            p.Refines (p.mergeRoots a b ha hb hab).Same
            theorem Hex.PermGroup.Partition.mergeRoots_pair {n : Nat} (p : Partition n) (a b : Fin n) (ha : p.labels[↑a] = a) (hb : p.labels[↑b] = b) (hab : a ≤ b) :
            (p.mergeRoots a b ha hb hab).Same a b
            theorem Hex.PermGroup.Partition.mergeRoots_least {n : Nat} (p : Partition n) (a b : Fin n) (ha : p.labels[↑a] = a) (hb : p.labels[↑b] = b) (hab : a ≤ b) {R : Fin n → Fin n → Prop} (hR : Equivalence R) (hp : p.Refines R) (h : R a b) :
            (p.mergeRoots a b ha hb hab).Refines R
            theorem Hex.PermGroup.Partition.mergeRoots_root {n : Nat} (p : Partition n) (a b : Fin n) (ha : p.labels[↑a] = a) (hb : p.labels[↑b] = b) (hab : a ≤ b) (hne : a ≠ b) (x : Fin n) :
            (p.mergeRoots a b ha hb hab).labels[↑x] = x ↔ p.labels[↑x] = x ∧ x ≠ b
            theorem Hex.PermGroup.Partition.roots_mergeRoots {n : Nat} (p : Partition n) (a b : Fin n) (ha : p.labels[↑a] = a) (hb : p.labels[↑b] = b) (hab : a ≤ b) (hne : a ≠ b) :
            (p.mergeRoots a b ha hb hab).roots = p.roots.erase b

            Merge the two blocks, preserving canonical least-point labels.

            Equations
            Instances For
              theorem Hex.PermGroup.Partition.merge_pair {n : Nat} (p : Partition n) (x y : Fin n) :
              (p.merge x y).Same x y
              theorem Hex.PermGroup.Partition.merge_least {n : Nat} (p : Partition n) (x y : Fin n) {R : Fin n → Fin n → Prop} (hR : Equivalence R) (hp : p.Refines R) (h : R x y) :
              (p.merge x y).Refines R

              Union introduces exactly the equivalences forced by the old blocks and the requested pair, for any target equivalence relation.

              theorem Hex.PermGroup.Partition.roots_merge {n : Nat} (p : Partition n) (x y : Fin n) (h : ¬p.Same x y) :

              Each effective union removes exactly one block.