AFTD Auto-Formalizing Theoretical Domains

poset_min_elements

def

Given a natural number n, a partial order P on Fin n, and a finite subset S of Fin n, the subset of S (as a Finset) consisting of all elements minimal in S with respect to P.

Statement

noncomputable def poset_min_elements {n : ℕ} (P : PartialOrder (Fin n)) (S : Finset (Fin n)) : Finset (Fin n)
Defined in
arXiv:2610.18740 Section 5
Verified
21 Oct 2026
Axioms
none listed

Read back from the Lean

Given a natural number n, a partial order P on Fin n, and a finite subset S of Fin n, poset_min_elements P S is the finite set of all x ∈ S such that for every y ∈ S, if y ≤ x (according to P), then y = x (that is, the set of all minimal elements of S with respect to P).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The set of minimal elements of a subset in a partial order on Fin n. -/
noncomputable def poset_min_elements {n : ℕ} (P : PartialOrder (Fin n)) (S : Finset (Fin n)) : Finset (Fin n) := open scoped Classical in
  letI := P
  Finset.filter (fun x => ∀ y ∈ S, y ≤ x → y = x) S
See it in the graphDiscuss this resultChallenge it