op309_linear_three_hosts_local_degree_six
In a finite host-incidence structure, a class incident with exactly three three-class hosts has degree six in the common-host graph if it and every other class share at most one host.
Statement
theorem op309_linear_three_hosts_local_degree_six {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] (I : SimpleGraph (A ⊕ B)) [DecidableRel I.Adj] (a : A) (hclass : (Finset.univ.filter fun b : B => I.Adj (.inl a) (.inr b)).card = 3) (hhost : ∀ b : B, I.Adj (.inl a) (.inr b) → (Finset.univ.filter fun x : A => I.Adj (.inl x) (.inr b)).card = 3) (hlinear : ∀ a' : A, a ≠ a' → (Finset.univ.filter fun b : B => I.Adj (.inl a) (.inr b) ∧ I.Adj (.inl a') (.inr b)).card ≤ 1) (Q : SimpleGraph A) [DecidableRel Q.Adj] (hQ : Q = op309_common_host_graph I) : Q.degree a = 6
- Source
- OP-309 canonical port-graph selection; local form of the staged op309_linear_triple_incidence_common_graph_six_regular in state/campaigns/op309-in1166-seeds/six-regular-core-spec.json.
- Verified
- 27 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- op309_common_host_graphThe simple graph joining distinct port classes exactly when they share a host component.
The proof, explained
The degree of a class a in the common-host graph is the size of its neighborhood, which is the union over all hosts incident with a of the other classes incident with those hosts. By the linearity hypothesis, two distinct classes share at most one host, ensuring that distinct hosts incident with a cannot share any other class and making these sets of classes pairwise disjoint. Consequently, the degree of a is the sum of the number of other classes on each incident host; since a is incident with 3 hosts and each host is incident with 3 classes (giving 3 - 1 = 2 other classes per host), this sum is 3 × 2 = 6.
The neighbor set of a in Q is the union over all hosts b incident with a of the other classes incident with b.
By definition of the common-host graph Q (op309_common_host_graph), two distinct classes are adjacent if and only if they share a host. Using SimpleGraph.mem_neighborFinset and Finset.mem_biUnion, a class a' is adjacent to a in Q if and only if a' ≠ a and there exists a host b incident to both a and a'. This is precisely the union over all hosts b incident with a of the classes incident with b other than a.
uses
SimpleGraph.mem_neighborFinset,Finset.mem_biUnion,Ne.symm,Finset.mem_filter,Finset.mem_univ,true_and,Finset.mem_eraseclassical have hN : Q.neighborFinset a = (Finset.univ.filter fun b : B => I.Adj (.inl a) (.inr b)).biUnion (fun b => (Finset.univ.filter fun x : A => I.Adj (.inl x) (.inr b)).erase a) := by ext a' rw [SimpleGraph.mem_neighborFinset, Finset.mem_biUnion, hQ] constructor · rintro ⟨hne, b, h1, h2⟩ exact ⟨b, by simp [h1], by simp [h2, Ne.symm hne]⟩ · rintro ⟨b, hb, hc⟩ simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_erase] at hb hc exact ⟨Ne.symm hc.1, b, hb, hc.2⟩
The degree of a is expressed as the sum over hosts b incident with a of the number of other classes incident with b, reducing the goal to evaluating this sum and showing pairwise disjointness.
The degree of a vertex equals the cardinality of its neighbor finset (SimpleGraph.card_neighborFinset_eq_degree). Rewriting with the union characterization hN, Finset.card_biUnion rewrites the cardinality of this union as the sum of the cardinalities of the individual sets, producing two subgoals: evaluating the sum to 6, and proving that the sets for distinct hosts are pairwise disjoint.
uses
SimpleGraph.card_neighborFinset_eq_degree,Finset.card_biUnionrw [← SimpleGraph.card_neighborFinset_eq_degree, hN, Finset.card_biUnion]The sum of the number of other classes incident with each host b of a equals 6.
By hypothesis hhost, each host b incident with a has exactly 3 incident classes. Removing a leaves 3 - 1 = 2 classes (Finset.card_erase_of_mem). Since a is incident with exactly 3 hosts by hclass, replacing each term with 2 (Finset.sum_congr) gives a constant sum 3 • 2 = 6 (Finset.sum_const).
uses
Finset.sum_congr,Finset.sum_const,Finset.mem_filter,Finset.mem_univ,true_and,Finset.card_erase_of_mem· rw [Finset.sum_congr rfl (g := fun _ => 2)] · rw [Finset.sum_const, hclass]; rfl · intro b hb simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hb rw [Finset.card_erase_of_mem (by simp [hb]), hhost b hb]
The sets of other classes for distinct hosts incident with a are pairwise disjoint, completing the proof.
To show pairwise disjointness (Function.onFun, Finset.disjoint_left), suppose for contradiction that two distinct hosts b ≠ b' incident with a share another class x ≠ a. Then both b and b' are incident to both a and x, so {b, b'} is a subset of the hosts shared by a and x. Because b ≠ b', this pair has cardinality 2 (Finset.card_pair), which implies by monotonicity (Finset.card_le_card) that a and x share at least 2 hosts. But since a ≠ x (Ne.symm), the linearity hypothesis hlinear states that a and x share at most 1 host, a linear arithmetic contradiction (2 ≤ 1) closed by omega.
uses
Function.onFun,Finset.disjoint_left,Finset.mem_filter,Finset.mem_univ,true_and,Finset.mem_erase,Finset.mem_coe,Finset.mem_insert,Finset.mem_singleton,Finset.card_le_card,Finset.card_pair,Ne.symm· intro b hb b' hb' hne rw [Function.onFun, Finset.disjoint_left] intro x hx hx' simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_erase, Finset.mem_coe] at hx hx' hb hb' have hsub : ({b, b'} : Finset B) ⊆ Finset.univ.filter fun c : B => I.Adj (.inl a) (.inr c) ∧ I.Adj (.inl x) (.inr c) := by intro c hc simp only [Finset.mem_insert, Finset.mem_singleton] at hc rcases hc with rfl | rfl · simp [hb, hx.2] · simp [hb', hx'.2] have h2 := Finset.card_le_card hsub rw [Finset.card_pair hne] at h2 have := hlinear x (Ne.symm hx.1) omega
Finset.card_biUnion- The cardinality of a pairwise disjoint union of finsets is the sum of their individual cardinalities.
Finset.card_erase_of_mem- Removing an element from a finset decreases its cardinality by 1.
Finset.card_le_card- If a finset is a subset of another, its cardinality is less than or equal to that of the superset.
Finset.card_pair- A pair set of two distinct elements has cardinality 2.
Finset.disjoint_left- Two finsets are disjoint if and only if no element of the first belongs to the second.
Finset.mem_biUnion- An element belongs to a finset union if and only if it belongs to one of the constituent finsets.
Finset.mem_coe- An element belongs to the set coercion of a finset if and only if it belongs to the finset.
Finset.mem_erase- An element belongs to a finset with an element removed if and only if it is not equal to that element and belongs to the original finset.
Finset.mem_filter- An element belongs to a filtered finset if and only if it belongs to the original finset and satisfies the predicate.
Finset.mem_insert- An element belongs to the insertion of an element into a finset if and only if it equals the inserted element or already belongs to the finset.
Finset.mem_singleton- An element belongs to a singleton set if and only if it equals that single element.
Finset.mem_univ- Every element of a finite type belongs to the universal finset.
Finset.sum_congr- Two sums over finsets are equal if their index sets are equal and their summands agree on every element.
Finset.sum_const- The sum of a constant value over a finset is the cardinality of the finset multiplied by that constant.
Function.onFun- Applies a binary relation to the results of applying a function to two inputs.
Ne.symm- Inequality is symmetric: if a ≠ b then b ≠ a.
SimpleGraph.card_neighborFinset_eq_degree- The degree of a vertex in a simple graph equals the cardinality of its neighbor finset.
SimpleGraph.mem_neighborFinset- A vertex belongs to the neighbor finset of another vertex if and only if they are adjacent.
true_and- Conjunction with True simplifies to the proposition itself.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem op309_linear_three_hosts_local_degree_six {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] (I : SimpleGraph (A ⊕ B)) [DecidableRel I.Adj] (a : A) (hclass : (Finset.univ.filter fun b : B => I.Adj (.inl a) (.inr b)).card = 3) (hhost : ∀ b : B, I.Adj (.inl a) (.inr b) → (Finset.univ.filter fun x : A => I.Adj (.inl x) (.inr b)).card = 3) (hlinear : ∀ a' : A, a ≠ a' → (Finset.univ.filter fun b : B => I.Adj (.inl a) (.inr b) ∧ I.Adj (.inl a') (.inr b)).card ≤ 1) (Q : SimpleGraph A) [DecidableRel Q.Adj] (hQ : Q = op309_common_host_graph I) : Q.degree a = 6 := by classical have hN : Q.neighborFinset a = (Finset.univ.filter fun b : B => I.Adj (.inl a) (.inr b)).biUnion (fun b => (Finset.univ.filter fun x : A => I.Adj (.inl x) (.inr b)).erase a) := by ext a' rw [SimpleGraph.mem_neighborFinset, Finset.mem_biUnion, hQ] constructor · rintro ⟨hne, b, h1, h2⟩ exact ⟨b, by simp [h1], by simp [h2, Ne.symm hne]⟩ · rintro ⟨b, hb, hc⟩ simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_erase] at hb hc exact ⟨Ne.symm hc.1, b, hb, hc.2⟩ rw [← SimpleGraph.card_neighborFinset_eq_degree, hN, Finset.card_biUnion] · rw [Finset.sum_congr rfl (g := fun _ => 2)] · rw [Finset.sum_const, hclass]; rfl · intro b hb simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hb rw [Finset.card_erase_of_mem (by simp [hb]), hhost b hb] · intro b hb b' hb' hne rw [Function.onFun, Finset.disjoint_left] intro x hx hx' simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_erase, Finset.mem_coe] at hx hx' hb hb' have hsub : ({b, b'} : Finset B) ⊆ Finset.univ.filter fun c : B => I.Adj (.inl a) (.inr c) ∧ I.Adj (.inl x) (.inr c) := by intro c hc simp only [Finset.mem_insert, Finset.mem_singleton] at hc rcases hc with rfl | rfl · simp [hb, hx.2] · simp [hb', hx'.2] have h2 := Finset.card_le_card hsub rw [Finset.card_pair hne] at h2 have := hlinear x (Ne.symm hx.1) omega