is_R_pattern_singleton
The singleton list [1] is an R-pattern.
Statement
theorem is_R_pattern_singleton : ∃ h : [1] ≠ [], ∀ x ∈ [1], x ≤ [1].getLast h- Source
- arXiv:2610.37940 Section 6.3
- Verified
- 01 Nov 2026
- Axioms
Quot.soundpropext
Read back from the Lean
There exists a proof $h$ that the list $[1]$ is non-empty ([1] ≠ []) such that for every element $x$ in $[1]$, $x$ is less than or equal to the last element of $[1]$ (with respect to $h$, i.e., [1].getLast h).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
To show that the singleton list $[1]$ is an R-pattern, we must verify that it is non-empty and that each of its elements is at most its last element. The non-emptiness holds immediately by computational evaluation, and the inequality holds trivially because the only element in $[1]$ is $1$, which equals the last element.
The list $[1]$ is non-empty, and every element in $[1]$ is at most its last element. automation
The theorem requires exhibiting a proof that $[1] \neq []$ alongside a proof that each $x \in [1]$ satisfies $x \le [1].\mathrm{getLast}$. The angle brackets construct this pair directly: the non-emptiness of $[1]$ is verified by decidability evaluation (`decide`), and the universal bound is resolved by simplification (`simp`), which reduces the condition to $1 \le 1$ for the unique element $x = 1$.
theorem is_R_pattern_singleton : ∃ h : [1] ≠ [], ∀ x ∈ [1], x ≤ [1].getLast h := ⟨by decide, by simp⟩
- Both the non-emptiness check and the universal inequality are discharged by Lean's built-in automation (`decide` and `simp`), which evaluate the finite list operations directly.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- The singleton list is an R-pattern. -/theorem is_R_pattern_singleton : ∃ h : [1] ≠ [], ∀ x ∈ [1], x ≤ [1].getLast h := ⟨by decide, by simp⟩