import .preliminary
open finset nat multiplicity

section question

variables {x m n : ℕ} (hx1 : 1 < x) (hm1 : 1 < m)
  (hxmn : (x ^ m + 1) ∣ (x + 1)^n)
include hxmn

lemma dvd_x_add_one_of_dvd_x_pow_m_add_one {p : ℕ} (hp : p.prime) :
  p ∣ x^m + 1 → p ∣ x + 1 :=
λ h, hp.dvd_of_dvd_pow (dvd_trans h hxmn)

section m_odd

variable (hm2 : even m)
include hm2

lemma eq_two_of_prime_of_dvd_x_pow_add_one {p : ℕ} (hp : p.prime)
  (hdvd : p ∣ x^m + 1) : p = 2 :=
have hpx1 : p ∣ x + 1, from dvd_x_add_one_of_dvd_x_pow_m_add_one hxmn hp hdvd,
have hxp : (x : zmodp p hp) = -1,
  by rwa [← sub_eq_zero, sub_neg_eq_add, ← nat.cast_one, ← nat.cast_add,
    zmodp.eq_zero_iff_dvd_nat],
have hxmp : (x^m + 1 : zmodp p hp) = 2,
  by rw [hxp, neg_one_pow_eq_pow_mod_two, even_iff.1 hm2, _root_.pow_zero]; norm_num,
have h20 : (2 : zmodp p hp) = 0,
  by rwa [← hxmp, ← nat.cast_one, ← nat.cast_pow, ← nat.cast_add,
    zmodp.eq_zero_iff_dvd_nat],
by_contradiction (λ hp2 : p ≠ 2, zmodp.prime_ne_zero hp prime_two hp2 (by simpa using h20))

include hx1

lemma x_odd : ¬even x :=
let p := min_fac (x^m + 1) in
have hpp : p.prime, from min_fac_prime (ne_of_gt (succ_lt_succ (nat.pow_pos (by linarith) _))),
have hpdvd : p ∣ x^m + 1, from min_fac_dvd _,
have hp2 : p = 2, from eq_two_of_prime_of_dvd_x_pow_add_one hxmn hm2 hpp hpdvd,
have heven : even (x + 1),
  from dvd_x_add_one_of_dvd_x_pow_m_add_one hxmn prime_two (hp2 ▸ hpdvd),
by simpa with parity_simps using heven

lemma x_pow_add_eq_mod_four_eq_two : (x^m + 1 : zmod 4) = 2 :=
have ∀ y : zmod 4, y.val % 2 = 1 → y^2 + 1 = 2, from dec_trivial,
begin
  have hm2' := hm2,
  cases hm2 with k hk,
  rw hk,
  rw [mul_comm, pow_mul],
  refine this _ _,
  erw [← nat.cast_pow, zmod.val_cast_nat, mod_mul_left_mod (x^k) 2 2,
    ← mod_two_ne_zero, ← even_iff, even_pow, not_and_distrib],
  exact or.inl (x_odd hx1 hxmn hm2'),
end

lemma x_pow_m_add_one_eq_2 : x^m + 1 = 2 :=
let p := min_fac (x^m + 1) in
have hpdvd : p ∣ x^m + 1, from min_fac_dvd _,
have hpp : p.prime, from min_fac_prime (ne_of_gt (succ_lt_succ (nat.pow_pos (by linarith) _))),
have hp2 : p = 2, from eq_two_of_prime_of_dvd_x_pow_add_one hxmn hm2 hpp hpdvd,
let q := min_fac ((x^m + 1) / 2) in
have hqdvd : q ∣ (x^m + 1) / 2, from min_fac_dvd _,
have hqq : ¬q.prime,
  from assume hq,
  have hq2 : q = 2, from eq_two_of_prime_of_dvd_x_pow_add_one hxmn hm2 hq
    (dvd_trans hqdvd (div_dvd_of_dvd (hp2 ▸ hpdvd))),
  let ⟨r, hr⟩ := hqdvd in
  have h4 : 4 ∣ x^m + 1,
    from ⟨r, by rw [← nat.mul_div_cancel' hpdvd, hp2, hr, hq2, ← mul_assoc]; refl⟩,
  begin
    erw [← @zmod.eq_zero_iff_dvd_nat ⟨4, succ_pos _⟩, nat.cast_add, nat.cast_pow, nat.cast_one,
      x_pow_add_eq_mod_four_eq_two hx1 hxmn hm2] at h4,
    exact absurd h4 dec_trivial
  end,
by rw [← nat.mul_div_cancel' hpdvd, hp2, not_imp_comm.1 min_fac_prime hqq, mul_one]

include hm1

lemma m_odd : false :=
lt_irrefl 2 $
  calc 2 < x^m + 1 : succ_lt_succ (show x ^ 0 < x ^ m,
    by rw [← nat.pow_eq_pow, ← nat.pow_eq_pow]; exact pow_lt_pow hx1 (by linarith))
  ... = 2 : x_pow_m_add_one_eq_2 hx1 hxmn hm2

end m_odd

open polynomial

include hx1 hm1

lemma x_add_one_dvd_x_pow_add_one : x + 1 ∣ x^m + 1 :=
have (X : polynomial ℤ) + 1 ∣ X ^ m + 1,
  by rw [← C_1, ← sub_neg_eq_add, ← C_neg, dvd_iff_is_root, is_root, eval_add, eval_C, eval_pow,
    eval_X, neg_one_pow_eq_pow_mod_two, not_even_iff.1 (m_odd hx1 hm1 hxmn), _root_.pow_one,
    neg_add_self],
let ⟨p, hp⟩ := this in
int.coe_nat_dvd.1 ⟨(p.eval (x : ℤ)), by simpa [-add_comm] using congr_arg (eval (x : ℤ)) hp⟩

omit hx1 hm1 hxmn

lemma prime_dvd_choose {p : ℕ} (hp : p.prime) {r t i : ℕ} (hm1 : m % 2 = 1) (hi2 : 2 ≤ i)
  (hpr : p ^ r ∣ m) : p ^ (r + t + 2) ∣ choose m i * p^((t + 1) * i) :=
have hit : t + 2 ≤ (t + 1) * i,
  by rw [add_mul, one_mul]; exact add_le_add
    (le_mul_of_one_le_right' (nat.zero_le _) (by linarith)) hi2,
if hp2 : p = 2
then have hr : r = 0,
  begin
    subst hp2,
    cases r, { refl },
    { rw [nat.pow_succ] at hpr,
      rw [← mod_two_ne_zero, ← dvd_iff_mod_eq_zero] at hm1,
      exact false.elim (hm1 (dvd_trans (by simp) hpr)) }
  end,
  begin
    subst hr, simp only [zero_add, add_mul, one_mul],
    exact dvd_mul_of_dvd_right (pow_dvd_pow _
      (add_le_add (by conv_lhs {rw ← mul_one t}; exact mul_le_mul (le_refl _)
        (by linarith) zero_le_one (nat.zero_le _)) hi2)) _
  end
else
have ¬p ^ ((t + 1) * i - (t + 2) + 1) ∣ i,
  from
  if ht0 : t = 0
  then begin
    subst ht0,
    simp only [add_zero, zero_add, nat.pow_one, one_mul, nat.pow_add],
    show ¬p ^ (i - 2 + 1) ∣ i,
    { assume h : p ^ (i - 2 + 1) ∣ i,
      have hpi : p ^ (i - 2 + 1) ≤ i, from le_of_dvd (by linarith) h,
      exact not_lt_of_ge hpi
        (calc i = i - 2 + 2 : by rw [nat.sub_add_cancel hi2]
          ... < p ^ (i - 2) + 2 * 1 : add_lt_add_of_lt_of_le
            (nat.lt_pow_self hp.one_lt _) (le_refl _)
          ... ≤ p ^ (i - 2) + 2 * p ^ (i - 2) : add_le_add (le_refl _)
            (nat.mul_le_mul_left _ (nat.pow_pos hp.pos _))
          ... = 3 * p ^ (i - 2) : by simp [bit0, bit1, add_mul]
          ... ≤ p * p ^ (i - 2) : nat.mul_le_mul_right
            _ (succ_le_of_lt $ lt_of_le_of_ne hp.two_le (ne.symm hp2))
          ... = p ^ (i - 2 + 1) : by rw [nat.pow_succ, mul_comm]) }
  end
  else
    have i ≤ (t + 1) * i - (t + 2) + 1,
      begin
        rw [← nat.sub_add_comm hit, add_mul, one_mul, show 2 = 1 + 1, from rfl],
        refine nat.le_sub_left_of_add_le _,
        rw [add_assoc, add_right_comm, ← add_assoc, add_le_add_iff_right,
          ← add_assoc, add_le_add_iff_right],
        cases i with i, { exact absurd hi2 dec_trivial },
        { rw [mul_succ],
          exact add_le_add (le_mul_of_one_le_right' (nat.zero_le _) (le_of_succ_le_succ hi2))
            (nat.pos_of_ne_zero ht0) }
      end,
    mt (dvd_trans (nat.pow_dvd_pow _ this))
      (mt (le_of_dvd (by linarith)) (not_le_of_gt (nat.lt_pow_self hp.one_lt _))),
begin
  rw [add_assoc, nat.pow_add, ← nat.sub_add_cancel hit, nat.pow_add _ (_ - _), ← mul_assoc,
    nat.mul_dvd_mul_iff_right (nat.pow_pos hp.pos _)],
  exact hp.pow_dvd_choose_mul_pow (by linarith) hpr this
end

include hx1 hm1 hxmn

lemma prime_dvd_m {p : ℕ} (hp : p.prime) : ∀ {r s t : ℕ} (ht : p ^ t ∣ x + 1) (ht' : ¬p ^ (t + 1) ∣ x + 1)
  (hst : p ^ (s + t) ∣ x^m + 1) (hrs : r ≤ s), p ^ r ∣ m
| 0     s     t     ht ht' hst hrs := by simp
| r     0     0     ht ht' hst hrs := by simp * at *
| r     (s+1) 0     ht ht' hst hrs := false.elim $ ht' $
  dvd_x_add_one_of_dvd_x_pow_m_add_one hxmn (by simpa using hp)
    (dvd_trans (nat.pow_dvd_pow _ (nat.succ_pos _)) hst)
| (r+1) s     (t+1) ht ht' hst hrs :=
let ⟨k, hk⟩ := ht in
have hpk : ¬p ∣ k, from λ hpk, ht'
  (by rw [nat.pow_succ, hk]; exact mul_dvd_mul (dvd_refl _) hpk),
have hxm_eq_kpt : (x^m + 1 : ℤ) = (k * p ^ (t+1) - 1)^m + 1,
  by rw [← int.coe_nat_inj', int.coe_nat_add, ← eq_sub_iff_add_eq] at hk;
    rw [hk]; simp [mul_comm],
have hmeven : even (m - 1),
  from suffices even (m - 1 + 1 + 1), by simpa with parity_simps,
    by simp [nat.sub_add_cancel (le_of_lt hm1), m_odd hx1 hm1 hxmn] with parity_simps,
have hxm_eq_sum : (x^m + 1 : ℤ) = m * k * p ^ (t+1) + (Ico 2 m.succ).sum
    (λ i, choose m i * p^((t+1) * i) * (k^i * (-1) ^ (m - i))),
  begin
    rw [hxm_eq_kpt, sub_eq_add_neg, add_pow, ← Ico.zero_bot, sum_eq_sum_Ico_succ_bot (succ_pos _),
      sum_eq_sum_Ico_succ_bot (succ_lt_succ (lt_trans zero_lt_one hm1)),
      nat.sub_zero, neg_one_pow_eq_pow_mod_two, not_even_iff.1 (m_odd hx1 hm1 hxmn),
      @neg_one_pow_eq_pow_mod_two _ _ (m - 1), even_iff.1 hmeven],
    simp [mul_comm, (pow_mul _ _ _).symm, mul_assoc, mul_left_comm, _root_.mul_pow],
    simp only [mul_comm, mul_left_comm, mul_assoc],
  end,
have hpr : p ^ r ∣ m, from prime_dvd_m ht ht' hst (le_of_succ_le hrs),
have hdvd_sum : (p : ℤ) ^ (r + (t+1) + 1) ∣ (Ico 2 m.succ).sum
    (λ i, choose m i * p^((t+1) * i) * (k^i * (-1 : ℤ) ^ (m - i))),
  from dvd_sum (λ i hi, begin
    refine dvd_mul_of_dvd_left _ _,
    simp only [(int.coe_nat_pow _ _).symm, (int.coe_nat_mul _ _).symm, int.coe_nat_dvd],
    convert prime_dvd_choose hp (not_even_iff.1 (m_odd hx1 hm1 hxmn)) (Ico.mem.1 hi).1 hpr
  end),
have hdvd_m : (p : ℤ) ^ (r + (t+1) + 1) ∣ m * k * p ^ (t+1),
  from (dvd_add_iff_left hdvd_sum).2 begin
    rw [← hxm_eq_sum],
    simp only [(int.coe_nat_pow _ _).symm, int.coe_nat_dvd,
      int.coe_nat_one.symm, (int.coe_nat_add _ _).symm],
    exact dvd_trans (nat.pow_dvd_pow _ (by linarith)) hst,
  end,
have hdvd_mk : p^(r + 1) ∣ m * k,
  from nat.dvd_of_mul_dvd_mul_right (nat.pow_pos hp.pos (t + 1))
    (int.coe_nat_dvd.1 $ by simpa [(_root_.pow_add _ _ _).symm] using hdvd_m),
hp.pow_dvd_of_dvd_mul_of_not_dvd hdvd_mk hpk

lemma x_pow_add_one_div_x_add_one_dvd_m : (x^m + 1) / (x + 1) ∣ m :=
dvd_of_forall_prime_pow_dvd $
  (λ (p r : ℕ) (hp : p.prime) h,
    have htdom : (multiplicity p (x + 1)).dom, from finite_nat_iff.2 ⟨ne_of_gt hp.one_lt, succ_pos _⟩,
    let t := (multiplicity p (x + 1)).get htdom in
    have ht : p ^ t ∣ x + 1, by rw [← nat.pow_eq_pow]; exact pow_multiplicity_dvd _,
    have hrt : p ^ (r + t) ∣ (x^m + 1),
      by rw [nat.pow_add, ← nat.div_mul_cancel (x_add_one_dvd_x_pow_add_one hx1 hm1 hxmn)];
        exact mul_dvd_mul h ht,
    have ht' : ¬p ^ (t + 1) ∣ x + 1,
      by rw [← nat.pow_eq_pow, ← multiplicity_lt_iff_neg_dvd, ← enat.coe_get htdom, enat.coe_lt_coe];
        exact nat.lt_succ_self _,
    prime_dvd_m hx1 hm1 hxmn hp ht ht' hrt (le_refl _))

lemma x_pow_add_one_le_m_mul_x_add_m : x ^ m + 1 ≤ x * m + m  :=
le_of_dvd (by linarith) $
let ⟨q, hq⟩ := x_pow_add_one_div_x_add_one_dvd_m hx1 hm1 hxmn in
begin
  rw [show x * m + m = (x + 1) * m, by simp [add_mul]],
  conv_rhs {rw hq},
  rw [← mul_assoc, nat.mul_div_cancel' (x_add_one_dvd_x_pow_add_one hx1 hm1 hxmn)],
  simp
end

lemma m_eq_three : m = 3 :=
have x ^ m + 1 ≤ x * m + m, from x_pow_add_one_le_m_mul_x_add_m hx1 hm1 hxmn,
have h4m : ¬ 4 ≤ m,
  from λ h, let ⟨m', hm'⟩ := le_iff_exists_add.1 h in
  let ⟨x', (hx' : x = 2 + x')⟩ := le_iff_exists_add.1 (nat.succ_le_of_lt hx1) in
  have h32 : m' + 4 ≤ 32 * (x' + 2) ^ m',
    from calc m' + 4 ≤ (x' + 2) ^ m' + 4 * 1:
        add_le_add (le_of_lt $ nat.lt_pow_self dec_trivial _) (le_refl _)
      ... ≤ (x' + 2) ^ m' + 4 * (x' + 2) ^ m' :
        add_le_add (le_refl _) (mul_le_mul_left _ (nat.pow_pos (succ_pos _) _))
      ... = 5 * (x' + 2) ^ m' : by ring
      ... ≤ 32 * (x' + 2) ^ m' : mul_le_mul_right _ dec_trivial,
  have h16 : 3 * m' + 12 < 16 * (x' + 2) ^ m',
    from calc 3 * m' + 12 ≤ 3 * (x' + 2) ^ m' + 12 * 1 :
        add_le_add (nat.mul_le_mul_left _ (le_of_lt $ lt_pow_self dec_trivial _)) (le_refl _)
      ... ≤ 3 * (x' + 2) ^ m' + 12 * (x' + 2) ^ m' :
        add_le_add (le_refl _) (mul_le_mul_left _ (nat.pow_pos (succ_pos _) _))
      ... = 15 * (x' + 2) ^ m' : by ring
      ... < 16 * (x' + 2) ^ m' :
        (mul_lt_mul_right (nat.pow_pos (succ_pos _) _)).2 dec_trivial,
  begin
    clear_aux_decl, substs hm' hx',
    exact not_lt_of_ge this
      (calc   (2 + x') * (4 + m') + (4 + m')
            = x' * (m' + 4) + (3 * m' + 12) : by ring
        ... < x' * (32  * (x' + 2) ^ m') + 16 * (x' + 2) ^ m' :
          add_lt_add_of_le_of_lt (mul_le_mul_left _ h32) h16
        ... ≤ (x' * (32  * (x' + 2) ^ m') + 16 * (x' + 2) ^ m') +
            (1 + (x' + 2) ^ m' * (x' ^ 4 + 8 * x' ^ 3 + 24 * x' ^ 2)) :
          le_add_right (le_refl _)
        ... = (2 + x') ^ (4 + m') + 1 : by simp [nat.pow_add]; ring)
  end,
have m_odd : ¬ even m, from m_odd hx1 hm1 hxmn,
begin
  clear hxmn this,
  rw [not_le] at h4m,
  revert m_odd hm1, revert m,
  exact dec_trivial
end

lemma x_eq_two : x = 2 :=
have hm3 : m = 3, from m_eq_three hx1 hm1 hxmn,
have x ^ m + 1 ≤ x * m + m, from x_pow_add_one_le_m_mul_x_add_m hx1 hm1 hxmn,
have h3x : ¬ 3 ≤ x, from λ h3x,
  begin
    rcases le_iff_exists_add.1 h3x with ⟨x', rfl⟩,
    subst hm3,
    exact not_lt_of_ge this
      (calc (3 + x') * 3 + 3 < x' ^ 3 + 9 * x' ^ 2 + 27 * x' + 28 : by linarith
        ... = (3 + x') ^ 3 + 1 : by ring)
  end,
by linarith

omit hxmn

lemma question_4 : x ^ m + 1 ∣ (x + 1) ^ n ↔ (x = 2 ∧ m = 3 ∧ 2 ≤ n) :=
iff.intro
  (λ hxmn,
    have hm3 : m = 3, from m_eq_three hx1 hm1 hxmn,
    have hx2 : x = 2, from x_eq_two hx1 hm1 hxmn,
    ⟨hx2, hm3, begin
      substs hm3 hx2,
      refine le_of_not_lt (λ h2n, _),
      revert hxmn, revert n,
      exact dec_trivial
    end⟩)
  (begin
    rintros ⟨rfl, rfl, hn2⟩,
    rw [← nat.add_sub_cancel' hn2, nat.pow_add],
    exact dvd_mul_right _ _
  end)

end question


import number_theory.arithmetic_function
import algebra.squarefree
import algebra.order.floor
import data.list.intervals
import tactic
import measure_theory.integral.interval_integral
import general
import defs

noncomputable theory
open nat finset function filter
open_locale topological_space interval big_operators filter asymptotics arithmetic_function

namespace squarefree_sums

@[simp] lemma square_zero {R : Type*} [comm_monoid_with_zero R] : square (0 : R) := by { use 0, simp, }

@[simp] lemma square_one {R : Type*} [comm_monoid R]: square (1 : R) := by { use 1, simp, }

lemma square_iff_factorization_even {m : ℕ} :
square m ↔ ∀ (p : ℕ), even (m.factorization p) :=
begin
  by_cases hm_zero : m = 0,
  { simp [hm_zero], },
  { split,
    { rintros ⟨c, hc⟩,
      rw [hc, pow_two],
      by_cases hc' : c = 0,
      { simp [hc'], },
      { intros p,
        simp only [hc', nat.factorization_mul, ne.def, not_false_iff,
          finsupp.coe_add, pi.add_apply],
        rw ←two_mul,
        simp [even], }, },
    { intros hp,
      use m.factorization.prod (λ p i, p ^ (i / 2)),
      rw pow_two,
      rw ← finsupp.prod_mul,
      conv { to_lhs, rw ← nat.factorization_prod_pow_eq_self hm_zero,},
      apply finsupp.prod_congr,
      intros x hx,
      rcases hp x with ⟨c, hc⟩,
      rw [←pow_add, ←two_mul, hc],
      congr,
      simp, }, },
end

lemma square_mul {m n : ℕ} (hmn : m.coprime n) :
  square (m * n) ↔ square m ∧ square n :=
begin
  split,
  { rw [square_iff_factorization_even, square_iff_factorization_even, square_iff_factorization_even],
    intros hmn',
    split,
    { intros p,
      by_cases hp : p ∈ m.factors,
      { rw ← factorization_eq_of_coprime_left hmn hp, exact hmn' p, },
      { rw [←nat.factors_count_eq, list.count_eq_zero_of_not_mem hp], exact even_zero, }, },
    { intros p,
      by_cases hp : p ∈ n.factors,
      { rw ← factorization_eq_of_coprime_right hmn hp, exact hmn' p, },
      { rw [←nat.factors_count_eq, list.count_eq_zero_of_not_mem hp], exact even_zero, }, }, },
  { rintros ⟨⟨c, hc⟩, ⟨d, hd⟩⟩, use (c * d), rw [hc, hd], ring, },
end

lemma square_prime_pow_iff_pow_even : ∀ (p i : ℕ), nat.prime p → (square (p ^ i) ↔ even i) :=
begin
  intros p i hp,
  split,
  unfold square,
  rintros ⟨s, hs⟩,
  rw pow_two at hs,
  have : s ∣ p ^ i,
    calc s ∣ s * s : dvd_mul_left s s
      ... = p ^ i : hs.symm,
  rw nat.dvd_prime_pow hp at this,
  rcases this with ⟨k, hk, s_eq⟩,
  rw s_eq at hs,
  rw ← pow_add at hs,
  have two_le_p : 2 ≤ p, exact hp.two_le,
  rw ← exp_eq_iff_pow_eq two_le_p at hs,
  use k,
  rw ← hs.symm,
  ring,

  rintros ⟨k, hk⟩,
  use p ^ k,
  rw hk,
  rw [←pow_mul, mul_comm],

end

lemma not_square_prime {p : ℕ} (hp : nat.prime p) : ¬square p :=
begin
  by_contradiction H,
  have : p = p ^ 1, ring,
  rw this at H,
  have : ¬ even 1, simp,
  exact this ((square_prime_pow_iff_pow_even p 1 hp).mp H),
end

lemma ssqrt_one : ssqrt 1 = 1 := by simp only [ssqrt, square_one, if_true, sqrt_one]

lemma ssqrt_prime {p : ℕ} (hp : nat.prime p) : ssqrt p = 0 :=
begin
  unfold ssqrt,
  simp,
  intros p,
  exfalso,
  exact not_square_prime hp p,
end

lemma sμ_prime_pow_le_three : ∀ (p i : ℕ), nat.prime p → 3 ≤ i → sμ (p ^ i) = 0 :=
begin
  intros p i hp hi,
  unfold sμ,
  simp,
  unfold sμ',
  unfold ssqrt,
  by_cases even i,
  {
    have : square (p ^ i), exact (square_prime_pow_iff_pow_even p i hp).mpr h,
    simp [this],
    let fooo := h,
    cases h with k hk,
    rw hk,
    have : p ^ (2 * k) = (p ^ k) * (p ^ k),
    {
      rw mul_comm 2 k,
      rw pow_mul,
      rw pow_two,
    },
    rw this,
    rw sqrt_eq,
    obtain ⟨k', hk'⟩ : ∃ k', k = 2 + k',
    {
      apply two_add,
      by_contradiction H,
      push_neg at H,
      have : i = 3, linarith,
      have : odd i, rw this, use 1, ring,
      exact odd_iff_not_even.mp this fooo,
    },
    rw hk',
    rw pow_add,
    have : ¬ squarefree ((p ^ 2) * (p ^ k')),
    {
      by_contradiction H,
      unfold squarefree at H,
      specialize H p,
      have : p * p ∣ (p^2) * (p ^ k'),
        calc p * p = p ^ 2 : by { rw ← pow_two p, }
          ... ∣ (p ^ 2) * (p ^ k') : dvd_mul_right (p^2) (p^k'),
      specialize H this,
      simp at H,
      rw H at hp,
      exact not_prime_one hp,
    },
    simp [this],
  },
  {
    have : ¬square (p ^ i), {
      by_contradiction H,
      rw (square_prime_pow_iff_pow_even p i hp) at H,
      exact h H,
    },
    simp [this],
  },
end

lemma moebius_of_prime {p : ℕ} (hp : nat.prime p) : μ p = -1 :=
begin
  rw arithmetic_function.moebius_apply_of_squarefree (prime_iff.mp hp).squarefree,
  rw arithmetic_function.card_factors_eq_one_iff_prime.mpr hp,
  ring,
end

lemma abs_mu_le_one {a : ℕ} : |arithmetic_function.moebius a| ≤ 1 :=
begin
  unfold arithmetic_function.moebius,
  simp,
  by_cases h : squarefree a,
  simp [h],
  simp [h],
end

lemma ssqrt_eq {n : ℕ} : ssqrt (n * n) = n :=
begin
  unfold ssqrt,
  rw sqrt_eq,
  have : square (n * n), use n, rw pow_two,
  simp [this],
end

lemma squarefree_eq_μ_μ : squarefree_nat = arithmetic_function.pmul μ μ :=
begin
  ext,
  simp,
  unfold squarefree_nat,
  simp,
  unfold squarefree_nat',
  by_cases squarefree x,
  simp [h],
  unfold arithmetic_function.card_factors,
  simp,
  ring_nf,
  rw ← pow_mul,
  rw mul_comm,
  rw pow_mul,
  simp,
  simp [h],
end

lemma nat.prime.not_square {p : ℕ} (hp : nat.prime p) : ¬square p :=
begin
  rintros ⟨s, hs⟩,
  let focus := dvd_mul_left s s,
  rw pow_two at hs,
  rw [←hs, dvd_prime hp] at focus,
  cases focus,
  { apply nat.not_prime_one,
    rw [focus, mul_one] at hs,
    rwa hs at hp, },
  { rw focus at hs,
    cases nat_idemp_iff_zero_one.mp hs,
    { rw h at hp, exact not_prime_zero hp, },
    { rw h at hp, exact not_prime_one hp, }, },
end

lemma prod_squares_square {a b : ℕ} (ha : square a) (hb : square b) : square (a * b) :=
begin
  cases ha with a' ha',
  cases hb with b' hb',
  use a' * b',
  rw [ha', hb'],
  ring,
end

lemma coprime_prod_not_squares_is_not_square {a b : ℕ} (hab : a.coprime b) (ha : ¬square a) : ¬square (a * b) :=
begin
  by_contradiction H,
  unfold square at H,
  rcases H with ⟨s, hs⟩,
  rw pow_two at hs,
  have : a = (s.gcd a) * (s.gcd a), {
    exact (nat.gcd_mul_gcd_of_coprime_of_mul_eq_mul hab hs.symm).symm,
  },
  unfold square at ha,
  push_neg at ha,
  specialize ha (s.gcd a),
  rw pow_two at ha,
  exact ha this,
end

lemma coprime_prod_not_squares_is_not_square' {a b : ℕ} (hab : a.coprime b) (hb : ¬square b) : ¬square (a * b) :=
begin
  rw mul_comm,
  have hab' : b.coprime a, exact (coprime_comm.mp) hab,
  exact coprime_prod_not_squares_is_not_square hab' hb,
end

lemma coprime_ssqrt {a b : ℕ} (ha : square a) (hb : square b) (hab : a.coprime b) : (ssqrt a).coprime (ssqrt b) :=
begin
  simp only [ssqrt, ha, hb, if_true],
  cases ha with a' ha',
  cases hb with b' hb',
  rw pow_two at ha',
  rw pow_two at hb',
  rw [ha', hb', sqrt_eq, sqrt_eq],
  have haa : a' ∣ a, calc a' ∣ a' * a' : dvd_mul_left a' a' ... = a : ha'.symm,
  have hbb : b' ∣ b, calc b' ∣ b' * b' : dvd_mul_left b' b' ... = b : hb'.symm,
  apply nat.coprime.coprime_dvd_left haa,
  apply nat.coprime.coprime_dvd_right hbb,
  exact hab,
end

end squarefree_sums


import tactic
import propositional.language

universe u

namespace prop

variables (A : Type u)

inductive ProofCL (Γ : set Formula): set Formula
| ctx : ∀ {φ}, φ ∈ Γ → ProofCL φ
| P1  : ∀ {φ ψ}, ProofCL $ φ →' (ψ →' φ)
| P2  : ∀ {φ ψ χ}, ProofCL $ (φ →' (ψ →' χ)) →' ((φ →' ψ) →' (φ →' χ))
| P3  : ∀ {φ ψ}, ProofCL $ (¬'φ →' ¬'ψ) →' (ψ →' φ)
| mp  : ∀ {φ ψ}, ProofCL (φ →' ψ) → ProofCL φ → ProofCL ψ

-- notation `𝐂𝐋` := ProofCL

infix ` ⊢ ` :25 := ProofCL
notation `⊢ ` φ :25 := ∅ ⊢ φ

-- def consistent (Γ) : Prop := ⊥' ∉ (𝐂𝐋 Γ)
-- def inconsistent (Γ) := ¬(consistent Γ)

open ProofCL

lemma ident (Γ φ) : Γ ⊢ (φ →' φ) :=
begin
  have h₁ := @ProofCL.P2 Γ φ (φ →' φ) φ,
  have h₂ := @ProofCL.P1 Γ φ (φ →' φ),
  have h₃ := @ProofCL.P1 Γ φ φ,

  have h₄ := @mp _ _ _ h₁ h₂,
  have h₅ := @mp _ _ _ h₄ h₃,
  assumption,
end

lemma negneg (Γ φ) : (Γ ⊢ ¬'¬'φ) ↔ (Γ ⊢ φ) :=
begin
  split,
  admit,
  admit,
end

theorem expand_context (Γ φ ψ) : (Γ ⊢ ψ) → (Γ ∪ {φ} ⊢ ψ) :=
begin
  intro h,
  induction h,
  case ctx : {
    apply @ProofCL.ctx (Γ ∪ {φ}),
    finish,
  },
  case P1 : {
    apply @ProofCL.P1 (Γ ∪ {φ}),
  },
  case P2 : {
    apply @ProofCL.P2 (Γ ∪ {φ}),
  },
  case P3 : {
    apply @ProofCL.P3 (Γ ∪ {φ}),
  },
  case mp : _ _ _ _ h₁ h₂ {
    apply @ProofCL.mp (Γ ∪ {φ}) _ _ h₁ h₂,
  },
end

lemma append (Γ φ ψ) : (Γ ⊢ ψ) → (Γ ⊢ φ →' ψ) :=
begin
  admit,
end

theorem deduction (Γ φ ψ) : (Γ ∪ {φ} ⊢ ψ) → (Γ ⊢ (φ →' ψ)) :=
begin
  intro h,
  induction h,
  case ctx : a b {
    simp at *,
    cases b,
    { rw b, exact ident Γ φ, },
    {
      sorry,
    },
  },
  case P1 : φi ψi {
    -- exact @ProofCL.P1 Γ φ (φi →' ψi),
    sorry,
  },
  {sorry,},
  {sorry,},
  {sorry,},
end

theorem deduction' (Γ φ ψ) : (Γ ⊢ (φ →' ψ)) → (Γ ∪ {φ} ⊢ ψ) :=
begin
  intro h,
  -- assume h₂,
  -- apply (@append Γ φ ψ) h,
  admit,
end

example (φ ψ) : (⊢ φ →' ψ) → ({φ} ⊢ ψ) :=
begin
  intro h,
  have h₁ := (@deduction' ∅ φ ψ) h,
  rw set.empty_union at h₁,
  assumption,
end

def inconsistent (Γ) := Γ ⊢ ⊥'
def consistent (Γ) := ¬(inconsistent Γ)

lemma inconsistent_explosion (Γ φ) : (inconsistent Γ) → (Γ ⊢ φ) :=
begin
  intro h,
  admit,
end

lemma lemma_2_10 (Γ φ) : (Γ ⊢ φ) → (Γ ⊢ ¬'φ) → (inconsistent Γ) :=
begin
  intros hp hnp,
  have h₂ := deduction' _ _ _ hnp,
  have h₃ : inconsistent (Γ ∪ {φ}) := h₂,
end

lemma lemma_2_10' (Γ φ) : consistent Γ → (¬(Γ ⊢ φ)) ∨ (¬(Γ ⊢ ¬'φ)) :=
begin
  contrapose,
  rw push_neg.not_or_eq,
  repeat { rw not_not },
  intro h,
  have h4 := @lemma_2_10 Γ φ (h.elim_left) (h.elim_right),
  finish,
end

lemma lemma_2_11 (Γ φ) : (inconsistent (Γ ∪ {¬'φ})) ↔ (Γ ⊢ φ) :=
begin
  split,
  intro h,
  have h₂ := (@deduction Γ (¬'φ) ⊥') h,
  exact iff.elim_left (negneg Γ φ) h₂,

  intro h,
  apply deduction',
  apply iff.elim_right (negneg Γ φ),
  assumption,
end

lemma lemma_2_12 (Γ φ) : consistent Γ → (consistent (Γ ∪ {φ})) ∨ (consistent (Γ ∪ {¬'φ})) :=
begin
  contrapose,
  rw push_neg.not_or_eq,
  intro h,
  have hl : inconsistent (Γ ∪ {φ}) := by finish,
  have hr : inconsistent (Γ ∪ {¬'φ}) := by finish,
  have h₂ := (iff.elim_left (@lemma_2_11 Γ φ)) hr,
  have h₃ := sorry,
  have h₄ := lemma_2_10 Γ φ h₂ h₃,
  finish,
end

def satisfy (v : ℕ → Prop) : Formula → Prop
| (Formula.var p) := v p
| ⊥'              := false
| (φ →' ψ)        := (satisfy φ) → (satisfy ψ)

def models (v : ℕ → Prop) (φ : Formula) : Prop := satisfy v φ
infix `⊧` :25 := models

def valid (φ) := ∀ v, v ⊧ φ
prefix `⊧` :25 := valid

lemma valid_P1 (φ ψ) : ⊧ (φ →' ψ →' φ) :=
begin
  intro v,
  intros h₁ _,
  assumption,
end

lemma valid_P2 (φ ψ χ) : ⊧ (φ →' (ψ →' χ)) →' ((φ →' ψ) →' (φ →' χ)) :=
begin
  intro v,
  intros h₁ h₂ h₃,
  exact (h₁ h₃) (h₂ h₃),
end

lemma valid_P3 (φ ψ) : ⊧ (¬'φ →' ¬'ψ) →' (ψ →' φ) :=
begin
  intro v,
  intros h₁ h₂,
  by_contradiction h₃,
  solve_by_elim, -- TODO:
end

lemma valid_mp (φ ψ) : (⊧ φ →' ψ) → (⊧ φ) → (⊧ ψ) :=
begin
  intros h₀ h₁ v,
  exact (h₀ v) (h₁ v),
end

theorem soundness (Γ φ) : (Γ ⊢ φ) → (⊧ φ) :=
begin
  intro h,
  induction h,
  {sorry,},
  {exact @valid_P1 _ _,},
  {exact @valid_P2 _ _ _},
  {exact @valid_P3 _ _},
  case mp: _ _ _ _ h₁ h₂ {exact @valid_mp _ _ h₁ h₂,},
end

theorem completeness (Γ φ) : ⊧φ → (Γ ⊢ φ) :=
begin
  intro hM,
  sorry,
end

end prop


/-
Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov
-/
import topology.order.basic
import topology.extend_from

/-!
# Lemmas about `extend_from` in an order topology.

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

open filter set topological_space
open_locale topology classical

universes u v
variables {α : Type u} {β : Type v}

lemma continuous_on_Icc_extend_from_Ioo [topological_space α] [linear_order α] [densely_ordered α]
  [order_topology α] [topological_space β] [regular_space β] {f : α → β} {a b : α}
  {la lb : β} (hab : a ≠ b) (hf : continuous_on f (Ioo a b))
  (ha : tendsto f (𝓝[>] a) (𝓝 la)) (hb : tendsto f (𝓝[<] b) (𝓝 lb)) :
  continuous_on (extend_from (Ioo a b) f) (Icc a b) :=
begin
  apply continuous_on_extend_from,
  { rw closure_Ioo hab },
  { intros x x_in,
    rcases eq_endpoints_or_mem_Ioo_of_mem_Icc x_in with rfl | rfl | h,
    { exact ⟨la, ha.mono_left $ nhds_within_mono _ Ioo_subset_Ioi_self⟩ },
    { exact ⟨lb, hb.mono_left $ nhds_within_mono _ Ioo_subset_Iio_self⟩ },
    { use [f x, hf x h] } }
end

lemma eq_lim_at_left_extend_from_Ioo [topological_space α] [linear_order α] [densely_ordered α]
  [order_topology α] [topological_space β] [t2_space β] {f : α → β} {a b : α}
  {la : β} (hab : a < b) (ha : tendsto f (𝓝[>] a) (𝓝 la)) :
  extend_from (Ioo a b) f a = la :=
begin
  apply extend_from_eq,
  { rw closure_Ioo hab.ne,
    simp only [le_of_lt hab, left_mem_Icc, right_mem_Icc] },
  { simpa [hab] }
end

lemma eq_lim_at_right_extend_from_Ioo [topological_space α] [linear_order α] [densely_ordered α]
  [order_topology α] [topological_space β] [t2_space β] {f : α → β} {a b : α}
  {lb : β} (hab : a < b) (hb : tendsto f (𝓝[<] b) (𝓝 lb)) :
  extend_from (Ioo a b) f b = lb :=
begin
  apply extend_from_eq,
  { rw closure_Ioo hab.ne,
    simp only [le_of_lt hab, left_mem_Icc, right_mem_Icc] },
  { simpa [hab] }
end

lemma continuous_on_Ico_extend_from_Ioo [topological_space α]
  [linear_order α] [densely_ordered α] [order_topology α] [topological_space β]
  [regular_space β] {f : α → β} {a b : α} {la : β} (hab : a < b) (hf : continuous_on f (Ioo a b))
  (ha : tendsto f (𝓝[>] a) (𝓝 la)) :
  continuous_on (extend_from (Ioo a b) f) (Ico a b) :=
begin
  apply continuous_on_extend_from,
  { rw [closure_Ioo hab.ne], exact Ico_subset_Icc_self, },
  { intros x x_in,
    rcases eq_left_or_mem_Ioo_of_mem_Ico x_in with rfl | h,
    { use la,
      simpa [hab] },
    { use [f x, hf x h] } }
end

lemma continuous_on_Ioc_extend_from_Ioo [topological_space α]
  [linear_order α] [densely_ordered α] [order_topology α] [topological_space β]
  [regular_space β] {f : α → β} {a b : α} {lb : β} (hab : a < b) (hf : continuous_on f (Ioo a b))
  (hb : tendsto f (𝓝[<] b) (𝓝 lb)) :
  continuous_on (extend_from (Ioo a b) f) (Ioc a b) :=
begin
  have := @continuous_on_Ico_extend_from_Ioo αᵒᵈ _ _ _ _ _ _ _ f _ _ _ hab,
  erw [dual_Ico, dual_Ioi, dual_Ioo] at this,
  exact this hf hb
end


import defs.statics

theorem inversion_if
  {Γ: env} {e1 e2 e3: exp} {τ: typ}
  (et: has_typ Γ (exp.if_ e1 e2 e3) τ)
  : has_typ Γ e1 typ.bool ∧ has_typ Γ e2 τ ∧ has_typ Γ e3 τ :=
begin
  cases et,
  split,
  exact et_a,
  split,
  exact et_a_1,
  exact et_a_2,
end

theorem inversion_app
  {Γ: env} {e1 e2: exp} {τ2: typ}
  (et: has_typ Γ (exp.app e1 e2) τ2)
  : ∃ (τ1: typ), has_typ Γ e1 (typ.arrow τ1 τ2) ∧ has_typ Γ e2 τ1 :=
begin
  cases et,
  existsi et_τ1,
  split,
  exact et_a,
  exact et_a_1,
end

theorem inversion_fn
  {Γ: env} {x: var} {τ1 τ: typ} {e: exp}
  (et: has_typ Γ (exp.fn x τ1 e) τ)
  : ∃ (τ2: typ), τ = typ.arrow τ1 τ2 ∧ has_typ (env.insert_exp Γ x τ1) e τ2 :=
begin
  cases et,
  existsi et_τ2,
  split,
  refl,
  exact et_a,
end

theorem inversion_prod
  {Γ: env} {e1 e2: exp} {τ: typ}
  (et: has_typ Γ (exp.pair e1 e2) τ)
  : ∃ (τ1 τ2: typ), τ = (typ.pair τ1 τ2) ∧ has_typ Γ e1 τ1 ∧ has_typ Γ e2 τ2 :=
begin
  cases et,
  existsi [et_τ1, et_τ2],
  split,
  refl,
  split,
  exact et_a,
  exact et_a_1,
end

theorem inversion_prod_left
  {Γ: env} {e: exp} {τ1: typ}
  (et: has_typ Γ (exp.pair_left e) τ1)
  : ∃ (τ2: typ), has_typ Γ e (typ.pair τ1 τ2) :=
begin
  cases et,
  existsi et_τ2,
  exact et_a,
end

theorem inversion_prod_right
  {Γ: env} {e: exp} {τ2: typ}
  (et: has_typ Γ (exp.pair_right e) τ2)
  : ∃ (τ1: typ), has_typ Γ e (typ.pair τ1 τ2) :=
begin
  cases et,
  existsi et_τ1,
  exact et_a,
end

theorem inversion_sum_left
  {Γ: env} {e: exp} {τ2 τ: typ}
  (et: has_typ Γ (exp.either_left τ2 e) τ)
  : ∃ (τ1: typ), τ = typ.either τ1 τ2 ∧ has_typ Γ e τ1 :=
begin
  cases et,
  existsi et_τ1,
  split,
  refl,
  exact et_a,
end

theorem inversion_sum_right
  {Γ: env} {e: exp} {τ1 τ: typ}
  (et: has_typ Γ (exp.either_right τ1 e) τ)
  : ∃ (τ2: typ), τ = typ.either τ1 τ2 ∧ has_typ Γ e τ2 :=
begin
  cases et,
  existsi et_τ2,
  split,
  refl,
  exact et_a,
end

theorem inversion_case_never
  {Γ: env} {e: exp} {τ τ': typ}
  (et: has_typ Γ (exp.case_never τ e) τ')
  : τ = τ' ∧ has_typ Γ e typ.never :=
begin
  cases et,
  split,
  refl,
  exact et_a,
end

theorem inversion_case
  {Γ: env} {eh e1 e2: exp} {x1 x2: var} {τ: typ}
  (et: has_typ Γ (exp.case eh x1 e1 x2 e2) τ)
  : ∃ (τ1 τ2: typ),
    has_typ Γ eh (typ.either τ1 τ2) ∧
    has_typ (env.insert_exp Γ x1 τ1) e1 τ ∧
    has_typ (env.insert_exp Γ x2 τ2) e2 τ :=
begin
  cases et,
  existsi [et_τ1, et_τ2],
  split,
  exact et_a,
  split,
  exact et_a_1,
  exact et_a_2,
end


/-
Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison

! This file was ported from Lean 3 source module category_theory.sums.associator
! leanprover-community/mathlib commit ee05e9ce1322178f0c12004eb93c00d2c8c00ed2
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.CategoryTheory.Sums.Basic

/-!
# Associator for binary disjoint union of categories.

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

The associator functor `((C ⊕ D) ⊕ E) ⥤ (C ⊕ (D ⊕ E))` and its inverse form an equivalence.
-/

universe v u

open CategoryTheory

open Sum

namespace CategoryTheory.sum

variable (C : Type u) [Category.{v} C] (D : Type u) [Category.{v} D] (E : Type u) [Category.{v} E]

#print CategoryTheory.sum.associator /-
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map X Y f :=
    match X, Y, f with
    | inl (inl X), inl (inl Y), f => f
    | inl (inr X), inl (inr Y), f => f
    | inr X, inr Y, f => f
#align category_theory.sum.associator CategoryTheory.sum.associator
-/

/- warning: category_theory.sum.associator_obj_inl_inl -> CategoryTheory.sum.associator_obj_inl_inl is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : C), Eq.{succ u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X))) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X)
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : C), Eq.{succ u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X))) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X)
Case conversion may be inaccurate. Consider using '#align category_theory.sum.associator_obj_inl_inl CategoryTheory.sum.associator_obj_inl_inlₓ'. -/
@[simp]
theorem associator_obj_inl_inl (X) : (associator C D E).obj (inl (inl X)) = inl X :=
  rfl
#align category_theory.sum.associator_obj_inl_inl CategoryTheory.sum.associator_obj_inl_inl

/- warning: category_theory.sum.associator_obj_inl_inr -> CategoryTheory.sum.associator_obj_inl_inr is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : D), Eq.{succ u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X))) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X))
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : D), Eq.{succ u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X))) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X))
Case conversion may be inaccurate. Consider using '#align category_theory.sum.associator_obj_inl_inr CategoryTheory.sum.associator_obj_inl_inrₓ'. -/
@[simp]
theorem associator_obj_inl_inr (X) : (associator C D E).obj (inl (inr X)) = inr (inl X) :=
  rfl
#align category_theory.sum.associator_obj_inl_inr CategoryTheory.sum.associator_obj_inl_inr

/- warning: category_theory.sum.associator_obj_inr -> CategoryTheory.sum.associator_obj_inr is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : E), Eq.{succ u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X))
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : E), Eq.{succ u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X))
Case conversion may be inaccurate. Consider using '#align category_theory.sum.associator_obj_inr CategoryTheory.sum.associator_obj_inrₓ'. -/
@[simp]
theorem associator_obj_inr (X) : (associator C D E).obj (inr X) = inr (inr X) :=
  rfl
#align category_theory.sum.associator_obj_inr CategoryTheory.sum.associator_obj_inr

/- warning: category_theory.sum.associator_map_inl_inl -> CategoryTheory.sum.associator_map_inl_inl is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : C} {Y : C} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D Y))), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D Y)))) (CategoryTheory.Functor.map.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D Y)) f) f
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : C} {Y : C} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D Y))), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D Y)))) (Prefunctor.map.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D Y)) f) f
Case conversion may be inaccurate. Consider using '#align category_theory.sum.associator_map_inl_inl CategoryTheory.sum.associator_map_inl_inlₓ'. -/
@[simp]
theorem associator_map_inl_inl {X Y : C} (f : inl (inl X) ⟶ inl (inl Y)) :
    (associator C D E).map f = f :=
  rfl
#align category_theory.sum.associator_map_inl_inl CategoryTheory.sum.associator_map_inl_inl

/- warning: category_theory.sum.associator_map_inl_inr -> CategoryTheory.sum.associator_map_inl_inr is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : D} {Y : D} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D Y))), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D Y)))) (CategoryTheory.Functor.map.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D Y)) f) f
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : D} {Y : D} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D Y))), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D Y)))) (Prefunctor.map.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D Y)) f) f
Case conversion may be inaccurate. Consider using '#align category_theory.sum.associator_map_inl_inr CategoryTheory.sum.associator_map_inl_inrₓ'. -/
@[simp]
theorem associator_map_inl_inr {X Y : D} (f : inl (inr X) ⟶ inl (inr Y)) :
    (associator C D E).map f = f :=
  rfl
#align category_theory.sum.associator_map_inl_inr CategoryTheory.sum.associator_map_inl_inr

/- warning: category_theory.sum.associator_map_inr -> CategoryTheory.sum.associator_map_inr is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : E} {Y : E} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E Y)), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X)) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E Y))) (CategoryTheory.Functor.map.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E Y) f) f
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : E} {Y : E} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E Y)), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X)) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E Y))) (Prefunctor.map.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (CategoryTheory.sum.associator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E Y) f) f
Case conversion may be inaccurate. Consider using '#align category_theory.sum.associator_map_inr CategoryTheory.sum.associator_map_inrₓ'. -/
@[simp]
theorem associator_map_inr {X Y : E} (f : inr X ⟶ inr Y) : (associator C D E).map f = f :=
  rfl
#align category_theory.sum.associator_map_inr CategoryTheory.sum.associator_map_inr

#print CategoryTheory.sum.inverseAssociator /-
/-- The inverse associator functor `C ⊕ (D ⊕ E) ⥤ (C ⊕ D) ⊕ E` for sums of categories.
-/
def inverseAssociator : Sum C (Sum D E) ⥤ Sum (Sum C D) E
    where
  obj X :=
    match X with
    | inl X => inl (inl X)
    | inr (inl X) => inl (inr X)
    | inr (inr X) => inr X
  map X Y f :=
    match X, Y, f with
    | inl X, inl Y, f => f
    | inr (inl X), inr (inl Y), f => f
    | inr (inr X), inr (inr Y), f => f
#align category_theory.sum.inverse_associator CategoryTheory.sum.inverseAssociator
-/

/- warning: category_theory.sum.inverse_associator_obj_inl -> CategoryTheory.sum.inverseAssociator_obj_inl is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : C), Eq.{succ u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X))
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : C), Eq.{succ u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X)) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inl.{u2, u2} C D X))
Case conversion may be inaccurate. Consider using '#align category_theory.sum.inverse_associator_obj_inl CategoryTheory.sum.inverseAssociator_obj_inlₓ'. -/
@[simp]
theorem inverseAssociator_obj_inl (X) : (inverseAssociator C D E).obj (inl X) = inl (inl X) :=
  rfl
#align category_theory.sum.inverse_associator_obj_inl CategoryTheory.sum.inverseAssociator_obj_inl

/- warning: category_theory.sum.inverse_associator_obj_inr_inl -> CategoryTheory.sum.inverseAssociator_obj_inr_inl is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : D), Eq.{succ u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X))) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X))
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : D), Eq.{succ u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X))) (Sum.inl.{u2, u2} (Sum.{u2, u2} C D) E (Sum.inr.{u2, u2} C D X))
Case conversion may be inaccurate. Consider using '#align category_theory.sum.inverse_associator_obj_inr_inl CategoryTheory.sum.inverseAssociator_obj_inr_inlₓ'. -/
@[simp]
theorem inverseAssociator_obj_inr_inl (X) :
    (inverseAssociator C D E).obj (inr (inl X)) = inl (inr X) :=
  rfl
#align category_theory.sum.inverse_associator_obj_inr_inl CategoryTheory.sum.inverseAssociator_obj_inr_inl

/- warning: category_theory.sum.inverse_associator_obj_inr_inr -> CategoryTheory.sum.inverseAssociator_obj_inr_inr is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : E), Eq.{succ u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X))) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X)
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] (X : E), Eq.{succ u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X))) (Sum.inr.{u2, u2} (Sum.{u2, u2} C D) E X)
Case conversion may be inaccurate. Consider using '#align category_theory.sum.inverse_associator_obj_inr_inr CategoryTheory.sum.inverseAssociator_obj_inr_inrₓ'. -/
@[simp]
theorem inverseAssociator_obj_inr_inr (X) : (inverseAssociator C D E).obj (inr (inr X)) = inr X :=
  rfl
#align category_theory.sum.inverse_associator_obj_inr_inr CategoryTheory.sum.inverseAssociator_obj_inr_inr

/- warning: category_theory.sum.inverse_associator_map_inl -> CategoryTheory.sum.inverseAssociator_map_inl is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : C} {Y : C} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) Y)), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X)) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) Y))) (CategoryTheory.Functor.map.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) Y) f) f
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : C} {Y : C} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) Y)), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X)) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) Y))) (Prefunctor.map.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) X) (Sum.inl.{u2, u2} C (Sum.{u2, u2} D E) Y) f) f
Case conversion may be inaccurate. Consider using '#align category_theory.sum.inverse_associator_map_inl CategoryTheory.sum.inverseAssociator_map_inlₓ'. -/
@[simp]
theorem inverseAssociator_map_inl {X Y : C} (f : inl X ⟶ inl Y) :
    (inverseAssociator C D E).map f = f :=
  rfl
#align category_theory.sum.inverse_associator_map_inl CategoryTheory.sum.inverseAssociator_map_inl

/- warning: category_theory.sum.inverse_associator_map_inr_inl -> CategoryTheory.sum.inverseAssociator_map_inr_inl is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : D} {Y : D} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E Y))), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E Y)))) (CategoryTheory.Functor.map.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E Y)) f) f
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : D} {Y : D} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E Y))), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E Y)))) (Prefunctor.map.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inl.{u2, u2} D E Y)) f) f
Case conversion may be inaccurate. Consider using '#align category_theory.sum.inverse_associator_map_inr_inl CategoryTheory.sum.inverseAssociator_map_inr_inlₓ'. -/
@[simp]
theorem inverseAssociator_map_inr_inl {X Y : D} (f : inr (inl X) ⟶ inr (inl Y)) :
    (inverseAssociator C D E).map f = f :=
  rfl
#align category_theory.sum.inverse_associator_map_inr_inl CategoryTheory.sum.inverseAssociator_map_inr_inl

/- warning: category_theory.sum.inverse_associator_map_inr_inr -> CategoryTheory.sum.inverseAssociator_map_inr_inr is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : E} {Y : E} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E Y))), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X))) (CategoryTheory.Functor.obj.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E Y)))) (CategoryTheory.Functor.map.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E Y)) f) f
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E] {X : E} {Y : E} (f : Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E Y))), Eq.{succ u1} (Quiver.Hom.{succ u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X))) (Prefunctor.obj.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E Y)))) (Prefunctor.map.{succ u1, succ u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)))) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.CategoryStruct.toQuiver.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.Category.toCategoryStruct.{u1, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3))) (CategoryTheory.Functor.toPrefunctor.{u1, u1, u2, u2} (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3)) (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.inverseAssociator.{u1, u2} C _inst_1 D _inst_2 E _inst_3)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E X)) (Sum.inr.{u2, u2} C (Sum.{u2, u2} D E) (Sum.inr.{u2, u2} D E Y)) f) f
Case conversion may be inaccurate. Consider using '#align category_theory.sum.inverse_associator_map_inr_inr CategoryTheory.sum.inverseAssociator_map_inr_inrₓ'. -/
@[simp]
theorem inverseAssociator_map_inr_inr {X Y : E} (f : inr (inr X) ⟶ inr (inr Y)) :
    (inverseAssociator C D E).map f = f :=
  rfl
#align category_theory.sum.inverse_associator_map_inr_inr CategoryTheory.sum.inverseAssociator_map_inr_inr

/- warning: category_theory.sum.associativity -> CategoryTheory.sum.associativity is a dubious translation:
lean 3 declaration is
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E], CategoryTheory.Equivalence.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3))
but is expected to have type
  forall (C : Type.{u2}) [_inst_1 : CategoryTheory.Category.{u1, u2} C] (D : Type.{u2}) [_inst_2 : CategoryTheory.Category.{u1, u2} D] (E : Type.{u2}) [_inst_3 : CategoryTheory.Category.{u1, u2} E], CategoryTheory.Equivalence.{u1, u1, u2, u2} (Sum.{u2, u2} (Sum.{u2, u2} C D) E) (Sum.{u2, u2} C (Sum.{u2, u2} D E)) (CategoryTheory.sum.{u1, u2} (Sum.{u2, u2} C D) (CategoryTheory.sum.{u1, u2} C _inst_1 D _inst_2) E _inst_3) (CategoryTheory.sum.{u1, u2} C _inst_1 (Sum.{u2, u2} D E) (CategoryTheory.sum.{u1, u2} D _inst_2 E _inst_3))
Case conversion may be inaccurate. Consider using '#align category_theory.sum.associativity CategoryTheory.sum.associativityₓ'. -/
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso (by tidy)) (by tidy))
    (NatIso.ofComponents (fun X => eqToIso (by tidy)) (by tidy))
#align category_theory.sum.associativity CategoryTheory.sum.associativity

#print CategoryTheory.sum.associatorIsEquivalence /-
instance associatorIsEquivalence : IsEquivalence (associator C D E) :=
  (by infer_instance : IsEquivalence (associativity C D E).Functor)
#align category_theory.sum.associator_is_equivalence CategoryTheory.sum.associatorIsEquivalence
-/

#print CategoryTheory.sum.inverseAssociatorIsEquivalence /-
instance inverseAssociatorIsEquivalence : IsEquivalence (inverseAssociator C D E) :=
  (by infer_instance : IsEquivalence (associativity C D E).inverse)
#align category_theory.sum.inverse_associator_is_equivalence CategoryTheory.sum.inverseAssociatorIsEquivalence
-/

-- TODO unitors?
-- TODO pentagon natural transformation? ...satisfying?
end CategoryTheory.sum