The composition of QPFs is itself a QPF #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
We define composition between one n
-ary functor and n
m
-ary functors
and show that it preserves the QPF structure
@[protected]
def
mvqpf.comp.map'
{n m : ℕ}
{G : fin2 n → typevec m → Type u}
[fG : Π (i : fin2 n), mvfunctor (G i)]
{α β : typevec m}
(f : α.arrow β) :
typevec.arrow (λ (i : fin2 n), G i α) (λ (i : fin2 n), G i β)
map operation defined on a vector of functors
Equations
- mvqpf.comp.map' f = λ (i : fin2 n), mvfunctor.map f
@[protected]
def
mvqpf.comp.map
{n m : ℕ}
{F : typevec n → Type u_1}
[fF : mvfunctor F]
{G : fin2 n → typevec m → Type u}
[fG : Π (i : fin2 n), mvfunctor (G i)]
{α β : typevec m}
(f : α.arrow β) :
mvqpf.comp F G α → mvqpf.comp F G β
The composition of functors is itself functorial
Equations
- mvqpf.comp.map f = mvfunctor.map (λ (i : fin2 n), mvfunctor.map f)
theorem
mvqpf.comp.map_mk
{n m : ℕ}
{F : typevec n → Type u_1}
[fF : mvfunctor F]
{G : fin2 n → typevec m → Type u}
[fG : Π (i : fin2 n), mvfunctor (G i)]
{α β : typevec m}
(f : α.arrow β)
(x : F (λ (i : fin2 n), G i α)) :
mvfunctor.map f (mvqpf.comp.mk x) = mvqpf.comp.mk (mvfunctor.map (λ (i : fin2 n) (x : G i α), mvfunctor.map f x) x)
theorem
mvqpf.comp.get_map
{n m : ℕ}
{F : typevec n → Type u_1}
[fF : mvfunctor F]
{G : fin2 n → typevec m → Type u}
[fG : Π (i : fin2 n), mvfunctor (G i)]
{α β : typevec m}
(f : α.arrow β)
(x : mvqpf.comp F G α) :
(mvfunctor.map f x).get = mvfunctor.map (λ (i : fin2 n) (x : G i α), mvfunctor.map f x) x.get
@[protected, instance]
def
mvqpf.comp.mvqpf
{n m : ℕ}
{F : typevec n → Type u_1}
[fF : mvfunctor F]
[q : mvqpf F]
{G : fin2 n → typevec m → Type u}
[fG : Π (i : fin2 n), mvfunctor (G i)]
[q' : Π (i : fin2 n), mvqpf (G i)] :
mvqpf (mvqpf.comp F G)
Equations
- mvqpf.comp.mvqpf = {P := (mvqpf.P F).comp (λ (i : fin2 n), mvqpf.P (G i)), abs := λ (α : typevec m), mvqpf.comp.mk ∘ mvfunctor.map (λ (i : fin2 n), mvqpf.abs) ∘ mvqpf.abs ∘ mvpfunctor.comp.get, repr := λ (α : typevec m), mvpfunctor.comp.mk ∘ mvqpf.repr ∘ mvfunctor.map (λ (i : fin2 n), mvqpf.repr) ∘ mvqpf.comp.get, abs_repr := _, abs_map := _}