Skip to content

Commit ee2b6d9

Browse files
jcommelinChrisHughes24kim-emzeramorphic
committed
feat: port Data.List.Count (#1410)
- [x] depends on: #1380 Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: thirdsgames <thirdsgames2018@gmail.com> Co-authored-by: zeramorphic <zeramorphic@proton.me> Co-authored-by: zeramorphic <50671761+zeramorphic@users.noreply.github.com>
1 parent 3f47532 commit ee2b6d9

File tree

4 files changed

+414
-0
lines changed

4 files changed

+414
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ import Mathlib.Data.List.Basic
246246
import Mathlib.Data.List.BigOperators.Basic
247247
import Mathlib.Data.List.Card
248248
import Mathlib.Data.List.Chain
249+
import Mathlib.Data.List.Count
249250
import Mathlib.Data.List.Defs
250251
import Mathlib.Data.List.Forall2
251252
import Mathlib.Data.List.Func

Mathlib/Data/Bool/Basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ theorem decide_eq {p q : Prop} [Decidable p] [Decidable q] : decide p = decide q
8282
theorem not_false' : ¬false := fun.
8383
#align bool.not_ff Bool.not_false'
8484

85+
-- Porting note: new theorem
86+
theorem eq_iff_eq_true_iff {a b : Bool} : a = b ↔ ((a = true) ↔ (b = true)) :=
87+
by cases a <;> cases b <;> simp
88+
89+
-- Porting note: new theorem
90+
theorem beq_eq_decide_eq [DecidableEq α]
91+
(a b : α) : (a == b) = decide (a = b) := rfl
92+
93+
-- Porting note: new theorem
94+
theorem beq_comm [BEq α] [LawfulBEq α] {a b : α} : (a == b) = (b == a) :=
95+
eq_iff_eq_true_iff.2 (by simp [@eq_comm α])
96+
8597
@[simp]
8698
theorem default_bool : default = false :=
8799
rfl

0 commit comments

Comments
 (0)