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.
finWordRawCollapseEquivremembers the maximal inside blocks and the collapsed outside word. Its codomain records the original length, so this is an equivalence forFin n-indexed words rather than merely for lists.- The flattened inside word
π₁, its composition, the proper cut setO, and the collapsed wordπ₂are canonical projections of that data.
No cardinality or quotient argument occurs here: reconstruction is by
List.splitWrtComposition followed by expand.
The codomain already used by wordCollapseEquiv, now given a reusable name.
Equations
Instances For
The maximal inside blocks.
Instances For
The word in which each maximal inside block is replaced by a marker.
Instances For
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
- d.insideList = d.blocks.flatten
Instances For
The number of inside letters.
Equations
Instances For
The composition recording the lengths of the maximal inside blocks.
Equations
- d.blockComposition = { blocks := List.map List.length d.blocks, blocks_pos := ⋯, blocks_sum := ⋯ }
Instances For
Splitting π₁ at the recorded composition cuts recovers the maximal
inside blocks in order.
The inside word π₁, indexed by its finite length.
Equations
- d.insideWord = List.Vector.get ⟨d.insideList, ⋯⟩
Instances For
The collapsed word π₂, indexed by its finite length.
Equations
- d.collapsedWord = List.Vector.get ⟨d.collapsed, ⋯⟩
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
- d.markerPositions = {i : Fin d.collapsed.length | (d.collapsedWord i).isLeft = true}
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
The paper's selected cut set O: the proper partial sums of the block
composition, represented as gaps of π₁.
Equations
Instances For
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).
The original word is recovered by inserting the composition blocks into the marker occurrences of the compound letter, in order.
Raw collapse data whose expansion has the prescribed finite length.
Equations
- Anderson4D.FixedRawCollapseData A B n = { d : Anderson4D.RawCollapseData A B // d.expandedLength = n }
Instances For
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
Finite raw collapse equivalence. This lifts the list equivalence to
the Fin n → A ⊕ B carrier of validWords.
Equations
- Anderson4D.finWordRawCollapseEquiv A B n = (Anderson4D.finWordVectorEquiv (A ⊕ B) n).trans (Anderson4D.vectorRawCollapseEquiv A B n)
Instances For
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 #
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
Count an inside letter in a finite sum-word by counting its index fiber.
Count an outside letter in a finite sum-word by counting its index fiber.
validWords transports exactly to the inside-block and outside-word
multiplicity conditions.
The same transport stated directly through the finite raw equivalence.