@@ -401,23 +401,16 @@ lemma subset_insert_diff_singleton (x : α) (s : Set α) : s ⊆ insert x (s \ {
401401 rw [← diff_singleton_subset_iff]
402402
403403lemma diff_insert_of_notMem (h : a ∉ s) : s \ insert a t = s \ t := by
404- refine Subset.antisymm (diff_subset_diff (refl _) (subset_insert ..)) fun y hy ↦ ?_
405- simp only [mem_diff, mem_insert_iff, not_or] at hy ⊢
406- exact ⟨hy.1 , fun hxy ↦ h <| hxy ▸ hy.1 , hy.2 ⟩
404+ grind
407405
408406@ [deprecated (since := "2025-05-23" )] alias diff_insert_of_not_mem := diff_insert_of_notMem
409407
410408@[simp]
411409lemma insert_diff_of_mem (s) (h : a ∈ t) : insert a s \ t = s \ t := by
412- ext
413- constructor <;> simp +contextual [or_imp, h]
410+ grind
414411
415412lemma insert_diff_of_notMem (s) (h : a ∉ t) : insert a s \ t = insert a (s \ t) := by
416- classical
417- ext x
418- by_cases h' : x ∈ t
419- · simp [h', ne_of_mem_of_not_mem h' h]
420- · simp [h']
413+ grind
421414
422415@ [deprecated (since := "2025-05-23" )] alias insert_diff_of_not_mem := insert_diff_of_notMem
423416
@@ -464,10 +457,7 @@ lemma mem_diff_singleton_empty {t : Set (Set α)} : s ∈ t \ {∅} ↔ s ∈ t
464457 mem_diff_singleton.trans <| and_congr_right' nonempty_iff_ne_empty.symm
465458
466459lemma subset_insert_iff : s ⊆ insert a t ↔ s ⊆ t ∨ (a ∈ s ∧ s \ {a} ⊆ t) := by
467- rw [← diff_singleton_subset_iff]
468- by_cases hx : a ∈ s
469- · rw [and_iff_right hx, or_iff_right_of_imp diff_subset.trans]
470- rw [diff_singleton_eq_self hx, or_iff_left_of_imp And.right]
460+ grind
471461
472462lemma pair_diff_left (hab : a ≠ b) : ({a, b} : Set α) \ {a} = {b} := by
473463 rw [insert_diff_of_mem _ (mem_singleton a), diff_singleton_eq_self (by simpa)]
0 commit comments