awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (goal)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ HSub.hSub (α := MvPolynomial (idx × ℕ) ℚ) (β := MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ fun (i : idx) ↦ (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
            (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
          Φ :
        MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ fun (k : ℕ) ↦
            (bind₁ fun (i : idx) ↦ (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ k) :
                (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
              Φ :
          (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
        (∑ i ∈ Finset.range n,
          HMul.hMul (α := MvPolynomial ℕ ℚ)
            ((C : (a : ℚ) → MvPolynomial ℕ ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial ℕ ℚ)
            (HPow.hPow (α := MvPolynomial ℕ ℚ) (xInTermsOfW p ℚ i) (p ^ (n - i))))) =
    HSub.hSub (α := MvPolynomial (idx × ℕ) ℚ) (β := MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ fun (b : idx) ↦
              (rename fun (i : ℕ) ↦ (b, i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
            (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
          Φ :
        MvPolynomial (idx × ℕ) ℚ)
      (∑ i ∈ Finset.range n,
          HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
            ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial (idx × ℕ) ℚ)
            (wittStructureRat p Φ i ^ p ^ (n - i)) :
        MvPolynomial (idx × ℕ) ℚ)
have rw : Eq.{u_2 + 1} (α := MvPolynomial (idx × ℕ) ℚ)
  ((bind₁ fun (k : ℕ) ↦
        (bind₁ fun (i : idx) ↦ (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ k) :
            (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
          Φ :
      (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
    (∑ i ∈ Finset.range n,
      HMul.hMul (α := MvPolynomial ℕ ℚ)
        ((C : (a : ℚ) → MvPolynomial ℕ ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial ℕ ℚ)
        (HPow.hPow (α := MvPolynomial ℕ ℚ) (xInTermsOfW p ℚ i) (p ^ (n - i)))))
  (∑ i ∈ Finset.range n,
    HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
      ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial (idx × ℕ) ℚ)
      (wittStructureRat p Φ i ^ p ^ (n - i)))
Tactic: rw [sub_right_inj]
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (goal)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ Eq.{u_2 + 1} (α := MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ fun (k : ℕ) ↦
          (bind₁ fun (i : idx) ↦ (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ k) :
              (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
            Φ :
        (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
      (∑ i ∈ Finset.range n,
        HMul.hMul (α := MvPolynomial ℕ ℚ)
          ((C : (a : ℚ) → MvPolynomial ℕ ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial ℕ ℚ)
          (HPow.hPow (α := MvPolynomial ℕ ℚ) (xInTermsOfW p ℚ i) (p ^ (n - i)))))
    (∑ i ∈ Finset.range n,
      HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
        ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial (idx × ℕ) ℚ)
        (wittStructureRat p Φ i ^ p ^ (n - i)))
have simp : Eq.{u_2 + 1} (α := MvPolynomial (idx × ℕ) ℚ)
  (∑ x ∈ Finset.range n,
    HPow.hPow (α := MvPolynomial (idx × ℕ) ℚ) ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (↑p : ℚ)) x *
      HPow.hPow (α := MvPolynomial (idx × ℕ) ℚ)
        ((bind₁ fun (k : ℕ) ↦
                (bind₁ fun (i : idx) ↦
                      (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ k) :
                    (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
                  Φ :
              (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
            (xInTermsOfW p ℚ x) :
          MvPolynomial (idx × ℕ) ℚ)
        (p ^ (n - x)))
  (∑ x ∈ Finset.range n,
    HPow.hPow (α := MvPolynomial (idx × ℕ) ℚ) ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (↑p : ℚ)) x *
      wittStructureRat p Φ x ^ p ^ (n - x))
Tactic: simp only [map_sum, map_mul, bind₁_C_right, map_pow]
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (goal)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
      ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (1 / HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ)
      (HMul.hMul (β := MvPolynomial (idx × ℕ) ℚ) (wittStructureRat p Φ n)
        ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ)) =
    HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
      ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (1 / HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ)
      (HSub.hSub (α := MvPolynomial (idx × ℕ) ℚ) (β := MvPolynomial (idx × ℕ) ℚ)
        ((bind₁ fun (b : idx) ↦
                (rename fun (i : ℕ) ↦ (b, i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
              (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
            Φ :
          MvPolynomial (idx × ℕ) ℚ)
        (∑ i ∈ Finset.range n,
            HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
              ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial (idx × ℕ) ℚ)
              (wittStructureRat p Φ i ^ p ^ (n - i)) :
          MvPolynomial (idx × ℕ) ℚ))
have rw : HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
    ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (1 / HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ)
    (HSub.hSub (α := MvPolynomial (idx × ℕ) ℚ) (β := MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ fun (b : idx) ↦
              (rename fun (i : ℕ) ↦ (b, i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
            (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
          Φ :
        MvPolynomial (idx × ℕ) ℚ)
      (∑ i ∈ Finset.range n,
          HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
            ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial (idx × ℕ) ℚ)
            (wittStructureRat p Φ i ^ p ^ (n - i)) :
        MvPolynomial (idx × ℕ) ℚ)) =
  HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
    ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (1 / HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ)
    (HSub.hSub (α := MvPolynomial (idx × ℕ) ℚ) (β := MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ fun (b : idx) ↦
              (rename fun (i : ℕ) ↦ (b, i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
            (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
          Φ :
        MvPolynomial (idx × ℕ) ℚ)
      (∑ i ∈ Finset.range n,
          HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
            ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial (idx × ℕ) ℚ)
            (wittStructureRat p Φ i ^ p ^ (n - i)) :
        MvPolynomial (idx × ℕ) ℚ))
Tactic: rw [wittStructureRat_rec_aux]
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (goal)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ wittStructureRat p Φ n =
    HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
      ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (1 / HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ)
      (HSub.hSub (α := MvPolynomial (idx × ℕ) ℚ) (β := MvPolynomial (idx × ℕ) ℚ)
        ((bind₁ fun (b : idx) ↦
                (rename fun (i : ℕ) ↦ (b, i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
              (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
            Φ :
          MvPolynomial (idx × ℕ) ℚ)
        (∑ i ∈ Finset.range n,
            HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
              ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) i) : MvPolynomial (idx × ℕ) ℚ)
              (wittStructureRat p Φ i ^ p ^ (n - i)) :
          MvPolynomial (idx × ℕ) ℚ))
have wittStructureRat : wittStructureRat p Φ n =
  HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
    ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (1 / HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ)
    (HMul.hMul (β := MvPolynomial (idx × ℕ) ℚ) (wittStructureRat p Φ n)
      ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ))
Tactic: calc
    wittStructureRat p Φ n = C (1 / (p : ℚ) ^ n) * (wittStructureRat p Φ n * C ((p : ℚ) ^ n)) := ?_
    _ = _ := by rw [wittStructureRat_rec_aux]
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (goal)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℚ
n : ℕ
⊢ wittStructureRat p Φ n =
    HMul.hMul (α := MvPolynomial (idx × ℕ) ℚ)
      ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (1 / HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ)
      (HMul.hMul (β := MvPolynomial (idx × ℕ) ℚ) (wittStructureRat p Φ n)
        ((C : (a : ℚ) → MvPolynomial (idx × ℕ) ℚ) (HPow.hPow (α := ℚ) (↑p : ℚ) n) : MvPolynomial (idx × ℕ) ℚ))
have h : HPow.hPow (α := ℚ) (↑p : ℚ) n ≠ 0
Tactic: rw [mul_left_comm, ← C_mul, div_mul_cancel₀, C_1, mul_one]
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (goal)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ m < n + 1,
    Eq (α := MvPolynomial (idx × ℕ) ℚ)
      ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ) (wittStructureInt p Φ m) :
        MvPolynomial (idx × ℕ) ℚ)
      (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ) m :
        MvPolynomial (idx × ℕ) ℚ)
⊢ Eq (α := MvPolynomial (idx × ℕ) ℤ)
    ((bind₁ fun (b : idx) ↦
            (rename fun (i : ℕ) ↦ (b, i) : (a : MvPolynomial ℕ ℤ) → MvPolynomial (idx × ℕ) ℤ)
              ((expand p : (a : MvPolynomial ℕ ℤ) → MvPolynomial ℕ ℤ) (W_ ℤ n)) :
          (a : MvPolynomial idx ℤ) → MvPolynomial (idx × ℕ) ℤ)
        Φ :
      MvPolynomial (idx × ℕ) ℤ)
    ((bind₁ fun (i : ℕ) ↦
            (expand p : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℤ) (wittStructureInt p Φ i) :
          (a : MvPolynomial ℕ ℤ) → MvPolynomial (idx × ℕ) ℤ)
        (W_ ℤ n) :
      MvPolynomial (idx × ℕ) ℤ)
have a : Eq (α := MvPolynomial (idx × ℕ) ℚ)
  ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ fun (b : idx) ↦
              (rename fun (i : ℕ) ↦ (b, i) : (a : MvPolynomial ℕ ℤ) → MvPolynomial (idx × ℕ) ℤ)
                ((expand p : (a : MvPolynomial ℕ ℤ) → MvPolynomial ℕ ℤ) (W_ ℤ n)) :
            (a : MvPolynomial idx ℤ) → MvPolynomial (idx × ℕ) ℤ)
          Φ :
        MvPolynomial (idx × ℕ) ℤ) :
    MvPolynomial (idx × ℕ) ℚ)
  ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ fun (i : ℕ) ↦
              (expand p : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℤ) (wittStructureInt p Φ i) :
            (a : MvPolynomial ℕ ℤ) → MvPolynomial (idx × ℕ) ℤ)
          (W_ ℤ n) :
        MvPolynomial (idx × ℕ) ℤ) :
    MvPolynomial (idx × ℕ) ℚ)
Tactic: apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (goal)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ m < n + 1,
    Eq (α := MvPolynomial (idx × ℕ) ℚ)
      ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ) (wittStructureInt p Φ m) :
        MvPolynomial (idx × ℕ) ℚ)
      (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ) m :
        MvPolynomial (idx × ℕ) ℚ)
⊢ Eq (α := MvPolynomial (idx × ℕ) ℚ)
    ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ)
        ((bind₁ fun (b : idx) ↦
                (rename fun (i : ℕ) ↦ (b, i) : (a : MvPolynomial ℕ ℤ) → MvPolynomial (idx × ℕ) ℤ)
                  ((expand p : (a : MvPolynomial ℕ ℤ) → MvPolynomial ℕ ℤ) (W_ ℤ n)) :
              (a : MvPolynomial idx ℤ) → MvPolynomial (idx × ℕ) ℤ)
            Φ :
          MvPolynomial (idx × ℕ) ℤ) :
      MvPolynomial (idx × ℕ) ℚ)
    ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ)
        ((bind₁ fun (i : ℕ) ↦
                (expand p : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℤ) (wittStructureInt p Φ i) :
              (a : MvPolynomial ℕ ℤ) → MvPolynomial (idx × ℕ) ℤ)
            (W_ ℤ n) :
          MvPolynomial (idx × ℕ) ℤ) :
      MvPolynomial (idx × ℕ) ℚ)
have a : Eq (α := MvPolynomial (idx × ℕ) ℚ)
  ((bind₁ fun (i : idx) ↦
          (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
            ((rename fun (i_1 : ℕ) ↦ (i, i_1) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
              MvPolynomial (idx × ℕ) ℚ) :
        (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
      ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
    MvPolynomial (idx × ℕ) ℚ)
  ((bind₁ fun (i : ℕ) ↦
          (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
            ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ)
                (wittStructureInt p Φ i) :
              MvPolynomial (idx × ℕ) ℚ) :
        (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
      (W_ ℚ n) :
    MvPolynomial (idx × ℕ) ℚ)
Tactic: simp only [map_bind₁, map_rename, map_expand, rename_expand, map_wittPolynomial]
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (hypothesis)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ m < n + 1,
    Eq (α := MvPolynomial (idx × ℕ) ℚ)
      ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ) (wittStructureInt p Φ m) :
        MvPolynomial (idx × ℕ) ℚ)
      (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ) m :
        MvPolynomial (idx × ℕ) ℚ)
⊢ Eq (α := MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ fun (i : idx) ↦
            (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
              ((rename fun (i_1 : ℕ) ↦ (i, i_1) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
                MvPolynomial (idx × ℕ) ℚ) :
          (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
        ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
      MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ fun (i : ℕ) ↦
            (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
              ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ)
                  (wittStructureInt p Φ i) :
                MvPolynomial (idx × ℕ) ℚ) :
          (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
        (W_ ℚ n) :
      MvPolynomial (idx × ℕ) ℚ)
have key : Eq (α := MvPolynomial (idx × ℕ) ℚ)
  ((bind₁ fun (i : idx) ↦ (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
        (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
      ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
    MvPolynomial (idx × ℕ) ℚ)
  ((bind₁ (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ)) :
        (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
      (W_ ℚ n) :
    MvPolynomial (idx × ℕ) ℚ)
Tactic: have key := (wittStructureRat_prop p (map (Int.castRingHom ℚ) Φ) n).symm
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (hypothesis)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ m < n + 1,
    Eq (α := MvPolynomial (idx × ℕ) ℚ)
      ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ) (wittStructureInt p Φ m) :
        MvPolynomial (idx × ℕ) ℚ)
      (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ) m :
        MvPolynomial (idx × ℕ) ℚ)
key :
  Eq (α := MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ fun (i : idx) ↦ (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
          (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
        ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
      MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ)) :
          (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
        (W_ ℚ n) :
      MvPolynomial (idx × ℕ) ℚ)
⊢ Eq (α := MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ fun (i : idx) ↦
            (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
              ((rename fun (i_1 : ℕ) ↦ (i, i_1) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
                MvPolynomial (idx × ℕ) ℚ) :
          (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
        ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
      MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ fun (i : ℕ) ↦
            (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
              ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ)
                  (wittStructureInt p Φ i) :
                MvPolynomial (idx × ℕ) ℚ) :
          (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
        (W_ ℚ n) :
      MvPolynomial (idx × ℕ) ℚ)
have key₁ : Eq (α := MvPolynomial (idx × ℕ) ℚ)
  ((expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ fun (i : idx) ↦ (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
            (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
          ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
        MvPolynomial (idx × ℕ) ℚ) :
    MvPolynomial (idx × ℕ) ℚ)
  ((expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
      ((bind₁ (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ)) :
            (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
          (W_ ℚ n) :
        MvPolynomial (idx × ℕ) ℚ) :
    MvPolynomial (idx × ℕ) ℚ)
Tactic: apply_fun expand p at key
Cleared hypotheses: key
-- Lean 4 proof step from Mathlib.RingTheory.WittVector.StructurePolynomial (hypothesis)
Goal:
p : ℕ
idx : Type u_2
hp : Fact (Nat.Prime p)
Φ : MvPolynomial idx ℤ
n : ℕ
IH :
  ∀ m < n + 1,
    Eq (α := MvPolynomial (idx × ℕ) ℚ)
      ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ) (wittStructureInt p Φ m) :
        MvPolynomial (idx × ℕ) ℚ)
      (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ) m :
        MvPolynomial (idx × ℕ) ℚ)
key :
  Eq (α := MvPolynomial (idx × ℕ) ℚ)
    ((expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
        ((bind₁ fun (i : idx) ↦ (rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
              (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
            ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
          MvPolynomial (idx × ℕ) ℚ) :
      MvPolynomial (idx × ℕ) ℚ)
    ((expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
        ((bind₁ (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ)) :
              (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
            (W_ ℚ n) :
          MvPolynomial (idx × ℕ) ℚ) :
      MvPolynomial (idx × ℕ) ℚ)
⊢ Eq (α := MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ fun (i : idx) ↦
            (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
              ((rename fun (i_1 : ℕ) ↦ (i, i_1) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
                MvPolynomial (idx × ℕ) ℚ) :
          (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
        ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
      MvPolynomial (idx × ℕ) ℚ)
    ((bind₁ fun (i : ℕ) ↦
            (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
              ((map (Int.castRingHom ℚ) : (a : MvPolynomial (idx × ℕ) ℤ) → MvPolynomial (idx × ℕ) ℚ)
                  (wittStructureInt p Φ i) :
                MvPolynomial (idx × ℕ) ℚ) :
          (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
        (W_ ℚ n) :
      MvPolynomial (idx × ℕ) ℚ)
have key₁ : Eq (α := MvPolynomial (idx × ℕ) ℚ)
  ((bind₁ fun (i : idx) ↦
          (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
            ((rename (Prod.mk i) : (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ) (W_ ℚ n) :
              MvPolynomial (idx × ℕ) ℚ) :
        (a : MvPolynomial idx ℚ) → MvPolynomial (idx × ℕ) ℚ)
      ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ : MvPolynomial idx ℚ) :
    MvPolynomial (idx × ℕ) ℚ)
  ((bind₁ fun (i : ℕ) ↦
          (expand p : (a : MvPolynomial (idx × ℕ) ℚ) → MvPolynomial (idx × ℕ) ℚ)
            (wittStructureRat p ((map (Int.castRingHom ℚ) : (a : MvPolynomial idx ℤ) → MvPolynomial idx ℚ) Φ) i) :
        (a : MvPolynomial ℕ ℚ) → MvPolynomial (idx × ℕ) ℚ)
      (W_ ℚ n) :
    MvPolynomial (idx × ℕ) ℚ)
Tactic: simp only [expand_bind₁] at key
Cleared hypotheses: key