Documentation

HexPermGroup.Build

Every level of a chain, including the terminal one, has a symmetric working generator array.

Equations
Instances For

    The chain below the first level; a terminal chain is its own suffix.

    Equations
    Instances For
      theorem Hex.PermGroup.Chain.checkFrom_suffix {n : Nat} {c : Chain n} {base : Nat} (hb : base < n) (h : c.checkFrom base = true) :

      A symmetric working array normalizes to itself, with one generator reference as the provenance of each element.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Hex.PermGroup.Normalized.mem_push {n : Nat} {S : Array (Perm n)} (c : Normalized S) {p : Perm n} (d : Normalized (S.push p)) {x : Perm n} (hx : x ∈ c.generators) :

        Adding an input generator keeps every normalized generator.

        def Hex.PermGroup.embedWord {n : Nat} (U : Array (Perm n)) (x : Perm n) :

        A one-reference program for an element of U, or the identity if it is absent.

        Equations
        Instances For
          theorem Hex.PermGroup.check_embedWord {n : Nat} (U : Array (Perm n)) {x : Perm n} (hx : x ∈ U) :

          Programs for the elements of T as references into an array U containing them.

          Equations
          Instances For
            theorem Hex.PermGroup.check_embedWords {n : Nat} (U T : Array (Perm n)) (h : ∀ (x : Perm n), x ∈ T → x ∈ U) :
            def Hex.PermGroup.transferWords {n : Nat} (U : Array (Perm n)) {T R : Array (Perm n)} (h : ∀ (x : Perm n), x ∈ T → x ∈ U) (words : Vector Program R.size) (hw : checkWords T R words = true) :

            Move programs over T to programs over a larger array U.

            Equations
            Instances For
              theorem Hex.PermGroup.check_transferWords {n : Nat} (U : Array (Perm n)) {T R : Array (Perm n)} (h : ∀ (x : Perm n), x ∈ T → x ∈ U) (words : Vector Program R.size) (hw : checkWords T R words = true) :
              checkWords U R (transferWords U h words hw) = true
              structure Hex.PermGroup.Construction {n : Nat} (S : Array (Perm n)) (base : Nat) :

              A complete suffix for a supplied input, retaining its normalization map for provenance transfer when used beneath another chain level.

              Instances For
                theorem Hex.PermGroup.Construction.accepts_iff {n : Nat} {S : Array (Perm n)} {base : Nat} (c : Construction S base) (p : Perm n) :
                def Hex.PermGroup.Construction.reword {n : Nat} {S : Array (Perm n)} {base : Nat} (c : Construction S base) (words : Vector Program S.size) :

                Give a complete suffix provenance in its preceding level.

                Equations
                Instances For
                  @[simp]
                  theorem Hex.PermGroup.Construction.reword_checked {n : Nat} {S : Array (Perm n)} {base : Nat} (c : Construction S base) (words : Vector Program S.size) :
                  (c.reword words).checkFrom base = true
                  @[simp]
                  theorem Hex.PermGroup.Construction.reword_generators {n : Nat} {S : Array (Perm n)} {base : Nat} (c : Construction S base) (words : Vector Program S.size) :
                  theorem Hex.PermGroup.Construction.reword_words {n : Nat} {S : Array (Perm n)} {base : Nat} (c : Construction S base) {T : Array (Perm n)} (words : Vector Program S.size) (hw : checkWords T S words = true) :
                  checkWords T (c.reword words).generators (c.reword words).words = true
                  theorem Hex.PermGroup.Construction.reword_accepts {n : Nat} {S : Array (Perm n)} {base : Nat} (c : Construction S base) (words : Vector Program S.size) (p : Perm n) :
                  (c.reword words).accepts base p = true ↔ Generated S p
                  theorem Hex.PermGroup.Construction.reword_working {n : Nat} {S : Array (Perm n)} {base : Nat} (c : Construction S base) (words : Vector Program S.size) :
                  (c.reword words).AllWorking
                  def Hex.PermGroup.Construction.ofChain {n : Nat} (c : Chain n) (base : Nat) (hc : c.checkFrom base = true) (hw : c.AllWorking) :

                  Reuse a checked chain as a complete suffix for its own top-level generators.

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

                    Retained generators, with provenance in the preceding level and fixed-point conditions for the complete suffix being rebuilt.

                    Instances For
                      def Hex.PermGroup.Build.Seeds.empty {n : Nat} (S : Array (Perm n)) (base : Nat) :
                      Seeds S base
                      Equations
                      Instances For
                        def Hex.PermGroup.Build.Seeds.push {n : Nat} {S : Array (Perm n)} {base : Nat} (s : Seeds S base) (p : Perm n) (w : Program) (hw : checkWord S p w = true) (hf : ∀ (x : Fin n), ↑x < base → p.get x = x) :
                        Seeds S base
                        Equations
                        Instances For
                          theorem Hex.PermGroup.Build.Seeds.push_mono {n : Nat} {S : Array (Perm n)} {base : Nat} (s : Seeds S base) (p : Perm n) (w : Program) (hw : checkWord S p w = true) (hf : ∀ (x : Fin n), ↑x < base → p.get x = x) {q : Perm n} (hq : Generated s.generators q) :
                          Generated (s.push p w hw hf).generators q
                          theorem Hex.PermGroup.Build.Seeds.push_mem {n : Nat} {S : Array (Perm n)} {base : Nat} (s : Seeds S base) (p : Perm n) (w : Program) (hw : checkWord S p w = true) (hf : ∀ (x : Fin n), ↑x < base → p.get x = x) :
                          Generated (s.push p w hw hf).generators p
                          structure Hex.PermGroup.Build.State {n : Nat} (S : Array (Perm n)) (base : Nat) :

                          Filtering always keeps a complete chain for exactly the retained generators.

                          Instances For
                            structure Hex.PermGroup.Build.Candidate {n : Nat} (S : Array (Perm n)) (base : Nat) :

                            A candidate's program is delayed until insertion, so discarded Schreier elements allocate neither copied transporter programs nor provenance arrays.

                            Instances For
                              @[reducible, inline]

                              Extend a complete suffix by one input generator.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                def Hex.PermGroup.Build.State.insert {n : Nat} {S : Array (Perm n)} {base : Nat} (extend : Extender n base) (s : State S base) (p : Perm n) (w : Unit → Program) (hw : checkWord S p (w ()) = true) (hf : ∀ (x : Fin n), ↑x < base → p.get x = x) :
                                State S base

                                Inspect one candidate using a complete sift. A successful sift leaves the state alone; a failure inserts the generator and extends the current suffix.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  theorem Hex.PermGroup.Build.State.insert_mono {n : Nat} {S : Array (Perm n)} {base : Nat} (build : Extender n base) (s : State S base) (p : Perm n) (w : Unit → Program) (hw : checkWord S p (w ()) = true) (hf : ∀ (x : Fin n), ↑x < base → p.get x = x) {q : Perm n} (hq : Generated s.seeds.generators q) :
                                  Generated (insert build s p w hw hf).seeds.generators q
                                  theorem Hex.PermGroup.Build.State.insert_mem {n : Nat} {S : Array (Perm n)} {base : Nat} (build : Extender n base) (s : State S base) (p : Perm n) (w : Unit → Program) (hw : checkWord S p (w ()) = true) (hf : ∀ (x : Fin n), ↑x < base → p.get x = x) :
                                  Generated (insert build s p w hw hf).seeds.generators p
                                  theorem Hex.PermGroup.Build.State.insert_strict {n : Nat} {S : Array (Perm n)} {base : Nat} (build : Extender n base) (s : State S base) (p : Perm n) (w : Unit → Program) (hw : checkWord S p (w ()) = true) (hf : ∀ (x : Fin n), ↑x < base → p.get x = x) (h : s.result.chain.accepts base p = false) :

                                  A failed complete sift supplies a witness that insertion strictly enlarges the retained subgroup. The same claim is not made for an unfinished chain.

                                  def Hex.PermGroup.Build.State.scan {n : Nat} {S : Array (Perm n)} {base : Nat} {ι : Type} (build : Extender n base) (family : ι → Candidate S base) (s : State S base) :
                                  List ι → State S base

                                  Stream candidates in their supplied order, extending the suffix only after an exact nonmembership verdict from the current complete suffix.

                                  Equations
                                  Instances For
                                    theorem Hex.PermGroup.Build.State.scan_mono {n : Nat} {S : Array (Perm n)} {base : Nat} {ι : Type} (build : Extender n base) (family : ι → Candidate S base) (s : State S base) (is : List ι) {p : Perm n} (hp : Generated s.seeds.generators p) :
                                    Generated (scan build family s is).seeds.generators p
                                    theorem Hex.PermGroup.Build.State.scan_mem {n : Nat} {S : Array (Perm n)} {base : Nat} {ι : Type} (build : Extender n base) (family : ι → Candidate S base) (s : State S base) (is : List ι) (i : ι) (hi : i ∈ is) :
                                    Generated (scan build family s is).seeds.generators (family i).value
                                    def Hex.PermGroup.Build.family {n : Nat} {S : Array (Perm n)} {base : Nat} (hbase : base < n) (normal : Normalized S) (hf : Chain.Fixed base S) (orbit : { c : Orbit n // Orbit.Valid normal.generators ⟨base, hbase⟩ c }) (pair : Fin normal.generators.size × Fin orbit.val.points.size) :
                                    Candidate normal.generators (base + 1)

                                    The Schreier candidates of one level: h(s, x) for each symmetric generator s and orbit point x, with delayed words in the level generators.

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

                                      All Schreier pairs of a level, generator-major.

                                      Equations
                                      Instances For
                                        theorem Hex.PermGroup.Build.mem_pairs {r q : Nat} (i : Fin r) (x : Fin q) :
                                        (i, x) ∈ pairs r q
                                        def Hex.PermGroup.Build.assemble {n : Nat} {S : Array (Perm n)} {base : Nat} (hbase : base < n) (normal : Normalized S) (hf : Chain.Fixed base S) (orbit : { c : Orbit n // Orbit.Valid normal.generators ⟨base, hbase⟩ c }) (result : State normal.generators (base + 1)) (hall : ∀ (pair : Fin normal.generators.size × Fin orbit.val.points.size), Generated result.seeds.generators (family hbase normal hf orbit pair).value) :

                                        Assemble a level from a final scan state whose retained generators generate every Schreier candidate of the level.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          def Hex.PermGroup.Build.complete {n : Nat} {S : Array (Perm n)} {base : Nat} (hbase : base < n) (normal : Normalized S) (hf : Chain.Fixed base S) (orbit : { c : Orbit n // Orbit.Valid normal.generators ⟨base, hbase⟩ c }) (extend : Extender n (base + 1)) (initial : State normal.generators (base + 1)) :

                                          Complete one level from a starting state for its suffix: stream every Schreier pair against the current complete suffix, extending it at each rejection. The starting state may already contain retained generators.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            def Hex.PermGroup.Build.terminal {n : Nat} {S : Array (Perm n)} {base : Nat} (hbase : ¬base < n) (hb : base ≤ n) (normal : Normalized S) (hf : Chain.Fixed base S) :

                                            The terminal level: every generator fixes every point.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              def Hex.PermGroup.Build.resume {n : Nat} {S : Array (Perm n)} {base : Nat} (hbase : base < n) (c : Construction S base) {p : Perm n} (normal : Normalized (S.push p)) :
                                              State normal.generators (base + 1)

                                              The starting state for extending a complete suffix by one generator: the suffix below its first level, with provenance moved to the new level's generators, which contain the old ones.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                @[irreducible]
                                                def Hex.PermGroup.Build.extend {n : Nat} (base : Nat) (hb : base ≤ n) (S : Array (Perm n)) (c : Construction S base) (p : Perm n) (hf : Chain.Fixed base (S.push p)) :
                                                Construction (S.push p) base

                                                Add one generator to a complete suffix. The previous suffix below this level becomes the starting state of the new level's scan, so only Schreier generators that it rejects cause recursive extensions; nothing is rebuilt from scratch.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  @[irreducible]
                                                  def Hex.PermGroup.Build.empty {n : Nat} (base : Nat) (hb : base ≤ n) :

                                                  A complete chain for the trivial subgroup.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    def Hex.PermGroup.Build.build {n : Nat} (base : Nat) (hb : base ≤ n) (S : Array (Perm n)) (hf : Chain.Fixed base S) :

                                                    Deterministic Schreier-Sims construction. The first level streams its Schreier generators against a complete chain for those retained so far, starting from the trivial chain and extended at each rejection; that chain is the suffix.

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

                                                      Construct a complete checked group for every input generator array. Original indices are retained even when normalization removes identities or duplicates.

                                                      Equations
                                                      Instances For