Documentation

Linglib.Core.Data.List.Fold

Folds over Boolean accumulation #

A left fold that ors in a predicate computes any, from any starting accumulator. Candidate for Mathlib/Data/List/Basic.lean.

theorem List.foldl_or {α : Type u_1} (p : αBool) (acc : Bool) (l : List α) :
foldl (fun (r : Bool) (a : α) => r || p a) acc l = (acc || l.any p)