Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Group Objects and Internal Categories

Definition
QAlgorithms_Papers_Independent_Intake100_P20

by Gohan · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The objects the formalized statements of Group Objects and Internal Categories (arXiv:math/0212065) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • GroupMaps: PDF pp. 1–3: the three maps of an unbundled group object in Set.
  • GroupDiagrams: PDF pp. 1–3: associativity, both units, and both inverse diagrams.
  • mapsOfGroup: PDF p. 3: read the ordinary group operations as the structure maps.
  • groupOfMaps: PDF pp. 2–3: the group computed from the diagrammatic operations.
  • GroupObjectInGrp: PDF pp. 3–4: all three maps must be homomorphisms for the ORIGINAL ambient group multiplication. The internal multiplication is independent data.
  • GroupObjectInTop: PDF p. 3: a group object in Top uses joint continuity of multiplication. The unit map is explicitly included; it is the constant map from a singleton.
  • SmoothGroupObject: PDF p. 3 and footnote 3: a group object on a fixed real smooth manifold. The identity point defines an automatically smooth map from the point manifold.
  • ActionDiagrams: PDF pp. 4–5: the two diagrams for a left action; inversion is unused.
  • actionOfMap: PDF pp. 4–5: the ordinary action computed from the actual action map.
  • tensorRing: PDF p. 5 and footnote 5: the canonical ℤ-module presentation of Ab, with its TENSOR monoidal structure. This is Mathlib's actual ring construction. We use the category of small ℤ-modules: Mathlib's tensor monoidal instance requires the module universe to equal the scalar universe, here Type 0.
  • TensorActionDiagrams: PDF p. 5: unit and associativity of a tensor action, evaluated on pure tensors. Linearity of the map on the tensor product gives BOTH distributivities.
  • CategoryMaps: PDF pp. 6–8: source, target, identity and composition, in total-arrow coordinates. compose g f denotes g after f and is used only if target f = source g. Outside that domain its value has no mathematical significance.
  • CategoryDiagrams: PDF pp. 6–8: every category diagram, including endpoint compatibility. Associativity is quantified over composable triples, with no identification of nested pullback TYPES.
  • categoryOfMaps: PDF pp. 6–8: the ordinary category constructed from an internal Set category. Its hom types are the source-target fibres of the ORIGINAL arrow set.
  • TotalArrow: PDF pp. 6–8: the set of all arrows of a small category.
  • mapsOfCategory: PDF pp. 6–8: the reverse construction uses the original category's arrows. A canonical filler is supplied for noncomposable pairs; it is never compared.
  • totalArrowEquiv: The reconstruction keeps the original total arrow, not merely its endpoints.
  • totalHomEquiv: The hom of an ordinary category is recovered as the matching total-arrow fibre.
  • emptyCategoryMaps: The empty category and all its diagrams are retained.
  • InternalCategoryInGrp: PDF p. 8: structure maps are homomorphisms; composition is a homomorphism on the composable-pair subgroup, including its identity element.
  • FunctorDiagrams: PDF p. 8: functors in total-arrow coordinates preserve endpoints, identities and composition. No action on off-domain composites is required.
  • productCategoryMaps: PDF p. 8: the cartesian product category.
  • pointCategoryMaps: PDF p. 8: the one-object discrete terminal category called 0 in the paper.
  • GroupObjectInCat: PDF p. 8: a STRICT group object in Cat, with pointwise group operations on objects and arrows. Their associativity, units, and both inverse laws come from the given Group structures; multiplication, unit and inversion must all be functors. Group inversion is not an assumed categorical inverse of arrows.
  • splitAction: PDF p. 9: the conjugation action belonging to the specified splitting.
  • splitCoordinates: PDF p. 9: the computed split coordinates, including the kernel witness.
  • splitAssembly: PDF p. 9: the inverse map sends (k,x) to k e(x).
  • CrossedModule: PDF p. 9: exactly the two crossed-module axioms, with an action by GROUP AUTOMORPHISMS, as clarified on p. 10.
  • crossedCategoryMaps: PDF pp. 9–10: the actual crossed-module category on the semidirect product. The formula for composition is used ONLY on composable pairs.
  • sourceHom: PDF p. 8: bundle the source homomorphism already in the internal data.
  • targetHom: PDF p. 8: bundle the target homomorphism already in the internal data.
  • identityHom: PDF p. 8: bundle the identity homomorphism already in the internal data.
  • kernelBoundary: PDF p. 11: restrict the ACTUAL target to the ACTUAL source kernel.
  • kernelAction: PDF p. 11: x acts on the kernel by identity(x) k identity(x) inverse.
  • categoryCoordinates: PDF pp. 9,11: the canonical coordinate map for the original category.
  • crossedKernelMap: PDF pp. 10–11: the canonical inclusion into the source kernel of the reconstructed category. It does not depend on a choice of an equivalence.
Definition code
import Mathlib

/-!
Statements from Forrester-Barker, *Group Objects and Internal Categories*,
arXiv:math/0212065v1. Page numbers are PDF page numbers.

All new interfaces are local to this paper. Cartesian diagrams in concrete
categories are written elementwise. The tensor product below is over ℤ.
Category composition is stored as a total function, as in the accepted
Renew46.P18 interface, but is used and compared only on composable pairs.
Its values on other pairs are immaterial and are never part of reconstruction.
No categorical inverse for arrows is assumed.
-/

namespace QAlgorithms.Papers.Independent.Intake100.P20

open CategoryTheory
open scoped TensorProduct Manifold ContDiff

universe u v w z

/-- PDF pp. 1–3: the three maps of an unbundled group object in Set. -/
structure GroupMaps (G : Type u) where
  mul : G → G → G
  unit : G
  inverse : G → G

/-- PDF pp. 1–3: associativity, both units, and both inverse diagrams. -/
structure GroupDiagrams {G : Type u} (D : GroupMaps G) : Prop where
  assoc : ∀ a b c, D.mul (D.mul a b) c = D.mul a (D.mul b c)
  unit_left : ∀ a, D.mul D.unit a = a
  unit_right : ∀ a, D.mul a D.unit = a
  inverse_left : ∀ a, D.mul (D.inverse a) a = D.unit
  inverse_right : ∀ a, D.mul a (D.inverse a) = D.unit

/-- PDF p. 3: read the ordinary group operations as the structure maps. -/
def mapsOfGroup (G : Type u) [Group G] : GroupMaps G :=
  ⟨(· * ·), 1, Inv.inv⟩

/-- PDF pp. 2–3: the group computed from the diagrammatic operations. -/
def groupOfMaps {G : Type u} (D : GroupMaps G) (h : GroupDiagrams D) : Group G where
  mul := D.mul
  one := D.unit
  inv := D.inverse
  mul_assoc := h.assoc
  one_mul := h.unit_left
  mul_one := h.unit_right
  inv_mul_cancel := h.inverse_left

/-- The conversion preserves the actual multiplication, unit, and inverse. -/
example {G : Type u} (D : GroupMaps G) (h : GroupDiagrams D) (a b : G) :
    (groupOfMaps D h).mul a b = D.mul a b ∧
    (groupOfMaps D h).one = D.unit ∧
    (groupOfMaps D h).inv a = D.inverse a := ⟨rfl, rfl, rfl⟩

/-- PDF pp. 3–4: all three maps must be homomorphisms for the ORIGINAL
ambient group multiplication. The internal multiplication is independent data. -/
def GroupObjectInGrp {G : Type u} [Group G] (D : GroupMaps G) : Prop :=
  GroupDiagrams D ∧ D.unit = 1 ∧ D.mul 1 1 = 1 ∧
  (∀ a b c d, D.mul (a * c) (b * d) = D.mul a b * D.mul c d) ∧
  D.inverse 1 = 1 ∧ (∀ a b, D.inverse (a * b) = D.inverse a * D.inverse b)

/-- Sanity: all group-object diagrams and homomorphism laws hold on the
one-element group; the forward hypotheses are not globally vacuous. -/
example : GroupObjectInGrp (mapsOfGroup PUnit) := by
  refine ⟨?_, rfl, rfl, ?_, rfl, ?_⟩
  · constructor <;> intros <;> exact Subsingleton.elim _ _
  · intros; exact Subsingleton.elim _ _
  · intros; exact Subsingleton.elim _ _

/-- PDF p. 3: a group object in Top uses joint continuity of multiplication.
The unit map is explicitly included; it is the constant map from a singleton. -/
def GroupObjectInTop {G : Type u} [TopologicalSpace G] (D : GroupMaps G) : Prop :=
  GroupDiagrams D ∧ Continuous (fun p : G × G => D.mul p.1 p.2) ∧
  Continuous (fun _ : PUnit.{1} => D.unit) ∧ Continuous D.inverse

/-- PDF p. 3 and footnote 3: a group object on a fixed real smooth manifold.
The identity point defines an automatically smooth map from the point manifold. -/
def SmoothGroupObject {E : Type v} [NormedAddCommGroup E] [NormedSpace ℝ E]
    {G : Type u} [TopologicalSpace G] [ChartedSpace E G] (D : GroupMaps G) : Prop :=
  GroupDiagrams D ∧
  ContMDiff ((𝓘(ℝ, E)).prod (𝓘(ℝ, E))) (𝓘(ℝ, E)) ∞
    (fun p : G × G => D.mul p.1 p.2) ∧
  ContMDiff (𝓘(ℝ, E)) (𝓘(ℝ, E)) ∞ D.inverse

/-- PDF pp. 4–5: the two diagrams for a left action; inversion is unused. -/
def ActionDiagrams {M : Type u} [Monoid M] {X : Type v} (n : M × X → X) : Prop :=
  (∀ x, n (1, x) = x) ∧ (∀ a b x, n (a * b, x) = n (a, n (b, x)))

/-- PDF pp. 4–5: the ordinary action computed from the actual action map. -/
def actionOfMap {M : Type u} [Monoid M] {X : Type v}
    (n : M × X → X) (h : ActionDiagrams n) : MulAction M X where
  smul a x := n (a, x)
  one_smul := h.1
  mul_smul := h.2

/-- Empty acted-on sets require no exceptional convention. -/
example {M : Type u} [Monoid M] {X : Type v} (n : M × X → X)
    (h : ActionDiagrams n) (a : M) (x : X) :
    @SMul.smul M X (actionOfMap n h).toSMul a x = n (a, x) := rfl

/-- PDF p. 5 and footnote 5: the canonical ℤ-module presentation of Ab,
with its TENSOR monoidal structure. This is Mathlib's actual ring construction.
We use the category of small ℤ-modules: Mathlib's tensor monoidal instance
requires the module universe to equal the scalar universe, here Type 0. -/
noncomputable def tensorRing (M : ModuleCat.{0} ℤ) [MonObj M] : Ring M :=
  ModuleCat.MonModuleEquivalenceAlgebra.MonObj.toRing M

/-- PDF p. 5: unit and associativity of a tensor action, evaluated on pure
 tensors. Linearity of the map on the tensor product gives BOTH distributivities. -/
def TensorActionDiagrams (M : ModuleCat.{0} ℤ) [MonObj M]
    (A : Type v) [AddCommGroup A]
    (n : TensorProduct ℤ M A →ₗ[ℤ] A) : Prop :=
  (∀ a, n ((MonObj.one (X := M) (1 : ℤ)) ⊗ₜ[ℤ] a) = a) ∧
  (∀ x y : M, ∀ a : A,
    n ((MonObj.mul (X := M) (x ⊗ₜ[ℤ] y)) ⊗ₜ[ℤ] a) =
      n (x ⊗ₜ[ℤ] n (y ⊗ₜ[ℤ] a)))

/-- Sanity: the zero abelian group is a tensor module, including when the
acting tensor ring is itself zero. -/
example (M : ModuleCat.{0} ℤ) [MonObj M] :
    TensorActionDiagrams M PUnit (0 : TensorProduct ℤ M PUnit →ₗ[ℤ] PUnit) := by
  constructor <;> intros <;> exact Subsingleton.elim _ _

/-- PDF pp. 6–8: source, target, identity and composition, in total-arrow
coordinates. compose g f denotes g after f and is used only if target f = source g.
Outside that domain its value has no mathematical significance. -/
structure CategoryMaps (A : Type u) (O : Type v) where
  source : A → O
  target : A → O
  identity : O → A
  compose : A → A → A

/-- PDF pp. 6–8: every category diagram, including endpoint compatibility.
Associativity is quantified over composable triples, with no identification of
nested pullback TYPES. -/
structure CategoryDiagrams {A : Type u} {O : Type v} (D : CategoryMaps A O) : Prop where
  source_identity : ∀ x, D.source (D.identity x) = x
  target_identity : ∀ x, D.target (D.identity x) = x
  source_compose : ∀ f g, D.target f = D.source g →
    D.source (D.compose g f) = D.source f
  target_compose : ∀ f g, D.target f = D.source g →
    D.target (D.compose g f) = D.target g
  identity_compose : ∀ f, D.compose (D.identity (D.target f)) f = f
  compose_identity : ∀ f, D.compose f (D.identity (D.source f)) = f
  assoc : ∀ f g h, D.target f = D.source g → D.target g = D.source h →
    D.compose h (D.compose g f) = D.compose (D.compose h g) f

/-- PDF pp. 6–8: the ordinary category constructed from an internal Set category.
Its hom types are the source-target fibres of the ORIGINAL arrow set. -/
def categoryOfMaps {A : Type u} {O : Type v} (D : CategoryMaps A O)
    (h : CategoryDiagrams D) : Category.{u} O where
  Hom x y := {f : A // D.source f = x ∧ D.target f = y}
  id x := ⟨D.identity x, h.source_identity x, h.target_identity x⟩
  comp f g := ⟨D.compose g.val f.val,
    (h.source_compose f.val g.val (f.property.2.trans g.property.1.symm)).trans f.property.1,
    (h.target_compose f.val g.val (f.property.2.trans g.property.1.symm)).trans g.property.2⟩
  id_comp := by
    intro x y f
    apply Subtype.ext
    change D.compose f.val (D.identity x) = f.val
    exact (congrArg (fun o => D.compose f.val (D.identity o)) f.property.1).symm.trans
      (h.compose_identity f.val)
  comp_id := by
    intro x y f
    apply Subtype.ext
    change D.compose (D.identity y) f.val = f.val
    exact (congrArg (fun o => D.compose (D.identity o) f.val) f.property.2).symm.trans
      (h.identity_compose f.val)
  assoc := by
    intro x y z q f g k
    apply Subtype.ext
    exact h.assoc f.val g.val k.val
      (f.property.2.trans g.property.1.symm) (g.property.2.trans k.property.1.symm)

/-- PDF pp. 6–8: the set of all arrows of a small category. -/
def TotalArrow (O : Type v) [Category.{u} O] := Σ x : O, Σ y : O, (x ⟶ y)

/-- PDF pp. 6–8: the reverse construction uses the original category's arrows.
A canonical filler is supplied for noncomposable pairs; it is never compared. -/
noncomputable def mapsOfCategory (O : Type v) [Category.{u} O] :
    CategoryMaps (TotalArrow O) O := by
  classical
  exact
    { source := fun f => f.1
      target := fun f => f.2.1
      identity := fun x => ⟨x, x, 𝟙 x⟩
      compose := fun g f => if h : f.2.1 = g.1 then
        ⟨f.1, g.2.1, f.2.2 ≫ eqToHom h ≫ g.2.2⟩ else f }

/-- The reconstruction keeps the original total arrow, not merely its endpoints. -/
def totalArrowEquiv {A : Type u} {O : Type v} (D : CategoryMaps A O)
    (h : CategoryDiagrams D) :
    letI := categoryOfMaps D h
    A ≃ TotalArrow O := by
  letI := categoryOfMaps D h
  exact
    { toFun := fun a => ⟨D.source a, D.target a, ⟨a, rfl, rfl⟩⟩
      invFun := fun f => f.2.2.val
      left_inv := fun _ => rfl
      right_inv := by
        rintro ⟨x, y, ⟨f, hs, ht⟩⟩
        cases hs
        cases ht
        rfl }

/-- The hom of an ordinary category is recovered as the matching total-arrow fibre. -/
noncomputable def totalHomEquiv (O : Type v) [Category.{u} O] (x y : O) :
    (x ⟶ y) ≃ {a : TotalArrow O // a.1 = x ∧ a.2.1 = y} where
  toFun f := ⟨⟨x, y, f⟩, rfl, rfl⟩
  invFun a := eqToHom a.property.1.symm ≫ a.val.2.2 ≫ eqToHom a.property.2
  left_inv := by intro f; simp
  right_inv := by
    rintro ⟨⟨a, b, f⟩, ha, hb⟩
    cases ha
    cases hb
    simp

/-- The empty category and all its diagrams are retained. -/
def emptyCategoryMaps : CategoryMaps Empty Empty where
  source := id
  target := id
  identity := id
  compose _ f := f

/-- Sanity: no nonemptiness hypothesis entered the category interface. -/
example : CategoryDiagrams emptyCategoryMaps where
  source_identity := by intro x; cases x
  target_identity := by intro x; cases x
  source_compose := by intro f; cases f
  target_compose := by intro f; cases f
  identity_compose := by intro f; cases f
  compose_identity := by intro f; cases f
  assoc := by intro f; cases f

/-- PDF p. 8: structure maps are homomorphisms; composition is a homomorphism
on the composable-pair subgroup, including its identity element. -/
structure InternalCategoryInGrp {A : Type u} {O : Type v}
    [Group A] [Group O] (D : CategoryMaps A O) : Prop where
  category : CategoryDiagrams D
  source_one : D.source 1 = 1
  source_mul : ∀ a b, D.source (a * b) = D.source a * D.source b
  target_one : D.target 1 = 1
  target_mul : ∀ a b, D.target (a * b) = D.target a * D.target b
  identity_one : D.identity 1 = 1
  identity_mul : ∀ x y, D.identity (x * y) = D.identity x * D.identity y
  compose_one : D.compose 1 1 = 1
  interchange : ∀ f g a b, D.target f = D.source g → D.target a = D.source b →
    D.compose (g * b) (f * a) = D.compose g f * D.compose b a

/-- PDF p. 8: functors in total-arrow coordinates preserve endpoints, identities
and composition. No action on off-domain composites is required. -/
def FunctorDiagrams {A : Type u} {O : Type v} {B : Type w} {P : Type z}
    (D : CategoryMaps A O) (E : CategoryMaps B P) (fo : O → P) (fa : A → B) : Prop :=
  (∀ a, E.source (fa a) = fo (D.source a) ∧ E.target (fa a) = fo (D.target a)) ∧
  (∀ x, fa (D.identity x) = E.identity (fo x)) ∧
  (∀ f g, D.target f = D.source g → fa (D.compose g f) = E.compose (fa g) (fa f))

/-- PDF p. 8: the cartesian product category. -/
def productCategoryMaps {A : Type u} {O : Type v} {B : Type w} {P : Type z}
    (D : CategoryMaps A O) (E : CategoryMaps B P) : CategoryMaps (A × B) (O × P) where
  source a := (D.source a.1, E.source a.2)
  target a := (D.target a.1, E.target a.2)
  identity x := (D.identity x.1, E.identity x.2)
  compose b a := (D.compose b.1 a.1, E.compose b.2 a.2)

/-- PDF p. 8: the one-object discrete terminal category called 0 in the paper. -/
def pointCategoryMaps : CategoryMaps PUnit.{1} PUnit.{1} :=
  ⟨fun _ => PUnit.unit, fun _ => PUnit.unit, fun _ => PUnit.unit,
    fun _ _ => PUnit.unit⟩

/-- Sanity: the point is a category, distinct from the empty category. -/
example : CategoryDiagrams pointCategoryMaps where
  source_identity := by intro x; exact Subsingleton.elim _ _
  target_identity := by intro x; exact Subsingleton.elim _ _
  source_compose := by intros; exact Subsingleton.elim _ _
  target_compose := by intros; exact Subsingleton.elim _ _
  identity_compose := by intros; exact Subsingleton.elim _ _
  compose_identity := by intros; exact Subsingleton.elim _ _
  assoc := by intros; exact Subsingleton.elim _ _

/-- Sanity: the singleton internal category satisfies every Grp diagram,
including the identity and multiplication laws on composable pairs. -/
example : InternalCategoryInGrp pointCategoryMaps := by
  constructor
  · constructor <;> intros <;> exact Subsingleton.elim _ _
  all_goals
    intros
    exact Subsingleton.elim _ _

/-- PDF p. 8: a STRICT group object in Cat, with pointwise group operations
on objects and arrows. Their associativity, units, and both inverse laws come
from the given Group structures; multiplication, unit and inversion must all be
functors. Group inversion is not an assumed categorical inverse of arrows. -/
def GroupObjectInCat {A : Type u} {O : Type v} [Group A] [Group O]
    (D : CategoryMaps A O) : Prop :=
  CategoryDiagrams D ∧
  FunctorDiagrams (productCategoryMaps D D) D (fun x => x.1 * x.2) (fun a => a.1 * a.2) ∧
  FunctorDiagrams pointCategoryMaps D (fun _ => 1) (fun _ => 1) ∧
  FunctorDiagrams D D Inv.inv Inv.inv

/-- PDF p. 9: the conjugation action belonging to the specified splitting. -/
def splitAction {A : Type u} {O : Type v} [Group A] [Group O]
    (s : A →* O) (e : O →* A) : O →* MulAut s.ker :=
  (MulAut.conjNormal : A →* MulAut s.ker).comp e

/-- PDF p. 9: the computed split coordinates, including the kernel witness. -/
def splitCoordinates {A : Type u} {O : Type v} [Group A] [Group O]
    (s : A →* O) (e : O →* A) (h : ∀ x, s (e x) = x) (a : A) :
    SemidirectProduct s.ker O (splitAction s e) :=
  ⟨⟨a * (e (s a))⁻¹, by
      change s (a * (e (s a))⁻¹) = 1
      simp only [map_mul, map_inv, h, mul_inv_cancel]⟩, s a⟩

/-- PDF p. 9: the inverse map sends (k,x) to k e(x). -/
def splitAssembly {A : Type u} {O : Type v} [Group A] [Group O]
    (s : A →* O) (e : O →* A)
    (a : SemidirectProduct s.ker O (splitAction s e)) : A := a.left.val * e a.right

/-- Sanity: the coordinate formulas preserve the multiplication order. -/
example {A : Type u} {O : Type v} [Group A] [Group O]
    (s : A →* O) (e : O →* A) (h : ∀ x, s (e x) = x) (a : A) :
    (splitCoordinates s e h a).left.val = a * (e (s a))⁻¹ ∧
    splitAssembly s e (splitCoordinates s e h a) =
      (a * (e (s a))⁻¹) * e (s a) := ⟨rfl, rfl⟩

/-- PDF p. 9: exactly the two crossed-module axioms, with an action by
GROUP AUTOMORPHISMS, as clarified on p. 10. -/
def CrossedModule {C : Type u} {G : Type v} [Group C] [Group G]
    (boundary : C →* G) (action : G →* MulAut C) : Prop :=
  (∀ g c, boundary (action g c) = g * boundary c * g⁻¹) ∧
  (∀ c d, action (boundary c) d = c * d * c⁻¹)

/-- Sanity: the one-element groups form a crossed module. -/
example : CrossedModule (MonoidHom.id PUnit) (1 : PUnit →* MulAut PUnit) := by
  constructor <;> intro a b <;> exact Subsingleton.elim _ _

/-- PDF pp. 9–10: the actual crossed-module category on the semidirect product.
The formula for composition is used ONLY on composable pairs. -/
def crossedCategoryMaps {C : Type u} {G : Type v} [Group C] [Group G]
    (boundary : C →* G) (action : G →* MulAut C) :
    CategoryMaps (SemidirectProduct C G action) G where
  source a := a.right
  target a := boundary a.left * a.right
  identity x := ⟨1, x⟩
  compose b a := ⟨b.left * a.left, a.right⟩

/-- Sanity: vertical composition is b.left * a.left, not the semidirect product. -/
example {C : Type u} {G : Type v} [Group C] [Group G]
    (d : C →* G) (r : G →* MulAut C) (a b : SemidirectProduct C G r) :
    (crossedCategoryMaps d r).source a = a.right ∧
    ((crossedCategoryMaps d r).compose b a).left = b.left * a.left := ⟨rfl, rfl⟩

/-- PDF p. 8: bundle the source homomorphism already in the internal data. -/
def sourceHom {A : Type u} {O : Type v} [Group A] [Group O]
    (D : CategoryMaps A O) (h : InternalCategoryInGrp D) : A →* O where
  toFun := D.source
  map_one' := h.source_one
  map_mul' := h.source_mul

/-- PDF p. 8: bundle the target homomorphism already in the internal data. -/
def targetHom {A : Type u} {O : Type v} [Group A] [Group O]
    (D : CategoryMaps A O) (h : InternalCategoryInGrp D) : A →* O where
  toFun := D.target
  map_one' := h.target_one
  map_mul' := h.target_mul

/-- PDF p. 8: bundle the identity homomorphism already in the internal data. -/
def identityHom {A : Type u} {O : Type v} [Group A] [Group O]
    (D : CategoryMaps A O) (h : InternalCategoryInGrp D) : O →* A where
  toFun := D.identity
  map_one' := h.identity_one
  map_mul' := h.identity_mul

/-- PDF p. 11: restrict the ACTUAL target to the ACTUAL source kernel. -/
def kernelBoundary {A : Type u} {O : Type v} [Group A] [Group O]
    (D : CategoryMaps A O) (h : InternalCategoryInGrp D) : (sourceHom D h).ker →* O :=
  (targetHom D h).comp (sourceHom D h).ker.subtype

/-- PDF p. 11: x acts on the kernel by identity(x) k identity(x) inverse. -/
def kernelAction {A : Type u} {O : Type v} [Group A] [Group O]
    (D : CategoryMaps A O) (h : InternalCategoryInGrp D) : O →* MulAut (sourceHom D h).ker :=
  splitAction (sourceHom D h) (identityHom D h)

/-- PDF pp. 9,11: the canonical coordinate map for the original category. -/
def categoryCoordinates {A : Type u} {O : Type v} [Group A] [Group O]
    (D : CategoryMaps A O) (h : InternalCategoryInGrp D) :
    A → SemidirectProduct (sourceHom D h).ker O (kernelAction D h) :=
  splitCoordinates (sourceHom D h) (identityHom D h) h.category.source_identity

/-- PDF pp. 10–11: the canonical inclusion into the source kernel of the
reconstructed category. It does not depend on a choice of an equivalence. -/
def crossedKernelMap {C : Type u} {G : Type v} [Group C] [Group G]
    (action : G →* MulAut C) (c : C) :
    (SemidirectProduct.rightHom : SemidirectProduct C G action →* G).ker :=
  ⟨⟨c, 1⟩, rfl⟩

/-- Sanity: extracting the boundary and action retains the ORIGINAL target
and identity-conjugation maps, with no arbitrary replacement homomorphisms. -/
example {A : Type u} {O : Type v} [Group A] [Group O]
    (D : CategoryMaps A O) (h : InternalCategoryInGrp D)
    (k : (sourceHom D h).ker) (x : O) (a : A) :
    kernelBoundary D h k = D.target k.val ∧
    ((kernelAction D h x) k).val = D.identity x * k.val * (D.identity x)⁻¹ ∧
    (categoryCoordinates D h a).right = D.source a := ⟨rfl, rfl, rfl⟩

end QAlgorithms.Papers.Independent.Intake100.P20
Source
Group Objects and Internal Categories, arXiv:math/0212065v1, https://arxiv.org/abs/math/0212065v1
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

QAlgorithms.Papers.Independent.Intake100.P20.ActionDiagrams

For any monoid MMM, any type XXX, and any function n:M×X→Xn:M\times X\to Xn:M×X→X, this proposition requires

n(1,x)=xfor every x∈X,n(ab,x)=n(a,n(b,x))for every a,b∈M, x∈X.n(1,x)=x \quad\text{for every }x\in X, \qquad n(ab,x)=n(a,n(b,x)) \quad\text{for every }a,b\in M,\ x\in X.n(1,x)=xfor every x∈X,n(ab,x)=n(a,n(b,x))for every a,b∈M, x∈X.

The type XXX may be empty, in which case both requirements are vacuous.

QAlgorithms.Papers.Independent.Intake100.P20.CategoryDiagrams

For any types A,OA,OA,O and any four functions s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and c:A×A→Ac:A\times A\to Ac:A×A→A, this proposition consists of the following equations:

s(i(x))=x,t(i(x))=x(x∈O),s(c(g,f))=s(f),t(c(g,f))=t(g)(f,g∈A, t(f)=s(g)),c(i(t(f)),f)=f,c(f,i(s(f)))=f(f∈A),c(h,c(g,f))=c(c(h,g),f)(f,g,h∈A, t(f)=s(g), t(g)=s(h)).\begin{aligned} s(i(x))&=x,& t(i(x))&=x &&(x\in O),\\ s(c(g,f))&=s(f),& t(c(g,f))&=t(g) &&(f,g\in A,\ t(f)=s(g)),\\ c(i(t(f)),f)&=f,& c(f,i(s(f)))&=f &&(f\in A),\\ c(h,c(g,f))&=c(c(h,g),f) &&&&(f,g,h\in A,\ t(f)=s(g),\ t(g)=s(h)). \end{aligned}s(i(x))s(c(g,f))c(i(t(f)),f)c(h,c(g,f))​=x,=s(f),=f,=c(c(h,g),f)​t(i(x))t(c(g,f))c(f,i(s(f)))​=x=t(g)=f​​(x∈O),(f,g∈A, t(f)=s(g)),(f∈A),(f,g,h∈A, t(f)=s(g), t(g)=s(h)).​

The function ccc is defined on all pairs, but the source and target equations for composition apply only to composable pairs, and associativity applies only under the two displayed composability conditions. Quantification over an empty domain, or an implication whose composability premise fails, imposes no condition for those instances.

QAlgorithms.Papers.Independent.Intake100.P20.CategoryMaps

For any types AAA and OOO, this structure consists of four functions: a source map s:A→Os:A\to Os:A→O, a target map t:A→Ot:A\to Ot:A→O, an identity map i:O→Ai:O\to Ai:O→A, and a composition map c:A×A→Ac:A\times A\to Ac:A×A→A. There are no equations required of these functions. In particular, c(g,f)c(g,f)c(g,f) is defined for every pair g,f∈Ag,f\in Ag,f∈A, including pairs with t(f)≠s(g)t(f)\ne s(g)t(f)=s(g). Empty types are permitted whenever these four functions exist.

QAlgorithms.Papers.Independent.Intake100.P20.CrossedModule

For arbitrary groups CCC and GGG, a group homomorphism ∂:C→G\partial:C\to G∂:C→G, and a group homomorphism α:G→Aut⁡(C)\alpha:G\to\operatorname{Aut}(C)α:G→Aut(C), this definition is the proposition that both of the following identities hold:

∂(αg(c))=g ∂(c) g−1for every g∈G, c∈C,α∂(c)(d)=c d c−1for every c,d∈C.\partial(\alpha_g(c))=g\,\partial(c)\,g^{-1} \quad\text{for every }g\in G,\ c\in C, \qquad \alpha_{\partial(c)}(d)=c\,d\,c^{-1} \quad\text{for every }c,d\in C.∂(αg​(c))=g∂(c)g−1for every g∈G, c∈C,α∂(c)​(d)=cdc−1for every c,d∈C.

Here Aut⁡(C)\operatorname{Aut}(C)Aut(C) is the group of multiplicative automorphisms of CCC, and αg(c)\alpha_g(c)αg​(c) means the application of the automorphism assigned to ggg to the element ccc.

QAlgorithms.Papers.Independent.Intake100.P20.FunctorDiagrams

For arbitrary types A,O,B,PA,O,B,PA,O,B,P, suppose given total maps sD,tD:A→Os_D,t_D:A\to OsD​,tD​:A→O, iD:O→Ai_D:O\to AiD​:O→A, cD:A×A→Ac_D:A\times A\to AcD​:A×A→A, and total maps sE,tE:B→Ps_E,t_E:B\to PsE​,tE​:B→P, iE:P→Bi_E:P\to BiE​:P→B, cE:B×B→Bc_E:B\times B\to BcE​:B×B→B, together with functions FO:O→PF_O:O\to PFO​:O→P and FA:A→BF_A:A\to BFA​:A→B. This defines the proposition that, for every a∈Aa\in Aa∈A, sE(FA(a))=FO(sD(a))s_E(F_A(a))=F_O(s_D(a))sE​(FA​(a))=FO​(sD​(a)) and tE(FA(a))=FO(tD(a))t_E(F_A(a))=F_O(t_D(a))tE​(FA​(a))=FO​(tD​(a)); for every x∈Ox\in Ox∈O, FA(iD(x))=iE(FO(x))F_A(i_D(x))=i_E(F_O(x))FA​(iD​(x))=iE​(FO​(x)); and for every f,g∈Af,g\in Af,g∈A with tD(f)=sD(g)t_D(f)=s_D(g)tD​(f)=sD​(g), FA(cD(g,f))=cE(FA(g),FA(f))F_A(c_D(g,f))=c_E(F_A(g),F_A(f))FA​(cD​(g,f))=cE​(FA​(g),FA​(f)). No category axioms for either collection of maps are assumed in this definition, and the composition equation imposes no requirement on pairs whose indicated endpoints differ.

QAlgorithms.Papers.Independent.Intake100.P20.GroupDiagrams

For any type GGG and data D=(m,e,i)D=(m,e,i)D=(m,e,i) consisting of a binary operation, a distinguished element, and a unary function on GGG, this proposition requires the following five identities: for every a,b,c∈Ga,b,c\in Ga,b,c∈G, m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c)); and for every a∈Ga\in Ga∈G, m(e,a)=am(e,a)=am(e,a)=a, m(a,e)=am(a,e)=am(a,e)=a, m(i(a),a)=em(i(a),a)=em(i(a),a)=e, and m(a,i(a))=em(a,i(a))=em(a,i(a))=e.

QAlgorithms.Papers.Independent.Intake100.P20.GroupMaps

For any type GGG, a structure of this kind consists of a binary operation m:G×G→Gm:G\times G\to Gm:G×G→G, a distinguished element e∈Ge\in Ge∈G, and a function i:G→Gi:G\to Gi:G→G. No equations are required of these data. The distinguished element means that such a structure cannot exist when GGG is empty.

QAlgorithms.Papers.Independent.Intake100.P20.GroupObjectInCat

For arbitrary groups A,OA,OA,O and total functions s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and c:A×A→Ac:A\times A\to Ac:A×A→A, this defines the following proposition. The maps satisfy s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for all x∈Ox\in Ox∈O; s(c(g,f))=s(f)s(c(g,f))=s(f)s(c(g,f))=s(f) and t(c(g,f))=t(g)t(c(g,f))=t(g)t(c(g,f))=t(g) whenever t(f)=s(g)t(f)=s(g)t(f)=s(g); c(i(t(f)),f)=fc(i(t(f)),f)=fc(i(t(f)),f)=f and c(f,i(s(f)))=fc(f,i(s(f)))=fc(f,i(s(f)))=f for all f∈Af\in Af∈A; and c(h,c(g,f))=c(c(h,g),f)c(h,c(g,f))=c(c(h,g),f)c(h,c(g,f))=c(c(h,g),f) whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(h)t(g)=s(h)t(g)=s(h). Multiplication preserves these maps in the precise sense that s(ab)=s(a)s(b)s(ab)=s(a)s(b)s(ab)=s(a)s(b) and t(ab)=t(a)t(b)t(ab)=t(a)t(b)t(ab)=t(a)t(b) for all a,b∈Aa,b\in Aa,b∈A, i(xy)=i(x)i(y)i(xy)=i(x)i(y)i(xy)=i(x)i(y) for all x,y∈Ox,y\in Ox,y∈O, and c(g,f)c(b,a)=c(gb,fa)c(g,f)c(b,a)=c(gb,fa)c(g,f)c(b,a)=c(gb,fa) whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(a)=s(b)t(a)=s(b)t(a)=s(b). The units satisfy s(1A)=t(1A)=1Os(1_A)=t(1_A)=1_Os(1A​)=t(1A​)=1O​, i(1O)=1Ai(1_O)=1_Ai(1O​)=1A​, and c(1A,1A)=1Ac(1_A,1_A)=1_Ac(1A​,1A​)=1A​. Inversion also preserves the maps: s(a−1)=s(a)−1s(a^{-1})=s(a)^{-1}s(a−1)=s(a)−1 and t(a−1)=t(a)−1t(a^{-1})=t(a)^{-1}t(a−1)=t(a)−1 for all a∈Aa\in Aa∈A, i(x)−1=i(x−1)i(x)^{-1}=i(x^{-1})i(x)−1=i(x−1) for all x∈Ox\in Ox∈O, and c(g,f)−1=c(g−1,f−1)c(g,f)^{-1}=c(g^{-1},f^{-1})c(g,f)−1=c(g−1,f−1) whenever t(f)=s(g)t(f)=s(g)t(f)=s(g). Composition is total, but the composition-preservation and associativity equations apply under exactly the endpoint hypotheses stated.

QAlgorithms.Papers.Independent.Intake100.P20.GroupObjectInGrp

For any type GGG with a given group structure, write its multiplication as juxtaposition and its identity as 111. For additional data D=(m,e,i)D=(m,e,i)D=(m,e,i) on GGG, this proposition requires all of the following: m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c)) for every a,b,c∈Ga,b,c\in Ga,b,c∈G; m(e,a)=am(e,a)=am(e,a)=a, m(a,e)=am(a,e)=am(a,e)=a, m(i(a),a)=em(i(a),a)=em(i(a),a)=e, and m(a,i(a))=em(a,i(a))=em(a,i(a))=e for every a∈Ga\in Ga∈G; e=1e=1e=1; m(1,1)=1m(1,1)=1m(1,1)=1; m(ac,bd)=m(a,b)m(c,d)m(ac,bd)=m(a,b)m(c,d)m(ac,bd)=m(a,b)m(c,d) for every a,b,c,d∈Ga,b,c,d\in Ga,b,c,d∈G; i(1)=1i(1)=1i(1)=1; and i(ab)=i(a)i(b)i(ab)=i(a)i(b)i(ab)=i(a)i(b) for every a,b∈Ga,b\in Ga,b∈G.

QAlgorithms.Papers.Independent.Intake100.P20.GroupObjectInTop

For any topological space GGG and data D=(m,e,i)D=(m,e,i)D=(m,e,i) consisting of a binary operation, a distinguished element, and a unary function on GGG, this proposition requires m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c)) for all a,b,c∈Ga,b,c\in Ga,b,c∈G and m(e,a)=am(e,a)=am(e,a)=a, m(a,e)=am(a,e)=am(a,e)=a, m(i(a),a)=em(i(a),a)=em(i(a),a)=e, and m(a,i(a))=em(a,i(a))=em(a,i(a))=e for all a∈Ga\in Ga∈G. It additionally requires continuity of (a,b)↦m(a,b)(a,b)\mapsto m(a,b)(a,b)↦m(a,b) from G×GG\times GG×G with its product topology to GGG, continuity of the constant map from the one-point space to GGG with value eee, and continuity of i:G→Gi:G\to Gi:G→G.

QAlgorithms.Papers.Independent.Intake100.P20.InternalCategoryInGrp

For arbitrary groups AAA and OOO, and total functions s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and c:A×A→Ac:A\times A\to Ac:A×A→A, this defines a proposition consisting of the following requirements. For every x∈Ox\in Ox∈O, s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x; for every f,g∈Af,g\in Af,g∈A with t(f)=s(g)t(f)=s(g)t(f)=s(g), s(c(g,f))=s(f)s(c(g,f))=s(f)s(c(g,f))=s(f) and t(c(g,f))=t(g)t(c(g,f))=t(g)t(c(g,f))=t(g); for every f∈Af\in Af∈A, c(i(t(f)),f)=fc(i(t(f)),f)=fc(i(t(f)),f)=f and c(f,i(s(f)))=fc(f,i(s(f)))=fc(f,i(s(f)))=f; and for every f,g,h∈Af,g,h\in Af,g,h∈A with t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(h)t(g)=s(h)t(g)=s(h), c(h,c(g,f))=c(c(h,g),f)c(h,c(g,f))=c(c(h,g),f)c(h,c(g,f))=c(c(h,g),f). In addition, s(1A)=t(1A)=1Os(1_A)=t(1_A)=1_Os(1A​)=t(1A​)=1O​, s(ab)=s(a)s(b)s(ab)=s(a)s(b)s(ab)=s(a)s(b) and t(ab)=t(a)t(b)t(ab)=t(a)t(b)t(ab)=t(a)t(b) for all a,b∈Aa,b\in Aa,b∈A, i(1O)=1Ai(1_O)=1_Ai(1O​)=1A​, i(xy)=i(x)i(y)i(xy)=i(x)i(y)i(xy)=i(x)i(y) for all x,y∈Ox,y\in Ox,y∈O, and c(1A,1A)=1Ac(1_A,1_A)=1_Ac(1A​,1A​)=1A​. Finally, for all f,g,a,b∈Af,g,a,b\in Af,g,a,b∈A, if t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(a)=s(b)t(a)=s(b)t(a)=s(b), then c(gb,fa)=c(g,f)c(b,a)c(gb,fa)=c(g,f)c(b,a)c(gb,fa)=c(g,f)c(b,a). Composition is a function on every pair of arrows, although its source, target, associativity, and interchange requirements have the stated composability hypotheses.

QAlgorithms.Papers.Independent.Intake100.P20.SmoothGroupObject

Let EEE be any normed additive commutative group equipped with a real normed vector space structure, let GGG be a topological space equipped with a charted space structure modeled on EEE, and let D=(m,e,i)D=(m,e,i)D=(m,e,i) consist of a binary operation, a distinguished element, and a unary function on GGG. This proposition requires m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c)) for all a,b,c∈Ga,b,c\in Ga,b,c∈G and m(e,a)=am(e,a)=am(e,a)=a, m(a,e)=am(a,e)=am(a,e)=a, m(i(a),a)=em(i(a),a)=em(i(a),a)=e, and m(a,i(a))=em(a,i(a))=em(a,i(a))=e for all a∈Ga\in Ga∈G. It also requires that (a,b)↦m(a,b)(a,b)\mapsto m(a,b)(a,b)↦m(a,b) be C∞C^\inftyC∞ from G×GG\times GG×G, using the product of the identity models on EEE, to GGG, using the identity model on EEE, and that i:G→Gi:G\to Gi:G→G be C∞C^\inftyC∞ with respect to that identity model.

QAlgorithms.Papers.Independent.Intake100.P20.TensorActionDiagrams

For any small Z\mathbb ZZ-module MMM equipped with a tensor monoid object structure, any additive commutative group AAA, and any Z\mathbb ZZ-linear map n:M⊗ZA→An:M\otimes_{\mathbb Z}A\to An:M⊗Z​A→A, this definition is the proposition

(∀a∈A, n(η(1)⊗a)=a)∧(∀x,y∈M, ∀a∈A, n(μ(x⊗y)⊗a)=n(x⊗n(y⊗a))),\bigl(\forall a\in A,\ n(\eta(1)\otimes a)=a\bigr) \quad\land\quad \bigl(\forall x,y\in M,\ \forall a\in A,\ n(\mu(x\otimes y)\otimes a)=n(x\otimes n(y\otimes a))\bigr),(∀a∈A, n(η(1)⊗a)=a)∧(∀x,y∈M, ∀a∈A, n(μ(x⊗y)⊗a)=n(x⊗n(y⊗a))),

where η:Z→M\eta:\mathbb Z\to Mη:Z→M and μ:M⊗ZM→M\mu:M\otimes_{\mathbb Z}M\to Mμ:M⊗Z​M→M are the monoid object's linear unit and multiplication maps, and all tensor products are over Z\mathbb ZZ. Both MMM and AAA may be trivial; if η(1)=0\eta(1)=0η(1)=0, linearity and the first equation force every element of AAA to be zero.

QAlgorithms.Papers.Independent.Intake100.P20.TotalArrow

For any type OOO equipped with a category structure, this definition gives the type of all triples (x,y,f)(x,y,f)(x,y,f), where x,y∈Ox,y\in Ox,y∈O and fff is a morphism from xxx to yyy. Thus the source and target objects are included as part of each element, and every morphism with every possible pair of endpoints is included. The object type and morphism types may lie in different universes. If OOO is empty, this type of triples is empty.

QAlgorithms.Papers.Independent.Intake100.P20.actionOfMap

For any monoid MMM, any type XXX, any function n:M×X→Xn:M\times X\to Xn:M×X→X, and any proof hhh that n(1,x)=xn(1,x)=xn(1,x)=x for every x∈Xx\in Xx∈X and n(ab,x)=n(a,n(b,x))n(ab,x)=n(a,n(b,x))n(ab,x)=n(a,n(b,x)) for every a,b∈Ma,b\in Ma,b∈M and x∈Xx\in Xx∈X, this definition equips XXX with an action of MMM by setting a⋅x=n(a,x)a\cdot x=n(a,x)a⋅x=n(a,x). The action's identity and multiplication laws are supplied by hhh; this construction also applies when XXX is empty.

QAlgorithms.Papers.Independent.Intake100.P20.categoryCoordinates

For arbitrary groups AAA and OOO, let DDD consist of maps s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and m:A×A→Am:A\times A\to Am:A×A→A, with m(g,f)m(g,f)m(g,f) denoting the designated composition of ggg after fff. Assume a hypothesis hhh giving all of the following: s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for every x∈Ox\in Ox∈O; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g), one has s(m(g,f))=s(f)s(m(g,f))=s(f)s(m(g,f))=s(f) and t(m(g,f))=t(g)t(m(g,f))=t(g)t(m(g,f))=t(g); for every f∈Af\in Af∈A, m(i(t(f)),f)=fm(i(t(f)),f)=fm(i(t(f)),f)=f and m(f,i(s(f)))=fm(f,i(s(f)))=fm(f,i(s(f)))=f; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(k)t(g)=s(k)t(g)=s(k), one has m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f); the maps s,t,is,t,is,t,i preserve identity elements and multiplication; m(1,1)=1m(1,1)=1m(1,1)=1; and, for every f,g,a,b∈Af,g,a,b\in Af,g,a,b∈A with t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(a)=s(b)t(a)=s(b)t(a)=s(b),

m(gb,fa)=m(g,f) m(b,a).m(gb,fa)=m(g,f)\,m(b,a).m(gb,fa)=m(g,f)m(b,a).

Let K={a∈A:s(a)=1}K=\{a\in A:s(a)=1\}K={a∈A:s(a)=1}, and let α:O→Aut⁡(K)\alpha:O\to\operatorname{Aut}(K)α:O→Aut(K) be the action whose value αx(k)\alpha_x(k)αx​(k) has underlying element i(x) k i(x)−1i(x)\,k\,i(x)^{-1}i(x)ki(x)−1. This definition gives the function A→K⋊αOA\to K\rtimes_\alpha OA→K⋊α​O specified, for every a∈Aa\in Aa∈A, by

a⟼(a i(s(a))−1, s(a)),a\longmapsto \bigl(a\,i(s(a))^{-1},\,s(a)\bigr),a⟼(ai(s(a))−1,s(a)),

where the first component is regarded as an element of KKK, using the identity s(i(x))=xs(i(x))=xs(i(x))=x contained in hhh.

QAlgorithms.Papers.Independent.Intake100.P20.categoryOfMaps

For any types A,OA,OA,O, maps s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and c:A×A→Ac:A\times A\to Ac:A×A→A, assume s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for every x∈Ox\in Ox∈O; s(c(g,f))=s(f)s(c(g,f))=s(f)s(c(g,f))=s(f) and t(c(g,f))=t(g)t(c(g,f))=t(g)t(c(g,f))=t(g) whenever t(f)=s(g)t(f)=s(g)t(f)=s(g); c(i(t(f)),f)=f=c(f,i(s(f)))c(i(t(f)),f)=f=c(f,i(s(f)))c(i(t(f)),f)=f=c(f,i(s(f))) for every f∈Af\in Af∈A; and c(h,c(g,f))=c(c(h,g),f)c(h,c(g,f))=c(c(h,g),f)c(h,c(g,f))=c(c(h,g),f) whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(h)t(g)=s(h)t(g)=s(h). This definition constructs a category with object type OOO, with morphisms

Hom⁡(x,y)={f∈A∣s(f)=x and t(f)=y},\operatorname{Hom}(x,y)=\{f\in A\mid s(f)=x\ \text{and}\ t(f)=y\},Hom(x,y)={f∈A∣s(f)=x and t(f)=y},

identity at xxx represented by i(x)i(x)i(x), and the composite of a morphism represented by f:x→yf:x\to yf:x→y followed by one represented by g:y→zg:y\to zg:y→z represented by c(g,f)c(g,f)c(g,f). Its morphism types lie in the same universe as AAA. The supplied equations provide the category laws; values of ccc on noncomposable pairs are not used in category composition. The construction also permits the empty category.

QAlgorithms.Papers.Independent.Intake100.P20.crossedCategoryMaps

For arbitrary groups CCC and GGG, a group homomorphism ∂:C→G\partial:C\to G∂:C→G, and a group homomorphism α:G→Aut⁡(C)\alpha:G\to\operatorname{Aut}(C)α:G→Aut(C), this definition supplies four maps with arrow set C⋊αGC\rtimes_\alpha GC⋊α​G and object set GGG. Writing an arrow as (c,g)(c,g)(c,g), these maps are

s(c,g)=g,t(c,g)=∂(c)g,i(x)=(1,x),m((d,h),(c,g))=(dc,g).s(c,g)=g,\qquad t(c,g)=\partial(c)g,\qquad i(x)=(1,x),\qquad m\bigl((d,h),(c,g)\bigr)=(dc,g).s(c,g)=g,t(c,g)=∂(c)g,i(x)=(1,x),m((d,h),(c,g))=(dc,g).

Here sss and ttt are the designated source and target maps, iii is the designated identity map, and m(b,a)m(b,a)m(b,a) is the designated composition of bbb after aaa. The composition formula is defined for every pair of arrows, including pairs for which t(a)≠s(b)t(a)\ne s(b)t(a)=s(b), and its value does not depend on hhh. No identities relating ∂\partial∂ and α\alphaα are assumed in this definition.

QAlgorithms.Papers.Independent.Intake100.P20.crossedKernelMap

For arbitrary groups CCC and GGG, a group homomorphism r:G→Aut⁡(C)r:G\to\operatorname{Aut}(C)r:G→Aut(C), and an element c∈Cc\in Cc∈C, this defines an element of the kernel of the projection π:C⋊rG→G\pi:C\rtimes_r G\to Gπ:C⋊r​G→G, where π(x,g)=g\pi(x,g)=gπ(x,g)=g. The element defined is (c,1G)(c,1_G)(c,1G​), together with the fact that its projection is 1G1_G1G​. Here C⋊rGC\rtimes_r GC⋊r​G has multiplication (x,g)(y,h)=(x r(g)(y),gh)(x,g)(y,h)=(x\,r(g)(y),gh)(x,g)(y,h)=(xr(g)(y),gh). The definition applies to every ccc, including the identity, and allows either group to be trivial.

QAlgorithms.Papers.Independent.Intake100.P20.emptyCategoryMaps

This defines source, target, identity, and total composition maps with both the arrow type and the object type equal to the empty type. Source, target, and identity are the identity function on the empty type; composition is specified by c(g,f)=fc(g,f)=fc(g,f)=f. There are no objects or arrows, so none of these functions has an input on which it can be evaluated.

QAlgorithms.Papers.Independent.Intake100.P20.groupOfMaps

For any type GGG, any binary operation m:G×G→Gm:G\times G\to Gm:G×G→G, distinguished element e∈Ge\in Ge∈G, and function i:G→Gi:G\to Gi:G→G, and any proof hhh that m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c))m(m(a,b),c)=m(a,m(b,c)) for all a,b,c∈Ga,b,c\in Ga,b,c∈G and that m(e,a)=am(e,a)=am(e,a)=a, m(a,e)=am(a,e)=am(a,e)=a, m(i(a),a)=em(i(a),a)=em(i(a),a)=e, and m(a,i(a))=em(a,i(a))=em(a,i(a))=e for all a∈Ga\in Ga∈G, this definition equips GGG with a group structure whose multiplication is mmm, identity is eee, and inverse function is iii.

QAlgorithms.Papers.Independent.Intake100.P20.identityHom

For arbitrary groups AAA and OOO, let DDD consist of maps s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and m:A×A→Am:A\times A\to Am:A×A→A, with m(g,f)m(g,f)m(g,f) denoting the designated composition of ggg after fff. Assume a hypothesis hhh giving all of the following: s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for every x∈Ox\in Ox∈O; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g), one has s(m(g,f))=s(f)s(m(g,f))=s(f)s(m(g,f))=s(f) and t(m(g,f))=t(g)t(m(g,f))=t(g)t(m(g,f))=t(g); for every f∈Af\in Af∈A, m(i(t(f)),f)=fm(i(t(f)),f)=fm(i(t(f)),f)=f and m(f,i(s(f)))=fm(f,i(s(f)))=fm(f,i(s(f)))=f; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(k)t(g)=s(k)t(g)=s(k), one has m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f); the maps s,t,is,t,is,t,i preserve identity elements and multiplication; m(1,1)=1m(1,1)=1m(1,1)=1; and, for every f,g,a,b∈Af,g,a,b\in Af,g,a,b∈A with t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(a)=s(b)t(a)=s(b)t(a)=s(b),

m(gb,fa)=m(g,f) m(b,a).m(gb,fa)=m(g,f)\,m(b,a).m(gb,fa)=m(g,f)m(b,a).

Under these assumptions, this definition gives the group homomorphism O→AO\to AO→A whose value at every x∈Ox\in Ox∈O is i(x)i(x)i(x), using the identity-preservation and multiplication-preservation assertions for iii supplied by hhh.

QAlgorithms.Papers.Independent.Intake100.P20.kernelAction

For arbitrary groups AAA and OOO, let DDD consist of maps s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and m:A×A→Am:A\times A\to Am:A×A→A, with m(g,f)m(g,f)m(g,f) denoting the designated composition of ggg after fff. Assume a hypothesis hhh giving all of the following: s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for every x∈Ox\in Ox∈O; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g), one has s(m(g,f))=s(f)s(m(g,f))=s(f)s(m(g,f))=s(f) and t(m(g,f))=t(g)t(m(g,f))=t(g)t(m(g,f))=t(g); for every f∈Af\in Af∈A, m(i(t(f)),f)=fm(i(t(f)),f)=fm(i(t(f)),f)=f and m(f,i(s(f)))=fm(f,i(s(f)))=fm(f,i(s(f)))=f; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(k)t(g)=s(k)t(g)=s(k), one has m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f); the maps s,t,is,t,is,t,i preserve identity elements and multiplication; m(1,1)=1m(1,1)=1m(1,1)=1; and, for every f,g,a,b∈Af,g,a,b\in Af,g,a,b∈A with t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(a)=s(b)t(a)=s(b)t(a)=s(b),

m(gb,fa)=m(g,f) m(b,a).m(gb,fa)=m(g,f)\,m(b,a).m(gb,fa)=m(g,f)m(b,a).

Writing K={a∈A:s(a)=1}K=\{a\in A:s(a)=1\}K={a∈A:s(a)=1} for the kernel subgroup of the homomorphism sss, this definition gives a group homomorphism O→Aut⁡(K)O\to\operatorname{Aut}(K)O→Aut(K): each x∈Ox\in Ox∈O is assigned the automorphism whose value at k∈Kk\in Kk∈K has underlying element i(x) k i(x)−1i(x)\,k\,i(x)^{-1}i(x)ki(x)−1 in AAA.

QAlgorithms.Papers.Independent.Intake100.P20.kernelBoundary

For arbitrary groups AAA and OOO, let DDD consist of maps s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and m:A×A→Am:A\times A\to Am:A×A→A, with m(g,f)m(g,f)m(g,f) denoting the designated composition of ggg after fff. Assume a hypothesis hhh giving all of the following: s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for every x∈Ox\in Ox∈O; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g), one has s(m(g,f))=s(f)s(m(g,f))=s(f)s(m(g,f))=s(f) and t(m(g,f))=t(g)t(m(g,f))=t(g)t(m(g,f))=t(g); for every f∈Af\in Af∈A, m(i(t(f)),f)=fm(i(t(f)),f)=fm(i(t(f)),f)=f and m(f,i(s(f)))=fm(f,i(s(f)))=fm(f,i(s(f)))=f; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(k)t(g)=s(k)t(g)=s(k), one has m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f); the maps s,t,is,t,is,t,i preserve identity elements and multiplication; m(1,1)=1m(1,1)=1m(1,1)=1; and, for every f,g,a,b∈Af,g,a,b\in Af,g,a,b∈A with t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(a)=s(b)t(a)=s(b)t(a)=s(b),

m(gb,fa)=m(g,f) m(b,a).m(gb,fa)=m(g,f)\,m(b,a).m(gb,fa)=m(g,f)m(b,a).

Writing K={a∈A:s(a)=1}K=\{a\in A:s(a)=1\}K={a∈A:s(a)=1} for the kernel subgroup of the homomorphism sss, this definition gives the group homomorphism K→OK\to OK→O that sends kkk to t(k)t(k)t(k), where kkk is viewed as its underlying element of AAA.

QAlgorithms.Papers.Independent.Intake100.P20.mapsOfCategory

For any type OOO equipped with a category structure, let AAA be the type of triples (x,y,f)(x,y,f)(x,y,f) with x,y∈Ox,y\in Ox,y∈O and f:x→yf:x\to yf:x→y. This noncomputable definition supplies four maps on AAA and OOO: the source and target of (x,y,f)(x,y,f)(x,y,f) are xxx and yyy, and the identity assigned to xxx is (x,x,id⁡x)(x,x,\operatorname{id}_x)(x,x,idx​). For F=(x,y,f)F=(x,y,f)F=(x,y,f) and H=(z,w,g)H=(z,w,g)H=(z,w,g), their total composition function is

c(H,F)={(x,w, g∘τy,z∘f),y=z,F,y≠z,c(H,F)= \begin{cases} (x,w,\ g\circ \tau_{y,z}\circ f),& y=z,\\ F,& y\ne z, \end{cases}c(H,F)={(x,w, g∘τy,z​∘f),F,​y=z,y=z,​

where τy,z:y→z\tau_{y,z}:y\to zτy,z​:y→z is the canonical morphism induced by the equality y=zy=zy=z. In particular, when the middle objects do not agree, composition returns the entire first arrow FFF, which is the second argument of ccc. Empty categories are included.

QAlgorithms.Papers.Independent.Intake100.P20.mapsOfGroup

For any type GGG equipped with a group structure, this definition returns the triple consisting of the group's multiplication m(a,b)=abm(a,b)=abm(a,b)=ab, its identity element e=1e=1e=1, and its inverse function i(a)=a−1i(a)=a^{-1}i(a)=a−1.

QAlgorithms.Papers.Independent.Intake100.P20.pointCategoryMaps

This defines source, target, identity, and total composition maps whose object type and arrow type are both the singleton type {∗}\{\ast\}{∗}. Each map returns ∗\ast∗ on every input: s(∗)=t(∗)=i(∗)=∗s(\ast)=t(\ast)=i(\ast)=\asts(∗)=t(∗)=i(∗)=∗ and c(∗,∗)=∗c(\ast,\ast)=\astc(∗,∗)=∗.

QAlgorithms.Papers.Independent.Intake100.P20.productCategoryMaps

For arbitrary types A,O,B,PA,O,B,PA,O,B,P and collections of total maps sD,tD:A→Os_D,t_D:A\to OsD​,tD​:A→O, iD:O→Ai_D:O\to AiD​:O→A, cD:A×A→Ac_D:A\times A\to AcD​:A×A→A, and sE,tE:B→Ps_E,t_E:B\to PsE​,tE​:B→P, iE:P→Bi_E:P\to BiE​:P→B, cE:B×B→Bc_E:B\times B\to BcE​:B×B→B, this defines maps with arrow type A×BA\times BA×B and object type O×PO\times PO×P by s(a,b)=(sD(a),sE(b))s(a,b)=(s_D(a),s_E(b))s(a,b)=(sD​(a),sE​(b)), t(a,b)=(tD(a),tE(b))t(a,b)=(t_D(a),t_E(b))t(a,b)=(tD​(a),tE​(b)), i(x,p)=(iD(x),iE(p))i(x,p)=(i_D(x),i_E(p))i(x,p)=(iD​(x),iE​(p)), and c((a′,b′),(a,b))=(cD(a′,a),cE(b′,b))c((a',b'),(a,b))=(c_D(a',a),c_E(b',b))c((a′,b′),(a,b))=(cD​(a′,a),cE​(b′,b)). No category axioms are assumed, and this composition formula is defined for every pair of elements of A×BA\times BA×B, without a composability condition.

QAlgorithms.Papers.Independent.Intake100.P20.sourceHom

For arbitrary groups AAA and OOO, let DDD consist of maps s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and m:A×A→Am:A\times A\to Am:A×A→A, with m(g,f)m(g,f)m(g,f) denoting the designated composition of ggg after fff. Assume a hypothesis hhh giving all of the following: s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for every x∈Ox\in Ox∈O; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g), one has s(m(g,f))=s(f)s(m(g,f))=s(f)s(m(g,f))=s(f) and t(m(g,f))=t(g)t(m(g,f))=t(g)t(m(g,f))=t(g); for every f∈Af\in Af∈A, m(i(t(f)),f)=fm(i(t(f)),f)=fm(i(t(f)),f)=f and m(f,i(s(f)))=fm(f,i(s(f)))=fm(f,i(s(f)))=f; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(k)t(g)=s(k)t(g)=s(k), one has m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f); the maps s,t,is,t,is,t,i preserve identity elements and multiplication; m(1,1)=1m(1,1)=1m(1,1)=1; and, for every f,g,a,b∈Af,g,a,b\in Af,g,a,b∈A with t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(a)=s(b)t(a)=s(b)t(a)=s(b),

m(gb,fa)=m(g,f) m(b,a).m(gb,fa)=m(g,f)\,m(b,a).m(gb,fa)=m(g,f)m(b,a).

Under these assumptions, this definition gives the group homomorphism A→OA\to OA→O whose value at every a∈Aa\in Aa∈A is s(a)s(a)s(a), using the identity-preservation and multiplication-preservation assertions for sss supplied by hhh.

QAlgorithms.Papers.Independent.Intake100.P20.splitAction

For arbitrary groups A,OA,OA,O and group homomorphisms s:A→Os:A\to Os:A→O and e:O→Ae:O\to Ae:O→A, this defines a group homomorphism from OOO to the group of multiplicative automorphisms of ker⁡s={k∈A:s(k)=1O}\ker s=\{k\in A:s(k)=1_O\}kers={k∈A:s(k)=1O​}. It sends x∈Ox\in Ox∈O to conjugation by e(x)e(x)e(x), so its action on k∈ker⁡sk\in\ker sk∈kers has underlying element e(x)k e(x)−1∈Ae(x)k\,e(x)^{-1}\in Ae(x)ke(x)−1∈A. No assumption that s(e(x))=xs(e(x))=xs(e(x))=x is required.

QAlgorithms.Papers.Independent.Intake100.P20.splitAssembly

For arbitrary groups AAA and OOO, group homomorphisms s:A→Os:A\to Os:A→O and e:O→Ae:O\to Ae:O→A, and an element (k,x)(k,x)(k,x) of the semidirect product ker⁡(s)⋊O\ker(s)\rtimes Oker(s)⋊O, where x∈Ox\in Ox∈O acts on k∈ker⁡(s)k\in\ker(s)k∈ker(s) by conjugation k↦e(x)ke(x)−1k\mapsto e(x)ke(x)^{-1}k↦e(x)ke(x)−1, this definition gives the element of AAA

(k,x)⟼k e(x).(k,x)\longmapsto k\,e(x).(k,x)⟼ke(x).

Here ker⁡(s)={a∈A:s(a)=1}\ker(s)=\{a\in A:s(a)=1\}ker(s)={a∈A:s(a)=1}, and kkk on the right denotes its underlying element of AAA. No assumption that s∘es\circ es∘e is the identity is required.

QAlgorithms.Papers.Independent.Intake100.P20.splitCoordinates

For arbitrary groups A,OA,OA,O, group homomorphisms s:A→Os:A\to Os:A→O and e:O→Ae:O\to Ae:O→A, a hypothesis s(e(x))=xs(e(x))=xs(e(x))=x for every x∈Ox\in Ox∈O, and an element a∈Aa\in Aa∈A, this defines the element (a e(s(a))−1, s(a))\bigl(a\,e(s(a))^{-1},\,s(a)\bigr)(ae(s(a))−1,s(a)) of the semidirect product ker⁡s⋊O\ker s\rtimes Okers⋊O, where ker⁡s={k∈A:s(k)=1O}\ker s=\{k\in A:s(k)=1_O\}kers={k∈A:s(k)=1O​} and x∈Ox\in Ox∈O acts on this kernel by k↦e(x)k e(x)−1k\mapsto e(x)k\,e(x)^{-1}k↦e(x)ke(x)−1. The first coordinate includes the assertion s(a e(s(a))−1)=1Os(a\,e(s(a))^{-1})=1_Os(ae(s(a))−1)=1O​, so it is an element of the kernel. The semidirect product has underlying pairs (k,x)(k,x)(k,x) and multiplication (k,x)(ℓ,y)=(k e(x)ℓe(x)−1,xy)(k,x)(\ell,y)=(k\,e(x)\ell e(x)^{-1},xy)(k,x)(ℓ,y)=(ke(x)ℓe(x)−1,xy), with the first coordinate understood as an element of ker⁡s\ker skers.

QAlgorithms.Papers.Independent.Intake100.P20.targetHom

For arbitrary groups AAA and OOO, let DDD consist of maps s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and m:A×A→Am:A\times A\to Am:A×A→A, with m(g,f)m(g,f)m(g,f) denoting the designated composition of ggg after fff. Assume a hypothesis hhh giving all of the following: s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for every x∈Ox\in Ox∈O; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g), one has s(m(g,f))=s(f)s(m(g,f))=s(f)s(m(g,f))=s(f) and t(m(g,f))=t(g)t(m(g,f))=t(g)t(m(g,f))=t(g); for every f∈Af\in Af∈A, m(i(t(f)),f)=fm(i(t(f)),f)=fm(i(t(f)),f)=f and m(f,i(s(f)))=fm(f,i(s(f)))=fm(f,i(s(f)))=f; whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(k)t(g)=s(k)t(g)=s(k), one has m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f)m(k,m(g,f))=m(m(k,g),f); the maps s,t,is,t,is,t,i preserve identity elements and multiplication; m(1,1)=1m(1,1)=1m(1,1)=1; and, for every f,g,a,b∈Af,g,a,b\in Af,g,a,b∈A with t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(a)=s(b)t(a)=s(b)t(a)=s(b),

m(gb,fa)=m(g,f) m(b,a).m(gb,fa)=m(g,f)\,m(b,a).m(gb,fa)=m(g,f)m(b,a).

Under these assumptions, this definition gives the group homomorphism A→OA\to OA→O whose value at every a∈Aa\in Aa∈A is t(a)t(a)t(a), using the identity-preservation and multiplication-preservation assertions for ttt supplied by hhh.

QAlgorithms.Papers.Independent.Intake100.P20.tensorRing

For any small Z\mathbb ZZ-module MMM equipped with a monoid object structure for the tensor product of Z\mathbb ZZ-modules, this noncomputable definition returns the ring structure on the underlying type of MMM obtained by the standard conversion from such monoid objects to rings. Writing η:Z→M\eta:\mathbb Z\to Mη:Z→M and μ:M⊗ZM→M\mu:M\otimes_{\mathbb Z}M\to Mμ:M⊗Z​M→M for the monoid object's linear unit and multiplication maps, its ring unit is η(1)\eta(1)η(1), its product is xy=μ(x⊗y)xy=\mu(x\otimes y)xy=μ(x⊗y), and its additive group is the one belonging to MMM. No nontriviality assumption is imposed, so the zero module is included.

QAlgorithms.Papers.Independent.Intake100.P20.totalArrowEquiv

For any types A,OA,OA,O, maps s,t:A→Os,t:A\to Os,t:A→O, i:O→Ai:O\to Ai:O→A, and c:A×A→Ac:A\times A\to Ac:A×A→A, assume s(i(x))=t(i(x))=xs(i(x))=t(i(x))=xs(i(x))=t(i(x))=x for every x∈Ox\in Ox∈O; s(c(g,f))=s(f)s(c(g,f))=s(f)s(c(g,f))=s(f) and t(c(g,f))=t(g)t(c(g,f))=t(g)t(c(g,f))=t(g) whenever t(f)=s(g)t(f)=s(g)t(f)=s(g); c(i(t(f)),f)=f=c(f,i(s(f)))c(i(t(f)),f)=f=c(f,i(s(f)))c(i(t(f)),f)=f=c(f,i(s(f))) for every f∈Af\in Af∈A; and c(h,c(g,f))=c(c(h,g),f)c(h,c(g,f))=c(c(h,g),f)c(h,c(g,f))=c(c(h,g),f) whenever t(f)=s(g)t(f)=s(g)t(f)=s(g) and t(g)=s(h)t(g)=s(h)t(g)=s(h). Equip OOO with the category whose morphisms x→yx\to yx→y are elements a∈Aa\in Aa∈A satisfying s(a)=xs(a)=xs(a)=x and t(a)=yt(a)=yt(a)=y, whose identities are represented by i(x)i(x)i(x), and whose composition is represented by c(g,f)c(g,f)c(g,f). This definition constructs a bijection between AAA and the type of all triples (x,y,f)(x,y,f)(x,y,f) of objects and a morphism f:x→yf:x\to yf:x→y in that category: it sends aaa to (s(a),t(a),a)(s(a),t(a),a)(s(a),t(a),a), with aaa regarded as a morphism with those endpoints, and its inverse sends a triple to the underlying element of AAA representing its morphism. These maps are inverse in both directions. Empty types are included whenever the assumed maps and equations exist.

QAlgorithms.Papers.Independent.Intake100.P20.totalHomEquiv

For any category with object type OOO and any objects x,y∈Ox,y\in Ox,y∈O, this defines a bijection between the morphisms x→yx\to yx→y and the triples (a,b,f)(a,b,f)(a,b,f), where a,b∈Oa,b\in Oa,b∈O and f:a→bf:a\to bf:a→b, equipped with equalities a=xa=xa=x and b=yb=yb=y. The forward map sends f:x→yf:x\to yf:x→y to (x,y,f)(x,y,f)(x,y,f) with the reflexive endpoint equalities. The inverse sends a triple with equalities ha:a=xh_a:a=xha​:a=x and hb:b=yh_b:b=yhb​:b=y to the composite x→ha−1a→fb→hbyx\xrightarrow{h_a^{-1}}a\xrightarrow{f}b\xrightarrow{h_b}yxha−1​​af​bhb​​y, where the first and last arrows are the canonical isomorphisms supplied by equality of objects. These maps are inverse in both directions. No assumption that any of these morphism sets is nonempty is required.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me