Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma A.7: unit compatibility and inverse-pair naturality

Open
QAlgorithms.Papers.Independent.Intake100.P16.transformationUnitAndInverse

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

prove2quantum

Let S,TS,TS,T be bicategories and F1,F2:S→TF_1,F_2:S\to TF1​,F2​:S→T pseudofunctors, with unitors u1,u2u^1,u^2u1,u2. Let ρ\rhoρ consist of object components ρX:F1(X)→F2(X)\rho_X:F_1(X)\to F_2(X)ρX​:F1​(X)→F2​(X) and invertible naturality cells ρf:ρY∘F1(f)⇒F2(f)∘ρX\rho_f:\rho_Y\circ F_1(f)\Rightarrow F_2(f)\circ\rho_Xρf​:ρY​∘F1​(f)⇒F2​(f)∘ρX​, satisfying only the composition and 2-cell naturality axioms (T1) and (T2).

For every object XXX, unit compatibility follows:

(uX2∘idρX)∙ρidX=rρX−1∙lρX∙(idρX∘uX1).(u^2_X\circ\mathrm{id}_{\rho_X})\mathbin{\bullet}\rho_{\mathrm{id}_X} =r_{\rho_X}^{-1}\mathbin{\bullet}l_{\rho_X}\mathbin{\bullet}(\mathrm{id}_{\rho_X}\circ u^1_X).(uX2​∘idρX​​)∙ρidX​​=rρX​−1​∙lρX​​∙(idρX​​∘uX1​).

Here ∙\bullet∙ is vertical composition, ∘\circ∘ is horizontal composition, and l,rl,rl,r are the source's left and right unitors.

If additionally S,TS,TS,T are strict and both F1,F2F_1,F_2F1​,F2​ are normalized, then

ρidX=idρX∘F1(idX)=idF2(idX)∘ρX,ρg∘idF1(f)=idF2(g)∘ρf−1\rho_{\mathrm{id}_X}=\mathrm{id}_{\rho_X\circ F_1(\mathrm{id}_X)} =\mathrm{id}_{F_2(\mathrm{id}_X)\circ\rho_X}, \qquad \rho_g\circ\mathrm{id}_{F_1(f)}=\mathrm{id}_{F_2(g)}\circ\rho_f^{-1}ρidX​​=idρX​∘F1​(idX​)​=idF2​(idX​)∘ρX​​,ρg​∘idF1​(f)​=idF2​(g)​∘ρf−1​

for every object XXX and every f:X→Yf:X\to Yf:X→Y, g:Y→Xg:Y\to Xg:Y→X with g∘f=idXg\circ f=\mathrm{id}_Xg∘f=idX​. Normalization means preservation of identities and all such inverse pairs, with identity unitors and the corresponding identity compositors.

This result supplies the unit axiom omitted from Definition A.6, including the additional inverse-pair identity used in normalized transport.

Formalization Note The input record omits Mathlib's unit axiom. Mathlib uses diagrammatic composition; its pseudofunctor compositor is inverse to the paper's. Heterogeneous equality records identity cells across the explicitly equal endpoints.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P16
Formal statement
namespace QAlgorithms.Papers.Independent.Intake100.P16

open CategoryTheory CategoryTheory.Bicategory CategoryTheory.MonoidalCategory

open scoped CategoryTheory.Pseudofunctor.StrongTrans

universe uS vS wS uT vT wT uC vC

/-- Lemma A.7, PDF pp.44–45. Part (i) derives the unit diagram from
T1 and T2. Only part (ii) requires strict bicategories and normalized
pseudofunctors. Both identity equalities and the inverse-pair equality
are retained; the inverse is on the naturality cell at f.
Normalization correction in (A.3), PDF p.43: printed c_f,g = id_idX;
changed to id_idF(X), because this compositor is a target 2-cell over F(X).
Only the identity subscript is corrected; the inverse-pair condition and
both conclusions of this lemma are unchanged. -/
theorem transformationUnitAndInverse
    {S : Type uS} [Bicategory.{wS, vS} S]
    {T : Type uT} [Bicategory.{wT, vT} T]
    (F G : Pseudofunctor S T) (r : UnitFreeStrongTrans F G) :
    (∀ X : S,
      (r.naturality (𝟙 X)).hom ≫ r.app X ◁ (G.mapId X).hom =
        (F.mapId X).hom ▷ r.app X ≫ (Bicategory.leftUnitor (r.app X)).hom ≫
          (Bicategory.rightUnitor (r.app X)).inv) ∧
    (Bicategory.Strict S → Bicategory.Strict T →
      IsNormalized F → IsNormalized G →
      (∀ X : S,
        HEq (r.naturality (𝟙 X)).hom (𝟙 (F.map (𝟙 X) ≫ r.app X)) ∧
        HEq (r.naturality (𝟙 X)).hom (𝟙 (r.app X ≫ G.map (𝟙 X)))) ∧
      (∀ {X Y : S} (f : X ⟶ Y) (g : Y ⟶ X), f ≫ g = 𝟙 X →
        HEq (F.map f ◁ (r.naturality g).hom)
          ((r.naturality f).inv ▷ G.map g))) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P16
Source
Local Theory for 2-Functors on Path 2-Groupoids, arXiv:1303.4663v1, PDF p. 45, A.7
Read-back

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

Let S,TS,TS,T be arbitrary bicategories and F,G:S→TF,G:S\to TF,G:S→T pseudofunctors. Suppose one is given, for each object XXX, a 1-morphism rX:F(X)→G(X)r_X:F(X)\to G(X)rX​:F(X)→G(X), and for each f:X→Yf:X\to Yf:X→Y, an invertible 2-morphism τf:F(f);rY⇒rX;G(f)\tau_f:F(f);r_Y\Rightarrow r_X;G(f)τf​:F(f);rY​⇒rX​;G(f). Assume these data satisfy (F(a)▹rY);τg=τf;(rX◃G(a))(F(a)\triangleright r_Y);\tau_g=\tau_f;(r_X\triangleleft G(a))(F(a)▹rY​);τg​=τf​;(rX​◃G(a)) for every 2-morphism a:f⇒ga:f\Rightarrow ga:f⇒g between parallel f,g:X→Yf,g:X\to Yf,g:X→Y, and, for every f:X→Yf:X\to Yf:X→Y, g:Y→Zg:Y\to Zg:Y→Z,

τf;g;(rX◃cf,gG)=(cf,gF▹rZ);αF(f),F(g),rZ;(F(f)◃τg);αF(f),rY,G(g)−1;(τf▹G(g));αrX,G(f),G(g).\tau_{f;g};(r_X\triangleleft c^G_{f,g}) = (c^F_{f,g}\triangleright r_Z); \alpha_{F(f),F(g),r_Z}; (F(f)\triangleleft\tau_g); \alpha^{-1}_{F(f),r_Y,G(g)}; (\tau_f\triangleright G(g)); \alpha_{r_X,G(f),G(g)}.τf;g​;(rX​◃cf,gG​)=(cf,gF​▹rZ​);αF(f),F(g),rZ​​;(F(f)◃τg​);αF(f),rY​,G(g)−1​;(τf​▹G(g));αrX​,G(f),G(g)​.

Here ;;; means composition in the order written, ◃,▹\triangleleft,\triangleright◃,▹ mean left and right whiskering, αp,q,s:(p;q);s⇒p;(q;s)\alpha_{p,q,s}:(p;q);s\Rightarrow p;(q;s)αp,q,s​:(p;q);s⇒p;(q;s) is the associator, cf,gH:H(f;g)⇒H(f);H(g)c^H_{f,g}:H(f;g)\Rightarrow H(f);H(g)cf,gH​:H(f;g)⇒H(f);H(g) is the forward composition comparison of a pseudofunctor HHH, and ιXH:H(1X)⇒1H(X)\iota^H_X:H(1_X)\Rightarrow1_{H(X)}ιXH​:H(1X​)⇒1H(X)​ is its forward identity comparison. The theorem asserts, first, that for every XXX,

τ1X;(rX◃ιXG)=(ιXF▹rX);λrX;ρrX−1,\tau_{1_X};(r_X\triangleleft\iota^G_X) = (\iota^F_X\triangleright r_X);\lambda_{r_X};\rho^{-1}_{r_X},τ1X​​;(rX​◃ιXG​)=(ιXF​▹rX​);λrX​​;ρrX​−1​,

where λp:1;p⇒p\lambda_p:1;p\Rightarrow pλp​:1;p⇒p and ρp:p;1⇒p\rho_p:p;1\Rightarrow pρp​:p;1⇒p are the unitors. It asserts, second, the following implication: if SSS and TTT are strict bicategories and each H∈{F,G}H\in\{F,G\}H∈{F,G} satisfies, for every object XXX, H(1X)=1H(X)H(1_X)=1_{H(X)}H(1X​)=1H(X)​ and ιXH≐11H(X)\iota^H_X\doteq1_{1_{H(X)}}ιXH​≐11H(X)​​, and also satisfies, for every f:X→Yf:X\to Yf:X→Y, g:Y→Xg:Y\to Xg:Y→X with f;g=1Xf;g=1_Xf;g=1X​, both H(f);H(g)=1H(X)H(f);H(g)=1_{H(X)}H(f);H(g)=1H(X)​ and cf,gH≐11H(X)c^H_{f,g}\doteq1_{1_{H(X)}}cf,gH​≐11H(X)​​, then

∀X,τ1X≐1F(1X);rXandτ1X≐1rX;G(1X),\forall X,\quad \tau_{1_X}\doteq1_{F(1_X);r_X} \quad\text{and}\quad \tau_{1_X}\doteq1_{r_X;G(1_X)},∀X,τ1X​​≐1F(1X​);rX​​andτ1X​​≐1rX​;G(1X​)​,

and, for every f:X→Yf:X\to Yf:X→Y, g:Y→Xg:Y\to Xg:Y→X with f;g=1Xf;g=1_Xf;g=1X​,

F(f)◃τg≐τf−1▹G(g).F(f)\triangleleft\tau_g \doteq \tau_f^{-1}\triangleright G(g).F(f)◃τg​≐τf−1​▹G(g).

Throughout, ≐\doteq≐ means heterogeneous equality, allowing different types for the compared terms. The last conclusion requires only the displayed one-sided inverse equation, including its identity-morphism cases; all object-indexed assertions are vacuous when SSS has no objects.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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