Zulip Chat Archive

Stream: Is there code for X?

Topic: category-theoretic triviality


Kevin Buzzard (Jun 16 2022 at 01:31):

I am at the goal at the sorry below and I want to reduce to commutes. What am I missing?

import category_theory.functor.basic

open category_theory

example {𝒞 : Type} [category 𝒞] {A B C D E P Q R : 𝒞} (f : A  B) (g : B  C) (h : C  D) (i : D  E)
(φ : A  P) (ψ : P  Q) (ρ : Q  R) (σ : R  D) (commutes : f  g  h = φ  ψ  ρ  σ) :
f  g  h  i = φ  ψ  ρ  σ  i :=
begin
  sorry
end

I don't want to have to do suffices : f \gg g \gg h \gg blah blah because in reality most of these functions are things like eq_to_hom _ and I don't really want to switch proof terms on because they're full of horner.

Kevin Buzzard (Jun 16 2022 at 01:35):

The problem with

example {𝒞 : Type} [category 𝒞] {A B C D E P Q R : 𝒞} (f : A  B) (g : B  C) (h : C  D) (i : D  E)
(φ : A  P) (ψ : P  Q) (ρ : Q  R) (σ : R  D) (commutes : f  g  h = φ  ψ  ρ  σ) :
f  g  h  i = φ  ψ  ρ  σ  i :=
begin
  simp only [  category.assoc] at commutes ,
  rw commutes,
end

is that in practice I don't have commutes to hand, it's what I want to reduce the goal to, and I can't guarantee how many >>s I'll have next time.

Kevin Buzzard (Jun 16 2022 at 01:37):

Oh I've got it

  simp only [ category.assoc],
  congr' 1,

Adam Topaz (Jun 16 2022 at 01:38):

@Kevin Buzzard do you know about reassoc_of?

Adam Topaz (Jun 16 2022 at 01:38):

import category_theory.functor.basic

open category_theory

example {𝒞 : Type} [category 𝒞] {A B C D E P Q R : 𝒞} (f : A  B) (g : B  C) (h : C  D) (i : D  E)
(φ : A  P) (ψ : P  Q) (ρ : Q  R) (σ : R  D) (commutes : f  g  h = φ  ψ  ρ  σ) :
f  g  h  i = φ  ψ  ρ  σ  i :=
by simp [reassoc_of commutes]

Kevin Buzzard (Jun 16 2022 at 01:38):

tactic#category_theory.reassoc_of

Kevin Buzzard (Jun 16 2022 at 01:41):

Neither a tactic nor a metaprogram!

Kevin Buzzard (Jun 16 2022 at 01:42):

But I don't want to type simp [reassoc_of _], in my position because _ is horrible.

Kevin Buzzard (Jun 16 2022 at 01:43):

That's really nice though!

Adam Topaz (Jun 16 2022 at 01:44):

tactic#slice (and rhs) might also be helpful

Adam Topaz (Jun 16 2022 at 01:47):

E.g.

example {𝒞 : Type} [category 𝒞] {A B C D E P Q R : 𝒞} (f : A  B) (g : B  C) (h : C  D) (i : D  E)
(φ : A  P) (ψ : P  Q) (ρ : Q  R) (σ : R  D) (commutes : f  g  h = φ  ψ  ρ  σ) :
f  g  h  i = φ  ψ  ρ  σ  i :=
begin
  slice_lhs 0 2
  { rw commutes },
  simp,
end

Last updated: Dec 20 2023 at 11:08 UTC