/-
Copyright 2025 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public import Mathlib.Combinatorics.SimpleGraph.Acyclic
public import Mathlib.Combinatorics.SimpleGraph.Basic
public import Mathlib.Combinatorics.SimpleGraph.Finite
public import Mathlib.Combinatorics.SimpleGraph.Girth
public import Mathlib.Data.Set.Finite.Lemmas@[expose] public sectionLargest induced tree
This file defines largestInducedTreeSize, the number of vertices in a largest
induced subtree of a graph.
namespace SimpleGraphvariable {α : Type*} [Fintype α] [DecidableEq α]
largestInducedTreeSize G is the number of vertices in a largest induced subtree of G.
A tree is a connected acyclic graph; an induced tree is an induced subgraph that is a tree.
noncomputable def largestInducedTreeSize (G : SimpleGraph α) : ℕ :=
sSup { n | ∃ s : Finset α, s.card = n ∧ (G.induce (s : Set α)).IsTree }omit [DecidableEq α] in
The order of any induced tree is bounded by largestInducedTreeSize.
lemma card_le_largestInducedTreeSize {G : SimpleGraph α} {s : Finset α}
(hs : (G.induce (s : Set α)).IsTree) :
s.card ≤ largestInducedTreeSize G := α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTree⊢ s.card ≤ G.largestInducedTreeSize
α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTree⊢ s.card ≤ sSup {n | ∃ s, s.card = n ∧ (induce (↑s) G).IsTree}
α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTree⊢ BddAbove {n | ∃ s, s.card = n ∧ (induce (↑s) G).IsTree}α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTree⊢ s.card ∈ {n | ∃ s, s.card = n ∧ (induce (↑s) G).IsTree}
α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTree⊢ BddAbove {n | ∃ s, s.card = n ∧ (induce (↑s) G).IsTree} α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTree⊢ Fintype.card α ∈ upperBounds {n | ∃ s, s.card = n ∧ (induce (↑s) G).IsTree}
α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTreen:ℕhn:n ∈ {n | ∃ s, s.card = n ∧ (induce (↑s) G).IsTree}⊢ n ≤ Fintype.card α
α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTreet:Finset αright✝:(induce (↑t) G).IsTree⊢ t.card ≤ Fintype.card α
All goals completed! 🐙
α:Type u_1inst✝:Fintype αG:SimpleGraph αs:Finset αhs:(induce (↑s) G).IsTree⊢ s.card ∈ {n | ∃ s, s.card = n ∧ (induce (↑s) G).IsTree} All goals completed! 🐙omit [DecidableEq α] inEvery finite graph with a vertex has a nonempty induced tree.
α:Type u_1inst✝¹:Fintype αG:SimpleGraph αinst✝:Nonempty αx:α := Classical.choice ⋯s:Finset α := {x}hs:↑s = {x}hT:(induce (↑s) G).IsTree⊢ 1 ≤ G.largestInducedTreeSize
have hle := card_le_largestInducedTreeSize hT α:Type u_1inst✝¹:Fintype αG:SimpleGraph αinst✝:Nonempty αx:α := Classical.choice ⋯s:Finset α := {x}hs:↑s = {x}hT:(induce (↑s) G).IsTreehle:s.card ≤ G.largestInducedTreeSize⊢ 1 ≤ G.largestInducedTreeSize
simpa [s] using hle All goals completed! 🐙omit [Fintype α] inAttaching a new vertex along its unique neighbor in an induced tree gives a larger induced tree.
lemma IsTree.induce_insert_of_unique_adj {G : SimpleGraph α} {s : Finset α} {z a : α}
(hT : (G.induce (s : Set α)).IsTree)
(_hz : z ∉ s) (ha : a ∈ s) (hza : G.Adj z a)
(huniq : ∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a) :
(G.induce ((insert z s : Finset α) : Set α)).IsTree := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree
classical
constructor connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).ConnectedisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsAcyclic
· connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).Connected have hsconn : (G.induce (s : Set α)).Preconnected := hT.connected.preconnected connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnected⊢ (induce (↑(insert z s)) G).Connected
have hzconn : (G.induce ({z} : Set α)).Preconnected := .of_subsingleton connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnected⊢ (induce (↑(insert z s)) G).Connected
have hconn := connected_induce_union (v := z) (w := a) (s := ({z} : Set α))
(t := (s : Set α)) hzconn hsconn (by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnected⊢ z ∈ {z} connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnectedhconn:(induce ({z} ∪ ↑s) G).Connected⊢ (induce (↑(insert z s)) G).Connected simp All goals completed! 🐙 connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnectedhconn:(induce ({z} ∪ ↑s) G).Connected⊢ (induce (↑(insert z s)) G).Connected) (by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnected⊢ a ∈ ↑sconnected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnectedhconn:(induce ({z} ∪ ↑s) G).Connected⊢ (induce (↑(insert z s)) G).Connected simpa using ha All goals completed! 🐙connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnectedhconn:(induce ({z} ∪ ↑s) G).Connected⊢ (induce (↑(insert z s)) G).Connected) hzaconnected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnectedhconn:(induce ({z} ∪ ↑s) G).Connected⊢ (induce (↑(insert z s)) G).Connected
rw [Finset.coe_insert connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnectedhconn:(induce ({z} ∪ ↑s) G).Connected⊢ (induce (insert z ↑s) G).Connected connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnectedhconn:(induce ({z} ∪ ↑s) G).Connected⊢ (induce (insert z ↑s) G).Connected]connected α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahsconn:(induce (↑s) G).Preconnectedhzconn:(induce {z} G).Preconnectedhconn:(induce ({z} ∪ ↑s) G).Connected⊢ (induce (insert z ↑s) G).Connected
simpa only [Set.singleton_union] using hconn All goals completed! 🐙
· isAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsAcyclic intro v c hc isAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCycle⊢ False
let e : G.induce ((insert z s : Finset α) : Set α) ↪g G :=
SimpleGraph.Embedding.induce _ isAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)⊢ False
let q : G.Walk (e v) (e v) := c.map e.toHom isAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom c⊢ False
have hq : q.IsCycle := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree isAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCycle⊢ False
dsimp [q] α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom c⊢ (Walk.map e.toHom c).IsCycleisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCycle⊢ False
exact (Walk.isCycle_map_iff_of_injective e.injective).2 hcisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCycle⊢ FalseisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCycle⊢ False
have hq_mem (w : α) (hw : w ∈ q.support) : w ∈ insert z s := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree isAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z s⊢ False
dsimp [q] at hw α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclew:αhw:w ∈ (Walk.map e.toHom c).support⊢ w ∈ insert z sisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z s⊢ False
rw [Walk.support_map α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclew:αhw:w ∈ List.map (⇑e.toHom) c.support⊢ w ∈ insert z s α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclew:αhw:w ∈ List.map (⇑e.toHom) c.support⊢ w ∈ insert z sisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z s⊢ False] at hw α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclew:αhw:w ∈ List.map (⇑e.toHom) c.support⊢ w ∈ insert z sisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z s⊢ False
obtain ⟨w', hw', rfl⟩ := List.mem_map.mp hw α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclew':↥(insert z s)hw':w' ∈ c.supporthw:e.toHom w' ∈ List.map (⇑e.toHom) c.support⊢ e.toHom w' ∈ insert z sisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z s⊢ False
change (w' : α) ∈ insert z s α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclew':↥(insert z s)hw':w' ∈ c.supporthw:e.toHom w' ∈ List.map (⇑e.toHom) c.support⊢ ↑w' ∈ insert z sisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z s⊢ False
exact w'.propertyisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z s⊢ FalseisAcyclic α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z s⊢ False
by_cases hzq : z ∈ q.support pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.support⊢ Falseneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.support⊢ False
· pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.support⊢ False let r : G.Walk z z := q.rotate z hzq pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzq⊢ False
have hr : r.IsCycle := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCycle⊢ False
dsimp [r] α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzq⊢ (q.rotate z hzq).IsCyclepos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCycle⊢ False
exact hq.rotate hzqpos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCycle⊢ Falsepos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCycle⊢ False
have hrsnd : r.snd ∈ q.support := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.support⊢ False
apply (q.mem_support_rotate_iff z hzq).mp α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCycle⊢ r.snd ∈ (q.rotate z hzq).supportpos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.support⊢ False
simpa only [r] using r.getVert_mem_support 1pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.support⊢ Falsepos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.support⊢ False
have hrpenultimate : r.penultimate ∈ q.support := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.support⊢ False
apply (q.mem_support_rotate_iff z hzq).mp α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.support⊢ r.penultimate ∈ (q.rotate z hzq).supportpos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.support⊢ False
simpa only [r] using r.getVert_mem_support (r.length - 1)pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.support⊢ Falsepos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.support⊢ False
have hadj_snd : G.Adj z r.snd := r.adj_snd hr.not_nil pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.snd⊢ False
have hadj_penultimate : G.Adj z r.penultimate :=
(r.adj_penultimate hr.not_nil).symm pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimate⊢ False
have hsnd : r.snd ∈ s := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ s⊢ False
rcases Finset.mem_insert.mp (hq_mem _ hrsnd) with heq | hmem inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimateheq:r.snd = z⊢ r.snd ∈ sinr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehmem:r.snd ∈ s⊢ r.snd ∈ spos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ s⊢ False
· inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimateheq:r.snd = z⊢ r.snd ∈ spos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ s⊢ False exact (hadj_snd.ne heq.symm).elim All goals completed! 🐙pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ s⊢ False
· inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehmem:r.snd ∈ s⊢ r.snd ∈ spos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ s⊢ False exact hmempos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ s⊢ Falsepos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ s⊢ False
have hpenultimate : r.penultimate ∈ s := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shpenultimate:r.penultimate ∈ s⊢ False
rcases Finset.mem_insert.mp (hq_mem _ hrpenultimate) with heq | hmem inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ sheq:r.penultimate = z⊢ r.penultimate ∈ sinr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shmem:r.penultimate ∈ s⊢ r.penultimate ∈ spos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shpenultimate:r.penultimate ∈ s⊢ False
· inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ sheq:r.penultimate = z⊢ r.penultimate ∈ spos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shpenultimate:r.penultimate ∈ s⊢ False exact (hadj_penultimate.ne heq.symm).elim All goals completed! 🐙pos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shpenultimate:r.penultimate ∈ s⊢ False
· inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shmem:r.penultimate ∈ s⊢ r.penultimate ∈ spos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shpenultimate:r.penultimate ∈ s⊢ False exact hmempos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shpenultimate:r.penultimate ∈ s⊢ Falsepos α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∈ q.supportr:G.Walk z z := q.rotate z hzqhr:r.IsCyclehrsnd:r.snd ∈ q.supporthrpenultimate:r.penultimate ∈ q.supporthadj_snd:G.Adj z r.sndhadj_penultimate:G.Adj z r.penultimatehsnd:r.snd ∈ shpenultimate:r.penultimate ∈ s⊢ False
exact hr.snd_ne_penultimate <|
(huniq hsnd hadj_snd).trans (huniq hpenultimate hadj_penultimate).symm All goals completed! 🐙
· neg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.support⊢ False have hqs : ∀ w ∈ q.support, w ∈ (s : Set α) := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree neg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ False
intro w hw α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supportw:αhw:w ∈ q.support⊢ w ∈ ↑sneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ False
rcases Finset.mem_insert.mp (hq_mem w hw) with heq | hmem inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supportw:αhw:w ∈ q.supportheq:w = z⊢ w ∈ ↑sinr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supportw:αhw:w ∈ q.supporthmem:w ∈ s⊢ w ∈ ↑sneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ False
· inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supportw:αhw:w ∈ q.supportheq:w = z⊢ w ∈ ↑sneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ False subst w inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthw:z ∈ q.support⊢ z ∈ ↑sneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ False
exact (hzq hw).elim All goals completed! 🐙neg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ False
· inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supportw:αhw:w ∈ q.supporthmem:w ∈ s⊢ w ∈ ↑sneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ False simpa using hmemneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ Falseneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑s⊢ False
let qi := q.induce (s : Set α) hqs neg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqs⊢ False
have hqi : qi.IsCycle := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree neg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqshqi:qi.IsCycle⊢ False
apply (Walk.isCycle_map_iff_of_injective
(f := (SimpleGraph.Embedding.induce (G := G) (s : Set α)).toHom)
(SimpleGraph.Embedding.induce (G := G) (s : Set α)).injective).mp α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqs⊢ (Walk.map (Embedding.induce ↑s).toHom qi).IsCycleneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqshqi:qi.IsCycle⊢ False
rw [show qi.map (SimpleGraph.Embedding.induce (G := G) (s : Set α)).toHom = q by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ (induce (↑(insert z s)) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqs⊢ q.IsCycleneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqshqi:qi.IsCycle⊢ False
dsimp [qi] α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqs⊢ Walk.map (Embedding.induce ↑s).toHom (Walk.induce (↑s) q hqs) = q α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqs⊢ q.IsCycleneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqshqi:qi.IsCycle⊢ False
exact Walk.map_induce q hqs All goals completed! 🐙 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqs⊢ q.IsCycleneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqshqi:qi.IsCycle⊢ False] α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqs⊢ q.IsCycleneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqshqi:qi.IsCycle⊢ False
exact hqneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqshqi:qi.IsCycle⊢ Falseneg α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:Finset αz:αa:αhT:(induce (↑s) G).IsTree_hz:z ∉ sha:a ∈ shza:G.Adj z ahuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = av:↑↑(insert z s)c:(induce (↑(insert z s)) G).Walk v vhc:c.IsCyclee:induce (↑(insert z s)) G ↪g G := Embedding.induce ↑(insert z s)q:G.Walk (e v) (e v) := Walk.map e.toHom chq:q.IsCyclehq_mem:∀ w ∈ q.support, w ∈ insert z shzq:z ∉ q.supporthqs:∀ w ∈ q.support, w ∈ ↑sqi:(induce (↑s) G).Walk ⟨e v, ⋯⟩ ⟨e v, ⋯⟩ := Walk.induce (↑s) q hqshqi:qi.IsCycle⊢ False
exact hT.isAcyclic qi hqi All goals completed! 🐙omit [Fintype α] inA shortest walk induces a tree on its support.
lemma Walk.induce_support_isTree_of_length_eq_dist {G : SimpleGraph α} {u v : α}
(p : G.Walk u v) (hp : p.length = G.dist u v) :
(G.induce (p.support.toFinset : Set α)).IsTree := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree
induction p with
| @nil u => nil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u u⊢ (induce (↑nil.support.toFinset) G).IsTree
have hset : (↑(Walk.nil : G.Walk u u).support.toFinset : Set α) = {u} := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree nil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}⊢ (induce (↑nil.support.toFinset) G).IsTree
ext α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u ux✝:α⊢ x✝ ∈ ↑nil.support.toFinset ↔ x✝ ∈ {u} nil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}⊢ (induce (↑nil.support.toFinset) G).IsTree
simpnil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}⊢ (induce (↑nil.support.toFinset) G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}⊢ (induce (↑nil.support.toFinset) G).IsTree
have hsingle : (G.induce ({u} : Set α)).IsTree := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree nil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
let : Nonempty ↥({u} : Set α) := ⟨⟨u, by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}⊢ u ∈ {u} α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree simp All goals completed! 🐙 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree⟩⟩ α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
let : Subsingleton ↥({u} : Set α) := ⟨fun a b => by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}⊢ a = b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
apply Subtype.ext α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}⊢ ↑a = ↑b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
have ha : (a : α) = u := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}⊢ a = b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}ha:↑a = u⊢ ↑a = ↑b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
simpa only [Set.mem_singleton_iff] using a.property α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}ha:↑a = u⊢ ↑a = ↑b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}ha:↑a = u⊢ ↑a = ↑b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
have hb : (b : α) = u := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}⊢ a = b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}ha:↑a = uhb:↑b = u⊢ ↑a = ↑b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
simpa only [Set.mem_singleton_iff] using b.property α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}ha:↑a = uhb:↑b = u⊢ ↑a = ↑b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this:Nonempty ↑{u} := ···a:↑{u}b:↑{u}ha:↑a = uhb:↑b = u⊢ ↑a = ↑b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
exact ha.trans hb.symm All goals completed! 🐙 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree⟩ α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}this✝:Nonempty ↑{u} := ···this:Subsingleton ↑{u} := ···⊢ (induce {u} G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
exact IsTree.of_subsingletonnil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTreenil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce (↑nil.support.toFinset) G).IsTree
rw [hset nil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce {u} G).IsTree nil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce {u} G).IsTree]nil α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv:αu:αhp:nil.length = G.dist u uhset:↑nil.support.toFinset = {u}hsingle:(induce {u} G).IsTree⊢ (induce {u} G).IsTree
exact hsingle All goals completed! 🐙
| @cons u v w huv p ih => cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u w⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hptail : p.length = G.dist v w :=
length_eq_dist_of_subwalk hp (Walk.isSubwalk_cons p huv) cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v w⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hT := ih hptail cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTree⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hpath : (p.cons huv).IsPath :=
(p.cons huv).isPath_of_length_eq_dist hp cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPath⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hu_not : u ∉ p.support.toFinset := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinset⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
simpa using (List.nodup_cons.mp hpath.support_nodup).1cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinset⊢ (induce (↑(cons huv p).support.toFinset) G).IsTreecons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinset⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have huniq : ∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
intro b hb hub α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u b⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hbmem : b ∈ p.support := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.support⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree simpa using hb α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.support⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.support⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
obtain ⟨i, hi, hib⟩ := List.mem_iff_getElem.mp hbmem α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = b⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hget : p.getVert i = b := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = b⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
rw [← p.support_getElem_eq_getVert hi, α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = b⊢ p.support[i] = b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = b⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree hib α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = b⊢ b = b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = b⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree] α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = b⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = b⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hi_le : i ≤ p.length := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hlen := p.length_support α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhlen:p.support.length = p.length + 1⊢ i ≤ p.length α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
omega α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hub' : G.Adj u (p.getVert i) := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree simpa [hget] using hub α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
let r : G.Walk u w := (p.drop i).cons hub' α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hdistle : G.dist u w ≤ r.length := G.dist_le r α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hlen : (p.cons huv).length ≤ r.length := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.lengthhlen:(cons huv p).length ≤ r.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree simpa [hp] using hdistle α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.lengthhlen:(cons huv p).length ≤ r.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.lengthhlen:(cons huv p).length ≤ r.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hi0 : i = 0 := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.lengthhlen:(cons huv p).length ≤ r.lengthhi0:i = 0⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
simp only [Walk.length_cons, r, Walk.drop_length] at hlen α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.lengthhlen:p.length + 1 ≤ p.length - i + 1⊢ i = 0 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.lengthhlen:(cons huv p).length ≤ r.lengthhi0:i = 0⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
omega α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.lengthhlen:(cons huv p).length ≤ r.lengthhi0:i = 0⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporti:ℕhi:i < p.support.lengthhib:p.support[i] = bhget:p.getVert i = bhi_le:i ≤ p.lengthhub':G.Adj u (p.getVert i)r:G.Walk u w := cons hub' (p.drop i)hdistle:G.dist u w ≤ r.lengthhlen:(cons huv p).length ≤ r.lengthhi0:i = 0⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
subst i α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsetb:αhb:b ∈ p.support.toFinsethub:G.Adj u bhbmem:b ∈ p.supporthi:0 < p.support.lengthhib:p.support[0] = bhget:p.getVert 0 = bhi_le:0 ≤ p.lengthhub':G.Adj u (p.getVert 0)r:G.Walk u w := cons hub' (p.drop 0)hdistle:G.dist u w ≤ r.lengthhlen:(cons huv p).length ≤ r.length⊢ b = vcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
simpa using hget.symmcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTreecons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = v⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
have hsupp : (Walk.cons huv p).support.toFinset = insert u p.support.toFinset := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu:αv:αp:G.Walk u vhp:p.length = G.dist u v⊢ (induce (↑p.support.toFinset) G).IsTree cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = vhsupp:(cons huv p).support.toFinset = insert u p.support.toFinset⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
simpcons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = vhsupp:(cons huv p).support.toFinset = insert u p.support.toFinset⊢ (induce (↑(cons huv p).support.toFinset) G).IsTreecons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = vhsupp:(cons huv p).support.toFinset = insert u p.support.toFinset⊢ (induce (↑(cons huv p).support.toFinset) G).IsTree
rw [hsupp cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = vhsupp:(cons huv p).support.toFinset = insert u p.support.toFinset⊢ (induce (↑(insert u p.support.toFinset)) G).IsTree cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = vhsupp:(cons huv p).support.toFinset = insert u p.support.toFinset⊢ (induce (↑(insert u p.support.toFinset)) G).IsTree]cons α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = vhsupp:(cons huv p).support.toFinset = insert u p.support.toFinset⊢ (induce (↑(insert u p.support.toFinset)) G).IsTree
exact hT.induce_insert_of_unique_adj hu_not (by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αu✝:αv✝:αu:αv:αw:αhuv:G.Adj u vp:G.Walk v wih:p.length = G.dist v w → (induce (↑p.support.toFinset) G).IsTreehp:(cons huv p).length = G.dist u whptail:p.length = G.dist v whT:(induce (↑p.support.toFinset) G).IsTreehpath:(cons huv p).IsPathhu_not:u ∉ p.support.toFinsethuniq:∀ ⦃b : α⦄, b ∈ p.support.toFinset → G.Adj u b → b = vhsupp:(cons huv p).support.toFinset = insert u p.support.toFinset⊢ v ∈ p.support.toFinset simp All goals completed! 🐙) huv huniqRemoving one vertex from a shortest cycle gives an induced tree.
theorem girth_sub_one_le_largestInducedTreeSize (G : SimpleGraph α)
(hcyc : ¬ G.IsAcyclic) :
G.girth - 1 ≤ largestInducedTreeSize G := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclic⊢ G.girth - 1 ≤ G.largestInducedTreeSize
classical
obtain ⟨v, c, hc, hc_length⟩ := G.exists_girth_eq_length.mpr hcyc α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.length⊢ G.girth - 1 ≤ G.largestInducedTreeSize
let p := c.tail.dropLast α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLast⊢ G.girth - 1 ≤ G.largestInducedTreeSize
let s : Finset α := p.support.toFinset α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinset⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hthree : 3 ≤ G.girth := hc.three_le_length.trans_eq hc_length.symm α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girth⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hc_tail_path : c.tail.IsPath := by
rw [Walk.isPath_def, α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girth⊢ c.tail.support.Nodup α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girth⊢ c.support.tail.Nodup α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPath⊢ G.girth - 1 ≤ G.largestInducedTreeSize c.support_tail_of_not_nil hc.not_nil α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girth⊢ c.support.tail.Nodup α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girth⊢ c.support.tail.Nodup α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPath⊢ G.girth - 1 ≤ G.largestInducedTreeSize] α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girth⊢ c.support.tail.Nodup α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPath⊢ G.girth - 1 ≤ G.largestInducedTreeSize
exact hc.support_nodup α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPath⊢ G.girth - 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPath⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hp_path : p.IsPath := by
exact Walk.isPath_of_isSubwalk
(Walk.isSubwalk_take c.tail (c.tail.length - 1)) hc_tail_path α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPath⊢ G.girth - 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPath⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hp_length : p.length = G.girth - 2 := by
dsimp [p, Walk.dropLast] α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPath⊢ (c.tail.take (c.tail.length - 1)).length = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize
rw [Walk.take_length, α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPath⊢ min (c.tail.length - 1) c.tail.length = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPath⊢ c.tail.length - 1 = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize Nat.min_eq_left (Nat.sub_le _ _) α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPath⊢ c.tail.length - 1 = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPath⊢ c.tail.length - 1 = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize] α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPath⊢ c.tail.length - 1 = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hlen := c.length_tail_add_one hc.not_nil α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhlen:c.tail.length + 1 = c.length⊢ c.tail.length - 1 = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize
rw [← hc_length α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhlen:c.tail.length + 1 = G.girth⊢ c.tail.length - 1 = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhlen:c.tail.length + 1 = G.girth⊢ c.tail.length - 1 = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize] at hlen α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhlen:c.tail.length + 1 = G.girth⊢ c.tail.length - 1 = G.girth - 2 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize
omega α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hs_card : s.card = G.girth - 1 := by
dsimp [s] α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ p.support.toFinset.card = G.girth - 1 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ G.girth - 1 ≤ G.largestInducedTreeSize
rw [List.toFinset_card_of_nodup hp_path.support_nodup, α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ p.support.length = G.girth - 1 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 2 + 1 = G.girth - 1 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ G.girth - 1 ≤ G.largestInducedTreeSize Walk.length_support, α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ p.length + 1 = G.girth - 1 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 2 + 1 = G.girth - 1 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ G.girth - 1 ≤ G.largestInducedTreeSize hp_length α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 2 + 1 = G.girth - 1 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 2 + 1 = G.girth - 1 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ G.girth - 1 ≤ G.largestInducedTreeSize] α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2⊢ G.girth - 2 + 1 = G.girth - 1 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ G.girth - 1 ≤ G.largestInducedTreeSize
omega α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ G.girth - 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hp_tree : (G.induce (s : Set α)).IsTree := by
constructor connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ (induce (↑s) G).ConnectedisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ (induce (↑s) G).IsAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
· connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ (induce (↑s) G).Connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize have hs_set : (s : Set α) = {y : α | y ∈ p.support} := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclic⊢ G.girth - 1 ≤ G.largestInducedTreeSize connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hs_set:↑s = {y | y ∈ p.support}⊢ (induce (↑s) G).Connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
ext y α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1y:α⊢ y ∈ ↑s ↔ y ∈ {y | y ∈ p.support}connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hs_set:↑s = {y | y ∈ p.support}⊢ (induce (↑s) G).Connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
simp [s]connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hs_set:↑s = {y | y ∈ p.support}⊢ (induce (↑s) G).Connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSizeconnected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hs_set:↑s = {y | y ∈ p.support}⊢ (induce (↑s) G).Connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
rw [hs_set connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hs_set:↑s = {y | y ∈ p.support}⊢ (induce {y | y ∈ p.support} G).Connected connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hs_set:↑s = {y | y ∈ p.support}⊢ (induce {y | y ∈ p.support} G).Connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize]connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hs_set:↑s = {y | y ∈ p.support}⊢ (induce {y | y ∈ p.support} G).Connected α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
exact p.connected_induce_support All goals completed! 🐙 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
· isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1⊢ (induce (↑s) G).IsAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize intro x d hd isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCycle⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
let e : G.induce (s : Set α) ↪g G := SimpleGraph.Embedding.induce _ isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑s⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
let q : G.Walk (e x) (e x) := d.map e.toHom isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom d⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hq : q.IsCycle := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclic⊢ G.girth - 1 ≤ G.largestInducedTreeSize isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
dsimp [q] α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom d⊢ (Walk.map e.toHom d).IsCycleisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
exact (Walk.isCycle_map_iff_of_injective e.injective).2 hdisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSizeisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hd_tail_path : d.tail.IsPath := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclic⊢ G.girth - 1 ≤ G.largestInducedTreeSize isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPath⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
rw [Walk.isPath_def, α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ d.tail.support.Nodup α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ d.support.tail.NodupisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPath⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize d.support_tail_of_not_nil hd.not_nil α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ d.support.tail.Nodup α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ d.support.tail.NodupisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPath⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize] α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCycle⊢ d.support.tail.NodupisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPath⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
exact hd.support_nodupisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPath⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSizeisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPath⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hd_length_le : d.length ≤ Fintype.card (s : Set α) := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclic⊢ G.girth - 1 ≤ G.largestInducedTreeSize isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑s⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hlt := hd_tail_path.length_lt α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhlt:d.tail.length < Fintype.card ↑↑s⊢ d.length ≤ Fintype.card ↑↑sisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑s⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hlen := d.length_tail_add_one hd.not_nil α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhlt:d.tail.length < Fintype.card ↑↑shlen:d.tail.length + 1 = d.length⊢ d.length ≤ Fintype.card ↑↑sisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑s⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
omegaisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑s⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSizeisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑s⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hq_length : q.length = d.length := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclic⊢ G.girth - 1 ≤ G.largestInducedTreeSize isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.length⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
simp [q]isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.length⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSizeisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.length⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hg_le : G.girth ≤ q.length := G.girth_le_length hq isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.lengthhg_le:G.girth ≤ q.length⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hs_type_card : Fintype.card (s : Set α) = s.card := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclic⊢ G.girth - 1 ≤ G.largestInducedTreeSize isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.lengthhg_le:G.girth ≤ q.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
simpisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.lengthhg_le:G.girth ≤ q.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSizeisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.lengthhg_le:G.girth ≤ q.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
rw [hq_length isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.lengthhg_le:G.girth ≤ d.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.lengthhg_le:G.girth ≤ d.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize] at hg_leisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ Fintype.card ↑↑shq_length:q.length = d.lengthhg_le:G.girth ≤ d.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
rw [hs_type_card, isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ s.cardhq_length:q.length = d.lengthhg_le:G.girth ≤ d.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ G.girth - 1hq_length:q.length = d.lengthhg_le:G.girth ≤ d.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize hs_card isAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ G.girth - 1hq_length:q.length = d.lengthhg_le:G.girth ≤ d.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ FalseisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ G.girth - 1hq_length:q.length = d.lengthhg_le:G.girth ≤ d.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize] at hd_length_leisAcyclic α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1x:↑↑sd:(induce (↑s) G).Walk x xhd:d.IsCyclee:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk (e x) (e x) := Walk.map e.toHom dhq:q.IsCyclehd_tail_path:d.tail.IsPathhd_length_le:d.length ≤ G.girth - 1hq_length:q.length = d.lengthhg_le:G.girth ≤ d.lengthhs_type_card:Fintype.card ↑↑s = s.card⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
omega α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTree⊢ G.girth - 1 ≤ G.largestInducedTreeSize
have hbound := card_le_largestInducedTreeSize hp_tree α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhcyc:¬G.IsAcyclicv:αc:G.Walk v vhc:c.IsCyclehc_length:G.girth = c.lengthp:G.Walk c.snd c.tail.penultimate := c.tail.dropLasts:Finset α := p.support.toFinseththree:3 ≤ G.girthhc_tail_path:c.tail.IsPathhp_path:p.IsPathhp_length:p.length = G.girth - 2hs_card:s.card = G.girth - 1hp_tree:(induce (↑s) G).IsTreehbound:s.card ≤ G.largestInducedTreeSize⊢ G.girth - 1 ≤ G.largestInducedTreeSize
omega All goals completed! 🐙omit [Fintype α] inEvery pair of vertices in a connected graph lies in an induced tree.
lemma Connected.exists_induced_tree_containing_pair {G : SimpleGraph α}
(hG : G.Connected) (x y : α) :
∃ s : Finset α, x ∈ s ∧ y ∈ s ∧ (G.induce (s : Set α)).IsTree := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αhG:G.Connectedx:αy:α⊢ ∃ s, x ∈ s ∧ y ∈ s ∧ (induce (↑s) G).IsTree
obtain ⟨p, _, hp⟩ := hG.exists_path_of_dist x y α:Type u_1inst✝:DecidableEq αG:SimpleGraph αhG:G.Connectedx:αy:αp:G.Walk x yleft✝:p.IsPathhp:p.length = G.dist x y⊢ ∃ s, x ∈ s ∧ y ∈ s ∧ (induce (↑s) G).IsTree
refine ⟨p.support.toFinset, ?_, ?_, ?_⟩ refine_1 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αhG:G.Connectedx:αy:αp:G.Walk x yleft✝:p.IsPathhp:p.length = G.dist x y⊢ x ∈ p.support.toFinsetrefine_2 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αhG:G.Connectedx:αy:αp:G.Walk x yleft✝:p.IsPathhp:p.length = G.dist x y⊢ y ∈ p.support.toFinsetrefine_3 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αhG:G.Connectedx:αy:αp:G.Walk x yleft✝:p.IsPathhp:p.length = G.dist x y⊢ (induce (↑p.support.toFinset) G).IsTree
· refine_1 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αhG:G.Connectedx:αy:αp:G.Walk x yleft✝:p.IsPathhp:p.length = G.dist x y⊢ x ∈ p.support.toFinset simp All goals completed! 🐙
· refine_2 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αhG:G.Connectedx:αy:αp:G.Walk x yleft✝:p.IsPathhp:p.length = G.dist x y⊢ y ∈ p.support.toFinset simp All goals completed! 🐙
· refine_3 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αhG:G.Connectedx:αy:αp:G.Walk x yleft✝:p.IsPathhp:p.length = G.dist x y⊢ (induce (↑p.support.toFinset) G).IsTree exact Walk.induce_support_isTree_of_length_eq_dist p hp All goals completed! 🐙omit [DecidableEq α] inA nonempty family of induced trees with prescribed vertices has a largest member.
lemma exists_maximum_induced_tree_containing (G : SimpleGraph α) (r : Finset α)
(hr : ∃ s : Finset α, r ⊆ s ∧ (G.induce (s : Set α)).IsTree) :
∃ s : Finset α,
r ⊆ s ∧
(G.induce (s : Set α)).IsTree ∧
∀ t : Finset α, r ⊆ t →
(G.induce (t : Set α)).IsTree → t.card ≤ s.card := by α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree⊢ ∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree ∧ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card
let A : Set (Finset α) :=
{s | r ⊆ s ∧ (G.induce (s : Set α)).IsTree} α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}⊢ ∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree ∧ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card
have hAfin : A.Finite := Set.toFinite A α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.Finite⊢ ∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree ∧ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card
have hAne : A.Nonempty := by
obtain ⟨s, hrs, hT⟩ := hr α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.Finites:Finset αhrs:r ⊆ shT:(induce (↑s) G).IsTree⊢ A.Nonempty α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.FinitehAne:A.Nonempty⊢ ∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree ∧ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card
exact ⟨s, hrs, hT⟩ α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.FinitehAne:A.Nonempty⊢ ∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree ∧ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.FinitehAne:A.Nonempty⊢ ∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree ∧ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card
obtain ⟨s, hsA, hmax⟩ := Set.exists_max_image A Finset.card hAfin hAne α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.FinitehAne:A.Nonemptys:Finset αhsA:s ∈ Ahmax:∀ b ∈ A, b.card ≤ s.card⊢ ∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree ∧ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card
dsimp [A] at hsA hmax α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.FinitehAne:A.Nonemptys:Finset αhsA:r ⊆ s ∧ (induce (↑s) G).IsTreehmax:∀ (b : Finset α), r ⊆ b ∧ (induce (↑b) G).IsTree → b.card ≤ s.card⊢ ∃ s, r ⊆ s ∧ (induce (↑s) G).IsTree ∧ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card
refine ⟨s, hsA.1, hsA.2, ?_⟩ α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.FinitehAne:A.Nonemptys:Finset αhsA:r ⊆ s ∧ (induce (↑s) G).IsTreehmax:∀ (b : Finset α), r ⊆ b ∧ (induce (↑b) G).IsTree → b.card ≤ s.card⊢ ∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card
intro t hrt hT α:Type u_1inst✝:Fintype αG:SimpleGraph αr:Finset αhr:∃ s, r ⊆ s ∧ (induce (↑s) G).IsTreeA:Set (Finset α) := {s | r ⊆ s ∧ (induce (↑s) G).IsTree}hAfin:A.FinitehAne:A.Nonemptys:Finset αhsA:r ⊆ s ∧ (induce (↑s) G).IsTreehmax:∀ (b : Finset α), r ⊆ b ∧ (induce (↑b) G).IsTree → b.card ≤ s.cardt:Finset αhrt:r ⊆ thT:(induce (↑t) G).IsTree⊢ t.card ≤ s.card
exact hmax t ⟨hrt, hT⟩ All goals completed! 🐙A nonempty proper vertex set in a connected graph has an edge across its boundary.
lemma Connected.exists_adj_finset_compl {G : SimpleGraph α}
(hG : G.Connected) {s : Finset α} (hs : s.Nonempty) (hsu : s ≠ Finset.univ) :
∃ z ∉ s, ∃ a ∈ s, G.Adj z a := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhs:s.Nonemptyhsu:s ≠ Finset.univ⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
obtain ⟨u, hu⟩ := hs α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
have hzex : ∃ z : α, z ∉ s := by
by_contra hn α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ shn:¬∃ z, z ∉ s⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ shzex:∃ z, z ∉ s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
push Not at hn α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ shn:∀ (z : α), z ∈ s⊢ False α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ shzex:∃ z, z ∉ s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
apply hsu α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ shn:∀ (z : α), z ∈ s⊢ s = Finset.univ α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ shzex:∃ z, z ∉ s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
exact Finset.eq_univ_of_forall hn α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ shzex:∃ z, z ∉ s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ shzex:∃ z, z ∉ s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
obtain ⟨z, hz⟩ := hzex α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
obtain ⟨p⟩ := hG u z α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u z⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
obtain ⟨d, _, hd_in, hd_out⟩ :=
p.exists_boundary_dart (s : Set α) (by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u z⊢ u ∈ ↑s α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u zd:G.Dartleft✝:d ∈ p.dartshd_in:d.toProd.1 ∈ ↑shd_out:d.toProd.2 ∉ ↑s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a simpa All goals completed! 🐙 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u zd:G.Dartleft✝:d ∈ p.dartshd_in:d.toProd.1 ∈ ↑shd_out:d.toProd.2 ∉ ↑s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a) (by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u z⊢ z ∉ ↑s α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u zd:G.Dartleft✝:d ∈ p.dartshd_in:d.toProd.1 ∈ ↑shd_out:d.toProd.2 ∉ ↑s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a simpa All goals completed! 🐙 α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u zd:G.Dartleft✝:d ∈ p.dartshd_in:d.toProd.1 ∈ ↑shd_out:d.toProd.2 ∉ ↑s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a) α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u zd:G.Dartleft✝:d ∈ p.dartshd_in:d.toProd.1 ∈ ↑shd_out:d.toProd.2 ∉ ↑s⊢ ∃ z ∉ s, ∃ a ∈ s, G.Adj z a
exact ⟨d.snd, by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u zd:G.Dartleft✝:d ∈ p.dartshd_in:d.toProd.1 ∈ ↑shd_out:d.toProd.2 ∉ ↑s⊢ d.toProd.2 ∉ s simpa using hd_out All goals completed! 🐙, d.fst, by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αhG:G.Connecteds:Finset αhsu:s ≠ Finset.univu:αhu:u ∈ sz:αhz:z ∉ sp:G.Walk u zd:G.Dartleft✝:d ∈ p.dartshd_in:d.toProd.1 ∈ ↑shd_out:d.toProd.2 ∉ ↑s⊢ d.toProd.1 ∈ s simpa using hd_in All goals completed! 🐙, d.adj.symm⟩A boundary vertex of a largest prescribed induced tree has two neighbors in the tree.
lemma exists_two_adj_of_maximum_induced_tree_containing
{G : SimpleGraph α} {r s : Finset α}
(hG : G.Connected) (hrs : r ⊆ s) (hs : s.Nonempty)
(hT : (G.induce (s : Set α)).IsTree)
(hmax : ∀ t : Finset α, r ⊆ t →
(G.induce (t : Set α)).IsTree → t.card ≤ s.card)
(hsu : s ≠ Finset.univ) :
∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s,
a ≠ b ∧ G.Adj z a ∧ G.Adj z b := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univ⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
obtain ⟨z, hz, a, ha, hza⟩ := hG.exists_adj_finset_compl hs hsu α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z a⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
by_cases hex : ∃ b ∈ s, b ≠ a ∧ G.Adj z b pos α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:∃ b ∈ s, b ≠ a ∧ G.Adj z b⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z bneg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z b⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
· pos α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:∃ b ∈ s, b ≠ a ∧ G.Adj z b⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b obtain ⟨b, hb, hba, hzb⟩ := hex pos α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ab:αhb:b ∈ shba:b ≠ ahzb:G.Adj z b⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
exact ⟨z, hz, a, ha, b, hb, hba.symm, hza, hzb⟩ All goals completed! 🐙
· neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z b⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b have huniq : ∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a := by
intro b hb hzb α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bb:αhb:b ∈ shzb:G.Adj z b⊢ b = a neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
by_contra hba α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bb:αhb:b ∈ shzb:G.Adj z bhba:¬b = a⊢ False neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
exact hex ⟨b, hb, hba, hzb⟩neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z bneg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = a⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
have hT' := hT.induce_insert_of_unique_adj hz ha hza huniq neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahT':(induce (↑(insert z s)) G).IsTree⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
have hrs' : r ⊆ insert z s := by
intro v hv α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahT':(induce (↑(insert z s)) G).IsTreev:αhv:v ∈ r⊢ v ∈ insert z s neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahT':(induce (↑(insert z s)) G).IsTreehrs':r ⊆ insert z s⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
exact Finset.mem_insert_of_mem (hrs hv)neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahT':(induce (↑(insert z s)) G).IsTreehrs':r ⊆ insert z s⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z bneg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahT':(induce (↑(insert z s)) G).IsTreehrs':r ⊆ insert z s⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
have hle := hmax (insert z s) hrs' hT' neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahT':(induce (↑(insert z s)) G).IsTreehrs':r ⊆ insert z shle:(insert z s).card ≤ s.card⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
have hcard := Finset.card_insert_of_notMem hz neg α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αr:Finset αs:Finset αhG:G.Connectedhrs:r ⊆ shs:s.NonemptyhT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), r ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ shza:G.Adj z ahex:¬∃ b ∈ s, b ≠ a ∧ G.Adj z bhuniq:∀ ⦃b : α⦄, b ∈ s → G.Adj z b → b = ahT':(induce (↑(insert z s)) G).IsTreehrs':r ⊆ insert z shle:(insert z s).card ≤ s.cardhcard:(insert z s).card = s.card + 1⊢ ∃ z ∉ s, ∃ a ∈ s, ∃ b ∈ s, a ≠ b ∧ G.Adj z a ∧ G.Adj z b
omega All goals completed! 🐙Two leaves outside the boundary cycle force an extra two vertices in the induced tree.
lemma IsTree.girth_add_one_le_card_of_two_leaves_of_two_adj
{G : SimpleGraph α} [DecidableRel G.Adj] {s : Finset α}
(hT : (G.induce (s : Set α)).IsTree)
{x y z a b : α}
(hxs : x ∈ s) (hys : y ∈ s) (hxy : x ≠ y)
(hx : G.degree x = 1) (hy : G.degree y = 1)
(hz : z ∉ s) (ha : a ∈ s) (hb : b ∈ s)
(hab : a ≠ b) (hza : G.Adj z a) (hzb : G.Adj z b) :
G.girth + 1 ≤ s.card := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z b⊢ G.girth + 1 ≤ s.card
let e : G.induce (s : Set α) ↪g G := SimpleGraph.Embedding.induce _ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑s⊢ G.girth + 1 ≤ s.card
obtain ⟨p, hp, _⟩ := hT.existsUnique_path ⟨a, by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑s⊢ a ∈ ↑s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = p⊢ G.girth + 1 ≤ s.card simpa All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = p⊢ G.girth + 1 ≤ s.card⟩ ⟨b, by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑s⊢ b ∈ ↑s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = p⊢ G.girth + 1 ≤ s.card simpa All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = p⊢ G.girth + 1 ≤ s.card⟩ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = p⊢ G.girth + 1 ≤ s.card
let q : G.Walk a b := p.map e.toHom α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom p⊢ G.girth + 1 ≤ s.card
have hq : q.IsPath := by
dsimp [q] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom p⊢ (Walk.map e.toHom p).IsPath α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPath⊢ G.girth + 1 ≤ s.card
exact (Walk.isPath_map_iff_of_injective e.injective).2 hp α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPath⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPath⊢ G.girth + 1 ≤ s.card
have hq_s : ∀ w ∈ q.support, w ∈ s := by
intro w hw α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathw:αhw:w ∈ q.support⊢ w ∈ s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth + 1 ≤ s.card
change w ∈ (p.map e.toHom).support at hw α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathw:αhw:w ∈ (Walk.map e.toHom p).support⊢ w ∈ s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth + 1 ≤ s.card
rw [Walk.support_map α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathw:αhw:w ∈ List.map (⇑e.toHom) p.support⊢ w ∈ s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathw:αhw:w ∈ List.map (⇑e.toHom) p.support⊢ w ∈ s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth + 1 ≤ s.card] at hw α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathw:αhw:w ∈ List.map (⇑e.toHom) p.support⊢ w ∈ s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth + 1 ≤ s.card
obtain ⟨w', hw', rfl⟩ := List.mem_map.mp hw α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathw':↑↑shw':w' ∈ p.supporthw:e.toHom w' ∈ List.map (⇑e.toHom) p.support⊢ e.toHom w' ∈ s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth + 1 ≤ s.card
exact w'.property α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth + 1 ≤ s.card
have hzq : z ∉ q.support := fun hzmem => hz (hq_s z hzmem) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.support⊢ G.girth + 1 ≤ s.card
let r : G.Walk a z := q.concat hzb.symm α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯⊢ G.girth + 1 ≤ s.card
have hr : r.IsPath := hq.concat hzq hzb.symm α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPath⊢ G.girth + 1 ≤ s.card
have hclose : s(z, a) ∉ r.edges := by
intro he α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhe:s(z, a) ∈ r.edges⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
dsimp [r] at he α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhe:s(z, a) ∈ (q.concat ⋯).edges⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
simp only [Walk.edges_concat, List.concat_eq_append, List.mem_append, List.mem_singleton] at he α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhe:s(z, a) ∈ q.edges ∨ s(z, a) = s(b, z)⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
rcases he with he | he inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhe:s(z, a) ∈ q.edges⊢ Falseinr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhe:s(z, a) = s(b, z)⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
· inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhe:s(z, a) ∈ q.edges⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card exact hzq (q.fst_mem_support_of_mem_edges he) All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
· inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhe:s(z, a) = s(b, z)⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card simp only [Sym2.eq, Sym2.rel_iff', Prod.mk.injEq, Prod.swap_prod_mk] at he inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhe:z = b ∧ a = z ∨ True ∧ a = b⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
rcases he with ⟨hzb', haz⟩ | ⟨_, hab'⟩ inr.inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhzb':z = bhaz:a = z⊢ Falseinr.inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathleft✝:Truehab':a = b⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
· inr.inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhzb':z = bhaz:a = z⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card exact hza.ne haz.symm All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
· inr.inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathleft✝:Truehab':a = b⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card exact hab hab' α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edges⊢ G.girth + 1 ≤ s.card
let c : G.Walk z z := r.cons hza α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza r⊢ G.girth + 1 ≤ s.card
have hc : c.IsCycle := by
dsimp [c] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza r⊢ (Walk.cons hza r).IsCycle α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCycle⊢ G.girth + 1 ≤ s.card
exact (Walk.cons_isCycle_iff r hza).2 ⟨hr, hclose⟩ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCycle⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCycle⊢ G.girth + 1 ≤ s.card
have hsubx : (G.neighborSet x).Subsingleton := by
obtain ⟨nx, hnx, huniqx⟩ := degree_eq_one_iff_existsUnique_adj.mp hx α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclenx:αhnx:G.Adj x nxhuniqx:∀ (y : α), (fun w ↦ G.Adj x w) y → y = nx⊢ (G.neighborSet x).Subsingleton α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingleton⊢ G.girth + 1 ≤ s.card
intro u hu v hv α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclenx:αhnx:G.Adj x nxhuniqx:∀ (y : α), (fun w ↦ G.Adj x w) y → y = nxu:αhu:u ∈ G.neighborSet xv:αhv:v ∈ G.neighborSet x⊢ u = v α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingleton⊢ G.girth + 1 ≤ s.card
exact (huniqx u hu).trans (huniqx v hv).symm α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingleton⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingleton⊢ G.girth + 1 ≤ s.card
have hsuby : (G.neighborSet y).Subsingleton := by
obtain ⟨ny, hny, huniqy⟩ := degree_eq_one_iff_existsUnique_adj.mp hy α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonny:αhny:G.Adj y nyhuniqy:∀ (y_1 : α), (fun w ↦ G.Adj y w) y_1 → y_1 = ny⊢ (G.neighborSet y).Subsingleton α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingleton⊢ G.girth + 1 ≤ s.card
intro u hu v hv α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonny:αhny:G.Adj y nyhuniqy:∀ (y_1 : α), (fun w ↦ G.Adj y w) y_1 → y_1 = nyu:αhu:u ∈ G.neighborSet yv:αhv:v ∈ G.neighborSet y⊢ u = v α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingleton⊢ G.girth + 1 ≤ s.card
exact (huniqy u hu).trans (huniqy v hv).symm α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingleton⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingleton⊢ G.girth + 1 ≤ s.card
have hxz : x ≠ z := fun hxz => hz (hxz ▸ hxs) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ z⊢ G.girth + 1 ≤ s.card
have hyz : y ≠ z := fun hyz => hz (hyz ▸ hys) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ z⊢ G.girth + 1 ≤ s.card
have hxnot : x ∉ c.support :=
hc.isTrail.not_mem_support_of_subsingleton_neighborSet hxz hxz hsubx α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.support⊢ G.girth + 1 ≤ s.card
have hynot : y ∉ c.support :=
hc.isTrail.not_mem_support_of_subsingleton_neighborSet hyz hyz hsuby α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.support⊢ G.girth + 1 ≤ s.card
have hqC : ∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support := by
intro w hw α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supportw:αhw:w ∈ q.support⊢ w ∈ c.support α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support⊢ G.girth + 1 ≤ s.card
have hwr : w ∈ r.support := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z b⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supportw:αhw:w ∈ q.supporthwr:w ∈ r.support⊢ w ∈ c.support α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support⊢ G.girth + 1 ≤ s.card
dsimp [r] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supportw:αhw:w ∈ q.support⊢ w ∈ (q.concat ⋯).support α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supportw:αhw:w ∈ q.supporthwr:w ∈ r.support⊢ w ∈ c.support α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support⊢ G.girth + 1 ≤ s.card
exact q.support_subset_support_concat hzb.symm hw α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supportw:αhw:w ∈ q.supporthwr:w ∈ r.support⊢ w ∈ c.support α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supportw:αhw:w ∈ q.supporthwr:w ∈ r.support⊢ w ∈ c.support α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support⊢ G.girth + 1 ≤ s.card
dsimp [c] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supportw:αhw:w ∈ q.supporthwr:w ∈ r.support⊢ w ∈ z :: r.support α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support⊢ G.girth + 1 ≤ s.card
exact r.support_subset_support_cons hza hwr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.support⊢ G.girth + 1 ≤ s.card
have hqsub : q.support.toFinset ⊆ (s.erase x).erase y := by
intro w hw α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinset⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
have hwq : w ∈ q.support := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z b⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.support⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card simpa using hw α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.support⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.support⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
have hws : w ∈ s := hq_s w hwq α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ s⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
have hwx : w ≠ x := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z b⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ x⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
intro hwx α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w = x⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ x⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
subst w α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthw:x ∈ q.support.toFinsethwq:x ∈ q.supporthws:x ∈ s⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ x⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
exact hxnot (hqC hwq) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ x⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ x⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
have hwy : w ≠ y := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z b⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ xhwy:w ≠ y⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
intro hwy α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ xhwy:w = y⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ xhwy:w ≠ y⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
subst w α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthw:y ∈ q.support.toFinsethwq:y ∈ q.supporthws:y ∈ shwx:y ≠ x⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ xhwy:w ≠ y⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
exact hynot (hqC hwq) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ xhwy:w ≠ y⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supportw:αhw:w ∈ q.support.toFinsethwq:w ∈ q.supporthws:w ∈ shwx:w ≠ xhwy:w ≠ y⊢ w ∈ (s.erase x).erase y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
simp [hws, hwx, hwy] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ G.girth + 1 ≤ s.card
have hqcard : q.support.toFinset.card = q.length + 1 := by
rw [List.toFinset_card_of_nodup hq.support_nodup, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ q.support.length = q.length + 1 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1⊢ G.girth + 1 ≤ s.card q.length_support α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase y⊢ q.length + 1 = q.length + 1 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1⊢ G.girth + 1 ≤ s.card] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1⊢ G.girth + 1 ≤ s.card
have hy_erase : y ∈ s.erase x := by simp [hys, hxy.symm] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase x⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase x⊢ G.girth + 1 ≤ s.card
have hcard := Finset.card_le_card hqsub α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.support.toFinset.card ≤ ((s.erase x).erase y).card⊢ G.girth + 1 ≤ s.card
rw [hqcard, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ ((s.erase x).erase y).card⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ s.card - 1 - 1⊢ G.girth + 1 ≤ s.card Finset.card_erase_of_mem hy_erase, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ (s.erase x).card - 1⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ s.card - 1 - 1⊢ G.girth + 1 ≤ s.card
Finset.card_erase_of_mem hxs α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ s.card - 1 - 1⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ s.card - 1 - 1⊢ G.girth + 1 ≤ s.card] at hcard α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ s.card - 1 - 1⊢ G.girth + 1 ≤ s.card
have hclen : c.length = q.length + 2 := by simp [c, r] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ s.card - 1 - 1hclen:c.length = q.length + 2⊢ G.girth + 1 ≤ s.card α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ s.card - 1 - 1hclen:c.length = q.length + 2⊢ G.girth + 1 ≤ s.card
have hg := G.girth_le_length hc α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:αy:αz:αa:αb:αhxs:x ∈ shys:y ∈ shxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1hz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z be:induce (↑s) G ↪g G := Embedding.induce ↑sp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathright✝:∀ (y : (induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩), (fun p ↦ p.IsPath) y → y = pq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathhclose:s(z, a) ∉ r.edgesc:G.Walk z z := Walk.cons hza rhc:c.IsCyclehsubx:(G.neighborSet x).Subsingletonhsuby:(G.neighborSet y).Subsingletonhxz:x ≠ zhyz:y ≠ zhxnot:x ∉ c.supporthynot:y ∉ c.supporthqC:∀ ⦃w : α⦄, w ∈ q.support → w ∈ c.supporthqsub:q.support.toFinset ⊆ (s.erase x).erase yhqcard:q.support.toFinset.card = q.length + 1hy_erase:y ∈ s.erase xhcard:q.length + 1 ≤ s.card - 1 - 1hclen:c.length = q.length + 2hg:G.girth ≤ c.length⊢ G.girth + 1 ≤ s.card
omega All goals completed! 🐙Two distinct leaves in a connected cyclic graph yield an induced tree of order at least girth plus one.
lemma girth_add_one_le_largestInducedTreeSize_of_two_leaves
(G : SimpleGraph α) [DecidableRel G.Adj]
(hG : G.Connected) (hcyc : ¬ G.IsAcyclic)
{x y : α} (hxy : x ≠ y)
(hx : G.degree x = 1) (hy : G.degree y = 1) :
G.girth + 1 ≤ largestInducedTreeSize G := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1⊢ G.girth + 1 ≤ G.largestInducedTreeSize
obtain ⟨t, hxt, hyt, hTt⟩ :=
Connected.exists_induced_tree_containing_pair hG x y α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hr : ∃ u : Finset α,
({x, y} : Finset α) ⊆ u ∧ (G.induce (u : Set α)).IsTree := by
refine ⟨t, ?_, hTt⟩ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTree⊢ {x, y} ⊆ t α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize
intro v hv α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreev:αhv:v ∈ {x, y}⊢ v ∈ t α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize
rcases Finset.mem_insert.mp hv with rfl | hv inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicy:αhy:G.degree y = 1t:Finset αhyt:y ∈ thTt:(induce (↑t) G).IsTreev:αhxy:v ≠ yhx:G.degree v = 1hxt:v ∈ thv:v ∈ {v, y}⊢ v ∈ tinr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreev:αhv✝:v ∈ {x, y}hv:v ∈ {y}⊢ v ∈ t α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize
· inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicy:αhy:G.degree y = 1t:Finset αhyt:y ∈ thTt:(induce (↑t) G).IsTreev:αhxy:v ≠ yhx:G.degree v = 1hxt:v ∈ thv:v ∈ {v, y}⊢ v ∈ t α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize exact hxt All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize
· inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreev:αhv✝:v ∈ {x, y}hv:v ∈ {y}⊢ v ∈ t α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize have hvy : v = y := Finset.mem_singleton.mp hv inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreev:αhv✝:v ∈ {x, y}hv:v ∈ {y}hvy:v = y⊢ v ∈ t α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize
subst v inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehv✝:y ∈ {x, y}hv:y ∈ {y}⊢ y ∈ t α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize
exact hyt α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTree⊢ G.girth + 1 ≤ G.largestInducedTreeSize
obtain ⟨s, hrs, hT, hmax⟩ :=
exists_maximum_induced_tree_containing G {x, y} hr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hxs : x ∈ s := hrs (by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card⊢ x ∈ {x, y} α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ s⊢ G.girth + 1 ≤ G.largestInducedTreeSize simp All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ s⊢ G.girth + 1 ≤ G.largestInducedTreeSize) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ s⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hys : y ∈ s := hrs (by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ s⊢ y ∈ {x, y} α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ s⊢ G.girth + 1 ≤ G.largestInducedTreeSize simp All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ s⊢ G.girth + 1 ≤ G.largestInducedTreeSize) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ s⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hs : s.Nonempty := ⟨x, hxs⟩ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonempty⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hsu : s ≠ Finset.univ := by
intro hsu α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s = Finset.univ⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
subst s α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonempty⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hset : (↑(Finset.univ : Finset α) : Set α) = Set.univ := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1⊢ G.girth + 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
ext v α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyv:α⊢ v ∈ ↑Finset.univ ↔ v ∈ Set.univ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
simp α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
rw [hset α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize] at hT α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hTuniv : (G.induce Set.univ).IsTree := hT α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univhTuniv:(induce Set.univ G).IsTree⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hGtree : G.IsTree := (induceUnivIso G).isTree_iff.mp hTuniv α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTreehrs:{x, y} ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhxs:x ∈ Finset.univhys:y ∈ Finset.univhs:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univhTuniv:(induce Set.univ G).IsTreehGtree:G.IsTree⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
exact hcyc hGtree.isAcyclic α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.girth + 1 ≤ G.largestInducedTreeSize
obtain ⟨z, hz, a, ha, b, hb, hab, hza, hzb⟩ :=
exists_two_adj_of_maximum_induced_tree_containing
hG hrs hs hT hmax hsu α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z b⊢ G.girth + 1 ≤ G.largestInducedTreeSize
have hbound : G.girth + 1 ≤ s.card :=
IsTree.girth_add_one_le_card_of_two_leaves_of_two_adj
hT hxs hys hxy hx hy hz ha hb hab hza hzb α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.AdjhG:G.Connectedhcyc:¬G.IsAcyclicx:αy:αhxy:x ≠ yhx:G.degree x = 1hy:G.degree y = 1t:Finset αhxt:x ∈ thyt:y ∈ thTt:(induce (↑t) G).IsTreehr:∃ u, {x, y} ⊆ u ∧ (induce (↑u) G).IsTrees:Finset αhrs:{x, y} ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), {x, y} ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhxs:x ∈ shys:y ∈ shs:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bhbound:G.girth + 1 ≤ s.card⊢ G.girth + 1 ≤ G.largestInducedTreeSize
exact hbound.trans (card_le_largestInducedTreeSize hT) All goals completed! 🐙end SimpleGraph