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

tactic: funext k
state_before: p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
⊢ φ = wittStructureInt p Φ

tactic: apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective
state_before: case h
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
k : ℕ
⊢ φ k = wittStructureInt p Φ k

tactic: rw [map_wittStructureInt]
state_before: case h.a
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
k : ℕ
⊢ ↑(map (Int.castRingHom ℚ)) (φ k) = ↑(map (Int.castRingHom ℚ)) (wittStructureInt p Φ k)

tactic: revert k
state_before: case h.a
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
k : ℕ
⊢ ↑(map (Int.castRingHom ℚ)) (φ k) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) k

tactic: refine' congr_fun _
state_before: case h.a
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
⊢ ∀ (k : ℕ), ↑(map (Int.castRingHom ℚ)) (φ k) = wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) k

tactic: apply ExistsUnique.unique (wittStructureRat_existsUnique p (map (Int.castRingHom ℚ) Φ))
state_before: case h.a
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
⊢ (fun k => ↑(map (Int.castRingHom ℚ)) (φ k)) = fun k => wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) k

tactic: intro n
state_before: case h.a.py₁
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
⊢ ∀ (n : ℕ),
    ↑(bind₁ fun k => ↑(map (Int.castRingHom ℚ)) (φ k)) (W_ ℚ n) =
      ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ)

tactic: specialize h n
state_before: case h.a.py₁
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
n : ℕ
⊢ ↑(bind₁ fun k => ↑(map (Int.castRingHom ℚ)) (φ k)) (W_ ℚ n) =
    ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ)

tactic: apply_fun map (Int.castRingHom ℚ)  at h
state_before: case h.a.py₁
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
n : ℕ
h : ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
⊢ ↑(bind₁ fun k => ↑(map (Int.castRingHom ℚ)) (φ k)) (W_ ℚ n) =
    ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ)

tactic: simpa only [map_bind₁, ← eval₂Hom_map_hom, eval₂Hom_C_left, map_rename, map_wittPolynomial,
  AlgHom.coe_toRingHom] using h
state_before: case h.a.py₁
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
n : ℕ
h :
  ↑(map (Int.castRingHom ℚ)) (↑(bind₁ φ) (W_ ℤ n)) =
    ↑(map (Int.castRingHom ℚ)) (↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ)
⊢ ↑(bind₁ fun k => ↑(map (Int.castRingHom ℚ)) (φ k)) (W_ ℚ n) =
    ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ)

tactic: intro n
state_before: case h.a.py₂
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
⊢ ∀ (n : ℕ),
    ↑(bind₁ fun k => wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) k) (W_ ℚ n) =
      ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ)

tactic: apply wittStructureRat_prop
state_before: case h.a.py₂
p : ℕ
R : Type ?u.1579762
idx : Type u_1
inst✝ : CommRing R
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
φ : ℕ → MvPolynomial (idx × ℕ) ℤ
h : ∀ (n : ℕ), ↑(bind₁ φ) (W_ ℤ n) = ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℤ n)) Φ
n : ℕ
⊢ ↑(bind₁ fun k => wittStructureRat p (↑(map (Int.castRingHom ℚ)) Φ) k) (W_ ℚ n) =
    ↑(bind₁ fun i => ↑(rename (Prod.mk i)) (W_ ℚ n)) (↑(map (Int.castRingHom ℚ)) Φ)