l3lab/ntp-mathlib huggingface dataset:
@[nolint defLemma]
scoped instance (priority := 100) : HasContinuousInv₀ Γ₀ :=
  ⟨fun γ h => by
    rw [ContinuousAt, nhds_of_ne_zero h]
    

Proof state:
α : Type u_1
Γ₀ : Type u_2
inst✝ : LinearOrderedCommGroupWithZero Γ₀
γ✝ γ₁ γ₂ : Γ₀
l : Filter α
f : α → Γ₀
γ : Γ₀
h : γ ≠ 0
⊢ Tendsto Inv.inv (pure γ) (𝓝 γ⁻¹)

Next tactic:
exact pure_le_nhds γ⁻¹
instance decValidFinite (e m) : Decidable (ValidFinite e m) := by
  (

Proof state:
C : FloatCfg
e : ℤ
m : ℕ
⊢ Decidable (ValidFinite e m)

Next tactic:
unfold ValidFinite
instance decValidFinite (e m) : Decidable (ValidFinite e m) := by
  (unfold ValidFinite; 

Proof state:
C : FloatCfg
e : ℤ
m : ℕ
⊢ Decidable (emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m) - ↑prec) emin)

Next tactic:
infer_instance
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    

Proof state:
C : FloatCfg
⊢ emin ≤ emin + ↑prec - 1

Next tactic:
rw [add_sub_assoc]
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    

Proof state:
C : FloatCfg
⊢ emin ≤ emin + (↑prec - 1)

Next tactic:
apply le_add_of_nonneg_right
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    

Proof state:
case h
C : FloatCfg
⊢ 0 ≤ ↑prec - 1

Next tactic:
apply sub_nonneg_of_le
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    

Proof state:
case h.a
C : FloatCfg
⊢ 1 ≤ ↑prec

Next tactic:
apply Int.ofNat_le_ofNat_of_le
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    

Proof state:
case h.a.a
C : FloatCfg
⊢ 1 ≤ prec

Next tactic:
exact C.precPos
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      rw [← Int.ofNat_le] at this
      rw [← sub_nonneg] at *
      simp only [emin, emax] at *
      ring_nf
      rw [mul_comm]
      assumption
    le_trans C.precMax (Nat.le_mul_of_pos_left (by 

Proof state:
C : FloatCfg
⊢ 0 < 2

Next tactic:
decide
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      

Proof state:
C : FloatCfg
this : prec ≤ 2 * emax
⊢ emin + ↑prec - 1 ≤ ↑emax

Next tactic:
rw [← Int.ofNat_le] at this
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      rw [← Int.ofNat_le] at this
      

Proof state:
C : FloatCfg
this : ↑prec ≤ ↑(2 * emax)
⊢ emin + ↑prec - 1 ≤ ↑emax

Next tactic:
rw [← sub_nonneg] at *
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      rw [← Int.ofNat_le] at this
      rw [← sub_nonneg] at *
      

Proof state:
C : FloatCfg
this : 0 ≤ ↑(2 * emax) - ↑prec
⊢ 0 ≤ ↑emax - (emin + ↑prec - 1)

Next tactic:
simp only [emin, emax] at *
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      rw [← Int.ofNat_le] at this
      rw [← sub_nonneg] at *
      simp only [emin, emax] at *
      

Proof state:
C : FloatCfg
this : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec
⊢ 0 ≤ ↑FloatCfg.emax - (1 - ↑FloatCfg.emax + ↑prec - 1)

Next tactic:
ring_nf
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      rw [← Int.ofNat_le] at this
      rw [← sub_nonneg] at *
      simp only [emin, emax] at *
      ring_nf
      

Proof state:
C : FloatCfg
this : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec
⊢ 0 ≤ ↑FloatCfg.emax * 2 - ↑prec

Next tactic:
rw [mul_comm]
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      rw [← Int.ofNat_le] at this
      rw [← sub_nonneg] at *
      simp only [emin, emax] at *
      ring_nf
      rw [mul_comm]
      

Proof state:
C : FloatCfg
this : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec
⊢ 0 ≤ 2 * ↑FloatCfg.emax - ↑prec

Next tactic:
assumption
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      rw [← Int.ofNat_le] at this
      rw [← sub_nonneg] at *
      simp only [emin, emax] at *
      ring_nf
      rw [mul_comm]
      assumption
    le_trans C.precMax (Nat.le_mul_of_pos_left (by decide)),
    by (

Proof state:
C : FloatCfg
⊢ emin = max (emin + ↑(Nat.size 0) - ↑prec) emin

Next tactic:
rw [max_eq_right]
theorem Float.Zero.valid : ValidFinite emin 0 :=
  ⟨by
    rw [add_sub_assoc]
    apply le_add_of_nonneg_right
    apply sub_nonneg_of_le
    apply Int.ofNat_le_ofNat_of_le
    exact C.precPos,
    suffices prec ≤ 2 * emax by
      rw [← Int.ofNat_le] at this
      rw [← sub_nonneg] at *
      simp only [emin, emax] at *
      ring_nf
      rw [mul_comm]
      assumption
    le_trans C.precMax (Nat.le_mul_of_pos_left (by decide)),
    by (rw [max_eq_right]; 

Proof state:
C : FloatCfg
⊢ emin + ↑(Nat.size 0) - ↑prec ≤ emin

Next tactic:
simp [sub_eq_add_neg]
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  

Proof state:
C : FloatCfg
n d : ℕ+
⊢ Float × Bool

Next tactic:
let e₁ : ℤ := n.1.size - d.1.size - prec
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  let e₁ : ℤ := n.1.size - d.1.size - prec
  

Proof state:
C : FloatCfg
n d : ℕ+
e₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec
⊢ Float × Bool

Next tactic:
cases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  let e₁ : ℤ := n.1.size - d.1.size - prec
  cases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁
  

Proof state:
case mk
C : FloatCfg
n d : ℕ+
e₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec
d₁ n₁ : ℕ
h₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)
⊢ Float × Bool

Next tactic:
let e₂ := if n₁ < d₁ then e₁ - 1 else e₁
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  let e₁ : ℤ := n.1.size - d.1.size - prec
  cases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁
  let e₂ := if n₁ < d₁ then e₁ - 1 else e₁
  

Proof state:
case mk
C : FloatCfg
n d : ℕ+
e₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec
d₁ n₁ : ℕ
h₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)
e₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁
⊢ Float × Bool

Next tactic:
let e₃ := max e₂ emin
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  let e₁ : ℤ := n.1.size - d.1.size - prec
  cases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁
  let e₂ := if n₁ < d₁ then e₁ - 1 else e₁
  let e₃ := max e₂ emin
  

Proof state:
case mk
C : FloatCfg
n d : ℕ+
e₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec
d₁ n₁ : ℕ
h₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)
e₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁
e₃ : ℤ := max e₂ emin
⊢ Float × Bool

Next tactic:
cases' h₂ : Int.shift2 d.1 n.1 (e₃ + prec) with d₂ n₂
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  let e₁ : ℤ := n.1.size - d.1.size - prec
  cases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁
  let e₂ := if n₁ < d₁ then e₁ - 1 else e₁
  let e₃ := max e₂ emin
  cases' h₂ : Int.shift2 d.1 n.1 (e₃ + prec) with d₂ n₂
  

Proof state:
case mk.mk
C : FloatCfg
n d : ℕ+
e₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec
d₁ n₁ : ℕ
h₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)
e₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁
e₃ : ℤ := max e₂ emin
d₂ n₂ : ℕ
h₂ : Int.shift2 (↑d) (↑n) (e₃ + ↑prec) = (d₂, n₂)
⊢ Float × Bool

Next tactic:
let r := mkRat n₂ d₂
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  let e₁ : ℤ := n.1.size - d.1.size - prec
  cases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁
  let e₂ := if n₁ < d₁ then e₁ - 1 else e₁
  let e₃ := max e₂ emin
  cases' h₂ : Int.shift2 d.1 n.1 (e₃ + prec) with d₂ n₂
  let r := mkRat n₂ d₂
  

Proof state:
case mk.mk
C : FloatCfg
n d : ℕ+
e₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec
d₁ n₁ : ℕ
h₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)
e₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁
e₃ : ℤ := max e₂ emin
d₂ n₂ : ℕ
h₂ : Int.shift2 (↑d) (↑n) (e₃ + ↑prec) = (d₂, n₂)
r : ℚ := mkRat (↑n₂) d₂
⊢ Float × Bool

Next tactic:
let m := r.floor
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  let e₁ : ℤ := n.1.size - d.1.size - prec
  cases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁
  let e₂ := if n₁ < d₁ then e₁ - 1 else e₁
  let e₃ := max e₂ emin
  cases' h₂ : Int.shift2 d.1 n.1 (e₃ + prec) with d₂ n₂
  let r := mkRat n₂ d₂
  let m := r.floor
  

Proof state:
case mk.mk
C : FloatCfg
n d : ℕ+
e₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec
d₁ n₁ : ℕ
h₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)
e₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁
e₃ : ℤ := max e₂ emin
d₂ n₂ : ℕ
h₂ : Int.shift2 (↑d) (↑n) (e₃ + ↑prec) = (d₂, n₂)
r : ℚ := mkRat (↑n₂) d₂
m : ℤ := Rat.floor r
⊢ Float × Bool

Next tactic:
refine' (Float.finite Bool.false e₃ (Int.toNat m) _, r.den = 1)
@[nolint docBlame]
unsafe def ofPosRatDn (n : ℕ+) (d : ℕ+) : Float × Bool := by
  let e₁ : ℤ := n.1.size - d.1.size - prec
  cases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁
  let e₂ := if n₁ < d₁ then e₁ - 1 else e₁
  let e₃ := max e₂ emin
  cases' h₂ : Int.shift2 d.1 n.1 (e₃ + prec) with d₂ n₂
  let r := mkRat n₂ d₂
  let m := r.floor
  refine' (Float.finite Bool.false e₃ (Int.toNat m) _, r.den = 1)
  · 

Proof state:
case mk.mk
C : FloatCfg
n d : ℕ+
e₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec
d₁ n₁ : ℕ
h₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)
e₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁
e₃ : ℤ := max e₂ emin
d₂ n₂ : ℕ
h₂ : Int.shift2 (↑d) (↑n) (e₃ + ↑prec) = (d₂, n₂)
r : ℚ := mkRat (↑n₂) d₂
m : ℤ := Rat.floor r
⊢ ValidFinite e₃ (Int.toNat m)

Next tactic:
exact lcProof
set_option linter.unusedVariables false in
@[nolint docBlame]
unsafe def nextUpPos (e m) (v : ValidFinite e m) : Float :=
  let m' := m.succ
  if ss : m'.size = m.size then
    Float.finite false e m' (by 

Proof state:
C : FloatCfg
e : ℤ
m : ℕ
v : ValidFinite e m
m' : ℕ := Nat.succ m
ss : Nat.size m' = Nat.size m
⊢ ValidFinite e m'

Next tactic:
unfold ValidFinite at *
set_option linter.unusedVariables false in
@[nolint docBlame]
unsafe def nextUpPos (e m) (v : ValidFinite e m) : Float :=
  let m' := m.succ
  if ss : m'.size = m.size then
    Float.finite false e m' (by unfold ValidFinite at *; 

Proof state:
C : FloatCfg
e : ℤ
m : ℕ
v : emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m) - ↑prec) emin
m' : ℕ := Nat.succ m
ss : Nat.size m' = Nat.size m
⊢ emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m') - ↑prec) emin

Next tactic:
rw [ss]
set_option linter.unusedVariables false in
@[nolint docBlame]
unsafe def nextUpPos (e m) (v : ValidFinite e m) : Float :=
  let m' := m.succ
  if ss : m'.size = m.size then
    Float.finite false e m' (by unfold ValidFinite at *; rw [ss]; 

Proof state:
C : FloatCfg
e : ℤ
m : ℕ
v : emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m) - ↑prec) emin
m' : ℕ := Nat.succ m
ss : Nat.size m' = Nat.size m
⊢ emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m) - ↑prec) emin

Next tactic:
exact v
set_option linter.deprecated false in
-- Porting note: remove this line when you dropped 'lcProof'
set_option linter.unusedVariables false in
@[nolint docBlame]
unsafe def nextDnPos (e m) (v : ValidFinite e m) : Float :=
  match m with
  | 0 => nextUpPos _ _ Float.Zero.valid
  | Nat.succ m' =>
    -- Porting note: was `m'.size = m.size`
    if ss : m'.size = m'.succ.size then
      Float.finite false e m' (by 

Proof state:
C : FloatCfg
e : ℤ
m m' : ℕ
v : ValidFinite e (Nat.succ m')
ss : Nat.size m' = Nat.size (Nat.succ m')
⊢ ValidFinite e m'

Next tactic:
unfold ValidFinite at *
set_option linter.deprecated false in
-- Porting note: remove this line when you dropped 'lcProof'
set_option linter.unusedVariables false in
@[nolint docBlame]
unsafe def nextDnPos (e m) (v : ValidFinite e m) : Float :=
  match m with
  | 0 => nextUpPos _ _ Float.Zero.valid
  | Nat.succ m' =>
    -- Porting note: was `m'.size = m.size`
    if ss : m'.size = m'.succ.size then
      Float.finite false e m' (by unfold ValidFinite at *; 

Proof state:
C : FloatCfg
e : ℤ
m m' : ℕ
v : emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size (Nat.succ m')) - ↑prec) emin
ss : Nat.size m' = Nat.size (Nat.succ m')
⊢ emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m') - ↑prec) emin

Next tactic:
rw [ss]
set_option linter.deprecated false in
-- Porting note: remove this line when you dropped 'lcProof'
set_option linter.unusedVariables false in
@[nolint docBlame]
unsafe def nextDnPos (e m) (v : ValidFinite e m) : Float :=
  match m with
  | 0 => nextUpPos _ _ Float.Zero.valid
  | Nat.succ m' =>
    -- Porting note: was `m'.size = m.size`
    if ss : m'.size = m'.succ.size then
      Float.finite false e m' (by unfold ValidFinite at *; rw [ss]; 

Proof state:
C : FloatCfg
e : ℤ
m m' : ℕ
v : emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size (Nat.succ m')) - ↑prec) emin
ss : Nat.size m' = Nat.size (Nat.succ m')
⊢ emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size (Nat.succ m')) - ↑prec) emin

Next tactic:
exact v
theorem braiding_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') :
    tensorHom ℬ f g ≫ (Limits.BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =
      (Limits.BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X X' Y Y' : C
f : X ⟶ Y
g : X' ⟶ Y'
⊢ tensorHom ℬ f g ≫ (BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =
    (BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f

Next tactic:
dsimp [tensorHom, Limits.BinaryFan.braiding]
theorem braiding_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') :
    tensorHom ℬ f g ≫ (Limits.BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =
      (Limits.BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f := by
  dsimp [tensorHom, Limits.BinaryFan.braiding]
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X X' Y Y' : C
f : X ⟶ Y
g : X' ⟶ Y'
⊢ IsLimit.lift (ℬ Y Y').isLimit (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫
      (IsLimit.conePointUniqueUpToIso (ℬ Y Y').isLimit (IsLimit.swapBinaryFan (ℬ Y' Y).isLimit)).hom =
    (IsLimit.conePointUniqueUpToIso (ℬ X X').isLimit (IsLimit.swapBinaryFan (ℬ X' X).isLimit)).hom ≫
      IsLimit.lift (ℬ Y' Y).isLimit (BinaryFan.mk (BinaryFan.fst (ℬ X' X).cone ≫ g) (BinaryFan.snd (ℬ X' X).cone ≫ f))

Next tactic:
apply (ℬ _ _).isLimit.hom_ext
theorem braiding_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') :
    tensorHom ℬ f g ≫ (Limits.BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =
      (Limits.BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f := by
  dsimp [tensorHom, Limits.BinaryFan.braiding]
  apply (ℬ _ _).isLimit.hom_ext
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X X' Y Y' : C
f : X ⟶ Y
g : X' ⟶ Y'
⊢ ∀ (j : Discrete WalkingPair),
    (IsLimit.lift (ℬ Y Y').isLimit (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫
          (IsLimit.conePointUniqueUpToIso (ℬ Y Y').isLimit (IsLimit.swapBinaryFan (ℬ Y' Y).isLimit)).hom) ≫
        (ℬ Y' Y).cone.π.app j =
      ((IsLimit.conePointUniqueUpToIso (ℬ X X').isLimit (IsLimit.swapBinaryFan (ℬ X' X).isLimit)).hom ≫
          IsLimit.lift (ℬ Y' Y).isLimit
            (BinaryFan.mk (BinaryFan.fst (ℬ X' X).cone ≫ g) (BinaryFan.snd (ℬ X' X).cone ≫ f))) ≫
        (ℬ Y' Y).cone.π.app j

Next tactic:
rintro ⟨⟨⟩⟩
theorem braiding_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') :
    tensorHom ℬ f g ≫ (Limits.BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =
      (Limits.BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f := by
  dsimp [tensorHom, Limits.BinaryFan.braiding]
  apply (ℬ _ _).isLimit.hom_ext
  rintro ⟨⟨⟩⟩ <;> · 

Proof state:
case mk.left
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X X' Y Y' : C
f : X ⟶ Y
g : X' ⟶ Y'
⊢ (IsLimit.lift (ℬ Y Y').isLimit (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫
        (IsLimit.conePointUniqueUpToIso (ℬ Y Y').isLimit (IsLimit.swapBinaryFan (ℬ Y' Y).isLimit)).hom) ≫
      (ℬ Y' Y).cone.π.app { as := WalkingPair.left } =
    ((IsLimit.conePointUniqueUpToIso (ℬ X X').isLimit (IsLimit.swapBinaryFan (ℬ X' X).isLimit)).hom ≫
        IsLimit.lift (ℬ Y' Y).isLimit
          (BinaryFan.mk (BinaryFan.fst (ℬ X' X).cone ≫ g) (BinaryFan.snd (ℬ X' X).cone ≫ f))) ≫
      (ℬ Y' Y).cone.π.app { as := WalkingPair.left }

Next tactic:
dsimp [Limits.IsLimit.conePointUniqueUpToIso]
theorem braiding_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') :
    tensorHom ℬ f g ≫ (Limits.BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =
      (Limits.BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f := by
  dsimp [tensorHom, Limits.BinaryFan.braiding]
  apply (ℬ _ _).isLimit.hom_ext
  rintro ⟨⟨⟩⟩ <;> · dsimp [Limits.IsLimit.conePointUniqueUpToIso]; 

Proof state:
case mk.left
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X X' Y Y' : C
f : X ⟶ Y
g : X' ⟶ Y'
⊢ (IsLimit.lift (ℬ Y Y').isLimit (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫
        IsLimit.lift (ℬ Y' Y).isLimit (BinaryFan.swap (ℬ Y Y').cone)) ≫
      BinaryFan.fst (ℬ Y' Y).cone =
    (IsLimit.lift (ℬ X' X).isLimit (BinaryFan.swap (ℬ X X').cone) ≫
        IsLimit.lift (ℬ Y' Y).isLimit
          (BinaryFan.mk (BinaryFan.fst (ℬ X' X).cone ≫ g) (BinaryFan.snd (ℬ X' X).cone ≫ f))) ≫
      BinaryFan.fst (ℬ Y' Y).cone

Next tactic:
simp
theorem braiding_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') :
    tensorHom ℬ f g ≫ (Limits.BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =
      (Limits.BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f := by
  dsimp [tensorHom, Limits.BinaryFan.braiding]
  apply (ℬ _ _).isLimit.hom_ext
  rintro ⟨⟨⟩⟩ <;> · 

Proof state:
case mk.right
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X X' Y Y' : C
f : X ⟶ Y
g : X' ⟶ Y'
⊢ (IsLimit.lift (ℬ Y Y').isLimit (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫
        (IsLimit.conePointUniqueUpToIso (ℬ Y Y').isLimit (IsLimit.swapBinaryFan (ℬ Y' Y).isLimit)).hom) ≫
      (ℬ Y' Y).cone.π.app { as := WalkingPair.right } =
    ((IsLimit.conePointUniqueUpToIso (ℬ X X').isLimit (IsLimit.swapBinaryFan (ℬ X' X).isLimit)).hom ≫
        IsLimit.lift (ℬ Y' Y).isLimit
          (BinaryFan.mk (BinaryFan.fst (ℬ X' X).cone ≫ g) (BinaryFan.snd (ℬ X' X).cone ≫ f))) ≫
      (ℬ Y' Y).cone.π.app { as := WalkingPair.right }

Next tactic:
dsimp [Limits.IsLimit.conePointUniqueUpToIso]
theorem braiding_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') :
    tensorHom ℬ f g ≫ (Limits.BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =
      (Limits.BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f := by
  dsimp [tensorHom, Limits.BinaryFan.braiding]
  apply (ℬ _ _).isLimit.hom_ext
  rintro ⟨⟨⟩⟩ <;> · dsimp [Limits.IsLimit.conePointUniqueUpToIso]; 

Proof state:
case mk.right
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X X' Y Y' : C
f : X ⟶ Y
g : X' ⟶ Y'
⊢ (IsLimit.lift (ℬ Y Y').isLimit (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫
        IsLimit.lift (ℬ Y' Y).isLimit (BinaryFan.swap (ℬ Y Y').cone)) ≫
      BinaryFan.snd (ℬ Y' Y).cone =
    (IsLimit.lift (ℬ X' X).isLimit (BinaryFan.swap (ℬ X X').cone) ≫
        IsLimit.lift (ℬ Y' Y).isLimit
          (BinaryFan.mk (BinaryFan.fst (ℬ X' X).cone ≫ g) (BinaryFan.snd (ℬ X' X).cone ≫ f))) ≫
      BinaryFan.snd (ℬ Y' Y).cone

Next tactic:
simp
theorem hexagon_forward (X Y Z : C) :
    (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom ≫
        (Limits.BinaryFan.braiding (ℬ X (tensorObj ℬ Y Z)).isLimit
              (ℬ (tensorObj ℬ Y Z) X).isLimit).hom ≫
          (BinaryFan.associatorOfLimitCone ℬ Y Z X).hom =
      tensorHom ℬ (Limits.BinaryFan.braiding (ℬ X Y).isLimit (ℬ Y X).isLimit).hom (𝟙 Z) ≫
        (BinaryFan.associatorOfLimitCone ℬ Y X Z).hom ≫
          tensorHom ℬ (𝟙 Y) (Limits.BinaryFan.braiding (ℬ X Z).isLimit (ℬ Z X).isLimit).hom := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X Y Z : C
⊢ (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom ≫
      (BinaryFan.braiding (ℬ X (tensorObj ℬ Y Z)).isLimit (ℬ (tensorObj ℬ Y Z) X).isLimit).hom ≫
        (BinaryFan.associatorOfLimitCone ℬ Y Z X).hom =
    tensorHom ℬ (BinaryFan.braiding (ℬ X Y).isLimit (ℬ Y X).isLimit).hom (𝟙 Z) ≫
      (BinaryFan.associatorOfLimitCone ℬ Y X Z).hom ≫
        tensorHom ℬ (𝟙 Y) (BinaryFan.braiding (ℬ X Z).isLimit (ℬ Z X).isLimit).hom

Next tactic:
dsimp [tensorHom, Limits.BinaryFan.braiding]
theorem hexagon_forward (X Y Z : C) :
    (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom ≫
        (Limits.BinaryFan.braiding (ℬ X (tensorObj ℬ Y Z)).isLimit
              (ℬ (tensorObj ℬ Y Z) X).isLimit).hom ≫
          (BinaryFan.associatorOfLimitCone ℬ Y Z X).hom =
      tensorHom ℬ (Limits.BinaryFan.braiding (ℬ X Y).isLimit (ℬ Y X).isLimit).hom (𝟙 Z) ≫
        (BinaryFan.associatorOfLimitCone ℬ Y X Z).hom ≫
          tensorHom ℬ (𝟙 Y) (Limits.BinaryFan.braiding (ℬ X Z).isLimit (ℬ Z X).isLimit).hom := by
  dsimp [tensorHom, Limits.BinaryFan.braiding]
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ : C
𝒯 : LimitCone (Functor.empty C)
ℬ : (X Y : C) → LimitCone (pair X Y)
X Y Z : C
⊢ (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom ≫
      (IsLimit.conePointUniqueUpToIso (ℬ X (tensorObj ℬ Y Z)).isLimit
            (IsLimit.swapBinaryFan (ℬ (tensorObj ℬ Y Z) X).isLimit)).hom ≫
        (BinaryFan.associatorOfLimitCone ℬ Y Z X).hom =
    IsLimit.lift (ℬ (ℬ Y X).cone.pt Z).isLimit
        (BinaryFan.mk
          (BinaryFan.fst (ℬ (ℬ X Y).cone.pt Z).cone ≫
            (IsLimit.conePointUniqueUpToIso (ℬ X Y).isLimit (IsLimit.swapBinaryFan (ℬ Y X).isLimit)).hom)
          (BinaryFan.snd (ℬ (ℬ X Y).cone.pt Z).cone ≫ 𝟙 Z)) ≫
      (BinaryFan.associatorOfLimitCone ℬ Y X Z).hom ≫
        IsLimit.lift (ℬ Y (ℬ Z X).cone.pt).isLimit
          (BinaryFan.mk (BinaryFan.fst (ℬ Y (ℬ X Z).cone.pt).cone ≫ 𝟙 Y)
            (BinaryFan.snd (ℬ Y (ℬ X Z).cone.pt).cone ≫
              (IsLimit.conePointUniqueUpToIso (ℬ X Z).isLimit (IsLimit.swapBinaryFan (ℬ Z X).isLimit)).hom))

Next tactic:
apply (ℬ _ _).isLimit.hom_ext