/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
import FormalConjecturesUtilFirst Proof, Theorem 4
open Polynomial Finset ENNRealopen scoped Nat
open Classical
namespace Arxiv.«2602.05192»
variable {F : Type} [Field F]
Define $p \boxplus_n q(x)$ to be the polynomial $$ (p \boxplus_n q)(x) = \sum_{k=0}^n c_k x^{n-k} $$ where the coefficients $c_k$ are given by the formula: $$ c_k = \sum_{i+j=k} \frac{(n-i)! (n-j)!}{n! (n-k)!} a_i b_j $$ for $k = 0, 1, \dots, n$.
noncomputable def finiteAdditiveConvolution (n : ℕ) (p q : F[X]) : F[X] :=
let c := fun k => ∑ ij ∈ antidiagonal (k : ℕ),
((n - ij.1)! * (n - ij.2)! : F) / (n ! * (n - k)! : F) *
p.coeff (n - ij.1) * q.coeff (n - ij.2)
∑ k ∈ range (n + 1), c k • X^(n - k)
local notation p " (⊞_"n ")" q:65 => finiteAdditiveConvolution n p q
@[category test, AMS 26]
theorem finiteAdditiveConvolution_comm (n : ℕ) (p q : F[X]) :
p (⊞_n) q = q (⊞_n) p := F:Typeinst✝:Field Fn:ℕp:F[X]q:F[X]⊢ p (⊞_n)q = q (⊞_n)p
F:Typeinst✝:Field Fn:ℕp:F[X]q:F[X]⊢ ∑ a ∈ range (n + 1),
(fun k =>
∑ ij ∈ antidiagonal k,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - k)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2))
a •
X ^ (n - a) =
∑ a ∈ range (n + 1),
(fun k =>
∑ ij ∈ antidiagonal k,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - k)!) * q.coeff (n - ij.1) * p.coeff (n - ij.2))
a •
X ^ (n - a)
exact sum_congr rfl fun m hm =>
(congr_arg₂ _) (sum_equiv (.prodComm _ _) (F:Typeinst✝:Field Fn:ℕp:F[X]q:F[X]m:ℕhm:m ∈ range (n + 1)⊢ ∀ (i : ℕ × ℕ), i ∈ antidiagonal m ↔ (Equiv.prodComm ℕ ℕ) i ∈ antidiagonal m All goals completed! 🐙) fun _ _ => F:Typeinst✝:Field Fn:ℕp:F[X]q:F[X]m:ℕhm:m ∈ range (n + 1)x✝¹:ℕ × ℕx✝:x✝¹ ∈ antidiagonal m⊢ ↑(n - x✝¹.1)! * ↑(n - x✝¹.2)! / (↑n ! * ↑(n - m)!) * p.coeff (n - x✝¹.1) * q.coeff (n - x✝¹.2) =
↑(n - ((Equiv.prodComm ℕ ℕ) x✝¹).1)! * ↑(n - ((Equiv.prodComm ℕ ℕ) x✝¹).2)! / (↑n ! * ↑(n - m)!) *
q.coeff (n - ((Equiv.prodComm ℕ ℕ) x✝¹).1) *
p.coeff (n - ((Equiv.prodComm ℕ ℕ) x✝¹).2) All goals completed! 🐙) rfl
@[category test, AMS 26]
theorem finiteAdditiveConvolution_degree (n : ℕ) (p q : ℝ[X])
(hp : p.degree = n) (hq : q.degree = n):
(p (⊞_n) q).degree = n := n:ℕp:ℝ[X]q:ℝ[X]hp:p.degree = ↑nhq:q.degree = ↑n⊢ (p (⊞_n)q).degree = ↑n
All goals completed! 🐙
@[category test, AMS 26]
theorem finiteAdditiveConvolution_monic' (n : ℕ) (p q : ℝ[X]) (hn : 0 < n)
(hp_deg : p.degree = n) (hq_deg : q.degree = n) (hp_monic : p.Monic) (hq_monic : q.Monic) :
(p (⊞_n) q).Monic := n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monic⊢ (p (⊞_n)q).Monic
have hc0 : ∑ ij ∈ antidiagonal 0, ((n - ij.1)! * (n - ij.2)! : ℝ) / (n ! * (n - 0)! : ℝ) *
p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 := n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monic⊢ (p (⊞_n)q).Monic
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monic⊢ ∑ ij ∈ {(0, 0)}, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monic⊢ ↑n ! * ↑n ! / (↑n ! * ↑n !) * p.coeff n * q.coeff n = 1
have hp1 : p.coeff n = 1 := n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monic⊢ (p (⊞_n)q).Monic
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monicthis:p.natDegree = n := natDegree_eq_of_degree_eq_some hp_deg⊢ p.coeff n = 1
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monicthis:p.natDegree = n := natDegree_eq_of_degree_eq_some hp_deg⊢ p.coeff p.natDegree = 1
All goals completed! 🐙
have hq1 : q.coeff n = 1 := n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monic⊢ (p (⊞_n)q).Monic
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichp1:p.coeff n = 1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monicthis:q.natDegree = n := natDegree_eq_of_degree_eq_some hq_deg⊢ q.coeff n = 1
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichp1:p.coeff n = 1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monicthis:q.natDegree = n := natDegree_eq_of_degree_eq_some hq_deg⊢ q.coeff q.natDegree = 1
All goals completed! 🐙
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichp1:p.coeff n = 1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monichq1:q.coeff n = 1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic⊢ ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * 1 = 1
have h_ne : (n ! : ℝ) ≠ 0 := n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monic⊢ (p (⊞_n)q).Monic All goals completed! 🐙
All goals completed! 🐙
-- The polynomial is ∑ k ∈ range (n+1), c(k) • X^(n-k).
-- Show coeff n equals 1 (from the k=0 term) and natDegree ≤ n.
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ r.Monic
suffices h : r.coeff n = 1 ∧ r.natDegree ≤ n n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:r.coeff n = 1 ∧ r.natDegree ≤ n := ?m.165⊢ r.Monic
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:r.coeff n = 1 ∧ r.natDegree ≤ n := ?m.165⊢ r.coeff r.natDegree = 1
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:r.coeff n = 1 ∧ r.natDegree ≤ n := ?m.165heq:r.natDegree = n⊢ r.coeff r.natDegree = 1n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:r.coeff n = 1 ∧ r.natDegree ≤ n := ?m.165hlt:r.natDegree < n⊢ r.coeff r.natDegree = 1
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:r.coeff n = 1 ∧ r.natDegree ≤ n := ?m.165heq:r.natDegree = n⊢ r.coeff r.natDegree = 1 n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:r.coeff n = 1 ∧ r.natDegree ≤ n := ?m.165heq:r.natDegree = n⊢ r.coeff n = 1; All goals completed! 🐙
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:r.coeff n = 1 ∧ r.natDegree ≤ n := ?m.165hlt:r.natDegree < n⊢ r.coeff r.natDegree = 1 n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:r.coeff n = 1 ∧ r.natDegree ≤ n := ?m.165hlt:r.natDegree < n⊢ False; n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:0 = 1 ∧ r.natDegree ≤ nhlt:r.natDegree < n⊢ False; All goals completed! 🐙
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ r.coeff n = 1n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ r.natDegree ≤ n
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ r.coeff n = 1 -- coeff n of (∑ k ∈ range (n+1), c(k) • X^(n-k)) = c(0) = 1
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ (p (⊞_n)q).coeff n = 1
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ (∑ x ∈ range (n + 1),
(∑ ij ∈ antidiagonal x,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - x)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
X ^ (n - x)).coeff
n =
1
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ ∑ b ∈ range (n + 1),
((∑ ij ∈ antidiagonal b,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - b)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
X ^ (n - b)).coeff
n =
1
conv_lhs =>
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q| fun b =>
((∑ ij ∈ antidiagonal b, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - b)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
X ^ (n - b)).coeff
n; n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qk:ℕ| ((∑ ij ∈ antidiagonal k, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - k)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
X ^ (n - k)).coeff
n
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qk:ℕ| (∑ ij ∈ antidiagonal k, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - k)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
if n = n - k then 1 else 0
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ (∑ x ∈ range (n + 1),
(∑ ij ∈ antidiagonal x,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - x)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - x then 1 else 0) =
1
-- Now: ∑ k ∈ range (n+1), c(k) * if n = n - k then 1 else 0
-- Only k=0 contributes (since n = n - k ↔ k = 0 for k ≤ n)
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ ((∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - 0 then 1 else 0) =
1n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ ∀ b ∈ range (n + 1),
b ≠ 0 →
((∑ ij ∈ antidiagonal b,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - b)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - b then 1 else 0) =
0n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ 0 ∉ range (n + 1) →
((∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - 0 then 1 else 0) =
0
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ ((∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - 0 then 1 else 0) =
1 -- The k=0 term: simplify n - 0 = n, if-cond = true, then use hc0
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ ∑ x ∈ antidiagonal 0, ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2) = 1
All goals completed! 🐙
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ ∀ b ∈ range (n + 1),
b ≠ 0 →
((∑ ij ∈ antidiagonal b,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - b)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - b then 1 else 0) =
0 -- All other terms are 0
intro k n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qk:ℕa✝:k ∈ range (n + 1)⊢ k ≠ 0 →
((∑ ij ∈ antidiagonal k, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - k)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - k then 1 else 0) =
0 n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qk:ℕa✝:k ∈ range (n + 1)hk0:k ≠ 0⊢ ((∑ ij ∈ antidiagonal k, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - k)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - k then 1 else 0) =
0
have : n ≠ n - k := n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monic⊢ (p (⊞_n)q).Monic All goals completed! 🐙
All goals completed! 🐙
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ 0 ∉ range (n + 1) →
((∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - 0 then 1 else 0) =
0 -- 0 ∈ range (n+1)
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:0 ∉ range (n + 1)⊢ ((∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) *
if n = n - 0 then 1 else 0) =
0; exact absurd (Finset.mem_range.mpr (n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qh:0 ∉ range (n + 1)⊢ 0 < n + 1 All goals completed! 🐙)) h
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ r.natDegree ≤ n -- natDegree ≤ n: each term has degree ≤ n since n - k ≤ n
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ (p (⊞_n)q).natDegree ≤ n
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ (∑ x ∈ range (n + 1),
(∑ ij ∈ antidiagonal x,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - x)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
X ^ (n - x)).natDegree ≤
n
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ fold max 0
(natDegree ∘ fun i =>
(∑ ij ∈ antidiagonal i,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - i)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
X ^ (n - i))
(range (n + 1)) ≤
n
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)q⊢ ∀ b ∈ range (n + 1),
(natDegree ∘ fun i =>
(∑ ij ∈ antidiagonal i,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - i)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
X ^ (n - i))
b ≤
n
intro k n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qk:ℕhk:k ∈ range (n + 1)⊢ (natDegree ∘ fun i =>
(∑ ij ∈ antidiagonal i,
↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - i)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2)) •
X ^ (n - i))
k ≤
n
n:ℕp:ℝ[X]q:ℝ[X]hn:0 < nhp_deg:p.degree = ↑nhq_deg:q.degree = ↑nhp_monic:p.Monichq_monic:q.Monichc0:∑ ij ∈ antidiagonal 0, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1 :=
Eq.mpr
(id
(congrArg
(fun _a =>
∑ ij ∈ _a, ↑(n - ij.1)! * ↑(n - ij.2)! / (↑n ! * ↑(n - 0)!) * p.coeff (n - ij.1) * q.coeff (n - ij.2) = 1)
antidiagonal_zero))
(Eq.mpr
(id
(congrArg (fun x => x = 1)
(Eq.trans
(Eq.trans
(sum_congr (Eq.refl {(0, 0)}) fun x a =>
congrArg (fun x_1 => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑x_1 !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(tsub_zero n))
(sum_singleton (fun x => ↑(n - x.1)! * ↑(n - x.2)! / (↑n ! * ↑n !) * p.coeff (n - x.1) * q.coeff (n - x.2))
(0, 0)))
(congr
(congrArg HMul.hMul
(congr
(congrArg (fun x => HMul.hMul (x / (↑n ! * ↑n !)))
(congr (congrArg (fun x => HMul.hMul ↑x !) (tsub_zero n)) (congrArg (fun x => ↑x !) (tsub_zero n))))
(congrArg p.coeff (tsub_zero n))))
(congrArg q.coeff (tsub_zero n))))))
(have hp1 :=
have this := natDegree_eq_of_degree_eq_some hp_deg;
Eq.mpr (id (congrArg (fun _a => p.coeff _a = 1) (Eq.symm this))) hp_monic;
have hq1 :=
have this := natDegree_eq_of_degree_eq_some hq_deg;
Eq.mpr (id (congrArg (fun _a => q.coeff _a = 1) (Eq.symm this))) hq_monic;
Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * _a * q.coeff n = 1) hp1))
(Eq.mpr (id (congrArg (fun _a => ↑n ! * ↑n ! / (↑n ! * ↑n !) * 1 * _a = 1) hq1))
(have h_ne := ne_of_gt (Nat.cast_pos'.mpr (Nat.factorial_pos n));
of_eq_true
(Eq.trans
(congrArg (fun x => x = 1)
(Eq.trans
(congrArg (fun x => x * 1)
(Eq.trans
(congrArg (fun x => x * 1)
(div_self
(of_eq_true
(Eq.trans
(congrArg Not
(Eq.trans mul_eq_zero._simp_1
(Eq.trans (congr (congrArg Or (eq_false h_ne)) (eq_false h_ne)) (or_self False))))
not_false_eq_true))))
(mul_one 1)))
(mul_one 1)))
(eq_self 1))))))r:ℝ[X] := p (⊞_n)qk:ℕhk:k ∈ range (n + 1)⊢ (X ^ (n - k)).natDegree ≤ n
All goals completed! 🐙
For a monic polynomial $p(x)=\prod_{i\le n}(x- \lambda_i)$, define $$\Phi_n(p):=\sum_{i\le n}(\sum_{j\neq i} \frac1{\lambda_i-\lambda_j})^2$$ and $\Phi_n(p):=\infty$ if $p$ has a multiple root.
noncomputable def Φ (p : ℝ[X]) : ℝ≥0∞ :=
if p.roots.Nodup then
let roots := p.roots.toFinset
(∑ i ∈ roots, (∑ j ∈ roots.erase i, 1 / (i - j)) ^ 2).toNNReal
else
⊤
A predicate that holds if $p(x)$ and $q(x)$ are monic real-rooted polynomials of degree $n$, then $$\frac{1}{\Phi_n(p\boxplus_n q)} \ge \frac{1}{\Phi_n(p)}+\frac{1}{\Phi_n(q)}?$$
def FourProp (p q : ℝ[X]) (n : ℕ) : Prop :=
p.degree = n → p.roots.card = n → q.degree = n → q.roots.card = n → p.Monic → q.Monic →
1 / Φ p + 1 / Φ q ≤ 1 / Φ (p (⊞_n) q)
Is it true that if $p(x)$ and $q(x)$ are monic real-rooted polynomials of degree $n$, then $$\frac{1}{\Phi_n(p\boxplus_n q)} \ge \frac{1}{\Phi_n(p)}+\frac{1}{\Phi_n(q)}?$$
arxiv/2602.05192v2 contains a proof.
@[category research solved, AMS 26, formal_proof using lean4 at
"https://github.com/frenzymath/Archon-FirstProof-Results/blob/main/FirstProof/FirstProof4/Problem4.lean"]
theorem four : answer(True) ↔ ∀ (p q : ℝ[X]) (n : ℕ), FourProp p q n := ⊢ True ↔ ∀ (p q : ℝ[X]) (n : ℕ), FourProp p q n
All goals completed! 🐙
Is it true that if $p(x)$ and $q(x)$ are monic real-rooted polynomials of degree $2$, then $$\frac{1}{\Phi_2(p\boxplus_n q)} \ge \frac{1}{\Phi_2(p)}+\frac{1}{\Phi_2(q)}?$$
@[category research solved, AMS 26]
theorem four_2 : answer(True) ↔ ∀ (p q : ℝ[X]), FourProp p q 2 := ⊢ True ↔ ∀ (p q : ℝ[X]), FourProp p q 2
All goals completed! 🐙
Is it true that if $p(x)$ and $q(x)$ are monic real-rooted polynomials of degree $3$, then $$\frac{1}{\Phi_3(p\boxplus_n q)} \ge \frac{1}{\Phi_3(p)}+\frac{1}{\Phi_3(q)}?$$
@[category research solved, AMS 26]
theorem four_3 : answer(True ) ↔ ∀ (p q : ℝ[X]), FourProp p q 3 := ⊢ True ↔ ∀ (p q : ℝ[X]), FourProp p q 3
All goals completed! 🐙
end Arxiv.«2602.05192»