Theorem: WittVector.IsPoly₂.ext
File: Mathlib/RingTheory/WittVector/IsPoly.lean

tactic: obtain ⟨φ, hf⟩ := hf
state_before: p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
hf : IsPoly₂ p f
hg : IsPoly₂ p g
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
⊢ ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R), f x y = g x y

tactic: obtain ⟨ψ, hg⟩ := hg
state_before: case mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
hg : IsPoly₂ p g
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
⊢ ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R), f x y = g x y

tactic: intros
state_before: case mk'.intro.mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
⊢ ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R), f x y = g x y

tactic: ext n
state_before: case mk'.intro.mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
⊢ f x✝ y✝ = g x✝ y✝

tactic: rw [hf, hg, poly_eq_of_wittPolynomial_bind_eq' p φ ψ]
state_before: case mk'.intro.mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n : ℕ
⊢ coeff (f x✝ y✝) n = coeff (g x✝ y✝) n

tactic: intro k
state_before: case mk'.intro.mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n : ℕ
⊢ ∀ (n : ℕ), ↑(bind₁ φ) (wittPolynomial p ℤ n) = ↑(bind₁ ψ) (wittPolynomial p ℤ n)

tactic: apply MvPolynomial.funext
state_before: case mk'.intro.mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
⊢ ↑(bind₁ φ) (wittPolynomial p ℤ k) = ↑(bind₁ ψ) (wittPolynomial p ℤ k)

tactic: intro x
state_before: case mk'.intro.mk'.intro.h.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
⊢ ∀ (x : Fin 2 × ℕ → ℤ),
    ↑(MvPolynomial.eval x) (↑(bind₁ φ) (wittPolynomial p ℤ k)) =
      ↑(MvPolynomial.eval x) (↑(bind₁ ψ) (wittPolynomial p ℤ k))

tactic: simp only [hom_bind₁]
state_before: case mk'.intro.mk'.intro.h.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
⊢ ↑(MvPolynomial.eval x) (↑(bind₁ φ) (wittPolynomial p ℤ k)) =
    ↑(MvPolynomial.eval x) (↑(bind₁ ψ) (wittPolynomial p ℤ k))

tactic: specialize h (ULift ℤ) (mk p fun i => ⟨x (0, i)⟩) (mk p fun i => ⟨x (1, i)⟩) k
state_before: case mk'.intro.mk'.intro.h.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ), ↑(ghostComponent n) (f x y) = ↑(ghostComponent n) (g x y)
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
⊢ ↑(eval₂Hom (RingHom.comp (MvPolynomial.eval x) C) fun i => ↑(MvPolynomial.eval x) (φ i)) (wittPolynomial p ℤ k) =
    ↑(eval₂Hom (RingHom.comp (MvPolynomial.eval x) C) fun i => ↑(MvPolynomial.eval x) (ψ i)) (wittPolynomial p ℤ k)

tactic: simp only [ghostComponent_apply, aeval_eq_eval₂Hom] at h
state_before: case mk'.intro.mk'.intro.h.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(ghostComponent k) (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })) =
    ↑(ghostComponent k) (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) }))
⊢ ↑(eval₂Hom (RingHom.comp (MvPolynomial.eval x) C) fun i => ↑(MvPolynomial.eval x) (φ i)) (wittPolynomial p ℤ k) =
    ↑(eval₂Hom (RingHom.comp (MvPolynomial.eval x) C) fun i => ↑(MvPolynomial.eval x) (ψ i)) (wittPolynomial p ℤ k)

tactic: apply (ULift.ringEquiv.symm : ℤ ≃+* _).injective
state_before: case mk'.intro.mk'.intro.h.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
⊢ ↑(eval₂Hom (RingHom.comp (MvPolynomial.eval x) C) fun i => ↑(MvPolynomial.eval x) (φ i)) (wittPolynomial p ℤ k) =
    ↑(eval₂Hom (RingHom.comp (MvPolynomial.eval x) C) fun i => ↑(MvPolynomial.eval x) (ψ i)) (wittPolynomial p ℤ k)

tactic: simp only [← RingEquiv.coe_toRingHom, map_eval₂Hom]
state_before: case mk'.intro.mk'.intro.h.h.a
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
⊢ ↑(RingEquiv.symm ULift.ringEquiv)
      (↑(eval₂Hom (RingHom.comp (MvPolynomial.eval x) C) fun i => ↑(MvPolynomial.eval x) (φ i))
        (wittPolynomial p ℤ k)) =
    ↑(RingEquiv.symm ULift.ringEquiv)
      (↑(eval₂Hom (RingHom.comp (MvPolynomial.eval x) C) fun i => ↑(MvPolynomial.eval x) (ψ i)) (wittPolynomial p ℤ k))

tactic: convert h using 1
state_before: case mk'.intro.mk'.intro.h.h.a
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
⊢ ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.comp (MvPolynomial.eval x) C)) fun i =>
          ↑↑(RingEquiv.symm ULift.ringEquiv) (↑(MvPolynomial.eval x) (φ i)))
      (wittPolynomial p ℤ k) =
    ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.comp (MvPolynomial.eval x) C)) fun i =>
          ↑↑(RingEquiv.symm ULift.ringEquiv) (↑(MvPolynomial.eval x) (ψ i)))
      (wittPolynomial p ℤ k)

tactic: all_goals
  simp only [hf, hg, MvPolynomial.eval, map_eval₂Hom]
  apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl
  ext1
  apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl
  ext ⟨b, _⟩
  fin_cases b <;> simp only [coeff_mk, uncurry] <;> rfl
state_before: case h.e'_2
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
⊢ ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.comp (MvPolynomial.eval x) C)) fun i =>
          ↑↑(RingEquiv.symm ULift.ringEquiv) (↑(MvPolynomial.eval x) (φ i)))
      (wittPolynomial p ℤ k) =
    ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)

case h.e'_3
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
⊢ ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.comp (MvPolynomial.eval x) C)) fun i =>
          ↑↑(RingEquiv.symm ULift.ringEquiv) (↑(MvPolynomial.eval x) (ψ i)))
      (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)

tactic: simp only [hf, hg, MvPolynomial.eval, map_eval₂Hom]
state_before: case h.e'_3
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
⊢ ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.comp (MvPolynomial.eval x) C)) fun i =>
          ↑↑(RingEquiv.symm ULift.ringEquiv) (↑(MvPolynomial.eval x) (ψ i)))
      (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)

tactic: apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl
state_before: case h.e'_3
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
⊢ ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.comp (eval₂Hom (RingHom.id ℤ) x) C)) fun i =>
          ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.id ℤ)) fun i =>
                ↑↑(RingEquiv.symm ULift.ringEquiv) (x i))
            (ψ i))
      (wittPolynomial p ℤ k) =
    ↑(aeval fun n =>
          peval (ψ n) ![(mk p fun i => { down := x (0, i) }).coeff, (mk p fun i => { down := x (1, i) }).coeff])
      (wittPolynomial p ℤ k)

tactic: ext1
state_before: p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
⊢ (fun i =>
      ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.id ℤ)) fun i =>
            ↑↑(RingEquiv.symm ULift.ringEquiv) (x i))
        (ψ i)) =
    fun n => peval (ψ n) ![(mk p fun i => { down := x (0, i) }).coeff, (mk p fun i => { down := x (1, i) }).coeff]

tactic: apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl
state_before: case h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝¹ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
x✝ : ℕ
⊢ ↑(eval₂Hom (RingHom.comp (↑(RingEquiv.symm ULift.ringEquiv)) (RingHom.id ℤ)) fun i =>
          ↑↑(RingEquiv.symm ULift.ringEquiv) (x i))
      (ψ x✝) =
    peval (ψ x✝) ![(mk p fun i => { down := x (0, i) }).coeff, (mk p fun i => { down := x (1, i) }).coeff]

tactic: ext ⟨b, _⟩
state_before: p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝¹ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
x✝ : ℕ
⊢ (fun i => ↑↑(RingEquiv.symm ULift.ringEquiv) (x i)) =
    uncurry ![(mk p fun i => { down := x (0, i) }).coeff, (mk p fun i => { down := x (1, i) }).coeff]

tactic: fin_cases b <;> simp only [coeff_mk, uncurry] <;> rfl
state_before: case h.mk.h
p : ℕ
R S : Type u
σ : Type ?u.744260
idx : Type ?u.744263
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f g : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R → 𝕎 R
φ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (f x y).coeff = fun n => peval (φ n) ![x.coeff, y.coeff]
ψ : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ
hg : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x y : 𝕎 R), (g x y).coeff = fun n => peval (ψ n) ![x.coeff, y.coeff]
R✝ : Type u
_Rcr✝ : CommRing R✝
x✝¹ y✝ : 𝕎 R✝
n k : ℕ
x : Fin 2 × ℕ → ℤ
h :
  ↑(aeval (f (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k) =
    ↑(aeval (g (mk p fun i => { down := x (0, i) }) (mk p fun i => { down := x (1, i) })).coeff) (wittPolynomial p ℤ k)
x✝ : ℕ
b : Fin 2
snd✝ : ℕ
⊢ (↑↑(RingEquiv.symm ULift.ringEquiv) (x (b, snd✝))).down =
    (uncurry ![(mk p fun i => { down := x (0, i) }).coeff, (mk p fun i => { down := x (1, i) }).coeff] (b, snd✝)).down