English
There is a canonical way to regard a finite subset s ⊆ α as a subtype of α: the elements of s form a subtype {x ∈ α | x ∈ s}, i.e., a type consisting of the members of s with proofs of membership. This provides a natural coercion from Finset α to the corresponding subtype.
Русский
Существует канонический способ рассматривать конечное множество s ⊆ α как подтип α: элементы s образуют подтип {x ∈ α | x ∈ s}, то есть тип, состоящий из элементов s с доказательством принадлежности. Это обеспечивает естественную отброску из Finset α на соответствующий подтип.
LaTeX
$$$((s : Set \alpha) : \mathrm{Sort}) = s$$$
Lean4
/-- Coercion from a finset to the corresponding subtype. -/
instance {α : Type u} : CoeSort (Finset α) (Type u) :=
⟨fun s => { x // x ∈ s }⟩