AFTD Auto-Formalizing Theoretical Domains

is_poset_linear_extension

def

A function l from a finite partially ordered set P to Fin |P| is a linear extension if it is bijective and order-preserving.

Statement

def is_poset_linear_extension {P : Type*} [PartialOrder P] [Fintype P]
    (l : P → Fin (Fintype.card P)) : Prop
Defined in
arXiv:2611.26888 Section 2.1
Verified
23 Nov 2026
Axioms
none listed
Used by 2

Read back from the Lean

Given a type $P$ equipped with a partial order and a finite type instance, and a function $l : P \to \mathrm{Fin}(|P|)$, is_poset_linear_extension l asserts that: 1. $l$ is bijective, and 2. For all $x, y \in P$, if $x \le y$ in $P$, then $l(x) \le l(y)$ in $\mathrm{Fin}(|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

/-- A linear extension of a finite poset P is a bijective order-preserving map to Fin |P|. -/
def is_poset_linear_extension {P : Type*} [PartialOrder P] [Fintype P]
    (l : P → Fin (Fintype.card P)) : Prop := Function.Bijective l ∧ ∀ ⦃x y : P⦄, x ≤ y → l x ≤ l y
See it in the graphDiscuss this resultChallenge it