Skip to content

Commit

Permalink
feat(data/sym/sym2): add lemma that eq from distinct common members (#…
Browse files Browse the repository at this point in the history
…11563)

Two terms of type `sym2 a` are equal if one can find two distinct elements of type `a` that are members of both.
  • Loading branch information
vbeffara committed Jan 20, 2022
1 parent b87449a commit dfca2b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/data/sym/sym2.lean
Expand Up @@ -216,6 +216,10 @@ begin
{ rintro rfl, simp },
end

lemma eq_of_ne_mem {x y : α} {z z' : sym2 α} (h : x ≠ y)
(h1 : x ∈ z) (h2 : y ∈ z) (h3 : x ∈ z') (h4 : y ∈ z') : z = z' :=
((mem_and_mem_iff h).mp ⟨h1, h2⟩).trans ((mem_and_mem_iff h).mp ⟨h3, h4⟩).symm

@[ext]
protected lemma ext (z z' : sym2 α) (h : ∀ x, x ∈ z ↔ x ∈ z') : z = z' :=
begin
Expand Down

0 comments on commit dfca2b0

Please sign in to comment.