File: Mathlib/Data/List/ReduceOption.lean

full_name: List.reduceOption_cons_of_some
code: @[simp]
theorem reduceOption_cons_of_some (x : α) (l : List (Option α)) :
    reduceOption (some x :: l) = x :: l.reduceOption 
goal: (some x :: l).reduceOption = x :: l.reduceOption

full_name: List.reduceOption_cons_of_none
code: @[simp]
theorem reduceOption_cons_of_none (l : List (Option α)) :
    reduceOption (none :: l) = l.reduceOption 
goal: (none :: l).reduceOption = l.reduceOption

full_name: List.reduceOption_nil
code: @[simp]
theorem reduceOption_nil : @reduceOption α [] = [] 
goal: [].reduceOption = []

full_name: List.reduceOption_map
code: @[simp]
theorem reduceOption_map {l : List (Option α)} {f : α → β} :
    reduceOption (map (Option.map f) l) = map f (reduceOption l) 
goal: (List.map (Option.map f) l).reduceOption = List.map f l.reduceOption

full_name: List.reduceOption_append
code: theorem reduceOption_append (l l' : List (Option α)) :
    (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption 
goal: (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption

full_name: List.reduceOption_length_eq
code: theorem reduceOption_length_eq {l : List (Option α)} :
    l.reduceOption.length = (l.filter Option.isSome).length 
goal: l.reduceOption.length = (List.filter Option.isSome l).length

full_name: List.length_eq_reduceOption_length_add_filter_none
code: theorem length_eq_reduceOption_length_add_filter_none {l : List (Option α)} :
    l.length = l.reduceOption.length + (l.filter Option.isNone).length 
goal: l.length = l.reduceOption.length + (List.filter Option.isNone l).length

full_name: List.reduceOption_length_le
code: theorem reduceOption_length_le (l : List (Option α)) : l.reduceOption.length ≤ l.length 
goal: l.reduceOption.length ≤ l.length

full_name: List.reduceOption_length_eq_iff
code: theorem reduceOption_length_eq_iff {l : List (Option α)} :
    l.reduceOption.length = l.length ↔ ∀ x ∈ l, Option.isSome x 
goal: l.reduceOption.length = l.length ↔ ∀ (x : Option α), x ∈ l → x.isSome = true

full_name: List.reduceOption_length_lt_iff
code: theorem reduceOption_length_lt_iff {l : List (Option α)} :
    l.reduceOption.length < l.length ↔ none ∈ l 
goal: l.reduceOption.length < l.length ↔ none ∈ l

full_name: List.reduceOption_singleton
code: theorem reduceOption_singleton (x : Option α) : [x].reduceOption = x.toList 
goal: [x].reduceOption = x.toList

full_name: List.reduceOption_concat
code: theorem reduceOption_concat (l : List (Option α)) (x : Option α) :
    (l.concat x).reduceOption = l.reduceOption ++ x.toList 
goal: (l.concat x).reduceOption = l.reduceOption ++ x.toList

full_name: List.reduceOption_concat_of_some
code: theorem reduceOption_concat_of_some (l : List (Option α)) (x : α) :
    (l.concat (some x)).reduceOption = l.reduceOption.concat x 
goal: (l.concat (some x)).reduceOption = l.reduceOption.concat x

full_name: List.reduceOption_mem_iff
code: theorem reduceOption_mem_iff {l : List (Option α)} {x : α} : x ∈ l.reduceOption ↔ some x ∈ l 
goal: x ∈ l.reduceOption ↔ some x ∈ l

full_name: List.reduceOption_get?_iff
code: theorem reduceOption_get?_iff {l : List (Option α)} {x : α} :
    (∃ i, l.get? i = some (some x)) ↔ ∃ i, l.reduceOption.get? i = some x 
goal: (∃ i, l.get? i = some (some x)) ↔ ∃ i, l.reduceOption.get? i = some x