Documentation

Poly.Polynomial

Polynomial Functor #

-- TODO: there are various sorry-carrying proofs in below which require instances of CartesianExponentiable for various construcitons on morphisms. They need to be defined in Poly.Exponentiable.

structure MvPoly {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] (I : C) (O : C) :
Type (max u_1 u_2)

P : MvPoly I O is a multivariable polynomial with input variables in I, output variables in O, and with arities E dependent on I.

Instances For
    structure UvPoly {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] (E : C) (B : C) :
    Type (max u_1 u_2)

    P : UvPoly C is a polynomial functors in a single variable

    Instances For
      @[simp]
      @[simp]
      @[simp]
      theorem MvPoly.id_exp_adj_homEquiv_symm_apply_left {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] (I : C) (X : CategoryTheory.Over I) (Y : CategoryTheory.Over I) :
      ∀ (a : X (CategoryTheory.Functor.id (CategoryTheory.Over I)).obj Y), ((CartesianExponentiable.adj.homEquiv X Y).symm a).left = CategoryTheory.CategoryStruct.comp ((CategoryTheory.baseChange.id I).hom.app X).left ((CategoryTheory.Adjunction.id.homEquiv X Y).symm a).left
      @[simp]
      theorem MvPoly.id_exp_adj_counit_app_left {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] (I : C) (Y : CategoryTheory.Over I) :
      (CartesianExponentiable.adj.counit.app Y).left = CategoryTheory.CategoryStruct.comp ((CategoryTheory.baseChange.id I).hom.app Y).left ((CategoryTheory.Adjunction.id.homEquiv Y Y).symm (CategoryTheory.CategoryStruct.id Y)).left
      @[simp]
      @[simp]
      theorem MvPoly.id_exp_adj_unit_app_left {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] (I : C) (X : CategoryTheory.Over I) :
      (CartesianExponentiable.adj.unit.app X).left = ((CategoryTheory.baseChange.id I).inv.app X).left

      The identity polynomial in many variables.

      Equations
      Instances For

        Given an object X, The unique map initial.to X : ⊥_ C ⟶ X is exponentiable.

        Equations
        • One or more equations did not get rendered due to their size.

        The constant polynomial in many variables: for this we need the initial object.

        Equations
        Instances For
          def MvPoly.monomial {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {I : C} {O : C} {E : C} (i : E I) (p : E O) [CartesianExponentiable p] :
          MvPoly I O

          The monomial polynomial in many variables.

          Equations
          Instances For

            The sum of two polynomials in many variables.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              The product of two polynomials in many variables.

              Equations
              Instances For
                Equations
                • P.functor = (Δ_ P.i).comp ((Π_ P.p).comp (Σ_ P.o))
                Instances For
                  Equations
                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Equations
                      • P.pullback_fst Q = CategoryTheory.Limits.pullback.fst
                      Instances For
                        Equations
                        • P.pullback_snd Q = CategoryTheory.Limits.pullback.snd
                        Instances For
                          def MvPoly.pullback_counit {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {I : C} {J : C} {K : C} (P : MvPoly I J) (Q : MvPoly J K) :
                          (Δ_ Q.p).obj ((Π_ Q.p).obj (CategoryTheory.Over.mk (P.pullback_snd Q))) CategoryTheory.Over.mk (P.pullback_snd Q)
                          Equations
                          Instances For
                            def MvPoly.comp {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {I : C} {J : C} {K : C} (P : MvPoly I J) (Q : MvPoly J K) :
                            MvPoly I K
                            Equations
                            Instances For

                              The constant polynomial in many variables: for this we need the initial object.

                              Equations
                              Instances For
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def UvPoly.prod {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} {E' : C} {B' : C} (P : UvPoly E B) (Q : UvPoly E' B') [CategoryTheory.Limits.HasBinaryCoproducts C] :
                                  UvPoly ((E B') ⨿ B E') (B B')

                                  The product of two polynomials in a single variable.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For

                                    For a category C with binary products, P.functor : C ⥤ C is the functor associated to a single variable polynomial P : UvPoly E B.

                                    Equations
                                    Instances For
                                      Equations
                                      Instances For

                                        The projection morphism from b : B, X ^ (E b) to B.

                                        Equations
                                        Instances For

                                          We use the equivalence between Over (⊤_ C) and C to get functor : C ⥤ C. Alternatively we can give a direct definition of functor in terms of exponetials.

                                          Equations
                                          • P.functor' = CategoryTheory.equivOverTerminal.functor.comp (P.auxFunctor.comp CategoryTheory.equivOverTerminal.inverse)
                                          Instances For
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              def UvPoly.proj {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} (P : UvPoly E B) (X : C) :
                                              P.functor.obj X B

                                              The projection morphism from b : B, X ^ (E b) to B again.

                                              Equations
                                              • P.proj X = (((Δ_ E).comp (Π_ P.p)).obj X).hom
                                              Instances For
                                                def UvPoly.star {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} {F : C} (P : UvPoly E B) (Q : UvPoly F B) (g : E F) (h : P.p = CategoryTheory.CategoryStruct.comp g Q.p) :
                                                Q.functor P.functor

                                                Essentially star is just the pushforward Beck-Chevalley natural transformation associated to the square defined by g, but you have to compose with various natural isomorphisms.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  def UvPoly.apply {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} (P : UvPoly E B) (X : C) :
                                                  C

                                                  Evaluating a single variable polynomial at an object X

                                                  Equations
                                                  • P.apply X = P.functor.obj X
                                                  Instances For
                                                    @[simp]
                                                    @[simp]
                                                    theorem UvPoly.id_exp_adj_unit_app_left {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] (B : C) (X : CategoryTheory.Over B) :
                                                    (CartesianExponentiable.adj.unit.app X).left = ((CategoryTheory.baseChange.id B).inv.app X).left
                                                    @[simp]
                                                    theorem UvPoly.id_exp_adj_homEquiv_symm_apply_left {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] (B : C) (X : CategoryTheory.Over B) (Y : CategoryTheory.Over B) :
                                                    ∀ (a : X (CategoryTheory.Functor.id (CategoryTheory.Over B)).obj Y), ((CartesianExponentiable.adj.homEquiv X Y).symm a).left = CategoryTheory.CategoryStruct.comp ((CategoryTheory.baseChange.id B).hom.app X).left ((CategoryTheory.Adjunction.id.homEquiv X Y).symm a).left
                                                    @[simp]
                                                    @[simp]
                                                    theorem UvPoly.id_exp_adj_counit_app_left {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] (B : C) (Y : CategoryTheory.Over B) :
                                                    (CartesianExponentiable.adj.counit.app Y).left = CategoryTheory.CategoryStruct.comp ((CategoryTheory.baseChange.id B).hom.app Y).left ((CategoryTheory.Adjunction.id.homEquiv Y Y).symm (CategoryTheory.CategoryStruct.id Y)).left
                                                    @[simp]

                                                    The identity polynomial functor in single variable.

                                                    Equations
                                                    Instances For

                                                      Evaluating the identity polynomial at an object X is isomorphic to B × X.

                                                      Equations
                                                      Instances For
                                                        structure UvPoly.Hom {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} {E' : C} {B' : C} (P : UvPoly E B) (Q : UvPoly E' B') :
                                                        Type u_3

                                                        A morphism from a polynomial P to a polynomial Q is a pair of morphisms e : E ⟶ E' and b : B ⟶ B' such that the diagram

                                                          E ---P.p--> B
                                                          |           |
                                                          e           b
                                                          |           |
                                                          v           v
                                                          E' --Q.p--> B'
                                                        

                                                        is a pullback square.

                                                        Instances For
                                                          theorem UvPoly.Hom.is_pullback {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} {E' : C} {B' : C} {P : UvPoly E B} {Q : UvPoly E' B'} (self : P.Hom Q) :
                                                          CategoryTheory.IsPullback P.p self.e self.b Q.p
                                                          def UvPoly.Hom.id {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} (P : UvPoly E B) :
                                                          P.Hom P
                                                          Equations
                                                          Instances For
                                                            def UvPoly.Hom.comp {C : Type u_2} [CategoryTheory.Category.{u_3, u_2} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} {E' : C} {B' : C} {E'' : C} {B'' : C} {P : UvPoly E B} {Q : UvPoly E' B'} {R : UvPoly E'' B''} (f : P.Hom Q) (g : Q.Hom R) :
                                                            P.Hom R
                                                            Equations
                                                            Instances For

                                                              Bundling up the the polynomials over different bases to form the underlying type of the category of polynomials.

                                                              • E : C
                                                              • B : C
                                                              • poly : UvPoly self.E self.B
                                                              Instances For
                                                                Equations
                                                                Instances For

                                                                  The category of polynomial functors in a single variable.

                                                                  Equations
                                                                  def Total.ofHom {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} {E' : C} {B' : C} (P : UvPoly E B) (Q : UvPoly E' B') (α : P.Hom Q) :
                                                                  Equations
                                                                  • Total.ofHom P Q α = { e := α.e, b := α.b, is_pullback := }
                                                                  Instances For
                                                                    Equations

                                                                    Scaling a polynomial P by an object S is isomorphic to the product of const S and the polynomial P.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      def UvPoly.polyPair {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} (P : UvPoly E B) (Γ : C) (X : C) (be : Γ P.functor.obj X) :
                                                                      (b : Γ B) × (CategoryTheory.Limits.pullback b P.p X)
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For
                                                                        def UvPoly.pairPoly {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} (P : UvPoly E B) (Γ : C) (X : C) (b : Γ B) (e : CategoryTheory.Limits.pullback b P.p X) :
                                                                        Γ P.functor.obj X
                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          @[simp]
                                                                          theorem UvPoly.equiv_apply {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} (P : UvPoly E B) (Γ : C) (X : C) (be : Γ P.functor.obj X) :
                                                                          (P.equiv Γ X) be = P.polyPair Γ X be
                                                                          @[simp]
                                                                          theorem UvPoly.equiv_symm_apply {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} (P : UvPoly E B) (Γ : C) (X : C) :
                                                                          ∀ (x : (b : Γ B) × (CategoryTheory.Limits.pullback b P.p X)), (P.equiv Γ X).symm x = match x with | b, e => P.pairPoly Γ X b e
                                                                          def UvPoly.equiv {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} (P : UvPoly E B) (Γ : C) (X : C) :
                                                                          (Γ P.functor.obj X) (b : Γ B) × (CategoryTheory.Limits.pullback b P.p X)

                                                                          Universal property of the polynomial functor.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            theorem UvPoly.equiv_naturality {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] {E : C} {B : C} {Δ : C} {Γ : C} (σ : Δ Γ) (P : UvPoly E B) (X : C) (be : Γ P.functor.obj X) :
                                                                            (P.equiv Δ X) (CategoryTheory.CategoryStruct.comp σ be) = match (P.equiv Γ X) be with | b, e => CategoryTheory.CategoryStruct.comp σ b, CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullback.lift (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.pullback.fst σ) CategoryTheory.Limits.pullback.snd ) e

                                                                            UvPoly.equiv is natural in Γ.

                                                                            def UvPoly.foo {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] [CategoryTheory.Limits.HasBinaryProducts C] {P : UvPoly.Total C} {Q : UvPoly.Total C} (f : P Q) :
                                                                            (Σ_ P.poly.p).comp (Σ_ f.b) (Σ_ f.e).comp (Σ_ Q.poly.p)
                                                                            Equations
                                                                            Instances For
                                                                              def UvPoly.bar {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] [CategoryTheory.Limits.HasPullbacks C] [CategoryTheory.Limits.HasBinaryProducts C] {P : UvPoly.Total C} {Q : UvPoly.Total C} (f : P Q) :
                                                                              (Δ_ f.e).comp (Σ_ P.poly.p) (Σ_ Q.poly.p).comp (Δ_ f.b)
                                                                              Equations
                                                                              Instances For
                                                                                Equations
                                                                                Instances For

                                                                                  A map of polynomials induces a natural transformation between their associated functors.

                                                                                  Equations
                                                                                  Instances For