Models for cubic-graph -factors and the C02 family
Definitioncubic_p3_partition_modelsThis module fixes the finite-simple-graph model used by the mission. It defines vertex degree, cubicity, 3-vertex-connectivity by deletion of at most two vertices, noninduced -factors, specified paths and their deletion, Kelmans's claims and , spanning 2-factors, perfect matchings, relative matching complements, and component-order divisibility.
It also defines the explicit graph family on vertices from candidate C02 by a complete adjacency predicate. The first nine labels carry the fixed Petersen-minus-one-vertex brick, and the remaining labels and three joining edges are encoded arithmetically.
The bijection in P3Factor enforces both vertex coverage and disjointness. Only the two selected consecutive edges are required, so an ambient chord is allowed and the represented paths are not required to be induced.
Formalization Note The module is a shared, sorry-free interface. It does not assert that the open problem or the C02 candidate claims are proved.
import Mathlib
namespace CubicP3Partition
universe u
variable {V : Type u} [Fintype V]
/-- The number of neighbors of a vertex. -/
noncomputable def degree (G : SimpleGraph V) (v : V) : Nat :=
Nat.card {w : V // G.Adj v w}
/-- Every vertex has degree three. -/
def Cubic (G : SimpleGraph V) : Prop :=
∀ v, degree G v = 3
/-- Deleting any set of at most two vertices leaves a connected graph.
The order condition excludes the degenerate graphs with fewer than four vertices. -/
def ThreeVertexConnected (G : SimpleGraph V) : Prop :=
4 ≤ Fintype.card V ∧
∀ S : Finset V, S.card ≤ 2 →
(G.induce {v : V | v ∉ S}).Connected
/-- A partition of the vertices into ordered triples whose first--second and
second--third pairs are edges. No condition is imposed on the ambient edge
between the first and third vertices, so these paths need not be induced. -/
structure P3Factor (G : SimpleGraph V) where
blockCount : Nat
place : (Fin blockCount × Fin 3) ≃ V
edge01 : ∀ i : Fin blockCount, G.Adj (place (i, 0)) (place (i, 1))
edge12 : ∀ i : Fin blockCount, G.Adj (place (i, 1)) (place (i, 2))
/-- A specified three-vertex path in the ambient graph. -/
structure P3Path (G : SimpleGraph V) where
left : V
center : V
right : V
left_ne_center : left ≠ center
center_ne_right : center ≠ right
left_ne_right : left ≠ right
edge_left : G.Adj left center
edge_right : G.Adj center right
/-- Delete the three vertices of a specified path and take the induced graph. -/
def eraseP3 (G : SimpleGraph V) (L : P3Path G) :
SimpleGraph {v : V // v ≠ L.left ∧ v ≠ L.center ∧ v ≠ L.right} :=
G.induce {v : V | v ≠ L.left ∧ v ≠ L.center ∧ v ≠ L.right}
/-- Claim (z1) in Kelmans's Theorem 3.1, restricted to ordinary small types. -/
def ClaimZ1 : Prop :=
∀ (W : Type) [Fintype W], ∀ G : SimpleGraph W,
Cubic G → ThreeVertexConnected G → Fintype.card W % 6 = 0 →
Nonempty (P3Factor G)
/-- Claim (z8) in Kelmans's Theorem 3.1, restricted to ordinary small types. -/
def ClaimZ8 : Prop :=
∀ (W : Type) [Fintype W], ∀ G : SimpleGraph W,
Cubic G → ThreeVertexConnected G → Fintype.card W % 6 = 0 →
∀ L : P3Path G, Nonempty (P3Factor (eraseP3 G L))
/-- A spanning 2-regular subgraph. -/
def TwoFactor (G F : SimpleGraph V) : Prop :=
F ≤ G ∧ ∀ v, degree F v = 2
/-- Number of vertices in the connected component of `v` in `F`. -/
noncomputable def componentOrder (F : SimpleGraph V) (v : V) : Nat :=
Nat.card {w : V // F.Reachable v w}
/-- A spanning 2-factor all of whose connected components have order divisible by three. -/
def DivisibleTwoFactor (G F : SimpleGraph V) : Prop :=
TwoFactor G F ∧ ∀ v, 3 ∣ componentOrder F v
/-- The graph has a divisible 2-factor. -/
def HasDivisibleTwoFactor (G : SimpleGraph V) : Prop :=
∃ F : SimpleGraph V, DivisibleTwoFactor G F
/-- A spanning 1-regular subgraph. -/
def PerfectMatching (G M : SimpleGraph V) : Prop :=
M ≤ G ∧ ∀ v, degree M v = 1
/-- The relative edge complement of `M` inside `G`, on the same vertex type. -/
def matchingComplement (G M : SimpleGraph V) : SimpleGraph V :=
G ⊓ Mᶜ
/-- The strengthened route: some perfect matching has a divisible 2-factor as its complement. -/
def HasDivisibleComplement (G : SimpleGraph V) : Prop :=
∃ M : SimpleGraph V,
PerfectMatching G M ∧ DivisibleTwoFactor G (matchingComplement G M)
/-- The twelve internal edges of the fixed Petersen-minus-one-vertex brick. -/
def brickEdges : List (Nat × Nat) :=
[(0, 1), (0, 5), (1, 2), (1, 6), (2, 3), (2, 7),
(3, 8), (4, 6), (4, 7), (5, 7), (5, 8), (6, 8)]
/-- A directed presentation of the edges used to define the C02 family. -/
def forwardEdge (q u v : Nat) : Prop :=
(u, v) ∈ brickEdges ∨
(9 ≤ u ∧ (v = u + 1 ∨ v = u + (6 * q + 5))) ∨
(u = 0 ∧ v = 9) ∨
(u = 3 ∧ v = 17 + 12 * q) ∨
(u = 4 ∧ v = 13 + 6 * q)
/-- The explicit C02 graph family, of order `18 + 12*q`. -/
def H (q : Nat) : SimpleGraph (Fin (18 + 12 * q)) where
Adj u v := u ≠ v ∧
(forwardEdge q u.val v.val ∨ forwardEdge q v.val u.val)
symm := ⟨by
intro u v h
exact ⟨Ne.symm h.1, h.2.symm⟩⟩
loopless := ⟨by
intro v h
exact h.1 rfl⟩
end CubicP3PartitionRead-back
What the Lean code literally says, in plain math · gpt-5.6-luna
degree:在宇宙 中的有限类型 (带有 Fintype V 实例)上,对任意简单图 和顶点 ,degree G v 定义为满足 在 与 之间有边的顶点 所组成的 subtype 的自然数基数,即 。
Cubic:对上述有限类型 上的简单图 ,Cubic G 是命题:对每个顶点 ,满足 的 的数量恰好等于 ,也就是 ∀v∈V,0;Nat.card(\{w : V ∣ G.Adj v w\})=3。
ThreeVertexConnected:对有限类型 上的简单图 ,ThreeVertexConnected G 当且仅当同时满足 ,以及对每个有限子集 ,若 ,则图 连通;这里被诱导图的顶点是带有 证明的 的 subtype,边关系继承自 。 可以是空集,也可以有一个或两个顶点;定义中没有其他条件。
P3Factor:对有限类型 上的简单图 ,一个 P3Factor G 对象是一个结构,包含一个自然数 (字段 blockCount)、一个从 到 的双射 ,以及对每个 的两条边条件: 与 在 中相邻,且 与 在 中相邻。双射覆盖所有 ,而 没有单独的正性约束;除这两类边条件外,没有声明 与 必须相邻。
P3Path:对有限类型 上的简单图 ,一个 P3Path G 对象包含三个顶点 left、center、right∈V,并包含 、、 三个两两不等条件,以及 和 两个邻接条件;没有声明 与 之间必须有边。
eraseP3:给有限类型 上的简单图 和一个 P3Path G 对象 ,eraseP3 G L 是定义在 subtype 上的简单图;其边关系是 在这些剩余顶点上的诱导边关系。该定义只按三个不等条件筛除顶点。
ClaimZ1:ClaimZ1 是一个全称命题:对每个小类型 (即 Type 中的类型)及其 Fintype W 实例、每个定义在 上的简单图 ,如果每个顶点的 邻居数为 ,且 并且删除任意满足 的有限子集 后所得诱导图连通,且 除以 的自然数余数为 ,那么存在某个自然数 、一个双射 ,使得对每个 , 与 相邻且 与 相邻。这里邻居数就是满足 的 的 subtype 的自然数基数;所有 、其有限性实例和 都在全称量化范围内。
ClaimZ8:ClaimZ8 先对每个小类型 及其 Fintype W 实例、每个简单图 作与 ClaimZ1 相同的三个前提:每个顶点有恰好 个邻居, 且对所有 的有限子集只要 就有相应诱导图连通,并且 除以 的余数为 ;在这些前提下,它还要求对每个指定的三元路径 ——即三个两两不同的顶点 left、center、right,其中 left 与 center 相邻且 center 与 right 相邻——都存在某个自然数 和双射 ,并且每个块的前两对位置分别在从 诱导出的剩余顶点图中相邻。若没有这样的 ,这个内层全称条件为空真。
TwoFactor:对同一有限顶点类型 上的两个简单图 、,TwoFactor G F 是命题:对所有 ,若 在 之间有边则 也有边,并且对每个 ,满足 的 的数量恰好为 。定义没有额外的连通性条件;“spanning”只由 与 使用同一个顶点类型体现。
componentOrder:对有限类型 上的简单图 和顶点 ,componentOrder F v 是所有能从 在 中到达的顶点 所组成的 subtype 的自然数基数,即 ;可达关系包含从 到自身的零长度路径。
DivisibleTwoFactor:对同一有限顶点类型 上的简单图 、,DivisibleTwoFactor G F 要求同时满足:对所有 , 的边都是 的边;对每个 , 恰有两个邻居;并且对每个 ,在 中从 可达的顶点数量是 的倍数,即存在自然数 使该数量等于 。没有额外的非空或连通性条件;若 为空,所有顶点量化的条件为空真。
HasDivisibleTwoFactor:对有限类型 上的简单图 ,HasDivisibleTwoFactor G 表示存在某个定义在同一顶点类型 上的简单图 ,使得每条 边也是 的边、每个顶点在 中有恰好两个邻居,并且每个顶点在 中的可达分支大小都是 的倍数。存在性不要求该 唯一,也没有单独的非空条件。
PerfectMatching:对有限类型 上的简单图 、,PerfectMatching G M 表示每条 边也是 的边,并且对每个 ,满足 的 的数量恰好为 。它没有额外的唯一性、连通性或非空顶点条件;当顶点类型为空时,顶点量化条件为空真。
matchingComplement:对同一有限顶点类型 上的简单图 、,matchingComplement G M 是图 ;对任意 , 在 之间有边当且仅当 在 之间有边且 在 之间没有边。这里取的是 的补图与 的边交集;该定义本身没有把 作为前提。
HasDivisibleComplement:对有限类型 上的简单图 ,HasDivisibleComplement G 表示存在某个简单图 定义在 上,使得每条 边都是 的边、每个顶点恰有一个 邻居,并且令 为满足 当且仅当 且不满足 的图后, 的每条边也是 的边、每个顶点在 中恰有两个邻居,而且对每个顶点 ,在 中从 可达的顶点数量是 的倍数。这里的 条件属于 DivisibleTwoFactor 的展开内容, 只要求存在而不要求唯一。
brickEdges:brickEdges 是一个由自然数有序对组成的列表,且其完整顺序为 。
forwardEdge:对任意 ,forwardEdge q u v 当且仅当以下五个条件至少一个成立: 属于上述十二个有序对的列表;或者 且 或 ;或者 且 ;或者 且 ;或者 且 。该谓词自身没有 条件,也没有要求 、 落在任何有限范围内。
H:对每个 ,H q 是顶点类型为 的简单图。令 表示对自然数 成立的 forwardEdge q a b 条件,并将其完全展开为
对任意 , 与 相邻当且仅当 且 。因此,算术条件只作用于这两个顶点的自然数值,除显示的条件外没有额外范围检查; 也在量化范围内。
Confirmed by the mission captain (proposal self-audit).