Documentation

Anderson4D.PermSum.CollapseWords

Finite-word collapse data for the Proposition 5.9 induction #

This file upgrades the list-level collapse equivalence in PermSum/Words.lean to the actual finite words used by validWords.

There are two deliberately separate stages.

No cardinality or quotient argument occurs here: reconstruction is by List.splitWrtComposition followed by expand.

@[reducible, inline]
abbrev Anderson4D.RawCollapseData (A : Type u_3) (B : Type u_4) :
Type (max 0 u_3 u_4)

The codomain already used by wordCollapseEquiv, now given a reusable name.

Equations
Instances For
    def Anderson4D.RawCollapseData.blocks {A : Type u_1} {B : Type u_2} (d : RawCollapseData A B) :

    The maximal inside blocks.

    Equations
    Instances For

      The word in which each maximal inside block is replaced by a marker.

      Equations
      Instances For
        def Anderson4D.RawCollapseData.expandWord {A : Type u_1} {B : Type u_2} (d : RawCollapseData A B) :
        List (A ⊕ B)

        Reconstruct the uncollapsed list.

        Equations
        Instances For

          The length before collapse.

          Equations
          Instances For

            The inside letters, with the maximal blocks concatenated in order.

            Equations
            Instances For

              The number of inside letters.

              Equations
              Instances For

                The composition recording the lengths of the maximal inside blocks.

                Equations
                Instances For
                  @[simp]

                  Splitting π₁ at the recorded composition cuts recovers the maximal inside blocks in order.

                  The inside word π₁, indexed by its finite length.

                  Equations
                  Instances For

                    The collapsed word π₂, indexed by its finite length.

                    Equations
                    Instances For

                      Marker positions in π₂. There is one marker per inside block.

                      These are not the paper's cut set O: their cardinality is the number of blocks, whereas O contains the proper cuts and has one fewer element.

                      Equations
                      Instances For

                        There is one marker position for every maximal inside block.

                        Equivalently, the marker set has the length of the block composition.

                        The embedding of proper composition cuts into the gaps of π₁.

                        The value is the zero-based index of the letter immediately before the cut: the proper partial sum after block i, minus one.

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

                          The paper's selected cut set O: the proper partial sums of the block composition, represented as gaps of π₁.

                          Equations
                          Instances For
                            @[simp]

                            The degenerate-case-safe cut count: zero blocks and one block both have no proper cuts.

                            Universal cut ledger, including the zero-block degeneration.

                            In the nonempty case used in §5.4.1, |O| + 1 is the number of inside blocks (the paper's s + 1).

                            @[simp]

                            The original word is recovered by inserting the composition blocks into the marker occurrences of the compound letter, in order.

                            @[reducible, inline]
                            abbrev Anderson4D.FixedRawCollapseData (A : Type u_3) (B : Type u_4) (n : ℕ) :
                            Type (max 0 u_3 u_4)

                            Raw collapse data whose expansion has the prescribed finite length.

                            Equations
                            Instances For
                              def Anderson4D.finWordVectorEquiv (α : Type u_3) (n : ℕ) :
                              (Fin n → α) ≃ List.Vector α n

                              Fixed-length lists are finite words.

                              Equations
                              Instances For

                                Restrict wordCollapseEquiv to vectors of a fixed length.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def Anderson4D.finWordRawCollapseEquiv (A : Type u_3) (B : Type u_4) (n : ℕ) :
                                  (Fin n → A ⊕ B) ≃ FixedRawCollapseData A B n

                                  Finite raw collapse equivalence. This lifts the list equivalence to the Fin n → A ⊕ B carrier of validWords.

                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem Anderson4D.finWordRawCollapseEquiv_expandedLength {A : Type u_1} {B : Type u_2} {n : ℕ} (w : Fin n → A ⊕ B) :

                                    Length transport is part of the finite equivalence's codomain.

                                    @[simp]
                                    theorem Anderson4D.finWordRawCollapseEquiv_expandWord {A : Type u_1} {B : Type u_2} {n : ℕ} (w : Fin n → A ⊕ B) :

                                    The list reconstructed from the finite collapse coordinates is exactly the list underlying the original finite word.

                                    def Anderson4D.finWordCollapseEquiv (A : Type u_3) (B : Type u_4) (n : ℕ) :
                                    (Fin n → A ⊕ B) ≃ FixedRawCollapseData A B n

                                    Finite (π₁, O, π₂) collapse equivalence.

                                    The codomain stores the maximal blocks; insideWord, blockComposition, cutIndices, and collapsedWord are its canonical (π₁, O, π₂) coordinates. The inverse inserts the blocks at the marker occurrences of π₂ in order.

                                    Equations
                                    Instances For

                                      Length and multiplicity transport #

                                      def Anderson4D.CollapseMultiplicitySpec {A : Type u_1} {B : Type u_2} [DecidableEq A] [DecidableEq B] (mult : A ⊕ B → ℕ) (d : RawCollapseData A B) :

                                      Multiplicity specification on raw collapse data. Inside counts are summed over the composition blocks; outside counts are read from π₂.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        theorem Anderson4D.count_inl_ofFn_eq_fiberCard {A : Type u_1} {B : Type u_2} [DecidableEq A] [DecidableEq B] {n : ℕ} (w : Fin n → A ⊕ B) (a : A) :
                                        List.count (Sum.inl a) (List.ofFn w) = {i : Fin n | w i = Sum.inl a}.card

                                        Count an inside letter in a finite sum-word by counting its index fiber.

                                        theorem Anderson4D.count_inr_ofFn_eq_fiberCard {A : Type u_1} {B : Type u_2} [DecidableEq A] [DecidableEq B] {n : ℕ} (w : Fin n → A ⊕ B) (b : B) :
                                        List.count (Sum.inr b) (List.ofFn w) = {i : Fin n | w i = Sum.inr b}.card

                                        Count an outside letter in a finite sum-word by counting its index fiber.

                                        theorem Anderson4D.mem_validWords_iff_collapseMultiplicitySpec {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] {n : ℕ} (mult : A ⊕ B → ℕ) (w : Fin n → A ⊕ B) :

                                        validWords transports exactly to the inside-block and outside-word multiplicity conditions.

                                        theorem Anderson4D.mem_validWords_iff_finWordRawCollapseSpec {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] {n : ℕ} (mult : A ⊕ B → ℕ) (w : Fin n → A ⊕ B) :

                                        The same transport stated directly through the finite raw equivalence.