Documentation

HexPermGroup.Chain

structure Hex.PermGroup.Level (n : Nat) :

One raw chain level, including generator provenance in the preceding level (or the original input array at level zero).

Instances For
    inductive Hex.PermGroup.Chain (n : Nat) :

    Raw stabilizer-chain data. The terminal generator array is checked explicitly; only a successful complete check makes this a group certificate.

    Instances For

      A raw sift records either all orbit digits or its first failure. Negative results have mathematical meaning only after the chain has passed its checker.

      Instances For
        @[simp]
        theorem Hex.PermGroup.SiftResult.accepted_prepend {n : Nat} (digit : Nat) (result : SiftResult n) :
        (prepend digit result).accepted = result.accepted
        Equations
        Instances For

          Number of stored nonterminal levels. The checker requires exactly the remaining number of points in the fixed base.

          Equations
          Instances For
            def Hex.PermGroup.Chain.sift {n : Nat} :
            Chain n → Nat → Perm n → SiftResult n

            Sift by multiplying the current residual on the left by the inverse of its selected representative. Digits are stored with level zero most significant.

            Equations
            Instances For

              sift for compiled code: it multiplies by the stored inverse representatives and skips identity representatives, which the chains of Group.ofGenerators have at every level whose orbit is a single point.

              Equations
              Instances For
                def Hex.PermGroup.Chain.accepts {n : Nat} (c : Chain n) (base : Nat) (p : Perm n) :

                Boolean acceptance of a raw sift. This does not assert completeness.

                Equations
                Instances For
                  @[simp]
                  theorem Hex.PermGroup.Chain.accepts_leaf {n : Nat} (S : Array (Perm n)) (w : Vector Program S.size) (base : Nat) (p : Perm n) :
                  (leaf S w).accepts base p = decide (p = Perm.id n)
                  theorem Hex.PermGroup.Chain.accepts_cons {n : Nat} (level : Level n) (tail : Chain n) (base : Nat) (p : Perm n) :
                  (cons level tail).accepts base p = if hb : base < n then match level.orbit.lookup[↑(p.get ⟨base, hb⟩)] with | none => false | some x => tail.accepts (base + 1) (level.orbit.reps[↑x].inv.comp p) else false

                  The raw orbit-size product, before its interpretation as a group order has been justified by complete checking.

                  Equations
                  Instances For