-categories (Kontsevich, ICM 1994, pp. 13--15)
DefinitionKontsevichHMS_AInfCategoryA -category over a commutative ring , in the sense of Kontsevich's ICM address (pp. 13--15), consists of a class of objects together with -graded -modules of morphisms and higher compositions
satisfying the Stasheff identities, of which the first three say that is a differential, that is a morphism of complexes, and that is associative up to a homotopy given by .
In this formalization all morphism spaces are carried by a single -module : the space of morphisms from to is a submodule , the degree- part is a submodule , and is required to be the internal direct sum of the pieces , so that is recovered as that intersection. The compositions are packaged as a single map defined on lists: is , with the convention that is the composite ' first, then '. There is no curvature term: . The axioms require to be additive and -homogeneous in each argument, to send a composable chain into and to vanish on chains that are not composable, to raise degree by , and to satisfy
for every nonempty list . The signs are those of the bar-construction normalization; the paper writes them as .
The file also defines and the predicate of strict unitality for a family of endomorphisms : each lies in , it is a two-sided identity for , and every composition with vanishes when one of its arguments is some .
import Mathlib
/-!
# A∞-categories (Kontsevich, ICM 1994, "Homological algebra of mirror symmetry", pp. 13-15)
A ℤ-graded A∞-category over a commutative ring `R` is encoded here as a single graded
`R`-module `A` (the total space of all morphisms) together with
* a decomposition of `A` into morphism components `hom X Y`, indexed by pairs of objects;
* a ℤ-grading `gr d`;
* higher compositions `m : List A → A`, where `m` applied to a list of length `n`
is Kontsevich's `mₙ`, of degree `2 - n`;
subject to multilinearity, compatibility with the two decompositions, and the Stasheff
identities.
-/
universe u
open scoped BigOperators
variable (R : Type*) [CommRing R]
open Classical in
/-- A ℤ-graded A∞-category over `R`.
Morphism spaces appear as the components `hom X Y` of one graded module `A`:
`Homᵈ(X, Y)` is `hom X Y ⊓ gr d`. The composition `m` takes the list
`[f₁, …, fₙ]` to Kontsevich's `mₙ(f₁ ⊗ ⋯ ⊗ fₙ)`, with `m₂(f, g)` the composition of
`f : X ⟶ Y` followed by `g : Y ⟶ Z`. There is no curvature term: `m₀ = 0`. -/
structure AInfCategory where
/-- The objects. -/
Obj : Type u
/-- The total space of morphisms. -/
A : Type u
[addCommGroup : AddCommGroup A]
[module : Module R A]
/-- `hom X Y` is the space of morphisms from `X` to `Y`, a component of `A`. -/
hom : Obj → Obj → Submodule R A
/-- `gr d` is the degree-`d` part of `A`. -/
gr : ℤ → Submodule R A
/-- `A` is the direct sum of the spaces `Homᵈ(X, Y) = hom X Y ⊓ gr d`. -/
internal : DirectSum.IsInternal (fun p : Obj × Obj × ℤ => hom p.1 p.2.1 ⊓ gr p.2.2)
/-- The higher compositions: `m [f₁, …, fₙ] = mₙ(f₁ ⊗ ⋯ ⊗ fₙ)`. -/
m : List A → A
/-- There is no curvature term `m₀`. -/
m_nil : m [] = 0
/-- Each `mₙ` is additive in every argument. -/
m_add : ∀ (L₁ L₂ : List A) (a b : A),
m (L₁ ++ (a + b) :: L₂) = m (L₁ ++ a :: L₂) + m (L₁ ++ b :: L₂)
/-- Each `mₙ` is `R`-homogeneous in every argument. -/
m_smul : ∀ (L₁ L₂ : List A) (r : R) (a : A),
m (L₁ ++ (r • a) :: L₂) = r • m (L₁ ++ a :: L₂)
/-- `mₙ` maps a composable chain `X 0 ⟶ X 1 ⟶ ⋯ ⟶ X n` into `hom (X 0) (X n)`. -/
m_hom : ∀ (L : List A) (X : ℕ → Obj),
(∀ i : Fin L.length, L.get i ∈ hom (X i) (X (i + 1))) →
m L ∈ hom (X 0) (X L.length)
/-- `mₙ` vanishes on a chain that is not composable. -/
m_hom_zero : ∀ (L₁ L₂ : List A) (a b : A) (X Y Z W : Obj),
a ∈ hom X Y → b ∈ hom Z W → Y ≠ Z → m (L₁ ++ a :: b :: L₂) = 0
/-- `mₙ` has degree `2 - n`. -/
m_gr : ∀ (L : List A) (d : List ℤ), List.Forall₂ (fun a k => a ∈ gr k) L d →
m L ∈ gr (d.sum + 2 - L.length)
/-- The Stasheff identities: for every nonempty list `[f₁, …, fₙ]`,
`∑_{r + s + t = n, s ≥ 1} (-1)^(r + s*t) mᵣ₊₁₊ₜ(f₁, …, fᵣ, mₛ(fᵣ₊₁, …, fᵣ₊ₛ), …, fₙ) = 0`. -/
stasheff : ∀ L : List A, L ≠ [] →
∑ r ∈ Finset.range (L.length + 1), ∑ s ∈ Finset.Icc 1 (L.length - r),
((-1 : R) ^ (r + s * (L.length - r - s))) •
m (L.take r ++ m ((L.drop r).take s) :: L.drop (r + s)) = 0
namespace AInfCategory
variable {R}
attribute [instance] AInfCategory.addCommGroup AInfCategory.module
/-- The degree-`d` part of the space of morphisms from `X` to `Y`. -/
def homDeg (C : AInfCategory.{u} R) (X Y : C.Obj) (d : ℤ) : Submodule R C.A :=
C.hom X Y ⊓ C.gr d
/-- `e` is a strict unit assignment for `C`: `e X` is a degree-zero endomorphism of `X`
which is a two-sided identity for `m₂` and which annihilates all higher compositions. -/
def IsStrictlyUnital (C : AInfCategory.{u} R) (e : C.Obj → C.A) : Prop :=
(∀ X, e X ∈ C.homDeg X X 0) ∧
(∀ (X Y : C.Obj) (f : C.A), f ∈ C.hom X Y → C.m [e X, f] = f ∧ C.m [f, e Y] = f) ∧
(∀ (L₁ L₂ : List C.A) (X : C.Obj), L₁.length + L₂.length + 1 ≠ 2 →
C.m (L₁ ++ e X :: L₂) = 0)
end AInfCategory
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Disclosure: this read-back is not independent. It was written by the same agent that drafted the Lean statements in this proposal, at the explicit instruction of the proposal owner, rather than by a separate auditor reading the code blind. It is therefore not independent testimony and may repeat any misreading already present in the formalization; please check it against the Lean code directly.
The file introduces one structure and two definitions, over a fixed commutative ring .
The structure AInfCategory. A term of this structure is the following data. A type of objects and a type , carrying an additive commutative group structure and an -module structure. A function assigning to each ordered pair of objects an -submodule of , and a function assigning to each integer an -submodule of . A proof that the family of submodules , indexed by all triples , realises as an internal direct sum. A function taking a finite list of elements of to an element of . And proofs of the following seven properties.
- of the empty list is .
- For all lists and all , , where denotes list concatenation with the middle entry inserted in that position.
- For all lists , all and all , .
- For every list of length and every function , if the -th entry of lies in for each , then lies in . Note that for the empty list this asserts for every such , which is automatic since .
- For all lists , elements and objects : if , and , then .
- For every list of elements of and every list of integers of the same length, if the -th entry of lies in for every , then lies in , where is the length of .
- For every nonempty list of length ,
where is the list of the first entries, the entries starting at position , and the remaining entries; the inner index ranges over the integer interval from to , which is empty when . The scalar is taken in , and all subtractions of lengths are natural-number subtractions (truncated at ), which here never underflow since .
No condition asserts the existence of identity morphisms, of shifts, of direct sums, or any finiteness or nondegeneracy; a category with one object, and identically satisfies every axiom.
The definition homDeg. For an -category , objects and an integer , is the submodule of .
The definition IsStrictlyUnital. For an -category and a function , this is the conjunction of three statements: (i) for every object , ; (ii) for all objects and every , both and hold, with no sign; (iii) for all lists and every object , if then — that is, every composition of arity other than vanishes as soon as one of its arguments is one of the elements , including the arity-one case .