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

Commit 73cf56f

Browse files
committed
feat(set_theory/zfc/basic): Set.mem_insert → Set.mem_insert_iff, add Set.mem_insert and Set.mem_insert_of_mem (#15573)
The name `Set.mem_insert_iff` matches `set.mem_insert_iff`.
1 parent bff4172 commit 73cf56f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/set_theory/zfc/basic.lean

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ instance : has_singleton Set Set := ⟨λ x, insert x ∅⟩
502502

503503
instance : is_lawful_singleton Set Set := ⟨λ x, rfl⟩
504504

505-
@[simp] theorem mem_insert {x y z : Set.{u}} : x ∈ insert y z ↔ x = y ∨ x ∈ z :=
505+
@[simp] theorem mem_insert_iff {x y z : Set.{u}} : x ∈ insert y z ↔ x = y ∨ x ∈ z :=
506506
quotient.induction_on₃ x y z
507507
(λ x y ⟨α, A⟩, show x ∈ pSet.mk (option α) (λ o, option.rec y A o) ↔
508508
mk x = mk y ∨ x ∈ pSet.mk α A, from
@@ -514,11 +514,14 @@ quotient.induction_on₃ x y z
514514
| or.inl h := ⟨none, quotient.exact h⟩
515515
end⟩)
516516

517+
theorem mem_insert (x y : Set) : x ∈ insert x y := mem_insert_iff.2 $ or.inl rfl
518+
theorem mem_insert_of_mem {y z : Set} (x) (h : z ∈ y): z ∈ insert x y := mem_insert_iff.2 $ or.inr h
519+
517520
@[simp] theorem mem_singleton {x y : Set.{u}} : x ∈ @singleton Set.{u} Set.{u} _ y ↔ x = y :=
518-
iff.trans mem_insert ⟨λ o, or.rec (λ h, h) (λ n, absurd n (mem_empty _)) o, or.inl⟩
521+
iff.trans mem_insert_iff ⟨λ o, or.rec (λ h, h) (λ n, absurd n (mem_empty _)) o, or.inl⟩
519522

520523
@[simp] theorem mem_pair {x y z : Set.{u}} : x ∈ ({y, z} : Set) ↔ x = y ∨ x = z :=
521-
iff.trans mem_insert $ or_congr iff.rfl mem_singleton
524+
iff.trans mem_insert_iff $ or_congr iff.rfl mem_singleton
522525

523526
/-- `omega` is the first infinite von Neumann ordinal -/
524527
def omega : Set := mk omega
@@ -813,7 +816,7 @@ set.ext $ λ y, Set.mem_sep
813816
set.ext $ λ y, (iff_false _).2 (Set.mem_empty y)
814817

815818
@[simp] theorem insert_hom (x y : Set.{u}) : (@insert Set.{u} Class.{u} _ x y) = ↑(insert x y) :=
816-
set.ext $ λ z, iff.symm Set.mem_insert
819+
set.ext $ λ z, iff.symm Set.mem_insert_iff
817820

818821
@[simp] theorem union_hom (x y : Set.{u}) : (x : Class.{u}) ∪ y = (x ∪ y : Set.{u}) :=
819822
set.ext $ λ z, iff.symm Set.mem_union

0 commit comments

Comments
 (0)