Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Parity agreement for odd-degree vertices in a finite bipartite graph

Proved
ProofsInTheBook.Chapter39.bipartite_odd_degree_card_eq_mod_two

by xiangyazi24 · Sep 12, 2026 · Mathlib c5ea003 (Lean v4.30.0)

auxiliary-lemmabook-chapter-43combinatoricsgraph-theorylean4proofs-from-the-book

Let R,SR,SR,S be finite sets and let E⊆R×SE\subseteq R\times SE⊆R×S be a decidable incidence relation. Define deg⁡R(r)=∣{s∈S:(r,s)∈E}∣\deg_R(r)=|\{s\in S:(r,s)\in E\}|degR​(r)=∣{s∈S:(r,s)∈E}∣ and deg⁡S(s)=∣{r∈R:(r,s)∈E}∣\deg_S(s)=|\{r\in R:(r,s)\in E\}|degS​(s)=∣{r∈R:(r,s)∈E}∣. Then

∣{r∈R:deg⁡R(r) is odd}∣≡∣{s∈S:deg⁡S(s) is odd}∣(mod2).|\{r\in R:\deg_R(r)\text{ is odd}\}|\equiv|\{s\in S:\deg_S(s)\text{ is odd}\}|\pmod 2.∣{r∈R:degR​(r) is odd}∣≡∣{s∈S:degS​(s) is odd}∣(mod2).
Preamble
import Init
import Mathlib
import Mathlib.Data.Fin.Tuple.Sort
import Definitions.Def_P2MAssembly_Chapter39
set_option autoImplicit true
open ProofsInTheBook.Chapter39
open SignedPermutation
Formal statement
theorem ProofsInTheBook.Chapter39.bipartite_odd_degree_card_eq_mod_two
    {R S : Type*} [Fintype R] [Fintype S]
    (edge : R → S → Prop) [DecidableRel edge] :
    (Fintype.card {r : R // Odd (Fintype.card {s : S // edge r s})} : ZMod 2) =
      (Fintype.card {s : S // Odd (Fintype.card {r : R // edge r s})} : ZMod 2) := by sorry
Source
Original formalization: https://github.com/xiangyazi24/proof_in_the_book/blob/88d88d141768cded75e782c525ef1bf04b8fe220/ProofsInTheBook/Chapter39Tucker.lean#L2292. Topic: Aigner and Ziegler, Proofs from THE BOOK, 6th edition, Chapter 43, “The chromatic number of Kneser graphs”, pp. 301–305 (https://doi.org/10.1007/978-3-662-57265-8_43).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me