l3lab/ntp-mathlib huggingface dataset:
protected lemma ContinuousWithinAt.partialSups (hf : ∀ k ≤ n, ContinuousWithinAt (f k) s x) :
    ContinuousWithinAt (partialSups f n) s x := by
  

Proof state:
L : Type u_1
inst✝³ : SemilatticeSup L
inst✝² : TopologicalSpace L
inst✝¹ : ContinuousSup L
X : Type u_2
inst✝ : TopologicalSpace X
f : ℕ → X → L
n : ℕ
s : Set X
x : X
hf : ∀ k ≤ n, ContinuousWithinAt (f k) s x
⊢ ContinuousWithinAt ((partialSups f) n) s x

Next tactic:
simpa only [← partialSups_apply] using ContinuousWithinAt.partialSups_apply hf
theorem arg_expMapCircle {x : ℝ} (h₁ : -π < x) (h₂ : x ≤ π) : arg (expMapCircle x) = x := by
  

Proof state:
x : ℝ
h₁ : -π < x
h₂ : x ≤ π
⊢ arg ↑(expMapCircle x) = x

Next tactic:
rw [expMapCircle_apply, exp_mul_I, arg_cos_add_sin_mul_I ⟨h₁, h₂⟩]
theorem expMapCircle_eq_expMapCircle {x y : ℝ} :
    expMapCircle x = expMapCircle y ↔ ∃ m : ℤ, x = y + m * (2 * π) := by
  

Proof state:
x y : ℝ
⊢ expMapCircle x = expMapCircle y ↔ ∃ m, x = y + ↑m * (2 * π)

Next tactic:
rw [Subtype.ext_iff, expMapCircle_apply, expMapCircle_apply, exp_eq_exp_iff_exists_int]
theorem expMapCircle_eq_expMapCircle {x y : ℝ} :
    expMapCircle x = expMapCircle y ↔ ∃ m : ℤ, x = y + m * (2 * π) := by
  rw [Subtype.ext_iff, expMapCircle_apply, expMapCircle_apply, exp_eq_exp_iff_exists_int]
  

Proof state:
x y : ℝ
⊢ (∃ n, ↑x * I = ↑y * I + ↑n * (2 * ↑π * I)) ↔ ∃ m, x = y + ↑m * (2 * π)

Next tactic:
refine' exists_congr fun n => _
theorem expMapCircle_eq_expMapCircle {x y : ℝ} :
    expMapCircle x = expMapCircle y ↔ ∃ m : ℤ, x = y + m * (2 * π) := by
  rw [Subtype.ext_iff, expMapCircle_apply, expMapCircle_apply, exp_eq_exp_iff_exists_int]
  refine' exists_congr fun n => _
  

Proof state:
x y : ℝ
n : ℤ
⊢ ↑x * I = ↑y * I + ↑n * (2 * ↑π * I) ↔ x = y + ↑n * (2 * π)

Next tactic:
rw [← mul_assoc, ← add_mul, mul_left_inj' I_ne_zero]
theorem expMapCircle_eq_expMapCircle {x y : ℝ} :
    expMapCircle x = expMapCircle y ↔ ∃ m : ℤ, x = y + m * (2 * π) := by
  rw [Subtype.ext_iff, expMapCircle_apply, expMapCircle_apply, exp_eq_exp_iff_exists_int]
  refine' exists_congr fun n => _
  rw [← mul_assoc, ← add_mul, mul_left_inj' I_ne_zero]
  

Proof state:
x y : ℝ
n : ℤ
⊢ ↑x = ↑y + ↑n * (2 * ↑π) ↔ x = y + ↑n * (2 * π)

Next tactic:
norm_cast
theorem periodic_expMapCircle : Periodic expMapCircle (2 * π) := fun z =>
  expMapCircle_eq_expMapCircle.2 ⟨1, by 

Proof state:
z : ℝ
⊢ z + 2 * π = z + ↑1 * (2 * π)

Next tactic:
rw [Int.cast_one, one_mul]
theorem Real.Angle.coe_expMapCircle (θ : Real.Angle) :
    (θ.expMapCircle : ℂ) = θ.cos + θ.sin * I := by
  

Proof state:
θ : Angle
⊢ ↑(expMapCircle θ) = ↑(cos θ) + ↑(sin θ) * I

Next tactic:
induction θ using Real.Angle.induction_on
theorem Real.Angle.coe_expMapCircle (θ : Real.Angle) :
    (θ.expMapCircle : ℂ) = θ.cos + θ.sin * I := by
  induction θ using Real.Angle.induction_on
  

Proof state:
case h
x✝ : ℝ
⊢ ↑(expMapCircle ↑x✝) = ↑(cos ↑x✝) + ↑(sin ↑x✝) * I

Next tactic:
simp [Complex.exp_mul_I]
@[simp]
theorem Real.Angle.expMapCircle_zero : Real.Angle.expMapCircle 0 = 1 := by
  

Proof state:
⊢ expMapCircle 0 = 1

Next tactic:
rw [← Real.Angle.coe_zero, Real.Angle.expMapCircle_coe, _root_.expMapCircle_zero]
@[simp]
theorem Real.Angle.expMapCircle_neg (θ : Real.Angle) :
    Real.Angle.expMapCircle (-θ) = (Real.Angle.expMapCircle θ)⁻¹ := by
  

Proof state:
θ : Angle
⊢ expMapCircle (-θ) = (expMapCircle θ)⁻¹

Next tactic:
induction θ using Real.Angle.induction_on
@[simp]
theorem Real.Angle.expMapCircle_neg (θ : Real.Angle) :
    Real.Angle.expMapCircle (-θ) = (Real.Angle.expMapCircle θ)⁻¹ := by
  induction θ using Real.Angle.induction_on
  

Proof state:
case h
x✝ : ℝ
⊢ expMapCircle (-↑x✝) = (expMapCircle ↑x✝)⁻¹

Next tactic:
simp_rw [← Real.Angle.coe_neg, Real.Angle.expMapCircle_coe, _root_.expMapCircle_neg]
@[simp]
theorem Real.Angle.expMapCircle_add (θ₁ θ₂ : Real.Angle) : Real.Angle.expMapCircle (θ₁ + θ₂) =
    Real.Angle.expMapCircle θ₁ * Real.Angle.expMapCircle θ₂ := by
  

Proof state:
θ₁ θ₂ : Angle
⊢ expMapCircle (θ₁ + θ₂) = expMapCircle θ₁ * expMapCircle θ₂

Next tactic:
induction θ₁ using Real.Angle.induction_on
@[simp]
theorem Real.Angle.expMapCircle_add (θ₁ θ₂ : Real.Angle) : Real.Angle.expMapCircle (θ₁ + θ₂) =
    Real.Angle.expMapCircle θ₁ * Real.Angle.expMapCircle θ₂ := by
  induction θ₁ using Real.Angle.induction_on
  

Proof state:
case h
θ₂ : Angle
x✝ : ℝ
⊢ expMapCircle (↑x✝ + θ₂) = expMapCircle ↑x✝ * expMapCircle θ₂

Next tactic:
induction θ₂ using Real.Angle.induction_on
@[simp]
theorem Real.Angle.expMapCircle_add (θ₁ θ₂ : Real.Angle) : Real.Angle.expMapCircle (θ₁ + θ₂) =
    Real.Angle.expMapCircle θ₁ * Real.Angle.expMapCircle θ₂ := by
  induction θ₁ using Real.Angle.induction_on
  induction θ₂ using Real.Angle.induction_on
  

Proof state:
case h.h
x✝¹ x✝ : ℝ
⊢ expMapCircle (↑x✝¹ + ↑x✝) = expMapCircle ↑x✝¹ * expMapCircle ↑x✝

Next tactic:
exact _root_.expMapCircle_add _ _
@[simp]
theorem Real.Angle.arg_expMapCircle (θ : Real.Angle) :
    (arg (Real.Angle.expMapCircle θ) : Real.Angle) = θ := by
  

Proof state:
θ : Angle
⊢ ↑(arg ↑(expMapCircle θ)) = θ

Next tactic:
induction θ using Real.Angle.induction_on
@[simp]
theorem Real.Angle.arg_expMapCircle (θ : Real.Angle) :
    (arg (Real.Angle.expMapCircle θ) : Real.Angle) = θ := by
  induction θ using Real.Angle.induction_on
  

Proof state:
case h
x✝ : ℝ
⊢ ↑(arg ↑(expMapCircle ↑x✝)) = ↑x✝

Next tactic:
rw [Real.Angle.expMapCircle_coe, expMapCircle_apply, exp_mul_I, ← ofReal_cos, ← ofReal_sin, ←
    Real.Angle.cos_coe, ← Real.Angle.sin_coe, arg_cos_add_sin_mul_I_coe_angle]
@[simp]
theorem prod_Icc_factorial : ∀ n : ℕ, ∏ x in Icc 1 n, x ! = sf n
  | 0 => rfl
  | n + 1 => by
    

Proof state:
n✝ n : ℕ
⊢ ∏ x in Icc 1 (n + 1), x ! = sf n + 1

Next tactic:
rw [← Ico_succ_right 1 n.succ, prod_Ico_succ_top <| Nat.succ_le_succ <| Nat.zero_le n,
    Nat.factorial_succ, Ico_succ_right 1 n, prod_Icc_factorial n, superFactorial, factorial,
    Nat.succ_eq_add_one, mul_comm]
@[simp]
theorem prod_range_factorial_succ : ∀ n : ℕ, ∏ x in range n, (x + 1)! = sf n
  | 0 => rfl
  | n + 1 => by
    

Proof state:
n✝ n : ℕ
⊢ ∏ x in range (n + 1), (x + 1)! = sf n + 1

Next tactic:
rw [Finset.prod_range_succ, prod_range_factorial_succ n, superFactorial, mul_comm, factorial]
@[simp]
theorem prod_range_succ_factorial : ∀ n : ℕ, ∏ x in range (n + 1), x ! = sf n
  | 0 => rfl
  | n + 1 => by
    

Proof state:
n✝ n : ℕ
⊢ ∏ x in range (n + 1 + 1), x ! = sf n + 1

Next tactic:
rw [prod_range_succ, prod_range_succ_factorial n, mul_comm, superFactorial]
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
⊢ Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf n)

Next tactic:
induction' n with n hn
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · 

Proof state:
case zero
n : ℕ
R : Type u_1
inst✝ : CommRing R
⊢ Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf zero)

Next tactic:
simp [Matrix.det_vandermonde]
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · simp [Matrix.det_vandermonde]
  · 

Proof state:
case succ
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
hn : Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf n)
⊢ Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf succ n)

Next tactic:
rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · simp [Matrix.det_vandermonde]
  · rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
    

Proof state:
case succ
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
hn : Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf n)
⊢ (∏ j in Ioi 0, (↑↑j - ↑↑0)) * ∏ i : Fin (n + 1), ∏ j in Ioi (Fin.succAbove 0 i), (↑↑j - ↑↑(Fin.succAbove 0 i)) =
    ↑((succ n)! * sf n)

Next tactic:
push_cast
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · simp [Matrix.det_vandermonde]
  · rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
    push_cast
    

Proof state:
case succ
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
hn : Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf n)
⊢ (∏ j in Ioi 0, (↑↑j - ↑↑0)) * ∏ i : Fin (n + 1), ∏ j in Ioi (Fin.succAbove 0 i), (↑↑j - ↑↑(Fin.succAbove 0 i)) =
    ↑(succ n)! * ↑(sf n)

Next tactic:
congr
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · simp [Matrix.det_vandermonde]
  · rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
    push_cast
    congr
    · 

Proof state:
case succ.e_a
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
hn : Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf n)
⊢ ∏ j in Ioi 0, (↑↑j - ↑↑0) = ↑(succ n)!

Next tactic:
simp only [Fin.val_zero, Nat.cast_zero, sub_zero]
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · simp [Matrix.det_vandermonde]
  · rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
    push_cast
    congr
    · simp only [Fin.val_zero, Nat.cast_zero, sub_zero]
      

Proof state:
case succ.e_a
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
hn : Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf n)
⊢ ∏ x in Ioi 0, ↑↑x = ↑(succ n)!

Next tactic:
norm_cast
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · simp [Matrix.det_vandermonde]
  · rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
    push_cast
    congr
    · simp only [Fin.val_zero, Nat.cast_zero, sub_zero]
      norm_cast
      

Proof state:
case succ.e_a
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
hn : Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf n)
⊢ ↑(∏ x in Ioi 0, ↑x) = ↑(succ n)!

Next tactic:
simp [Fin.prod_univ_eq_prod_range (fun i ↦ (↑i + 1)) (n + 1)]
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · simp [Matrix.det_vandermonde]
  · rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
    push_cast
    congr
    · simp only [Fin.val_zero, Nat.cast_zero, sub_zero]
      norm_cast
      simp [Fin.prod_univ_eq_prod_range (fun i ↦ (↑i + 1)) (n + 1)]
    · 

Proof state:
case succ.e_a
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
hn : Matrix.det (Matrix.vandermonde fun i => ↑↑i) = ↑(sf n)
⊢ ∏ i : Fin (n + 1), ∏ j in Ioi (Fin.succAbove 0 i), (↑↑j - ↑↑(Fin.succAbove 0 i)) = ↑(sf n)

Next tactic:
rw [Matrix.det_vandermonde] at hn
theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by
  induction' n with n hn
  · simp [Matrix.det_vandermonde]
  · rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
    push_cast
    congr
    · simp only [Fin.val_zero, Nat.cast_zero, sub_zero]
      norm_cast
      simp [Fin.prod_univ_eq_prod_range (fun i ↦ (↑i + 1)) (n + 1)]
    · rw [Matrix.det_vandermonde] at hn
      

Proof state:
case succ.e_a
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
hn : ∏ i : Fin (n + 1), ∏ j in Ioi i, (↑↑j - ↑↑i) = ↑(sf n)
⊢ ∏ i : Fin (n + 1), ∏ j in Ioi (Fin.succAbove 0 i), (↑↑j - ↑↑(Fin.succAbove 0 i)) = ↑(sf n)

Next tactic:
simp [hn]
private theorem matrixOf_eval_descPochhammer_eq_mul_matrixOf_choose {n : ℕ} (v : Fin n → ℕ) :
    (Matrix.of (fun (i j : Fin n) => (descPochhammer ℤ j).eval (v i : ℤ))).det =
    (∏ i : Fin n, Nat.factorial i) *
      (Matrix.of (fun (i j : Fin n) => (Nat.choose (v i) (j : ℕ) : ℤ))).det := by
  

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin n → ℕ
⊢ Matrix.det (Matrix.of fun i j => Polynomial.eval (↑(v i)) (descPochhammer ℤ ↑j)) =
    ↑(∏ i : Fin n, (↑i)!) * Matrix.det (Matrix.of fun i j => ↑(choose (v i) ↑j))

Next tactic:
convert Matrix.det_mul_row (fun (i : Fin n) => ((Nat.factorial (i : ℕ)):ℤ)) _
private theorem matrixOf_eval_descPochhammer_eq_mul_matrixOf_choose {n : ℕ} (v : Fin n → ℕ) :
    (Matrix.of (fun (i j : Fin n) => (descPochhammer ℤ j).eval (v i : ℤ))).det =
    (∏ i : Fin n, Nat.factorial i) *
      (Matrix.of (fun (i j : Fin n) => (Nat.choose (v i) (j : ℕ) : ℤ))).det := by
  convert Matrix.det_mul_row (fun (i : Fin n) => ((Nat.factorial (i : ℕ)):ℤ)) _
  · 

Proof state:
case h.e'_2.h.e'_6.h.e'_6.h.h
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin n → ℕ
x✝¹ x✝ : Fin n
⊢ Polynomial.eval (↑(v x✝¹)) (descPochhammer ℤ ↑x✝) = ↑(↑x✝)! * Matrix.of (fun i j => ↑(choose (v i) ↑j)) x✝¹ x✝

Next tactic:
rw [Matrix.of_apply, descPochhammer_int_eq_descFactorial _ _]
private theorem matrixOf_eval_descPochhammer_eq_mul_matrixOf_choose {n : ℕ} (v : Fin n → ℕ) :
    (Matrix.of (fun (i j : Fin n) => (descPochhammer ℤ j).eval (v i : ℤ))).det =
    (∏ i : Fin n, Nat.factorial i) *
      (Matrix.of (fun (i j : Fin n) => (Nat.choose (v i) (j : ℕ) : ℤ))).det := by
  convert Matrix.det_mul_row (fun (i : Fin n) => ((Nat.factorial (i : ℕ)):ℤ)) _
  · rw [Matrix.of_apply, descPochhammer_int_eq_descFactorial _ _]
    

Proof state:
case h.e'_2.h.e'_6.h.e'_6.h.h
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin n → ℕ
x✝¹ x✝ : Fin n
⊢ ↑(descFactorial (v x✝¹) ↑x✝) = ↑(↑x✝)! * ↑(choose (v x✝¹) ↑x✝)

Next tactic:
congr
private theorem matrixOf_eval_descPochhammer_eq_mul_matrixOf_choose {n : ℕ} (v : Fin n → ℕ) :
    (Matrix.of (fun (i j : Fin n) => (descPochhammer ℤ j).eval (v i : ℤ))).det =
    (∏ i : Fin n, Nat.factorial i) *
      (Matrix.of (fun (i j : Fin n) => (Nat.choose (v i) (j : ℕ) : ℤ))).det := by
  convert Matrix.det_mul_row (fun (i : Fin n) => ((Nat.factorial (i : ℕ)):ℤ)) _
  · rw [Matrix.of_apply, descPochhammer_int_eq_descFactorial _ _]
    congr
    

Proof state:
case h.e'_2.h.e'_6.h.e'_6.h.h.e_a
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin n → ℕ
x✝¹ x✝ : Fin n
⊢ descFactorial (v x✝¹) ↑x✝ = (↑x✝)! * choose (v x✝¹) ↑x✝

Next tactic:
exact Nat.descFactorial_eq_factorial_mul_choose _ _
private theorem matrixOf_eval_descPochhammer_eq_mul_matrixOf_choose {n : ℕ} (v : Fin n → ℕ) :
    (Matrix.of (fun (i j : Fin n) => (descPochhammer ℤ j).eval (v i : ℤ))).det =
    (∏ i : Fin n, Nat.factorial i) *
      (Matrix.of (fun (i j : Fin n) => (Nat.choose (v i) (j : ℕ) : ℤ))).det := by
  convert Matrix.det_mul_row (fun (i : Fin n) => ((Nat.factorial (i : ℕ)):ℤ)) _
  · rw [Matrix.of_apply, descPochhammer_int_eq_descFactorial _ _]
    congr
    exact Nat.descFactorial_eq_factorial_mul_choose _ _
  · 

Proof state:
case h.e'_3.h.e'_5
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin n → ℕ
⊢ ↑(∏ i : Fin n, (↑i)!) = ∏ i : Fin n, ↑(↑i)!

Next tactic:
rw [Nat.cast_prod]
theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by
  

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin (n + 1) → ℤ
⊢ ↑(sf n) ∣ Matrix.det (Matrix.vandermonde v)

Next tactic:
let m := inf' univ ⟨0, mem_univ _⟩ v
theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by
  let m := inf' univ ⟨0, mem_univ _⟩ v
  

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin (n + 1) → ℤ
m : ℤ := inf' univ (_ : ∃ x, x ∈ univ) v
⊢ ↑(sf n) ∣ Matrix.det (Matrix.vandermonde v)

Next tactic:
let w' := fun i ↦ (v i - m).toNat
theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by
  let m := inf' univ ⟨0, mem_univ _⟩ v
  let w' := fun i ↦ (v i - m).toNat
  

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin (n + 1) → ℤ
m : ℤ := inf' univ (_ : ∃ x, x ∈ univ) v
w' : Fin (n + 1) → ℕ := fun i => Int.toNat (v i - m)
⊢ ↑(sf n) ∣ Matrix.det (Matrix.vandermonde v)

Next tactic:
have hw' : ∀ i, (w' i : ℤ) = v i - m := fun i ↦ Int.toNat_sub_of_le (inf'_le _ (mem_univ _))
theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by
  let m := inf' univ ⟨0, mem_univ _⟩ v
  let w' := fun i ↦ (v i - m).toNat
  have hw' : ∀ i, (w' i : ℤ) = v i - m := fun i ↦ Int.toNat_sub_of_le (inf'_le _ (mem_univ _))
  

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin (n + 1) → ℤ
m : ℤ := inf' univ (_ : ∃ x, x ∈ univ) v
w' : Fin (n + 1) → ℕ := fun i => Int.toNat (v i - m)
hw' : ∀ (i : Fin (n + 1)), ↑(w' i) = v i - m
⊢ ↑(sf n) ∣ Matrix.det (Matrix.vandermonde v)

Next tactic:
have h :=  Matrix.det_eval_matrixOfPolynomials_eq_det_vandermonde (fun i ↦ ↑(w' i))
      (fun i => descPochhammer ℤ i)
      (fun i => descPochhammer_natDegree ℤ i)
      (fun i => monic_descPochhammer ℤ i)
theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by
  let m := inf' univ ⟨0, mem_univ _⟩ v
  let w' := fun i ↦ (v i - m).toNat
  have hw' : ∀ i, (w' i : ℤ) = v i - m := fun i ↦ Int.toNat_sub_of_le (inf'_le _ (mem_univ _))
  have h :=  Matrix.det_eval_matrixOfPolynomials_eq_det_vandermonde (fun i ↦ ↑(w' i))
      (fun i => descPochhammer ℤ i)
      (fun i => descPochhammer_natDegree ℤ i)
      (fun i => monic_descPochhammer ℤ i)
  

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin (n + 1) → ℤ
m : ℤ := inf' univ (_ : ∃ x, x ∈ univ) v
w' : Fin (n + 1) → ℕ := fun i => Int.toNat (v i - m)
hw' : ∀ (i : Fin (n + 1)), ↑(w' i) = v i - m
h :
  Matrix.det (Matrix.vandermonde fun i => ↑(w' i)) =
    Matrix.det (Matrix.of fun i j => Polynomial.eval ((fun i => ↑(w' i)) i) ((fun i => descPochhammer ℤ ↑i) j))
⊢ ↑(sf n) ∣ Matrix.det (Matrix.vandermonde v)

Next tactic:
conv_lhs at h => simp only [hw', Matrix.det_vandermonde_sub]
theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by
  let m := inf' univ ⟨0, mem_univ _⟩ v
  let w' := fun i ↦ (v i - m).toNat
  have hw' : ∀ i, (w' i : ℤ) = v i - m := fun i ↦ Int.toNat_sub_of_le (inf'_le _ (mem_univ _))
  have h :=  Matrix.det_eval_matrixOfPolynomials_eq_det_vandermonde (fun i ↦ ↑(w' i))
      (fun i => descPochhammer ℤ i)
      (fun i => descPochhammer_natDegree ℤ i)
      (fun i => monic_descPochhammer ℤ i)
  conv_lhs at h => 

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin (n + 1) → ℤ
m : ℤ := inf' univ (_ : ∃ x, x ∈ univ) v
w' : Fin (n + 1) → ℕ := fun i => Int.toNat (v i - m)
hw' : ∀ (i : Fin (n + 1)), ↑(w' i) = v i - m
h :
  Matrix.det (Matrix.vandermonde fun i => ↑(w' i)) =
    Matrix.det (Matrix.of fun i j => Polynomial.eval ((fun i => ↑(w' i)) i) ((fun i => descPochhammer ℤ ↑i) j))
| Matrix.det (Matrix.vandermonde fun i => ↑(w' i))

Next tactic:
simp only [hw', Matrix.det_vandermonde_sub]
theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by
  let m := inf' univ ⟨0, mem_univ _⟩ v
  let w' := fun i ↦ (v i - m).toNat
  have hw' : ∀ i, (w' i : ℤ) = v i - m := fun i ↦ Int.toNat_sub_of_le (inf'_le _ (mem_univ _))
  have h :=  Matrix.det_eval_matrixOfPolynomials_eq_det_vandermonde (fun i ↦ ↑(w' i))
      (fun i => descPochhammer ℤ i)
      (fun i => descPochhammer_natDegree ℤ i)
      (fun i => monic_descPochhammer ℤ i)
  conv_lhs at h => simp only [hw', Matrix.det_vandermonde_sub]
  

Proof state:
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin (n + 1) → ℤ
m : ℤ := inf' univ (_ : ∃ x, x ∈ univ) v
w' : Fin (n + 1) → ℕ := fun i => Int.toNat (v i - m)
hw' : ∀ (i : Fin (n + 1)), ↑(w' i) = v i - m
h :
  Matrix.det (Matrix.vandermonde fun i => v i) =
    Matrix.det (Matrix.of fun i j => Polynomial.eval ((fun i => ↑(w' i)) i) ((fun i => descPochhammer ℤ ↑i) j))
⊢ ↑(sf n) ∣ Matrix.det (Matrix.vandermonde v)

Next tactic:
use (Matrix.of (fun (i j : Fin (n + 1)) => (Nat.choose (w' i) (j : ℕ) : ℤ))).det
theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by
  let m := inf' univ ⟨0, mem_univ _⟩ v
  let w' := fun i ↦ (v i - m).toNat
  have hw' : ∀ i, (w' i : ℤ) = v i - m := fun i ↦ Int.toNat_sub_of_le (inf'_le _ (mem_univ _))
  have h :=  Matrix.det_eval_matrixOfPolynomials_eq_det_vandermonde (fun i ↦ ↑(w' i))
      (fun i => descPochhammer ℤ i)
      (fun i => descPochhammer_natDegree ℤ i)
      (fun i => monic_descPochhammer ℤ i)
  conv_lhs at h => simp only [hw', Matrix.det_vandermonde_sub]
  use (Matrix.of (fun (i j : Fin (n + 1)) => (Nat.choose (w' i) (j : ℕ) : ℤ))).det
  

Proof state:
case h
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
n : ℕ
v : Fin (n + 1) → ℤ
m : ℤ := inf' univ (_ : ∃ x, x ∈ univ) v
w' : Fin (n + 1) → ℕ := fun i => Int.toNat (v i - m)
hw' : ∀ (i : Fin (n + 1)), ↑(w' i) = v i - m
h :
  Matrix.det (Matrix.vandermonde fun i => v i) =
    Matrix.det (Matrix.of fun i j => Polynomial.eval ((fun i => ↑(w' i)) i) ((fun i => descPochhammer ℤ ↑i) j))
⊢ Matrix.det (Matrix.vandermonde v) = ↑(sf n) * Matrix.det (Matrix.of fun i j => ↑(choose (w' i) ↑j))

Next tactic:
simp [h, matrixOf_eval_descPochhammer_eq_mul_matrixOf_choose w', Fin.prod_univ_eq_prod_range]
theorem embedding_coe : Embedding ((↑) : ℝ≥0 → ℝ≥0∞) :=
  coe_strictMono.embedding_of_ordConnected <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
⊢ OrdConnected (range ofNNReal)

Next tactic:
rw [range_coe']
theorem embedding_coe : Embedding ((↑) : ℝ≥0 → ℝ≥0∞) :=
  coe_strictMono.embedding_of_ordConnected <| by rw [range_coe']; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
⊢ OrdConnected (Iio ⊤)

Next tactic:
exact ordConnected_Iio
theorem isOpen_Ico_zero : IsOpen (Ico 0 b) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
⊢ IsOpen (Ico 0 b)

Next tactic:
rw [ENNReal.Ico_eq_Iio]
theorem isOpen_Ico_zero : IsOpen (Ico 0 b) := by
  rw [ENNReal.Ico_eq_Iio]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
⊢ IsOpen (Iio b)

Next tactic:
exact isOpen_Iio
theorem openEmbedding_coe : OpenEmbedding ((↑) : ℝ≥0 → ℝ≥0∞) :=
  ⟨embedding_coe, by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
⊢ IsOpen (range ofNNReal)

Next tactic:
rw [range_coe']
theorem openEmbedding_coe : OpenEmbedding ((↑) : ℝ≥0 → ℝ≥0∞) :=
  ⟨embedding_coe, by rw [range_coe']; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
⊢ IsOpen (Iio ⊤)

Next tactic:
exact isOpen_Iio
theorem tendsto_nhds_coe_iff {α : Type*} {l : Filter α} {x : ℝ≥0} {f : ℝ≥0∞ → α} :
    Tendsto f (𝓝 ↑x) l ↔ Tendsto (f ∘ (↑) : ℝ≥0 → α) (𝓝 x) l := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
a b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
α : Type u_4
l : Filter α
x : ℝ≥0
f : ℝ≥0∞ → α
⊢ Tendsto f (𝓝 ↑x) l ↔ Tendsto (f ∘ ofNNReal) (𝓝 x) l

Next tactic:
rw [nhds_coe, tendsto_map'_iff]
theorem tendsto_toNNReal {a : ℝ≥0∞} (ha : a ≠ ⊤) :
    Tendsto ENNReal.toNNReal (𝓝 a) (𝓝 a.toNNReal) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
a : ℝ≥0∞
ha : a ≠ ⊤
⊢ Tendsto ENNReal.toNNReal (𝓝 a) (𝓝 (ENNReal.toNNReal a))

Next tactic:
lift a to ℝ≥0 using ha