Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_QED_E230.lean
qedmarketβs copy of theproofnetwork/open-problems@860a535, 1 Dec 2026original source β
/-From Prove2Me, definition `QED_E230` (https://prove2.me/definitions/83fe7a05-bfd4-4199-a34a-75bd7c494fc4). Apache-2.0 per Prove2Me's terms.-/import Mathlib /-! QED-E230: Bounded-degree spanning trees in the prime-sum graphJoin two numbers from 1 to 2n when their sum is prime. Show that every tree on 2n vertices withbounded degree and two equal colour classes can be found inside this graph.Informal statement: Let π«_{2n} be the graph on [2n] = {1,β¦,2n} with ij β E iff i + j is prime(π«_{2n} is bipartite between odds and evens). Prove that for every Ξ there is nβ(Ξ) such that forall n β₯ nβ, every tree T on 2n vertices with maximum degree β€ Ξ and both bipartition classes of sizen is isomorphic to a spanning subgraph of π«_{2n}.Formalization notes: Trees are `SimpleGraph (Fin (2*n))` with `IsTree` (connected and acyclic);every tree on 2n labelled vertices is isomorphic to one of these. Vertex `i : Fin (2*n)` of the hoststands for the integer i + 1 β [2n], so the host edge condition is `Nat.Prime (i + 1 + (j + 1))`.Maximum degree β€ Ξ: every finite set of neighbours of a vertex has at most Ξ elements (avoidsdecidability instances for `degree`). Balanced bipartition: there is a proper 2-colouring withexactly n vertices coloured `true`; a tree is connected, so its proper 2-colouring is unique up toswapping colours and this says both classes have size n. "Isomorphic to a spanning subgraph" = abijection Ο of the vertex set mapping every tree edge to a host edge. Proving `Claim` = theembedding theorem; proving `Β¬Claim` = some Ξ with infinitely many n admitting a balanced tree ofmaximum degree β€ Ξ that does not embed.-/namespace OpenProblems.QEDE230noncomputable section /-- The tree `T` on `Fin (2n)` has maximum degree at most `Ξ`. -/def MaxDegLE {n : β} (T : SimpleGraph (Fin (2 * n))) (Ξ : β) : Prop := β v : Fin (2 * n), β s : Finset (Fin (2 * n)), (β u β s, T.Adj v u) β s.card β€ Ξ /-- `T` has a proper 2-colouring with exactly `n` vertices in one class. -/def Balanced {n : β} (T : SimpleGraph (Fin (2 * n))) : Prop := β c : Fin (2 * n) β Bool, (β u v : Fin (2 * n), T.Adj u v β c u β c v) β§ (Finset.univ.filter (fun v : Fin (2 * n) => c v = true)).card = n /-- `T` is isomorphic to a spanning subgraph of the prime-sum graph on `{1,β¦,2n}`(vertex `i` represents the integer `i + 1`). -/def EmbedsInPrimeSum {n : β} (T : SimpleGraph (Fin (2 * n))) : Prop := β Ο : Fin (2 * n) β Fin (2 * n), β u v : Fin (2 * n), T.Adj u v β Nat.Prime (((Ο u : β) + 1) + ((Ο v : β) + 1)) /-- Every balanced tree of maximum degree β€ Ξ on 2n vertices embeds spanningly in the prime-sumgraph, for all large n. -/def Claim : Prop := β Ξ : β, β nβ : β, β n : β, nβ β€ n β β T : SimpleGraph (Fin (2 * n)), T.IsTree β MaxDegLE T Ξ β Balanced T β EmbedsInPrimeSum T endend OpenProblems.QEDE230