End-homogeneous Erdős–Rado: the arity-general EHMR engine (ER hard chunk 2a) #
The end-homogenization Erdős–Rado theorem at every finite arity: for an infinite
cardinal lam, a color type C with #C ≤ lam, and a coloring
G : (Fin (n + 2) ↪o I) → C of (n+2)-tuples in a well-ordered source I of size
≥ succ (2 ^ lam), there is a (succ lam).ord-indexed suborder on which G is
end-homogeneous: the color of s ⌢ x depends only on the prefix (n+1)-tuple s,
not on the final point x above it (exists_endHomogeneous_of_large).
This is a port-with-modification of the proven pair engine
Combinatorics/PairErdosRadoGeneral.lean (namespace PairERGen, whose generic toolbox and
cardinal helpers are reused here, not re-proven). The single structural change: an EHMR
tree node at level β records the new point's color against every prefix (n+1)-tuple
(NodeAt C n β = (Fin (n+1) ↪o β.ToType) → C) instead of against every prefix point
(EHMRNodeAt C β = β.ToType → C). The endgame is shorter than the pair file's:
end-homogeneity is read directly off the branch (Branch.coloring = EHMR fact (8)); no
majority/pigeonhole layers are needed.
Why pair colors cannot do this job. One could try to prove the induction step by
pair-coloring {x, y} with "the induced tuple-color functions of x and y agree" — but
that comparison ranges over all lower (n+1)-tuples, a varying domain of size up to the
full source, so the color type explodes past every fixed bound. The EHMR tree never makes
that global comparison: a node only records colors against the ≤ lam-sized branch prefix
below it, and that restriction is the proof — level counting stays at 2 ^ lam, so the
succ (2 ^ lam)-sized source forces a branch of length (succ lam).ord.
The pair file is the n = 0 shadow of this engine: the regression theorem
pairER_from_endHomogeneous re-derives the exact conclusion of
PairERGen.pairErdosRado_general_of_large from exists_endHomogeneous_of_large at n = 0
plus a point pigeonhole, protecting the statement against drift.
Consumer (ER hard chunk 2b, the finite-arity induction step): from an end-homogeneous
suborder, the induced arity-(n+1) coloring c' s := G (s ⌢ any-point-above) is
well-defined (end-homogeneity + the no-max lemma supply and identify the above-points), and
feeding c' to the arity-(n+1) inductive hypothesis homogenizes G outright.
Structure #
- Tuple utilities:
appendLastOE(append a strict upper bound to an(n+1)-tuple), its evaluation/congruence/composition lemmas, and the arity-1 bridges topairEmbed. - Cardinal helpers:
mk_finTupleEmb_le(#(Fin m ↪o α) ≤ lam) andmk_tupleNode_le(the tuple-node level bound≤ 2 ^ lam), plusnonempty_color_tuple. - EHMR tree with tuple-typed nodes:
NodeAt/NodeAt.restrict(restriction is tuple precomposition with the initial-segment embedding), the fiber/chosen-rep recursion, the coveragey-path, end-homogeneity of live nodes (node_fact8), and branch extraction (exists_live_node_ge,tree_has_branch). - Headline:
exists_endHomogeneous(concrete source),exists_endHomogeneous_of_large(abstract well-ordered source); regression:pairER_from_endHomogeneous.
Tuple utilities: appending a strict upper bound to an (n+1)-tuple #
Append a strict upper bound x to an (n+1)-tuple s, giving an (n+2)-tuple.
The underlying function is Fin.snoc s x; the <-proof hx enters only the
strict-monotonicity argument, so the embedding's data depends on s and x alone.
Equations
- FirstOrder.Combinatorics.EndHomogER.appendLastOE s x hx = OrderEmbedding.ofStrictMono (Fin.snoc (⇑s) x) ⋯
Instances For
The underlying function of appendLastOE is Fin.snoc s x.
appendLastOE at a prefix position gives the prefix value.
appendLastOE at the last position gives the appended point.
appendLastOE depends only on the underlying points (in particular it is
proof-irrelevant in the <-hypothesis).
appendLastOE commutes with postcomposition by an order embedding
(Fin.snoc naturality).
The one-point order embedding Fin 1 ↪o I at x (strict monotonicity is vacuous).
Equations
- FirstOrder.Combinatorics.EndHomogER.oneTupleOE x = OrderEmbedding.ofStrictMono (fun (x_1 : Fin 1) => x) ⋯
Instances For
Every Fin 1 ↪o I is the one-point embedding at its value.
Arity-1 bridge: appending b above the one-point tuple at a is exactly the pair
embedding of a < b.
Cardinal helpers: the tuple-domain bounds the tree port consumes #
Finite tuple-embedding count: #(Fin m ↪o α) ≤ lam for #α ≤ lam and infinite lam
(inject into Fin m → α and collapse the finite power).
Tuple-node count bound. For β < (succ lam).ord and #C ≤ lam, the level of
recorded-color tuple nodes has at most 2 ^ lam members:
#((Fin (n+1) ↪o β.ToType) → C) ≤ (2 ^ lam) ^ lam = 2 ^ lam.
Any (n+2)-tuple coloring on Source lam witnesses Nonempty C: the source's order
type is at least ω, so it contains an increasing (n+2)-tuple.
The tuple-node EHMR tree skeleton #
Nodes at level β are recorded-color assignments to prefix (n+1)-tuples
(Fin (n+1) ↪o β.ToType) → C; reps are chosen minima of successor sets by well-founded
recursion on the length, exactly as in PairERGen — only the node domain changes.
A node at level β: the recorded colors at the prefix-position (n+1)-tuples of
β.ToType.
Instances For
Restrict a node to a shorter length δ ≤ β: precompose every position tuple with the
initial-segment embedding.
Equations
- h.restrict hδβ τ = h (RelEmbedding.trans τ (FirstOrder.Combinatorics.PairERGen.initialSegOfLe hδβ).toOrderEmbedding)
Instances For
Restriction is transitive (initial segments compose).
NodeAt.restrict at heterogeneously-equal lengths.
Level cardinality: for β < (succ lam).ord and #C ≤ lam the level (all length-β
tuple nodes) has cardinality ≤ 2 ^ lam.
The color of the tuple r ⌢ y when r is strictly monotone and bounded by y
(junk otherwise). Factoring the tree's recorded colors through colorAbove makes every
"the color depends only on the underlying points" step a congrArg.
Equations
- One or more equations did not get rendered due to their size.
Instances For
On an actual bounded order embedding, colorAbove computes the appended color.
The successor set S(h) of a node with reps rep: points y strictly above every
rep whose appended tuple colors all match the recorded ones.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Chosen representative s(h) = min S(h) — the <-least element of the successor
set, by well-founded recursion on the node length: the rep at position x : β.ToType is
the chosen rep of the restriction to typein x. Junk default on dead nodes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The reps along a node: the chosen rep of the restriction to each position.
Equations
- FirstOrder.Combinatorics.EndHomogER.nodeRep G h x = FirstOrder.Combinatorics.EndHomogER.nodeChosen G ((Ordinal.typein fun (x1 x2 : β.ToType) => x1 < x2).toRelEmbedding x) (h.restrict ⋯)
Instances For
S(h) as a set, via nodeRep.
Equations
Instances For
A node is live iff its successor set is nonempty.
Equations
Instances For
The used/remainder set R(h): {s(h)} on live nodes, else ∅.
Equations
Instances For
R(h) is a subsingleton (it is {s(h)} or ∅).
On a live node, the chosen rep lies in the successor set.
On a live node, nodeChosen is exactly the well-order minimum of the successor set.
The chosen min is ≤ every successor.
nodeChosen transported along a level equality.
Level smallness: for β < (succ lam).ord there are ≤ 2 ^ lam live length-β
tuple nodes.
Coverage — the canonical y-path #
As in PairERGen, the whole y-path is defined at once: yNode G y β is the length-β
node recording, at each prefix tuple τ, the color of y appended above the chosen reps
of the path so far (junk once a rep is no longer < y, or the reps fail monotonicity —
both absorbed by colorAbove).
The chosen rep of the canonical y-path at level γ, by well-founded recursion:
the chosen min of the node recording colorAbove of y over the earlier path reps.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The canonical y-path node of length β (a plain def over yRep).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The defining fixpoint equation: yRep is the chosen min of yNode.
Restriction-coherence: every restriction of a yNode is again the yNode of that
length (typein is preserved by the initial-segment embedding).
Liveness criterion: if every earlier rep stays < y, then y is a successor of
yNode G y β (so the node is live and y ∈ S).
As long as every rep below γ₂ stays < y, the canonical reps strictly increase.
Stopping. The canonical y-path stops: there is a least level γ where the
chosen rep reaches y, with all earlier reps strictly below y (pure
well-foundedness, as in PairERGen).
Coverage. Every source element is the chosen representative of some node
(y ∈ R(h)), at the least level where the canonical y-path reaches y.
End-homogeneity of live nodes (EHMR fact (8), tuple form) #
The reps of a restriction agree with the parent's reps at the lifted positions.
A restriction of a live node is live (the same witness serves: the constraints of the
restriction are a subset of the parent's, transported along nodeRep_restrict).
End-homogeneity, strict monotonicity. On a live node the chosen reps strictly increase.
End-homogeneity, EHMR fact (8) in tuple form. On a live node, the recorded color
at the prefix tuple τ is the actual appended color of {rep ∘ τ, rep x₂} for any
position x₂ strictly above all of τ.
Branch extraction from a high live node #
The counting core: succ (2 ^ lam)-many live nodes (coverage) cannot all sit at levels
< (succ lam).ord (each such level has ≤ 2 ^ lam tuple nodes and there are only
succ lam levels), so some live node has length ≥ (succ lam).ord; reading it off along
the initial segment yields a Branch.
Branch G: a strictly increasing (succ lam).ord.ToType-indexed family of reps
together with the recorded tuple colors — end-homogeneity holds along it: the appended
color of {rep ∘ τ, rep q} is nodeFn τ for every position tuple τ and every level q
strictly above all of τ. Produced by tree_has_branch.
- rep : (Order.succ lam).ord.ToType → PairERGen.Source lam
The rep at each position of
(succ lam).ord.ToType. - rep_strictMono : StrictMono self.rep
The reps strictly increase.
The recorded color at each prefix position tuple.
- coloring (τ : Fin (n + 1) ↪o (Order.succ lam).ord.ToType) (q : (Order.succ lam).ord.ToType) : (∀ (k : Fin (n + 1)), τ k < q) → (colorAbove G (self.rep q) fun (k : Fin (n + 1)) => self.rep (τ k)) = self.nodeFn τ
End-homogeneity along the branch (EHMR fact (8) read off the live node).
Instances For
A live node of length ≥ (succ lam).ord is a Branch: its reps (read off along
the initial-segment embedding) strictly increase (nodeRep_strictMono) and satisfy fact
(8) (node_fact8).
Equations
- One or more equations did not get rendered due to their size.
Instances For
[THE COUNTING CORE] Some live node has length ≥ (succ lam).ord. Otherwise the
coverage map injects Source lam (size succ (2 ^ lam)) into the index
Σ b : (succ lam).ord.ToType, {live nodes of length typein b} of size
≤ succ lam * 2 ^ lam = 2 ^ lam, contradiction.
Branch-length. The canonical tuple partition tree for G has a branch of length
(succ lam).ord.
The endgame: end-homogeneity read directly off the branch #
[CONCRETE HEADLINE] End-homogenization over Source lam: there is a
(succ lam).ord-indexed suborder on which the color of s ⌢ x depends only on the
prefix tuple s — both branch-coherence instances at the position tuple of s give the
recorded nodeFn value.
[HEADLINE — end-homogeneous Erdős–Rado, abstract source] For infinite lam, a
color type C with #C ≤ lam, and any well-ordered source I of cardinality
≥ succ (2 ^ lam): every (n+2)-tuple coloring admits a (succ lam).ord-indexed
suborder on which the color of s ⌢ x is independent of the final point x above the
prefix tuple s.
Regression: the pair theorem's exact conclusion from the n = 0 engine #
[REGRESSION] The exact conclusion of PairERGen.pairErdosRado_general_of_large,
re-derived from exists_endHomogeneous_of_large at n = 0 plus the point pigeonhole:
end-homogenize the pair coloring, pigeonhole the induced point color
p ↦ cR {f₀ p, f₀ (canonical point above p)} (well-defined up to the choice of
above-point by end-homogeneity), and re-well-order the large monochromatic fiber.