Documentation

HexPermGroup.Normalize

theorem Hex.PermGroup.Chain.before_trans {n : Nat} {p q r : Perm n} (hpq : before p q) (hqr : before q r) :
before p r
structure Hex.PermGroup.Generator {n : Nat} (S : Array (Perm n)) :

A working generator with its signed input reference. Its permutation is cached, so sorting never recomputes inverses.

Instances For
    def Hex.PermGroup.Generator.ofIndex {n : Nat} (S : Array (Perm n)) (i : Fin S.size) (inverse : Bool) :
    Equations
    Instances For
      theorem Hex.PermGroup.Generator.images_injective {n : Nat} {p q : Perm n} (h : images p = images q) :
      p = q
      def Hex.PermGroup.Generator.le {n : Nat} {S : Array (Perm n)} (x y : Generator S) :

      The non-strict ordering used by merge sort; the checker retains its separate strict comparison on image arrays.

      Equations
      Instances For
        theorem Hex.PermGroup.Generator.le_trans {n : Nat} {S : Array (Perm n)} (x y z : Generator S) (hxy : x.le y = true) (hyz : y.le z = true) :
        x.le z = true
        theorem Hex.PermGroup.Generator.le_total {n : Nat} {S : Array (Perm n)} (x y : Generator S) :
        (x.le y || y.le x) = true
        theorem Hex.PermGroup.Generator.before_of_le {n : Nat} {S : Array (Perm n)} {x y : Generator S} (hle : x.le y = true) (hne : x.value ≠ y.value) :

        Remove adjacent equal values from a sorted list. Equal values keep the last input reference in their stable-sort block.

        Equations
        Instances For
          theorem Hex.PermGroup.Generator.compact_sorted {n : Nat} {S : Array (Perm n)} (xs : List (Generator S)) (hs : List.Pairwise (fun (x y : Generator S) => x.le y = true) xs) :

          Sort the nonidentity signed inputs and keep one reference per permutation.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Hex.PermGroup.Generator.mem_ordered {n : Nat} (S : Array (Perm n)) (p : Perm n) :
            p ∈ List.map value (ordered S) ↔ p ≠ Perm.id n ∧ ∃ (i : Fin S.size), p = S[↑i] ∨ p = S[↑i].inv

            A signed original-generator reference needs at most two program nodes.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              structure Hex.PermGroup.Normalized {n : Nat} (S : Array (Perm n)) :

              A normalized symmetric working array with checked provenance in the original input. Construction establishes both checker predicates unconditionally.

              Instances For

                Normalize without changing the original generator indexing used by programs.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem Hex.PermGroup.Normalized.symmetric {n : Nat} {S : Array (Perm n)} (c : Normalized S) (p : Perm n) (hp : p ∈ c.generators) :
                  theorem Hex.PermGroup.Normalized.fixed {n : Nat} {S : Array (Perm n)} (c : Normalized S) {base : Nat} (h : Chain.Fixed base S) :

                  Transfer provenance through the signed original references retained by normalization. Each output program uses one input program, optionally inverted.

                  Equations
                  Instances For
                    theorem Hex.PermGroup.Normalized.check_wordsFrom {n : Nat} {S : Array (Perm n)} (c : Normalized S) {T : Array (Perm n)} (words : Vector Program S.size) (h : checkWords T S words = true) :