case mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝¹ : CommRing R
inst✝ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
⊢ IsPoly p fun R _Rcr x => f x x
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝¹ : CommRing R
inst✝ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
hf : IsPoly₂ p f
⊢ IsPoly p fun R _Rcr x => f x x
obtain ⟨φ, hf⟩ := hf
case mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝¹ : CommRing R
inst✝ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
⊢ ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x : 𝕎 R),
    (f x x).coeff = fun n => ↑(aeval x.coeff) ((fun n => ↑(bind₁ (uncurry ![X, X])) (φ n)) n)
case mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝¹ : CommRing R
inst✝ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
⊢ IsPoly p fun R _Rcr x => f x x
refine' ⟨⟨fun n => bind₁ (uncurry ![X, X]) (φ n), _⟩⟩
case mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
⊢ (f x✝ x✝).coeff = fun n => ↑(aeval x✝.coeff) ((fun n => ↑(bind₁ (uncurry ![X, X])) (φ n)) n)
case mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝¹ : CommRing R
inst✝ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
⊢ ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x : 𝕎 R),
    (f x x).coeff = fun n => ↑(aeval x.coeff) ((fun n => ↑(bind₁ (uncurry ![X, X])) (φ n)) n)
intros
case mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n : ℕ
⊢ coeff (f x✝ x✝) n = ↑(aeval x✝.coeff) ((fun n => ↑(bind₁ (uncurry ![X, X])) (φ n)) n)
case mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
⊢ (f x✝ x✝).coeff = fun n => ↑(aeval x✝.coeff) ((fun n => ↑(bind₁ (uncurry ![X, X])) (φ n)) n)
funext n
case mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n : ℕ
⊢ ↑(aeval fun a => Matrix.vecCons x✝.coeff ![x✝.coeff] a.fst a.snd) (φ n) =
    ↑(aeval fun i => ↑(aeval x✝.coeff) (Matrix.vecCons X ![X] i.fst i.snd)) (φ n)
case mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n : ℕ
⊢ coeff (f x✝ x✝) n = ↑(aeval x✝.coeff) ((fun n => ↑(bind₁ (uncurry ![X, X])) (φ n)) n)
simp only [hf, peval, uncurry, aeval_bind₁]
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n : ℕ
⊢ (fun a => Matrix.vecCons x✝.coeff ![x✝.coeff] a.fst a.snd) = fun i =>
    ↑(aeval x✝.coeff) (Matrix.vecCons X ![X] i.fst i.snd)
case mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n : ℕ
⊢ ↑(aeval fun a => Matrix.vecCons x✝.coeff ![x✝.coeff] a.fst a.snd) (φ n) =
    ↑(aeval fun i => ↑(aeval x✝.coeff) (Matrix.vecCons X ![X] i.fst i.snd)) (φ n)
apply eval₂Hom_congr rfl _ rfl
case h.mk
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n : ℕ
i : Fin 2
k : ℕ
⊢ Matrix.vecCons x✝.coeff ![x✝.coeff] (i, k).fst (i, k).snd =
    ↑(aeval x✝.coeff) (Matrix.vecCons X ![X] (i, k).fst (i, k).snd)
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n : ℕ
⊢ (fun a => Matrix.vecCons x✝.coeff ![x✝.coeff] a.fst a.snd) = fun i =>
    ↑(aeval x✝.coeff) (Matrix.vecCons X ![X] i.fst i.snd)
ext ⟨i, k⟩
no goals
case h.mk
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n : ℕ
i : Fin 2
k : ℕ
⊢ Matrix.vecCons x✝.coeff ![x✝.coeff] (i, k).fst (i, k).snd =
    ↑(aeval x✝.coeff) (Matrix.vecCons X ![X] (i, k).fst (i, k).snd)
fin_cases i <;> simp only [Matrix.head_cons, aeval_X, Matrix.cons_val_zero, Matrix.cons_val_one]
  <;>
  open Matrix in
  simp only [Fin.mk_zero, Fin.mk_one, cons_val', empty_val', cons_val_fin_one, cons_val_zero,
    aeval_X, head_fin_const, cons_val_one]
no goals
case h.mk.tail.head
p : ℕ
R S : Type u
σ : Type ?u.613386
idx : Type ?u.613389
inst✝² : CommRing R
inst✝¹ : CommRing S
f : ⦃R : Type u_1⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u_1⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
R✝ : Type u_1
inst✝ : CommRing R✝
x✝ : 𝕎 R✝
n k : ℕ
⊢ Matrix.vecCons x✝.coeff ![x✝.coeff] { val := 1, isLt := (_ : (fun a => a < 2) 1) } k =
    ↑(aeval x✝.coeff) (Matrix.vecCons X ![X] { val := 1, isLt := (_ : (fun a => a < 2) 1) } k)
simp only [Fin.mk_zero, Fin.mk_one, cons_val', empty_val', cons_val_fin_one, cons_val_zero,
  aeval_X, head_fin_const, cons_val_one]