Documentation

HexPermGroup.Check

def Hex.PermGroup.checkWords {n : Nat} (S T : Array (Perm n)) (words : Vector Program T.size) :

Check every generator's provenance in the preceding generator array.

Equations
Instances For
    theorem Hex.PermGroup.checkWords_sound {n : Nat} {S T : Array (Perm n)} {words : Vector Program T.size} (h : checkWords S T words = true) {p : Perm n} (hp : Generated T p) :

    Replace provenance at the top level. Internal chain checking does not inspect these words; the caller checks them against the new preceding generator array.

    Equations
    Instances For
      @[simp]
      theorem Hex.PermGroup.Chain.words_reword {n : Nat} (c : Chain n) (words : Vector Program c.generators.size) :
      (c.reword words).words.toArray = words.toArray
      @[simp]
      theorem Hex.PermGroup.Chain.checkWords_reword {n : Nat} (S : Array (Perm n)) (c : Chain n) (words : Vector Program c.generators.size) :
      checkWords S (c.reword words).generators (c.reword words).words = checkWords S c.generators words

      Strict lexicographic order of permutation image arrays.

      Equations
      Instances For

        The normalized working-array invariants, checked independently of sorting.

        Equations
        Instances For
          @[instance_reducible]
          Equations
          • One or more equations did not get rendered due to their size.
          def Hex.PermGroup.Chain.Fixed {n : Nat} (base : Nat) (S : Array (Perm n)) :

          Every level generator fixes all preceding points of the fixed base.

          Equations
          Instances For
            @[instance_reducible]
            instance Hex.PermGroup.Chain.instDecidableFixed {n : Nat} (base : Nat) (S : Array (Perm n)) :
            Decidable (Fixed base S)
            Equations
            • One or more equations did not get rendered due to their size.

            The initial working array is exactly the sorted, deduplicated nonidentity input generators and their inverses. Original indices are retained by the separate provenance programs.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.

              Complete suffix checking. Each level recomputes every Schreier generator; no producer-supplied list is used as evidence that all pairs were considered.

              Equations
              Instances For
                @[simp]
                theorem Hex.PermGroup.Chain.checkFrom_reword {n : Nat} (c : Chain n) (words : Vector Program c.generators.size) (base : Nat) :
                (c.reword words).checkFrom base = c.checkFrom base

                Changing top-level provenance preserves the independently checked suffix.

                theorem Hex.PermGroup.Chain.checkFrom_fixed {n : Nat} {c : Chain n} {base : Nat} (h : c.checkFrom base = true) :

                Accepted suffixes retain the fixed-point conditions, including at the terminal stage.

                theorem Hex.PermGroup.Chain.checkFrom_length {n : Nat} {c : Chain n} {base : Nat} (h : c.checkFrom base = true) :
                base + c.length = n

                Completeness checking enforces the full base length.

                theorem Hex.PermGroup.Chain.checkFrom_sound {n : Nat} {c : Chain n} {base : Nat} (h : c.checkFrom base = true) (p : Perm n) :

                Successful and failed sifts are exact membership decisions after complete suffix verification. The induction uses only the already checked suffix when interpreting its Schreier-pair sifts as membership evidence.

                def Hex.PermGroup.checkChain {n : Nat} (S : Array (Perm n)) (c : Chain n) :

                A complete chain for precisely the original input generators.

                Equations
                Instances For
                  theorem Hex.PermGroup.checkChain_length {n : Nat} {S : Array (Perm n)} {c : Chain n} (h : checkChain S c = true) :
                  c.length = n

                  A checked chain has exactly one level for every point of the fixed base.

                  theorem Hex.PermGroup.sift_iff {n : Nat} {S : Array (Perm n)} {c : Chain n} (h : checkChain S c = true) (p : Perm n) :

                  Complete checking makes sifting equivalent to membership in the original generated subgroup, for every query permutation.

                  theorem Hex.PermGroup.checkChain_sound {n : Nat} {S : Array (Perm n)} {c : Chain n} (h : checkChain S c = true) {p : Perm n} (hp : c.accepts 0 p = true) :

                  Membership soundness of a complete-chain check.