{
  "id": "8745",
  "ident": "NS.08745",
  "slug": "wotw-test",
  "title": "Testing Graph Invariants",
  "status": "test",
  "statement_status": "reviewed",
  "statement_md": "Star5: Star graph with center 0 and 5 leaves. -/\nabbrev Star5 : SimpleGraph (Fin 1 ⊕ Fin 5) := completeBipartiteGraph (Fin 1) (Fin 5)\n\ninstance : DecidableRel Star5.Adj := by unfold Star5 completeBipartiteGraph; infer_instance\n\n\n/-  ### House Graph Tests",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [],
  "collection": "wotw",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "WrittenOnTheWallII.Test.house_indep",
  "statement_lean": "theorem house_indep : α(HouseGraph) = 2",
  "challenge_source": "/-\nCopyright 2025 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\nmeta import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Domination\nmeta import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Eccentricity\nmeta import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Petersen\nmeta import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Residue\nmeta import Mathlib.Combinatorics.SimpleGraph.CycleGraph\n\n/-!\n# Testing Graph Invariants\n\nThis file contains tests for graph invariants on 5 specific concrete graphs:\n1. `HouseGraph`: A graph on 5 vertices.\n2. `K4`: The complete graph on 4 vertices.\n3. `PetersenGraph`: The Petersen graph on 10 vertices.\n4. `C6`: The cycle graph on 6 vertices.\n5. `Star5`: The star graph with 5 leaves (6 vertices total).\n\nTests cover:\nindependence_number, dominationNumber, average_distance, diameter, radius,\ngirth, order, size, szeged_index, wiener_index, min_degree, max_degree,\naverage_degree, matching_number, residue, annihilation_number, cvetkovic.\n-/\n\n@[expose] public section\n\nopen SimpleGraph\n\nnamespace WrittenOnTheWallII.Test\n\n\n-- Bridge theorems for Sym2/edist-based invariants:\n-- All 6 (indep_num, dom_num, dist, wiener, avg_dist, szeged) are proved in\n-- FormalConjecturesForMathlib/.../Invariants.lean and exported via that module.\n\n/-  ### Graph Definitions -/\n\n/-- House Graph: Square 0-1-2-3-0 with roof 4 connected to 2,3. -/\nabbrev HouseGraph : SimpleGraph (Fin 5) :=\n  SimpleGraph.fromEdgeSet {\n    s(0, 1), s(1, 2), s(2, 3), s(3, 0),\n    s(2, 4), s(3, 4)\n  }\n\n/-- K4: Complete graph on 4 vertices. -/\nabbrev K4 : SimpleGraph (Fin 4) := completeGraph (Fin 4)\n\n/-- Petersen Graph on 10 vertices (the Kneser graph `K(5,2)` from\n`FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Petersen`). -/\nabbrev PetersenGraph : SimpleGraph PetersenVertex := petersenGraph\n\n/-- C6: Cycle graph on 6 vertices. -/\nabbrev C6 : SimpleGraph (Fin 6) := cycleGraph 6\n\n/-- Star5: Star graph with center 0 and 5 leaves. -/\nabbrev Star5 : SimpleGraph (Fin 1 ⊕ Fin 5) := completeBipartiteGraph (Fin 1) (Fin 5)\n\ninstance : DecidableRel Star5.Adj := by unfold Star5 completeBipartiteGraph; infer_instance\n\n\n/-  ### House Graph Tests -/\n\n@[category test, AMS 5]\ntheorem house_indep : α(HouseGraph) = 2 := by\n  rw [indep_num_eq_computable]\n  decide\n\n@[category test, AMS 5]\ntheorem house_dom : dominationNumber HouseGraph = 2 := by\n  rw [dom_num_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem house_avg_dist : averageDistance HouseGraph = 7/5 := by\n  rw [avg_dist_eq_computable,\n    show computable_avg_dist HouseGraph = (7 / 5 : ℚ) by decide +kernel]\n  norm_num\n\n@[category test, AMS 5]\ntheorem house_diameter : ediam HouseGraph = 2 := by\n  rw [ediam_eq_computable HouseGraph (by decide)]\n  exact_mod_cast (by decide +kernel : computable_ediam HouseGraph = 2)\n\n@[category test, AMS 5]\ntheorem house_radius : radius HouseGraph = 2 := by\n  rw [radius_eq_computable HouseGraph (by decide)]\n  exact_mod_cast (by decide +kernel : computable_radius HouseGraph = 2)\n\n@[category test, AMS 5]\ntheorem house_girth : HouseGraph.girth = 3 := by\n  have hcyc : (Walk.cons (show HouseGraph.Adj 2 3 by decide)\n      (Walk.cons (show HouseGraph.Adj 3 4 by decide)\n      (Walk.cons (show HouseGraph.Adj 4 2 by decide) Walk.nil))).IsCycle := by\n    rw [Walk.isCycle_def]\n    refine ⟨?_, ?_, ?_⟩\n    · rw [Walk.isTrail_def]; decide\n    · simp\n    · decide\n  refine le_antisymm ?_ (three_le_girth (fun hac => hac _ hcyc))\n  simpa using girth_le_length hcyc\n\nopen scoped Classical in\n@[category test, AMS 5]\ntheorem house_order : Fintype.card ↥(⊤ : Subgraph HouseGraph).verts = 5 := by\n  rw [Fintype.card_congr SimpleGraph.Subgraph.topIso.toEquiv]\n  rfl\n\n@[category test, AMS 5]\ntheorem house_size : HouseGraph.edgeFinset.card = 6 := by\n  decide +native\n\n@[category test, AMS 5]\ntheorem house_szeged : szegedIndex HouseGraph = 24 := by\n  rw [szeged_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem house_wiener : wienerIndex HouseGraph = 14 := by\n  rw [wiener_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem house_min_deg : HouseGraph.minDegree = 2 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem house_max_deg : HouseGraph.maxDegree = 3 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem house_avg_deg : averageDegree HouseGraph = 12/5 := by\n  unfold averageDegree; simp [Fintype.card_fin]; decide +kernel\n\n@[category test, AMS 5]\ntheorem house_matching : matchingNumber HouseGraph = 2 := by\n  classical\n  have hbdd : BddAbove (Set.image (fun M : Subgraph HouseGraph => (M.edgeSet.toFinset.card : ℝ)) {M | M.IsMatching}) := by\n    refine ⟨(Fintype.card (Fin 5) : ℝ), ?_⟩\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ Fintype.card (Fin 5)\n    have hb := matching_card_bound HouseGraph M hM\n    exact_mod_cast (by omega : M.edgeSet.toFinset.card ≤ Fintype.card (Fin 5))\n  unfold matchingNumber\n  apply le_antisymm\n  · apply csSup_le (Set.Nonempty.image _ ⟨⊥, by simp [Subgraph.IsMatching]⟩)\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ 2\n    have hb := matching_card_bound HouseGraph M hM\n    simp only [Fintype.card_fin] at hb\n    exact_mod_cast (by omega : M.edgeSet.toFinset.card ≤ 2)\n  · apply le_csSup hbdd\n    refine ⟨HouseGraph.subgraphOfAdj (show HouseGraph.Adj 0 1 by decide) ⊔ HouseGraph.subgraphOfAdj (show HouseGraph.Adj 2 3 by decide), ?_, ?_⟩\n    · exact (Subgraph.IsMatching.subgraphOfAdj _).sup (Subgraph.IsMatching.subgraphOfAdj _)\n        (by rw [support_subgraphOfAdj, support_subgraphOfAdj]; simp [Set.disjoint_left])\n    · simp\n\n@[category test, AMS 5]\ntheorem house_residue : residue HouseGraph = 2 := by\n  unfold residue; decide +native\n\n@[category test, AMS 5]\ntheorem house_annihilation : annihilationNumber HouseGraph = 3 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem house_cvetkovic : cvetkovic HouseGraph = 3 := by\n  sorry\n\n\n/-  ### K4 Tests -/\n\n@[category test, AMS 5]\ntheorem K4_indep : α(K4) = 1 := by\n  rw [indep_num_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem K4_dom : dominationNumber K4 = 1 := by\n  rw [dom_num_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem K4_avg_dist : averageDistance K4 = 1 := by\n  rw [avg_dist_eq_computable, show computable_avg_dist K4 = (1 : ℚ) from by decide +kernel]\n  norm_num\n\n@[category test, AMS 5]\ntheorem K4_diameter : ediam K4 = 1 := by\n  rw [ediam_eq_computable K4 (by decide)]\n  exact_mod_cast (by decide +kernel : computable_ediam K4 = 1)\n\n@[category test, AMS 5]\ntheorem K4_radius : radius K4 = 1 := by\n  rw [radius_eq_computable K4 (by decide)]\n  exact_mod_cast (by decide +kernel : computable_radius K4 = 1)\n\n@[category test, AMS 5]\ntheorem K4_girth : K4.girth = 3 := by\n  have hcyc : (Walk.cons (show K4.Adj 0 1 by decide)\n      (Walk.cons (show K4.Adj 1 2 by decide)\n      (Walk.cons (show K4.Adj 2 0 by decide) Walk.nil))).IsCycle := by\n    rw [Walk.isCycle_def]\n    refine ⟨?_, ?_, ?_⟩\n    · rw [Walk.isTrail_def]; decide\n    · simp\n    · decide\n  refine le_antisymm ?_ (three_le_girth (fun hac => hac _ hcyc))\n  simpa using girth_le_length hcyc\n\nopen scoped Classical in\n@[category test, AMS 5]\ntheorem K4_order : Fintype.card ↥(⊤ : Subgraph K4).verts = 4 := by\n  rw [Fintype.card_congr SimpleGraph.Subgraph.topIso.toEquiv]\n  rfl\n\n@[category test, AMS 5]\ntheorem K4_size : K4.edgeFinset.card = 6 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem K4_szeged : szegedIndex K4 = 6 := by\n  rw [szeged_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem K4_wiener : wienerIndex K4 = 6 := by\n  rw [wiener_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem K4_min_deg : K4.minDegree = 3 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem K4_max_deg : K4.maxDegree = 3 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem K4_avg_deg : averageDegree K4 = 3 := by\n  unfold averageDegree\n  simp [Fintype.card_fin]\n\n@[category test, AMS 5]\ntheorem K4_matching : matchingNumber K4 = 2 := by\n  classical\n  have hbdd : BddAbove (Set.image (fun M : Subgraph K4 => (M.edgeSet.toFinset.card : ℝ)) {M | M.IsMatching}) := by\n    refine ⟨(Fintype.card (Fin 4) : ℝ), ?_⟩\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ Fintype.card (Fin 4)\n    have hb := matching_card_bound K4 M hM\n    exact_mod_cast (by omega : M.edgeSet.toFinset.card ≤ Fintype.card (Fin 4))\n  unfold matchingNumber\n  apply le_antisymm\n  · apply csSup_le (Set.Nonempty.image _ ⟨⊥, by simp [Subgraph.IsMatching]⟩)\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ 2\n    have hb := matching_card_bound K4 M hM\n    simp only [Fintype.card_fin] at hb\n    exact_mod_cast (by omega : M.edgeSet.toFinset.card ≤ 2)\n  · apply le_csSup hbdd\n    refine ⟨K4.subgraphOfAdj (show K4.Adj 0 1 by decide) ⊔ K4.subgraphOfAdj (show K4.Adj 2 3 by decide), ?_, ?_⟩\n    · exact (Subgraph.IsMatching.subgraphOfAdj _).sup (Subgraph.IsMatching.subgraphOfAdj _)\n        (by rw [support_subgraphOfAdj, support_subgraphOfAdj]; simp [Set.disjoint_left])\n    · simp\n\n@[category test, AMS 5]\ntheorem K4_residue : residue K4 = 1 := by\n  unfold residue; decide +native\n\n@[category test, AMS 5]\ntheorem K4_annihilation : annihilationNumber K4 = 2 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem K4_cvetkovic : cvetkovic K4 = 1 := by\n  sorry\n\n\n/-  ### Petersen Graph Tests -/\n\n@[category test, AMS 5]\ntheorem petersen_indep : α(PetersenGraph) = 4 := by\n  rw [indep_num_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem petersen_dom : dominationNumber PetersenGraph = 3 := by\n  rw [dom_num_eq_computable]; decide +native\n\n@[category test, AMS 5]\ntheorem petersen_avg_dist : averageDistance PetersenGraph = 5/3 := by\n  rw [avg_dist_eq_computable,\n    show computable_avg_dist PetersenGraph = (5 / 3 : ℚ) from by decide +kernel]\n  norm_num\n\n@[category test, AMS 5]\ntheorem petersen_diameter : ediam PetersenGraph = 2 := by\n  rw [ediam_eq_computable PetersenGraph (by decide)]\n  exact_mod_cast (by decide +native : computable_ediam PetersenGraph = 2)\n\n@[category test, AMS 5]\ntheorem petersen_radius : radius PetersenGraph = 2 := by\n  rw [radius_eq_computable PetersenGraph (by decide)]\n  exact_mod_cast (by decide +kernel : computable_radius PetersenGraph = 2)\n\n@[category test, AMS 5]\ntheorem petersen_girth : PetersenGraph.girth = 5 := by\n  sorry\n\nopen scoped Classical in\n@[category test, AMS 5]\ntheorem petersen_order : Fintype.card ↥(⊤ : Subgraph PetersenGraph).verts = 10 := by\n  rw [Fintype.card_congr SimpleGraph.Subgraph.topIso.toEquiv]\n  rfl\n\n@[category test, AMS 5]\ntheorem petersen_size : PetersenGraph.edgeFinset.card = 15 := by\n  decide +native\n\n@[category test, AMS 5]\ntheorem petersen_szeged : szegedIndex PetersenGraph = 135 := by\n  rw [szeged_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem petersen_wiener : wienerIndex PetersenGraph = 75 := by\n  rw [wiener_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem petersen_min_deg : PetersenGraph.minDegree = 3 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem petersen_max_deg : PetersenGraph.maxDegree = 3 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem petersen_avg_deg : averageDegree PetersenGraph = 3 := by\n  unfold averageDegree; simp [Fintype.card_fin]; decide +kernel\n\n@[category test, AMS 5]\ntheorem petersen_matching : matchingNumber PetersenGraph = 5 := by\n  classical\n  have hbdd : BddAbove (Set.image (fun M : Subgraph PetersenGraph => (M.edgeSet.toFinset.card : ℝ)) {M | M.IsMatching}) := by\n    refine ⟨(Fintype.card PetersenVertex : ℝ), ?_⟩\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ Fintype.card PetersenVertex\n    have hb := matching_card_bound PetersenGraph M hM\n    exact_mod_cast (by omega : M.edgeSet.toFinset.card ≤ Fintype.card PetersenVertex)\n  unfold matchingNumber\n  apply le_antisymm\n  · apply csSup_le (Set.Nonempty.image _ ⟨⊥, by simp [Subgraph.IsMatching]⟩)\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ 5\n    have hb := matching_card_bound PetersenGraph M hM\n    simp only [card_petersenVertex] at hb\n    exact_mod_cast (by omega : M.edgeSet.toFinset.card ≤ 5)\n  · apply le_csSup hbdd\n    refine ⟨PetersenGraph.subgraphOfAdj (show PetersenGraph.Adj (⟨{0, 1}, by decide⟩ : PetersenVertex) (⟨{2, 3}, by decide⟩ : PetersenVertex) by decide) ⊔ PetersenGraph.subgraphOfAdj (show PetersenGraph.Adj (⟨{0, 2}, by decide⟩ : PetersenVertex) (⟨{3, 4}, by decide⟩ : PetersenVertex) by decide) ⊔ PetersenGraph.subgraphOfAdj (show PetersenGraph.Adj (⟨{0, 3}, by decide⟩ : PetersenVertex) (⟨{1, 4}, by decide⟩ : PetersenVertex) by decide) ⊔ PetersenGraph.subgraphOfAdj (show PetersenGraph.Adj (⟨{0, 4}, by decide⟩ : PetersenVertex) (⟨{1, 2}, by decide⟩ : PetersenVertex) by decide) ⊔ PetersenGraph.subgraphOfAdj (show PetersenGraph.Adj (⟨{1, 3}, by decide⟩ : PetersenVertex) (⟨{2, 4}, by decide⟩ : PetersenVertex) by decide), ?_, ?_⟩\n    · apply Subgraph.IsMatching.sup\n      · apply Subgraph.IsMatching.sup\n        · apply Subgraph.IsMatching.sup\n          · exact (Subgraph.IsMatching.subgraphOfAdj _).sup (Subgraph.IsMatching.subgraphOfAdj _)\n              (by rw [support_subgraphOfAdj, support_subgraphOfAdj]; (simp [Set.disjoint_left]; decide))\n          · exact Subgraph.IsMatching.subgraphOfAdj _\n          · apply Set.disjoint_of_subset (Subgraph.support_subset_verts _) (Subgraph.support_subset_verts _)\n            (simp [Subgraph.verts_sup, subgraphOfAdj_verts, Set.disjoint_left]; decide)\n        · exact Subgraph.IsMatching.subgraphOfAdj _\n        · apply Set.disjoint_of_subset (Subgraph.support_subset_verts _) (Subgraph.support_subset_verts _)\n          (simp [Subgraph.verts_sup, subgraphOfAdj_verts, Set.disjoint_left]; decide)\n      · exact Subgraph.IsMatching.subgraphOfAdj _\n      · apply Set.disjoint_of_subset (Subgraph.support_subset_verts _) (Subgraph.support_subset_verts _)\n        (simp [Subgraph.verts_sup, subgraphOfAdj_verts, Set.disjoint_left]; decide)\n    · simp; norm_cast\n\n@[category test, AMS 5]\ntheorem petersen_residue : residue PetersenGraph = 3 := by\n  unfold residue; decide +native\n\n@[category test, AMS 5]\ntheorem petersen_annihilation : annihilationNumber PetersenGraph = 5 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem petersen_cvetkovic : cvetkovic PetersenGraph = 4 := by\n  sorry\n\n\n/-  ### C6 Tests -/\n\n@[category test, AMS 5]\ntheorem C6_indep : α(C6) = 3 := by\n  rw [indep_num_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_dom : dominationNumber C6 = 2 := by\n  rw [dom_num_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_avg_dist : averageDistance C6 = 9/5 := by\n  rw [avg_dist_eq_computable, show computable_avg_dist C6 = (9 / 5 : ℚ) from by decide +kernel]\n  norm_num\n\n@[category test, AMS 5]\ntheorem C6_diameter : ediam C6 = 3 := by\n  rw [ediam_eq_computable C6 (by decide)]\n  exact_mod_cast (by decide +kernel : computable_ediam C6 = 3)\n\n@[category test, AMS 5]\ntheorem C6_radius : radius C6 = 3 := by\n  rw [radius_eq_computable C6 (by decide)]\n  exact_mod_cast (by decide +kernel : computable_radius C6 = 3)\n\n@[category test, AMS 5]\ntheorem C6_girth : C6.girth = 6 := by\n  sorry\n\nopen scoped Classical in\n@[category test, AMS 5]\ntheorem C6_order : Fintype.card ↥(⊤ : Subgraph C6).verts = 6 := by\n  rw [Fintype.card_congr SimpleGraph.Subgraph.topIso.toEquiv]\n  rfl\n\n@[category test, AMS 5]\ntheorem C6_size : C6.edgeFinset.card = 6 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_szeged : szegedIndex C6 = 54 := by\n  rw [szeged_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_wiener : wienerIndex C6 = 27 := by\n  rw [wiener_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_min_deg : C6.minDegree = 2 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_max_deg : C6.maxDegree = 2 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_avg_deg : averageDegree C6 = 2 := by\n  unfold averageDegree; simp [Fintype.card_fin]; decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_matching : matchingNumber C6 = 3 := by\n  classical\n  have hbdd : BddAbove (Set.image (fun M : Subgraph C6 => (M.edgeSet.toFinset.card : ℝ)) {M | M.IsMatching}) := by\n    refine ⟨(Fintype.card (Fin 6) : ℝ), ?_⟩\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ Fintype.card (Fin 6)\n    have hb := matching_card_bound C6 M hM\n    exact_mod_cast (by omega : M.edgeSet.toFinset.card ≤ Fintype.card (Fin 6))\n  unfold matchingNumber\n  apply le_antisymm\n  · apply csSup_le (Set.Nonempty.image _ ⟨⊥, by simp [Subgraph.IsMatching]⟩)\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ 3\n    have hb := matching_card_bound C6 M hM\n    simp only [Fintype.card_fin] at hb\n    exact_mod_cast (by omega : M.edgeSet.toFinset.card ≤ 3)\n  · apply le_csSup hbdd\n    refine ⟨C6.subgraphOfAdj (show C6.Adj 0 1 by decide) ⊔ C6.subgraphOfAdj (show C6.Adj 2 3 by decide) ⊔ C6.subgraphOfAdj (show C6.Adj 4 5 by decide), ?_, ?_⟩\n    · apply Subgraph.IsMatching.sup\n      · exact (Subgraph.IsMatching.subgraphOfAdj _).sup (Subgraph.IsMatching.subgraphOfAdj _)\n          (by rw [support_subgraphOfAdj, support_subgraphOfAdj]; simp [Set.disjoint_left])\n      · exact Subgraph.IsMatching.subgraphOfAdj _\n      · apply Set.disjoint_of_subset (Subgraph.support_subset_verts _) (Subgraph.support_subset_verts _)\n        simp [Subgraph.verts_sup, subgraphOfAdj_verts, Set.disjoint_left]\n    · simp\n\n@[category test, AMS 5]\ntheorem C6_residue : residue C6 = 2 := by\n  unfold residue; decide +native\n\n@[category test, AMS 5]\ntheorem C6_annihilation : annihilationNumber C6 = 3 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem C6_cvetkovic : cvetkovic C6 = 3 := by\n  sorry\n\n/-  ### Star5 Tests -/\n\n@[category test, AMS 5]\ntheorem Star5_indep : α(Star5) = 5 := by\n  rw [indep_num_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_dom : dominationNumber Star5 = 1 := by\n  rw [dom_num_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_avg_dist : averageDistance Star5 = 5/3 := by\n  rw [avg_dist_eq_computable,\n    show computable_avg_dist Star5 = (5 / 3 : ℚ) from by decide +kernel]\n  norm_num\n\n@[category test, AMS 5]\ntheorem Star5_diameter : ediam Star5 = 2 := by\n  rw [ediam_eq_computable Star5 (by decide)]\n  exact_mod_cast (by decide +kernel : computable_ediam Star5 = 2)\n\n@[category test, AMS 5]\ntheorem Star5_radius : radius Star5 = 1 := by\n  rw [radius_eq_computable Star5 (by decide)]\n  exact_mod_cast (by decide +kernel : computable_radius Star5 = 1)\n\n@[category test, AMS 5]\ntheorem Star5_girth : Star5.egirth = ⊤ := by\n  rw [egirth_eq_top]\n  have key : ∀ (b : Fin 5) (c : Star5.Walk (Sum.inr b) (Sum.inr b)), ¬ c.IsCycle := by\n    intro b c hc\n    have h1 := c.adj_snd hc.not_nil\n    have h2 := c.adj_penultimate hc.not_nil\n    have hs : c.snd.isLeft := by\n      simp only [Star5, completeBipartiteGraph, Sum.isRight_inr, Sum.isLeft_inr] at h1\n      tauto\n    have hp : c.penultimate.isLeft := by\n      simp only [Star5, completeBipartiteGraph, Sum.isRight_inr, Sum.isLeft_inr] at h2\n      tauto\n    apply hc.snd_ne_penultimate\n    obtain ⟨x, hx⟩ := Sum.isLeft_iff.mp hs\n    obtain ⟨y, hy⟩ := Sum.isLeft_iff.mp hp\n    rw [hx, hy, Subsingleton.elim x y]\n  intro v c hc\n  cases v with\n  | inr b => exact key b c hc\n  | inl a =>\n    have h1 := c.adj_snd hc.not_nil\n    obtain ⟨b, hb⟩ : ∃ b, c.snd = Sum.inr b := by\n      rcases hsnd : c.snd with x | y\n      · rw [hsnd] at h1; simp [Star5, completeBipartiteGraph] at h1\n      · exact ⟨y, rfl⟩\n    have hmem : Sum.inr b ∈ c.support := hb ▸ List.mem_of_mem_tail (c.snd_mem_tail_support hc.not_nil)\n    exact key b (c.rotate _ hmem) (hc.rotate hmem)\n\nopen scoped Classical in\n@[category test, AMS 5]\ntheorem Star5_order : Fintype.card ↥(⊤ : Subgraph Star5).verts = 6 := by\n  rw [Fintype.card_congr SimpleGraph.Subgraph.topIso.toEquiv]\n  rfl\n\n@[category test, AMS 5]\ntheorem Star5_size : Star5.edgeFinset.card = 5 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_szeged : szegedIndex Star5 = 25 := by\n  rw [szeged_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_wiener : wienerIndex Star5 = 25 := by\n  rw [wiener_eq_computable]; decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_min_deg : Star5.minDegree = 1 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_max_deg : Star5.maxDegree = 5 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_avg_deg : averageDegree Star5 = 5/3 := by\n  unfold averageDegree; simp [Fintype.card_sum, Fintype.card_fin]; decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_matching : matchingNumber Star5 = 1 := by\n  classical\n  have hle : ∀ M : Subgraph Star5, M.IsMatching → M.edgeSet.toFinset.card ≤ 1 := by\n    intro M hM\n    have hcenter : ∀ e ∈ M.edgeSet, (Sum.inl 0 : Fin 1 ⊕ Fin 5) ∈ e := by\n      intro e he\n      induction e using Sym2.inductionOn with | _ a b =>\n      rw [Subgraph.mem_edgeSet] at he\n      have hadj := he.adj_sub\n      simp only [Star5, completeBipartiteGraph] at hadj\n      rw [Sym2.mem_iff]\n      rcases hadj with ⟨ha, _⟩ | ⟨_, hb⟩\n      · left; obtain ⟨a', rfl⟩ := Sum.isLeft_iff.mp ha; exact congrArg Sum.inl (Subsingleton.elim 0 a')\n      · right; obtain ⟨b', rfl⟩ := Sum.isLeft_iff.mp hb; exact congrArg Sum.inl (Subsingleton.elim 0 b')\n    rw [Finset.card_le_one]\n    intro e he f hf\n    rw [Set.mem_toFinset] at he hf\n    obtain ⟨y, rfl⟩ := Sym2.mem_iff_exists.mp (hcenter e he)\n    obtain ⟨z, rfl⟩ := Sym2.mem_iff_exists.mp (hcenter f hf)\n    rw [Subgraph.mem_edgeSet] at he hf\n    rw [hM.eq_of_adj_left he hf]\n  have hbdd : BddAbove (Set.image (fun M : Subgraph Star5 => (M.edgeSet.toFinset.card : ℝ)) {M | M.IsMatching}) := by\n    refine ⟨1, ?_⟩\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ 1\n    exact_mod_cast hle M hM\n  unfold matchingNumber\n  apply le_antisymm\n  · apply csSup_le (Set.Nonempty.image _ ⟨⊥, by simp [Subgraph.IsMatching]⟩)\n    rintro x ⟨M, hM, rfl⟩\n    show (M.edgeSet.toFinset.card : ℝ) ≤ 1\n    exact_mod_cast hle M hM\n  · apply le_csSup hbdd\n    refine ⟨Star5.subgraphOfAdj (show Star5.Adj (Sum.inl 0) (Sum.inr 0) by simp [Star5, completeBipartiteGraph]), ?_, ?_⟩\n    · exact Subgraph.IsMatching.subgraphOfAdj _\n    · simp\n\n@[category test, AMS 5]\ntheorem Star5_residue : residue Star5 = 5 := by\n  unfold residue; decide +native\n\n@[category test, AMS 5]\ntheorem Star5_annihilation : annihilationNumber Star5 = 5 := by\n  decide +kernel\n\n@[category test, AMS 5]\ntheorem Star5_cvetkovic : cvetkovic Star5 = 5 := by\n  sorry\n\nend WrittenOnTheWallII.Test\n",
  "statement_hash": "192b182278603586d9e5ba89f50025983d488ac8fa0e7511d019182242bffab5",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}