The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V33. Data structures and computation

Mathlib.Data.PFunctor.Multivariate.Basic

36 declarations. Mathlib docs · Source

theorem MvPFunctor.mk.inj E1 #

∀ {n : ℕ} {A : Type u} {B : A → TypeVec.{u} n} {A_1 : Type u} {B_1 : A_1 → TypeVec.{u} n},
  { A := A, B := B } = { A := A_1, B := B_1 } → A = A_1 ∧ B ≍ B_1

def MvPFunctor.ctorIdx E1 #

{n : ℕ} → MvPFunctor.{u} n → ℕ

theorem MvPFunctor.mk.injEq E0 #

∀ {n : ℕ} (A : Type u) (B : A → TypeVec.{u} n) (A_1 : Type u) (B_1 : A_1 → TypeVec.{u} n),
  ({ A := A, B := B } = { A := A_1, B := B_1 }) = (A = A_1 ∧ B ≍ B_1)

structure MvPFunctor E1 #

ℕ → Type (u + 1)

multivariate polynomial functors

ctor MvPFunctor.mk E0 #

{n : ℕ} → (A : Type u) → (A → TypeVec.{u} n) → MvPFunctor.{u} n

abbrev MvPFunctor.A E1 #

{n : ℕ} → MvPFunctor.{u} n → Type u

The head type

abbrev MvPFunctor.B E1 #

{n : ℕ} → (self : MvPFunctor.{u} n) → self.A → TypeVec.{u} n

The child family of types

def MvPFunctor.Obj E1 #

{n : ℕ} → MvPFunctor.{u} n → TypeVec.{u} n → Type u

Applying P to an object of Type

instance MvPFunctor.instCoeFunForallTypeVecType E0 #

{n : ℕ} → CoeFun (MvPFunctor.{u} n) fun x ↦ TypeVec.{u} n → Type u

def MvPFunctor.map E1 #

{n : ℕ} → (P : MvPFunctor.{u} n) → {α β : TypeVec.{u} n} → α.Arrow β → ↑P α → ↑P β

Applying P to a morphism of Type

instance MvPFunctor.instInhabited E0 #

{n : ℕ} → Inhabited (MvPFunctor.{u_1} n)

instance MvPFunctor.Obj.inhabited E0 #

{n : ℕ} →
  (P : MvPFunctor.{u} n) → {α : TypeVec.{u} n} → [Inhabited P.A] → [(i : Fin2 n) → Inhabited (α i)] → Inhabited (↑P α)

instance MvPFunctor.instMvFunctorObj E0 #

{n : ℕ} → (P : MvPFunctor.{u} n) → MvFunctor ↑P

theorem MvPFunctor.map_eq E0 #

∀ {n : ℕ} (P : MvPFunctor.{u} n) {α β : TypeVec.{u} n} (g : α.Arrow β) (a : P.A) (f : (P.B a).Arrow α),
  MvFunctor.map g ⟨a, f⟩ = ⟨a, TypeVec.comp g f⟩

theorem MvPFunctor.id_map E1 #

∀ {n : ℕ} (P : MvPFunctor.{u} n) {α : TypeVec.{u} n} (x : ↑P α), MvFunctor.map TypeVec.id x = x

theorem MvPFunctor.comp_map E1 #

∀ {n : ℕ} (P : MvPFunctor.{u} n) {α β γ : TypeVec.{u} n} (f : α.Arrow β) (g : β.Arrow γ) (x : ↑P α),
  MvFunctor.map (TypeVec.comp g f) x = MvFunctor.map g (MvFunctor.map f x)

instance MvPFunctor.instLawfulMvFunctorObj E0 #

∀ {n : ℕ} (P : MvPFunctor.{u} n), LawfulMvFunctor ↑P

def MvPFunctor.const E1 #

(n : ℕ) → Type u → MvPFunctor.{u} n

Constant functor where the input object does not affect the output

def MvPFunctor.const.mk E1 #

(n : ℕ) → {A : Type u} → A → {α : TypeVec.{u} n} → ↑(MvPFunctor.const n A) α

Constructor for the constant functor

def MvPFunctor.const.get E1 #

{n : ℕ} → {A : Type u} → {α : TypeVec.{u} n} → ↑(MvPFunctor.const n A) α → A

Destructor for the constant functor

theorem MvPFunctor.const.get_map E0 #

∀ {n : ℕ} {A : Type u} {α β : TypeVec.{u} n} (f : α.Arrow β) (x : ↑(MvPFunctor.const n A) α),
  MvPFunctor.const.get (MvFunctor.map f x) = MvPFunctor.const.get x

theorem MvPFunctor.const.get_mk E0 #

∀ {n : ℕ} {A : Type u} {α : TypeVec.{u} n} (x : A), MvPFunctor.const.get (MvPFunctor.const.mk n x) = x

theorem MvPFunctor.const.mk_get E0 #

∀ {n : ℕ} {A : Type u} {α : TypeVec.{u} n} (x : ↑(MvPFunctor.const n A) α),
  MvPFunctor.const.mk n (MvPFunctor.const.get x) = x

def MvPFunctor.comp E1 #

{n m : ℕ} → MvPFunctor.{u} n → (Fin2 n → MvPFunctor.{u} m) → MvPFunctor.{u} m

Functor composition on polynomial functors

def MvPFunctor.comp.mk E1 #

{n m : ℕ} →
  {P : MvPFunctor.{u} n} → {Q : Fin2 n → MvPFunctor.{u} m} → {α : TypeVec.{u} m} → (↑P fun i ↦ ↑(Q i) α) → ↑(P.comp Q) α

Constructor for functor composition

def MvPFunctor.comp.get E1 #

{n m : ℕ} →
  {P : MvPFunctor.{u} n} → {Q : Fin2 n → MvPFunctor.{u} m} → {α : TypeVec.{u} m} → ↑(P.comp Q) α → ↑P fun i ↦ ↑(Q i) α

Destructor for functor composition

theorem MvPFunctor.comp.get_map E1 #

∀ {n m : ℕ} {P : MvPFunctor.{u} n} {Q : Fin2 n → MvPFunctor.{u} m} {α β : TypeVec.{u} m} (f : α.Arrow β)
  (x : ↑(P.comp Q) α),
  MvPFunctor.comp.get (MvFunctor.map f x) = MvFunctor.map (fun i x ↦ MvFunctor.map f x) (MvPFunctor.comp.get x)

theorem MvPFunctor.comp.get_mk E0 #

∀ {n m : ℕ} {P : MvPFunctor.{u} n} {Q : Fin2 n → MvPFunctor.{u} m} {α : TypeVec.{u} m} (x : ↑P fun i ↦ ↑(Q i) α),
  MvPFunctor.comp.get (MvPFunctor.comp.mk x) = x

theorem MvPFunctor.comp.mk_get E0 #

∀ {n m : ℕ} {P : MvPFunctor.{u} n} {Q : Fin2 n → MvPFunctor.{u} m} {α : TypeVec.{u} m} (x : ↑(P.comp Q) α),
  MvPFunctor.comp.mk (MvPFunctor.comp.get x) = x

theorem MvPFunctor.liftP_iff E0 #

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

theorem MvPFunctor.liftP_iff' E1 #

∀ {n : ℕ} {P : MvPFunctor.{u} n} {α : TypeVec.{u} n} (p : ⦃i : Fin2 n⦄ → α i → Prop) (a : P.A) (f : (P.B a).Arrow α),
  MvFunctor.LiftP p ⟨a, f⟩ ↔ ∀ (i : Fin2 n) (x : P.B a i), p (f i x)

theorem MvPFunctor.liftR_iff E0 #

∀ {n : ℕ} {P : MvPFunctor.{u} n} {α : TypeVec.{u} n} (r : ⦃i : Fin2 n⦄ → α i → α i → Prop) (x y : ↑P α),
  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)

theorem MvPFunctor.supp_eq E0 #

∀ {n : ℕ} {P : MvPFunctor.{u} n} {α : TypeVec.{u} n} (a : P.A) (f : (P.B a).Arrow α) (i : Fin2 n),
  MvFunctor.supp ⟨a, f⟩ i = f i '' Set.univ

def MvPFunctor.drop E1 #

{n : ℕ} → MvPFunctor.{u} (n + 1) → MvPFunctor.{u} n

Split polynomial functor, get an n-ary functor from an n+1-ary functor

def MvPFunctor.last E1 #

{n : ℕ} → MvPFunctor.{u} (n + 1) → PFunctor.{u, u}

Split polynomial functor, get a univariate functor from an n+1-ary functor

abbrev MvPFunctor.appendContents E1 #

{n : ℕ} →
  (P : MvPFunctor.{u} (n + 1)) →
    {α : TypeVec.{u_1} n} →
      {β : Type u_1} → {a : P.A} → (P.drop.B a).Arrow α → (P.last.B a → β) → (P.B a).Arrow (α ::: β)

append arrows of a polynomial functor application