Theorem: MvPolynomial.funext_fin
File: Mathlib/Data/MvPolynomial/Funext.lean

tactic: induction' n with n ih
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n : ℕ
p : MvPolynomial (Fin n) R
h : ∀ (x : Fin n → R), ↑(eval x) p = 0
⊢ p = 0

tactic: apply (MvPolynomial.isEmptyRingEquiv R (Fin 0)).injective
state_before: case zero
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n : ℕ
p✝ : MvPolynomial (Fin n) R
h✝ : ∀ (x : Fin n → R), ↑(eval x) p✝ = 0
p : MvPolynomial (Fin Nat.zero) R
h : ∀ (x : Fin Nat.zero → R), ↑(eval x) p = 0
⊢ p = 0

tactic: rw [RingEquiv.map_zero]
state_before: case zero.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n : ℕ
p✝ : MvPolynomial (Fin n) R
h✝ : ∀ (x : Fin n → R), ↑(eval x) p✝ = 0
p : MvPolynomial (Fin Nat.zero) R
h : ∀ (x : Fin Nat.zero → R), ↑(eval x) p = 0
⊢ ↑(isEmptyRingEquiv R (Fin 0)) p = ↑(isEmptyRingEquiv R (Fin 0)) 0

tactic: convert h finZeroElim
state_before: case zero.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n : ℕ
p✝ : MvPolynomial (Fin n) R
h✝ : ∀ (x : Fin n → R), ↑(eval x) p✝ = 0
p : MvPolynomial (Fin Nat.zero) R
h : ∀ (x : Fin Nat.zero → R), ↑(eval x) p = 0
⊢ ↑(isEmptyRingEquiv R (Fin 0)) p = 0

tactic: apply (finSuccEquiv R n).injective
state_before: case succ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n✝ : ℕ
p✝ : MvPolynomial (Fin n✝) R
h✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0
n : ℕ
ih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0
p : MvPolynomial (Fin (Nat.succ n)) R
h : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0
⊢ p = 0

tactic: simp only [AlgEquiv.map_zero]
state_before: case succ.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n✝ : ℕ
p✝ : MvPolynomial (Fin n✝) R
h✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0
n : ℕ
ih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0
p : MvPolynomial (Fin (Nat.succ n)) R
h : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0
⊢ ↑(finSuccEquiv R n) p = ↑(finSuccEquiv R n) 0

tactic: refine Polynomial.funext fun q => ?_
state_before: case succ.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n✝ : ℕ
p✝ : MvPolynomial (Fin n✝) R
h✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0
n : ℕ
ih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0
p : MvPolynomial (Fin (Nat.succ n)) R
h : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0
⊢ ↑(finSuccEquiv R n) p = 0

tactic: rw [Polynomial.eval_zero]
state_before: case succ.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n✝ : ℕ
p✝ : MvPolynomial (Fin n✝) R
h✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0
n : ℕ
ih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0
p : MvPolynomial (Fin (Nat.succ n)) R
h : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0
q : MvPolynomial (Fin n) R
⊢ Polynomial.eval q (↑(finSuccEquiv R n) p) = Polynomial.eval q 0

tactic: apply ih fun x => ?_
state_before: case succ.a
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n✝ : ℕ
p✝ : MvPolynomial (Fin n✝) R
h✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0
n : ℕ
ih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0
p : MvPolynomial (Fin (Nat.succ n)) R
h : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0
q : MvPolynomial (Fin n) R
⊢ Polynomial.eval q (↑(finSuccEquiv R n) p) = 0

tactic: calc _ = _ := eval_polynomial_eval_finSuccEquiv p _
     _ = 0 := h _
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : Infinite R
n✝ : ℕ
p✝ : MvPolynomial (Fin n✝) R
h✝ : ∀ (x : Fin n✝ → R), ↑(eval x) p✝ = 0
n : ℕ
ih : ∀ {p : MvPolynomial (Fin n) R}, (∀ (x : Fin n → R), ↑(eval x) p = 0) → p = 0
p : MvPolynomial (Fin (Nat.succ n)) R
h : ∀ (x : Fin (Nat.succ n) → R), ↑(eval x) p = 0
q : MvPolynomial (Fin n) R
x : Fin n → R
⊢ ↑(eval x) (Polynomial.eval q (↑(finSuccEquiv R n) p)) = 0