l3lab/ntp-mathlib huggingface dataset:
/-- Remove the element at position `i` from a vector of length `n`. -/
def removeNth (i : Fin n) : Vector α n → Vector α (n - 1)
  | ⟨l, p⟩ => ⟨List.removeNth l i.1, by 

Proof state:
α : Type u
β : Type v
φ : Type w
n : ℕ
i : Fin n
l : List α
p : List.length l = n
⊢ List.length (List.removeNth l ↑i) = n - 1

Next tactic:
rw [l.length_removeNth]
/-- Remove the element at position `i` from a vector of length `n`. -/
def removeNth (i : Fin n) : Vector α n → Vector α (n - 1)
  | ⟨l, p⟩ => ⟨List.removeNth l i.1, by rw [l.length_removeNth] <;> 

Proof state:
α : Type u
β : Type v
φ : Type w
n : ℕ
i : Fin n
l : List α
p : List.length l = n
⊢ List.length l - 1 = n - 1

Next tactic:
rw [p]
/-- Remove the element at position `i` from a vector of length `n`. -/
def removeNth (i : Fin n) : Vector α n → Vector α (n - 1)
  | ⟨l, p⟩ => ⟨List.removeNth l i.1, by rw [l.length_removeNth] <;> 

Proof state:
α : Type u
β : Type v
φ : Type w
n : ℕ
i : Fin n
l : List α
p : List.length l = n
⊢ ↑i < List.length l

Next tactic:
rw [p]
/-- Remove the element at position `i` from a vector of length `n`. -/
def removeNth (i : Fin n) : Vector α n → Vector α (n - 1)
  | ⟨l, p⟩ => ⟨List.removeNth l i.1, by rw [l.length_removeNth] <;> rw [p]; 

Proof state:
α : Type u
β : Type v
φ : Type w
n : ℕ
i : Fin n
l : List α
p : List.length l = n
⊢ ↑i < n

Next tactic:
exact i.2
/-- Runs a function over a vector returning the intermediate results and a
final result.
-/
def mapAccumr (f : α → σ → σ × β) : Vector α n → σ → σ × Vector β n
  | ⟨x, px⟩, c =>
    let res := List.mapAccumr f x c
    ⟨res.1, res.2, by 

Proof state:
α : Type u
β : Type v
φ : Type w
n : ℕ
σ : Type
f : α → σ → σ × β
x : List α
px : List.length x = n
c : σ
res : σ × List β := List.mapAccumr f x c
⊢ List.length res.2 = n

Next tactic:
simp [*]
/-- Runs a function over a pair of vectors returning the intermediate results and a
final result.
-/
def mapAccumr₂ {α β σ φ : Type} (f : α → β → σ → σ × φ) :
    Vector α n → Vector β n → σ → σ × Vector φ n
  | ⟨x, px⟩, ⟨y, py⟩, c =>
    let res := List.mapAccumr₂ f x y c
    ⟨res.1, res.2, by 

Proof state:
α✝ : Type u
β✝ : Type v
φ✝ : Type w
n : ℕ
σ✝ α β σ φ : Type
f : α → β → σ → σ × φ
x : List α
px : List.length x = n
y : List β
py : List.length y = n
c : σ
res : σ × List φ := List.mapAccumr₂ f x y c
⊢ List.length res.2 = n

Next tactic:
simp [*]
/-- `shiftLeftFill v i` is the vector obtained by left-shifting `v` `i` times and padding with the
    `fill` argument. If `v.length < i` then this will return `replicate n fill`. -/
def shiftLeftFill (v : Vector α n) (i : ℕ) (fill : α) : Vector α n :=
  Vector.congr (by 

Proof state:
α : Type u
β : Type v
φ : Type w
n : ℕ
v : Vector α n
i : ℕ
fill : α
⊢ n - i + min n i = n

Next tactic:
simp
/-- `shiftRightFill v i` is the vector obtained by right-shifting `v` `i` times and padding with the
    `fill` argument. If `v.length < i` then this will return `replicate n fill`. -/
def shiftRightFill (v : Vector α n) (i : ℕ) (fill : α) : Vector α n :=
  Vector.congr (by
        

Proof state:
α : Type u
β : Type v
φ : Type w
n : ℕ
v : Vector α n
i : ℕ
fill : α
⊢ min n i + min (n - i) n = n

Next tactic:
by_cases h : i ≤ n
/-- `shiftRightFill v i` is the vector obtained by right-shifting `v` `i` times and padding with the
    `fill` argument. If `v.length < i` then this will return `replicate n fill`. -/
def shiftRightFill (v : Vector α n) (i : ℕ) (fill : α) : Vector α n :=
  Vector.congr (by
        by_cases h : i ≤ n
        · 

Proof state:
case pos
α : Type u
β : Type v
φ : Type w
n : ℕ
v : Vector α n
i : ℕ
fill : α
h : i ≤ n
⊢ min n i + min (n - i) n = n

Next tactic:
have h₁ := Nat.sub_le n i
/-- `shiftRightFill v i` is the vector obtained by right-shifting `v` `i` times and padding with the
    `fill` argument. If `v.length < i` then this will return `replicate n fill`. -/
def shiftRightFill (v : Vector α n) (i : ℕ) (fill : α) : Vector α n :=
  Vector.congr (by
        by_cases h : i ≤ n
        · have h₁ := Nat.sub_le n i
          

Proof state:
case pos
α : Type u
β : Type v
φ : Type w
n : ℕ
v : Vector α n
i : ℕ
fill : α
h : i ≤ n
h₁ : n - i ≤ n
⊢ min n i + min (n - i) n = n

Next tactic:
rw [min_eq_right h]
/-- `shiftRightFill v i` is the vector obtained by right-shifting `v` `i` times and padding with the
    `fill` argument. If `v.length < i` then this will return `replicate n fill`. -/
def shiftRightFill (v : Vector α n) (i : ℕ) (fill : α) : Vector α n :=
  Vector.congr (by
        by_cases h : i ≤ n
        · have h₁ := Nat.sub_le n i
          rw [min_eq_right h]
          

Proof state:
case pos
α : Type u
β : Type v
φ : Type w
n : ℕ
v : Vector α n
i : ℕ
fill : α
h : i ≤ n
h₁ : n - i ≤ n
⊢ i + min (n - i) n = n

Next tactic:
rw [min_eq_left h₁, ← add_tsub_assoc_of_le h, Nat.add_comm, add_tsub_cancel_right]
/-- `shiftRightFill v i` is the vector obtained by right-shifting `v` `i` times and padding with the
    `fill` argument. If `v.length < i` then this will return `replicate n fill`. -/
def shiftRightFill (v : Vector α n) (i : ℕ) (fill : α) : Vector α n :=
  Vector.congr (by
        by_cases h : i ≤ n
        · have h₁ := Nat.sub_le n i
          rw [min_eq_right h]
          rw [min_eq_left h₁, ← add_tsub_assoc_of_le h, Nat.add_comm, add_tsub_cancel_right]
        · 

Proof state:
case neg
α : Type u
β : Type v
φ : Type w
n : ℕ
v : Vector α n
i : ℕ
fill : α
h : ¬i ≤ n
⊢ min n i + min (n - i) n = n

Next tactic:
have h₁ := le_of_not_ge h
/-- `shiftRightFill v i` is the vector obtained by right-shifting `v` `i` times and padding with the
    `fill` argument. If `v.length < i` then this will return `replicate n fill`. -/
def shiftRightFill (v : Vector α n) (i : ℕ) (fill : α) : Vector α n :=
  Vector.congr (by
        by_cases h : i ≤ n
        · have h₁ := Nat.sub_le n i
          rw [min_eq_right h]
          rw [min_eq_left h₁, ← add_tsub_assoc_of_le h, Nat.add_comm, add_tsub_cancel_right]
        · have h₁ := le_of_not_ge h
          

Proof state:
case neg
α : Type u
β : Type v
φ : Type w
n : ℕ
v : Vector α n
i : ℕ
fill : α
h : ¬i ≤ n
h₁ : n ≤ i
⊢ min n i + min (n - i) n = n

Next tactic:
rw [min_eq_left h₁, tsub_eq_zero_iff_le.mpr h₁, zero_min, Nat.add_zero]
/-- `toList` of `cons` of a vector and an element is
the `cons` of the list obtained by `toList` and the element -/
@[simp]
theorem toList_cons (a : α) (v : Vector α n) : toList (cons a v) = a :: toList v := by
  

Proof state:
α : Type u
β : Type v
φ : Type w
n : ℕ
a : α
v : Vector α n
⊢ toList (cons a v) = a :: toList v

Next tactic:
cases v
/-- `toList` of `cons` of a vector and an element is
the `cons` of the list obtained by `toList` and the element -/
@[simp]
theorem toList_cons (a : α) (v : Vector α n) : toList (cons a v) = a :: toList v := by
  cases v; 

Proof state:
case mk
α : Type u
β : Type v
φ : Type w
n : ℕ
a : α
val✝ : List α
property✝ : List.length val✝ = n
⊢ toList (cons a { val := val✝, property := property✝ }) = a :: toList { val := val✝, property := property✝ }

Next tactic:
rfl
/-- Appending of vectors corresponds under `toList` to appending of lists. -/
@[simp]
theorem toList_append {n m : ℕ} (v : Vector α n) (w : Vector α m) :
    toList (append v w) = toList v ++ toList w := by
  

Proof state:
α : Type u
β : Type v
φ : Type w
n✝ n m : ℕ
v : Vector α n
w : Vector α m
⊢ toList (append v w) = toList v ++ toList w

Next tactic:
cases v
/-- Appending of vectors corresponds under `toList` to appending of lists. -/
@[simp]
theorem toList_append {n m : ℕ} (v : Vector α n) (w : Vector α m) :
    toList (append v w) = toList v ++ toList w := by
  cases v
  

Proof state:
case mk
α : Type u
β : Type v
φ : Type w
n✝ n m : ℕ
w : Vector α m
val✝ : List α
property✝ : List.length val✝ = n
⊢ toList (append { val := val✝, property := property✝ } w) = toList { val := val✝, property := property✝ } ++ toList w

Next tactic:
cases w
/-- Appending of vectors corresponds under `toList` to appending of lists. -/
@[simp]
theorem toList_append {n m : ℕ} (v : Vector α n) (w : Vector α m) :
    toList (append v w) = toList v ++ toList w := by
  cases v
  cases w
  

Proof state:
case mk.mk
α : Type u
β : Type v
φ : Type w
n✝ n m : ℕ
val✝¹ : List α
property✝¹ : List.length val✝¹ = n
val✝ : List α
property✝ : List.length val✝ = m
⊢ toList (append { val := val✝¹, property := property✝¹ } { val := val✝, property := property✝ }) =
    toList { val := val✝¹, property := property✝¹ } ++ toList { val := val✝, property := property✝ }

Next tactic:
rfl
/-- `drop` of vectors corresponds under `toList` to `drop` of lists. -/
@[simp]
theorem toList_drop {n m : ℕ} (v : Vector α m) : toList (drop n v) = List.drop n (toList v) := by
  

Proof state:
α : Type u
β : Type v
φ : Type w
n✝ n m : ℕ
v : Vector α m
⊢ toList (drop n v) = List.drop n (toList v)

Next tactic:
cases v
/-- `drop` of vectors corresponds under `toList` to `drop` of lists. -/
@[simp]
theorem toList_drop {n m : ℕ} (v : Vector α m) : toList (drop n v) = List.drop n (toList v) := by
  cases v
  

Proof state:
case mk
α : Type u
β : Type v
φ : Type w
n✝ n m : ℕ
val✝ : List α
property✝ : List.length val✝ = m
⊢ toList (drop n { val := val✝, property := property✝ }) = List.drop n (toList { val := val✝, property := property✝ })

Next tactic:
rfl
/-- `take` of vectors corresponds under `toList` to `take` of lists. -/
@[simp]
theorem toList_take {n m : ℕ} (v : Vector α m) : toList (take n v) = List.take n (toList v) := by
  

Proof state:
α : Type u
β : Type v
φ : Type w
n✝ n m : ℕ
v : Vector α m
⊢ toList (take n v) = List.take n (toList v)

Next tactic:
cases v
/-- `take` of vectors corresponds under `toList` to `take` of lists. -/
@[simp]
theorem toList_take {n m : ℕ} (v : Vector α m) : toList (take n v) = List.take n (toList v) := by
  cases v
  

Proof state:
case mk
α : Type u
β : Type v
φ : Type w
n✝ n m : ℕ
val✝ : List α
property✝ : List.length val✝ = m
⊢ toList (take n { val := val✝, property := property✝ }) = List.take n (toList { val := val✝, property := property✝ })

Next tactic:
rfl
theorem mem_range_iff {m n r : ℤ} : r ∈ range m n ↔ m ≤ r ∧ r < n := by
  

Proof state:
m n r : ℤ
⊢ r ∈ range m n ↔ m ≤ r ∧ r < n

Next tactic:
simp only [range, List.mem_map, List.mem_range, lt_toNat, lt_sub_iff_add_lt, add_comm]
theorem mem_range_iff {m n r : ℤ} : r ∈ range m n ↔ m ≤ r ∧ r < n := by
  simp only [range, List.mem_map, List.mem_range, lt_toNat, lt_sub_iff_add_lt, add_comm]
  

Proof state:
m n r : ℤ
⊢ (∃ a, m + ↑a < n ∧ m + ↑a = r) ↔ m ≤ r ∧ r < n

Next tactic:
exact ⟨fun ⟨a, ha⟩ => ha.2 ▸ ⟨le_add_of_nonneg_right (Int.coe_nat_nonneg _), ha.1⟩,
    fun h => ⟨toNat (r - m), by simp [toNat_of_nonneg (sub_nonneg.2 h.1), h.2] ⟩⟩
theorem mem_range_iff {m n r : ℤ} : r ∈ range m n ↔ m ≤ r ∧ r < n := by
  simp only [range, List.mem_map, List.mem_range, lt_toNat, lt_sub_iff_add_lt, add_comm]
  exact ⟨fun ⟨a, ha⟩ => ha.2 ▸ ⟨le_add_of_nonneg_right (Int.coe_nat_nonneg _), ha.1⟩,
    fun h => ⟨toNat (r - m), by 

Proof state:
m n r : ℤ
h : m ≤ r ∧ r < n
⊢ m + ↑(toNat (r - m)) < n ∧ m + ↑(toNat (r - m)) = r

Next tactic:
simp [toNat_of_nonneg (sub_nonneg.2 h.1), h.2]
instance decidableLELT (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r < n → P r) :=
  decidable_of_iff (∀ r ∈ range m n, P r) <| by 

Proof state:
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
⊢ (∀ r ∈ range m n, P r) ↔ ∀ (r : ℤ), m ≤ r → r < n → P r

Next tactic:
simp only [mem_range_iff, and_imp]
instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) := by
  -- Porting note: The previous code was:
  -- decidable_of_iff (∀ r ∈ range m (n + 1), P r) <| by
  --   simp only [mem_range_iff, and_imp, lt_add_one_iff]
  --
  -- This fails to synthesize an instance
  -- `Decidable (∀ (r : ℤ), r ∈ range m (n + 1) → P r)`
    

Proof state:
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
⊢ Decidable (∀ (r : ℤ), m ≤ r → r ≤ n → P r)

Next tactic:
apply decidable_of_iff (∀ r ∈ range m (n + 1), P r)
instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) := by
  -- Porting note: The previous code was:
  -- decidable_of_iff (∀ r ∈ range m (n + 1), P r) <| by
  --   simp only [mem_range_iff, and_imp, lt_add_one_iff]
  --
  -- This fails to synthesize an instance
  -- `Decidable (∀ (r : ℤ), r ∈ range m (n + 1) → P r)`
    apply decidable_of_iff (∀ r ∈ range m (n + 1), P r)
    

Proof state:
case h
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
⊢ (∀ r ∈ range m (n + 1), P r) ↔ ∀ (r : ℤ), m ≤ r → r ≤ n → P r

Next tactic:
apply Iff.intro
instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) := by
  -- Porting note: The previous code was:
  -- decidable_of_iff (∀ r ∈ range m (n + 1), P r) <| by
  --   simp only [mem_range_iff, and_imp, lt_add_one_iff]
  --
  -- This fails to synthesize an instance
  -- `Decidable (∀ (r : ℤ), r ∈ range m (n + 1) → P r)`
    apply decidable_of_iff (∀ r ∈ range m (n + 1), P r)
    apply Iff.intro <;> 

Proof state:
case h.mp
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
⊢ (∀ r ∈ range m (n + 1), P r) → ∀ (r : ℤ), m ≤ r → r ≤ n → P r

Next tactic:
intros h _ _
instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) := by
  -- Porting note: The previous code was:
  -- decidable_of_iff (∀ r ∈ range m (n + 1), P r) <| by
  --   simp only [mem_range_iff, and_imp, lt_add_one_iff]
  --
  -- This fails to synthesize an instance
  -- `Decidable (∀ (r : ℤ), r ∈ range m (n + 1) → P r)`
    apply decidable_of_iff (∀ r ∈ range m (n + 1), P r)
    apply Iff.intro <;> 

Proof state:
case h.mpr
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
⊢ (∀ (r : ℤ), m ≤ r → r ≤ n → P r) → ∀ r ∈ range m (n + 1), P r

Next tactic:
intros h _ _
instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) := by
  -- Porting note: The previous code was:
  -- decidable_of_iff (∀ r ∈ range m (n + 1), P r) <| by
  --   simp only [mem_range_iff, and_imp, lt_add_one_iff]
  --
  -- This fails to synthesize an instance
  -- `Decidable (∀ (r : ℤ), r ∈ range m (n + 1) → P r)`
    apply decidable_of_iff (∀ r ∈ range m (n + 1), P r)
    apply Iff.intro <;> intros h _ _
    · 

Proof state:
case h.mp
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
h : ∀ r ∈ range m (n + 1), P r
r✝ : ℤ
a✝ : m ≤ r✝
⊢ r✝ ≤ n → P r✝

Next tactic:
intro _
instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) := by
  -- Porting note: The previous code was:
  -- decidable_of_iff (∀ r ∈ range m (n + 1), P r) <| by
  --   simp only [mem_range_iff, and_imp, lt_add_one_iff]
  --
  -- This fails to synthesize an instance
  -- `Decidable (∀ (r : ℤ), r ∈ range m (n + 1) → P r)`
    apply decidable_of_iff (∀ r ∈ range m (n + 1), P r)
    apply Iff.intro <;> intros h _ _
    · intro _; 

Proof state:
case h.mp
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
h : ∀ r ∈ range m (n + 1), P r
r✝ : ℤ
a✝¹ : m ≤ r✝
a✝ : r✝ ≤ n
⊢ P r✝

Next tactic:
apply h
instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) := by
  -- Porting note: The previous code was:
  -- decidable_of_iff (∀ r ∈ range m (n + 1), P r) <| by
  --   simp only [mem_range_iff, and_imp, lt_add_one_iff]
  --
  -- This fails to synthesize an instance
  -- `Decidable (∀ (r : ℤ), r ∈ range m (n + 1) → P r)`
    apply decidable_of_iff (∀ r ∈ range m (n + 1), P r)
    apply Iff.intro <;> intros h _ _
    · intro _; apply h
      

Proof state:
case h.mp.a
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
h : ∀ r ∈ range m (n + 1), P r
r✝ : ℤ
a✝¹ : m ≤ r✝
a✝ : r✝ ≤ n
⊢ r✝ ∈ range m (n + 1)

Next tactic:
simp_all only [mem_range_iff, and_imp, and_self, lt_add_one_iff]
instance decidableLELE (P : Int → Prop) [DecidablePred P] (m n : ℤ) :
    Decidable (∀ r, m ≤ r → r ≤ n → P r) := by
  -- Porting note: The previous code was:
  -- decidable_of_iff (∀ r ∈ range m (n + 1), P r) <| by
  --   simp only [mem_range_iff, and_imp, lt_add_one_iff]
  --
  -- This fails to synthesize an instance
  -- `Decidable (∀ (r : ℤ), r ∈ range m (n + 1) → P r)`
    apply decidable_of_iff (∀ r ∈ range m (n + 1), P r)
    apply Iff.intro <;> intros h _ _
    · intro _; apply h
      simp_all only [mem_range_iff, and_imp, and_self, lt_add_one_iff]
    · 

Proof state:
case h.mpr
P : ℤ → Prop
inst✝ : DecidablePred P
m n : ℤ
h : ∀ (r : ℤ), m ≤ r → r ≤ n → P r
r✝ : ℤ
a✝ : r✝ ∈ range m (n + 1)
⊢ P r✝

Next tactic:
simp_all only [mem_range_iff, and_imp, lt_add_one_iff]
/-- Adjunction between identities. -/
def id (a : B) : 𝟙 a ⊣ 𝟙 a where
  unit := (ρ_ _).inv
  counit := (ρ_ _).hom
  left_triangle := by 

Proof state:
B : Type u
inst✝ : Bicategory B
a✝ b c : B
f : a✝ ⟶ b
g : b ⟶ a✝
a : B
⊢ leftZigzag (ρ_ (𝟙 a)).inv (ρ_ (𝟙 a)).hom = (λ_ (𝟙 a)).hom ≫ (ρ_ (𝟙 a)).inv

Next tactic:
dsimp
/-- Adjunction between identities. -/
def id (a : B) : 𝟙 a ⊣ 𝟙 a where
  unit := (ρ_ _).inv
  counit := (ρ_ _).hom
  left_triangle := by dsimp; 

Proof state:
B : Type u
inst✝ : Bicategory B
a✝ b c : B
f : a✝ ⟶ b
g : b ⟶ a✝
a : B
⊢ (ρ_ (𝟙 a)).inv ▷ 𝟙 a ⊗≫ 𝟙 a ◁ (ρ_ (𝟙 a)).hom = (λ_ (𝟙 a)).hom ≫ (ρ_ (𝟙 a)).inv

Next tactic:
coherence
/-- Adjunction between identities. -/
def id (a : B) : 𝟙 a ⊣ 𝟙 a where
  unit := (ρ_ _).inv
  counit := (ρ_ _).hom
  left_triangle := by dsimp; coherence
  right_triangle := by 

Proof state:
B : Type u
inst✝ : Bicategory B
a✝ b c : B
f : a✝ ⟶ b
g : b ⟶ a✝
a : B
⊢ rightZigzag (ρ_ (𝟙 a)).inv (ρ_ (𝟙 a)).hom = (ρ_ (𝟙 a)).hom ≫ (λ_ (𝟙 a)).inv

Next tactic:
dsimp
/-- Adjunction between identities. -/
def id (a : B) : 𝟙 a ⊣ 𝟙 a where
  unit := (ρ_ _).inv
  counit := (ρ_ _).hom
  left_triangle := by dsimp; coherence
  right_triangle := by dsimp; 

Proof state:
B : Type u
inst✝ : Bicategory B
a✝ b c : B
f : a✝ ⟶ b
g : b ⟶ a✝
a : B
⊢ 𝟙 a ◁ (ρ_ (𝟙 a)).inv ⊗≫ (ρ_ (𝟙 a)).hom ▷ 𝟙 a = (ρ_ (𝟙 a)).hom ≫ (λ_ (𝟙 a)).inv

Next tactic:
coherence
theorem comp_left_triangle_aux (adj₁ : f₁ ⊣ g₁) (adj₂ : f₂ ⊣ g₂) :
    leftZigzag (compUnit adj₁ adj₂) (compCounit adj₁ adj₂) = (λ_ _).hom ≫ (ρ_ _).inv := by
  

Proof state:
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ a
f₁ : a ⟶ b
g₁ : b ⟶ a
f₂ : b ⟶ c
g₂ : c ⟶ b
adj₁ : f₁ ⊣ g₁
adj₂ : f₂ ⊣ g₂
⊢ leftZigzag (compUnit adj₁ adj₂) (compCounit adj₁ adj₂) = (λ_ (f₁ ≫ f₂)).hom ≫ (ρ_ (f₁ ≫ f₂)).inv

Next tactic:
calc
    _ = 𝟙 _ ⊗≫
          adj₁.unit ▷ (f₁ ≫ f₂) ⊗≫
            f₁ ◁ (adj₂.unit ▷ (g₁ ≫ f₁) ≫ (f₂ ≫ g₂) ◁ adj₁.counit) ▷ f₂ ⊗≫
              (f₁ ≫ f₂) ◁ adj₂.counit ⊗≫ 𝟙 _ := by
      simp [bicategoricalComp]; coherence
    _ = 𝟙 _ ⊗≫
          (leftZigzag adj₁.unit adj₁.counit) ▷ f₂ ⊗≫
            f₁ ◁ (leftZigzag adj₂.unit adj₂.counit) ⊗≫ 𝟙 _ := by
      rw [← whisker_exchange]; simp [bicategoricalComp]; coherence
    _ = _ := by
      simp_rw [left_triangle]; simp [bicategoricalComp]
theorem comp_left_triangle_aux (adj₁ : f₁ ⊣ g₁) (adj₂ : f₂ ⊣ g₂) :
    leftZigzag (compUnit adj₁ adj₂) (compCounit adj₁ adj₂) = (λ_ _).hom ≫ (ρ_ _).inv := by
  calc
    _ = 𝟙 _ ⊗≫
          adj₁.unit ▷ (f₁ ≫ f₂) ⊗≫
            f₁ ◁ (adj₂.unit ▷ (g₁ ≫ f₁) ≫ (f₂ ≫ g₂) ◁ adj₁.counit) ▷ f₂ ⊗≫
              (f₁ ≫ f₂) ◁ adj₂.counit ⊗≫ 𝟙 _ := by
      

Proof state:
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ a
f₁ : a ⟶ b
g₁ : b ⟶ a
f₂ : b ⟶ c
g₂ : c ⟶ b
adj₁ : f₁ ⊣ g₁
adj₂ : f₂ ⊣ g₂
⊢ leftZigzag (compUnit adj₁ adj₂) (compCounit adj₁ adj₂) =
    𝟙 (𝟙 a ≫ f₁ ≫ f₂) ⊗≫
      adj₁.unit ▷ (f₁ ≫ f₂) ⊗≫
        f₁ ◁ (adj₂.unit ▷ (g₁ ≫ f₁) ≫ (f₂ ≫ g₂) ◁ adj₁.counit) ▷ f₂ ⊗≫ (f₁ ≫ f₂) ◁ adj₂.counit ⊗≫ 𝟙 ((f₁ ≫ f₂) ≫ 𝟙 c)

Next tactic:
simp [bicategoricalComp]
theorem comp_left_triangle_aux (adj₁ : f₁ ⊣ g₁) (adj₂ : f₂ ⊣ g₂) :
    leftZigzag (compUnit adj₁ adj₂) (compCounit adj₁ adj₂) = (λ_ _).hom ≫ (ρ_ _).inv := by
  calc
    _ = 𝟙 _ ⊗≫
          adj₁.unit ▷ (f₁ ≫ f₂) ⊗≫
            f₁ ◁ (adj₂.unit ▷ (g₁ ≫ f₁) ≫ (f₂ ≫ g₂) ◁ adj₁.counit) ▷ f₂ ⊗≫
              (f₁ ≫ f₂) ◁ adj₂.counit ⊗≫ 𝟙 _ := by
      simp [bicategoricalComp]; 

Proof state:
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ a
f₁ : a ⟶ b
g₁ : b ⟶ a
f₂ : b ⟶ c
g₂ : c ⟶ b
adj₁ : f₁ ⊣ g₁
adj₂ : f₂ ⊣ g₂
⊢ adj₁.unit ▷ f₁ ▷ f₂ ≫
      (α_ f₁ g₁ f₁).hom ▷ f₂ ≫
        (α_ f₁ (g₁ ≫ f₁) f₂).hom ≫
          f₁ ◁ (λ_ ((g₁ ≫ f₁) ≫ f₂)).inv ≫
            f₁ ◁ (α_ (𝟙 b) (g₁ ≫ f₁) f₂).inv ≫
              f₁ ◁ (α_ (𝟙 b) g₁ f₁).inv ▷ f₂ ≫
                f₁ ◁ adj₂.unit ▷ g₁ ▷ f₁ ▷ f₂ ≫
                  f₁ ◁ (α_ f₂ g₂ g₁).hom ▷ f₁ ▷ f₂ ≫
                    (α_ f₁ ((f₂ ≫ g₂ ≫ g₁) ≫ f₁) f₂).inv ≫
                      (α_ f₁ (f₂ ≫ g₂ ≫ g₁) f₁).inv ▷ f₂ ≫
                        (α_ f₁ f₂ (g₂ ≫ g₁)).inv ▷ f₁ ▷ f₂ ≫
                          (α_ ((f₁ ≫ f₂) ≫ g₂ ≫ g₁) f₁ f₂).hom ≫
                            (α_ (f₁ ≫ f₂) (g₂ ≫ g₁) (f₁ ≫ f₂)).hom ≫
                              (α_ f₁ f₂ ((g₂ ≫ g₁) ≫ f₁ ≫ f₂)).hom ≫
                                f₁ ◁ f₂ ◁ (α_ g₂ g₁ (f₁ ≫ f₂)).hom ≫
                                  f₁ ◁ f₂ ◁ g₂ ◁ (α_ g₁ f₁ f₂).inv ≫
                                    f₁ ◁ f₂ ◁ g₂ ◁ adj₁.counit ▷ f₂ ≫
                                      f₁ ◁ f₂ ◁ g₂ ◁ (λ_ f₂).hom ≫ f₁ ◁ f₂ ◁ adj₂.counit ≫ (α_ f₁ f₂ (𝟙 c)).inv =
    adj₁.unit ▷ f₁ ▷ f₂ ≫
      (α_ f₁ g₁ f₁).hom ▷ f₂ ≫
        (α_ f₁ (g₁ ≫ f₁) f₂).hom ≫
          f₁ ◁ (λ_ ((g₁ ≫ f₁) ≫ f₂)).inv ≫
            f₁ ◁ (α_ (𝟙 b) (g₁ ≫ f₁) f₂).inv ≫
              f₁ ◁ (α_ (𝟙 b) g₁ f₁).inv ▷ f₂ ≫
                f₁ ◁ adj₂.unit ▷ g₁ ▷ f₁ ▷ f₂ ≫
                  f₁ ◁ (α_ (f₂ ≫ g₂) g₁ f₁).hom ▷ f₂ ≫
                    f₁ ◁ (α_ (f₂ ≫ g₂) (g₁ ≫ f₁) f₂).hom ≫
                      f₁ ◁ (α_ f₂ g₂ ((g₁ ≫ f₁) ≫ f₂)).hom ≫
                        f₁ ◁ f₂ ◁ g₂ ◁ adj₁.counit ▷ f₂ ≫
                          f₁ ◁ f₂ ◁ g₂ ◁ (λ_ f₂).hom ≫ f₁ ◁ f₂ ◁ adj₂.counit ≫ (α_ f₁ f₂ (𝟙 c)).inv

Next tactic:
coherence
theorem comp_left_triangle_aux (adj₁ : f₁ ⊣ g₁) (adj₂ : f₂ ⊣ g₂) :
    leftZigzag (compUnit adj₁ adj₂) (compCounit adj₁ adj₂) = (λ_ _).hom ≫ (ρ_ _).inv := by
  calc
    _ = 𝟙 _ ⊗≫
          adj₁.unit ▷ (f₁ ≫ f₂) ⊗≫
            f₁ ◁ (adj₂.unit ▷ (g₁ ≫ f₁) ≫ (f₂ ≫ g₂) ◁ adj₁.counit) ▷ f₂ ⊗≫
              (f₁ ≫ f₂) ◁ adj₂.counit ⊗≫ 𝟙 _ := by
      simp [bicategoricalComp]; coherence
    _ = 𝟙 _ ⊗≫
          (leftZigzag adj₁.unit adj₁.counit) ▷ f₂ ⊗≫
            f₁ ◁ (leftZigzag adj₂.unit adj₂.counit) ⊗≫ 𝟙 _ := by
      

Proof state:
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ a
f₁ : a ⟶ b
g₁ : b ⟶ a
f₂ : b ⟶ c
g₂ : c ⟶ b
adj₁ : f₁ ⊣ g₁
adj₂ : f₂ ⊣ g₂
⊢ 𝟙 (𝟙 a ≫ f₁ ≫ f₂) ⊗≫
      adj₁.unit ▷ (f₁ ≫ f₂) ⊗≫
        f₁ ◁ (adj₂.unit ▷ (g₁ ≫ f₁) ≫ (f₂ ≫ g₂) ◁ adj₁.counit) ▷ f₂ ⊗≫ (f₁ ≫ f₂) ◁ adj₂.counit ⊗≫ 𝟙 ((f₁ ≫ f₂) ≫ 𝟙 c) =
    𝟙 (𝟙 a ≫ f₁ ≫ f₂) ⊗≫
      leftZigzag adj₁.unit adj₁.counit ▷ f₂ ⊗≫ f₁ ◁ leftZigzag adj₂.unit adj₂.counit ⊗≫ 𝟙 ((f₁ ≫ f₂) ≫ 𝟙 c)

Next tactic:
rw [← whisker_exchange]
theorem comp_left_triangle_aux (adj₁ : f₁ ⊣ g₁) (adj₂ : f₂ ⊣ g₂) :
    leftZigzag (compUnit adj₁ adj₂) (compCounit adj₁ adj₂) = (λ_ _).hom ≫ (ρ_ _).inv := by
  calc
    _ = 𝟙 _ ⊗≫
          adj₁.unit ▷ (f₁ ≫ f₂) ⊗≫
            f₁ ◁ (adj₂.unit ▷ (g₁ ≫ f₁) ≫ (f₂ ≫ g₂) ◁ adj₁.counit) ▷ f₂ ⊗≫
              (f₁ ≫ f₂) ◁ adj₂.counit ⊗≫ 𝟙 _ := by
      simp [bicategoricalComp]; coherence
    _ = 𝟙 _ ⊗≫
          (leftZigzag adj₁.unit adj₁.counit) ▷ f₂ ⊗≫
            f₁ ◁ (leftZigzag adj₂.unit adj₂.counit) ⊗≫ 𝟙 _ := by
      rw [← whisker_exchange]; 

Proof state:
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ a
f₁ : a ⟶ b
g₁ : b ⟶ a
f₂ : b ⟶ c
g₂ : c ⟶ b
adj₁ : f₁ ⊣ g₁
adj₂ : f₂ ⊣ g₂
⊢ 𝟙 (𝟙 a ≫ f₁ ≫ f₂) ⊗≫
      adj₁.unit ▷ (f₁ ≫ f₂) ⊗≫
        f₁ ◁ (𝟙 b ◁ adj₁.counit ≫ adj₂.unit ▷ 𝟙 b) ▷ f₂ ⊗≫ (f₁ ≫ f₂) ◁ adj₂.counit ⊗≫ 𝟙 ((f₁ ≫ f₂) ≫ 𝟙 c) =
    𝟙 (𝟙 a ≫ f₁ ≫ f₂) ⊗≫
      leftZigzag adj₁.unit adj₁.counit ▷ f₂ ⊗≫ f₁ ◁ leftZigzag adj₂.unit adj₂.counit ⊗≫ 𝟙 ((f₁ ≫ f₂) ≫ 𝟙 c)

Next tactic:
simp [bicategoricalComp]