@[simp]
@[simp]
@[instance]
Equations
- list.has_subset = {subset := list.subset α}
@[simp]
theorem
list.partition_eq_filter_filter
{α : Type u}
(p : α → Prop)
[decidable_pred p]
(l : list α) :
list.partition p l = (list.filter p l, list.filter (not ∘ p) l)
@[simp]
@[simp]
theorem
list.filter_cons_of_pos
{α : Type u}
{p : α → Prop}
[h : decidable_pred p]
{a : α}
(l : list α) :
p a → list.filter p (a :: l) = a :: list.filter p l
@[simp]
theorem
list.filter_cons_of_neg
{α : Type u}
{p : α → Prop}
[h : decidable_pred p]
{a : α}
(l : list α) :
¬p a → list.filter p (a :: l) = list.filter p l
@[simp]
theorem
list.filter_append
{α : Type u}
{p : α → Prop}
[h : decidable_pred p]
(l₁ l₂ : list α) :
list.filter p (l₁ ++ l₂) = list.filter p l₁ ++ list.filter p l₂
@[simp]
theorem
list.filter_sublist
{α : Type u}
{p : α → Prop}
[h : decidable_pred p]
(l : list α) :
list.filter p l <+ l
@[simp]
theorem
list.length_map_accumr
{α : Type u}
{β : Type v}
{σ : Type w₂}
(f : α → σ → σ × β)
(x : list α)
(s : σ) :
(list.map_accumr f x s).snd.length = x.length
Equations
- list.map_accumr₂ f (x :: xr) (y :: yr) c = let r : σ × list φ := list.map_accumr₂ f xr yr c, q : σ × φ := f x y r.fst in (q.fst, q.snd :: r.snd)
- list.map_accumr₂ f (hd :: tl) list.nil c = (c, list.nil φ)
- list.map_accumr₂ f list.nil (hd :: tl) c = (c, list.nil φ)
- list.map_accumr₂ f list.nil list.nil c = (c, list.nil φ)