List counts and scan bounds #
Main results #
List.length_flatMap_le: blocks of bounded length have bounded total length.List.decide_mem_eq_any: membership as a scan of the list.List.countP_and_not_add_countP_and: members satisfying one predicate split by whether they satisfy another.List.existsUnique_fin_of_countP_eq_one,List.existsUnique_mem_of_countP_eq_one: a Boolean predicate withcountPequal to1holds at a unique list index and at a unique member.
theorem List.countP_and_not_add_countP_and {α : Type u_1} (p q : α → Prop) [DecidablePred p] [DecidablePred q] (l : List α) :
Partitioning the elements of a list satisfying p by whether they satisfy q.