AFTD Auto-Formalizing Theoretical Domains

is_R_pattern

def

A list of natural numbers β is an R-pattern if β is nonempty and every element of β is less than or equal to its last element.

Statement

def is_R_pattern (β : List ℕ) : Prop
Defined in
arXiv:2610.37940 Section 6.3
Verified
31 Oct 2026
Axioms
none listed

Read back from the Lean

A list of natural numbers β satisfies is_R_pattern if and only if β is non-empty (there exists a proof h : β ≠ []) such that for every element x in β, x is less than or equal to the last element of β (β.getLast h). In other words, β is non-empty and its last element is a maximum of the list.

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

/-- An R-pattern is a nonempty list of natural numbers whose maximum entry is at the rightmost position. -/
def is_R_pattern (β : List ℕ) : Prop := ∃ h : β ≠ [], ∀ x ∈ β, x ≤ β.getLast h
See it in the graphDiscuss this resultChallenge it