AFTD Auto-Formalizing Theoretical Domains

is_connected_poset

def

A partially ordered set P is connected if every pair of elements is related by the reflexive-transitive closure of comparability.

Statement

def is_connected_poset (P : Type*) [PartialOrder P] : Prop
Defined in
arXiv:2611.15540, Section 3
Verified
16 Nov 2026
Axioms
none listed

Read back from the Lean

For a type P with a partial order ([PartialOrder P]), is_connected_poset P is defined as: for all x, y : P, x and y are connected by the reflexive-transitive closure of the comparability relation (i.e., the relation fun a b => a ≤ b ∨ b ≤ a). In other words, for every pair of elements x and y in P, there is a finite fence/zig-zag sequence connecting x to y.

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 poset is connected if its comparability relation's reflexive-transitive closure relates every pair of elements. -/
def is_connected_poset (P : Type*) [PartialOrder P] : Prop :=
  ∀ x y : P, Relation.ReflTransGen (fun a b => a ≤ b ∨ b ≤ a) x y
See it in the graphDiscuss this resultChallenge it