is_maximal_decreasing_run
A subsegment S of a list L is a maximal strictly decreasing run if S is a contiguous sublist, S is strictly decreasing, and S cannot be extended to any larger strictly decreasing contiguous sublist of L.
Statement
def is_maximal_decreasing_run {α : Type} [Preorder α] (S L : List α) : Prop
- Defined in
- arXiv:2611.26297, Sec. 2
- Verified
- 22 Nov 2026
- Axioms
- none listed
Read back from the Lean
Given a type α with a preorder ([Preorder α]) and lists S, L : List α, is_maximal_decreasing_run S L asserts that:
1. S is an infix (contiguous sublist) of L (S <:+: L);
2. S is pairwise strictly decreasing, meaning for every pair of elements in S, if the first occurs strictly before the second, the first is strictly greater than the second (S.Pairwise (· > ·)); and
3. For every list S' : List α, if S is an infix of S', S' is an infix of L, and S' is pairwise strictly decreasing (S'.Pairwise (· > ·)), then S' = S.
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 subsegment is a maximal strictly decreasing run in a list. -/ def is_maximal_decreasing_run {α : Type} [Preorder α] (S L : List α) : Prop := S <:+: L ∧ S.Pairwise (· > ·) ∧ ∀ S', S <:+: S' → S' <:+: L → S'.Pairwise (· > ·) → S' = S