Skip to content

Commit

Permalink
chore: fix List.countP lemmas (#5311)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em authored Sep 11, 2024
1 parent f5146c6 commit 0b7debe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Init/Data/List/Count.lean
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ theorem countP_filter (l : List α) :
countP p (filter q l) = countP (fun a => p a && q a) l := by
simp only [countP_eq_length_filter, filter_filter]

@[simp] theorem countP_true {l : List α} : (l.countP fun _ => true) = l.length := by
rw [countP_eq_length]
@[simp] theorem countP_true : (countP fun (_ : α) => true) = length := by
funext l
simp

@[simp] theorem countP_false {l : List α} : (l.countP fun _ => false) = 0 := by
rw [countP_eq_zero]
@[simp] theorem countP_false : (countP fun (_ : α) => false) = Function.const _ 0 := by
funext l
simp

@[simp] theorem countP_map (p : β → Bool) (f : α → β) :
Expand Down

0 comments on commit 0b7debe

Please sign in to comment.