mathlib3 documentation

category_theory.monoidal.coherence

A coherence tactic for monoidal categories, and ⊗≫ (composition up to associators) #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

We provide a coherence tactic, which proves equations where the two sides differ by replacing strings of monoidal structural morphisms with other such strings. (The replacements are always equalities by the monoidal coherence theorem.)

A simpler version of this tactic is pure_coherence, which proves that any two morphisms (with the same source and target) in a monoidal category which are built out of associators and unitors are equal.

We also provide f ⊗≫ g, the monoidal_comp operation, which automatically inserts associators and unitors as needed to make the target of f match the source of g.

@[class]

A typeclass carrying a choice of lift of an object from C to free_monoidal_category C.

Instances of this typeclass
Instances of other typeclasses for category_theory.monoidal_category.lift_obj
  • category_theory.monoidal_category.lift_obj.has_sizeof_inst

Auxilliary definition of monoidal_coherence, being careful with namespaces to avoid shadowing.

Coherence tactic for monoidal categories.

pure_coherence uses the coherence theorem for monoidal categories to prove the goal. It can prove any equality made up only of associators, unitors, and identities.

example {C : Type} [category C] [monoidal_category C] :
  (λ_ (𝟙_ C)).hom = (ρ_ (𝟙_ C)).hom :=
by pure_coherence

Users will typicall just use the coherence tactic, which can also cope with identities of the form a ≫ f ≫ b ≫ g ≫ c = a' ≫ f ≫ b' ≫ g ≫ c' where a = a', b = b', and c = c' can be proved using pure_coherence

@[nolint]

Auxiliary simp lemma for the coherence tactic: this moves brackets to the left in order to expose a maximal prefix built out of unitors and associators.

Internal tactic used in coherence.

Rewrites an equation f = g as f₀ ≫ f₁ = g₀ ≫ g₁, where f₀ and g₀ are maximal prefixes of f and g (possibly after reassociating) which are "liftable" (i.e. expressible as compositions of unitors and associators).

theorem tactic.coherence.insert_id_lhs {C : Type u_1} [category_theory.category C] {X Y : C} (f g : X Y) (w : f 𝟙 Y = g) :
f = g
theorem tactic.coherence.insert_id_rhs {C : Type u_1} [category_theory.category C] {X Y : C} (f g : X Y) (w : f = g 𝟙 Y) :
f = g

The main part of coherence tactic.

Use the coherence theorem for monoidal categories to solve equations in a monoidal equation, where the two sides only differ by replacing strings of monoidal structural morphisms (that is, associators, unitors, and identities) with different strings of structural morphisms with the same source and target.

That is, coherence can handle goals of the form a ≫ f ≫ b ≫ g ≫ c = a' ≫ f ≫ b' ≫ g ≫ c' where a = a', b = b', and c = c' can be proved using pure_coherence.

(If you have very large equations on which coherence is unexpectedly failing, you may need to increase the typeclass search depth, using e.g. set_option class.instance_max_depth 500.)

pure_coherence uses the coherence theorem for monoidal categories to prove the goal. It can prove any equality made up only of associators, unitors, and identities.

example {C : Type} [category C] [monoidal_category C] :
  (λ_ (𝟙_ C)).hom = (ρ_ (𝟙_ C)).hom :=
by pure_coherence

Users will typicall just use the coherence tactic, which can also cope with identities of the form a ≫ f ≫ b ≫ g ≫ c = a' ≫ f ≫ b' ≫ g ≫ c' where a = a', b = b', and c = c' can be proved using pure_coherence

Use the coherence theorem for monoidal categories to solve equations in a monoidal equation, where the two sides only differ by replacing strings of monoidal structural morphisms (that is, associators, unitors, and identities) with different strings of structural morphisms with the same source and target.

That is, coherence can handle goals of the form a ≫ f ≫ b ≫ g ≫ c = a' ≫ f ≫ b' ≫ g ≫ c' where a = a', b = b', and c = c' can be proved using pure_coherence.

(If you have very large equations on which coherence is unexpectedly failing, you may need to increase the typeclass search depth, using e.g. set_option class.instance_max_depth 500.)

Use the coherence theorem for monoidal categories to solve equations in a monoidal equation, where the two sides only differ by replacing strings of monoidal structural morphisms (that is, associators, unitors, and identities) with different strings of structural morphisms with the same source and target.

That is, coherence can handle goals of the form a ≫ f ≫ b ≫ g ≫ c = a' ≫ f ≫ b' ≫ g ≫ c' where a = a', b = b', and c = c' can be proved using pure_coherence.

(If you have very large equations on which coherence is unexpectedly failing, you may need to increase the typeclass search depth, using e.g. set_option class.instance_max_depth 500.)