English
For any p: β → Prop, a: α, and b ∈ Subtype p, membership of b in toSubtype p f a is equivalent to the equality of the underlying values: b ∈ toSubtype p f a iff b.value = f(a).
Русский
Для p: β → Prop, a: α и b ∈ Subtype p, членство b в toSubtype p f a эквивалентно равенству значений: b.value = f(a).
LaTeX
$$$$ b \in toSubtype(p,f)(a) \iff b.1 = f(a). $$$$
Lean4
/-- Turns a function into a partial function to a subtype. -/
def toSubtype (p : β → Prop) (f : α → β) : α →. Subtype p := fun a => ⟨p (f a), Subtype.mk _⟩