Documentation

CatCryptCore.Category.Fam

Category of Families as a Symmetric Monoidal Category #

For any category C, the category Fam C of families forms a symmetric monoidal category with Sum as tensor and Empty as unit.

Objects are pairs (ι : Type, objs : ι → C). Morphisms carry an equivalence σ : ι₁ ≃ ι₂ together with componentwise C-morphisms.

The tensor uses Sum on index types and Sum.elim on objects, giving definitional reductions for all structural morphisms (associator, braiding, unitors).

Main results #

Objects of the family category: a type ι indexing objects of C.

Instances For

    Morphisms in the family category: an equivalence on index types with componentwise C-morphisms.

    Instances For
      theorem CatCrypt.Category.FamObj.fam_ext {C : Type u} [CategoryTheory.Category.{v, u} C] {X Y : FamObj C} {f g : X.Hom Y} ( : f.σ = g.σ) (hmap : ∀ (i : X.ι), f.map i g.map i) :
      f = g

      Two morphisms are equal iff σ agrees and map agrees (up to HEq).

      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      Equations

      Monoidal definitions #

      Tensor product of families: Sum on index types, Sum.elim on objects.

      Equations
      Instances For

        Unit for tensor: empty family.

        Equations
        Instances For
          noncomputable def CatCrypt.Category.FamObj.wkL {C : Type u} [CategoryTheory.Category.{v, u} C] (X : FamObj C) {Y₁ Y₂ : FamObj C} (f : Y₁ Y₂) :
          X.tensorObj Y₁ X.tensorObj Y₂

          Left whiskering: identity on the left component, f on the right.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def CatCrypt.Category.FamObj.wkR {C : Type u} [CategoryTheory.Category.{v, u} C] {X₁ X₂ : FamObj C} (f : X₁ X₂) (Y : FamObj C) :
            X₁.tensorObj Y X₂.tensorObj Y

            Right whiskering: f on the left component, identity on the right.

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

              Associator forward.

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

                Associator backward.

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

                  Braiding.

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

                    Left and right unitors #

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

                        Equiv application lemmas #

                        Mathlib's Equiv.sumCongr_apply doesn't fire in simp through the FunLike.coe discrimination tree. These specific lemmas bypass the issue by stating applications directly. All proved by rfl (definitional).

                        @[simp]
                        theorem CatCrypt.Category.FamObj.sumCongr_refl_inl {α α' β : Type} (e : α α') (a : α) :
                        (e.sumCongr (Equiv.refl β)) (Sum.inl a) = Sum.inl (e a)
                        @[simp]
                        theorem CatCrypt.Category.FamObj.sumCongr_refl_inr {α α' β : Type} (e : α α') (b : β) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.refl_sumCongr_inl {α β β' : Type} (e : β β') (a : α) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.refl_sumCongr_inr {α β β' : Type} (e : β β') (b : β) :
                        ((Equiv.refl α).sumCongr e) (Sum.inr b) = Sum.inr (e b)
                        @[simp]
                        theorem CatCrypt.Category.FamObj.sumAssoc_inl_inl {α β γ : Type} (a : α) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.sumAssoc_inl_inr {α β γ : Type} (b : β) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.sumAssoc_inr {α β γ : Type} (c : γ) :
                        @[simp]
                        @[simp]
                        @[simp]
                        theorem CatCrypt.Category.FamObj.sumComm_inl {α β : Type} (a : α) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.sumComm_inr {α β : Type} (b : β) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.trans_apply' {α β γ : Type} (e₁ : α β) (e₂ : β γ) (a : α) :
                        (e₁.trans e₂) a = e₂ (e₁ a)

                        Equiv-level σ lemmas #

                        These rewrite Hom.σ (a struct projection returning an Equiv) to the concrete Equiv constructor. Since Hom.σ is a struct projection (not going through FunLike.coe), these fire reliably in simp.

                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkL_σ_eq {C : Type u} [CategoryTheory.Category.{v, u} C] (X : FamObj C) {Y₁ Y₂ : FamObj C} (f : Y₁ Y₂) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkR_σ_eq {C : Type u} [CategoryTheory.Category.{v, u} C] {X₁ X₂ : FamObj C} (f : X₁ X₂) (Y : FamObj C) :

                        Per-constructor simp lemmas for map #

                        These fire fine in simp because Hom.map is a direct struct projection (no FunLike.coe coercion chain).

                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkL_map_inl {C : Type u} [CategoryTheory.Category.{v, u} C] (X : FamObj C) {Y₁ Y₂ : FamObj C} (f : Y₁ Y₂) (a : X.ι) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkL_map_inr {C : Type u} [CategoryTheory.Category.{v, u} C] (X : FamObj C) {Y₁ Y₂ : FamObj C} (f : Y₁ Y₂) (b : Y₁.ι) :
                        (X.wkL f).map (Sum.inr b) = f.map b
                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkR_map_inl {C : Type u} [CategoryTheory.Category.{v, u} C] {X₁ X₂ : FamObj C} (f : X₁ X₂) (Y : FamObj C) (a : X₁.ι) :
                        (wkR f Y).map (Sum.inl a) = f.map a
                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkR_map_inr {C : Type u} [CategoryTheory.Category.{v, u} C] {X₁ X₂ : FamObj C} (f : X₁ X₂) (Y : FamObj C) (b : Y.ι) :

                        Small morphism-level lemmas #

                        These operate at the level of whole morphisms (not components), allowing MonoidalCategory axioms to be proved by rewriting rather than fam_ext.

                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkL_comp {C : Type u} [CategoryTheory.Category.{v, u} C] (X : FamObj C) {Y₁ Y₂ Y₃ : FamObj C} (f : Y₁ Y₂) (g : Y₂ Y₃) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkR_comp {C : Type u} [CategoryTheory.Category.{v, u} C] {X₁ X₂ X₃ : FamObj C} (f : X₁ X₂) (g : X₂ X₃) (Y : FamObj C) :
                        @[simp]
                        theorem CatCrypt.Category.FamObj.wkR_wkL_comm {C : Type u} [CategoryTheory.Category.{v, u} C] {X₁ X₂ : FamObj C} (f : X₁ X₂) {Y₁ Y₂ : FamObj C} (g : Y₁ Y₂) :
                        @[simp]

                        Naturality lemmas for structural morphisms #

                        These express naturality of assocHom, braidHom, and unitors with respect to wkR/wkL. Proofs use erw which matches through dependent function arguments via isDefEq, unlike simp/dsimp which use discrimination trees.

                        Isomorphisms #

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

                            Simp lemmas bridging class projections to concrete definitions #

                            @[simp]

                            Tactic for map-field goals #

                            For goals involving only structural morphisms (all 𝟙 map components), erw with isDefEq matching can rewrite inside dependent function arguments where simp/dsimp discrimination trees cannot. The pattern is:

                            1. erw [FamObj.comp_map] to expand compositions
                            2. erw [specific_map_lemma] to reduce individual .map calls
                            3. erw [Category.id_comp] to close residual 𝟙 ≫ 𝟙 = 𝟙 goals

                            For naturality axioms, we use morphism-level intermediate lemmas (assocHom_wkR, braidHom_wkR, etc.) to avoid complex erw chains.

                            MonoidalCategory #

                            @[implicit_reducible]
                            Equations
                            • One or more equations did not get rendered due to their size.

                            BraidedCategory and SymmetricCategory #

                            @[implicit_reducible]
                            Equations
                            • One or more equations did not get rendered due to their size.