Skip to content

Commit 55d2f7d

Browse files
committed
Remove redudant theorem
1 parent be2062d commit 55d2f7d

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/Init/Data/List/Pairwise.lean

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,6 @@ grind_pattern Nodup.sublist => l₁ <+ l₂, Nodup l₂
299299
theorem Sublist.nodup : l₁ <+ l₂ → Nodup l₂ → Nodup l₁ :=
300300
Nodup.sublist
301301

302-
theorem nodup_filter_of_nodup {α : Type u} {l : List α} (h : l.Nodup) {p : α → Bool} :
303-
(l.filter p).Nodup := by
304-
induction l with
305-
| nil => simp
306-
| cons hd tl ih =>
307-
simp only [List.nodup_cons, List.filter] at h ⊢
308-
split <;> simp [h, ih]
309-
310302
theorem getElem?_inj {xs : List α}
311303
(h₀ : i < xs.length) (h₁ : Nodup xs) (h₂ : xs[i]? = xs[j]?) : i = j := by
312304
induction xs generalizing i j with

src/Std/Data/DHashMap/Internal/RawLemmas.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5301,9 +5301,8 @@ theorem fst_partition_equiv_filter [EquivBEq α] [LawfulHashable α]
53015301
rw [equiv_iff_toList_perm_toList]
53025302
apply List.Perm.trans _ (toList_filter m).symm
53035303
apply List.Perm.of_nodup_of_nodup_of_forall_mem_iff_mem
5304-
· apply nodup_toList
5305-
apply Raw.WF.fst_partition₀
5306-
· apply List.nodup_filter_of_nodup (nodup_toList _ h)
5304+
· apply nodup_toList _ Raw.WF.fst_partition₀
5305+
· apply List.Sublist.nodup List.filter_sublist (nodup_toList m h)
53075306
· intro a
53085307
simp [mem_toList_fst_partition _ h]
53095308

0 commit comments

Comments
 (0)