Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit ff97055

Browse files
committed
feat(data/finset/basic): insert_singleton_comm (#3914)
Add the result that `({a, b} : finset α) = {b, a}`. This came up in #3872, and `library_search` does not show it as already present.
1 parent 7ac7246 commit ff97055

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/data/finset/basic.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,12 @@ insert_eq_of_mem $ mem_singleton_self _
319319
theorem insert.comm (a b : α) (s : finset α) : insert a (insert b s) = insert b (insert a s) :=
320320
ext $ λ x, by simp only [mem_insert, or.left_comm]
321321

322+
theorem insert_singleton_comm (a b : α) : ({a, b} : finset α) = {b, a} :=
323+
begin
324+
ext,
325+
simp [or.comm]
326+
end
327+
322328
@[simp] theorem insert_idem (a : α) (s : finset α) : insert a (insert a s) = insert a s :=
323329
ext $ λ x, by simp only [mem_insert, or.assoc.symm, or_self]
324330

0 commit comments

Comments
 (0)