File: Mathlib/Control/Functor.lean

full_name: Functor.map_id
code: theorem Functor.map_id : (id <$> ·) = (id : F α → F α) 
goal: (fun x => id <$> x) = id

full_name: Functor.map_comp_map
code: theorem Functor.map_comp_map (f : α → β) (g : β → γ) :
    ((g <$> ·) ∘ (f <$> ·) : F α → F γ) = ((g ∘ f) <$> ·) 
goal: ((fun x => g <$> x) ∘ fun x => f <$> x) = fun x => (g ∘ f) <$> x

full_name: Functor.ext
code: theorem Functor.ext {F} :
    ∀ {F1 : Functor F} {F2 : Functor F} [@LawfulFunctor F F1] [@LawfulFunctor F F2],
    (∀ (α β) (f : α → β) (x : F α), @Functor.map _ F1 _ _ f x = @Functor.map _ F2 _ _ f x) →
    F1 = F2
  
goal: (∀ (α β : Type u_1) (f : α → β) (x : F α), f <$> x = f <$> x) → F1 = F2

full_name: id.mk
code: /-- Introduce `id` as a quasi-functor. (Note that where a lawful `Monad` or
`Applicative` or `Functor` is needed, `Id` is the correct definition). -/
def id.mk {α : Sort u} : α → id α 
goal: α → id α

full_name: Functor.Const
code: /-- `Const α` is the constant functor, mapping every type to `α`. When
`α` has a monoid structure, `Const α` has an `Applicative` instance.
(If `α` has an additive monoid structure, see `Functor.AddConst`.) -/
@[nolint unusedArguments]
def Const (α : Type*) (_β : Type*) 
goal: Type u_1

full_name: Functor.Const.mk
code: /-- `Const.mk` is the canonical map `α → Const α β` (the identity), and
it can be used as a pattern to extract this value. -/
@[match_pattern]
def Const.mk {α β} (x : α) : Const α β 
goal: Functor.Const α β

full_name: Functor.Const.mk'
code: /-- `Const.mk'` is `Const.mk` but specialized to map `α` to
`Const α PUnit`, where `PUnit` is the terminal object in `Type*`. -/
def Const.mk' {α} (x : α) : Const α PUnit 
goal: Functor.Const α PUnit.{u_2 + 1}

full_name: Functor.Const.run
code: /-- Extract the element of `α` from the `Const` functor. -/
def Const.run {α β} (x : Const α β) : α 
goal: α

full_name: Functor.Const.ext
code: protected theorem ext {α β} {x y : Const α β} (h : x.run = y.run) : x = y 
goal: x = y

full_name: Functor.Const.map
code: /-- The map operation of the `Const γ` functor. -/
@[nolint unusedArguments]
protected def map {γ α β} (_f : α → β) (x : Const γ β) : Const γ α 
goal: Functor.Const γ α

full_name: Functor.Const.functor
code: instance functor {γ} : Functor (Const γ) 
goal: Functor (Functor.Const γ)

full_name: Functor.Const.lawfulFunctor
code: instance lawfulFunctor {γ} : LawfulFunctor (Const γ) 
goal: LawfulFunctor (Functor.Const γ)

full_name: Functor.Const.instInhabited
code: instance {α β} [Inhabited α] : Inhabited (Const α β) 
goal: Inhabited (Functor.Const α β)

full_name: Functor.AddConst
code: /-- `AddConst α` is a synonym for constant functor `Const α`, mapping
every type to `α`. When `α` has an additive monoid structure,
`AddConst α` has an `Applicative` instance. (If `α` has a
multiplicative monoid structure, see `Functor.Const`.) -/
def AddConst (α : Type*) 
goal: Type u_1

full_name: Functor.AddConst.mk
code: /-- `AddConst.mk` is the canonical map `α → AddConst α β`, which is the identity,
where `AddConst α β = Const α β`. It can be used as a pattern to extract this value. -/
@[match_pattern]
def AddConst.mk {α β} (x : α) : AddConst α β 
goal: Functor.AddConst α β

full_name: Functor.AddConst.run
code: /-- Extract the element of `α` from the constant functor. -/
def AddConst.run {α β} : AddConst α β → α 
goal: Functor.AddConst α β → α

full_name: Functor.AddConst.functor
code: instance AddConst.functor {γ} : Functor (AddConst γ) 
goal: Functor (Functor.AddConst γ)

full_name: Functor.AddConst.lawfulFunctor
code: instance AddConst.lawfulFunctor {γ} : LawfulFunctor (AddConst γ) 
goal: LawfulFunctor (Functor.AddConst γ)

full_name: Functor.instInhabitedAddConst
code: instance {α β} [Inhabited α] : Inhabited (AddConst α β) 
goal: Inhabited (Functor.AddConst α β)

full_name: Functor.Comp
code: /-- `Functor.Comp` is a wrapper around `Function.Comp` for types.
    It prevents Lean's type class resolution mechanism from trying
    a `Functor (Comp F id)` when `Functor F` would do. -/
def Comp (F : Type u → Type w) (G : Type v → Type u) (α : Type v) : Type w 
goal: Type w

full_name: Functor.Comp.mk
code: /-- Construct a term of `Comp F G α` from a term of `F (G α)`, which is the same type.
Can be used as a pattern to extract a term of `F (G α)`. -/
@[match_pattern]
def Comp.mk {F : Type u → Type w} {G : Type v → Type u} {α : Type v} (x : F (G α)) : Comp F G α 
goal: Functor.Comp F G α

full_name: Functor.Comp.run
code: /-- Extract a term of `F (G α)` from a term of `Comp F G α`, which is the same type. -/
def Comp.run {F : Type u → Type w} {G : Type v → Type u} {α : Type v} (x : Comp F G α) : F (G α) 
goal: F (G α)

full_name: Functor.Comp.ext
code: protected theorem ext {α} {x y : Comp F G α} : x.run = y.run → x = y 
goal: x.run = y.run → x = y

full_name: Functor.Comp.instInhabited
code: instance {α} [Inhabited (F (G α))] : Inhabited (Comp F G α) 
goal: Inhabited (Functor.Comp F G α)

full_name: Functor.Comp.map
code: /-- The map operation for the composition `Comp F G` of functors `F` and `G`. -/
protected def map {α β : Type v} (h : α → β) : Comp F G α → Comp F G β
  
goal: Functor.Comp F G α → Functor.Comp F G β

full_name: Functor.Comp.functor
code: instance functor : Functor (Comp F G) 
goal: Functor (Functor.Comp F G)

full_name: Functor.Comp.map_mk
code: @[functor_norm]
theorem map_mk {α β} (h : α → β) (x : F (G α)) : h <$> Comp.mk x = Comp.mk ((h <$> ·) <$> x) 
goal: h <$> Functor.Comp.mk x = Functor.Comp.mk ((fun x => h <$> x) <$> x)

full_name: Functor.Comp.run_map
code: @[simp]
protected theorem run_map {α β} (h : α → β) (x : Comp F G α) :
    (h <$> x).run = (h <$> ·) <$> x.run 
goal: (h <$> x).run = (fun x => h <$> x) <$> x.run

full_name: Functor.Comp.id_map
code: protected theorem id_map : ∀ x : Comp F G α, Comp.map id x = x
  
goal: Functor.Comp.map id x = x

full_name: Functor.Comp.comp_map
code: protected theorem comp_map (g' : α → β) (h : β → γ) :
    ∀ x : Comp F G α, Comp.map (h ∘ g') x = Comp.map h (Comp.map g' x)
  
goal: Functor.Comp.map (h ∘ g') x = Functor.Comp.map h (Functor.Comp.map g' x)

full_name: Functor.Comp.lawfulFunctor
code: instance lawfulFunctor : LawfulFunctor (Comp F G) 
goal: LawfulFunctor (Functor.Comp F G)

full_name: Functor.Comp.functor_comp_id
code: theorem functor_comp_id {F} [AF : Functor F] [LawfulFunctor F] :
    @Comp.functor F Id _ _ = AF 
goal: Functor.Comp.functor = AF

full_name: Functor.Comp.functor_id_comp
code: theorem functor_id_comp {F} [AF : Functor F] [LawfulFunctor F] : @Comp.functor Id F _ _ = AF 
goal: Functor.Comp.functor = AF

full_name: Functor.Comp.seq
code: /-- The `<*>` operation for the composition of applicative functors. -/
protected def seq {α β : Type v} : Comp F G (α → β) → (Unit → Comp F G α) → Comp F G β
  
goal: Functor.Comp F G (α → β) → (Unit → Functor.Comp F G α) → Functor.Comp F G β

full_name: Functor.Comp.instPure
code: instance : Pure (Comp F G) 
goal: Pure (Functor.Comp F G)

full_name: Functor.Comp.instSeq
code: instance : Seq (Comp F G) 
goal: Seq (Functor.Comp F G)

full_name: Functor.Comp.run_pure
code: @[simp]
protected theorem run_pure {α : Type v} : ∀ x : α, (pure x : Comp F G α).run = pure (pure x)
  
goal: (pure x).run = pure (pure x)

full_name: Functor.Comp.run_seq
code: @[simp]
protected theorem run_seq {α β : Type v} (f : Comp F G (α → β)) (x : Comp F G α) :
    (f <*> x).run = (· <*> ·) <$> f.run <*> x.run 
goal: (Seq.seq f fun x_1 => x).run = Seq.seq ((fun x x_1 => Seq.seq x fun x => x_1) <$> f.run) fun x_1 => x.run

full_name: Functor.Comp.instApplicativeComp
code: instance instApplicativeComp : Applicative (Comp F G) 
goal: Applicative (Functor.Comp F G)

full_name: Functor.Liftp
code: /-- If we consider `x : F α` to, in some sense, contain values of type `α`,
predicate `Liftp p x` holds iff every value contained by `x` satisfies `p`. -/
def Liftp {α : Type u} (p : α → Prop) (x : F α) : Prop 
goal: Prop

full_name: Functor.Liftr
code: /-- If we consider `x : F α` to, in some sense, contain values of type `α`, then
`Liftr r x y` relates `x` and `y` iff (1) `x` and `y` have the same shape and
(2) we can pair values `a` from `x` and `b` from `y` so that `r a b` holds. -/
def Liftr {α : Type u} (r : α → α → Prop) (x y : F α) : Prop 
goal: Prop

full_name: Functor.supp
code: /-- If we consider `x : F α` to, in some sense, contain values of type `α`, then
`supp x` is the set of values of type `α` that `x` contains. -/
def supp {α : Type u} (x : F α) : Set α 
goal: Set α

full_name: Functor.of_mem_supp
code: theorem of_mem_supp {α : Type u} {x : F α} {p : α → Prop} (h : Liftp p x) : ∀ y ∈ supp x, p y 
goal: y ∈ Functor.supp x → p y

full_name: Functor.mapConstRev
code: /-- If `f` is a functor, if `fb : f β` and `a : α`, then `mapConstRev fb a` is the result of
  applying `f.map` to the constant function `β → α` sending everything to `a`, and then
  evaluating at `fb`. In other words it's `const a <$> fb`. -/
abbrev mapConstRev {f : Type u → Type v} [Functor f] {α β : Type u} :
    f β → α → f α 
goal: f β → α → f α

full_name: Functor._aux_Mathlib_Control_Functor___unexpand_Functor_mapConstRev_1
code: /-- If `f` is a functor, if `fb : f β` and `a : α`, then `mapConstRev fb a` is the result of
  applying `f.map` to the constant function `β → α` sending everything to `a`, and then
  evaluating at `fb`. In other words it's `const a <$> fb`. -/
infix:100 " $> " => Functor.mapConstRev
goal: Lean.PrettyPrinter.Unexpander

full_name: Functor.«_aux_Mathlib_Control_Functor___macroRules_Functor_term_$>__1»
code: /-- If `f` is a functor, if `fb : f β` and `a : α`, then `mapConstRev fb a` is the result of
  applying `f.map` to the constant function `β → α` sending everything to `a`, and then
  evaluating at `fb`. In other words it's `const a <$> fb`. -/
infix:100 " $> " => Functor.mapConstRev
goal: Lean.Macro