Theorem: map_wittStructureInt
File: Mathlib/RingTheory/WittVector/StructurePolynomial.lean

tactic: induction n using Nat.strong_induction_on with | h n IH => ?_
state_before: p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
⊢ ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ n) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) n

tactic: rw [wittStructureInt, map_mapRange_eq_iff, Int.coe_castRingHom]
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
⊢ ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ n) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) n

tactic: intro c
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
⊢ ∀ (d : idx × ℕ →₀ ℕ),
    (fun x => ↑x) (coeff d (wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) n)).num =
      coeff d (wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) n)

tactic: rw [wittStructureRat_rec, coeff_C_mul, mul_comm, mul_div_assoc', mul_one]
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
⊢ (fun x => ↑x) (coeff c (wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) n)).num =
    coeff c (wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) n)

tactic: have sum_induction_steps :
    map (Int.castRingHom ℚ)
      (∑ i in range n, C ((p : ℤ) ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in range n,
      C ((p : ℚ) ^ i) * wittStructureRat p (map (Int.castRingHom ℚ) Φ) i ^ p ^ (n - i) := by
  rw [map_sum]
  apply Finset.sum_congr rfl
  intro i hi
  rw [Finset.mem_range] at hi
  simp only [IH i hi, RingHom.map_mul, RingHom.map_pow, map_C]
  rfl
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
⊢ (fun x => ↑x)
      (coeff c
            (↑(bind₁ fun b => ↑(rename fun i => (b, i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ) -
              ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)) /
          ↑p ^ n).num =
    coeff c
        (↑(bind₁ fun b => ↑(rename fun i => (b, i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ) -
          ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)) /
      ↑p ^ n

tactic: simp only [← sum_induction_steps, ← map_wittPolynomial p (Int.castRingHom ℚ), ← map_rename, ←
  map_bind₁, ← RingHom.map_sub, coeff_map]
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ (fun x => ↑x)
      (coeff c
            (↑(bind₁ fun b => ↑(rename fun i => (b, i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ) -
              ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)) /
          ↑p ^ n).num =
    coeff c
        (↑(bind₁ fun b => ↑(rename fun i => (b, i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ) -
          ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)) /
      ↑p ^ n

tactic: rw [show (p : ℚ) ^ n = ((↑(p ^ n) : ℤ) : ℚ) by norm_cast]
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ↑(↑(Int.castRingHom ℚ)
            (coeff c
              (↑(bind₁ fun i => ↑(rename fun i_1 => (i, i_1)) (W_ ℤ n)) Φ -
                ∑ x in Finset.range n, ↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x))) /
          ↑p ^ n).num =
    ↑(Int.castRingHom ℚ)
        (coeff c
          (↑(bind₁ fun i => ↑(rename fun i_1 => (i, i_1)) (W_ ℤ n)) Φ -
            ∑ x in Finset.range n, ↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x))) /
      ↑p ^ n

tactic: rw [← Rat.den_eq_one_iff, eq_intCast, Rat.den_div_cast_eq_one_iff]
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ↑(↑(Int.castRingHom ℚ)
            (coeff c
              (↑(bind₁ fun i => ↑(rename fun i_1 => (i, i_1)) (W_ ℤ n)) Φ -
                ∑ x in Finset.range n, ↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x))) /
          ↑↑(p ^ n)).num =
    ↑(Int.castRingHom ℚ)
        (coeff c
          (↑(bind₁ fun i => ↑(rename fun i_1 => (i, i_1)) (W_ ℤ n)) Φ -
            ∑ x in Finset.range n, ↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x))) /
      ↑↑(p ^ n)

tactic: swap
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ↑(p ^ n) ∣
    coeff c
      (↑(bind₁ fun i => ↑(rename fun i_1 => (i, i_1)) (W_ ℤ n)) Φ -
        ∑ x in Finset.range n, ↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x))

case h.hn
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ↑(p ^ n) ≠ 0

tactic: revert c
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ↑(p ^ n) ∣
    coeff c
      (↑(bind₁ fun i => ↑(rename fun i_1 => (i, i_1)) (W_ ℤ n)) Φ -
        ∑ x in Finset.range n, ↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x))

tactic: rw [← C_dvd_iff_dvd_coeff]
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ∀ (c : idx × ℕ →₀ ℕ),
    ↑(p ^ n) ∣
      coeff c
        (↑(bind₁ fun i => ↑(rename fun i_1 => (i, i_1)) (W_ ℤ n)) Φ -
          ∑ x in Finset.range n, ↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x))

tactic: exact C_p_pow_dvd_bind₁_rename_wittPolynomial_sub_sum Φ n IH
state_before: case h
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ↑C ↑(p ^ n) ∣
    ↑(bind₁ fun i => ↑(rename fun i_1 => (i, i_1)) (W_ ℤ n)) Φ -
      ∑ x in Finset.range n, ↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x)

tactic: rw [map_sum]
state_before: p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
⊢ ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)

tactic: apply Finset.sum_congr rfl
state_before: p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
⊢ ∑ x in Finset.range n, ↑(map (Int.castRingHom ℚ)) (↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)

tactic: intro i hi
state_before: p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
⊢ ∀ (x : ℕ),
    x ∈ Finset.range n →
      ↑(map (Int.castRingHom ℚ)) (↑C (↑p ^ x) * wittStructureInt p Φ x ^ p ^ (n - x)) =
        ↑C (↑p ^ x) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) x ^ p ^ (n - x)

tactic: rw [Finset.mem_range] at hi
state_before: p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
i : ℕ
hi : i ∈ Finset.range n
⊢ ↑(map (Int.castRingHom ℚ)) (↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)

tactic: simp only [IH i hi, RingHom.map_mul, RingHom.map_pow, map_C]
state_before: p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
i : ℕ
hi : i < n
⊢ ↑(map (Int.castRingHom ℚ)) (↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)

tactic: rfl
state_before: p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
i : ℕ
hi : i < n
⊢ ↑C (↑(Int.castRingHom ℚ) ↑p) ^ i * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i) =
    ↑C ↑p ^ i * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)

tactic: norm_cast
state_before: p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ↑p ^ n = ↑↑(p ^ n)

tactic: exact_mod_cast pow_ne_zero n hp.1.ne_zero
state_before: case h.hn
p : ℕ
R : Type ?u.1206800
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ (m : ℕ),
    m < n → ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) m
c : idx × ℕ →₀ ℕ
sum_induction_steps :
  ↑(map (Int.castRingHom ℚ)) (∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureInt p Φ i ^ p ^ (n - i)) =
    ∑ i in Finset.range n, ↑C (↑p ^ i) * wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) i ^ p ^ (n - i)
⊢ ↑(p ^ n) ≠ 0