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
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
induction n using Nat.strong_induction_on with | h n IH => ?_
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)
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
rw [wittStructureInt, map_mapRange_eq_iff, Int.coe_castRingHom]
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)
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)
intro c
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
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)
rw [wittStructureRat_rec, coeff_C_mul, mul_comm, mul_div_assoc', mul_one]
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
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
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
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
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
simp only [← sum_induction_steps, ← map_wittPolynomial p (Int.castRingHom ℚ), ← map_rename, ←
  map_bind₁, ← RingHom.map_sub, coeff_map]
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)
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
rw [show (p : ℚ) ^ n = ((↑(p ^ n) : ℤ) : ℚ) by norm_cast]
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
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)
rw [← Rat.den_eq_one_iff, eq_intCast, Rat.den_div_cast_eq_one_iff]
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

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
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
swap
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))
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))
revert c
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)
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))
rw [← C_dvd_iff_dvd_coeff]
no goals
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)
exact C_p_pow_dvd_bind₁_rename_wittPolynomial_sub_sum Φ n IH
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)
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)
rw [map_sum]
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)
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)
apply Finset.sum_congr rfl
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)
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)
intro i hi
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)
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)
rw [Finset.mem_range] at hi
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)
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)
simp only [IH i hi, RingHom.map_mul, RingHom.map_pow, map_C]
no goals
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)
rfl
no goals
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)
norm_cast
no goals
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
exact_mod_cast pow_ne_zero n hp.1.ne_zero