Dependent product and sum of QPFs are QPFs #
Dependent sum of an n-ary functor. The sum can range over
data types like ℕ or over Type.{u-1}
Equations
- MvQPF.Sigma F v = ((α : A) × F α v)
Instances For
Dependent product of an n-ary functor. The sum can range over
data types like ℕ or over Type.{u-1}
Instances For
@[instance_reducible]
instance MvQPF.Sigma.inhabited {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) {α : TypeVec.{u} n} [Inhabited A] [Inhabited (F default α)] :
@[instance_reducible]
instance MvQPF.Pi.inhabited {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) {α : TypeVec.{u} n} [(a : A) → Inhabited (F a α)] :
Equations
- MvQPF.Pi.inhabited F = { default := fun (_a : A) => default }
@[instance_reducible]
instance MvQPF.Sigma.instMvFunctor {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) [(α : A) → MvFunctor (F α)] :
Equations
- MvQPF.Sigma.instMvFunctor F = { map := fun {α β : TypeVec.{?u.1} n} (f : α.Arrow β) (x : MvQPF.Sigma F α) => match x with | ⟨a, x⟩ => ⟨a, MvFunctor.map f x⟩ }
polynomial functor representation of a dependent sum
Equations
Instances For
def MvQPF.Sigma.repr {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) [(α : A) → MvQPF (F α)] ⦃α : TypeVec.{u} n⦄ :
representation function for dependent sums
Equations
- MvQPF.Sigma.repr F ⟨a, x_1⟩ = ⟨⟨a, (MvQPF.repr x_1).fst⟩, (MvQPF.repr x_1).snd⟩
Instances For
@[instance_reducible]
instance MvQPF.Sigma.inst {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) [(α : A) → MvQPF (F α)] :
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
instance MvQPF.Pi.instMvFunctor {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) [(α : A) → MvFunctor (F α)] :
Equations
- MvQPF.Pi.instMvFunctor F = { map := fun {α β : TypeVec.{?u.1} n} (f : α.Arrow β) (x : MvQPF.Pi F α) (a : A) => MvFunctor.map f (x a) }
polynomial functor representation of a dependent product
Equations
Instances For
def MvQPF.Pi.abs {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) [(α : A) → MvQPF (F α)] ⦃α : TypeVec.{u} n⦄ :
abstraction function for dependent products
Equations
Instances For
def MvQPF.Pi.repr {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) [(α : A) → MvQPF (F α)] ⦃α : TypeVec.{u} n⦄ :
representation function for dependent products
Equations
- MvQPF.Pi.repr F x✝ = ⟨fun (a : A) => (MvQPF.repr (x✝ a)).fst, fun (_i : Fin2 n) (a : (MvQPF.Pi.P F).B (fun (a : A) => (MvQPF.repr (x✝ a)).fst) _i) => (MvQPF.repr (x✝ a.fst)).snd _i a.snd⟩
Instances For
@[instance_reducible]
instance MvQPF.Pi.inst {n : ℕ} {A : Type u} (F : A → TypeVec.{u} n → Type u) [(α : A) → MvQPF (F α)] :
Equations
- MvQPF.Pi.inst F = { toMvFunctor := MvQPF.Pi.instMvFunctor F, P := MvQPF.Pi.P F, abs := MvQPF.Pi.abs F, repr := MvQPF.Pi.repr F, abs_repr := ⋯, abs_map := ⋯ }