LeanMachineLearning

constructAssociator🔗

Definition

Construct the associator morphism or its inverse.

🔗def
constructAssociator (left right ex₀ ey₀ ez₀ : Lean.Expr) (hom : Bool) : Lean.MetaM (Lean.Expr × Lean.Expr)
constructAssociator (left right ex₀ ey₀ ez₀ : Lean.Expr) (hom : Bool) : Lean.MetaM (Lean.Expr × Lean.Expr)

Code

def constructAssociator (left right ex₀ ey₀ ez₀ : Expr) (hom : Bool) : MetaM (Expr × Expr) := do let (X, Y, Z, xLvl, yLvl, zLvl) if hom then getTypesFromThreeProds right else getTypesFromThreeProds left let SX computeSFinkerOf X xLvl let SY computeSFinkerOf Y yLvl let SZ computeSFinkerOf Z zLvl let associator mkAppM ``MonoidalCategory.associator #[SX, SY, SZ] let associator_hom_proof if hom then mkAppM ``associator_hom #[SX, SY, SZ, idME X, idME Y, idME Z, ex₀, ey₀, ez₀] else mkAppM ``associator_inv #[SX, SY, SZ, idME X, idME Y, idME Z, ex₀, ey₀, ez₀] return ( mkAppM (if hom then ``Iso.hom else ``Iso.inv) #[associator], associator_hom_proof)

Actions: Source · Open Issue

Meaning last changed in v4.34.0-rc2-1-g439785b (2026-08-23).

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file · open it in the Lean web editor.

Dependency graph

Audit surface: 4 project declarations, 110 external constants

✓ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.