Theorem: wittPolynomial_vars
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: have : ∀ i, (monomial (Finsupp.single i (p ^ (n - i))) ((p : R) ^ i)).vars = {i} := by
  intro i
  refine' vars_monomial_single i (pow_ne_zero _ hp.1) _
  rw [← Nat.cast_pow, Nat.cast_ne_zero]
  exact pow_ne_zero i hp.1
state_before: p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n : ℕ
⊢ vars (W_ R n) = range (n + 1)

tactic: rw [wittPolynomial, vars_sum_of_disjoint]
state_before: p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n : ℕ
this : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}
⊢ vars (W_ R n) = range (n + 1)

tactic: intro i
state_before: p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n : ℕ
⊢ ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}

tactic: refine' vars_monomial_single i (pow_ne_zero _ hp.1) _
state_before: p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n i : ℕ
⊢ vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}

tactic: rw [← Nat.cast_pow, Nat.cast_ne_zero]
state_before: p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n i : ℕ
⊢ ↑p ^ i ≠ 0

tactic: exact pow_ne_zero i hp.1
state_before: p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n i : ℕ
⊢ p ^ i ≠ 0

tactic: simp only [this, biUnion_singleton_eq_self]
state_before: p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n : ℕ
this : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}
⊢ (Finset.biUnion (range (n + 1)) fun i => vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i))) = range (n + 1)

tactic: simp only [this]
state_before: case h
p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n : ℕ
this : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}
⊢ Pairwise (Disjoint on fun i => vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)))

tactic: intro a b h
state_before: case h
p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n : ℕ
this : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}
⊢ Pairwise (Disjoint on fun i => {i})

tactic: apply disjoint_singleton_left.mpr
state_before: case h
p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n : ℕ
this : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}
a b : ℕ
h : a ≠ b
⊢ (Disjoint on fun i => {i}) a b

tactic: rwa [mem_singleton]
state_before: case h
p : ℕ
R : Type u_1
inst✝³ : CommRing R
inst✝² : DecidableEq R
S : Type ?u.157043
inst✝¹ : CommRing S
hp : NeZero p
inst✝ : CharZero R
n : ℕ
this : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}
a b : ℕ
h : a ≠ b
⊢ ¬a ∈ (fun i => {i}) b