Built with doc-gen4, running Lean4.
Bubbles () indicate interactive fragments: hover for details, tap to reveal contents.
Use Ctrl+โCtrl+โto navigate, Ctrl+๐ฑ๏ธto focus.
On Mac, use Cmdinstead of Ctrl.
import Mathlib
/-!
# Minimum of a list of natural numbers
Our next example is an algorithm to find the minimum of a non-empty list of natural numbers, with a proof of correctness. The proof of correctness consists of two statements about the algorithm: (1) the minimum is in the list, and (2) the minimum is less than or equal to each element in the list.
To avoid name collisions we will use the name `smallest`
-/
/-- The smallest element in a non-empty list of natural numbers -/
def