Documentation

ToCslib.Data.Fin.Lattice

Suprema over Fin #

A supremum over Fin (n + 1) splits off its first term. Mathlib unfolds suprema over Bool, Option and sums (iSup_bool_eq, iSup_option, iSup_sum), and over an empty type such as Fin 0 (iSup_of_empty); this is the Fin case, used to evaluate worst-case costs over finite answer types.

theorem Fin.iSup_succ {L : Type u} [CompleteLattice L] {n : ℕ} (f : Fin (n + 1) → L) :
⨆ (i : Fin (n + 1)), f i = f 0 ⊔ ⨆ (i : Fin n), f i.succ