l3lab/ntp-mathlib huggingface dataset:
/-- Tensor products distribute over a product on the right. -/
def prodRight : M₁ ⊗[R] (M₂ × M₃) ≃ₗ[R] ((M₁ ⊗[R] M₂) × (M₁ ⊗[R] M₃)) :=
  LinearEquiv.ofLinear
    (lift <|
      LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R
        ∘ₗ LinearMap.prod (mk _ _ _) (mk _ _ _))
    (LinearMap.coprod
      (LinearMap.lTensor _ <| LinearMap.inl _ _ _)
      (LinearMap.lTensor _ <| LinearMap.inr _ _ _))
    (by ext <;> 

Proof state:
case hl.H.h.h.a
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
x✝¹ : M₁
x✝ : M₂
⊢ (((LinearMap.compr₂ (mk R M₁ M₂)
            (LinearMap.comp
                (lift
                  (LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R ∘ₗ
                    LinearMap.prod (mk R M₁ M₂) (mk R M₁ M₃)))
                (LinearMap.coprod (LinearMap.lTensor M₁ (LinearMap.inl R M₂ M₃))
                  (LinearMap.lTensor M₁ (LinearMap.inr R M₂ M₃))) ∘ₗ
              LinearMap.inl R (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃)))
          x✝¹)
        x✝).1 =
    (((LinearMap.compr₂ (mk R M₁ M₂) (LinearMap.id ∘ₗ LinearMap.inl R (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃))) x✝¹) x✝).1

Next tactic:
simp
/-- Tensor products distribute over a product on the right. -/
def prodRight : M₁ ⊗[R] (M₂ × M₃) ≃ₗ[R] ((M₁ ⊗[R] M₂) × (M₁ ⊗[R] M₃)) :=
  LinearEquiv.ofLinear
    (lift <|
      LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R
        ∘ₗ LinearMap.prod (mk _ _ _) (mk _ _ _))
    (LinearMap.coprod
      (LinearMap.lTensor _ <| LinearMap.inl _ _ _)
      (LinearMap.lTensor _ <| LinearMap.inr _ _ _))
    (by ext <;> 

Proof state:
case hl.H.h.h.a
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
x✝¹ : M₁
x✝ : M₂
⊢ (((LinearMap.compr₂ (mk R M₁ M₂)
            (LinearMap.comp
                (lift
                  (LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R ∘ₗ
                    LinearMap.prod (mk R M₁ M₂) (mk R M₁ M₃)))
                (LinearMap.coprod (LinearMap.lTensor M₁ (LinearMap.inl R M₂ M₃))
                  (LinearMap.lTensor M₁ (LinearMap.inr R M₂ M₃))) ∘ₗ
              LinearMap.inl R (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃)))
          x✝¹)
        x✝).2 =
    (((LinearMap.compr₂ (mk R M₁ M₂) (LinearMap.id ∘ₗ LinearMap.inl R (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃))) x✝¹) x✝).2

Next tactic:
simp
/-- Tensor products distribute over a product on the right. -/
def prodRight : M₁ ⊗[R] (M₂ × M₃) ≃ₗ[R] ((M₁ ⊗[R] M₂) × (M₁ ⊗[R] M₃)) :=
  LinearEquiv.ofLinear
    (lift <|
      LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R
        ∘ₗ LinearMap.prod (mk _ _ _) (mk _ _ _))
    (LinearMap.coprod
      (LinearMap.lTensor _ <| LinearMap.inl _ _ _)
      (LinearMap.lTensor _ <| LinearMap.inr _ _ _))
    (by ext <;> 

Proof state:
case hr.H.h.h.a
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
x✝¹ : M₁
x✝ : M₃
⊢ (((LinearMap.compr₂ (mk R M₁ M₃)
            (LinearMap.comp
                (lift
                  (LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R ∘ₗ
                    LinearMap.prod (mk R M₁ M₂) (mk R M₁ M₃)))
                (LinearMap.coprod (LinearMap.lTensor M₁ (LinearMap.inl R M₂ M₃))
                  (LinearMap.lTensor M₁ (LinearMap.inr R M₂ M₃))) ∘ₗ
              LinearMap.inr R (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃)))
          x✝¹)
        x✝).1 =
    (((LinearMap.compr₂ (mk R M₁ M₃) (LinearMap.id ∘ₗ LinearMap.inr R (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃))) x✝¹) x✝).1

Next tactic:
simp
/-- Tensor products distribute over a product on the right. -/
def prodRight : M₁ ⊗[R] (M₂ × M₃) ≃ₗ[R] ((M₁ ⊗[R] M₂) × (M₁ ⊗[R] M₃)) :=
  LinearEquiv.ofLinear
    (lift <|
      LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R
        ∘ₗ LinearMap.prod (mk _ _ _) (mk _ _ _))
    (LinearMap.coprod
      (LinearMap.lTensor _ <| LinearMap.inl _ _ _)
      (LinearMap.lTensor _ <| LinearMap.inr _ _ _))
    (by ext <;> 

Proof state:
case hr.H.h.h.a
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
x✝¹ : M₁
x✝ : M₃
⊢ (((LinearMap.compr₂ (mk R M₁ M₃)
            (LinearMap.comp
                (lift
                  (LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R ∘ₗ
                    LinearMap.prod (mk R M₁ M₂) (mk R M₁ M₃)))
                (LinearMap.coprod (LinearMap.lTensor M₁ (LinearMap.inl R M₂ M₃))
                  (LinearMap.lTensor M₁ (LinearMap.inr R M₂ M₃))) ∘ₗ
              LinearMap.inr R (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃)))
          x✝¹)
        x✝).2 =
    (((LinearMap.compr₂ (mk R M₁ M₃) (LinearMap.id ∘ₗ LinearMap.inr R (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃))) x✝¹) x✝).2

Next tactic:
simp
/-- Tensor products distribute over a product on the right. -/
def prodRight : M₁ ⊗[R] (M₂ × M₃) ≃ₗ[R] ((M₁ ⊗[R] M₂) × (M₁ ⊗[R] M₃)) :=
  LinearEquiv.ofLinear
    (lift <|
      LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R
        ∘ₗ LinearMap.prod (mk _ _ _) (mk _ _ _))
    (LinearMap.coprod
      (LinearMap.lTensor _ <| LinearMap.inl _ _ _)
      (LinearMap.lTensor _ <| LinearMap.inr _ _ _))
    (by ext <;> simp)
    (by 

Proof state:
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
⊢ LinearMap.comp
      (LinearMap.coprod (LinearMap.lTensor M₁ (LinearMap.inl R M₂ M₃)) (LinearMap.lTensor M₁ (LinearMap.inr R M₂ M₃)))
      (lift (LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R ∘ₗ LinearMap.prod (mk R M₁ M₂) (mk R M₁ M₃))) =
    LinearMap.id

Next tactic:
ext
/-- Tensor products distribute over a product on the right. -/
def prodRight : M₁ ⊗[R] (M₂ × M₃) ≃ₗ[R] ((M₁ ⊗[R] M₂) × (M₁ ⊗[R] M₃)) :=
  LinearEquiv.ofLinear
    (lift <|
      LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R
        ∘ₗ LinearMap.prod (mk _ _ _) (mk _ _ _))
    (LinearMap.coprod
      (LinearMap.lTensor _ <| LinearMap.inl _ _ _)
      (LinearMap.lTensor _ <| LinearMap.inr _ _ _))
    (by ext <;> simp)
    (by ext <;> 

Proof state:
case H.h.hl.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
x✝¹ : M₁
x✝ : M₂
⊢ ((LinearMap.compr₂ (mk R M₁ (M₂ × M₃))
            (LinearMap.comp
              (LinearMap.coprod (LinearMap.lTensor M₁ (LinearMap.inl R M₂ M₃))
                (LinearMap.lTensor M₁ (LinearMap.inr R M₂ M₃)))
              (lift
                (LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R ∘ₗ
                  LinearMap.prod (mk R M₁ M₂) (mk R M₁ M₃)))))
          x✝¹ ∘ₗ
        LinearMap.inl R M₂ M₃)
      x✝ =
    ((LinearMap.compr₂ (mk R M₁ (M₂ × M₃)) LinearMap.id) x✝¹ ∘ₗ LinearMap.inl R M₂ M₃) x✝

Next tactic:
simp
/-- Tensor products distribute over a product on the right. -/
def prodRight : M₁ ⊗[R] (M₂ × M₃) ≃ₗ[R] ((M₁ ⊗[R] M₂) × (M₁ ⊗[R] M₃)) :=
  LinearEquiv.ofLinear
    (lift <|
      LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R
        ∘ₗ LinearMap.prod (mk _ _ _) (mk _ _ _))
    (LinearMap.coprod
      (LinearMap.lTensor _ <| LinearMap.inl _ _ _)
      (LinearMap.lTensor _ <| LinearMap.inr _ _ _))
    (by ext <;> simp)
    (by ext <;> 

Proof state:
case H.h.hr.h
R : Type uR
M₁ : Type uM₁
M₂ : Type uM₂
M₃ : Type uM₃
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M₁
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M₁
inst✝¹ : Module R M₂
inst✝ : Module R M₃
x✝¹ : M₁
x✝ : M₃
⊢ ((LinearMap.compr₂ (mk R M₁ (M₂ × M₃))
            (LinearMap.comp
              (LinearMap.coprod (LinearMap.lTensor M₁ (LinearMap.inl R M₂ M₃))
                (LinearMap.lTensor M₁ (LinearMap.inr R M₂ M₃)))
              (lift
                (LinearMap.prodMapLinear R M₂ M₃ (M₁ ⊗[R] M₂) (M₁ ⊗[R] M₃) R ∘ₗ
                  LinearMap.prod (mk R M₁ M₂) (mk R M₁ M₃)))))
          x✝¹ ∘ₗ
        LinearMap.inr R M₂ M₃)
      x✝ =
    ((LinearMap.compr₂ (mk R M₁ (M₂ × M₃)) LinearMap.id) x✝¹ ∘ₗ LinearMap.inr R M₂ M₃) x✝

Next tactic:
simp
/-- We equip the sphere, in a seminormed group, with a formal operation of negation, namely the
antipodal map. -/
instance : InvolutiveNeg (sphere (0 : E) r) where
  neg := Subtype.map Neg.neg fun w => by 

Proof state:
E : Type u_1
i : SeminormedAddCommGroup E
r : ℝ
w : E
⊢ w ∈ sphere 0 r → -w ∈ sphere 0 r

Next tactic:
simp
/-- We equip the ball, in a seminormed group, with a formal operation of negation, namely the
antipodal map. -/
instance {r : ℝ} : InvolutiveNeg (ball (0 : E) r) where
  neg := Subtype.map Neg.neg fun w => by 

Proof state:
E : Type u_1
i : SeminormedAddCommGroup E
r✝ r : ℝ
w : E
⊢ w ∈ ball 0 r → -w ∈ ball 0 r

Next tactic:
simp
/-- We equip the closed ball, in a seminormed group, with a formal operation of negation, namely the
antipodal map. -/
instance {r : ℝ} : InvolutiveNeg (closedBall (0 : E) r) where
  neg := Subtype.map Neg.neg fun w => by 

Proof state:
E : Type u_1
i : SeminormedAddCommGroup E
r✝ r : ℝ
w : E
⊢ w ∈ closedBall 0 r → -w ∈ closedBall 0 r

Next tactic:
simp
theorem W_pos (k : ℕ) : 0 < W k := by
  

Proof state:
k : ℕ
⊢ 0 < W k

Next tactic:
induction' k with k hk
theorem W_pos (k : ℕ) : 0 < W k := by
  induction' k with k hk
  · 

Proof state:
case zero
⊢ 0 < W Nat.zero

Next tactic:
unfold W
theorem W_pos (k : ℕ) : 0 < W k := by
  induction' k with k hk
  · unfold W; 

Proof state:
case zero
⊢ 0 < ∏ i in range Nat.zero, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))

Next tactic:
simp
theorem W_pos (k : ℕ) : 0 < W k := by
  induction' k with k hk
  · unfold W; simp
  · 

Proof state:
case succ
k : ℕ
hk : 0 < W k
⊢ 0 < W (Nat.succ k)

Next tactic:
rw [W_succ]
theorem W_pos (k : ℕ) : 0 < W k := by
  induction' k with k hk
  · unfold W; simp
  · rw [W_succ]
    

Proof state:
case succ
k : ℕ
hk : 0 < W k
⊢ 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))

Next tactic:
refine' mul_pos hk (mul_pos (div_pos _ _) (div_pos _ _))
theorem W_pos (k : ℕ) : 0 < W k := by
  induction' k with k hk
  · unfold W; simp
  · rw [W_succ]
    refine' mul_pos hk (mul_pos (div_pos _ _) (div_pos _ _)) <;> 

Proof state:
case succ.refine'_1
k : ℕ
hk : 0 < W k
⊢ 0 < 2 * ↑k + 2

Next tactic:
positivity
theorem W_pos (k : ℕ) : 0 < W k := by
  induction' k with k hk
  · unfold W; simp
  · rw [W_succ]
    refine' mul_pos hk (mul_pos (div_pos _ _) (div_pos _ _)) <;> 

Proof state:
case succ.refine'_2
k : ℕ
hk : 0 < W k
⊢ 0 < 2 * ↑k + 1

Next tactic:
positivity
theorem W_pos (k : ℕ) : 0 < W k := by
  induction' k with k hk
  · unfold W; simp
  · rw [W_succ]
    refine' mul_pos hk (mul_pos (div_pos _ _) (div_pos _ _)) <;> 

Proof state:
case succ.refine'_3
k : ℕ
hk : 0 < W k
⊢ 0 < 2 * ↑k + 2

Next tactic:
positivity
theorem W_pos (k : ℕ) : 0 < W k := by
  induction' k with k hk
  · unfold W; simp
  · rw [W_succ]
    refine' mul_pos hk (mul_pos (div_pos _ _) (div_pos _ _)) <;> 

Proof state:
case succ.refine'_4
k : ℕ
hk : 0 < W k
⊢ 0 < 2 * ↑k + 3

Next tactic:
positivity
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  

Proof state:
n : ℕ
⊢ W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))

Next tactic:
induction' n with n IH
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · 

Proof state:
case zero
⊢ W Nat.zero = 2 ^ (4 * Nat.zero) * ↑Nat.zero ! ^ 4 / (↑(2 * Nat.zero)! ^ 2 * (2 * ↑Nat.zero + 1))

Next tactic:
simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    

Proof state:
case zero
⊢ 1 = 2 ^ (4 * Nat.zero) * ↑1 ^ 4 / (↑(2 * Nat.zero)! ^ 2 * (2 * ↑Nat.zero + 1))

Next tactic:
norm_num
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · 

Proof state:
case succ
n : ℕ
IH : W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ W (Nat.succ n) = 2 ^ (4 * Nat.succ n) * ↑(Nat.succ n)! ^ 4 / (↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1))

Next tactic:
unfold W at IH ⊢
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    

Proof state:
case succ
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ ∏ i in range (Nat.succ n), (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * Nat.succ n) * ↑(Nat.succ n)! ^ 4 / (↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1))

Next tactic:
rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    

Proof state:
case succ
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ 2 ^ (4 * n) * ↑n ! ^ 4 * ((2 * ↑n + 2) * (2 * ↑n + 2)) /
      (↑(2 * n)! ^ 2 * (2 * ↑n + 1) * ((2 * ↑n + 1) * (2 * ↑n + 3))) =
    2 ^ (4 * Nat.succ n) * ↑(Nat.succ n)! ^ 4 / (↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1))

Next tactic:
refine' (div_eq_div_iff _ _).mpr _
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    

Proof state:
case succ.refine'_1
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ ↑(2 * n)! ^ 2 * (2 * ↑n + 1) * ((2 * ↑n + 1) * (2 * ↑n + 3)) ≠ 0
case succ.refine'_2
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ ↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1) ≠ 0
case succ.refine'_3
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ 2 ^ (4 * n) * ↑n ! ^ 4 * ((2 * ↑n + 2) * (2 * ↑n + 2)) * (↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1)) =
    2 ^ (4 * Nat.succ n) * ↑(Nat.succ n)! ^ 4 * (↑(2 * n)! ^ 2 * (2 * ↑n + 1) * ((2 * ↑n + 1) * (2 * ↑n + 3)))

Next tactic:
any_goals exact ne_of_gt (by positivity)
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    any_goals 

Proof state:
case succ.refine'_1
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ ↑(2 * n)! ^ 2 * (2 * ↑n + 1) * ((2 * ↑n + 1) * (2 * ↑n + 3)) ≠ 0

Next tactic:
exact ne_of_gt (by positivity)
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    any_goals exact ne_of_gt (by 

Proof state:
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ 0 < ↑(2 * n)! ^ 2 * (2 * ↑n + 1) * ((2 * ↑n + 1) * (2 * ↑n + 3))

Next tactic:
positivity
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    any_goals 

Proof state:
case succ.refine'_2
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ ↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1) ≠ 0

Next tactic:
exact ne_of_gt (by positivity)
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    any_goals exact ne_of_gt (by 

Proof state:
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ 0 < ↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1)

Next tactic:
positivity
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    any_goals 

Proof state:
case succ.refine'_3
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ 2 ^ (4 * n) * ↑n ! ^ 4 * ((2 * ↑n + 2) * (2 * ↑n + 2)) * (↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1)) =
    2 ^ (4 * Nat.succ n) * ↑(Nat.succ n)! ^ 4 * (↑(2 * n)! ^ 2 * (2 * ↑n + 1) * ((2 * ↑n + 1) * (2 * ↑n + 3)))

Next tactic:
exact ne_of_gt (by positivity)
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    any_goals exact ne_of_gt (by 

Proof state:
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ ?m.17514 < ?m.17513

Next tactic:
positivity
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    any_goals exact ne_of_gt (by positivity)
    

Proof state:
case succ.refine'_3
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ 2 ^ (4 * n) * ↑n ! ^ 4 * ((2 * ↑n + 2) * (2 * ↑n + 2)) * (↑(2 * Nat.succ n)! ^ 2 * (2 * ↑(Nat.succ n) + 1)) =
    2 ^ (4 * Nat.succ n) * ↑(Nat.succ n)! ^ 4 * (↑(2 * n)! ^ 2 * (2 * ↑n + 1) * ((2 * ↑n + 1) * (2 * ↑n + 3)))

Next tactic:
simp_rw [Nat.mul_succ, Nat.factorial_succ, pow_succ]
theorem W_eq_factorial_ratio (n : ℕ) :
    W n = 2 ^ (4 * n) * n ! ^ 4 / ((2 * n)! ^ 2 * (2 * n + 1)) := by
  induction' n with n IH
  · simp only [W, prod_range_zero, Nat.factorial_zero, mul_zero, pow_zero,
      algebraMap.coe_one, one_pow, mul_one, algebraMap.coe_zero, zero_add, div_self, Ne.def,
      one_ne_zero, not_false_iff]
    norm_num
  · unfold W at IH ⊢
    rw [prod_range_succ, IH, _root_.div_mul_div_comm, _root_.div_mul_div_comm]
    refine' (div_eq_div_iff _ _).mpr _
    any_goals exact ne_of_gt (by positivity)
    simp_rw [Nat.mul_succ, Nat.factorial_succ, pow_succ]
    

Proof state:
case succ.refine'_3
n : ℕ
IH :
  ∏ i in range n, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3)) =
    2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)! ^ 2 * (2 * ↑n + 1))
⊢ 2 ^ (4 * n) * (↑n ! * (↑n ! * (↑n ! * (↑n ! * ↑n ! ^ 0)))) * ((2 * ↑n + 2) * (2 * ↑n + 2)) *
      (↑((2 * n + 1 + 1) * ((2 * n + 1) * (2 * n)!)) *
          (↑((2 * n + 1 + 1) * ((2 * n + 1) * (2 * n)!)) * ↑((2 * n + 1 + 1) * ((2 * n + 1) * (2 * n)!)) ^ 0) *
        (2 * ↑(Nat.succ n) + 1)) =
    2 * (2 * (2 * (2 * 2 ^ (4 * n)))) *
        (↑((n + 1) * n !) * (↑((n + 1) * n !) * (↑((n + 1) * n !) * (↑((n + 1) * n !) * ↑((n + 1) * n !) ^ 0)))) *
      (↑(2 * n)! * (↑(2 * n)! * ↑(2 * n)! ^ 0) * (2 * ↑n + 1) * ((2 * ↑n + 1) * (2 * ↑n + 3)))

Next tactic:
push_cast