/-
Copyright 2026 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 FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Independence
public import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.LargestInducedTree@[expose] public sectionInduced trees, neighbourhood independence, and girth
Supporting API for WOWII (Graffiti.pc) Conjecture 141. Main results:
SimpleGraph.indepNeighborsCard_add_one_le_largestInducedTreeSize: an
independent set in a neighbourhood plus its centre induces a star, so
indepNeighborsCard G v + 1 ≤ largestInducedTreeSize G.
SimpleGraph.isIndepSet_neighborSet_of_four_le_girth: girth at least four
makes every neighbourhood independent.
SimpleGraph.maxDegree_add_girth_le_largestInducedTreeSize_add_three: for a
connected cyclic graph of girth at least four,
Δ(G) + girth(G) ≤ largestInducedTreeSize G + 3 — a maximum-order induced
tree containing the closed neighbourhood of a maximum-degree vertex admits an
outside vertex with two neighbours on the tree; the tree path joining them
closes a cycle (so has length at least girth - 2) and shares at most three
vertices with the closed neighbourhood.
namespace SimpleGraphsection PathHelpersvariable {β : Type*} {H : SimpleGraph β}In a path, at most one edge is incident to the first vertex.
All goals completed! 🐙
In a path, at most two edges are incident to any fixed vertex w: among
any three vertices joined to w by edges of the path, two coincide.
private lemma path_incident_edges_le_two {a b w u₁ u₂ u₃ : β} {p : H.Walk a b}
(hp : p.IsPath) (h₁ : s(w, u₁) ∈ p.edges) (h₂ : s(w, u₂) ∈ p.edges)
(h₃ : s(w, u₃) ∈ p.edges) :
u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ := by β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βp:H.Walk a bhp:p.IsPathh₁:s(w, u₁) ∈ p.edgesh₂:s(w, u₂) ∈ p.edgesh₃:s(w, u₃) ∈ p.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
induction p with
| nil => nil β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βu✝:βhp:Walk.nil.IsPathh₁:s(w, u₁) ∈ Walk.nil.edgesh₂:s(w, u₂) ∈ Walk.nil.edgesh₃:s(w, u₃) ∈ Walk.nil.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ simp at h₁ All goals completed! 🐙
| @cons x c y h q ih => cons β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:(Walk.cons h q).IsPathh₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
by_cases hwx : w = x pos β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:(Walk.cons h q).IsPathh₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:w = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:(Walk.cons h q).IsPathh₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· pos β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:(Walk.cons h q).IsPathh₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:w = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ subst hwx pos β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βc:βy:βq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃h:H.Adj w chp:(Walk.cons h q).IsPathh₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
exact Or.inl (path_start_unique_edge hp h₁ h₂) All goals completed! 🐙
· neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:(Walk.cons h q).IsPathh₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ rw [Walk.cons_isPath_iff neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃] at hp neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
have key : ∀ u : β, s(w, u) ∈ (Walk.cons h q).edges →
(u = x ∧ w = c) ∨ s(w, u) ∈ q.edges := by
intro u hu β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βhu:s(w, u) ∈ (Walk.cons h q).edges⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edges neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
rw [Walk.edges_cons, β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βhu:s(w, u) ∈ s(x, c) :: q.edges⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edges β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βhu:s(w, u) = s(x, c) ∨ s(w, u) ∈ q.edges⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ List.mem_cons β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βhu:s(w, u) = s(x, c) ∨ s(w, u) ∈ q.edges⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edges β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βhu:s(w, u) = s(x, c) ∨ s(w, u) ∈ q.edges⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃] at hu β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βhu:s(w, u) = s(x, c) ∨ s(w, u) ∈ q.edges⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
rcases hu with heq | hmem inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βheq:s(w, u) = s(x, c)⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesinr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βhmem:s(w, u) ∈ q.edges⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βheq:s(w, u) = s(x, c)⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ rcases Sym2.eq_iff.mp heq with ⟨hwx', -⟩ | ⟨hwc, hux⟩ inl.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βheq:s(w, u) = s(x, c)hwx':w = x⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesinl.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βheq:s(w, u) = s(x, c)hwc:w = chux:u = x⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· inl.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βheq:s(w, u) = s(x, c)hwx':w = x⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ exact absurd hwx' hwx All goals completed! 🐙neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· inl.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βheq:s(w, u) = s(x, c)hwc:w = chux:u = x⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ exact Or.inl ⟨hux, hwc⟩ All goals completed! 🐙neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xu:βhmem:s(w, u) ∈ q.edges⊢ u = x ∧ w = c ∨ s(w, u) ∈ q.edgesneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ exact Or.inr hmemneg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃neg β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
rcases key u₁ h₁ with ⟨hu₁, hwc⟩ | m₁ neg.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = c⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃neg.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· neg.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = c⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ rcases key u₂ h₂ with ⟨hu₂, -⟩ | m₂ neg.inl.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = chu₂:u₂ = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃neg.inl.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = cm₂:s(w, u₂) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· neg.inl.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = chu₂:u₂ = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ exact Or.inl (hu₁.trans hu₂.symm) All goals completed! 🐙
· neg.inl.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = cm₂:s(w, u₂) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ rcases key u₃ h₃ with ⟨hu₃, -⟩ | m₃ neg.inl.inr.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = cm₂:s(w, u₂) ∈ q.edgeshu₃:u₃ = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃neg.inl.inr.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = cm₂:s(w, u₂) ∈ q.edgesm₃:s(w, u₃) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· neg.inl.inr.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = cm₂:s(w, u₂) ∈ q.edgeshu₃:u₃ = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ exact Or.inr (Or.inl (hu₁.trans hu₃.symm)) All goals completed! 🐙
· neg.inl.inr.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgeshu₁:u₁ = xhwc:w = cm₂:s(w, u₂) ∈ q.edgesm₃:s(w, u₃) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ subst hwc neg.inl.inr.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βy:βhwx:¬w = xhu₁:u₁ = xh:H.Adj x wq:H.Walk w yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeskey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = w ∨ s(w, u) ∈ q.edgesm₂:s(w, u₂) ∈ q.edgesm₃:s(w, u₃) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
exact Or.inr (Or.inr (path_start_unique_edge hp.1 m₂ m₃)) All goals completed! 🐙
· neg.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ rcases key u₂ h₂ with ⟨hu₂, hwc⟩ | m₂ neg.inr.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgeshu₂:u₂ = xhwc:w = c⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃neg.inr.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgesm₂:s(w, u₂) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· neg.inr.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgeshu₂:u₂ = xhwc:w = c⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ rcases key u₃ h₃ with ⟨hu₃, -⟩ | m₃ neg.inr.inl.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgeshu₂:u₂ = xhwc:w = chu₃:u₃ = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃neg.inr.inl.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgeshu₂:u₂ = xhwc:w = cm₃:s(w, u₃) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· neg.inr.inl.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgeshu₂:u₂ = xhwc:w = chu₃:u₃ = x⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ exact Or.inr (Or.inr (hu₂.trans hu₃.symm)) All goals completed! 🐙
· neg.inr.inl.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgeshu₂:u₂ = xhwc:w = cm₃:s(w, u₃) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ subst hwc neg.inr.inl.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βy:βhwx:¬w = xhu₂:u₂ = xh:H.Adj x wq:H.Walk w yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeskey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = w ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgesm₃:s(w, u₃) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
exact Or.inr (Or.inl (path_start_unique_edge hp.1 m₁ m₃)) All goals completed! 🐙
· neg.inr.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgesm₂:s(w, u₂) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ rcases key u₃ h₃ with ⟨-, hwc⟩ | m₃ neg.inr.inr.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgesm₂:s(w, u₂) ∈ q.edgeshwc:w = c⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃neg.inr.inr.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgesm₂:s(w, u₂) ∈ q.edgesm₃:s(w, u₃) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
· neg.inr.inr.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgesm₂:s(w, u₂) ∈ q.edgeshwc:w = c⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ subst hwc neg.inr.inr.inl β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βy:βhwx:¬w = xh:H.Adj x wq:H.Walk w yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeskey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = w ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgesm₂:s(w, u₂) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃
exact Or.inl (path_start_unique_edge hp.1 m₁ m₂) All goals completed! 🐙
· neg.inr.inr.inr β:Type u_1H:SimpleGraph βa:βb:βw:βu₁:βu₂:βu₃:βx:βc:βy:βh:H.Adj x cq:H.Walk c yih:q.IsPath → s(w, u₁) ∈ q.edges → s(w, u₂) ∈ q.edges → s(w, u₃) ∈ q.edges → u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃hp:q.IsPath ∧ x ∉ q.supporth₁:s(w, u₁) ∈ (Walk.cons h q).edgesh₂:s(w, u₂) ∈ (Walk.cons h q).edgesh₃:s(w, u₃) ∈ (Walk.cons h q).edgeshwx:¬w = xkey:∀ (u : β), s(w, u) ∈ (Walk.cons h q).edges → u = x ∧ w = c ∨ s(w, u) ∈ q.edgesm₁:s(w, u₁) ∈ q.edgesm₂:s(w, u₂) ∈ q.edgesm₃:s(w, u₃) ∈ q.edges⊢ u₁ = u₂ ∨ u₁ = u₃ ∨ u₂ = u₃ exact ih hp.1 m₁ m₂ m₃ All goals completed! 🐙
A path visiting a and b contains a subpath between a and b (in one
of the two directions) whose support and edges lie in the original path.
private lemma exists_subpath_between {x y a b : β} {p : H.Walk x y} (hp : p.IsPath)
(ha : a ∈ p.support) (hb : b ∈ p.support) :
(∃ q : H.Walk a b, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨
(∃ q : H.Walk b a, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) := by β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
classical
by_cases hbt : b ∈ (p.takeUntil a ha).support pos β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∈ (p.takeUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edgesneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
· pos β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∈ (p.takeUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges exact Or.inr ⟨(p.takeUntil a ha).dropUntil b hbt, (hp.takeUntil ha).dropUntil hbt,
List.Subset.trans ((p.takeUntil a ha).support_dropUntil_subset_support hbt)
(p.support_takeUntil_subset_support ha),
List.Subset.trans ((p.takeUntil a ha).edges_dropUntil_subset_edges hbt)
(p.edges_takeUntil_subset_edges ha)⟩ All goals completed! 🐙
· neg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges have hbd : b ∈ (p.dropUntil a ha).support := by β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges neg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
have h2 : b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).support := by β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).support⊢ b ∈ (p.dropUntil a ha).support neg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
rw [p.take_spec ha β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).support⊢ b ∈ p.support β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).support⊢ b ∈ p.support β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).support⊢ b ∈ (p.dropUntil a ha).supportneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges] β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).support⊢ b ∈ p.support β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).support⊢ b ∈ (p.dropUntil a ha).supportneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
exact hb β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).support⊢ b ∈ (p.dropUntil a ha).supportneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).support⊢ b ∈ (p.dropUntil a ha).supportneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
rcases (Walk.mem_support_append_iff _ _).mp h2 with hcase | hcase inl β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).supporthcase:b ∈ (p.takeUntil a ha).support⊢ b ∈ (p.dropUntil a ha).supportinr β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).supporthcase:b ∈ (p.dropUntil a ha).support⊢ b ∈ (p.dropUntil a ha).supportneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
· inl β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).supporthcase:b ∈ (p.takeUntil a ha).support⊢ b ∈ (p.dropUntil a ha).supportneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges exact absurd hcase hbt All goals completed! 🐙neg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
· inr β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporth2:b ∈ ((p.takeUntil a ha).append (p.dropUntil a ha)).supporthcase:b ∈ (p.dropUntil a ha).support⊢ b ∈ (p.dropUntil a ha).supportneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges exact hcaseneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edgesneg β:Type u_1H:SimpleGraph βx:βy:βa:βb:βp:H.Walk x yhp:p.IsPathha:a ∈ p.supporthb:b ∈ p.supporthbt:b ∉ (p.takeUntil a ha).supporthbd:b ∈ (p.dropUntil a ha).support⊢ (∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges) ∨ ∃ q, q.IsPath ∧ q.support ⊆ p.support ∧ q.edges ⊆ p.edges
exact Or.inl ⟨(p.dropUntil a ha).takeUntil b hbd, (hp.dropUntil ha).takeUntil hbd,
List.Subset.trans ((p.dropUntil a ha).support_takeUntil_subset_support hbd)
(p.support_dropUntil_subset_support ha),
List.Subset.trans ((p.dropUntil a ha).edges_takeUntil_subset_edges hbd)
(p.edges_dropUntil_subset_edges ha)⟩ All goals completed! 🐙In a tree, the unique path between two adjacent vertices is the single edge.
private lemma tree_isPath_eq_cons_nil (hH : H.IsTree) {a b : β} (hab : H.Adj a b)
{q : H.Walk a b} (hq : q.IsPath) :
q = Walk.cons hab Walk.nil := by β:Type u_1H:SimpleGraph βhH:H.IsTreea:βb:βhab:H.Adj a bq:H.Walk a bhq:q.IsPath⊢ q = Walk.cons hab Walk.nil
obtain ⟨P, -, huniq⟩ := hH.existsUnique_path a b β:Type u_1H:SimpleGraph βhH:H.IsTreea:βb:βhab:H.Adj a bq:H.Walk a bhq:q.IsPathP:H.Walk a bhuniq:∀ (y : H.Walk a b), (fun p ↦ p.IsPath) y → y = P⊢ q = Walk.cons hab Walk.nil
exact (huniq q hq).trans
(huniq (Walk.cons hab Walk.nil) (Walk.IsPath.nil.cons (by β:Type u_1H:SimpleGraph βhH:H.IsTreea:βb:βhab:H.Adj a bq:H.Walk a bhq:q.IsPathP:H.Walk a bhuniq:∀ (y : H.Walk a b), (fun p ↦ p.IsPath) y → y = P⊢ a ∉ Walk.nil.support simp [hab.ne] All goals completed! 🐙))).symm
Two path-vertices adjacent (in a tree) to a common vertex v force v
onto the path: the unique tree path between them is the two-edge path through
v, and the subpath of p between them must be that path.
private lemma tree_center_mem_support (hH : H.IsTree)
{v a b x y : β} (hva : H.Adj v a) (hvb : H.Adj v b) (hab : a ≠ b)
{p : H.Walk x y} (hp : p.IsPath) (hap : a ∈ p.support) (hbp : b ∈ p.support) :
v ∈ p.support := by β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.support⊢ v ∈ p.support
rcases exists_subpath_between hp hap hbp with ⟨q, hq, hqs, -⟩ | ⟨q, hq, hqs, -⟩ inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.support⊢ v ∈ p.supportinr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.support⊢ v ∈ p.support
· inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.support⊢ v ∈ p.support have hr : (Walk.cons hva.symm (Walk.cons hvb Walk.nil)).IsPath :=
(Walk.IsPath.nil.cons (by β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.support⊢ v ∉ Walk.nil.support inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPath⊢ v ∈ p.support simp [hvb.ne] All goals completed! 🐙 inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPath⊢ v ∈ p.support)).cons (by β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.support⊢ a ∉ (Walk.cons hvb Walk.nil).supportinl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPath⊢ v ∈ p.support simp [hva.ne', hab] All goals completed! 🐙inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPath⊢ v ∈ p.support)inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPath⊢ v ∈ p.support
obtain ⟨P, -, huniq⟩ := hH.existsUnique_path a b inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPathP:H.Walk a bhuniq:∀ (y : H.Walk a b), (fun p ↦ p.IsPath) y → y = P⊢ v ∈ p.support
have heq : q = Walk.cons hva.symm (Walk.cons hvb Walk.nil) :=
(huniq q hq).trans (huniq _ hr).symm inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPathP:H.Walk a bhuniq:∀ (y : H.Walk a b), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hvb Walk.nil)⊢ v ∈ p.support
apply hqs inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPathP:H.Walk a bhuniq:∀ (y : H.Walk a b), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hvb Walk.nil)⊢ v ∈ q.support
rw [heq inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPathP:H.Walk a bhuniq:∀ (y : H.Walk a b), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hvb Walk.nil)⊢ v ∈ (Walk.cons ⋯ (Walk.cons hvb Walk.nil)).support inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPathP:H.Walk a bhuniq:∀ (y : H.Walk a b), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hvb Walk.nil)⊢ v ∈ (Walk.cons ⋯ (Walk.cons hvb Walk.nil)).support]inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk a bhq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hvb Walk.nil)).IsPathP:H.Walk a bhuniq:∀ (y : H.Walk a b), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hvb Walk.nil)⊢ v ∈ (Walk.cons ⋯ (Walk.cons hvb Walk.nil)).support
simp All goals completed! 🐙
· inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.support⊢ v ∈ p.support have hr : (Walk.cons hvb.symm (Walk.cons hva Walk.nil)).IsPath :=
(Walk.IsPath.nil.cons (by β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.support⊢ v ∉ Walk.nil.support inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPath⊢ v ∈ p.support simp [hva.ne] All goals completed! 🐙inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPath⊢ v ∈ p.support)).cons (by β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.support⊢ b ∉ (Walk.cons hva Walk.nil).supportinr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPath⊢ v ∈ p.support simp [hvb.ne', hab.symm] All goals completed! 🐙inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPath⊢ v ∈ p.support)inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPath⊢ v ∈ p.support
obtain ⟨P, -, huniq⟩ := hH.existsUnique_path b a inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPathP:H.Walk b ahuniq:∀ (y : H.Walk b a), (fun p ↦ p.IsPath) y → y = P⊢ v ∈ p.support
have heq : q = Walk.cons hvb.symm (Walk.cons hva Walk.nil) :=
(huniq q hq).trans (huniq _ hr).symm inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPathP:H.Walk b ahuniq:∀ (y : H.Walk b a), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hva Walk.nil)⊢ v ∈ p.support
apply hqs inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPathP:H.Walk b ahuniq:∀ (y : H.Walk b a), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hva Walk.nil)⊢ v ∈ q.support
rw [heq inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPathP:H.Walk b ahuniq:∀ (y : H.Walk b a), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hva Walk.nil)⊢ v ∈ (Walk.cons ⋯ (Walk.cons hva Walk.nil)).support inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPathP:H.Walk b ahuniq:∀ (y : H.Walk b a), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hva Walk.nil)⊢ v ∈ (Walk.cons ⋯ (Walk.cons hva Walk.nil)).support]inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βb:βx:βy:βhva:H.Adj v ahvb:H.Adj v bhab:a ≠ bp:H.Walk x yhp:p.IsPathhap:a ∈ p.supporthbp:b ∈ p.supportq:H.Walk b ahq:q.IsPathhqs:q.support ⊆ p.supporthr:(Walk.cons ⋯ (Walk.cons hva Walk.nil)).IsPathP:H.Walk b ahuniq:∀ (y : H.Walk b a), (fun p ↦ p.IsPath) y → y = Pheq:q = Walk.cons ⋯ (Walk.cons hva Walk.nil)⊢ v ∈ (Walk.cons ⋯ (Walk.cons hva Walk.nil)).support
simp All goals completed! 🐙
If v lies on a path in a tree and a is a path-vertex adjacent to v,
then the edge s(v, a) is an edge of the path: the subpath of p between v
and a is the unique tree path, which is the single edge.
private lemma tree_edge_mem_of_center_mem (hH : H.IsTree)
{v a x y : β} (hva : H.Adj v a)
{p : H.Walk x y} (hp : p.IsPath) (hvp : v ∈ p.support) (hap : a ∈ p.support) :
s(v, a) ∈ p.edges := by β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.support⊢ s(v, a) ∈ p.edges
rcases exists_subpath_between hp hvp hap with ⟨q, hq, -, hqe⟩ | ⟨q, hq, -, hqe⟩ inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk v ahq:q.IsPathhqe:q.edges ⊆ p.edges⊢ s(v, a) ∈ p.edgesinr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edges⊢ s(v, a) ∈ p.edges
· inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk v ahq:q.IsPathhqe:q.edges ⊆ p.edges⊢ s(v, a) ∈ p.edges have heq := tree_isPath_eq_cons_nil hH hva hq inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk v ahq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons hva Walk.nil⊢ s(v, a) ∈ p.edges
apply hqe inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk v ahq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons hva Walk.nil⊢ s(v, a) ∈ q.edges
rw [heq inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk v ahq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons hva Walk.nil⊢ s(v, a) ∈ (Walk.cons hva Walk.nil).edges inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk v ahq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons hva Walk.nil⊢ s(v, a) ∈ (Walk.cons hva Walk.nil).edges] inl β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk v ahq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons hva Walk.nil⊢ s(v, a) ∈ (Walk.cons hva Walk.nil).edges
simp All goals completed! 🐙
· inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edges⊢ s(v, a) ∈ p.edges have heq := tree_isPath_eq_cons_nil hH hva.symm hq inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nil⊢ s(v, a) ∈ p.edges
have hmem : s(a, v) ∈ p.edges := by
apply hqe β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nil⊢ s(a, v) ∈ q.edges inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nilhmem:s(a, v) ∈ p.edges⊢ s(v, a) ∈ p.edges
rw [heq β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nil⊢ s(a, v) ∈ (Walk.cons ⋯ Walk.nil).edges β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nil⊢ s(a, v) ∈ (Walk.cons ⋯ Walk.nil).edgesinr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nilhmem:s(a, v) ∈ p.edges⊢ s(v, a) ∈ p.edges] β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nil⊢ s(a, v) ∈ (Walk.cons ⋯ Walk.nil).edgesinr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nilhmem:s(a, v) ∈ p.edges⊢ s(v, a) ∈ p.edges
simpinr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nilhmem:s(a, v) ∈ p.edges⊢ s(v, a) ∈ p.edgesinr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nilhmem:s(a, v) ∈ p.edges⊢ s(v, a) ∈ p.edges
rwa [Sym2.eq_swap inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nilhmem:s(v, a) ∈ p.edges⊢ s(v, a) ∈ p.edges] inr β:Type u_1H:SimpleGraph βhH:H.IsTreev:βa:βx:βy:βhva:H.Adj v ap:H.Walk x yhp:p.IsPathhvp:v ∈ p.supporthap:a ∈ p.supportq:H.Walk a vhq:q.IsPathhqe:q.edges ⊆ p.edgesheq:q = Walk.cons ⋯ Walk.nilhmem:s(v, a) ∈ p.edges⊢ s(v, a) ∈ p.edges at hmemend PathHelperssection TreePathvariable {α : Type*} {G : SimpleGraph α}
Mapping a path of an induced tree into G and closing it up through an
outside vertex z adjacent to both endpoints produces a cycle of length
p.length + 2, so the girth is at most p.length + 2.
lemma IsTree.girth_le_length_add_two_of_two_adj
{s : Finset α}
(_hT : (G.induce (s : Set α)).IsTree)
{z a b : α}
(hz : z ∉ s) (ha : a ∈ s) (hb : b ∈ s)
(hab : a ≠ b) (hza : G.Adj z a) (hzb : G.Adj z b)
(p : (G.induce (s : Set α)).Walk ⟨a, Finset.mem_coe.mpr ha⟩ ⟨b, Finset.mem_coe.mpr hb⟩)
(hp : p.IsPath) :
G.girth ≤ p.length + 2 := by α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPath⊢ G.girth ≤ p.length + 2
let e : G.induce (s : Set α) ↪g G := SimpleGraph.Embedding.induce _ α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑s⊢ G.girth ≤ p.length + 2
let q : G.Walk a b := p.map e.toHom α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom p⊢ G.girth ≤ p.length + 2
have hq : q.IsPath := by
dsimp [q] α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom p⊢ (Walk.map e.toHom p).IsPath α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPath⊢ G.girth ≤ p.length + 2
exact (Walk.isPath_map_iff_of_injective e.injective).2 hp α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPath⊢ G.girth ≤ p.length + 2 α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPath⊢ G.girth ≤ p.length + 2
have hq_length : q.length = p.length := p.length_map e.toHom α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.length⊢ G.girth ≤ p.length + 2
have hq_s : ∀ w ∈ q.support, w ∈ s := by
intro w hw α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthw:αhw:w ∈ q.support⊢ w ∈ s α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth ≤ p.length + 2
change w ∈ (p.map e.toHom).support at hw α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthw:αhw:w ∈ (Walk.map e.toHom p).support⊢ w ∈ s α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth ≤ p.length + 2
rw [Walk.support_map α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthw:αhw:w ∈ List.map (⇑e.toHom) p.support⊢ w ∈ s α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthw:αhw:w ∈ List.map (⇑e.toHom) p.support⊢ w ∈ s α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth ≤ p.length + 2] at hw α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthw:αhw:w ∈ List.map (⇑e.toHom) p.support⊢ w ∈ s α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth ≤ p.length + 2
obtain ⟨w', hw', rfl⟩ := List.mem_map.mp hw α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthw':↑↑shw':w' ∈ p.supporthw:e.toHom w' ∈ List.map (⇑e.toHom) p.support⊢ e.toHom w' ∈ s α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth ≤ p.length + 2
exact w'.property α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth ≤ p.length + 2 α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ s⊢ G.girth ≤ p.length + 2
have hzq : z ∉ q.support := fun hzmem => hz (hq_s z hzmem) α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.support⊢ G.girth ≤ p.length + 2
let r : G.Walk a z := q.concat hzb.symm α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯⊢ G.girth ≤ p.length + 2
have hr : r.IsPath := hq.concat hzq hzb.symm α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPath⊢ G.girth ≤ p.length + 2
have hclose : s(z, a) ∉ r.edges := by
intro he α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
dsimp [r] at he α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
simp only [Walk.edges_concat, List.concat_eq_append, List.mem_append, List.mem_singleton] at he α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
rcases he with he | he inl α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
· inl α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2 exact hzq (q.fst_mem_support_of_mem_edges he) All goals completed! 🐙 α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
· inr α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2 simp only [Sym2.eq, Sym2.rel_iff', Prod.mk.injEq, Prod.swap_prod_mk] at he inr α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
rcases he with ⟨hzb', haz⟩ | ⟨_, hab'⟩ inr.inl α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathleft✝:Truehab':a = b⊢ False α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
· inr.inl α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2 exact hza.ne haz.symm All goals completed! 🐙 α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
· inr.inr α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_s:∀ w ∈ q.support, w ∈ shzq:z ∉ q.supportr:G.Walk a z := q.concat ⋯hr:r.IsPathleft✝:Truehab':a = b⊢ False α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2 exact hab hab' α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2 α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
let c : G.Walk z z := r.cons hza α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
have hc : c.IsCycle := by
dsimp [c] α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
exact (Walk.cons_isCycle_iff r hza).2 ⟨hr, hclose⟩ α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2 α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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 ≤ p.length + 2
have hclen : c.length = q.length + 2 := by simp [c, r] α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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.IsCyclehclen:c.length = q.length + 2⊢ G.girth ≤ p.length + 2 α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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.IsCyclehclen:c.length = q.length + 2⊢ G.girth ≤ p.length + 2
have hg := G.girth_le_length hc α:Type u_1G:SimpleGraph αs:Finset α_hT:(induce (↑s) G).IsTreez:αa:αb:αhz:z ∉ sha:a ∈ shb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathe:induce (↑s) G ↪g G := Embedding.induce ↑sq:G.Walk a b := Walk.map e.toHom phq:q.IsPathhq_length:q.length = p.lengthhq_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.IsCyclehclen:c.length = q.length + 2hg:G.girth ≤ c.length⊢ G.girth ≤ p.length + 2
omega All goals completed! 🐙
Triangle-free bridge: in a graph of girth at least 4, the
neighborhood of any vertex is an independent set. An edge inside a
neighborhood would close a 3-cycle with the two star edges.
lemma isIndepSet_neighborSet_of_four_le_girth (hg4 : 4 ≤ G.girth) (v : α) :
G.IsIndepSet (G.neighborSet v) := by α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:α⊢ G.IsIndepSet (G.neighborSet v)
intro x hx y hy _ hadj α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x y⊢ False
have hvx : G.Adj v x := hx α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v x⊢ False
have hvy : G.Adj v y := hy α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v y⊢ False
have hxv : x ≠ v := hvx.ne' α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ v⊢ False
have hr : (Walk.cons hadj (Walk.cons hvy.symm Walk.nil)).IsPath :=
(Walk.IsPath.nil.cons (by α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ v⊢ y ∉ Walk.nil.support α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPath⊢ False simp [hvy.ne'] All goals completed! 🐙 α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPath⊢ False)).cons (by α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ v⊢ x ∉ (Walk.cons ⋯ Walk.nil).support α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPath⊢ False simp [hadj.ne, hxv] All goals completed! 🐙 α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPath⊢ False) α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPath⊢ False
have hclose : s(v, x) ∉ (Walk.cons hadj (Walk.cons hvy.symm Walk.nil)).edges := by α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:α⊢ G.IsIndepSet (G.neighborSet v) α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
intro he α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
rw [Walk.edges_cons, α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ s(x, y) :: (Walk.cons ⋯ Walk.nil).edges⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False Walk.edges_cons, α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ s(x, y) :: s(y, v) :: Walk.nil.edges⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False Walk.edges_nil α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False] at he α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
rcases List.mem_cons.mp he with he1 | he2 inl α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he1:s(v, x) = s(x, y)⊢ Falseinr α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
· inl α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he1:s(v, x) = s(x, y)⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False rcases Sym2.eq_iff.mp he1 with ⟨hvx', -⟩ | ⟨hvy', -⟩ inl.inl α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he1:s(v, x) = s(x, y)hvx':v = x⊢ Falseinl.inr α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he1:s(v, x) = s(x, y)hvy':v = y⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
· inl.inl α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he1:s(v, x) = s(x, y)hvx':v = x⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False exact hvx.ne hvx' All goals completed! 🐙 α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
· inl.inr α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he1:s(v, x) = s(x, y)hvy':v = y⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False exact hvy.ne hvy' All goals completed! 🐙 α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
· inr α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False rcases List.mem_cons.mp he2 with he3 | he4 inr.inl α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]he3:s(v, x) = s(y, v)⊢ Falseinr.inr α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]he4:s(v, x) ∈ []⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
· inr.inl α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]he3:s(v, x) = s(y, v)⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False rcases Sym2.eq_iff.mp he3 with ⟨hvy', -⟩ | ⟨-, hxy'⟩ inr.inl.inl α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]he3:s(v, x) = s(y, v)hvy':v = y⊢ Falseinr.inl.inr α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]he3:s(v, x) = s(y, v)hxy':x = y⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
· inr.inl.inl α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]he3:s(v, x) = s(y, v)hvy':v = y⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False exact hvy.ne hvy' All goals completed! 🐙 α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
· inr.inl.inr α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]he3:s(v, x) = s(y, v)hxy':x = y⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False exact hadj.ne hxy' All goals completed! 🐙 α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
· inr.inr α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhe:s(v, x) ∈ [s(x, y), s(y, v)]he2:s(v, x) ∈ [s(y, v)]he4:s(v, x) ∈ []⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False simp at he4 α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edges⊢ False
have hc : ((Walk.cons hadj (Walk.cons hvy.symm Walk.nil)).cons hvx).IsCycle :=
(Walk.cons_isCycle_iff _ hvx).2 ⟨hr, hclose⟩ α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edgeshc:(Walk.cons hvx (Walk.cons hadj (Walk.cons ⋯ Walk.nil))).IsCycle⊢ False
have hg : G.girth ≤ 3 := by α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:α⊢ G.IsIndepSet (G.neighborSet v) α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edgeshc:(Walk.cons hvx (Walk.cons hadj (Walk.cons ⋯ Walk.nil))).IsCyclehg:G.girth ≤ 3⊢ False
have hlen := G.girth_le_length hc α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edgeshc:(Walk.cons hvx (Walk.cons hadj (Walk.cons ⋯ Walk.nil))).IsCyclehlen:G.girth ≤ (Walk.cons hvx (Walk.cons hadj (Walk.cons ⋯ Walk.nil))).length⊢ G.girth ≤ 3 α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edgeshc:(Walk.cons hvx (Walk.cons hadj (Walk.cons ⋯ Walk.nil))).IsCyclehg:G.girth ≤ 3⊢ False
simpa using hlen α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edgeshc:(Walk.cons hvx (Walk.cons hadj (Walk.cons ⋯ Walk.nil))).IsCyclehg:G.girth ≤ 3⊢ False α:Type u_1G:SimpleGraph αhg4:4 ≤ G.girthv:αx:αhx:x ∈ G.neighborSet vy:αhy:y ∈ G.neighborSet va✝:x ≠ yhadj:G.Adj x yhvx:G.Adj v xhvy:G.Adj v yhxv:x ≠ vhr:(Walk.cons hadj (Walk.cons ⋯ Walk.nil)).IsPathhclose:s(v, x) ∉ (Walk.cons hadj (Walk.cons ⋯ Walk.nil)).edgeshc:(Walk.cons hvx (Walk.cons hadj (Walk.cons ⋯ Walk.nil))).IsCyclehg:G.girth ≤ 3⊢ False
omega All goals completed! 🐙end TreePathsection Mainvariable {α : Type*} [Fintype α] [DecidableEq α] {G : SimpleGraph α}
Overlap lemma: on a path p in an induced tree on s, at most 3
vertices lie in the closed neighborhood of a fixed vertex v ∈ s. Here the
path support is read off in α via Subtype.val.
lemma IsTree.card_support_inter_closedNeighborFinset_le_three
[DecidableRel G.Adj] {s : Finset α}
(hT : (G.induce (s : Set α)).IsTree) {v : α} (hv : v ∈ s)
{x y : ↥(s : Set α)} {p : (G.induce (s : Set α)).Walk x y} (hp : p.IsPath) :
((p.support.map Subtype.val).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3 := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPath⊢ ((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3
classical
have hvs : v ∈ (s : Set α) := Finset.mem_coe.mpr hv α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑s⊢ ((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3
set W : Finset α := (p.support.map Subtype.val).toFinset with hW α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinset⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have hmemW : ∀ u : α, u ∈ W ↔ ∃ û : ↥(s : Set α), û ∈ p.support ∧ (û : α) = u := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPath⊢ ((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = u⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
intro u α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsetu:α⊢ u ∈ W ↔ ∃ û ∈ p.support, ↑û = u α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = u⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
simp [hW] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = u⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = u⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have hadj_of_mem : ∀ (û : ↥(s : Set α)) (u : α), (û : α) = u → u ∈ G.neighborFinset v →
(G.induce (s : Set α)).Adj ⟨v, hvs⟩ û := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPath⊢ ((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
intro û u hûu hu α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uû:↑↑su:αhûu:↑û = uhu:u ∈ G.neighborFinset v⊢ (induce (↑s) G).Adj ⟨v, hvs⟩ û α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
rw [induce_adj α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uû:↑↑su:αhûu:↑û = uhu:u ∈ G.neighborFinset v⊢ G.Adj ↑⟨v, hvs⟩ ↑û α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uû:↑↑su:αhûu:↑û = uhu:u ∈ G.neighborFinset v⊢ G.Adj ↑⟨v, hvs⟩ ↑û α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uû:↑↑su:αhûu:↑û = uhu:u ∈ G.neighborFinset v⊢ G.Adj ↑⟨v, hvs⟩ ↑û α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
show G.Adj v (û : α) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uû:↑↑su:αhûu:↑û = uhu:u ∈ G.neighborFinset v⊢ G.Adj v ↑û α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
rw [hûu α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uû:↑↑su:αhûu:↑û = uhu:u ∈ G.neighborFinset v⊢ G.Adj v u α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uû:↑↑su:αhûu:↑û = uhu:u ∈ G.neighborFinset v⊢ G.Adj v u α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uû:↑↑su:αhûu:↑û = uhu:u ∈ G.neighborFinset v⊢ G.Adj v u α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
exact (G.mem_neighborFinset v u).mp hu α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ û⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have hinter : (W ∩ G.neighborFinset v).card ≤ 2 := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPath⊢ ((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
by_cases hvW : v ∈ W pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ W⊢ (W ∩ G.neighborFinset v).card ≤ 2neg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ W⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
· pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ W⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 -- `v` lies on the path: each neighbor of `v` on the path yields an edge of
-- `p` at `v`, and a path has at most two edges at a fixed vertex.
have hv'p : (⟨v, hvs⟩ : ↥(s : Set α)) ∈ p.support := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPath⊢ ((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3 pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.support⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
obtain ⟨û, hûp, hûv⟩ := (hmemW v).mp hvW α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Wû:↑↑shûp:û ∈ p.supporthûv:↑û = v⊢ ⟨v, hvs⟩ ∈ p.supportpos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.support⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have hûeq : û = (⟨v, hvs⟩ : ↥(s : Set α)) := Subtype.ext hûv α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Wû:↑↑shûp:û ∈ p.supporthûv:↑û = vhûeq:û = ⟨v, hvs⟩⊢ ⟨v, hvs⟩ ∈ p.supportpos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.support⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
rwa [hûeq α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Wû:↑↑shûp:⟨v, hvs⟩ ∈ p.supporthûv:↑û = vhûeq:û = ⟨v, hvs⟩⊢ ⟨v, hvs⟩ ∈ p.supportpos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.support⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Wû:↑↑shûp:⟨v, hvs⟩ ∈ p.supporthûv:↑û = vhûeq:û = ⟨v, hvs⟩⊢ ⟨v, hvs⟩ ∈ p.supportpos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.support⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 at hûppos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.support⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
by_contra hgt pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:¬(W ∩ G.neighborFinset v).card ≤ 2⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
push Not at hgt pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).card⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
obtain ⟨u₁, u₂, u₃, h1, h2, h3, h12, h13, h23⟩ := Finset.two_lt_card_iff.mp hgt pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
obtain ⟨û₁, hû₁p, hû₁⟩ := (hmemW u₁).mp (Finset.mem_inter.mp h1).1 pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
obtain ⟨û₂, hû₂p, hû₂⟩ := (hmemW u₂).mp (Finset.mem_inter.mp h2).1 pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
obtain ⟨û₃, hû₃p, hû₃⟩ := (hmemW u₃).mp (Finset.mem_inter.mp h3).1 pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have e₁ := tree_edge_mem_of_center_mem hT
(hadj_of_mem û₁ u₁ hû₁ (Finset.mem_inter.mp h1).2) hp hv'p hû₁p pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edges⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have e₂ := tree_edge_mem_of_center_mem hT
(hadj_of_mem û₂ u₂ hû₂ (Finset.mem_inter.mp h2).2) hp hv'p hû₂p pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edges⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have e₃ := tree_edge_mem_of_center_mem hT
(hadj_of_mem û₃ u₃ hû₃ (Finset.mem_inter.mp h3).2) hp hv'p hû₃p pos α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edges⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
rcases path_incident_edges_le_two hp e₁ e₂ e₃ with h | h | h pos.inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₂⊢ Falsepos.inr.inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₃⊢ Falsepos.inr.inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₂ = û₃⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
· pos.inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₂⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 exact h12 (by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₂⊢ u₁ = u₂ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 rw [← hû₁, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₂⊢ ↑û₁ = u₂ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 ← hû₂, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₂⊢ ↑û₁ = ↑û₂ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 h α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₂⊢ ↑û₂ = ↑û₂ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3)
· pos.inr.inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₃⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 exact h13 (by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₃⊢ u₁ = u₃ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 rw [← hû₁, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₃⊢ ↑û₁ = u₃ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 ← hû₃, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₃⊢ ↑û₁ = ↑û₃ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 h α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₁ = û₃⊢ ↑û₃ = ↑û₃ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3)
· pos.inr.inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₂ = û₃⊢ False α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 exact h23 (by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₂ = û₃⊢ u₂ = u₃ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 rw [← hû₂, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₂ = û₃⊢ ↑û₂ = u₃ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 ← hû₃, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₂ = û₃⊢ ↑û₂ = ↑û₃ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 h α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∈ Whv'p:⟨v, hvs⟩ ∈ p.supporthgt:2 < (W ∩ G.neighborFinset v).cardu₁:αu₂:αu₃:αh1:u₁ ∈ W ∩ G.neighborFinset vh2:u₂ ∈ W ∩ G.neighborFinset vh3:u₃ ∈ W ∩ G.neighborFinset vh12:u₁ ≠ u₂h13:u₁ ≠ u₃h23:u₂ ≠ u₃û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂û₃:↑↑shû₃p:û₃ ∈ p.supporthû₃:↑û₃ = u₃e₁:s(⟨v, hvs⟩, û₁) ∈ p.edgese₂:s(⟨v, hvs⟩, û₂) ∈ p.edgese₃:s(⟨v, hvs⟩, û₃) ∈ p.edgesh:û₂ = û₃⊢ ↑û₃ = ↑û₃ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3)
· neg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ W⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 -- `v` off the path: two distinct neighbors of `v` on the path would force
-- `v` onto the path via the unique two-edge tree path through `v`.
have hone : (W ∩ G.neighborFinset v).card ≤ 1 := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPath⊢ ((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3 neg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
rw [Finset.card_le_one α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ W⊢ ∀ a ∈ W ∩ G.neighborFinset v, ∀ b ∈ W ∩ G.neighborFinset v, a = b α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ W⊢ ∀ a ∈ W ∩ G.neighborFinset v, ∀ b ∈ W ∩ G.neighborFinset v, a = bneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ W⊢ ∀ a ∈ W ∩ G.neighborFinset v, ∀ b ∈ W ∩ G.neighborFinset v, a = bneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
intro u₁ hu₁ u₂ hu₂ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset v⊢ u₁ = u₂neg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
by_contra hne α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
obtain ⟨û₁, hû₁p, hû₁⟩ := (hmemW u₁).mp (Finset.mem_inter.mp hu₁).1 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
obtain ⟨û₂, hû₂p, hû₂⟩ := (hmemW u₂).mp (Finset.mem_inter.mp hu₂).1 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have hne' : û₁ ≠ û₂ := fun h => hne (by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂h:û₁ = û₂⊢ u₁ = u₂ α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂hne':û₁ ≠ û₂⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 rw [← hû₁, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂h:û₁ = û₂⊢ ↑û₁ = u₂ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂hne':û₁ ≠ û₂⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 ← hû₂, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂h:û₁ = û₂⊢ ↑û₁ = ↑û₂ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂hne':û₁ ≠ û₂⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 h α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂h:û₁ = û₂⊢ ↑û₂ = ↑û₂ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂hne':û₁ ≠ û₂⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂hne':û₁ ≠ û₂⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂hne':û₁ ≠ û₂⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have hv'p := tree_center_mem_support hT
(hadj_of_mem û₁ u₁ hû₁ (Finset.mem_inter.mp hu₁).2)
(hadj_of_mem û₂ u₂ hû₂ (Finset.mem_inter.mp hu₂).2)
hne' hp hû₁p hû₂p α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Wu₁:αhu₁:u₁ ∈ W ∩ G.neighborFinset vu₂:αhu₂:u₂ ∈ W ∩ G.neighborFinset vhne:¬u₁ = u₂û₁:↑↑shû₁p:û₁ ∈ p.supporthû₁:↑û₁ = u₁û₂:↑↑shû₂p:û₂ ∈ p.supporthû₂:↑û₂ = u₂hne':û₁ ≠ û₂hv'p:⟨v, hvs⟩ ∈ p.support⊢ Falseneg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
exact hvW ((hmemW v).mpr ⟨⟨v, hvs⟩, hv'p, rfl⟩)neg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3neg α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhvW:v ∉ Whone:(W ∩ G.neighborFinset v).card ≤ 1⊢ (W ∩ G.neighborFinset v).card ≤ 2 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
omega α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
have hsub : W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v) := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPath⊢ ((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
intro u hu α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2u:αhu:u ∈ W ∩ insert v (G.neighborFinset v)⊢ u ∈ insert v (W ∩ G.neighborFinset v) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
rw [Finset.mem_inter, α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2u:αhu:u ∈ W ∧ u ∈ insert v (G.neighborFinset v)⊢ u ∈ insert v (W ∩ G.neighborFinset v) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2u:αhu:u ∈ W ∧ (u = v ∨ u ∈ G.neighborFinset v)⊢ u ∈ insert v (W ∩ G.neighborFinset v) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 Finset.mem_insert α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2u:αhu:u ∈ W ∧ (u = v ∨ u ∈ G.neighborFinset v)⊢ u ∈ insert v (W ∩ G.neighborFinset v) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2u:αhu:u ∈ W ∧ (u = v ∨ u ∈ G.neighborFinset v)⊢ u ∈ insert v (W ∩ G.neighborFinset v) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3] at hu α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2u:αhu:u ∈ W ∧ (u = v ∨ u ∈ G.neighborFinset v)⊢ u ∈ insert v (W ∩ G.neighborFinset v) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
rcases hu.2 with rfl | huN inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uu:αhv:u ∈ shvs:u ∈ ↑shadj_of_mem:∀ (û : ↑↑s) (u_1 : α), ↑û = u_1 → u_1 ∈ G.neighborFinset u → (induce (↑s) G).Adj ⟨u, hvs⟩ ûhinter:(W ∩ G.neighborFinset u).card ≤ 2hu:u ∈ W ∧ (u = u ∨ u ∈ G.neighborFinset u)⊢ u ∈ insert u (W ∩ G.neighborFinset u)inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2u:αhu:u ∈ W ∧ (u = v ∨ u ∈ G.neighborFinset v)huN:u ∈ G.neighborFinset v⊢ u ∈ insert v (W ∩ G.neighborFinset v) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
· inl α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreex:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uu:αhv:u ∈ shvs:u ∈ ↑shadj_of_mem:∀ (û : ↑↑s) (u_1 : α), ↑û = u_1 → u_1 ∈ G.neighborFinset u → (induce (↑s) G).Adj ⟨u, hvs⟩ ûhinter:(W ∩ G.neighborFinset u).card ≤ 2hu:u ∈ W ∧ (u = u ∨ u ∈ G.neighborFinset u)⊢ u ∈ insert u (W ∩ G.neighborFinset u) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 exact Finset.mem_insert_self _ _ All goals completed! 🐙 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
· inr α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2u:αhu:u ∈ W ∧ (u = v ∨ u ∈ G.neighborFinset v)huN:u ∈ G.neighborFinset v⊢ u ∈ insert v (W ∩ G.neighborFinset v) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 exact Finset.mem_insert_of_mem (Finset.mem_inter.mpr ⟨hu.1, huN⟩) α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3 α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ insert v (G.neighborFinset v)).card ≤ 3
calc (W ∩ insert v (G.neighborFinset v)).card
≤ (insert v (W ∩ G.neighborFinset v)).card := Finset.card_le_card hsub
_ ≤ (W ∩ G.neighborFinset v).card + 1 := Finset.card_insert_le _ _
_ ≤ 3 := by α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αG:SimpleGraph αinst✝:DecidableRel G.Adjs:Finset αhT:(induce (↑s) G).IsTreev:αhv:v ∈ sx:↑↑sy:↑↑sp:(induce (↑s) G).Walk x yhp:p.IsPathhvs:v ∈ ↑sW:Finset α := (List.map Subtype.val p.support).toFinsethW:W = (List.map Subtype.val p.support).toFinsethmemW:∀ (u : α), u ∈ W ↔ ∃ û ∈ p.support, ↑û = uhadj_of_mem:∀ (û : ↑↑s) (u : α), ↑û = u → u ∈ G.neighborFinset v → (induce (↑s) G).Adj ⟨v, hvs⟩ ûhinter:(W ∩ G.neighborFinset v).card ≤ 2hsub:W ∩ insert v (G.neighborFinset v) ⊆ insert v (W ∩ G.neighborFinset v)⊢ (W ∩ G.neighborFinset v).card + 1 ≤ 3 omega All goals completed! 🐙omit [Fintype α] in
Extract an explicit independent neighbour set witnessing indepNeighborsCard.
lemma exists_indepSet_finset_neighbors (G : SimpleGraph α) (v : α) :
∃ S : Finset α, (∀ s ∈ S, G.Adj v s) ∧ G.IsIndepSet (S : Set α) ∧
S.card = indepNeighborsCard G v := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:α⊢ ∃ S, (∀ s ∈ S, G.Adj v s) ∧ G.IsIndepSet ↑S ∧ S.card = G.indepNeighborsCard v
classical
obtain ⟨s, hs⟩ := (G.induce (G.neighborSet v)).exists_isNIndepSet_indepNum α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ ∃ S, (∀ s ∈ S, G.Adj v s) ∧ G.IsIndepSet ↑S ∧ S.card = G.indepNeighborsCard v
refine ⟨s.image Subtype.val, ?_, ?_, ?_⟩ refine_1 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ ∀ s_1 ∈ Finset.image Subtype.val s, G.Adj v s_1refine_2 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ G.IsIndepSet ↑(Finset.image Subtype.val s)refine_3 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ (Finset.image Subtype.val s).card = G.indepNeighborsCard v
· refine_1 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ ∀ s_1 ∈ Finset.image Subtype.val s, G.Adj v s_1 intro x hx refine_1 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum sx:αhx:x ∈ Finset.image Subtype.val s⊢ G.Adj v x
obtain ⟨y, _, rfl⟩ := Finset.mem_image.mp hx refine_1 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum sy:{ x // x ∈ G.neighborSet v }left✝:y ∈ shx:↑y ∈ Finset.image Subtype.val s⊢ G.Adj v ↑y
exact y.property All goals completed! 🐙
· refine_2 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ G.IsIndepSet ↑(Finset.image Subtype.val s) intro x hx y hy hxy refine_2 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum sx:αhx:x ∈ ↑(Finset.image Subtype.val s)y:αhy:y ∈ ↑(Finset.image Subtype.val s)hxy:x ≠ y⊢ ¬G.Adj x y
obtain ⟨x', hx', rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp hx) refine_2 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum sy:αhy:y ∈ ↑(Finset.image Subtype.val s)x':{ x // x ∈ G.neighborSet v }hx':x' ∈ shx:↑x' ∈ ↑(Finset.image Subtype.val s)hxy:↑x' ≠ y⊢ ¬G.Adj (↑x') y
obtain ⟨y', hy', rfl⟩ := Finset.mem_image.mp (Finset.mem_coe.mp hy) refine_2 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum sx':{ x // x ∈ G.neighborSet v }hx':x' ∈ shx:↑x' ∈ ↑(Finset.image Subtype.val s)y':{ x // x ∈ G.neighborSet v }hy':y' ∈ shy:↑y' ∈ ↑(Finset.image Subtype.val s)hxy:↑x' ≠ ↑y'⊢ ¬G.Adj ↑x' ↑y'
exact hs.1 hx' hy' (fun h => hxy (congrArg Subtype.val h)) All goals completed! 🐙
· refine_3 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ (Finset.image Subtype.val s).card = G.indepNeighborsCard v rw [Finset.card_image_of_injective _ Subtype.val_injective refine_3 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ s.card = G.indepNeighborsCard v refine_3 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ s.card = G.indepNeighborsCard v] refine_3 α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ s.card = G.indepNeighborsCard v
exact hs.2 All goals completed! 🐙omit [Fintype α] inA vertex together with an independent set of its neighbours induces a star, hence a tree.
lemma isTree_induce_insert_indepSet_neighbors (v : α) (S : Finset α) :
(∀ s ∈ S, G.Adj v s) → G.IsIndepSet (S : Set α) →
(G.induce ((insert v S : Finset α) : Set α)).IsTree := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αS:Finset α⊢ (∀ s ∈ S, G.Adj v s) → G.IsIndepSet ↑S → (induce (↑(insert v S)) G).IsTree
classical
induction S using Finset.induction_on with
| empty => empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:α⊢ (∀ s ∈ ∅, G.Adj v s) → G.IsIndepSet ↑∅ → (induce (↑(insert v ∅)) G).IsTree
intro _ _ empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅⊢ (induce (↑(insert v ∅)) G).IsTree
have hset : ((insert v (∅ : Finset α) : Finset α) : Set α) = {v} := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αS:Finset α⊢ (∀ s ∈ S, G.Adj v s) → G.IsIndepSet ↑S → (induce (↑(insert v S)) G).IsTree empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}⊢ (induce (↑(insert v ∅)) G).IsTree simp empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}⊢ (induce (↑(insert v ∅)) G).IsTreeempty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}⊢ (induce (↑(insert v ∅)) G).IsTree
rw [hset empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}⊢ (induce {v} G).IsTree empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}⊢ (induce {v} G).IsTree]empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}⊢ (induce {v} G).IsTree
let : Nonempty ↥({v} : Set α) := ⟨⟨v, by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}⊢ v ∈ {v} empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···⊢ (induce {v} G).IsTree simp All goals completed! 🐙empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···⊢ (induce {v} G).IsTree⟩⟩empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···⊢ (induce {v} G).IsTree
let : Subsingleton ↥({v} : Set α) := ⟨fun a b => by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}⊢ a = b empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree
apply Subtype.ext α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}⊢ ↑a = ↑bempty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree
have ha : (a : α) = v := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}⊢ a = b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}ha:↑a = v⊢ ↑a = ↑bempty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree simpa only [Set.mem_singleton_iff] using a.property α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}ha:↑a = v⊢ ↑a = ↑bempty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}ha:↑a = v⊢ ↑a = ↑bempty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree
have hb : (b : α) = v := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}⊢ a = b α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}ha:↑a = vhb:↑b = v⊢ ↑a = ↑bempty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree simpa only [Set.mem_singleton_iff] using b.property α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}ha:↑a = vhb:↑b = v⊢ ↑a = ↑bempty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this:Nonempty ↑{v} := ···a:↑{v}b:↑{v}ha:↑a = vhb:↑b = v⊢ ↑a = ↑bempty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree
exact ha.trans hb.symm All goals completed! 🐙empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree⟩empty α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αa✝¹:∀ s ∈ ∅, G.Adj v sa✝:G.IsIndepSet ↑∅hset:↑(insert v ∅) = {v}this✝:Nonempty ↑{v} := ···this:Subsingleton ↑{v} := ···⊢ (induce {v} G).IsTree
exact IsTree.of_subsingleton All goals completed! 🐙
| @insert s S₀ hs ih => insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTree⊢ (∀ s_1 ∈ insert s S₀, G.Adj v s_1) → G.IsIndepSet ↑(insert s S₀) → (induce (↑(insert v (insert s S₀))) G).IsTree
intro hadj hind insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hadj₀ : ∀ x ∈ S₀, G.Adj v x := fun x hx =>
hadj x (Finset.mem_insert_of_mem hx) insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v x⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hind₀ : G.IsIndepSet (S₀ : Set α) :=
hind.mono (Finset.coe_subset.mpr (Finset.subset_insert s S₀)) insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hT := ih hadj₀ hind₀ insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTree⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hsv : s ≠ v := (hadj s (Finset.mem_insert_self s S₀)).ne' insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hzs : s ∉ insert v S₀ := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αS:Finset α⊢ (∀ s ∈ S, G.Adj v s) → G.IsIndepSet ↑S → (induce (↑(insert v S)) G).IsTree insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
simp only [Finset.mem_insert, not_or] α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ v⊢ ¬s = v ∧ s ∉ S₀insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
exact ⟨hsv, hs⟩insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀⊢ (induce (↑(insert v (insert s S₀))) G).IsTreeinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hza : G.Adj s v := (hadj s (Finset.mem_insert_self s S₀)).symm insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have huniq : ∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αS:Finset α⊢ (∀ s ∈ S, G.Adj v s) → G.IsIndepSet ↑S → (induce (↑(insert v S)) G).IsTree insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
intro b hb hsb α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s b⊢ b = vinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
rcases Finset.mem_insert.mp hb with rfl | hbS₀ inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:αS₀:Finset αhs:s ∉ S₀hind:G.IsIndepSet ↑(insert s S₀)hind₀:G.IsIndepSet ↑S₀b:αhsb:G.Adj s bih:(∀ s ∈ S₀, G.Adj b s) → G.IsIndepSet ↑S₀ → (induce (↑(insert b S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj b s_1hadj₀:∀ x ∈ S₀, G.Adj b xhT:(induce (↑(insert b S₀)) G).IsTreehsv:s ≠ bhzs:s ∉ insert b S₀hza:G.Adj s bhb:b ∈ insert b S₀⊢ b = binr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀⊢ b = vinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
· inl α:Type u_1inst✝:DecidableEq αG:SimpleGraph αs:αS₀:Finset αhs:s ∉ S₀hind:G.IsIndepSet ↑(insert s S₀)hind₀:G.IsIndepSet ↑S₀b:αhsb:G.Adj s bih:(∀ s ∈ S₀, G.Adj b s) → G.IsIndepSet ↑S₀ → (induce (↑(insert b S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj b s_1hadj₀:∀ x ∈ S₀, G.Adj b xhT:(induce (↑(insert b S₀)) G).IsTreehsv:s ≠ bhzs:s ∉ insert b S₀hza:G.Adj s bhb:b ∈ insert b S₀⊢ b = binsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree rfl All goals completed! 🐙insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
· inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀⊢ b = vinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree exfalso inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hsS : s ∈ ((insert s S₀ : Finset α) : Set α) := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αS:Finset α⊢ (∀ s ∈ S, G.Adj v s) → G.IsIndepSet ↑S → (induce (↑(insert v S)) G).IsTree inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree simpinr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTreeinr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hbS : b ∈ ((insert s S₀ : Finset α) : Set α) := by α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αS:Finset α⊢ (∀ s ∈ S, G.Adj v s) → G.IsIndepSet ↑S → (induce (↑(insert v S)) G).IsTree inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)hbS:b ∈ ↑(insert s S₀)⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
simp only [Finset.coe_insert, Set.mem_insert_iff, Finset.mem_coe] α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)⊢ b = s ∨ b ∈ S₀inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)hbS:b ∈ ↑(insert s S₀)⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
exact Or.inr hbS₀inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)hbS:b ∈ ↑(insert s S₀)⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTreeinr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)hbS:b ∈ ↑(insert s S₀)⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hne : s ≠ b := fun h => hs (h ▸ hbS₀) inr α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vb:αhb:b ∈ insert v S₀hsb:G.Adj s bhbS₀:b ∈ S₀hsS:s ∈ ↑(insert s S₀)hbS:b ∈ ↑(insert s S₀)hne:s ≠ b⊢ Falseinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
exact hind hsS hbS hne hsbinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTreeinsert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = v⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hT' := hT.induce_insert_of_unique_adj hzs (Finset.mem_insert_self v S₀) hza huniq insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = vhT':(induce (↑(insert s (insert v S₀))) G).IsTree⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
have hcomm : (insert v (insert s S₀) : Finset α) = insert s (insert v S₀) :=
Finset.insert_comm v s S₀ insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = vhT':(induce (↑(insert s (insert v S₀))) G).IsTreehcomm:insert v (insert s S₀) = insert s (insert v S₀)⊢ (induce (↑(insert v (insert s S₀))) G).IsTree
rw [hcomm insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = vhT':(induce (↑(insert s (insert v S₀))) G).IsTreehcomm:insert v (insert s S₀) = insert s (insert v S₀)⊢ (induce (↑(insert s (insert v S₀))) G).IsTree insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = vhT':(induce (↑(insert s (insert v S₀))) G).IsTreehcomm:insert v (insert s S₀) = insert s (insert v S₀)⊢ (induce (↑(insert s (insert v S₀))) G).IsTree]insert α:Type u_1inst✝:DecidableEq αG:SimpleGraph αv:αs:αS₀:Finset αhs:s ∉ S₀ih:(∀ s ∈ S₀, G.Adj v s) → G.IsIndepSet ↑S₀ → (induce (↑(insert v S₀)) G).IsTreehadj:∀ s_1 ∈ insert s S₀, G.Adj v s_1hind:G.IsIndepSet ↑(insert s S₀)hadj₀:∀ x ∈ S₀, G.Adj v xhind₀:G.IsIndepSet ↑S₀hT:(induce (↑(insert v S₀)) G).IsTreehsv:s ≠ vhzs:s ∉ insert v S₀hza:G.Adj s vhuniq:∀ ⦃b : α⦄, b ∈ insert v S₀ → G.Adj s b → b = vhT':(induce (↑(insert s (insert v S₀))) G).IsTreehcomm:insert v (insert s S₀) = insert s (insert v S₀)⊢ (induce (↑(insert s (insert v S₀))) G).IsTree
exact hT' All goals completed! 🐙
The star bound: indepNeighborsCard G v + 1 ≤ largestInducedTreeSize G.
lemma indepNeighborsCard_add_one_le_largestInducedTreeSize (G : SimpleGraph α) (v : α) :
indepNeighborsCard G v + 1 ≤ largestInducedTreeSize G := by α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αv:α⊢ G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize
classical
obtain ⟨S, hadj, hind, hcard⟩ := exists_indepSet_finset_neighbors G v α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αv:αS:Finset αhadj:∀ s ∈ S, G.Adj v shind:G.IsIndepSet ↑Shcard:S.card = G.indepNeighborsCard v⊢ G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize
have hvS : v ∉ S := fun hv => G.irrefl (hadj v hv) α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αv:αS:Finset αhadj:∀ s ∈ S, G.Adj v shind:G.IsIndepSet ↑Shcard:S.card = G.indepNeighborsCard vhvS:v ∉ S⊢ G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize
have hT := isTree_induce_insert_indepSet_neighbors v S hadj hind α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αv:αS:Finset αhadj:∀ s ∈ S, G.Adj v shind:G.IsIndepSet ↑Shcard:S.card = G.indepNeighborsCard vhvS:v ∉ ShT:(induce (↑(insert v S)) G).IsTree⊢ G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize
have hbound := card_le_largestInducedTreeSize hT α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αv:αS:Finset αhadj:∀ s ∈ S, G.Adj v shind:G.IsIndepSet ↑Shcard:S.card = G.indepNeighborsCard vhvS:v ∉ ShT:(induce (↑(insert v S)) G).IsTreehbound:(insert v S).card ≤ G.largestInducedTreeSize⊢ G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize
rwa [Finset.card_insert_of_notMem hvS, α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αv:αS:Finset αhadj:∀ s ∈ S, G.Adj v shind:G.IsIndepSet ↑Shcard:S.card = G.indepNeighborsCard vhvS:v ∉ ShT:(induce (↑(insert v S)) G).IsTreehbound:S.card + 1 ≤ G.largestInducedTreeSize⊢ G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize hcard α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αv:αS:Finset αhadj:∀ s ∈ S, G.Adj v shind:G.IsIndepSet ↑Shcard:S.card = G.indepNeighborsCard vhvS:v ∉ ShT:(induce (↑(insert v S)) G).IsTreehbound:G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize⊢ G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize] α:Type u_1inst✝¹:Fintype αinst✝:DecidableEq αG:SimpleGraph αv:αS:Finset αhadj:∀ s ∈ S, G.Adj v shind:G.IsIndepSet ↑Shcard:S.card = G.indepNeighborsCard vhvS:v ∉ ShT:(induce (↑(insert v S)) G).IsTreehbound:G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize⊢ G.indepNeighborsCard v + 1 ≤ G.largestInducedTreeSize at hboundomit [DecidableEq α] inThe independence number of a neighbourhood is at most the degree.
lemma indepNeighborsCard_le_degree (G : SimpleGraph α) [DecidableRel G.Adj] (v : α) :
indepNeighborsCard G v ≤ G.degree v := by α:Type u_1inst✝¹:Fintype αG:SimpleGraph αinst✝:DecidableRel G.Adjv:α⊢ G.indepNeighborsCard v ≤ G.degree v
classical
obtain ⟨s, hs⟩ := (G.induce (G.neighborSet v)).exists_isNIndepSet_indepNum α:Type u_1inst✝¹:Fintype αG:SimpleGraph αinst✝:DecidableRel G.Adjv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ G.indepNeighborsCard v ≤ G.degree v
calc indepNeighborsCard G v = s.card := hs.2.symm
_ ≤ Fintype.card (G.neighborSet v) := Finset.card_le_univ s
_ = G.degree v := by α:Type u_1inst✝¹:Fintype αG:SimpleGraph αinst✝:DecidableRel G.Adjv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ Fintype.card ↑(G.neighborSet v) = G.degree v
rw [← G.card_neighborSet_eq_degree α:Type u_1inst✝¹:Fintype αG:SimpleGraph αinst✝:DecidableRel G.Adjv:αs:Finset ↑(G.neighborSet v)hs:(induce (G.neighborSet v) G).IsNIndepSet (induce (G.neighborSet v) G).indepNum s⊢ Fintype.card ↑(G.neighborSet v) = Fintype.card ↑(G.neighborSet v) All goals completed! 🐙] All goals completed! 🐙
Main counting theorem: in a connected graph with a cycle and girth at
least 4, Δ(G) + girth(G) ≤ largestInducedTreeSize G + 3.
Proof: grow a maximum induced tree s through the closed neighborhood of a
maximum-degree vertex v; a boundary vertex z of s has two neighbors
a ≠ b in s, and the tree path from a to b closes through z into a
cycle, so it has at least girth − 2 edges; the path meets the closed
neighborhood of v in at most 3 vertices, so inclusion–exclusion inside s
gives the bound.
theorem maxDegree_add_girth_le_largestInducedTreeSize_add_three
(G : SimpleGraph α) [DecidableRel G.Adj] [Nontrivial α] (hG : G.Connected)
(hcyc : ¬ G.IsAcyclic) (hg4 : 4 ≤ G.girth) :
G.maxDegree + G.girth ≤ largestInducedTreeSize G + 3 := by α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girth⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
classical
obtain ⟨v, hvdeg⟩ := G.exists_maximal_degree_vertex α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree v⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hadjS : ∀ u ∈ G.neighborFinset v, G.Adj v u := fun u hu =>
(G.mem_neighborFinset v u).mp hu α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v u⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hind : G.IsIndepSet ((G.neighborFinset v : Finset α) : Set α) := by
rw [coe_neighborFinset α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v u⊢ G.IsIndepSet (G.neighborSet v) α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v u⊢ G.IsIndepSet (G.neighborSet v) α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3] α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v u⊢ G.IsIndepSet (G.neighborSet v) α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
exact isIndepSet_neighborSet_of_four_le_girth hg4 v α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hT0 := isTree_induce_insert_indepSet_neighbors v (G.neighborFinset v) hadjS hind α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTree⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
obtain ⟨s, hrs, hT, hmax⟩ := exists_maximum_induced_tree_containing G
(insert v (G.neighborFinset v))
⟨insert v (G.neighborFinset v), Finset.Subset.refl _, hT0⟩ α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.card⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hvs : v ∈ s := hrs (Finset.mem_insert_self v _) α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ s⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hsne : s.Nonempty := ⟨v, hvs⟩ α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonempty⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hsu : s ≠ Finset.univ := by
intro hsu α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s = Finset.univ⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
subst s α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonempty⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hset : (↑(Finset.univ : Finset α) : Set α) = Set.univ := by α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girth⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
ext w α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyw:α⊢ w ∈ ↑Finset.univ ↔ w ∈ Set.univ α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
simp α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce (↑Finset.univ) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
rw [hset α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3] at hT α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univ⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hTuniv : (G.induce Set.univ).IsTree := hT α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne:Finset.univ.Nonemptyhset:↑Finset.univ = Set.univhTuniv:(induce Set.univ G).IsTree⊢ False α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hGtree : G.IsTree := (induceUnivIso G).isTree_iff.mp hTuniv α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTreehrs:insert v (G.neighborFinset v) ⊆ Finset.univhT:(induce Set.univ G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ Finset.univ.cardhvs:v ∈ Finset.univhsne: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.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
exact hcyc hGtree.isAcyclic α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univ⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
obtain ⟨z, hz, a, ha, b, hb, hab, hza, hzb⟩ :=
exists_two_adj_of_maximum_induced_tree_containing hG hrs hsne hT hmax hsu α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne: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.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
obtain ⟨p, hp, -⟩ :=
hT.existsUnique_path ⟨a, Finset.mem_coe.mpr ha⟩ ⟨b, Finset.mem_coe.mpr hb⟩ α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPath⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hgirth : G.girth ≤ p.length + 2 :=
hT.girth_le_length_add_two_of_two_adj hz ha hb hab hza hzb p hp α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hoverlap := hT.card_support_inter_closedNeighborFinset_le_three hvs hp α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hWcard : (p.support.map Subtype.val).toFinset.card = p.length + 1 := by
rw [List.toFinset_card_of_nodup (hp.support_nodup.map Subtype.val_injective), α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3⊢ (List.map Subtype.val p.support).length = p.length + 1 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
List.length_map, α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3⊢ p.support.length = p.length + 1 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 Walk.length_support α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3⊢ p.length + 1 = p.length + 1 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3] α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hr0card : (insert v (G.neighborFinset v)).card = G.maxDegree + 1 := by
rw [Finset.card_insert_of_notMem (G.notMem_neighborFinset_self v), α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1⊢ (G.neighborFinset v).card + 1 = G.maxDegree + 1 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
card_neighborFinset_eq_degree, α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1⊢ G.degree v + 1 = G.maxDegree + 1 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 ← hvdeg α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1⊢ G.maxDegree + 1 = G.maxDegree + 1 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3] α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hWsub : (p.support.map Subtype.val).toFinset ⊆ s := by
intro u hu α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1u:αhu:u ∈ (List.map Subtype.val p.support).toFinset⊢ u ∈ s α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ s⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
rw [List.mem_toFinset α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1u:αhu:u ∈ List.map Subtype.val p.support⊢ u ∈ s α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1u:αhu:u ∈ List.map Subtype.val p.support⊢ u ∈ s α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ s⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3] at hu α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1u:αhu:u ∈ List.map Subtype.val p.support⊢ u ∈ s α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ s⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
obtain ⟨û, hûp, rfl⟩ := List.mem_map.mp hu α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1û:{ x // x ∈ ↑s }hûp:û ∈ p.supporthu:↑û ∈ List.map Subtype.val p.support⊢ ↑û ∈ s α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ s⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
exact Finset.mem_coe.mp û.property α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ s⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3 α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ s⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hie := Finset.card_union_add_card_inter
(p.support.map Subtype.val).toFinset (insert v (G.neighborFinset v)) α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ shie:((List.map Subtype.val p.support).toFinset ∪ insert v (G.neighborFinset v)).card +
((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card =
(List.map Subtype.val p.support).toFinset.card + (insert v (G.neighborFinset v)).card⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hle : ((p.support.map Subtype.val).toFinset ∪ insert v (G.neighborFinset v)).card ≤
s.card := Finset.card_le_card (Finset.union_subset hWsub hrs) α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ shie:((List.map Subtype.val p.support).toFinset ∪ insert v (G.neighborFinset v)).card +
((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card =
(List.map Subtype.val p.support).toFinset.card + (insert v (G.neighborFinset v)).cardhle:((List.map Subtype.val p.support).toFinset ∪ insert v (G.neighborFinset v)).card ≤ s.card⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
have hscard : s.card ≤ largestInducedTreeSize G := card_le_largestInducedTreeSize hT α:Type u_1inst✝³:Fintype αinst✝²:DecidableEq αG:SimpleGraph αinst✝¹:DecidableRel G.Adjinst✝:Nontrivial αhG:G.Connectedhcyc:¬G.IsAcyclichg4:4 ≤ G.girthv:αhvdeg:G.maxDegree = G.degree vhadjS:∀ u ∈ G.neighborFinset v, G.Adj v uhind:G.IsIndepSet ↑(G.neighborFinset v)hT0:(induce (↑(insert v (G.neighborFinset v))) G).IsTrees:Finset αhrs:insert v (G.neighborFinset v) ⊆ shT:(induce (↑s) G).IsTreehmax:∀ (t : Finset α), insert v (G.neighborFinset v) ⊆ t → (induce (↑t) G).IsTree → t.card ≤ s.cardhvs:v ∈ shsne:s.Nonemptyhsu:s ≠ Finset.univz:αhz:z ∉ sa:αha:a ∈ sb:αhb:b ∈ shab:a ≠ bhza:G.Adj z ahzb:G.Adj z bp:(induce (↑s) G).Walk ⟨a, ⋯⟩ ⟨b, ⋯⟩hp:p.IsPathhgirth:G.girth ≤ p.length + 2hoverlap:((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card ≤ 3hWcard:(List.map Subtype.val p.support).toFinset.card = p.length + 1hr0card:(insert v (G.neighborFinset v)).card = G.maxDegree + 1hWsub:(List.map Subtype.val p.support).toFinset ⊆ shie:((List.map Subtype.val p.support).toFinset ∪ insert v (G.neighborFinset v)).card +
((List.map Subtype.val p.support).toFinset ∩ insert v (G.neighborFinset v)).card =
(List.map Subtype.val p.support).toFinset.card + (insert v (G.neighborFinset v)).cardhle:((List.map Subtype.val p.support).toFinset ∪ insert v (G.neighborFinset v)).card ≤ s.cardhscard:s.card ≤ G.largestInducedTreeSize⊢ G.maxDegree + G.girth ≤ G.largestInducedTreeSize + 3
omega All goals completed! 🐙end Mainend SimpleGraph