Marked words, permutation words and the gluing inequalities #
This file is the pure word combinatorics behind the Erdős–Sós theorem; no graph appears in it.
A marked word is one whose last letter satisfies a predicate N. For families A, B, C
of letter sets with C ⊆ A and A R → B X → C (R ∪ X) for disjoint R, X, the exact counting
inequality marked_word_gluing_count bounds the marked cuts qualifying for A plus those
qualifying for B by the ambient allowed cuts plus those qualifying for C. It is proved by
rotating the first A-and-not-C prefix of a cut past the rest of the prefix, an injective
operation into the allowed cuts that do not qualify for B.
permutationWords l is the finite set of permutations of a repetition-free word l, of
cardinality l.length !; the marked cuts of l are counted by its marked letters
(marked_prefix_card), and the allowed cuts are the marked ones plus one empty cut per word
(allowedWordCuts_card).
A full word b :: q has a distinguished first letter b (the root image) and a cut in the
remaining word q. fullWordCount counts the qualifying cuts of all permutation words of a
fixed word l₀; fullWordCount_eq_sum decomposes it by root, full_word_gluing_count lifts
the gluing inequality to full words, and full_word_transfer_count bounds one family by another
through the cut-reversal involution reverseCutPair, losing at most one first cut per word.
Reversible prefix-block rotation for finite marked-word counting.
Cut at the first qualifying marked prefix and rotate it past the rest of an input prefix. Its new prefix is a disjoint difference and hence cannot belong to the second family.
The relation records the reversible block rotation, without choosing a particular implementation of the first-prefix search.
Equations
Instances For
All cuts (l, k) of words l ∈ W with k ≤ m, where the cut is either empty or ends at a
marked letter. This is the ambient family the gluing inequality is counted against.
Equations
- Erdos548.allowedWordCuts W m N = {p ∈ W ×ˢ Finset.range (m + 1) | p.2 = 0 ∨ Erdos548.MarkedEnd N (List.take p.2 p.1)}
Instances For
Cuts (l, k) of words l ∈ W with k ≤ m whose prefix ends at a marked letter and whose
letter set satisfies A.
Equations
- Erdos548.goodWordCuts W m N A = {p ∈ W ×ˢ Finset.range (m + 1) | Erdos548.MarkedEnd N (List.take p.2 p.1) ∧ A (List.take p.2 p.1).toFinset}
Instances For
The exact finite marked-word gluing inequality. The ambient word family must be closed under permutation; every word is repetition-free.
Exact cardinalities of permutation words and marked prefixes.
The finite set of all words that are permutations of l.
Equations
Instances For
Full permutation words, grouped by their first letter, and the cut-reversal involution.
The first letter is a distinguished root, and a marked cut is taken in the remaining word. The family is allowed to depend on that root.
Equations
Instances For
Full permutation words of l₀ with a cut position, restricted to the qualifying ones.
Equations
- Erdos548.fullGoodWordCuts l₀ N A = {p ∈ Erdos548.permutationWords l₀ ×ˢ Finset.range l₀.length | Erdos548.FullWordQualifies N A p.1 p.2}
Instances For
The number of qualifying cut permutation words of l₀.
Equations
- Erdos548.fullWordCount l₀ N A = (Erdos548.fullGoodWordCuts l₀ N A).card
Instances For
Sum of the numbers of outer words: exactly one full word for every choice of its head and its outer permutation.
Root-dependent gluing, summed over ALL full permutation words.
A first-state loss of at most one per full word, followed by the cut reversal involution. This is purely finite counting.