l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem tendsto_iSup {f : α → β} {x : ι → Filter α} {y : Filter β} :
    Tendsto f (⨆ i, x i) y ↔ ∀ i, Tendsto f (x i) y := by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : α → β
x : ι → Filter α
y : Filter β
⊢ Tendsto f (⨆ i, x i) y ↔ ∀ (i : ι), Tendsto f (x i) y

Next tactic:
simp only [Tendsto, map_iSup, iSup_le_iff]
@[simp] theorem tendsto_principal {f : α → β} {l : Filter α} {s : Set β} :
    Tendsto f l (𝓟 s) ↔ ∀ᶠ a in l, f a ∈ s := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : α → β
l : Filter α
s : Set β
⊢ Tendsto f l (𝓟 s) ↔ ∀ᶠ (a : α) in l, f a ∈ s

Next tactic:
simp only [Tendsto, le_principal_iff, mem_map', Filter.Eventually]
theorem tendsto_principal_principal {f : α → β} {s : Set α} {t : Set β} :
    Tendsto f (𝓟 s) (𝓟 t) ↔ ∀ a ∈ s, f a ∈ t := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : α → β
s : Set α
t : Set β
⊢ Tendsto f (𝓟 s) (𝓟 t) ↔ ∀ a ∈ s, f a ∈ t

Next tactic:
simp only [tendsto_principal, eventually_principal]
@[simp] theorem tendsto_pure {f : α → β} {a : Filter α} {b : β} :
    Tendsto f a (pure b) ↔ ∀ᶠ x in a, f x = b := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : α → β
a : Filter α
b : β
⊢ Tendsto f a (pure b) ↔ ∀ᶠ (x : α) in a, f x = b

Next tactic:
simp only [Tendsto, le_pure_iff, mem_map', mem_singleton_iff, Filter.Eventually]
@[simp]
theorem map_inf_principal_preimage {f : α → β} {s : Set β} {l : Filter α} :
    map f (l ⊓ 𝓟 (f ⁻¹' s)) = map f l ⊓ 𝓟 s :=
  Filter.ext fun t => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : α → β
s : Set β
l : Filter α
t : Set β
⊢ t ∈ map f (l ⊓ 𝓟 (f ⁻¹' s)) ↔ t ∈ map f l ⊓ 𝓟 s

Next tactic:
simp only [mem_map', mem_inf_principal, mem_setOf_eq, mem_preimage]
protected theorem Tendsto.if {l₁ : Filter α} {l₂ : Filter β} {f g : α → β} {p : α → Prop}
    [∀ x, Decidable (p x)] (h₀ : Tendsto f (l₁ ⊓ 𝓟 { x | p x }) l₂)
    (h₁ : Tendsto g (l₁ ⊓ 𝓟 { x | ¬p x }) l₂) :
    Tendsto (fun x => if p x then f x else g x) l₁ l₂ := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : Tendsto f (l₁ ⊓ 𝓟 {x | p x}) l₂
h₁ : Tendsto g (l₁ ⊓ 𝓟 {x | ¬p x}) l₂
⊢ Tendsto (fun x => if p x then f x else g x) l₁ l₂

Next tactic:
simp only [tendsto_def, mem_inf_principal] at *
protected theorem Tendsto.if {l₁ : Filter α} {l₂ : Filter β} {f g : α → β} {p : α → Prop}
    [∀ x, Decidable (p x)] (h₀ : Tendsto f (l₁ ⊓ 𝓟 { x | p x }) l₂)
    (h₁ : Tendsto g (l₁ ⊓ 𝓟 { x | ¬p x }) l₂) :
    Tendsto (fun x => if p x then f x else g x) l₁ l₂ := by
  simp only [tendsto_def, mem_inf_principal] at *
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ s ∈ l₂, {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ s ∈ l₂, {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
⊢ ∀ s ∈ l₂, (fun x => if p x then f x else g x) ⁻¹' s ∈ l₁

Next tactic:
intro s hs
protected theorem Tendsto.if {l₁ : Filter α} {l₂ : Filter β} {f g : α → β} {p : α → Prop}
    [∀ x, Decidable (p x)] (h₀ : Tendsto f (l₁ ⊓ 𝓟 { x | p x }) l₂)
    (h₁ : Tendsto g (l₁ ⊓ 𝓟 { x | ¬p x }) l₂) :
    Tendsto (fun x => if p x then f x else g x) l₁ l₂ := by
  simp only [tendsto_def, mem_inf_principal] at *
  intro s hs
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ s ∈ l₂, {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ s ∈ l₂, {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
⊢ (fun x => if p x then f x else g x) ⁻¹' s ∈ l₁

Next tactic:
filter_upwards [h₀ s hs, h₁ s hs] with x hp₀ hp₁
protected theorem Tendsto.if {l₁ : Filter α} {l₂ : Filter β} {f g : α → β} {p : α → Prop}
    [∀ x, Decidable (p x)] (h₀ : Tendsto f (l₁ ⊓ 𝓟 { x | p x }) l₂)
    (h₁ : Tendsto g (l₁ ⊓ 𝓟 { x | ¬p x }) l₂) :
    Tendsto (fun x => if p x then f x else g x) l₁ l₂ := by
  simp only [tendsto_def, mem_inf_principal] at *
  intro s hs
  filter_upwards [h₀ s hs, h₁ s hs] with x hp₀ hp₁
  

Proof state:
case h
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ s ∈ l₂, {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ s ∈ l₂, {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
x : α
hp₀ : p x → x ∈ f ⁻¹' s
hp₁ : ¬p x → x ∈ g ⁻¹' s
⊢ x ∈ (fun x => if p x then f x else g x) ⁻¹' s

Next tactic:
rw [mem_preimage]
protected theorem Tendsto.if {l₁ : Filter α} {l₂ : Filter β} {f g : α → β} {p : α → Prop}
    [∀ x, Decidable (p x)] (h₀ : Tendsto f (l₁ ⊓ 𝓟 { x | p x }) l₂)
    (h₁ : Tendsto g (l₁ ⊓ 𝓟 { x | ¬p x }) l₂) :
    Tendsto (fun x => if p x then f x else g x) l₁ l₂ := by
  simp only [tendsto_def, mem_inf_principal] at *
  intro s hs
  filter_upwards [h₀ s hs, h₁ s hs] with x hp₀ hp₁
  rw [mem_preimage]
  

Proof state:
case h
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ s ∈ l₂, {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ s ∈ l₂, {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
x : α
hp₀ : p x → x ∈ f ⁻¹' s
hp₁ : ¬p x → x ∈ g ⁻¹' s
⊢ (if p x then f x else g x) ∈ s

Next tactic:
split_ifs with h
protected theorem Tendsto.if {l₁ : Filter α} {l₂ : Filter β} {f g : α → β} {p : α → Prop}
    [∀ x, Decidable (p x)] (h₀ : Tendsto f (l₁ ⊓ 𝓟 { x | p x }) l₂)
    (h₁ : Tendsto g (l₁ ⊓ 𝓟 { x | ¬p x }) l₂) :
    Tendsto (fun x => if p x then f x else g x) l₁ l₂ := by
  simp only [tendsto_def, mem_inf_principal] at *
  intro s hs
  filter_upwards [h₀ s hs, h₁ s hs] with x hp₀ hp₁
  rw [mem_preimage]
  split_ifs with h
  

Proof state:
case pos
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ s ∈ l₂, {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ s ∈ l₂, {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
x : α
hp₀ : p x → x ∈ f ⁻¹' s
hp₁ : ¬p x → x ∈ g ⁻¹' s
h : p x
⊢ f x ∈ s
case neg
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ s ∈ l₂, {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ s ∈ l₂, {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
x : α
hp₀ : p x → x ∈ f ⁻¹' s
hp₁ : ¬p x → x ∈ g ⁻¹' s
h : ¬p x
⊢ g x ∈ s

Next tactic:
exacts [hp₀ h, hp₁ h]
theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
r : ℚ
hr : 0 < r
⊢ 0 < ↑r

Next tactic:
rw [Rat.cast_def]
theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r := by
  rw [Rat.cast_def]
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
r : ℚ
hr : 0 < r
⊢ 0 < ↑r.num / ↑r.den

Next tactic:
exact div_pos (Int.cast_pos.2 <| num_pos_iff_pos.2 hr) (Nat.cast_pos.2 r.pos)
@[mono]
theorem cast_strictMono : StrictMono ((↑) : ℚ → K) := fun m n => by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
m n : ℚ
⊢ m < n → ↑m < ↑n

Next tactic:
simpa only [sub_pos, cast_sub] using @cast_pos_of_pos K _ (n - m)
@[simp]
theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
n : ℚ
⊢ 0 ≤ ↑n ↔ 0 ≤ n

Next tactic:
norm_cast
@[simp]
theorem cast_nonpos {n : ℚ} : (n : K) ≤ 0 ↔ n ≤ 0 := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
n : ℚ
⊢ ↑n ≤ 0 ↔ n ≤ 0

Next tactic:
norm_cast
@[simp]
theorem cast_pos {n : ℚ} : (0 : K) < n ↔ 0 < n := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
n : ℚ
⊢ 0 < ↑n ↔ 0 < n

Next tactic:
norm_cast
@[simp]
theorem cast_lt_zero {n : ℚ} : (n : K) < 0 ↔ n < 0 := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
n : ℚ
⊢ ↑n < 0 ↔ n < 0

Next tactic:
norm_cast
@[simp, norm_cast]
theorem cast_abs {q : ℚ} : ((|q| : ℚ) : K) = |(q : K)| := by 

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
q : ℚ
⊢ ↑|q| = |↑q|

Next tactic:
simp [abs_eq_max_neg]
@[simp]
theorem preimage_cast_Icc (a b : ℚ) : (↑) ⁻¹' Icc (a : K) b = Icc a b := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a b : ℚ
⊢ Rat.cast ⁻¹' Icc ↑a ↑b = Icc a b

Next tactic:
ext x
@[simp]
theorem preimage_cast_Icc (a b : ℚ) : (↑) ⁻¹' Icc (a : K) b = Icc a b := by
  ext x
  

Proof state:
case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a b x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Icc ↑a ↑b ↔ x ∈ Icc a b

Next tactic:
simp
@[simp]
theorem preimage_cast_Ico (a b : ℚ) : (↑) ⁻¹' Ico (a : K) b = Ico a b := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a b : ℚ
⊢ Rat.cast ⁻¹' Ico ↑a ↑b = Ico a b

Next tactic:
ext x
@[simp]
theorem preimage_cast_Ico (a b : ℚ) : (↑) ⁻¹' Ico (a : K) b = Ico a b := by
  ext x
  

Proof state:
case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a b x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Ico ↑a ↑b ↔ x ∈ Ico a b

Next tactic:
simp
@[simp]
theorem preimage_cast_Ioc (a b : ℚ) : (↑) ⁻¹' Ioc (a : K) b = Ioc a b := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a b : ℚ
⊢ Rat.cast ⁻¹' Ioc ↑a ↑b = Ioc a b

Next tactic:
ext x
@[simp]
theorem preimage_cast_Ioc (a b : ℚ) : (↑) ⁻¹' Ioc (a : K) b = Ioc a b := by
  ext x
  

Proof state:
case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a b x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Ioc ↑a ↑b ↔ x ∈ Ioc a b

Next tactic:
simp
@[simp]
theorem preimage_cast_Ioo (a b : ℚ) : (↑) ⁻¹' Ioo (a : K) b = Ioo a b := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a b : ℚ
⊢ Rat.cast ⁻¹' Ioo ↑a ↑b = Ioo a b

Next tactic:
ext x
@[simp]
theorem preimage_cast_Ioo (a b : ℚ) : (↑) ⁻¹' Ioo (a : K) b = Ioo a b := by
  ext x
  

Proof state:
case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a b x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Ioo ↑a ↑b ↔ x ∈ Ioo a b

Next tactic:
simp
@[simp]
theorem preimage_cast_Ici (a : ℚ) : (↑) ⁻¹' Ici (a : K) = Ici a := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a : ℚ
⊢ Rat.cast ⁻¹' Ici ↑a = Ici a

Next tactic:
ext x
@[simp]
theorem preimage_cast_Ici (a : ℚ) : (↑) ⁻¹' Ici (a : K) = Ici a := by
  ext x
  

Proof state:
case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Ici ↑a ↔ x ∈ Ici a

Next tactic:
simp
@[simp]
theorem preimage_cast_Iic (a : ℚ) : (↑) ⁻¹' Iic (a : K) = Iic a := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a : ℚ
⊢ Rat.cast ⁻¹' Iic ↑a = Iic a

Next tactic:
ext x
@[simp]
theorem preimage_cast_Iic (a : ℚ) : (↑) ⁻¹' Iic (a : K) = Iic a := by
  ext x
  

Proof state:
case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Iic ↑a ↔ x ∈ Iic a

Next tactic:
simp
@[simp]
theorem preimage_cast_Ioi (a : ℚ) : (↑) ⁻¹' Ioi (a : K) = Ioi a := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a : ℚ
⊢ Rat.cast ⁻¹' Ioi ↑a = Ioi a

Next tactic:
ext x
@[simp]
theorem preimage_cast_Ioi (a : ℚ) : (↑) ⁻¹' Ioi (a : K) = Ioi a := by
  ext x
  

Proof state:
case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Ioi ↑a ↔ x ∈ Ioi a

Next tactic:
simp
@[simp]
theorem preimage_cast_Iio (a : ℚ) : (↑) ⁻¹' Iio (a : K) = Iio a := by
  

Proof state:
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a : ℚ
⊢ Rat.cast ⁻¹' Iio ↑a = Iio a

Next tactic:
ext x
@[simp]
theorem preimage_cast_Iio (a : ℚ) : (↑) ⁻¹' Iio (a : K) = Iio a := by
  ext x
  

Proof state:
case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedField K
a x : ℚ
⊢ x ∈ Rat.cast ⁻¹' Iio ↑a ↔ x ∈ Iio a

Next tactic:
simp
instance (priority := 100) small_of_fintype (α : Type v) [Fintype α] : Small.{w} α := by
  

Proof state:
α : Type v
inst✝ : Fintype α
⊢ Small.{w, v} α

Next tactic:
rw [small_congr (Fintype.equivFin α)]
instance (priority := 100) small_of_fintype (α : Type v) [Fintype α] : Small.{w} α := by
  rw [small_congr (Fintype.equivFin α)]
  

Proof state:
α : Type v
inst✝ : Fintype α
⊢ Small.{w, 0} (Fin (Fintype.card α))

Next tactic:
infer_instance
/-- As it is unclear whether the opposite category `Cᵒᵖ` should always be equipped
with the shift by `ℤ` such that shifting by `n` on `Cᵒᵖ` corresponds to shifting
by `-n` on `C`, the user shall have to do `open CategoryTheory.Pretriangulated.Opposite`
in order to get this shift and the (pre)triangulated structure on `Cᵒᵖ`. -/

private abbrev OppositeShiftAux :=
  PullbackShift (OppositeShift C ℤ)
    (AddMonoidHom.mk' (fun (n : ℤ) => -n) (by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.44, u_1} C
inst✝ : HasShift C ℤ
⊢ ∀ (a b : ℤ), (fun n => -n) (a + b) = (fun n => -n) a + (fun n => -n) b

Next tactic:
intros
/-- As it is unclear whether the opposite category `Cᵒᵖ` should always be equipped
with the shift by `ℤ` such that shifting by `n` on `Cᵒᵖ` corresponds to shifting
by `-n` on `C`, the user shall have to do `open CategoryTheory.Pretriangulated.Opposite`
in order to get this shift and the (pre)triangulated structure on `Cᵒᵖ`. -/

private abbrev OppositeShiftAux :=
  PullbackShift (OppositeShift C ℤ)
    (AddMonoidHom.mk' (fun (n : ℤ) => -n) (by intros; 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.44, u_1} C
inst✝ : HasShift C ℤ
a✝ b✝ : ℤ
⊢ (fun n => -n) (a✝ + b✝) = (fun n => -n) a✝ + (fun n => -n) b✝

Next tactic:
dsimp
/-- As it is unclear whether the opposite category `Cᵒᵖ` should always be equipped
with the shift by `ℤ` such that shifting by `n` on `Cᵒᵖ` corresponds to shifting
by `-n` on `C`, the user shall have to do `open CategoryTheory.Pretriangulated.Opposite`
in order to get this shift and the (pre)triangulated structure on `Cᵒᵖ`. -/

private abbrev OppositeShiftAux :=
  PullbackShift (OppositeShift C ℤ)
    (AddMonoidHom.mk' (fun (n : ℤ) => -n) (by intros; dsimp; 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.44, u_1} C
inst✝ : HasShift C ℤ
a✝ b✝ : ℤ
⊢ -(a✝ + b✝) = -a✝ + -b✝

Next tactic:
linarith
/-- The shift functor on the opposite category identifies to the opposite functor
of a shift functor on the original category. -/
noncomputable def shiftFunctorOpIso (n m : ℤ) (hnm : n + m = 0) :
    shiftFunctor Cᵒᵖ n ≅ (shiftFunctor C m).op := eqToIso (by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.2659, u_1} C
inst✝ : HasShift C ℤ
n m : ℤ
hnm : n + m = 0
⊢ shiftFunctor Cᵒᵖ n = (shiftFunctor C m).op

Next tactic:
obtain rfl : m = -n := by linarith
/-- The shift functor on the opposite category identifies to the opposite functor
of a shift functor on the original category. -/
noncomputable def shiftFunctorOpIso (n m : ℤ) (hnm : n + m = 0) :
    shiftFunctor Cᵒᵖ n ≅ (shiftFunctor C m).op := eqToIso (by
  obtain rfl : m = -n := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.2659, u_1} C
inst✝ : HasShift C ℤ
n m : ℤ
hnm : n + m = 0
⊢ m = -n

Next tactic:
linarith
/-- The shift functor on the opposite category identifies to the opposite functor
of a shift functor on the original category. -/
noncomputable def shiftFunctorOpIso (n m : ℤ) (hnm : n + m = 0) :
    shiftFunctor Cᵒᵖ n ≅ (shiftFunctor C m).op := eqToIso (by
  obtain rfl : m = -n := by linarith
  

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.2659, u_1} C
inst✝ : HasShift C ℤ
n : ℤ
hnm : n + -n = 0
⊢ shiftFunctor Cᵒᵖ n = (shiftFunctor C (-n)).op

Next tactic:
rfl
lemma shiftFunctorZero_op_hom_app (X : Cᵒᵖ) :
    (shiftFunctorZero Cᵒᵖ ℤ).hom.app X = (shiftFunctorOpIso C 0 0 (zero_add 0)).hom.app X ≫
      ((shiftFunctorZero C ℤ).inv.app X.unop).op := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
⊢ (shiftFunctorZero Cᵒᵖ ℤ).hom.app X =
    (shiftFunctorOpIso C 0 0 (_ : 0 + 0 = 0)).hom.app X ≫ ((shiftFunctorZero C ℤ).inv.app X.unop).op

Next tactic:
erw [@pullbackShiftFunctorZero_hom_app (OppositeShift C ℤ), oppositeShiftFunctorZero_hom_app]
lemma shiftFunctorZero_op_hom_app (X : Cᵒᵖ) :
    (shiftFunctorZero Cᵒᵖ ℤ).hom.app X = (shiftFunctorOpIso C 0 0 (zero_add 0)).hom.app X ≫
      ((shiftFunctorZero C ℤ).inv.app X.unop).op := by
  erw [@pullbackShiftFunctorZero_hom_app (OppositeShift C ℤ), oppositeShiftFunctorZero_hom_app]
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
⊢ (pullbackShiftIso (OppositeShift C ℤ)
              (AddMonoidHom.mk' (fun n => -n) CategoryTheory.Pretriangulated.Opposite.OppositeShiftAux.proof_1) 0 0
              (_ :
                0 =
                  (AddMonoidHom.mk' (fun n => -n) CategoryTheory.Pretriangulated.Opposite.OppositeShiftAux.proof_1)
                    0)).hom.app
        X ≫
      ((shiftFunctorZero C ℤ).inv.app X.unop).op =
    (shiftFunctorOpIso C 0 0 (_ : 0 + 0 = 0)).hom.app X ≫ ((shiftFunctorZero C ℤ).inv.app X.unop).op

Next tactic:
rfl
lemma shiftFunctorZero_op_inv_app (X : Cᵒᵖ) :
    (shiftFunctorZero Cᵒᵖ ℤ).inv.app X =
      ((shiftFunctorZero C ℤ).hom.app X.unop).op ≫
      (shiftFunctorOpIso C 0 0 (zero_add 0)).inv.app X := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
⊢ (shiftFunctorZero Cᵒᵖ ℤ).inv.app X =
    ((shiftFunctorZero C ℤ).hom.app X.unop).op ≫ (shiftFunctorOpIso C 0 0 (_ : 0 + 0 = 0)).inv.app X

Next tactic:
rw [← cancel_epi ((shiftFunctorZero Cᵒᵖ ℤ).hom.app X), Iso.hom_inv_id_app,
    shiftFunctorZero_op_hom_app, assoc, ← op_comp_assoc, Iso.hom_inv_id_app, op_id,
    id_comp, Iso.hom_inv_id_app]
lemma shiftFunctorAdd'_op_hom_app (X : Cᵒᵖ) (a₁ a₂ a₃ : ℤ) (h : a₁ + a₂ = a₃)
    (b₁ b₂ b₃ : ℤ) (h₁ : a₁ + b₁ = 0) (h₂ : a₂ + b₂ = 0) (h₃ : a₃ + b₃ = 0) :
    (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).hom.app X =
      (shiftFunctorOpIso C _ _ h₃).hom.app X ≫
        ((shiftFunctorAdd' C b₁ b₂ b₃ (by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.12262, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
a₁ a₂ a₃ : ℤ
h : a₁ + a₂ = a₃
b₁ b₂ b₃ : ℤ
h₁ : a₁ + b₁ = 0
h₂ : a₂ + b₂ = 0
h₃ : a₃ + b₃ = 0
⊢ b₁ + b₂ = b₃

Next tactic:
linarith
lemma shiftFunctorAdd'_op_hom_app (X : Cᵒᵖ) (a₁ a₂ a₃ : ℤ) (h : a₁ + a₂ = a₃)
    (b₁ b₂ b₃ : ℤ) (h₁ : a₁ + b₁ = 0) (h₂ : a₂ + b₂ = 0) (h₃ : a₃ + b₃ = 0) :
    (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).hom.app X =
      (shiftFunctorOpIso C _ _ h₃).hom.app X ≫
        ((shiftFunctorAdd' C b₁ b₂ b₃ (by linarith)).inv.app X.unop).op ≫
        (shiftFunctorOpIso C _ _ h₂).inv.app _ ≫
        (shiftFunctor Cᵒᵖ a₂).map ((shiftFunctorOpIso C _ _ h₁).inv.app X) := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
a₁ a₂ a₃ : ℤ
h : a₁ + a₂ = a₃
b₁ b₂ b₃ : ℤ
h₁ : a₁ + b₁ = 0
h₂ : a₂ + b₂ = 0
h₃ : a₃ + b₃ = 0
⊢ (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).hom.app X =
    (shiftFunctorOpIso C a₃ b₃ h₃).hom.app X ≫
      ((shiftFunctorAdd' C b₁ b₂ b₃ (_ : b₁ + b₂ = b₃)).inv.app X.unop).op ≫
        (shiftFunctorOpIso C a₂ b₂ h₂).inv.app { unop := (shiftFunctor C b₁).toPrefunctor.1 X.unop } ≫
          (shiftFunctor Cᵒᵖ a₂).map ((shiftFunctorOpIso C a₁ b₁ h₁).inv.app X)

Next tactic:
erw [@pullbackShiftFunctorAdd'_hom_app (OppositeShift C ℤ) _ _ _ _ _ _ _ X
    a₁ a₂ a₃ h b₁ b₂ b₃ (by dsimp; linarith) (by dsimp; linarith) (by dsimp; linarith)]
lemma shiftFunctorAdd'_op_hom_app (X : Cᵒᵖ) (a₁ a₂ a₃ : ℤ) (h : a₁ + a₂ = a₃)
    (b₁ b₂ b₃ : ℤ) (h₁ : a₁ + b₁ = 0) (h₂ : a₂ + b₂ = 0) (h₃ : a₃ + b₃ = 0) :
    (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).hom.app X =
      (shiftFunctorOpIso C _ _ h₃).hom.app X ≫
        ((shiftFunctorAdd' C b₁ b₂ b₃ (by linarith)).inv.app X.unop).op ≫
        (shiftFunctorOpIso C _ _ h₂).inv.app _ ≫
        (shiftFunctor Cᵒᵖ a₂).map ((shiftFunctorOpIso C _ _ h₁).inv.app X) := by
  erw [@pullbackShiftFunctorAdd'_hom_app (OppositeShift C ℤ) _ _ _ _ _ _ _ X
    a₁ a₂ a₃ h b₁ b₂ b₃ (by 

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
a₁ a₂ a₃ : ℤ
h : a₁ + a₂ = a₃
b₁ b₂ b₃ : ℤ
h₁ : a₁ + b₁ = 0
h₂ : a₂ + b₂ = 0
h₃ : a₃ + b₃ = 0
⊢ b₁ = (AddMonoidHom.mk' (fun n => -n) CategoryTheory.Pretriangulated.Opposite.OppositeShiftAux.proof_1) a₁

Next tactic:
dsimp
lemma shiftFunctorAdd'_op_hom_app (X : Cᵒᵖ) (a₁ a₂ a₃ : ℤ) (h : a₁ + a₂ = a₃)
    (b₁ b₂ b₃ : ℤ) (h₁ : a₁ + b₁ = 0) (h₂ : a₂ + b₂ = 0) (h₃ : a₃ + b₃ = 0) :
    (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).hom.app X =
      (shiftFunctorOpIso C _ _ h₃).hom.app X ≫
        ((shiftFunctorAdd' C b₁ b₂ b₃ (by linarith)).inv.app X.unop).op ≫
        (shiftFunctorOpIso C _ _ h₂).inv.app _ ≫
        (shiftFunctor Cᵒᵖ a₂).map ((shiftFunctorOpIso C _ _ h₁).inv.app X) := by
  erw [@pullbackShiftFunctorAdd'_hom_app (OppositeShift C ℤ) _ _ _ _ _ _ _ X
    a₁ a₂ a₃ h b₁ b₂ b₃ (by dsimp; 

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
a₁ a₂ a₃ : ℤ
h : a₁ + a₂ = a₃
b₁ b₂ b₃ : ℤ
h₁ : a₁ + b₁ = 0
h₂ : a₂ + b₂ = 0
h₃ : a₃ + b₃ = 0
⊢ b₁ = -a₁

Next tactic:
linarith
lemma shiftFunctorAdd'_op_hom_app (X : Cᵒᵖ) (a₁ a₂ a₃ : ℤ) (h : a₁ + a₂ = a₃)
    (b₁ b₂ b₃ : ℤ) (h₁ : a₁ + b₁ = 0) (h₂ : a₂ + b₂ = 0) (h₃ : a₃ + b₃ = 0) :
    (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).hom.app X =
      (shiftFunctorOpIso C _ _ h₃).hom.app X ≫
        ((shiftFunctorAdd' C b₁ b₂ b₃ (by linarith)).inv.app X.unop).op ≫
        (shiftFunctorOpIso C _ _ h₂).inv.app _ ≫
        (shiftFunctor Cᵒᵖ a₂).map ((shiftFunctorOpIso C _ _ h₁).inv.app X) := by
  erw [@pullbackShiftFunctorAdd'_hom_app (OppositeShift C ℤ) _ _ _ _ _ _ _ X
    a₁ a₂ a₃ h b₁ b₂ b₃ (by dsimp; linarith) (by 

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
a₁ a₂ a₃ : ℤ
h : a₁ + a₂ = a₃
b₁ b₂ b₃ : ℤ
h₁ : a₁ + b₁ = 0
h₂ : a₂ + b₂ = 0
h₃ : a₃ + b₃ = 0
⊢ b₂ = (AddMonoidHom.mk' (fun n => -n) CategoryTheory.Pretriangulated.Opposite.OppositeShiftAux.proof_1) a₂

Next tactic:
dsimp
lemma shiftFunctorAdd'_op_hom_app (X : Cᵒᵖ) (a₁ a₂ a₃ : ℤ) (h : a₁ + a₂ = a₃)
    (b₁ b₂ b₃ : ℤ) (h₁ : a₁ + b₁ = 0) (h₂ : a₂ + b₂ = 0) (h₃ : a₃ + b₃ = 0) :
    (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).hom.app X =
      (shiftFunctorOpIso C _ _ h₃).hom.app X ≫
        ((shiftFunctorAdd' C b₁ b₂ b₃ (by linarith)).inv.app X.unop).op ≫
        (shiftFunctorOpIso C _ _ h₂).inv.app _ ≫
        (shiftFunctor Cᵒᵖ a₂).map ((shiftFunctorOpIso C _ _ h₁).inv.app X) := by
  erw [@pullbackShiftFunctorAdd'_hom_app (OppositeShift C ℤ) _ _ _ _ _ _ _ X
    a₁ a₂ a₃ h b₁ b₂ b₃ (by dsimp; linarith) (by dsimp; 

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasShift C ℤ
X : Cᵒᵖ
a₁ a₂ a₃ : ℤ
h : a₁ + a₂ = a₃
b₁ b₂ b₃ : ℤ
h₁ : a₁ + b₁ = 0
h₂ : a₂ + b₂ = 0
h₃ : a₃ + b₃ = 0
⊢ b₂ = -a₂

Next tactic:
linarith