Skip to content

Commit 7a685a6

Browse files
committed
fix Subgraph.lean
1 parent e80d61a commit 7a685a6

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -399,17 +399,15 @@ lemma neighborSet_toSubgraph_internal {u} {i : ℕ} {p : G.Walk u v} (hp : p.IsP
399399
Prod.swap_prod_mk]
400400
refine ⟨?_, by aesop⟩
401401
rintro ⟨i', ⟨hl, _⟩ | ⟨_, hl⟩⟩ <;>
402-
apply hp.getVert_injOn (by rw [Set.mem_setOf_eq]; lia)
403-
(by rw [Set.mem_setOf_eq]; lia) at hl <;> aesop
402+
apply hp.getVert_injOn (by grind) (by grind) at hl <;> aesop
404403

405404
lemma ncard_neighborSet_toSubgraph_internal_eq_two {u} {i : ℕ} {p : G.Walk u v} (hp : p.IsPath)
406405
(h : i ≠ 0) (h' : i < p.length) :
407406
(p.toSubgraph.neighborSet (p.getVert i)).ncard = 2 := by
408407
rw [hp.neighborSet_toSubgraph_internal h h']
409408
have : p.getVert (i - 1) ≠ p.getVert (i + 1) := by
410409
intro h
411-
have := hp.getVert_injOn (by rw [Set.mem_setOf_eq]; lia) (by rw [Set.mem_setOf_eq]; lia) h
412-
lia
410+
grind [hp.getVert_injOn (by grind) (by grind) h]
413411
simp_all
414412

415413
lemma snd_of_toSubgraph_adj {u v v'} {p : G.Walk u v} (hp : p.IsPath)
@@ -418,11 +416,11 @@ lemma snd_of_toSubgraph_adj {u v v'} {p : G.Walk u v} (hp : p.IsPath)
418416
simp only [Sym2.eq, Sym2.rel_iff', Prod.mk.injEq, Prod.swap_prod_mk] at hi
419417
rcases hi.1 with ⟨hl1, rfl⟩ | ⟨hr1, hr2⟩
420418
· have : i = 0 := by
421-
apply hp.getVert_injOn (by rw [Set.mem_setOf]; lia) (by rw [Set.mem_setOf]; lia)
419+
apply hp.getVert_injOn (by grind) (by grind)
422420
rw [p.getVert_zero, hl1]
423421
simp [this]
424422
· have : i + 1 = 0 := by
425-
apply hp.getVert_injOn (by rw [Set.mem_setOf]; lia) (by rw [Set.mem_setOf]; lia)
423+
apply hp.getVert_injOn (by grind) (by grind)
426424
rw [p.getVert_zero, hr2]
427425
contradiction
428426

@@ -449,11 +447,9 @@ lemma neighborSet_toSubgraph_internal {u} {i : ℕ} {p : G.Walk u u} (hpc : p.Is
449447
Prod.swap_prod_mk]
450448
refine ⟨?_, by aesop⟩
451449
rintro ⟨i', ⟨hl1, hl2⟩ | ⟨hr1, hr2⟩⟩
452-
· apply hpc.getVert_injOn' (by rw [Set.mem_setOf_eq]; lia)
453-
(by rw [Set.mem_setOf_eq]; lia) at hl1
450+
· apply hpc.getVert_injOn' (by grind) (by grind) at hl1
454451
simp_all
455-
· apply hpc.getVert_injOn (by rw [Set.mem_setOf_eq]; lia)
456-
(by rw [Set.mem_setOf_eq]; lia) at hr2
452+
· apply hpc.getVert_injOn (by grind) (by grind) at hr2
457453
aesop
458454

459455
lemma ncard_neighborSet_toSubgraph_eq_two {u v} {p : G.Walk u u} (hpc : p.IsCycle)

0 commit comments

Comments
 (0)