theorem cardPowDegree_apply [DecidableEq Fq] (p : Fq[X]) :
    cardPowDegree p = if p = 0 then 0 else (Fintype.card Fq : ℤ) ^ natDegree p := by
  rw [cardPowDegree]
  

Proof state:
Fq : Type u_1
inst✝² : Field Fq
inst✝¹ : Fintype Fq
inst✝ : DecidableEq Fq
p : Fq[X]
⊢ (let_fun card_pos := (_ : 0 < Fintype.card Fq);
      let_fun pow_pos := (_ : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n);
      {
        toMulHom :=
          { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,
            map_mul' :=
              (_ :
                ∀ (p q : Fq[X]),
                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =
                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *
                      (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) },
        nonneg' :=
          (_ :
            ∀ (p : Fq[X]),
              0 ≤
                MulHom.toFun
                  { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,
                    map_mul' :=
                      (_ :
                        ∀ (p q : Fq[X]),
                          (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =
                            (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *
                              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }
                  p),
        eq_zero' := (_ : ∀ (p : Fq[X]), (if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) = 0 ↔ p = 0),
        add_le' :=
          (_ :
            ∀ (p q : Fq[X]),
              MulHom.toFun
                  { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,
                    map_mul' :=
                      (_ :
                        ∀ (p q : Fq[X]),
                          (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =
                            (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *
                              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }
                  (p + q) ≤
                MulHom.toFun
                    { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,
                      map_mul' :=
                        (_ :
                          ∀ (p q : Fq[X]),
                            (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =
                              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *
                                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }
                    p +
                  MulHom.toFun
                    { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,
                      map_mul' :=
                        (_ :
                          ∀ (p q : Fq[X]),
                            (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =
                              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *
                                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }
                    q) })
      p =
    if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p

Next tactic:
dsimp