File: Mathlib/Control/Traversable/Instances.lean

full_name: Option.id_traverse
code: theorem Option.id_traverse {α} (x : Option α) : Option.traverse (pure : α → Id α) x = x 
goal: Option.traverse pure x = x

full_name: Option.comp_traverse
code: theorem Option.comp_traverse {α β γ} (f : β → F γ) (g : α → G β) (x : Option α) :
    Option.traverse (Comp.mk ∘ (f <$> ·) ∘ g) x =
      Comp.mk (Option.traverse f <$> Option.traverse g x) 
goal: Option.traverse (Functor.Comp.mk ∘ (fun x => f <$> x) ∘ g) x =
  Functor.Comp.mk (Option.traverse f <$> Option.traverse g x)

full_name: Option.traverse_eq_map_id
code: theorem Option.traverse_eq_map_id {α β} (f : α → β) (x : Option α) :
    Option.traverse ((pure : _ → Id _) ∘ f) x = (pure : _ → Id _) (f <$> x) 
goal: Option.traverse (pure ∘ f) x = pure (f <$> x)

full_name: Option.naturality
code: theorem Option.naturality [LawfulApplicative F] {α β} (f : α → F β) (x : Option α) :
    η (Option.traverse f x) = Option.traverse (@η _ ∘ f) x 
goal: (fun {α} => η.app α) (Option.traverse f x) = Option.traverse ((fun {α} => η.app α) ∘ f) x

full_name: instLawfulTraversableOption
code: instance : LawfulTraversable Option 
goal: LawfulTraversable Option

full_name: List.id_traverse
code: protected theorem id_traverse {α} (xs : List α) : List.traverse (pure : α → Id α) xs = xs 
goal: List.traverse pure xs = xs

full_name: List.comp_traverse
code: protected theorem comp_traverse {α β γ} (f : β → F γ) (g : α → G β) (x : List α) :
    List.traverse (Comp.mk ∘ (f <$> ·) ∘ g) x =
    Comp.mk (List.traverse f <$> List.traverse g x) 
goal: List.traverse (Functor.Comp.mk ∘ (fun x => f <$> x) ∘ g) x = Functor.Comp.mk (List.traverse f <$> List.traverse g x)

full_name: List.traverse_eq_map_id
code: protected theorem traverse_eq_map_id {α β} (f : α → β) (x : List α) :
    List.traverse ((pure : _ → Id _) ∘ f) x = (pure : _ → Id _) (f <$> x) 
goal: List.traverse (pure ∘ f) x = pure (f <$> x)

full_name: List.naturality
code: protected theorem naturality {α β} (f : α → F β) (x : List α) :
    η (List.traverse f x) = List.traverse (@η _ ∘ f) x 
goal: (fun {α} => η.app α) (List.traverse f x) = List.traverse ((fun {α} => η.app α) ∘ f) x

full_name: List.instLawfulTraversable
code: instance : LawfulTraversable.{u} List 
goal: LawfulTraversable List

full_name: List.traverse_nil
code: @[simp]
theorem traverse_nil : traverse f ([] : List α') = (pure [] : F (List β')) 
goal: traverse f [] = pure []

full_name: List.traverse_cons
code: @[simp]
theorem traverse_cons (a : α') (l : List α') :
    traverse f (a :: l) = (· :: ·) <$> f a <*> traverse f l 
goal: traverse f (a :: l) = Seq.seq ((fun x x_1 => x :: x_1) <$> f a) fun x => traverse f l

full_name: List.traverse_append
code: @[simp]
theorem traverse_append :
    ∀ as bs : List α', traverse f (as ++ bs) = (· ++ ·) <$> traverse f as <*> traverse f bs
  
goal: traverse f (as ++ bs) = Seq.seq ((fun x x_1 => x ++ x_1) <$> traverse f as) fun x => traverse f bs

full_name: List.mem_traverse
code: theorem mem_traverse {f : α' → Set β'} :
    ∀ (l : List α') (n : List β'), n ∈ traverse f l ↔ Forall₂ (fun b a => b ∈ f a) n l
  
goal: n ∈ traverse f l ↔ List.Forall₂ (fun b a => b ∈ f a) n l

full_name: Sum.traverse_map
code: protected theorem traverse_map {α β γ : Type u} (g : α → β) (f : β → G γ) (x : σ ⊕ α) :
    Sum.traverse f (g <$> x) = Sum.traverse (f ∘ g) x 
goal: Sum.traverse f (g <$> x) = Sum.traverse (f ∘ g) x

full_name: Sum.id_traverse
code: protected theorem id_traverse {σ α} (x : σ ⊕ α) :
    Sum.traverse (pure : α → Id α) x = x 
goal: Sum.traverse pure x = x

full_name: Sum.comp_traverse
code: protected theorem comp_traverse {α β γ : Type u} (f : β → F γ) (g : α → G β) (x : σ ⊕ α) :
    Sum.traverse (Comp.mk ∘ (f <$> ·) ∘ g) x =
    Comp.mk.{u} (Sum.traverse f <$> Sum.traverse g x) 
goal: Sum.traverse (Functor.Comp.mk ∘ (fun x => f <$> x) ∘ g) x = Functor.Comp.mk (Sum.traverse f <$> Sum.traverse g x)

full_name: Sum.traverse_eq_map_id
code: protected theorem traverse_eq_map_id {α β} (f : α → β) (x : σ ⊕ α) :
    Sum.traverse ((pure : _ → Id _) ∘ f) x = (pure : _ → Id _) (f <$> x) 
goal: Sum.traverse (pure ∘ f) x = pure (f <$> x)

full_name: Sum.map_traverse
code: protected theorem map_traverse {α β γ} (g : α → G β) (f : β → γ) (x : σ ⊕ α) :
    (f <$> ·) <$> Sum.traverse g x = Sum.traverse (f <$> g ·) x 
goal: (fun x => f <$> x) <$> Sum.traverse g x = Sum.traverse (fun x => f <$> g x) x

full_name: Sum.naturality
code: protected theorem naturality {α β} (f : α → F β) (x : σ ⊕ α) :
    η (Sum.traverse f x) = Sum.traverse (@η _ ∘ f) x 
goal: (fun {α} => η.app α) (Sum.traverse f x) = Sum.traverse ((fun {α} => η.app α) ∘ f) x

full_name: Sum.instLawfulTraversable
code: instance {σ : Type u} : LawfulTraversable.{u} (Sum σ) 
goal: LawfulTraversable (Sum σ)