File: Mathlib/Data/PFunctor/Multivariate/Basic.lean

full_name: MvPFunctor
code: /-- multivariate polynomial functors
-/
@[pp_with_univ]
structure MvPFunctor (n : ℕ) where
  /-- The head type -/
  A : Type u
  /-- The child family of types -/
  B : A → TypeVec.{u} n
goal: Type (u + 1)

full_name: MvPFunctor.B
code: /-- multivariate polynomial functors
-/
@[pp_with_univ]
structure MvPFunctor (n : ℕ) where
  /-- The head type -/
  A : Type u
  /-- The child family of types -/
  B : A → TypeVec.{u} n
goal: self.A → TypeVec.{u} n

full_name: MvPFunctor.A
code: /-- multivariate polynomial functors
-/
@[pp_with_univ]
structure MvPFunctor (n : ℕ) where
  /-- The head type -/
  A : Type u
  /-- The child family of types -/
  B : A → TypeVec.{u} n
goal: Type u

full_name: MvPFunctor.Obj
code: /-- Applying `P` to an object of `Type` -/
@[coe]
def Obj (α : TypeVec.{u} n) : Type u 
goal: Type u

full_name: MvPFunctor.instCoeFunForallTypeVecType
code: instance : CoeFun (MvPFunctor.{u} n) (fun _ => TypeVec.{u} n → Type u) 
goal: CoeFun (MvPFunctor.{u} n) fun x => TypeVec.{u} n → Type u

full_name: MvPFunctor.map
code: /-- Applying `P` to a morphism of `Type` -/
def map {α β : TypeVec n} (f : α ⟹ β) : P α → P β 
goal: ↑P α → ↑P β

full_name: MvPFunctor.instInhabited
code: instance : Inhabited (MvPFunctor n) 
goal: Inhabited (MvPFunctor.{u_1} n)

full_name: MvPFunctor.Obj.inhabited
code: instance Obj.inhabited {α : TypeVec n} [Inhabited P.A] [∀ i, Inhabited (α i)] :
    Inhabited (P α) 
goal: Inhabited (↑P α)

full_name: MvPFunctor.instMvFunctorObj
code: instance : MvFunctor.{u} P.Obj 
goal: MvFunctor ↑P

full_name: MvPFunctor.map_eq
code: theorem map_eq {α β : TypeVec n} (g : α ⟹ β) (a : P.A) (f : P.B a ⟹ α) :
    @MvFunctor.map _ P.Obj _ _ _ g ⟨a, f⟩ = ⟨a, g ⊚ f⟩ 
goal: g <$$> ⟨a, f⟩ = ⟨a, g ⊚ f⟩

full_name: MvPFunctor.id_map
code: theorem id_map {α : TypeVec n} : ∀ x : P α, TypeVec.id <$$> x = x
  
goal: TypeVec.id <$$> x = x

full_name: MvPFunctor.comp_map
code: theorem comp_map {α β γ : TypeVec n} (f : α ⟹ β) (g : β ⟹ γ) :
    ∀ x : P α, (g ⊚ f) <$$> x = g <$$> f <$$> x
  
goal: (g ⊚ f) <$$> x = g <$$> f <$$> x

full_name: MvPFunctor.instLawfulMvFunctorObj
code: instance : LawfulMvFunctor.{u} P.Obj 
goal: LawfulMvFunctor ↑P

full_name: MvPFunctor.const
code: /-- Constant functor where the input object does not affect the output -/
def const (n : ℕ) (A : Type u) : MvPFunctor n 
goal: MvPFunctor.{u} n

full_name: MvPFunctor.const.mk
code: /-- Constructor for the constant functor -/
def const.mk (x : A) {α} : const n A α 
goal: ↑(MvPFunctor.const n A) α

full_name: MvPFunctor.const.get
code: /-- Destructor for the constant functor -/
def const.get (x : const n A α) : A 
goal: A

full_name: MvPFunctor.const.get_map
code: @[simp]
theorem const.get_map (f : α ⟹ β) (x : const n A α) : const.get (f <$$> x) = const.get x 
goal: MvPFunctor.const.get (f <$$> x) = MvPFunctor.const.get x

full_name: MvPFunctor.const.get_mk
code: @[simp]
theorem const.get_mk (x : A) : const.get (const.mk n x : const n A α) = x 
goal: MvPFunctor.const.get (MvPFunctor.const.mk n x) = x

full_name: MvPFunctor.const.mk_get
code: @[simp]
theorem const.mk_get (x : const n A α) : const.mk n (const.get x) = x 
goal: MvPFunctor.const.mk n (MvPFunctor.const.get x) = x

full_name: MvPFunctor.comp
code: /-- Functor composition on polynomial functors -/
def comp (P : MvPFunctor.{u} n) (Q : Fin2 n → MvPFunctor.{u} m) : MvPFunctor m 
goal: MvPFunctor.{u} m

full_name: MvPFunctor.comp.mk
code: /-- Constructor for functor composition -/
def comp.mk (x : P (fun i => Q i α)) : comp P Q α 
goal: ↑(P.comp Q) α

full_name: MvPFunctor.comp.get
code: /-- Destructor for functor composition -/
def comp.get (x : comp P Q α) : P (fun i => Q i α) 
goal: ↑P fun i => ↑(Q i) α

full_name: MvPFunctor.comp.get_map
code: theorem comp.get_map (f : α ⟹ β) (x : comp P Q α) :
    comp.get (f <$$> x) = (fun i (x : Q i α) => f <$$> x) <$$> comp.get x 
goal: MvPFunctor.comp.get (f <$$> x) = (fun i x => f <$$> x) <$$> MvPFunctor.comp.get x

full_name: MvPFunctor.comp.get_mk
code: @[simp]
theorem comp.get_mk (x : P (fun i => Q i α)) : comp.get (comp.mk x) = x 
goal: MvPFunctor.comp.get (MvPFunctor.comp.mk x) = x

full_name: MvPFunctor.comp.mk_get
code: @[simp]
theorem comp.mk_get (x : comp P Q α) : comp.mk (comp.get x) = x 
goal: MvPFunctor.comp.mk (MvPFunctor.comp.get x) = x

full_name: MvPFunctor.liftP_iff
code: theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : P α) :
    LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ i j, p (f i j) 
goal: MvFunctor.LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), p (f i j)

full_name: MvPFunctor.liftP_iff'
code: theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x) 
goal: MvFunctor.LiftP p ⟨a, f⟩ ↔ ∀ (i : Fin2 n) (x : P.B a i), p (f i x)

full_name: MvPFunctor.liftR_iff
code: theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) 
goal: MvFunctor.LiftR r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), r (f₀ i j) (f₁ i j)

full_name: MvPFunctor.supp_eq
code: theorem supp_eq {α : TypeVec n} (a : P.A) (f : P.B a ⟹ α) (i) :
    @supp.{u} _ P.Obj _ α (⟨a, f⟩ : P α) i = f i '' univ 
goal: MvFunctor.supp ⟨a, f⟩ i = f i '' Set.univ

full_name: MvPFunctor.drop
code: /-- Split polynomial functor, get an n-ary functor
from an `n+1`-ary functor -/
def drop : MvPFunctor n 
goal: MvPFunctor.{u} n

full_name: MvPFunctor.last
code: /-- Split polynomial functor, get a univariate functor
from an `n+1`-ary functor -/
def last : PFunctor 
goal: PFunctor.{u}

full_name: MvPFunctor.appendContents
code: /-- append arrows of a polynomial functor application -/
abbrev appendContents {α : TypeVec n} {β : Type*} {a : P.A} (f' : P.drop.B a ⟹ α)
    (f : P.last.B a → β) : P.B a ⟹ (α ::: β) 
goal: P.B a ⟹ α ::: β