The areas / V34. The tactics of Mathlib
Mathlib.Tactic.CategoryTheory.Bicategory.PureCoherence
15 declarations. Mathlib docs · Source
Coherence tactic for bicategories
We provide a bicategory_coherence tactic,
which proves that any two morphisms (with the same source and target)
in a bicategory which are built out of associators and unitors
are equal.
abbrev Mathlib.Tactic.Bicategory.normalizeIsoComp E1 #
{B : Type u} →
[inst : CategoryTheory.Bicategory B] →
{a b c d : B} →
{p : a ⟶ b} →
{f : b ⟶ c} →
{g : c ⟶ d} →
{pf : a ⟶ c} →
{pfg : a ⟶ d} →
(CategoryTheory.CategoryStruct.comp p f ≅ pf) →
(CategoryTheory.CategoryStruct.comp pf g ≅ pfg) →
(CategoryTheory.CategoryStruct.comp p (CategoryTheory.CategoryStruct.comp f g) ≅ pfg)
The composition of the normalizing isomorphisms η_f : p ≫ f ≅ pf and η_g : pf ≫ g ≅ pfg.
theorem Mathlib.Tactic.Bicategory.naturality_associator E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b c d e : B} {p : a ⟶ b} {f : b ⟶ c} {g : c ⟶ d} {h : d ⟶ e}
{pf : a ⟶ c} {pfg : a ⟶ d} {pfgh : a ⟶ e} (η_f : CategoryTheory.CategoryStruct.comp p f ≅ pf)
(η_g : CategoryTheory.CategoryStruct.comp pf g ≅ pfg) (η_h : CategoryTheory.CategoryStruct.comp pfg h ≅ pfgh),
CategoryTheory.Bicategory.whiskerLeftIso p (CategoryTheory.Bicategory.associator f g h) ≪≫
Mathlib.Tactic.Bicategory.normalizeIsoComp η_f (Mathlib.Tactic.Bicategory.normalizeIsoComp η_g η_h) =
Mathlib.Tactic.Bicategory.normalizeIsoComp (Mathlib.Tactic.Bicategory.normalizeIsoComp η_f η_g) η_h
theorem Mathlib.Tactic.Bicategory.naturality_leftUnitor E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b c : B} {p : a ⟶ b} {f : b ⟶ c} {pf : a ⟶ c}
(η_f : CategoryTheory.CategoryStruct.comp p f ≅ pf),
CategoryTheory.Bicategory.whiskerLeftIso p (CategoryTheory.Bicategory.leftUnitor f) ≪≫ η_f =
Mathlib.Tactic.Bicategory.normalizeIsoComp (CategoryTheory.Bicategory.rightUnitor p) η_f
theorem Mathlib.Tactic.Bicategory.naturality_rightUnitor E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b c : B} {p : a ⟶ b} {f : b ⟶ c} {pf : a ⟶ c}
(η_f : CategoryTheory.CategoryStruct.comp p f ≅ pf),
CategoryTheory.Bicategory.whiskerLeftIso p (CategoryTheory.Bicategory.rightUnitor f) ≪≫ η_f =
Mathlib.Tactic.Bicategory.normalizeIsoComp η_f (CategoryTheory.Bicategory.rightUnitor pf)
theorem Mathlib.Tactic.Bicategory.naturality_id E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b c : B} {p : a ⟶ b} {f : b ⟶ c} {pf : a ⟶ c}
(η_f : CategoryTheory.CategoryStruct.comp p f ≅ pf),
CategoryTheory.Bicategory.whiskerLeftIso p (CategoryTheory.Iso.refl f) ≪≫ η_f = η_f
theorem Mathlib.Tactic.Bicategory.naturality_comp E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b c : B} {p : a ⟶ b} {f g h : b ⟶ c} {pf : a ⟶ c} {η : f ≅ g}
{θ : g ≅ h} (η_f : CategoryTheory.CategoryStruct.comp p f ≅ pf) (η_g : CategoryTheory.CategoryStruct.comp p g ≅ pf)
(η_h : CategoryTheory.CategoryStruct.comp p h ≅ pf),
CategoryTheory.Bicategory.whiskerLeftIso p η ≪≫ η_g = η_f →
CategoryTheory.Bicategory.whiskerLeftIso p θ ≪≫ η_h = η_g →
CategoryTheory.Bicategory.whiskerLeftIso p (η ≪≫ θ) ≪≫ η_h = η_f
theorem Mathlib.Tactic.Bicategory.naturality_whiskerLeft E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b c d : B} {p : a ⟶ b} {f : b ⟶ c} {g h : c ⟶ d} {pf : a ⟶ c}
{pfg : a ⟶ d} {η : g ≅ h} (η_f : CategoryTheory.CategoryStruct.comp p f ≅ pf)
(η_fg : CategoryTheory.CategoryStruct.comp pf g ≅ pfg) (η_fh : CategoryTheory.CategoryStruct.comp pf h ≅ pfg),
CategoryTheory.Bicategory.whiskerLeftIso pf η ≪≫ η_fh = η_fg →
CategoryTheory.Bicategory.whiskerLeftIso p (CategoryTheory.Bicategory.whiskerLeftIso f η) ≪≫
Mathlib.Tactic.Bicategory.normalizeIsoComp η_f η_fh =
Mathlib.Tactic.Bicategory.normalizeIsoComp η_f η_fg
theorem Mathlib.Tactic.Bicategory.naturality_whiskerRight E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b c d : B} {p : a ⟶ b} {f g : b ⟶ c} {h : c ⟶ d} {pf : a ⟶ c}
{pfh : a ⟶ d} {η : f ≅ g} (η_f : CategoryTheory.CategoryStruct.comp p f ≅ pf)
(η_g : CategoryTheory.CategoryStruct.comp p g ≅ pf) (η_fh : CategoryTheory.CategoryStruct.comp pf h ≅ pfh),
CategoryTheory.Bicategory.whiskerLeftIso p η ≪≫ η_g = η_f →
CategoryTheory.Bicategory.whiskerLeftIso p (CategoryTheory.Bicategory.whiskerRightIso η h) ≪≫
Mathlib.Tactic.Bicategory.normalizeIsoComp η_g η_fh =
Mathlib.Tactic.Bicategory.normalizeIsoComp η_f η_fh
theorem Mathlib.Tactic.Bicategory.naturality_inv E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b c : B} {p : a ⟶ b} {f g : b ⟶ c} {pf : a ⟶ c} {η : f ≅ g}
(η_f : CategoryTheory.CategoryStruct.comp p f ≅ pf) (η_g : CategoryTheory.CategoryStruct.comp p g ≅ pf),
CategoryTheory.Bicategory.whiskerLeftIso p η ≪≫ η_g = η_f →
CategoryTheory.Bicategory.whiskerLeftIso p η.symm ≪≫ η_f = η_g
instance Mathlib.Tactic.Bicategory.instMonadNormalizeNaturalityBicategoryM E0 #
Mathlib.Tactic.BicategoryLike.MonadNormalizeNaturality Mathlib.Tactic.Bicategory.BicategoryM
theorem Mathlib.Tactic.Bicategory.of_normalize_eq E0 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b : B} {f g f' : a ⟶ b} {η θ : f ≅ g}
(η_f : CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id a) f ≅ f')
(η_g : CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id a) g ≅ f'),
CategoryTheory.Bicategory.whiskerLeftIso (CategoryTheory.CategoryStruct.id a) η ≪≫ η_g = η_f →
CategoryTheory.Bicategory.whiskerLeftIso (CategoryTheory.CategoryStruct.id a) θ ≪≫ η_g = η_f → η = θ
theorem Mathlib.Tactic.Bicategory.mk_eq_of_naturality E1 #
∀ {B : Type u} [inst : CategoryTheory.Bicategory B] {a b : B} {f g f' : a ⟶ b} {η θ : f ⟶ g} {η' θ' : f ≅ g}
(η_f : CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id a) f ≅ f')
(η_g : CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id a) g ≅ f'),
η'.hom = η →
θ'.hom = θ →
CategoryTheory.Bicategory.whiskerLeftIso (CategoryTheory.CategoryStruct.id a) η' ≪≫ η_g = η_f →
CategoryTheory.Bicategory.whiskerLeftIso (CategoryTheory.CategoryStruct.id a) θ' ≪≫ η_g = η_f → η = θ
instance Mathlib.Tactic.Bicategory.instMkEqOfNaturalityBicategoryM E0 #
Mathlib.Tactic.BicategoryLike.MkEqOfNaturality Mathlib.Tactic.Bicategory.BicategoryM
def Mathlib.Tactic.Bicategory.pureCoherence E1 #
Lean.MVarId → Lean.MetaM (List Lean.MVarId)
Close the goal of the form η.hom = θ.hom, where η and θ are 2-isomorphisms made up only of
associators, unitors, and identities.
example {B : Type} [Bicategory B] {a : B} :
(λ_ (𝟙 a)).hom = (ρ_ (𝟙 a)).hom := by
bicategory_coherence
def Mathlib.Tactic.Bicategory.tacticBicategory_coherence E1 #
Lean.ParserDescr
Close the goal of the form η.hom = θ.hom, where η and θ are 2-isomorphisms made up only of
associators, unitors, and identities.
example {B : Type} [Bicategory B] {a : B} :
(λ_ (𝟙 a)).hom = (ρ_ (𝟙 a)).hom := by
bicategory_coherence