Documentation

InfinitaryLogic.Combinatorics.PairErdosRadoGeneral

Pair Erdős–Rado, parameterized by the color bound κ #

The color-parameterized pair Erdős–Rado theorem: for any infinite cardinal κ and any color type C with #C ≤ κ, every pair coloring cR : (Fin 2 ↪o Source κ) → C of the source order Source κ = (Order.succ (2 ^ κ)).ord.ToType (the initial well-order of the successor of 2 ^ κ) admits a (Order.succ κ).ord-indexed strict-mono suborder on which cR is constant. In partition-calculus notation: (2 ^ κ)⁺ → (κ⁺)²_κ.

This is a fresh-namespace (PairERGen) port of the proven Bool/ℵ₀ theorem FirstOrder.Combinatorics.erdos_rado_pair_omega1 from Combinatorics/ErdosRado.lean, with the renaming table Bool → C, ℶ_1 → 2 ^ κ, ℵ_1 → Order.succ κ, ω_1 → (Order.succ κ).ord. The legacy theorem's shape is recovered as the κ = ℵ₀ specialization erdos_rado_pair_omega1_from_general. The consumers are the end-homogenization engine (EndHomogeneousErdosRado.lean) and the finite-arity induction (FiniteArityErdosRadoInduction.lean, culminating in the bounded finiteArityErdosRadoBounded), which need the color bound at κ = ℶ_1 (colors = functions on continuum-indexed positions); the all-arity FiniteArityErdosRadoOmega1 is false-shaped (statement audit 2026-07-07 — see its docstring).

Structure #

Generic toolbox (no κ): pairEmbed, pigeonhole, embeddings, order isos #

noncomputable def FirstOrder.Combinatorics.PairERGen.pairEmbed {α : Type u_1} [LinearOrder α] {a b : α} (h : a < b) :
Fin 2 ↪o α

Pair embedding: from an ordered pair a < b in a linearly-ordered type, produce the canonical Fin 2 ↪o α.

Equations
Instances For
    theorem FirstOrder.Combinatorics.PairERGen.exists_large_fiber_of_small_codomain {α β : Type u} {μ : Cardinal.{u}} ( : Cardinal.aleph0 μ) ( : Cardinal.mk α Order.succ μ) ( : Cardinal.mk β μ) (f : αβ) :
    ∃ (b : β), Order.succ μ Cardinal.mk ↑(f ⁻¹' {b})

    Path-counting pigeonhole. A function out of a set of cardinality ≥ succ μ into a codomain of cardinality ≤ μ (with μ ≥ ℵ_0) has some fiber of cardinality ≥ succ μ.

    Routes through Cardinal.infinite_pigeonhole_card with parameter θ := succ μ. The regularity of succ μ (successor cardinals are regular) supplies the cofinality hypothesis.

    Project-local replacement for the deprecated Ordinal.initialSegToType (deprecated in favor of Ordinal.type_le_iff, from which this is extracted): the initial segment embedding of α.ToType into β.ToType from α ≤ β.

    Equations
    Instances For

      A well-ordered source of cardinality at least c admits an order-embedding from the initial-ordinal well-order of cardinality c. Used by the abstract-source wrapper pairErdosRado_general_of_large to pull the coloring back to Source κ.

      Any subset of c.ord.ToType of cardinality at least c is order-isomorphic to c.ord.ToType (the generalization of the legacy ℵ_1-subset-of-ω_1 lemma).

      Proof outline: the subset's order type β satisfies β ≤ c.ord (suborder) and β.card ≥ c; since c.ord is the least ordinal of cardinality c, any β < c.ord would force β.card < c (Cardinal.lt_ord), a contradiction. So β = c.ord, giving a RelIso transported to an OrderIso.

      Composition of initialSegOfLe via InitialSeg.eq uniqueness on well-orders. Two initial segments from α.ToType to γ.ToType (both well-ordered) agree pointwise. (Shared with EndHomogER, which previously carried a private copy.)

      Cardinal helpers: all the κ-arithmetic the EHMR port consumes #

      @[reducible, inline]

      Pair-ER source at color bound κ. The initial ordinal of the regular successor cardinal succ (2 ^ κ), viewed as a linearly-ordered Type. All pair-Erdős–Rado recursion happens inside Source κ; the specialization κ = ℵ₀ recovers the legacy PairERSource (since 2 ^ ℵ₀ = ℶ_1).

      Equations
      Instances For

        Cardinality of the source: #(Source κ) = succ (2 ^ κ).

        2 ^ κ ≠ 0 (needed for power_le_power_left monotonicity).

        succ κ ≤ 2 ^ κ — Cantor plus successor minimality; holds for every κ.

        ℵ_0 ≤ 2 ^ κ for infinite κ (via Cantor).

        Ordinals below (succ κ).ord have ToType of cardinality ≤ κ (the generalization of "ordinals below ω_1 are countable").

        (succ κ).ord is closed under ordinal successor for infinite κ (it is a limit ordinal, being the initial ordinal of an uncountable-cofinality cardinal).

        theorem FirstOrder.Combinatorics.PairERGen.mk_node_le {κ : Cardinal.{0}} {C : Type} ( : Cardinal.aleph0 κ) (hC : Cardinal.mk C κ) {β : Ordinal.{0}} ( : β < (Order.succ κ).ord) :
        Cardinal.mk (β.ToTypeC) 2 ^ κ

        Node-count bound. For β < (succ κ).ord and #C ≤ κ, the level of recorded-color sequences has at most 2 ^ κ nodes: #(β.ToType → C) = #C ^ #β.ToType ≤ (2 ^ κ) ^ κ = 2 ^ (κ * κ) = 2 ^ κ.

        Counting-core product. succ κ * 2 ^ κ = 2 ^ κ for infinite κ (the generalization of ℵ_1 * ℶ_1 = ℶ_1).

        Any coloring on Source κ witnesses Nonempty C: the source is nontrivial (#(Source κ) = succ (2 ^ κ) ≥ 2), so it contains a strict pair, whose color inhabits C. Supplies the junk value the coverage y-path needs.

        Branch structures: validFiber, CoherentMajorityBranch, EHMRBranch #

        def FirstOrder.Combinatorics.PairERGen.validFiber {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {α : Ordinal.{0}} (p : α.ToType ↪o Source κ) (τ : α.ToTypeC) :
        Set (Source κ)

        Valid fiber (quantifier form). The set of elements y ∈ Source κ strictly above every p β, whose pair color with each p β matches τ β. Kept in quantifier form so that successor rewriting and restriction lemmas do not have to commute big intersections through the recursion.

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

          CoherentMajorityBranch cR: globally coherent prefix + branch data of length (succ κ).ord — the object the pair Erdős–Rado endgame consumes. Produced from an EHMRBranch by exists_coherentMajorityBranch_of_ehmrBranch.

          Instances For

            EHMRBranch cR: a strictly increasing (succ κ).ord-indexed family of reps with recorded colors — cR({rep β, rep γ}) = bit β for β < γ (EHMR fact (8) content). Produced by the tree-counting theorem ehmr_tree_has_branch.

            Instances For

              EHMR canonical-tree skeleton #

              Nodes are recorded-color sequences β.ToType → C (Type 0, so the counting stays in Cardinal.{0}); reps s(h↾γ) = min S(h↾γ) are derived by well-founded recursion on length; live = nonempty successor set.

              @[reducible, inline]

              A node at level β: the recorded colors at the positions β.ToType. The eventual branch is a cofinal chain through these of length < (succ κ).ord.

              Equations
              Instances For
                noncomputable def FirstOrder.Combinatorics.PairERGen.EHMRNodeAt.restrict {C : Type} {β : Ordinal.{0}} (h : EHMRNodeAt C β) {δ : Ordinal.{0}} (hδβ : δ β) :

                Restrict a node to a shorter length δ ≤ β, via the initial-segment embedding.

                Equations
                Instances For
                  theorem FirstOrder.Combinatorics.PairERGen.ehmr_partitionTree_card_lower {κ : Cardinal.{0}} {ι : Type} (R : ιSet (Source κ)) (hcover : ∀ (y : Source κ), ∃ (i : ι), y R i) (hsub : ∀ (i : ι), (R i).Subsingleton) :

                  [EHMR §14, Lemma 14.2 + |E| counting — coverage/counting engine] If the "used-up" sets R i cover Source κ and each is a subsingleton, then the node index set has cardinality ≥ succ (2 ^ κ) = #(Source κ). This is the counting feeding the branch-length theorem.

                  def FirstOrder.Combinatorics.PairERGen.ehmrFiber {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} (rep : β.ToTypeSource κ) (col : EHMRNodeAt C β) :
                  Set (Source κ)

                  The successor set S(h): points above all the reps respecting the recorded colors. (β.ToType-indexed validFiber shape, with a plain-function rep.)

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[irreducible]
                    noncomputable def FirstOrder.Combinatorics.PairERGen.ehmrChosen {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) (β : Ordinal.{0}) (h : EHMRNodeAt C β) :

                    Chosen representative s(h) = min S(h) — the <-least element of the successor set (via Source κ's well-order), 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 (empty-fiber) nodes.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def FirstOrder.Combinatorics.PairERGen.ehmrRep {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} (h : EHMRNodeAt C β) :
                      β.ToTypeSource κ

                      The reps along a node: the chosen rep of the restriction to each position.

                      Equations
                      Instances For

                        A node is live iff its successor set is nonempty.

                        Equations
                        Instances For
                          noncomputable def FirstOrder.Combinatorics.PairERGen.ehmrR {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} (h : EHMRNodeAt C β) :
                          Set (Source κ)

                          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 ).

                            theorem FirstOrder.Combinatorics.PairERGen.ehmrChosen_mem {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} (h : EHMRNodeAt C β) (hlive : ehmrLive cR h) :
                            ehmrChosen cR β h ehmrS cR h

                            On a live node, the chosen rep lies in the successor set.

                            theorem FirstOrder.Combinatorics.PairERGen.ehmrChosen_eq_min {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} (h : EHMRNodeAt C β) (hlive : ehmrLive cR h) :
                            ehmrChosen cR β h = .min (ehmrS cR h) hlive

                            On a live node, ehmrChosen is exactly the well-order minimum of the successor set (the defining unfold).

                            theorem FirstOrder.Combinatorics.PairERGen.ehmrChosen_le_of_mem {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} (h : EHMRNodeAt C β) {y : Source κ} (hy : y ehmrS cR h) :
                            ehmrChosen cR β h y

                            The chosen min is every successor (the <-least element of S(h) in the linear well-order).

                            Level cardinality: for β < (succ κ).ord the level (all length-β nodes) has cardinality ≤ 2 ^ κβ.ToType of size ≤ κ, C-valued with #C ≤ κ.

                            theorem FirstOrder.Combinatorics.PairERGen.ehmrChosen_congr {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {δ₁ δ₂ : Ordinal.{0}} ( : δ₁ = δ₂) {n₁ : EHMRNodeAt C δ₁} {n₂ : EHMRNodeAt C δ₂} (hn : n₁ n₂) :
                            ehmrChosen cR δ₁ n₁ = ehmrChosen cR δ₂ n₂

                            ehmrChosen transported along a level equality: equal levels plus heterogeneously-equal nodes give equal chosen reps.

                            theorem FirstOrder.Combinatorics.PairERGen.ehmr_live_level_small {κ : Cardinal.{0}} {C : Type} ( : Cardinal.aleph0 κ) (hC : Cardinal.mk C κ) (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} ( : β < (Order.succ κ).ord) :

                            Level smallness: for β < (succ κ).ord there are ≤ 2 ^ κ live length-β nodes (a fortiori ≤ 2 ^ κ nodes, by ehmr_level_card_le).

                            Coverage (EHMR Lemma 14.2) — the canonical y-path #

                            Rather than build the y-path by transfinite recursion with an explicit limit step, we define the whole path at once: yNode cR y β is the length-β node recording, at each position x, the pair-color of y against the chosen rep of the path so far — or junk (an arbitrary color) once that rep is no longer < y. Restriction-coherence then becomes a lemma, and the stopping argument is pure well-foundedness.

                            @[irreducible]
                            noncomputable def FirstOrder.Combinatorics.PairERGen.yRep {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) (γ : Ordinal.{0}) :

                            The chosen rep of the canonical y-path at level γ, defined by well-founded recursion: it is the chosen min of the node whose recorded color at each position x is cR({yRep(typein x), y}) (or junk once that rep is ≥ y). Because the recursion lands in Source κ (non-dependent), restriction-coherence later needs only congrArg, not a heterogeneous transport.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              noncomputable def FirstOrder.Combinatorics.PairERGen.yNode {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) (β : Ordinal.{0}) :

                              The canonical y-path node of length β (a plain def over yRep): at position x it records the pair-color of y against yRep (typein x) (junk once that rep is ≥ y).

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem FirstOrder.Combinatorics.PairERGen.yRep_eq {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) (γ : Ordinal.{0}) :
                                yRep cR y γ = ehmrChosen cR γ (yNode cR y γ)

                                The defining fixpoint equation: yRep is the chosen min of yNode.

                                theorem FirstOrder.Combinatorics.PairERGen.yNode_restrict {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) {β δ : Ordinal.{0}} ( : δ β) :
                                (yNode cR y β).restrict = yNode cR y δ

                                Restriction-coherence: every restriction of a yNode is again the yNode of that length. (Each color depends only on yRep (typein x), and typein is preserved by the initial-segment embedding.)

                                theorem FirstOrder.Combinatorics.PairERGen.ehmrRep_yNode {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) {β : Ordinal.{0}} [IsWellOrder β.ToType fun (x1 x2 : β.ToType) => x1 < x2] (x : β.ToType) :
                                ehmrRep cR (yNode cR y β) x = yRep cR y ((Ordinal.typein fun (x1 x2 : β.ToType) => x1 < x2).toRelEmbedding x)

                                The reps of yNode cR y β are exactly yRep cR y (typein x). (The IsWellOrder binder lets typein appear in the signature; call sites discharge it with isWellOrder_lt.)

                                theorem FirstOrder.Combinatorics.PairERGen.yNode_mem_of {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) {β : Ordinal.{0}} (hbelow : δ < β, yRep cR y δ < y) :
                                y ehmrS cR (yNode cR y β)

                                Liveness criterion: if every earlier rep stays < y, then y is a successor of yNode cR y β (so the node is live and y ∈ S).

                                theorem FirstOrder.Combinatorics.PairERGen.yRep_strictMono {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) {γ₁ γ₂ : Ordinal.{0}} (h12 : γ₁ < γ₂) (hlive : δ < γ₂, yRep cR y δ < y) :
                                yRep cR y γ₁ < yRep cR y γ₂

                                As long as yNode cR y γ₂ is live (every earlier rep stays < y), the canonical reps strictly increase: yRep γ₁ < yRep γ₂ for γ₁ < γ₂. (The rep at the position γ₁ of yNode γ₂ is yRep γ₁, and it lies strictly below the chosen min yRep γ₂.)

                                theorem FirstOrder.Combinatorics.PairERGen.exists_yRep_ge {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) :
                                ∃ (γ : Ordinal.{0}), y yRep cR y γ δ < γ, yRep cR y δ < y

                                Stopping. The canonical y-path stops: there is a least level γ where the chosen rep reaches y (y ≤ yRep γ), with all earlier reps strictly below y. Existence is pure well-foundedness — if every yRep γ stayed < y then yRep would be a strictly increasing OrdinalSource κ, and composing with typein gives a strictly increasing OrdinalOrdinal exceeding the order type of Source κ, impossible.

                                theorem FirstOrder.Combinatorics.PairERGen.exists_node_choosing_source {κ : Cardinal.{0}} {C : Type} [Nonempty C] (cR : Fin 2 ↪o Source κC) (y : Source κ) :
                                ∃ (β : Ordinal.{0}) (h : EHMRNodeAt C β), y ehmrR cR h

                                Coverage (EHMR Lemma 14.2). Every source element is the chosen representative of some node (y ∈ R(h)): take the least level γ where the canonical y-path reaches y (exists_yRep_ge). There every earlier rep is < y, so the node is live (yNode_mem_of) and its chosen min is ≤ y (ehmrChosen_le_of_mem); combined with y ≤ yRep γ this forces y = s(yNode γ), i.e. y ∈ R(yNode γ).

                                End-homogeneity of live nodes (EHMR fact (8)) #

                                theorem FirstOrder.Combinatorics.PairERGen.EHMRNodeAt.restrict_trans {C : Type} {β : Ordinal.{0}} (h : EHMRNodeAt C β) {δ ε : Ordinal.{0}} ( : δ β) ( : ε δ) :
                                (h.restrict ).restrict = h.restrict

                                Restriction is transitive (initial segments compose).

                                theorem FirstOrder.Combinatorics.PairERGen.EHMRNodeAt.restrict_heq {C : Type} {β : Ordinal.{0}} (h : EHMRNodeAt C β) {δ₁ δ₂ : Ordinal.{0}} ( : δ₁ = δ₂) (h1 : δ₁ β) (h2 : δ₂ β) :

                                EHMRNodeAt.restrict at heterogeneously-equal lengths.

                                theorem FirstOrder.Combinatorics.PairERGen.ehmrRep_restrict {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} (h : EHMRNodeAt C β) {δ : Ordinal.{0}} ( : δ β) (x : δ.ToType) :

                                The reps of a restriction agree with the parent's reps at the lifted positions.

                                theorem FirstOrder.Combinatorics.PairERGen.ehmrLive_restrict {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} {h : EHMRNodeAt C β} (hlive : ehmrLive cR h) {δ : Ordinal.{0}} ( : δ β) :
                                ehmrLive cR (h.restrict )

                                A restriction of a live node is live (the same witness y serves, since the reps and recorded colors only shrink).

                                theorem FirstOrder.Combinatorics.PairERGen.cR_pairEmbed_congr {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {a a' b b' : Source κ} (ha : a = a') (hb : b = b') (p : a < b) (q : a' < b') :
                                cR (pairEmbed p) = cR (pairEmbed q)

                                cR ∘ pairEmbed depends only on the two endpoints, not on the <-proof: equal endpoints give equal colors.

                                theorem FirstOrder.Combinatorics.PairERGen.ehmrRep_strictMono {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} {h : EHMRNodeAt C β} (hlive : ehmrLive cR h) {x₁ x₂ : β.ToType} (hx : x₁ < x₂) :
                                ehmrRep cR h x₁ < ehmrRep cR h x₂

                                End-homogeneity, strict monotonicity. On a live node the chosen reps strictly increase: the rep at x₁ is the rep of the restriction-to-x₂ at the position of x₁, hence strictly below that restriction's chosen min = rep x₂.

                                theorem FirstOrder.Combinatorics.PairERGen.ehmr_fact8 {κ : Cardinal.{0}} {C : Type} (cR : Fin 2 ↪o Source κC) {β : Ordinal.{0}} {h : EHMRNodeAt C β} (hlive : ehmrLive cR h) {x₁ x₂ : β.ToType} (hx : x₁ < x₂) :
                                cR (pairEmbed ) = h x₁

                                End-homogeneity, EHMR fact (8). On a live node, the recorded color at x₁ is the pair-color of the reps {rep x₁, rep x₂} for any x₁ < x₂.

                                Branch extraction from a high live node #

                                EHMR Theorem 13.1 realized concretely: the succ (2 ^ κ)-many live nodes (coverage) cannot all sit at levels < (succ κ).ord (each such level has ≤ 2 ^ κ nodes, and there are only succ κ of them), so some live node has length ≥ (succ κ).ord; reading it off at the first (succ κ).ord positions yields an EHMRBranch.

                                noncomputable def FirstOrder.Combinatorics.PairERGen.ehmrBranchPos {κ : Cardinal.{0}} {β : Ordinal.{0}} ( : (Order.succ κ).ord β) (β' : Ordinal.{0}) (hβ' : β' < (Order.succ κ).ord) :

                                The position enum β' of a length-β node, for β' < (succ κ).ord ≤ β.

                                Equations
                                Instances For
                                  theorem FirstOrder.Combinatorics.PairERGen.ehmrBranchPos_strictMono {κ : Cardinal.{0}} {β : Ordinal.{0}} ( : (Order.succ κ).ord β) {β' γ' : Ordinal.{0}} (hβ' : β' < (Order.succ κ).ord) (hγ' : γ' < (Order.succ κ).ord) (h' : β' < γ') :
                                  ehmrBranchPos β' hβ' < ehmrBranchPos γ' hγ'

                                  Positions are strictly monotone in the level.

                                  noncomputable def FirstOrder.Combinatorics.PairERGen.ehmrBranch_of_live {κ : Cardinal.{0}} {C : Type} {β : Ordinal.{0}} (cR : Fin 2 ↪o Source κC) (h : EHMRNodeAt C β) ( : (Order.succ κ).ord β) (hlive : ehmrLive cR h) :

                                  A live node of length ≥ (succ κ).ord is an EHMRBranch: its reps (read off at the positions enum β') strictly increase (ehmrRep_strictMono) and satisfy fact (8) (ehmr_fact8).

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    theorem FirstOrder.Combinatorics.PairERGen.exists_live_node_ge {κ : Cardinal.{0}} {C : Type} [Nonempty C] ( : Cardinal.aleph0 κ) (hC : Cardinal.mk C κ) (cR : Fin 2 ↪o Source κC) :
                                    ∃ (β : Ordinal.{0}) (h : EHMRNodeAt C β), (Order.succ κ).ord β ehmrLive cR h

                                    [THE COUNTING CORE — EHMR Theorem 13.1] Some live node has length ≥ (succ κ).ord.

                                    Suppose not: every live node has length < (succ κ).ord. Then the coverage map (exists_node_choosing_source) injects Source κ into the Type-0 index Σ b : (succ κ).ord.ToType, EHMRNodeAt C (typein b) via ehmr_partitionTree_card_lower. But that index has size at most succ κ * 2 ^ κ = 2 ^ κ (mk_node_le per fibre, succ_mul_two_power), so succ (2 ^ κ) ≤ 2 ^ κ, contradiction.

                                    [EHMR §13 Theorem 13.1 / §14 Theorem 14.3 — branch-length] The canonical partition tree for cR has a branch of length (succ κ).ord: a live node of length ≥ (succ κ).ord (exists_live_node_ge) restricts to the sought EHMRBranch (ehmrBranch_of_live).

                                    Assembly: EHMR branch → CoherentMajorityBranch #

                                    Assemble an EHMRBranch into a CoherentMajorityBranch. prefixAt α is the embedding α.ToType ↪o Source κ sending position β < α to rep β; branch α reads off bit; prefix_restrict/branch_restrict are immediate from the assembly; top_in_validFiber is EHMR fact (8) (coloring).

                                    Existence of a CoherentMajorityBranch — a coherent branch (prefix/branch restriction coherence + top_in_validFiber) of length (succ κ).ord, the object the pair Erdős–Rado endgame consumes. Derived directly from the EHMR canonical partition tree.

                                    Chain + pigeonhole endgame #

                                    noncomputable def FirstOrder.Combinatorics.PairERGen.treeCommitOfBranch {κ : Cardinal.{0}} {C : Type} {cR : Fin 2 ↪o Source κC} ( : Cardinal.aleph0 κ) (B : CoherentMajorityBranch cR) (δ : Ordinal.{0}) ( : δ < (Order.succ κ).ord) :

                                    treeCommitOfBranch: canonical commit at position δ using B. Reads off B.prefixAt (succ δ) ⊤ (the top of the succ δ chain).

                                    Equations
                                    Instances For
                                      noncomputable def FirstOrder.Combinatorics.PairERGen.treeCommitColorOfBranch {κ : Cardinal.{0}} {C : Type} {cR : Fin 2 ↪o Source κC} ( : Cardinal.aleph0 κ) (B : CoherentMajorityBranch cR) (δ : Ordinal.{0}) ( : δ < (Order.succ κ).ord) :
                                      C

                                      treeCommitColorOfBranch: canonical color at position δ using B. Reads off B.branch (succ δ) ⊤.

                                      Equations
                                      Instances For
                                        theorem FirstOrder.Combinatorics.PairERGen.treeCommitOfBranch_strictMono {κ : Cardinal.{0}} {C : Type} {cR : Fin 2 ↪o Source κC} ( : Cardinal.aleph0 κ) (B : CoherentMajorityBranch cR) {δ₁ δ₂ : Ordinal.{0}} (hδ₁ : δ₁ < (Order.succ κ).ord) (hδ₂ : δ₂ < (Order.succ κ).ord) (h : δ₁ < δ₂) :
                                        treeCommitOfBranch B δ₁ hδ₁ < treeCommitOfBranch B δ₂ hδ₂

                                        treeCommitOfBranch_strictMono: strict monotonicity of the branch-driven chain values, inherited from B.prefixAt's order embedding structure + prefix_restrict to identify levels.

                                        treeCommitColorFnOfBranch: indexed color function on (succ κ).ord.ToType using B.

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

                                          treeChainEmbeddingOfBranch: (succ κ).ord.ToType ↪o Source κ embedding driven by B.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            theorem FirstOrder.Combinatorics.PairERGen.treeChain_pair_homogeneous_ofBranch {κ : Cardinal.{0}} {C : Type} {cR : Fin 2 ↪o Source κC} ( : Cardinal.aleph0 κ) (B : CoherentMajorityBranch cR) {δ η : Ordinal.{0}} (hδη : δ < η) ( : η < (Order.succ κ).ord) :
                                            cR (pairEmbed ) = treeCommitColorOfBranch B δ

                                            treeChain_pair_homogeneous_ofBranch: pair-homogeneity along the branch-driven chain. For δ < η < (succ κ).ord, cR (pair (treeCommitOfBranch B δ) (treeCommitOfBranch B η)) = treeCommitColorOfBranch B δ.

                                            Proof: by B.top_in_validFiber η, commit η = B.prefixAt (succ η) ⊤ is in validFiber cR (B.prefixAt η hη) (B.branch η hη). Apply at position enum δ : η.ToType; use B.prefix_restrict / B.branch_restrict to identify the constraint values with commit δ and commit color δ.

                                            [THE FINAL PIGEONHOLE] Color pigeonhole on treeCommitColorFnOfBranch B: some color has a succ κ-sized preimage (domain of size succ κ, codomain of size ≤ κ).

                                            theorem FirstOrder.Combinatorics.PairERGen.pairErdosRado_general_of_coherentMajorityBranch {κ : Cardinal.{0}} {C : Type} {cR : Fin 2 ↪o Source κC} ( : Cardinal.aleph0 κ) (hC : Cardinal.mk C κ) (B : CoherentMajorityBranch cR) :
                                            ∃ (f : (Order.succ κ).ord.ToType ↪o Source κ) (b : C), ∀ {x y : (Order.succ κ).ord.ToType} (hxy : x < y), cR (pairEmbed ) = b

                                            [CONDITIONAL HEADLINE] Parameterized pair Erdős–Rado, assuming a CoherentMajorityBranch: there is a color b and a (succ κ).ord-indexed strict-mono sequence into Source κ whose every pair has cR-color b.

                                            Proof: color pigeonhole (exists_large_treeCommitColorFn_fiber_ofBranch) gives a succ κ-sized preimage of some b; ordIso_ordToType_of_card_ge gives an order iso preimage ≃ (succ κ).ord.ToType. Compose with treeChainEmbeddingOfBranch B to get the embedding; pair-homogeneity comes from treeChain_pair_homogeneous_ofBranch + constancy of treeCommitColorFnOfBranch B on the preimage.

                                            The headline, the regression specialization, and the abstract-source wrapper #

                                            theorem FirstOrder.Combinatorics.PairERGen.pairErdosRado_general (κ : Cardinal.{0}) ( : Cardinal.aleph0 κ) {C : Type} (hC : Cardinal.mk C κ) (cR : Fin 2 ↪o Source κC) :
                                            ∃ (f : (Order.succ κ).ord.ToType ↪o Source κ) (b : C), ∀ {x y : (Order.succ κ).ord.ToType} (hxy : x < y), cR (pairEmbed ) = b

                                            [HEADLINE — parameterized pair Erdős–Rado] For infinite κ and any color type C with #C ≤ κ, every pair coloring of Source κ = (succ (2 ^ κ)).ord.ToType is constant on a (succ κ).ord-indexed strict-mono suborder: (2 ^ κ)⁺ → (κ⁺)²_κ. The κ = ℵ₀, C = Bool case is the legacy erdos_rado_pair_omega1.

                                            [REGRESSION] The legacy Bool/ℵ₀ shape, recovered from the general theorem at κ = ℵ₀ via succ ℵ₀ = ℵ_1 and (ℵ_1).ord = ω_1 (stated with this file's own Source/pairEmbed; Source ℵ₀ = (succ (2 ^ ℵ₀)).ord.ToType matches the legacy PairERSource = (succ ℶ_1).ord.ToType up to 2 ^ ℵ₀ = ℶ_1).

                                            theorem FirstOrder.Combinatorics.PairERGen.pairErdosRado_general_of_large (κ : Cardinal.{0}) ( : Cardinal.aleph0 κ) {C : Type} (hC : Cardinal.mk C κ) {I : Type} [LinearOrder I] [WellFoundedLT I] (hI : Order.succ (2 ^ κ) Cardinal.mk I) (cR : Fin 2 ↪o IC) :
                                            ∃ (f : (Order.succ κ).ord.ToType ↪o I) (b : C), ∀ {x y : (Order.succ κ).ord.ToType} (hxy : x < y), cR (pairEmbed ) = b

                                            [ABSTRACT SOURCE] The parameterized pair Erdős–Rado over any well-ordered source I of cardinality ≥ succ (2 ^ κ): embed Source κ into I (exists_ordToType_embedding_of_card_ge), pull the coloring back, and transport the homogeneous chain forward.