Skip to content

Commit

Permalink
feat(data/list/pairwise): pairwise repeat (#11117)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-mehta committed Dec 29, 2021
1 parent d8b4267 commit cb37df3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/data/list/pairwise.lean
Expand Up @@ -330,6 +330,11 @@ theorem pairwise_sublists {R} {l : list α} (H : pairwise R l) :
by have := pairwise_sublists' (pairwise_reverse.2 H);
rwa [sublists'_reverse, pairwise_map] at this

lemma pairwise_repeat {α : Type*} {r : α → α → Prop} {x : α} (hx : r x x) :
∀ (n : ℕ), pairwise r (repeat x n)
| 0 := by simp
| (n+1) := by simp [hx, mem_repeat, pairwise_repeat n]

/-! ### Pairwise filtering -/

variable [decidable_rel R]
Expand Down

0 comments on commit cb37df3

Please sign in to comment.