Skip to content

Commit c0b7567

Browse files
feat(Data/Part): Part.mem_right_unique (#24006)
Add the lemmas `Part.mem_right_unique` and `Part.Mem.right_unique`. Co-authored-by: Lorenzo Luccioli <71074618+LorenzoLuccioli@users.noreply.github.com>
1 parent 18ce4d8 commit c0b7567

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Mathlib/Data/Part.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,15 @@ theorem some_dom (a : α) : (some a).Dom :=
128128
theorem mem_unique : ∀ {a b : α} {o : Part α}, a ∈ o → b ∈ o → a = b
129129
| _, _, ⟨_, _⟩, ⟨_, rfl⟩, ⟨_, rfl⟩ => rfl
130130

131+
theorem mem_right_unique : ∀ {a : α} {o p : Part α}, a ∈ o → a ∈ p → o = p
132+
| _, _, _, ⟨ho, _⟩, ⟨hp, _⟩ => ext' (iff_of_true ho hp) (by simp [*])
133+
131134
theorem Mem.left_unique : Relator.LeftUnique ((· ∈ ·) : α → Part α → Prop) := fun _ _ _ =>
132135
mem_unique
133136

137+
theorem Mem.right_unique : Relator.RightUnique ((· ∈ ·) : α → Part α → Prop) := fun _ _ _ =>
138+
mem_right_unique
139+
134140
theorem get_eq_of_mem {o : Part α} {a} (h : a ∈ o) (h') : get o h' = a :=
135141
mem_unique ⟨_, rfl⟩ h
136142

0 commit comments

Comments
 (0)