AFTD Auto-Formalizing Theoretical Domains

poset_height_one_lt_minimal_maximal

theoremverified

If P has height one and x < y in P, then nothing lies below x and nothing lies above y. Consequently the elements below a comparable pair form an antichain, and every comparable pair joins a minimal element to a maximal one: the poset is bipartite between its minimal and maximal elements.

Statement

theorem poset_height_one_lt_minimal_maximal (P : Type) [PartialOrder P] (hP : poset_height_one P) {x y : P} (hxy : x < y) : (∀ z : P, ¬ (z < x)) ∧ (∀ z : P, ¬ (y < z))
Source
step towards poset_height_one_reconstructible
Verified
25 Oct 2026
Axioms
none — Lean reports it depends on no axioms
Built on 1
  • poset_height_oneAn ordered set has height one when its longest chains have exactly two elements: some two elements are comparable and there is no chain a…

The proof, explained

By definition, a height-one poset contains no three-element chain $a < b < c$. Given a comparable pair $x < y$, any element $z < x$ would form the chain $z < x < y$, and any element $z > y$ would form the chain $x < y < z$. Both configurations are impossible in a height-one poset, so $x$ is minimal and $y$ is maximal.

  1. No three elements in $P$ form a chain $a < b < c$.

    By definition, a poset of height one contains at least one comparable pair and has no chains of three elements (no $a < b$ and $b < c$). We extract this second condition (named `hchain`) from the hypothesis $hP$ and discard the first.

    line 3

      obtain ⟨-, hchain⟩ := hP
  2. No element is strictly smaller than $x$, and no element is strictly greater than $y$.

    We prove the conjunction by contradiction on both sides. If there were some $z$ with $z < x$, combining it with $x < y$ would produce the three-element chain $z < x < y$, violating `hchain`. Similarly, if there were some $z$ with $y < z$, combining $x < y$ with $y < z$ would yield $x < y < z$, which again contradicts `hchain`.

    line 4

      exact ⟨fun z hz => hchain z x y ⟨hz, hxy⟩, fun z hz => hchain x y z ⟨hxy, hz⟩⟩

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- In a height-one ordered set, the lower element of a comparable pair is minimal and the upper element is maximal. -/theorem poset_height_one_lt_minimal_maximal (P : Type) [PartialOrder P] (hP : poset_height_one P) {x y : P} (hxy : x < y) : (∀ z : P, ¬ (z < x)) ∧ (∀ z : P, ¬ (y < z)) := by  obtain ⟨-, hchain⟩ := hP  exact ⟨fun z hz => hchain z x y ⟨hz, hxy⟩, fun z hz => hchain x y z ⟨hxy, hz⟩⟩
See it in the graphDiscuss this resultChallenge it