Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: port Data.List.Count #1410

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ import Mathlib.Data.List.Basic
import Mathlib.Data.List.BigOperators.Basic
import Mathlib.Data.List.Card
import Mathlib.Data.List.Chain
import Mathlib.Data.List.Count
import Mathlib.Data.List.Defs
import Mathlib.Data.List.Forall2
import Mathlib.Data.List.Func
Expand Down
12 changes: 12 additions & 0 deletions Mathlib/Data/Bool/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ theorem decide_eq {p q : Prop} [Decidable p] [Decidable q] : decide p = decide q
theorem not_false' : ¬false := fun.
#align bool.not_ff Bool.not_false'

-- Porting note: new theorem
theorem eq_iff_eq_true_iff {a b : Bool} : a = b ↔ ((a = true) ↔ (b = true)) :=
jcommelin marked this conversation as resolved.
Show resolved Hide resolved
by cases a <;> cases b <;> simp

-- Porting note: new theorem
theorem beq_eq_decide_eq [DecidableEq α]
(a b : α) : (a == b) = decide (a = b) := rfl

-- Porting note: new theorem
theorem beq_comm [BEq α] [LawfulBEq α] {a b : α} : (a == b) = (b == a) :=
eq_iff_eq_true_iff.2 (by simp [@eq_comm α])

@[simp]
theorem default_bool : default = false :=
rfl
Expand Down
Loading