Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for G-gerbes, principal 2-group bundles and characteristic classes

Definition
QAlgorithms_Papers_Independent_Intakenext100_P58

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

prove2quantum

The objects the formalized statements of G-gerbes, principal 2-group bundles and characteristic classes (arXiv:0801.1238) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • GroupoidData: Definition 2.3 and Example 2.5, PDF pp. 5–6: groupoid operations. mul a b means a after b, and is only constrained when s a = t b. The inverse and both unit laws are included, also for an empty groupoid.
  • composablePairs: The composable-pair locus, with the same multiplication order as the paper.
  • pointGroupoid: The trivial groupoid on one point is a nonvacuous small instance.
  • IsLieGroupoid: Remark 2.2 and Example 2.5, PDF pp. 5–6: smooth Lie groupoid data on finite-dimensional, boundaryless real manifolds. Multiplication is smooth on its embedded composable-pair locus; its total value elsewhere is unused. Source and target are surjective smooth submersions, not merely smooth maps.
  • Loops: Example 2.5, PDF p. 6: all closed arrows, without a smoothness assertion.
  • loopBase: The family map sends a closed arrow to its common endpoint.
  • loopInclusion: The crossed-module map is the actual inclusion of closed arrows.
  • loopUnit: The identity loop over an object.
  • loopInverse: Inversion in each isotropy group.
  • loopMultiply: Multiplication is used on loops over the same object. The arbitrary value on unequal fibres is never used in the family-of-groups axioms.
  • loopConjugate: Definition 2.3, equations (2),(3), and Example 2.5, PDF pp. 5–6: the right action is x to gamma inverse times x times gamma, with its exact source/target domain. Values off that domain are not part of the action.
  • IsGroupFamily: Definition 2.3, PDF p. 5: a family of groups over M. There is no multiplication between different fibres. All unit, associative and inverse laws, and preservation of the base by the operations, are explicit.
  • IsRightCrossedModule: Definition 2.3, PDF p. 5: algebraic crossed modules with the paper's RIGHT action convention. The action is by group automorphisms (inverse arrows give inverse actions); rho is an identity-on-objects functor. The last two clauses are exactly equations (2) and (3).
Definition code
import Mathlib

/-!
Statements from Ginot–Stienon, arXiv:0801.1238v3.
Example 2.5 is algebraic on the underlying groupoids; no manifold structure
on the set of loops is asserted. Other nodes and their missing geometric
interfaces are recorded individually in HARD.md and GAPS.json.
Compilation is pending the authorized batch handoff.
-/

namespace QAlgorithms.Papers.Independent.Intakenext100.P58

open scoped Manifold ContDiff

universe u v w

/-- Definition 2.3 and Example 2.5, PDF pp. 5–6: groupoid operations.
`mul a b` means a after b, and is only constrained when `s a = t b`.
The inverse and both unit laws are included, also for an empty groupoid. -/
structure GroupoidData (M : Type u) (A : Type v) where
  s : A → M
  t : A → M
  unit : M → A
  inv : A → A
  mul : A → A → A
  s_unit : ∀ m, s (unit m) = m
  t_unit : ∀ m, t (unit m) = m
  s_inv : ∀ a, s (inv a) = t a
  t_inv : ∀ a, t (inv a) = s a
  s_mul : ∀ a b, s a = t b → s (mul a b) = s b
  t_mul : ∀ a b, s a = t b → t (mul a b) = t a
  unit_left : ∀ a, mul (unit (t a)) a = a
  unit_right : ∀ a, mul a (unit (s a)) = a
  inv_left : ∀ a, mul (inv a) a = unit (s a)
  inv_right : ∀ a, mul a (inv a) = unit (t a)
  assoc : ∀ a b c, s a = t b → s b = t c →
    mul (mul a b) c = mul a (mul b c)

/-- The composable-pair locus, with the same multiplication order as the paper. -/
def composablePairs {M : Type u} {A : Type v} (D : GroupoidData M A) : Set (A × A) :=
  {p | D.s p.1 = D.t p.2}

/-- The trivial groupoid on one point is a nonvacuous small instance. -/
def pointGroupoid : GroupoidData PUnit PUnit where
  s := id
  t := id
  unit := id
  inv := id
  mul := fun _ _ => PUnit.unit
  s_unit := fun _ => rfl
  t_unit := fun _ => rfl
  s_inv := fun _ => rfl
  t_inv := fun _ => rfl
  s_mul := fun _ _ _ => Subsingleton.elim _ _
  t_mul := fun _ _ _ => Subsingleton.elim _ _
  unit_left := fun _ => Subsingleton.elim _ _
  unit_right := fun _ => Subsingleton.elim _ _
  inv_left := fun _ => Subsingleton.elim _ _
  inv_right := fun _ => Subsingleton.elim _ _
  assoc := fun _ _ _ _ _ => Subsingleton.elim _ _

/-- Sanity: the unique pair really is composable. -/
example : (PUnit.unit, PUnit.unit) ∈ composablePairs pointGroupoid := rfl

/-- Remark 2.2 and Example 2.5, PDF pp. 5–6: smooth Lie groupoid data on
finite-dimensional, boundaryless real manifolds. Multiplication is smooth
on its embedded composable-pair locus; its total value elsewhere is unused.
Source and target are surjective smooth submersions, not merely smooth maps. -/
def IsLieGroupoid {n0 n1 : ℕ} {M : Type u} {A : Type v}
    [TopologicalSpace M] [TopologicalSpace A]
    [ChartedSpace (EuclideanSpace ℝ (Fin n0)) M]
    [ChartedSpace (EuclideanSpace ℝ (Fin n1)) A]
    (D : GroupoidData M A) : Prop :=
  IsManifold (𝓘(ℝ, EuclideanSpace ℝ (Fin n0))) ∞ M ∧
  IsManifold (𝓘(ℝ, EuclideanSpace ℝ (Fin n1))) ∞ A ∧
  Function.Surjective D.s ∧ Function.Surjective D.t ∧
  Manifold.IsSubmersion (𝓘(ℝ, EuclideanSpace ℝ (Fin n1)))
    (𝓘(ℝ, EuclideanSpace ℝ (Fin n0))) ∞ D.s ∧
  Manifold.IsSubmersion (𝓘(ℝ, EuclideanSpace ℝ (Fin n1)))
    (𝓘(ℝ, EuclideanSpace ℝ (Fin n0))) ∞ D.t ∧
  ContMDiff (𝓘(ℝ, EuclideanSpace ℝ (Fin n0)))
    (𝓘(ℝ, EuclideanSpace ℝ (Fin n1))) ∞ D.unit ∧
  ContMDiff (𝓘(ℝ, EuclideanSpace ℝ (Fin n1)))
    (𝓘(ℝ, EuclideanSpace ℝ (Fin n1))) ∞ D.inv ∧
  ContMDiffOn ((𝓘(ℝ, EuclideanSpace ℝ (Fin n1))).prod
    (𝓘(ℝ, EuclideanSpace ℝ (Fin n1))))
    (𝓘(ℝ, EuclideanSpace ℝ (Fin n1))) ∞
    (fun p : A × A => D.mul p.1 p.2) (composablePairs D)

/-- Example 2.5, PDF p. 6: all closed arrows, without a smoothness assertion. -/
def Loops {M : Type u} {A : Type v} (D : GroupoidData M A) :=
  {a : A // D.s a = D.t a}

/-- The family map sends a closed arrow to its common endpoint. -/
def loopBase {M : Type u} {A : Type v} (D : GroupoidData M A) : Loops D → M :=
  fun x => D.s x.val

/-- The crossed-module map is the actual inclusion of closed arrows. -/
def loopInclusion {M : Type u} {A : Type v} (D : GroupoidData M A) : Loops D → A :=
  Subtype.val

/-- The identity loop over an object. -/
def loopUnit {M : Type u} {A : Type v} (D : GroupoidData M A) (m : M) : Loops D :=
  ⟨D.unit m, (D.s_unit m).trans (D.t_unit m).symm⟩

/-- Inversion in each isotropy group. -/
def loopInverse {M : Type u} {A : Type v} (D : GroupoidData M A)
    (x : Loops D) : Loops D :=
  ⟨D.inv x.val, by rw [D.s_inv, D.t_inv]; exact x.property.symm⟩

/-- Multiplication is used on loops over the same object. The arbitrary
value on unequal fibres is never used in the family-of-groups axioms. -/
noncomputable def loopMultiply {M : Type u} {A : Type v} (D : GroupoidData M A)
    (x y : Loops D) : Loops D := by
  classical
  exact if h : D.s x.val = D.t y.val then
    ⟨D.mul x.val y.val, by
      rw [D.s_mul _ _ h, D.t_mul _ _ h]
      exact y.property.trans (h.symm.trans x.property)⟩
    else x

/-- Definition 2.3, equations (2),(3), and Example 2.5, PDF pp. 5–6:
the right action is x to gamma inverse times x times gamma, with its exact
source/target domain. Values off that domain are not part of the action. -/
noncomputable def loopConjugate {M : Type u} {A : Type v} (D : GroupoidData M A)
    (x : Loops D) (gamma : A) : Loops D := by
  classical
  exact if h : D.s x.val = D.t gamma then
    ⟨D.mul (D.inv gamma) (D.mul x.val gamma), by
      have hcomp : D.s (D.inv gamma) = D.t (D.mul x.val gamma) := by
        rw [D.s_inv, D.t_mul _ _ h]
        exact h.symm.trans x.property
      rw [D.s_mul _ _ hcomp, D.t_mul _ _ hcomp, D.s_mul _ _ h, D.t_inv]⟩
    else x

/-- Definition 2.3, PDF p. 5: a family of groups over M. There is no
multiplication between different fibres. All unit, associative and inverse
laws, and preservation of the base by the operations, are explicit. -/
def IsGroupFamily {M : Type u} {X : Type w} (p : X → M)
    (unit : M → X) (inv : X → X) (mul : X → X → X) : Prop :=
  (∀ m, p (unit m) = m) ∧
  (∀ x, p (inv x) = p x) ∧
  (∀ x y, p x = p y → p (mul x y) = p x) ∧
  (∀ x, mul (unit (p x)) x = x ∧ mul x (unit (p x)) = x) ∧
  (∀ x, mul (inv x) x = unit (p x) ∧ mul x (inv x) = unit (p x)) ∧
  (∀ x y z, p x = p y → p y = p z → mul (mul x y) z = mul x (mul y z))

/-- Definition 2.3, PDF p. 5: algebraic crossed modules with the paper's
RIGHT action convention. The action is by group automorphisms (inverse
arrows give inverse actions); rho is an identity-on-objects functor.
The last two clauses are exactly equations (2) and (3). -/
def IsRightCrossedModule {M : Type u} {A : Type v} {X : Type w}
    (D : GroupoidData M A) (p : X → M) (unit : M → X)
    (inv : X → X) (mul : X → X → X) (rho : X → A)
    (act : X → A → X) : Prop :=
  IsGroupFamily p unit inv mul ∧
  (∀ x, D.s (rho x) = p x ∧ D.t (rho x) = p x) ∧
  (∀ m, rho (unit m) = D.unit m) ∧
  (∀ x y, p x = p y → rho (mul x y) = D.mul (rho x) (rho y)) ∧
  (∀ x, rho (inv x) = D.inv (rho x)) ∧
  (∀ x gamma, p x = D.t gamma → p (act x gamma) = D.s gamma) ∧
  (∀ x, act x (D.unit (p x)) = x) ∧
  (∀ x gamma delta, p x = D.t gamma → D.s gamma = D.t delta →
    act (act x gamma) delta = act x (D.mul gamma delta)) ∧
  (∀ gamma, act (unit (D.t gamma)) gamma = unit (D.s gamma)) ∧
  (∀ x y gamma, p x = p y → p x = D.t gamma →
    act (mul x y) gamma = mul (act x gamma) (act y gamma)) ∧
  (∀ x gamma, p x = D.t gamma → act (inv x) gamma = inv (act x gamma)) ∧
  (∀ x gamma, p x = D.t gamma →
    rho (act x gamma) = D.mul (D.inv gamma) (D.mul (rho x) gamma)) ∧
  (∀ x y, p x = p y → act x (rho y) = mul (inv y) (mul x y))

/-- Sanity: the loop family of the one-point groupoid has exactly one element. -/
example (x : Loops pointGroupoid) : x = loopUnit pointGroupoid PUnit.unit := by
  apply Subtype.ext
  exact Subsingleton.elim _ _

/-- Sanity: inclusion really includes the identity loop; it is not a free functor. -/
example {M : Type u} {A : Type v} (D : GroupoidData M A) (m : M) :
    loopInclusion D (loopUnit D m) = D.unit m := rfl

/-- Sanity: the family lies over exactly the source endpoint of its loop. -/
example {M : Type u} {A : Type v} (D : GroupoidData M A) (x : Loops D) :
    loopBase D x = D.s (loopInclusion D x) := rfl

/-- Sanity: all the family, functor, action and Peiffer axioms admit the
actual singleton-loop instance; no axiom requires a nontrivial fibre. -/
example : IsRightCrossedModule pointGroupoid (loopBase pointGroupoid)
    (loopUnit pointGroupoid) (loopInverse pointGroupoid)
    (loopMultiply pointGroupoid) (loopInclusion pointGroupoid)
    (loopConjugate pointGroupoid) := by
  letI : Subsingleton (Loops pointGroupoid) := ⟨fun x y => by
    apply Subtype.ext
    exact Subsingleton.elim _ _⟩
  simp only [IsRightCrossedModule, IsGroupFamily]
  repeat' first | constructor | intro
  all_goals exact Subsingleton.elim _ _

end QAlgorithms.Papers.Independent.Intakenext100.P58
Source
G-gerbes, principal 2-group bundles and characteristic classes, arXiv:0801.1238v3, https://arxiv.org/abs/0801.1238v3
Read-back

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

QAlgorithms.Papers.Independent.Intakenext100.P58.GroupoidData

For arbitrary types MMM and AAA, possibly empty, this structure consists of source and target maps s,t:A→Ms,t:A\to Ms,t:A→M, a unit map e:M→Ae:M\to Ae:M→A, an inverse map i:A→Ai:A\to Ai:A→A, and a total multiplication map μ:A×A→A\mu:A\times A\to Aμ:A×A→A, together with the following laws. For every m∈Mm\in Mm∈M, s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m. For every a∈Aa\in Aa∈A, s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), and

μ(e(t(a)),a)=a,μ(a,e(s(a)))=a,μ(i(a),a)=e(s(a)),μ(a,i(a))=e(t(a)).\mu(e(t(a)),a)=a,\qquad \mu(a,e(s(a)))=a,\qquad \mu(i(a),a)=e(s(a)),\qquad \mu(a,i(a))=e(t(a)).μ(e(t(a)),a)=a,μ(a,e(s(a)))=a,μ(i(a),a)=e(s(a)),μ(a,i(a))=e(t(a)).

For every a,b∈Aa,b\in Aa,b∈A with s(a)=t(b)s(a)=t(b)s(a)=t(b), one has s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a). For every a,b,c∈Aa,b,c\in Aa,b,c∈A with s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c), one has

μ(μ(a,b),c)=μ(a,μ(b,c)).\mu(\mu(a,b),c)=\mu(a,\mu(b,c)).μ(μ(a,b),c)=μ(a,μ(b,c)).

Multiplication is defined even when s(a)≠t(b)s(a)\ne t(b)s(a)=t(b); its source and target laws apply only when that equality holds, and associativity is required only under the two displayed composability conditions. No nonemptiness is required.

QAlgorithms.Papers.Independent.Intakenext100.P58.IsGroupFamily

For arbitrary types M,XM,XM,X, possibly empty, and total maps p:X→Mp:X\to Mp:X→M, e:M→Xe:M\to Xe:M→X, i:X→Xi:X\to Xi:X→X, and μ:X×X→X\mu:X\times X\to Xμ:X×X→X, this proposition is the conjunction of the following requirements: for every m∈Mm\in Mm∈M, p(e(m))=mp(e(m))=mp(e(m))=m; for every x∈Xx\in Xx∈X, p(i(x))=p(x)p(i(x))=p(x)p(i(x))=p(x); for every x,y∈Xx,y\in Xx,y∈X with p(x)=p(y)p(x)=p(y)p(x)=p(y), p(μ(x,y))=p(x)p(\mu(x,y))=p(x)p(μ(x,y))=p(x); for every x∈Xx\in Xx∈X,

μ(e(p(x)),x)=x,μ(x,e(p(x)))=x,\mu(e(p(x)),x)=x,\qquad \mu(x,e(p(x)))=x,μ(e(p(x)),x)=x,μ(x,e(p(x)))=x,

and

μ(i(x),x)=e(p(x)),μ(x,i(x))=e(p(x));\mu(i(x),x)=e(p(x)),\qquad \mu(x,i(x))=e(p(x));μ(i(x),x)=e(p(x)),μ(x,i(x))=e(p(x));

and for every x,y,z∈Xx,y,z\in Xx,y,z∈X with p(x)=p(y)p(x)=p(y)p(x)=p(y) and p(y)=p(z)p(y)=p(z)p(y)=p(z),

μ(μ(x,y),z)=μ(x,μ(y,z)).\mu(\mu(x,y),z)=\mu(x,\mu(y,z)).μ(μ(x,y),z)=μ(x,μ(y,z)).

The multiplication is defined on all pairs, including those with unequal images under ppp; its image-under-ppp condition is required only for equal-image pairs, and associativity is required only for triples in a common fiber. There is no nonemptiness assumption; when both types are empty, all these universally quantified conditions are vacuous.

QAlgorithms.Papers.Independent.Intakenext100.P58.IsLieGroupoid

Let n0,n1n_0,n_1n0​,n1​ be arbitrary natural numbers, including zero, and let M,AM,AM,A be arbitrary types equipped with topologies and charted-space structures modeled respectively on Rn0\mathbb R^{n_0}Rn0​ and Rn1\mathbb R^{n_1}Rn1​. Let D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ) consist of total maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A satisfying the following groupoid laws: s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m for every mmm; s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)) for every aaa; s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b); and μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c). The defined proposition says that all of the following hold simultaneously: MMM and AAA, with their given charts and the standard Euclidean models, are C∞C^\inftyC∞ manifolds; both sss and ttt are surjective; both sss and ttt are C∞C^\inftyC∞ submersions; eee and iii are C∞C^\inftyC∞; and the map (a,b)↦μ(a,b)(a,b)\mapsto\mu(a,b)(a,b)↦μ(a,b) is C∞C^\inftyC∞ on

C={(a,b)∈A×A:s(a)=t(b)},C=\{(a,b)\in A\times A:s(a)=t(b)\},C={(a,b)∈A×A:s(a)=t(b)},

where this last condition means smoothness within the subset CCC, using the ambient product charted structure on A×AA\times AA×A and the given charted structure on AAA. It does not introduce a separate manifold structure on CCC or require multiplication to be smooth outside CCC. There is no nonemptiness assumption; zero-dimensional models and empty types admitting the specified structures are included.

QAlgorithms.Papers.Independent.Intakenext100.P58.IsRightCrossedModule

For arbitrary types M,A,XM,A,XM,A,X, let DDD consist of maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and a total multiplication ⋅):A×A→A\cdot):A\times A\to A⋅):A×A→A, satisfying, for every m∈Mm\in Mm∈M and a,b,c∈Aa,b,c\in Aa,b,c∈A,

s(e(m))=t(e(m))=m,s(i(a))=t(a),t(i(a))=s(a),s(a)=t(b) ⟹ s(a⋅b)=s(b) and t(a⋅b)=t(a),e(t(a))⋅a=a,a⋅e(s(a))=a,i(a)⋅a=e(s(a)),a⋅i(a)=e(t(a)),s(a)=t(b), s(b)=t(c) ⟹ (a⋅b)⋅c=a⋅(b⋅c).\begin{gathered} s(e(m))=t(e(m))=m,\qquad s(i(a))=t(a),\qquad t(i(a))=s(a),\\ s(a)=t(b)\ \Longrightarrow\ s(a\cdot b)=s(b)\ \text{and}\ t(a\cdot b)=t(a),\\ e(t(a))\cdot a=a,\qquad a\cdot e(s(a))=a,\\ i(a)\cdot a=e(s(a)),\qquad a\cdot i(a)=e(t(a)),\\ s(a)=t(b),\ s(b)=t(c)\ \Longrightarrow\ (a\cdot b)\cdot c=a\cdot(b\cdot c). \end{gathered}s(e(m))=t(e(m))=m,s(i(a))=t(a),t(i(a))=s(a),s(a)=t(b) ⟹ s(a⋅b)=s(b) and t(a⋅b)=t(a),e(t(a))⋅a=a,a⋅e(s(a))=a,i(a)⋅a=e(s(a)),a⋅i(a)=e(t(a)),s(a)=t(b), s(b)=t(c) ⟹ (a⋅b)⋅c=a⋅(b⋅c).​

Given total maps p:X→Mp:X\to Mp:X→M, u:M→Xu:M\to Xu:M→X, j:X→Xj:X\to Xj:X→X, ⋆:X×X→X\star:X\times X\to X⋆:X×X→X, ρ:X→A\rho:X\to Aρ:X→A, and α:X×A→X\alpha:X\times A\to Xα:X×A→X, the predicate in this declaration means precisely the conjunction of the following conditions. First, for every m∈Mm\in Mm∈M and x,y,z∈Xx,y,z\in Xx,y,z∈X, the maps p,u,j,⋆p,u,j,\starp,u,j,⋆ satisfy

p(u(m))=m,p(j(x))=p(x),p(x)=p(y) ⟹ p(x⋆y)=p(x),u(p(x))⋆x=x,x⋆u(p(x))=x,j(x)⋆x=u(p(x)),x⋆j(x)=u(p(x)),p(x)=p(y), p(y)=p(z) ⟹ (x⋆y)⋆z=x⋆(y⋆z).\begin{gathered} p(u(m))=m,\qquad p(j(x))=p(x),\\ p(x)=p(y)\ \Longrightarrow\ p(x\star y)=p(x),\\ u(p(x))\star x=x,\qquad x\star u(p(x))=x,\\ j(x)\star x=u(p(x)),\qquad x\star j(x)=u(p(x)),\\ p(x)=p(y),\ p(y)=p(z)\ \Longrightarrow\ (x\star y)\star z=x\star(y\star z). \end{gathered}p(u(m))=m,p(j(x))=p(x),p(x)=p(y) ⟹ p(x⋆y)=p(x),u(p(x))⋆x=x,x⋆u(p(x))=x,j(x)⋆x=u(p(x)),x⋆j(x)=u(p(x)),p(x)=p(y), p(y)=p(z) ⟹ (x⋆y)⋆z=x⋆(y⋆z).​

In addition, for every m∈Mm\in Mm∈M, x,y∈Xx,y\in Xx,y∈X, and γ,δ∈A\gamma,\delta\in Aγ,δ∈A,

s(ρ(x))=p(x),t(ρ(x))=p(x),ρ(u(m))=e(m),p(x)=p(y) ⟹ ρ(x⋆y)=ρ(x)⋅ρ(y),ρ(j(x))=i(ρ(x)),p(x)=t(γ) ⟹ p(α(x,γ))=s(γ),α(x,e(p(x)))=x,p(x)=t(γ), s(γ)=t(δ) ⟹ α(α(x,γ),δ)=α(x,γ⋅δ),α(u(t(γ)),γ)=u(s(γ)),p(x)=p(y), p(x)=t(γ) ⟹ α(x⋆y,γ)=α(x,γ)⋆α(y,γ),p(x)=t(γ) ⟹ α(j(x),γ)=j(α(x,γ)),p(x)=t(γ) ⟹ ρ(α(x,γ))=i(γ)⋅(ρ(x)⋅γ),p(x)=p(y) ⟹ α(x,ρ(y))=j(y)⋆(x⋆y).\begin{gathered} s(\rho(x))=p(x),\qquad t(\rho(x))=p(x),\\ \rho(u(m))=e(m),\\ p(x)=p(y)\ \Longrightarrow\ \rho(x\star y)=\rho(x)\cdot\rho(y),\\ \rho(j(x))=i(\rho(x)),\\ p(x)=t(\gamma)\ \Longrightarrow\ p(\alpha(x,\gamma))=s(\gamma),\\ \alpha(x,e(p(x)))=x,\\ p(x)=t(\gamma),\ s(\gamma)=t(\delta)\ \Longrightarrow\ \alpha(\alpha(x,\gamma),\delta)=\alpha(x,\gamma\cdot\delta),\\ \alpha(u(t(\gamma)),\gamma)=u(s(\gamma)),\\ p(x)=p(y),\ p(x)=t(\gamma)\ \Longrightarrow\ \alpha(x\star y,\gamma)=\alpha(x,\gamma)\star\alpha(y,\gamma),\\ p(x)=t(\gamma)\ \Longrightarrow\ \alpha(j(x),\gamma)=j(\alpha(x,\gamma)),\\ p(x)=t(\gamma)\ \Longrightarrow\ \rho(\alpha(x,\gamma))=i(\gamma)\cdot(\rho(x)\cdot\gamma),\\ p(x)=p(y)\ \Longrightarrow\ \alpha(x,\rho(y))=j(y)\star(x\star y). \end{gathered}s(ρ(x))=p(x),t(ρ(x))=p(x),ρ(u(m))=e(m),p(x)=p(y) ⟹ ρ(x⋆y)=ρ(x)⋅ρ(y),ρ(j(x))=i(ρ(x)),p(x)=t(γ) ⟹ p(α(x,γ))=s(γ),α(x,e(p(x)))=x,p(x)=t(γ), s(γ)=t(δ) ⟹ α(α(x,γ),δ)=α(x,γ⋅δ),α(u(t(γ)),γ)=u(s(γ)),p(x)=p(y), p(x)=t(γ) ⟹ α(x⋆y,γ)=α(x,γ)⋆α(y,γ),p(x)=t(γ) ⟹ α(j(x),γ)=j(α(x,γ)),p(x)=t(γ) ⟹ ρ(α(x,γ))=i(γ)⋅(ρ(x)⋅γ),p(x)=p(y) ⟹ α(x,ρ(y))=j(y)⋆(x⋆y).​

There are no topological or nonemptiness assumptions. All operations are defined on their entire displayed domains, including products between different fibres and actions with mismatched base points; each conditional identity is required only when its stated equalities hold.

QAlgorithms.Papers.Independent.Intakenext100.P58.Loops

For arbitrary types M,AM,AM,A, let D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ) consist of total maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A satisfying s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m for every mmm; s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)) for every aaa; s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b); and μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c). The defined type is the subtype

L={a∈A:s(a)=t(a)};L=\{a\in A:s(a)=t(a)\};L={a∈A:s(a)=t(a)};

an element consists of an arrow together with the fact that its source equals its target. No base object is fixed: arrows based at any object are included. Empty types are allowed, and LLL is empty when AAA is empty.

QAlgorithms.Papers.Independent.Intakenext100.P58.composablePairs

For arbitrary types M,AM,AM,A and groupoid data D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ), the defined set is

{(a,b)∈A×A:s(a)=t(b)}.\{(a,b)\in A\times A:s(a)=t(b)\}.{(a,b)∈A×A:s(a)=t(b)}.

Here s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A are total maps satisfying, for every m∈Mm\in Mm∈M and a∈Aa\in Aa∈A, s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m, s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)). Whenever s(a)=t(b)s(a)=t(b)s(a)=t(b), they satisfy s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a); whenever also s(b)=t(c)s(b)=t(c)s(b)=t(c), they satisfy μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)). The defined set imposes only the stated equality of source and target; it is empty if AAA is empty.

QAlgorithms.Papers.Independent.Intakenext100.P58.loopBase

For arbitrary types M,AM,AM,A, let D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ) consist of total maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A satisfying s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m for every mmm; s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)) for every aaa; s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b); and μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c). On the subtype L={a∈A:s(a)=t(a)}L=\{a\in A:s(a)=t(a)\}L={a∈A:s(a)=t(a)}, this defines the map

p:L→M,p(x)=s(a),p:L\to M,\qquad p(x)=s(a),p:L→M,p(x)=s(a),

where aaa is the underlying arrow of xxx. Thus its value is also t(a)t(a)t(a). No nonemptiness is assumed; the definition also applies when its domain is empty.

QAlgorithms.Papers.Independent.Intakenext100.P58.loopConjugate

For arbitrary types M,AM,AM,A, let D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ) consist of total maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A satisfying s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m for every mmm; s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)) for every aaa; s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b); and μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c). For every x∈L={a∈A:s(a)=t(a)}x\in L=\{a\in A:s(a)=t(a)\}x∈L={a∈A:s(a)=t(a)}, with underlying arrow aaa, and every γ∈A\gamma\in Aγ∈A, this defines

C(x,γ)={the loop with underlying arrow μ(i(γ),μ(a,γ)),s(a)=t(γ),x,s(a)≠t(γ).C(x,\gamma)= \begin{cases} \text{the loop with underlying arrow }\mu(i(\gamma),\mu(a,\gamma)), &s(a)=t(\gamma),\\ x,&s(a)\ne t(\gamma). \end{cases}C(x,γ)={the loop with underlying arrow μ(i(γ),μ(a,γ)),x,​s(a)=t(γ),s(a)=t(γ).​

In the first case, the stated groupoid laws give both source and target of the resulting arrow equal to s(γ)s(\gamma)s(γ). The function accepts every pair (x,γ)(x,\gamma)(x,γ), including pairs failing the composability condition, for which it returns xxx. No nonemptiness is assumed.

QAlgorithms.Papers.Independent.Intakenext100.P58.loopInclusion

For arbitrary types M,AM,AM,A, let D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ) consist of total maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A satisfying s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m for every mmm; s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)) for every aaa; s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b); and μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c). This defines the map

ι:{a∈A:s(a)=t(a)}→A\iota:\{a\in A:s(a)=t(a)\}\to Aι:{a∈A:s(a)=t(a)}→A

that sends an arrow equipped with a proof that its source equals its target to that underlying arrow. The definition includes the case of an empty domain.

QAlgorithms.Papers.Independent.Intakenext100.P58.loopInverse

For arbitrary types M,AM,AM,A, let D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ) consist of total maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A satisfying s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m for every mmm; s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)) for every aaa; s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b); and μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c). For each x∈L={a∈A:s(a)=t(a)}x\in L=\{a\in A:s(a)=t(a)\}x∈L={a∈A:s(a)=t(a)}, with underlying arrow aaa, this defines the element of LLL with underlying arrow i(a)i(a)i(a). The required equality follows from

s(i(a))=t(a)=s(a)=t(i(a)).s(i(a))=t(a)=s(a)=t(i(a)).s(i(a))=t(a)=s(a)=t(i(a)).

No nonemptiness is assumed; the map is also defined when LLL is empty.

QAlgorithms.Papers.Independent.Intakenext100.P58.loopMultiply

For arbitrary types M,AM,AM,A, let D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ) consist of total maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A satisfying s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m for every mmm; s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)) for every aaa; s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b); and μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c). For any x,y∈L={a∈A:s(a)=t(a)}x,y\in L=\{a\in A:s(a)=t(a)\}x,y∈L={a∈A:s(a)=t(a)}, with underlying arrows a,ba,ba,b, this defines a total operation L×L→LL\times L\to LL×L→L by

x⋆y={the loop with underlying arrow μ(a,b),s(a)=t(b),x,s(a)≠t(b).x\star y= \begin{cases} \text{the loop with underlying arrow }\mu(a,b),&s(a)=t(b),\\ x,&s(a)\ne t(b). \end{cases}x⋆y={the loop with underlying arrow μ(a,b),x,​s(a)=t(b),s(a)=t(b).​

In the first case, the source and target of μ(a,b)\mu(a,b)μ(a,b) are s(b)s(b)s(b) and t(a)t(a)t(a), which are equal because a,ba,ba,b are loops and the stated composability equality holds. Thus loops at different base objects are included among the inputs, and their product is defined to be the first input. Empty types are allowed.

QAlgorithms.Papers.Independent.Intakenext100.P58.loopUnit

For arbitrary types M,AM,AM,A, let D=(s,t,e,i,μ)D=(s,t,e,i,\mu)D=(s,t,e,i,μ) consist of total maps s,t:A→Ms,t:A\to Ms,t:A→M, e:M→Ae:M\to Ae:M→A, i:A→Ai:A\to Ai:A→A, and μ:A×A→A\mu:A\times A\to Aμ:A×A→A satisfying s(e(m))=t(e(m))=ms(e(m))=t(e(m))=ms(e(m))=t(e(m))=m for every mmm; s(i(a))=t(a)s(i(a))=t(a)s(i(a))=t(a), t(i(a))=s(a)t(i(a))=s(a)t(i(a))=s(a), μ(e(t(a)),a)=μ(a,e(s(a)))=a\mu(e(t(a)),a)=\mu(a,e(s(a)))=aμ(e(t(a)),a)=μ(a,e(s(a)))=a, μ(i(a),a)=e(s(a))\mu(i(a),a)=e(s(a))μ(i(a),a)=e(s(a)), and μ(a,i(a))=e(t(a))\mu(a,i(a))=e(t(a))μ(a,i(a))=e(t(a)) for every aaa; s(μ(a,b))=s(b)s(\mu(a,b))=s(b)s(μ(a,b))=s(b) and t(μ(a,b))=t(a)t(\mu(a,b))=t(a)t(μ(a,b))=t(a) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b); and μ(μ(a,b),c)=μ(a,μ(b,c))\mu(\mu(a,b),c)=\mu(a,\mu(b,c))μ(μ(a,b),c)=μ(a,μ(b,c)) whenever s(a)=t(b)s(a)=t(b)s(a)=t(b) and s(b)=t(c)s(b)=t(c)s(b)=t(c). For each m∈Mm\in Mm∈M, this defines an element of L={a∈A:s(a)=t(a)}L=\{a\in A:s(a)=t(a)\}L={a∈A:s(a)=t(a)} whose underlying arrow is e(m)e(m)e(m). Its membership in LLL is justified by s(e(m))=m=t(e(m))s(e(m))=m=t(e(m))s(e(m))=m=t(e(m)). No nonemptiness is assumed; if MMM is empty, there are no arguments mmm.

QAlgorithms.Papers.Independent.Intakenext100.P58.pointGroupoid

This defines groupoid data whose object type and arrow type are both the singleton type {∗}\{\ast\}{∗}. The source, target, unit, and inverse maps are all the identity map of that singleton, and the total multiplication sends every pair to ∗\ast∗. Thus s(∗)=t(∗)=e(∗)=i(∗)=∗s(\ast)=t(\ast)=e(\ast)=i(\ast)=\asts(∗)=t(∗)=e(∗)=i(∗)=∗ and μ(∗,∗)=∗\mu(\ast,\ast)=\astμ(∗,∗)=∗. The supplied laws assert that units have their prescribed source and target, inversion exchanges source and target, a composable product has the source of its second factor and target of its first factor, units act on both sides, multiplication by an inverse gives the appropriate unit on both sides, and multiplication is associative for composable triples; all these equalities hold because each relevant type has exactly one element.

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