AFTD Auto-Formalizing Theoretical Domains

op_2472_partial_two_claws_bob_wins

theoremverifiedformalization

If a finite graph F has at least two connected components isomorphic to the once-subdivided claw, then Alice does not have a winning strategy in the two-colour majority colouring game on F.

Statement

theorem op_2472_partial_two_claws_bob_wins
    {V : Type*} [Fintype V] [DecidableEq V]
    (F : SimpleGraph V) [DecidableRel F.Adj]
    (h_two : 2 ≤ subdivided_claw_count F) :
    ¬ majority_game_alice_wins F
Formalizes
arXiv:2611.32746: The majority game chromatic number for dense random graphs
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 9
  • subdivided_clawThe once-subdivided claw graph on Fin 7 with center 0 and paths 0-1-4, 0-2-5, 0-3-6, defined as SimpleGraph.fromRel of subdivided_claw_rel.
  • subdivided_claw_countThe number of connected components of a finite graph F whose induced subgraph is isomorphic to the once-subdivided claw.
  • subdivided_claw_relBinary relation on Fin 7 for the once-subdivided claw with center 0 and branches 0-1-4, 0-2-5, 0-3-6: holds for (u, v) iff u = 0 with v in…
  • majority_game_alice_winsAlice has a winning strategy in the two-colour majority colouring game on G if she can win starting from the completely uncoloured graph.
  • MajorityGameAliceWinsFromIn the two-colour majority colouring game on a finite graph G, Alice can win from a partial colouring c if all vertices are coloured, or…
  • is_partial_majority_coloringA partial colouring of a finite graph G by Boolean colours satisfies the majority condition if every coloured vertex has at most half its…
  • bitThe real embedding of a Boolean value, sending false to 0 and true to 1.
  • suppThe support $\mathrm{supp}(v) \subseteq \mathrm{Fin}\,n$ consists of coordinates where either component of $v$ is nonzero; the…
  • g$g(S,M) = \dim_{\mathbb{F}_p}(S^{\perp}_M) - \dim_{\mathbb{F}_p}(S_M)$.

Read back from the Lean

For any finite type $V$ with decidable equality and any simple graph $F$ on $V$ with decidable adjacency, if $F$ has at least 2 connected components that are isomorphic (as simple graphs) to the subdivided claw graph, then Alice does not win the majority coloring game on $F$ starting from the completely uncolored graph (i.e., ¬ majority_game_alice_wins F).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

namespace In1287abbrev St := Fin 7 → Option Booldef nb (a : Fin 7) : List (Fin 7) :=  ![[1,2,3],[0,4],[0,5],[0,6],[1],[2],[3]] adef legalAt (s : St) (a : Fin 7) : Bool :=  match s a with  | none => true  | some col => decide (2 * (nb a).countP (fun b => decide (s b = some col)) ≤ (nb a).length)def cl (s : St) : Bool := (List.finRange 7).all (legalAt s)def upd (s : St) (a : Fin 7) (col : Bool) : St := fun b => if b = a then some col else s bdef deadB (s : St) : Bool :=  (List.finRange 7).any (fun a => decide (s a = none) && !cl (upd s a false) && !cl (upd s a true))def fullB (s : St) : Bool := (List.finRange 7).all (fun a => (s a).isSome)def enc : Option Bool → Nat  | none => 0  | some false => 1  | some true => 2def code (s : St) : Nat :=  enc (s 0) + 3 * (enc (s 1) + 3 * (enc (s 2) + 3 * (enc (s 3) + 3 * (enc (s 4) +    3 * (enc (s 5) + 3 * enc (s 6))))))def TYC : Nat := 11423562217377937432834817564864391002297960021372735801208206018351564066138304361453513994448506598162575112967497846317663967978861135558790983573561408571778023323795625227270645255498701643986239554979154809301002051059081569582453336550392633330936451835485131649361587406015918567767715528659263066981599786195574248124438567631520014342000693218768105162000531433709698537111034314421183039163295347314523933389281364026852768576119780011548178035423142314879112656426896042745254420260710485007889851902402647508823219349207111232535257108684710123386289268051459053279057391638953516118484146340069178526762206823092964105898263766591838972387093710631514520087770491288918867080215473525446918747640566013779751523655770074649458070727355479040584440288187146272768903034874834664197108284230828419068422268678011196777738108977900339693449684339469235682226346954711287495774923536265081617662886381052308705023896078822087522452504896755190083764459044862067625017025819622872967398110784503248059032367145289392527015760674969454795134363832151708024379482705393523934617072150364749735041297695843554340953330621082122506359610396613508942592553906198207368435470563787792912246108766625335809436451743564092471629344149489828483667910618812393205423001978957844026842579215190037762660149008750557704932360535259011594630106914383033235507965112601685291963377058232991708824846284002324996909931694019265798678831110855805669535747667450687997437360067621611142219362446764513972188729913214835271473755638594367040337806750536996164778706957612817919044022888495654533574823880997662808587087707873658902522391187404935665131385609245531696091877689488401658082115123481477839438576077888538442510025533097445449899252566767766343425376047812702908082707596920081656109964618540489429451110415955184797788423797171349595550102645085950090710325872972710288346592352271549833393448283800223908798559682646044494608083662742913481742965287804428095942015330013def TAC : Nat := 4475499758035221201789388848def TBC : Nat := 4943373216973858153708914672def GC : Nat := 2456612806026565941138031664def ty (s : St) : Nat := (TYC >>> (3 * code s)) % 8def bit (C : Nat) (i j : Nat) (q : Bool) : Bool := (C >>> ((i * 8 + j) * 2 + q.toNat)) % 2 == 1def TA (i j : Nat) (q : Bool) : Bool := bit TAC i j qdef TB (i j : Nat) (q : Bool) : Bool := bit TBC i j qdef GT (i j : Nat) (q : Bool) : Bool := bit GC i j qdef allMoves : List (Fin 7 × Bool) := (List.finRange 7).flatMap (fun a => [(a, false), (a, true)])def allJQ : List (Nat × Bool) := (List.range 8).flatMap (fun j => [(j, false), (j, true)])def chkA (s : St) : Bool := !(cl s) || deadB s || allMoves.all (fun m =>  !decide (s m.1 = none) || !cl (upd s m.1 m.2) || deadB (upd s m.1 m.2) ||    allJQ.all (fun jq => !TA (ty s) jq.1 jq.2 || TB (ty (upd s m.1 m.2)) jq.1 jq.2))def chkB (s : St) : Bool := !(cl s) || deadB s || allJQ.all (fun jq =>  !GT (ty s) jq.1 jq.2 || allMoves.any (fun m => decide (s m.1 = none) && cl (upd s m.1 m.2) &&    (deadB (upd s m.1 m.2) || TA (ty (upd s m.1 m.2)) jq.1 jq.2)))def chkF (s : St) : Bool := !(cl s) || !(fullB s) || ty s == 1def chkAll (s : St) : Bool := chkA s && chkB s && chkF sset_option maxRecDepth 100000 intheorem chk_all : ∀ x0 x1 x2 x3 x4 x5 x6 : Option Bool,    chkAll ![x0, x1, x2, x3, x4, x5, x6] = true := by decide +kerneltheorem chk (s : St) : chkAll s = true := by  have h := chk_all (s 0) (s 1) (s 2) (s 3) (s 4) (s 5) (s 6)  have e : (![s 0, s 1, s 2, s 3, s 4, s 5, s 6] : St) = s := by    funext i; fin_cases i <;> rfl  rwa [e] at htheorem mem_allMoves (a : Fin 7) (col : Bool) : (a, col) ∈ allMoves := by  revert a col; decidetheorem mem_allJQ {j : Nat} (hj : j < 8) (q : Bool) : (j, q) ∈ allJQ := by  simp only [allJQ, List.mem_flatMap, List.mem_range, List.mem_cons, Prod.mk.injEq]  exact ⟨j, hj, by cases q <;> simp⟩theorem ty_lt (s : St) : ty s < 8 := Nat.mod_lt _ (by norm_num)theorem of_chkA {s : St} (hc : cl s = true) (hd : deadB s = false) {a : Fin 7} {col : Bool}    (ha : s a = none) (hc' : cl (upd s a col) = true) (hd' : deadB (upd s a col) = false)    {j : Nat} (hj : j < 8) {q : Bool} (hT : TA (ty s) j q = true) :    TB (ty (upd s a col)) j q = true := by  have h := chk s  simp only [chkAll, chkA, Bool.and_eq_true, hc, hd, Bool.not_true, Bool.false_or,    List.all_eq_true] at h  have h1 := h.1.1 (a, col) (mem_allMoves a col)  simp only [ha, hc', hd', decide_true, Bool.not_true, Bool.false_or, List.all_eq_true] at h1  have h2 := h1 (j, q) (mem_allJQ hj q)  simpa [hT] using h2theorem of_chkB {s : St} (hc : cl s = true) (hd : deadB s = false)    {j : Nat} (hj : j < 8) {q : Bool} (hG : GT (ty s) j q = true) :    ∃ a col, s a = none ∧ cl (upd s a col) = true ∧      (deadB (upd s a col) = true ∨ TA (ty (upd s a col)) j q = true) := by  have h := chk s  simp only [chkAll, chkB, Bool.and_eq_true, hc, hd, Bool.not_true, Bool.false_or,    List.all_eq_true] at h  have h1 := h.1.2 (j, q) (mem_allJQ hj q)  simp only [hG, Bool.not_true, Bool.false_or, List.any_eq_true, Bool.and_eq_true,    decide_eq_true_eq, Bool.or_eq_true] at h1  obtain ⟨⟨a, col⟩, _, h3⟩ := h1  exact ⟨a, col, h3.1.1, h3.1.2, h3.2⟩theorem of_chkF {s : St} (hc : cl s = true) (hf : fullB s = true) : ty s = 1 := by  have h := chk s  simp only [chkAll, chkF, Bool.and_eq_true, hc, hf, Bool.not_true, Bool.false_or,    beq_iff_eq] at h  exact h.2theorem tab_sym : ∀ i j : Fin 8, ∀ q : Bool,    TA i j q = TA j i q ∧ TB i j q = TB j i q := by decidetheorem tab_pass : ∀ i j : Fin 8, ∀ q : Bool, TA i j q = true → TB i j (!q) = true := by decidetheorem tab_bob : ∀ i j : Fin 8, ∀ q : Bool, TB i j q = true →    GT i j q = true ∨ GT j i q = true ∨ (q = true ∧ TA i j false = true) := by decidetheorem tab_full : TA 1 1 false = false ∧ TB 1 1 false = false := by decidetheorem tab_init : ∀ q : Bool, TA 5 5 q = true := by decidetheorem ty_empty : ty (fun _ => none) = 5 := by decidetheorem cl_iff (s : St) : cl s = true ↔ ∀ b, legalAt s b = true := by  simp [cl, List.all_eq_true, List.mem_finRange]theorem nb_nodup : ∀ a, (nb a).Nodup := by decidetheorem claw_adj_iff : ∀ a b, subdivided_claw.Adj a b ↔ b ∈ nb a := by  intro a b  simp only [subdivided_claw, SimpleGraph.fromRel_adj, subdivided_claw_rel]  revert a b; decidesectionvariable {V : Type*} [Fintype V] [DecidableEq V] (F : SimpleGraph V) [DecidableRel F.Adj]def locF (c : V → Option Bool) (v : V) : Prop := ∀ col, c v = some col →    2 * ((F.neighborFinset v).filter (fun w => c w = some col)).card ≤ F.degree vstructure Emb (e : Fin 7 → V) : Prop where  inj : Function.Injective e  adj : ∀ a b, F.Adj (e a) (e b) ↔ b ∈ nb a  closed : ∀ a w, F.Adj (e a) w → ∃ b, e b = wvariable {F}theorem nbr_eq {e : Fin 7 → V} (he : Emb F e) (a : Fin 7) :    F.neighborFinset (e a) = ((nb a).map e).toFinset := by  ext w  simp only [SimpleGraph.mem_neighborFinset, List.mem_toFinset, List.mem_map]  constructor  · intro h    obtain ⟨b, rfl⟩ := he.closed a w h    exact ⟨b, (he.adj a b).1 h, rfl⟩  · rintro ⟨b, hb, rfl⟩    exact (he.adj a b).2 hbtheorem card_filter_nbr {e : Fin 7 → V} (he : Emb F e) (a : Fin 7) (P : V → Prop)    [DecidablePred P] :    ((F.neighborFinset (e a)).filter P).card = (nb a).countP (fun b => decide (P (e b))) := by  have hf : ((nb a).map e).toFinset.filter P =      (((nb a).map e).filter (fun x => decide (P x))).toFinset := by    ext; simp  rw [nbr_eq he, hf,    List.toFinset_card_of_nodup (((nb_nodup a).map he.inj).filter _),    ← List.countP_eq_length_filter, List.countP_map]  rfltheorem degree_eq {e : Fin 7 → V} (he : Emb F e) (a : Fin 7) :    F.degree (e a) = (nb a).length := by  rw [← SimpleGraph.card_neighborFinset_eq_degree, nbr_eq he,    List.toFinset_card_of_nodup ((nb_nodup a).map he.inj), List.length_map]theorem locF_iff {e : Fin 7 → V} (he : Emb F e) (c : V → Option Bool) (a : Fin 7) :    locF F c (e a) ↔ legalAt (c ∘ e) a = true := by  unfold locF legalAt  simp only [Function.comp]  cases h : c (e a) with  | none => simp  | some col =>    simp only [decide_eq_true_eq, Option.some.injEq]    constructor    · intro H      have := H col rfl      rwa [card_filter_nbr he, degree_eq he] at this    · rintro H _ rfl      rwa [card_filter_nbr he, degree_eq he]theorem comp_update {e : Fin 7 → V} (he : Emb F e) (c : V → Option Bool) (a : Fin 7)    (col : Bool) : Function.update c (e a) (some col) ∘ e = upd (c ∘ e) a col := by  funext b  simp only [Function.comp, Function.update_apply, upd, he.inj.eq_iff]theorem comp_update_far {e : Fin 7 → V} (c : V → Option Bool) (v : V) (x : Option Bool)    (hv : ∀ b, e b ≠ v) : Function.update c v x ∘ e = c ∘ e := by  funext b  simp only [Function.comp, Function.update_of_ne (hv b)]theorem locF_update_far {c : V → Option Bool} {x v : V} {y : Option Bool} (hne : v ≠ x)    (hnadj : ¬ F.Adj v x) : locF F (Function.update c x y) v ↔ locF F c v := by  unfold locF  rw [Function.update_of_ne hne]  apply forall_congr'; intro col; apply imp_congr_right; intro _  rw [Finset.filter_congr (q := fun w => c w = some col)]  intro w hw  rw [Function.update_of_ne]  rintro rfl  exact hnadj ((SimpleGraph.mem_neighborFinset _ _ _).1 hw)theorem legal_cl {e : Fin 7 → V} (he : Emb F e) {c : V → Option Bool}    (hc : is_partial_majority_coloring F c) : cl (c ∘ e) = true :=  (cl_iff _).2 fun b => (locF_iff he c b).1 (hc (e b))theorem legal_update_iff {e : Fin 7 → V} (he : Emb F e) {c : V → Option Bool}    (hc : is_partial_majority_coloring F c) (a : Fin 7) (col : Bool) :    is_partial_majority_coloring F (Function.update c (e a) (some col)) ↔      cl (upd (c ∘ e) a col) = true := by  constructor  · intro h    rw [← comp_update he]    exact legal_cl he h  · intro h v    by_cases hv : ∃ b, e b = v    · obtain ⟨b, rfl⟩ := hv      refine (locF_iff he _ b).2 ?_      rw [comp_update he]      exact (cl_iff _).1 h b    · have hne : v ≠ e a := fun h' => hv ⟨a, h'.symm⟩      have hnadj : ¬ F.Adj v (e a) := fun h' => hv (he.closed a v h'.symm)      exact (locF_update_far hne hnadj).2 (hc v)theorem legal_mono {c c' : V → Option Bool} (hle : ∀ u x, c u = some x → c' u = some x)    (h : is_partial_majority_coloring F c') : is_partial_majority_coloring F c := by  intro v col hv  refine le_trans (Nat.mul_le_mul_left 2 (Finset.card_le_card ?_)) (h v col (hle v col hv))  intro w hw  simp only [Finset.mem_filter] at hw ⊢  exact ⟨hw.1, hle w col hw.2⟩theorem dead_not_wins {c : V → Option Bool} (hw : MajorityGameAliceWinsFrom F c) :    ∀ v, c v = none → (∀ col, ¬ is_partial_majority_coloring F (Function.update c v (some col))) →      False := by  induction hw with  | full c hfull =>    intro v hv _    simpa [hv] using hfull v  | alice_turn c w col heven hnone hlegal hwin ih =>    intro v hv hdead    have hwv : w ≠ v := by rintro rfl; exact hdead col hlegal    refine ih v (by rw [Function.update_of_ne hwv.symm]; exact hv) fun col' h' => hdead col' ?_    refine legal_mono ?_ h'    intro u x hu    by_cases huv : u = v    · subst huv; simpa using hu    · rw [Function.update_of_ne huv] at hu ⊢      have huw : u ≠ w := by rintro rfl; simp [hnone] at hu      rw [Function.update_of_ne huw]; exact hu  | bob_turn c hodd hex hall ih =>    intro v hv hdead    obtain ⟨w, col, hnone, hlegal⟩ := hex    have hwv : w ≠ v := by rintro rfl; exact hdead col hlegal    refine ih w col hnone hlegal v (by rw [Function.update_of_ne hwv.symm]; exact hv)      fun col' h' => hdead col' ?_    refine legal_mono ?_ h'    intro u x hu    by_cases huv : u = v    · subst huv; simpa using hu    · rw [Function.update_of_ne huv] at hu ⊢      have huw : u ≠ w := by rintro rfl; simp [hnone] at hu      rw [Function.update_of_ne huw]; exact hutheorem dead_of_deadB {e : Fin 7 → V} (he : Emb F e) {c : V → Option Bool}    (hc : is_partial_majority_coloring F c) (hd : deadB (c ∘ e) = true) :    ∃ v, c v = none ∧ ∀ col, ¬ is_partial_majority_coloring F (Function.update c v (some col)) := by  simp only [deadB, List.any_eq_true, List.mem_finRange, true_and, Bool.and_eq_true,    decide_eq_true_eq, Bool.not_eq_true'] at hd  obtain ⟨a, ⟨ha, h0⟩, h1⟩ := hd  refine ⟨e a, ha, fun col h => ?_⟩  rw [legal_update_iff he hc] at h  cases col  · rw [h] at h0; exact absurd h0 (by decide)  · rw [h] at h1; exact absurd h1 (by decide)theorem emb_of_iso {C : F.ConnectedComponent} (φ : F.induce C.supp ≃g subdivided_claw) :    Emb F (fun a => (φ.symm a : V)) := by  refine ⟨fun a b h => φ.symm.injective (Subtype.ext h), fun a b => ?_, fun a w h => ?_⟩  · rw [← claw_adj_iff, ← φ.symm.map_adj_iff]; rfl  · have hw : w ∈ C.supp := by      rw [SimpleGraph.ConnectedComponent.mem_supp_iff,        ← SimpleGraph.ConnectedComponent.connectedComponentMk_eq_of_adj h]      exact (φ.symm a).2    exact ⟨φ ⟨w, hw⟩, by simp⟩def colored (c : V → Option Bool) : ℕ := (Finset.filter (fun u => (c u).isSome) Finset.univ).carddef pOut (e1 e2 : Fin 7 → V) (c : V → Option Bool) : ℕ :=  (Finset.filter (fun v => c v = none ∧ ∀ a, e1 a ≠ v ∧ e2 a ≠ v) Finset.univ).cardtheorem colored_update {c : V → Option Bool} {v : V} (hv : c v = none) (x : Bool) :    colored (Function.update c v (some x)) = colored c + 1 := by  unfold colored  rw [← Finset.card_insert_of_notMem (s := Finset.filter (fun u => (c u).isSome) Finset.univ)    (a := v) (by simp [hv])]  congr 1  ext u  by_cases huv : u = v  · subst huv; simp  · simp [Function.update_of_ne huv, huv]theorem pOut_update_in {e1 e2 : Fin 7 → V} {c : V → Option Bool} {v : V}    (hv : (∃ a, e1 a = v) ∨ (∃ a, e2 a = v)) (x : Option Bool) :    pOut e1 e2 (Function.update c v x) = pOut e1 e2 c := by  unfold pOut  congr 1  ext u  by_cases huv : u = v  · subst huv    simp only [Finset.mem_filter, Finset.mem_univ, true_and]    constructor    · rintro ⟨_, h⟩      rcases hv with ⟨a, ha⟩ | ⟨a, ha⟩      · exact absurd ha (h a).1      · exact absurd ha (h a).2    · rintro ⟨_, h⟩      rcases hv with ⟨a, ha⟩ | ⟨a, ha⟩      · exact absurd ha (h a).1      · exact absurd ha (h a).2  · simp [Function.update_of_ne huv]theorem pOut_update_out {e1 e2 : Fin 7 → V} {c : V → Option Bool} {v : V}    (hv : ∀ a, e1 a ≠ v ∧ e2 a ≠ v) (hc : c v = none) (x : Bool) :    pOut e1 e2 c = pOut e1 e2 (Function.update c v (some x)) + 1 := by  unfold pOut  rw [← Finset.card_insert_of_notMem (a := v) (by simp)]  congr 1  ext u  by_cases huv : u = v  · subst huv; simp [hc, hv]  · simp [Function.update_of_ne huv, huv]theorem pOut_zero_of_full {e1 e2 : Fin 7 → V} {c : V → Option Bool}    (hf : ∀ v, (c v).isSome) : pOut e1 e2 c = 0 := by  unfold pOut  rw [Finset.card_eq_zero, Finset.filter_eq_empty_iff]  intro v _ h  have := hf v  rw [h.1] at this  simp at thistheorem exists_out_of_pOut {e1 e2 : Fin 7 → V} {c : V → Option Bool} (h : 0 < pOut e1 e2 c) :    ∃ v, c v = none ∧ ∀ a, e1 a ≠ v ∧ e2 a ≠ v := by  unfold pOut at h  obtain ⟨v, hv⟩ := Finset.card_pos.1 h  simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hv  exact ⟨v, hv⟩def qq (e1 e2 : Fin 7 → V) (c : V → Option Bool) : Bool := decide (pOut e1 e2 c % 2 = 1)theorem qq_flip {e1 e2 : Fin 7 → V} {c c' : V → Option Bool}    (h : pOut e1 e2 c = pOut e1 e2 c' + 1) : qq e1 e2 c' = !qq e1 e2 c := by  unfold qq; rw [h]  by_cases h2 : pOut e1 e2 c' % 2 = 1  · have : ¬ (pOut e1 e2 c' + 1) % 2 = 1 := by omega    simp [h2, this]  · have : (pOut e1 e2 c' + 1) % 2 = 1 := by omega    simp [h2, this]theorem fullB_of_full {e : Fin 7 → V} {c : V → Option Bool} (hf : ∀ v, (c v).isSome) :    fullB (c ∘ e) = true := by  simp [fullB, List.all_eq_true, hf]/-- The main invariant: Bob's class table at the current position. -/theorem main {e1 e2 : Fin 7 → V} (h1 : Emb F e1) (h2 : Emb F e2)    (hdisj : ∀ a b, e1 a ≠ e2 b) {c : V → Option Bool} (hw : MajorityGameAliceWinsFrom F c) :    is_partial_majority_coloring F c →      (Even (colored c) → TA (ty (c ∘ e1)) (ty (c ∘ e2)) (qq e1 e2 c) = true → False) ∧      (Odd (colored c) → TB (ty (c ∘ e1)) (ty (c ∘ e2)) (qq e1 e2 c) = true → False) := by  induction hw with  | full c hfull =>    intro hc    have t1 := of_chkF (legal_cl h1 hc) (fullB_of_full hfull)    have t2 := of_chkF (legal_cl h2 hc) (fullB_of_full hfull)    have hq : qq e1 e2 c = false := by simp [qq, pOut_zero_of_full hfull]    rw [t1, t2, hq, tab_full.1, tab_full.2]    exact ⟨fun _ h => absurd h (by decide), fun _ h => absurd h (by decide)⟩  | alice_turn c v col heven hnone hlegal hwin ih =>    intro hc    have hW : MajorityGameAliceWinsFrom F c :=      MajorityGameAliceWinsFrom.alice_turn c v col heven hnone hlegal hwin    have hodd' : Odd (colored (Function.update c v (some col))) := by      rw [colored_update hnone]; exact heven.add_one    have hnd1 : deadB (c ∘ e1) = false := by      by_contra hd; simp only [Bool.not_eq_false] at hd      obtain ⟨u, hu, hu'⟩ := dead_of_deadB h1 hc hd      exact dead_not_wins hW u hu hu'    have hnd2 : deadB (c ∘ e2) = false := by      by_contra hd; simp only [Bool.not_eq_false] at hd      obtain ⟨u, hu, hu'⟩ := dead_of_deadB h2 hc hd      exact dead_not_wins hW u hu hu'    have hnd' : ∀ {e : Fin 7 → V}, Emb F e → deadB (Function.update c v (some col) ∘ e) = false := by      intro e he      by_contra hd; simp only [Bool.not_eq_false] at hd      obtain ⟨u, hu, hu'⟩ := dead_of_deadB he hlegal hd      exact dead_not_wins hwin u hu hu'    refine ⟨fun _ hT => ?_, fun hodd _ => (Nat.not_even_iff_odd.2 hodd heven).elim⟩    have IH := (ih hlegal).2 hodd'    by_cases hv1 : ∃ a, e1 a = v    · obtain ⟨a, rfl⟩ := hv1      have hq := pOut_update_in (c := c) (e1 := e1) (e2 := e2) (Or.inl ⟨a, rfl⟩) (some col)      have hc2 : Function.update c (e1 a) (some col) ∘ e2 = c ∘ e2 :=        comp_update_far c _ _ fun b h => hdisj a b h.symm      have hcl := (legal_update_iff h1 hc a col).1 hlegal      have hnd := hnd' h1      rw [comp_update h1] at hnd      apply IH      rw [comp_update h1, hc2, qq, hq]      exact of_chkA (legal_cl h1 hc) hnd1 hnone hcl hnd (ty_lt _) hT    by_cases hv2 : ∃ a, e2 a = v    · obtain ⟨a, rfl⟩ := hv2      have hq := pOut_update_in (c := c) (e1 := e1) (e2 := e2) (Or.inr ⟨a, rfl⟩) (some col)      have hc1 : Function.update c (e2 a) (some col) ∘ e1 = c ∘ e1 :=        comp_update_far c _ _ fun b h => hdisj b a h      have hcl := (legal_update_iff h2 hc a col).1 hlegal      have hnd := hnd' h2      rw [comp_update h2] at hnd      apply IH      rw [comp_update h2, hc1, qq, hq]      have hT' : TA (ty (c ∘ e2)) (ty (c ∘ e1)) (qq e1 e2 c) = true := by        rw [← (tab_sym ⟨_, ty_lt (c ∘ e1)⟩ ⟨_, ty_lt (c ∘ e2)⟩ _).1]; exact hT      have := of_chkA (legal_cl h2 hc) hnd2 hnone hcl hnd (ty_lt _) hT'      rw [(tab_sym ⟨_, ty_lt (c ∘ e1)⟩ ⟨_, ty_lt (upd (c ∘ e2) a col)⟩ _).2]      exact this    · have hout : ∀ a, e1 a ≠ v ∧ e2 a ≠ v := fun a =>        ⟨fun h => hv1 ⟨a, h⟩, fun h => hv2 ⟨a, h⟩⟩      have hp := pOut_update_out hout hnone col      apply IH      rw [comp_update_far c v _ (fun a => (hout a).1), comp_update_far c v _ (fun a => (hout a).2),        qq_flip hp]      exact tab_pass ⟨_, ty_lt _⟩ ⟨_, ty_lt _⟩ _ hT  | bob_turn c hodd hex hall ih =>    intro hc    have hW : MajorityGameAliceWinsFrom F c := MajorityGameAliceWinsFrom.bob_turn c hodd hex hall    refine ⟨fun heven _ => (Nat.not_even_iff_odd.2 hodd heven).elim, fun _ hT => ?_⟩    have hnd1 : deadB (c ∘ e1) = false := by      by_contra hd; simp only [Bool.not_eq_false] at hd      obtain ⟨u, hu, hu'⟩ := dead_of_deadB h1 hc hd      exact dead_not_wins hW u hu hu'    have hnd2 : deadB (c ∘ e2) = false := by      by_contra hd; simp only [Bool.not_eq_false] at hd      obtain ⟨u, hu, hu'⟩ := dead_of_deadB h2 hc hd      exact dead_not_wins hW u hu hu'    -- a Bob move to `c'` from which Alice cannot win    have step : ∀ v x, c v = none → is_partial_majority_coloring F (Function.update c v (some x)) →        (deadB (Function.update c v (some x) ∘ e1) = true ∨          deadB (Function.update c v (some x) ∘ e2) = true ∨          TA (ty (Function.update c v (some x) ∘ e1)) (ty (Function.update c v (some x) ∘ e2))            (qq e1 e2 (Function.update c v (some x))) = true) → False := by      intro v x hv hl hgood      have hwin := hall v x hv hl      rcases hgood with hd | hd | hT'      · obtain ⟨u, hu, hu'⟩ := dead_of_deadB h1 hl hd        exact dead_not_wins hwin u hu hu'      · obtain ⟨u, hu, hu'⟩ := dead_of_deadB h2 hl hd        exact dead_not_wins hwin u hu hu'      · exact (ih v x hv hl hl).1 (by rw [colored_update hv]; exact hodd.add_one) hT'    rcases tab_bob ⟨_, ty_lt (c ∘ e1)⟩ ⟨_, ty_lt (c ∘ e2)⟩ _ hT with hg | hg | ⟨hq, hTA⟩    · obtain ⟨a, x, ha, hcl, hres⟩ := of_chkB (legal_cl h1 hc) hnd1 (ty_lt _) hg      have hl := (legal_update_iff h1 hc a x).2 hcl      refine step (e1 a) x ha hl ?_      have hc2 : Function.update c (e1 a) (some x) ∘ e2 = c ∘ e2 :=        comp_update_far c _ _ fun b h => hdisj a b h.symm      have hq := pOut_update_in (c := c) (e1 := e1) (e2 := e2) (Or.inl ⟨a, rfl⟩) (some x)      rw [comp_update h1, hc2, qq, hq]      rcases hres with hd | hT'      · exact Or.inl hd      · exact Or.inr (Or.inr hT')    · obtain ⟨a, x, ha, hcl, hres⟩ := of_chkB (legal_cl h2 hc) hnd2 (ty_lt _) hg      have hl := (legal_update_iff h2 hc a x).2 hcl      refine step (e2 a) x ha hl ?_      have hc1 : Function.update c (e2 a) (some x) ∘ e1 = c ∘ e1 :=        comp_update_far c _ _ fun b h => hdisj b a h      have hq := pOut_update_in (c := c) (e1 := e1) (e2 := e2) (Or.inr ⟨a, rfl⟩) (some x)      rw [comp_update h2, hc1, qq, hq]      rcases hres with hd | hT'      · exact Or.inr (Or.inl hd)      · refine Or.inr (Or.inr ?_)        rw [(tab_sym ⟨_, ty_lt (c ∘ e1)⟩ ⟨_, ty_lt (upd (c ∘ e2) a x)⟩ _).1]        exact hT'    · have hpos : 0 < pOut e1 e2 c := by        unfold qq at hq; simp only [decide_eq_true_eq] at hq; omega      obtain ⟨v, hv, hout⟩ := exists_out_of_pOut hpos      by_cases hx : ∃ x, is_partial_majority_coloring F (Function.update c v (some x))      · obtain ⟨x, hl⟩ := hx        refine step v x hv hl (Or.inr (Or.inr ?_))        have hp := pOut_update_out hout hv x        rw [comp_update_far c v _ (fun a => (hout a).1), comp_update_far c v _ (fun a => (hout a).2),          qq_flip hp, hq]        exact hTA      · push Not at hx        exact dead_not_wins hW v hv hxendtheorem two_claws {V : Type*} [Fintype V] [DecidableEq V]    (F : SimpleGraph V) [DecidableRel F.Adj]    (h_two : 2 ≤ subdivided_claw_count F) :    ¬ majority_game_alice_wins F := by  intro hw  unfold subdivided_claw_count at h_two  obtain ⟨C1, hC1, C2, hC2, hne⟩ := Finset.one_lt_card.1 h_two  simp only [Finset.mem_filter, Finset.mem_univ, true_and] at hC1 hC2  obtain ⟨φ1⟩ := hC1  obtain ⟨φ2⟩ := hC2  have hdisj : ∀ a b, (φ1.symm a : V) ≠ (φ2.symm b : V) := by    intro a b h    apply hne    have m1 := (φ1.symm a).2    have m2 := (φ2.symm b).2    rw [SimpleGraph.ConnectedComponent.mem_supp_iff] at m1 m2    rw [← m1, ← m2, h]  have := (main (emb_of_iso φ1) (emb_of_iso φ2) hdisj hw (fun v col h => by simp at h)).1    (by simp [colored])   apply this  have e1 : ((fun _ => none : V → Option Bool) ∘ fun a => (φ1.symm a : V)) = fun _ => none := rfl  have e2 : ((fun _ => none : V → Option Bool) ∘ fun a => (φ2.symm a : V)) = fun _ => none := rfl  rw [e1, e2, ty_empty]  exact tab_init _end In1287/-- Bob wins if there are at least two subdivided claw components. -/theorem op_2472_partial_two_claws_bob_wins    {V : Type*} [Fintype V] [DecidableEq V]    (F : SimpleGraph V) [DecidableRel F.Adj]    (h_two : 2 ≤ subdivided_claw_count F) :    ¬ majority_game_alice_wins F := by  exact In1287.two_claws F h_two
See it in the graphDiscuss this resultChallenge it