ring_theory.polynomial.pochhammerMathlib.RingTheory.Polynomial.Pochhammer

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -122,7 +122,7 @@ theorem ascPochhammer_succ_right (n : ℕ) : ascPochhammer S (n + 1) = ascPochha
   suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + n)
   · apply_fun Polynomial.map (algebraMap ℕ S) at h
     simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
-      Polynomial.map_nat_cast] using h
+      Polynomial.map_natCast] using h
   induction' n with n ih
   · simp
   ·
@@ -155,11 +155,11 @@ theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
 #align pochhammer_succ_comp_X_add_one ascPochhammer_succ_comp_X_add_one
 -/
 
-#print Polynomial.mul_X_add_nat_cast_comp /-
-theorem Polynomial.mul_X_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
+#print Polynomial.mul_X_add_natCast_comp /-
+theorem Polynomial.mul_X_add_natCast_comp {p q : S[X]} {n : ℕ} :
     (p * (X + n)).comp q = p.comp q * (q + n) := by
   rw [mul_add, add_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_add]
-#align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_X_add_nat_cast_comp
+#align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_X_add_natCast_comp
 -/
 
 #print ascPochhammer_mul /-
@@ -169,7 +169,7 @@ theorem ascPochhammer_mul (n m : ℕ) :
   induction' m with m ih
   · simp
   ·
-    rw [ascPochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
+    rw [ascPochhammer_succ_right, Polynomial.mul_X_add_natCast_comp, ← mul_assoc, ih,
       Nat.succ_eq_add_one, ← add_assoc, ascPochhammer_succ_right, Nat.cast_add, add_assoc]
 #align pochhammer_mul ascPochhammer_mul
 -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
 import Tactic.Abel
-import Data.Polynomial.Eval
+import Algebra.Polynomial.Eval
 
 #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"69c6a5a12d8a2b159f20933e60115a4f2de62b58"
 
Diff
@@ -120,7 +120,7 @@ theorem ascPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (ascPochhammer
 theorem ascPochhammer_succ_right (n : ℕ) : ascPochhammer S (n + 1) = ascPochhammer S n * (X + n) :=
   by
   suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + n)
-  · apply_fun Polynomial.map (algebraMap ℕ S) at h 
+  · apply_fun Polynomial.map (algebraMap ℕ S) at h
     simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
       Polynomial.map_nat_cast] using h
   induction' n with n ih
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
-import Mathbin.Tactic.Abel
-import Mathbin.Data.Polynomial.Eval
+import Tactic.Abel
+import Data.Polynomial.Eval
 
 #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"69c6a5a12d8a2b159f20933e60115a4f2de62b58"
 
Diff
@@ -41,118 +41,118 @@ section Semiring
 
 variable (S : Type u) [Semiring S]
 
-#print pochhammer /-
+#print ascPochhammer /-
 /-- `pochhammer S n` is the polynomial `X * (X+1) * ... * (X + n - 1)`,
 with coefficients in the semiring `S`.
 -/
-noncomputable def pochhammer : ℕ → S[X]
+noncomputable def ascPochhammer : ℕ → S[X]
   | 0 => 1
-  | n + 1 => X * (pochhammer n).comp (X + 1)
-#align pochhammer pochhammer
+  | n + 1 => X * (ascPochhammer n).comp (X + 1)
+#align pochhammer ascPochhammer
 -/
 
-#print pochhammer_zero /-
+#print ascPochhammer_zero /-
 @[simp]
-theorem pochhammer_zero : pochhammer S 0 = 1 :=
+theorem ascPochhammer_zero : ascPochhammer S 0 = 1 :=
   rfl
-#align pochhammer_zero pochhammer_zero
+#align pochhammer_zero ascPochhammer_zero
 -/
 
-#print pochhammer_one /-
+#print ascPochhammer_one /-
 @[simp]
-theorem pochhammer_one : pochhammer S 1 = X := by simp [pochhammer]
-#align pochhammer_one pochhammer_one
+theorem ascPochhammer_one : ascPochhammer S 1 = X := by simp [ascPochhammer]
+#align pochhammer_one ascPochhammer_one
 -/
 
-#print pochhammer_succ_left /-
-theorem pochhammer_succ_left (n : ℕ) : pochhammer S (n + 1) = X * (pochhammer S n).comp (X + 1) :=
-  by rw [pochhammer]
-#align pochhammer_succ_left pochhammer_succ_left
+#print ascPochhammer_succ_left /-
+theorem ascPochhammer_succ_left (n : ℕ) :
+    ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1) := by rw [ascPochhammer]
+#align pochhammer_succ_left ascPochhammer_succ_left
 -/
 
 section
 
 variable {S} {T : Type v} [Semiring T]
 
-#print pochhammer_map /-
+#print ascPochhammer_map /-
 @[simp]
-theorem pochhammer_map (f : S →+* T) (n : ℕ) : (pochhammer S n).map f = pochhammer T n :=
+theorem ascPochhammer_map (f : S →+* T) (n : ℕ) : (ascPochhammer S n).map f = ascPochhammer T n :=
   by
   induction' n with n ih
   · simp
-  · simp [ih, pochhammer_succ_left, map_comp]
-#align pochhammer_map pochhammer_map
+  · simp [ih, ascPochhammer_succ_left, map_comp]
+#align pochhammer_map ascPochhammer_map
 -/
 
 end
 
-#print pochhammer_eval_cast /-
+#print ascPochhammer_eval_cast /-
 @[simp, norm_cast]
-theorem pochhammer_eval_cast (n k : ℕ) : ((pochhammer ℕ n).eval k : S) = (pochhammer S n).eval k :=
-  by
-  rw [← pochhammer_map (algebraMap ℕ S), eval_map, ← eq_natCast (algebraMap ℕ S), eval₂_at_nat_cast,
-    Nat.cast_id, eq_natCast]
-#align pochhammer_eval_cast pochhammer_eval_cast
+theorem ascPochhammer_eval_cast (n k : ℕ) :
+    ((ascPochhammer ℕ n).eval k : S) = (ascPochhammer S n).eval k := by
+  rw [← ascPochhammer_map (algebraMap ℕ S), eval_map, ← eq_natCast (algebraMap ℕ S),
+    eval₂_at_nat_cast, Nat.cast_id, eq_natCast]
+#align pochhammer_eval_cast ascPochhammer_eval_cast
 -/
 
-#print pochhammer_eval_zero /-
-theorem pochhammer_eval_zero {n : ℕ} : (pochhammer S n).eval 0 = if n = 0 then 1 else 0 :=
+#print ascPochhammer_eval_zero /-
+theorem ascPochhammer_eval_zero {n : ℕ} : (ascPochhammer S n).eval 0 = if n = 0 then 1 else 0 :=
   by
   cases n
   · simp
-  · simp [X_mul, Nat.succ_ne_zero, pochhammer_succ_left]
-#align pochhammer_eval_zero pochhammer_eval_zero
+  · simp [X_mul, Nat.succ_ne_zero, ascPochhammer_succ_left]
+#align pochhammer_eval_zero ascPochhammer_eval_zero
 -/
 
-#print pochhammer_zero_eval_zero /-
-theorem pochhammer_zero_eval_zero : (pochhammer S 0).eval 0 = 1 := by simp
-#align pochhammer_zero_eval_zero pochhammer_zero_eval_zero
+#print ascPochhammer_zero_eval_zero /-
+theorem ascPochhammer_zero_eval_zero : (ascPochhammer S 0).eval 0 = 1 := by simp
+#align pochhammer_zero_eval_zero ascPochhammer_zero_eval_zero
 -/
 
-#print pochhammer_ne_zero_eval_zero /-
+#print ascPochhammer_ne_zero_eval_zero /-
 @[simp]
-theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).eval 0 = 0 := by
-  simp [pochhammer_eval_zero, h]
-#align pochhammer_ne_zero_eval_zero pochhammer_ne_zero_eval_zero
+theorem ascPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (ascPochhammer S n).eval 0 = 0 := by
+  simp [ascPochhammer_eval_zero, h]
+#align pochhammer_ne_zero_eval_zero ascPochhammer_ne_zero_eval_zero
 -/
 
-#print pochhammer_succ_right /-
-theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n * (X + n) :=
+#print ascPochhammer_succ_right /-
+theorem ascPochhammer_succ_right (n : ℕ) : ascPochhammer S (n + 1) = ascPochhammer S n * (X + n) :=
   by
-  suffices h : pochhammer ℕ (n + 1) = pochhammer ℕ n * (X + n)
+  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + n)
   · apply_fun Polynomial.map (algebraMap ℕ S) at h 
-    simpa only [pochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
+    simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
       Polynomial.map_nat_cast] using h
   induction' n with n ih
   · simp
   ·
     conv_lhs =>
-      rw [pochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← pochhammer_succ_left, add_comp, X_comp,
-        nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
-#align pochhammer_succ_right pochhammer_succ_right
+      rw [ascPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← ascPochhammer_succ_left, add_comp,
+        X_comp, nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
+#align pochhammer_succ_right ascPochhammer_succ_right
 -/
 
-#print pochhammer_succ_eval /-
-theorem pochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
-    (pochhammer S (n + 1)).eval k = (pochhammer S n).eval k * (k + n) := by
-  rw [pochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
+#print ascPochhammer_succ_eval /-
+theorem ascPochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
+    (ascPochhammer S (n + 1)).eval k = (ascPochhammer S n).eval k * (k + n) := by
+  rw [ascPochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
     eval_C_mul, Nat.cast_comm, ← mul_add]
-#align pochhammer_succ_eval pochhammer_succ_eval
+#align pochhammer_succ_eval ascPochhammer_succ_eval
 -/
 
-#print pochhammer_succ_comp_X_add_one /-
-theorem pochhammer_succ_comp_X_add_one (n : ℕ) :
-    (pochhammer S (n + 1)).comp (X + 1) =
-      pochhammer S (n + 1) + (n + 1) • (pochhammer S n).comp (X + 1) :=
+#print ascPochhammer_succ_comp_X_add_one /-
+theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
+    (ascPochhammer S (n + 1)).comp (X + 1) =
+      ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1) :=
   by
   suffices
-    (pochhammer ℕ (n + 1)).comp (X + 1) =
-      pochhammer ℕ (n + 1) + (n + 1) * (pochhammer ℕ n).comp (X + 1)
+    (ascPochhammer ℕ (n + 1)).comp (X + 1) =
+      ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
     by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
-  nth_rw 2 [pochhammer_succ_left]
-  rw [← add_mul, pochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
+  nth_rw 2 [ascPochhammer_succ_left]
+  rw [← add_mul, ascPochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
     add_comm ↑n, ← add_assoc]
-#align pochhammer_succ_comp_X_add_one pochhammer_succ_comp_X_add_one
+#align pochhammer_succ_comp_X_add_one ascPochhammer_succ_comp_X_add_one
 -/
 
 #print Polynomial.mul_X_add_nat_cast_comp /-
@@ -162,44 +162,45 @@ theorem Polynomial.mul_X_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
 #align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_X_add_nat_cast_comp
 -/
 
-#print pochhammer_mul /-
-theorem pochhammer_mul (n m : ℕ) :
-    pochhammer S n * (pochhammer S m).comp (X + n) = pochhammer S (n + m) :=
+#print ascPochhammer_mul /-
+theorem ascPochhammer_mul (n m : ℕ) :
+    ascPochhammer S n * (ascPochhammer S m).comp (X + n) = ascPochhammer S (n + m) :=
   by
   induction' m with m ih
   · simp
   ·
-    rw [pochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
-      Nat.succ_eq_add_one, ← add_assoc, pochhammer_succ_right, Nat.cast_add, add_assoc]
-#align pochhammer_mul pochhammer_mul
+    rw [ascPochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
+      Nat.succ_eq_add_one, ← add_assoc, ascPochhammer_succ_right, Nat.cast_add, add_assoc]
+#align pochhammer_mul ascPochhammer_mul
 -/
 
-#print pochhammer_nat_eq_ascFactorial /-
-theorem pochhammer_nat_eq_ascFactorial (n : ℕ) :
-    ∀ k, (pochhammer ℕ k).eval (n + 1) = n.ascFactorial k
+#print ascPochhammer_nat_eq_ascFactorial /-
+theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
+    ∀ k, (ascPochhammer ℕ k).eval (n + 1) = n.ascFactorial k
   | 0 => by erw [eval_one] <;> rfl
-  | t + 1 => by
-    rw [pochhammer_succ_right, eval_mul, pochhammer_nat_eq_ascFactorial t]
+  | t + 1 =>
+    by
+    rw [ascPochhammer_succ_right, eval_mul, ascPochhammer_nat_eq_ascFactorial t]
     suffices n.asc_factorial t * (n + 1 + t) = n.asc_factorial (t + 1) by simpa
     rw [Nat.ascFactorial_succ, add_right_comm, mul_comm]
-#align pochhammer_nat_eq_asc_factorial pochhammer_nat_eq_ascFactorial
+#align pochhammer_nat_eq_asc_factorial ascPochhammer_nat_eq_ascFactorial
 -/
 
-#print pochhammer_nat_eq_descFactorial /-
-theorem pochhammer_nat_eq_descFactorial (a b : ℕ) :
-    (pochhammer ℕ b).eval a = (a + b - 1).descFactorial b :=
+#print ascPochhammer_nat_eq_descFactorial /-
+theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
+    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b :=
   by
   cases b
-  · rw [Nat.descFactorial_zero, pochhammer_zero, Polynomial.eval_one]
+  · rw [Nat.descFactorial_zero, ascPochhammer_zero, Polynomial.eval_one]
   rw [Nat.add_succ, Nat.succ_sub_succ, tsub_zero]
   cases a
   ·
-    rw [pochhammer_ne_zero_eval_zero _ b.succ_ne_zero, zero_add,
+    rw [ascPochhammer_ne_zero_eval_zero _ b.succ_ne_zero, zero_add,
       Nat.descFactorial_of_lt b.lt_succ_self]
   ·
     rw [Nat.succ_add, ← Nat.add_succ, Nat.add_descFactorial_eq_ascFactorial,
-      pochhammer_nat_eq_ascFactorial]
-#align pochhammer_nat_eq_desc_factorial pochhammer_nat_eq_descFactorial
+      ascPochhammer_nat_eq_ascFactorial]
+#align pochhammer_nat_eq_desc_factorial ascPochhammer_nat_eq_descFactorial
 -/
 
 end Semiring
@@ -208,15 +209,15 @@ section StrictOrderedSemiring
 
 variable {S : Type _} [StrictOrderedSemiring S]
 
-#print pochhammer_pos /-
-theorem pochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (pochhammer S n).eval s :=
+#print ascPochhammer_pos /-
+theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s :=
   by
   induction' n with n ih
-  · simp only [Nat.zero_eq, pochhammer_zero, eval_one]; exact zero_lt_one
-  · rw [pochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
+  · simp only [Nat.zero_eq, ascPochhammer_zero, eval_one]; exact zero_lt_one
+  · rw [ascPochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
       Nat.cast_comm, ← mul_add]
     exact mul_pos ih (lt_of_lt_of_le h ((le_add_iff_nonneg_right _).mpr (Nat.cast_nonneg n)))
-#align pochhammer_pos pochhammer_pos
+#align pochhammer_pos ascPochhammer_pos
 -/
 
 end StrictOrderedSemiring
@@ -227,37 +228,37 @@ open scoped Nat
 
 variable (S : Type _) [Semiring S] (r n : ℕ)
 
-#print pochhammer_eval_one /-
+#print ascPochhammer_eval_one /-
 @[simp]
-theorem pochhammer_eval_one (S : Type _) [Semiring S] (n : ℕ) :
-    (pochhammer S n).eval (1 : S) = (n ! : S) := by
-  rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.zero_ascFactorial]
-#align pochhammer_eval_one pochhammer_eval_one
+theorem ascPochhammer_eval_one (S : Type _) [Semiring S] (n : ℕ) :
+    (ascPochhammer S n).eval (1 : S) = (n ! : S) := by
+  rw_mod_cast [ascPochhammer_nat_eq_ascFactorial, Nat.zero_ascFactorial]
+#align pochhammer_eval_one ascPochhammer_eval_one
 -/
 
-#print factorial_mul_pochhammer /-
-theorem factorial_mul_pochhammer (S : Type _) [Semiring S] (r n : ℕ) :
-    (r ! : S) * (pochhammer S n).eval (r + 1) = (r + n)! := by
-  rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
-#align factorial_mul_pochhammer factorial_mul_pochhammer
+#print factorial_mul_ascPochhammer /-
+theorem factorial_mul_ascPochhammer (S : Type _) [Semiring S] (r n : ℕ) :
+    (r ! : S) * (ascPochhammer S n).eval (r + 1) = (r + n)! := by
+  rw_mod_cast [ascPochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
+#align factorial_mul_pochhammer factorial_mul_ascPochhammer
 -/
 
-#print pochhammer_nat_eval_succ /-
-theorem pochhammer_nat_eval_succ (r : ℕ) :
-    ∀ n : ℕ, n * (pochhammer ℕ r).eval (n + 1) = (n + r) * (pochhammer ℕ r).eval n
+#print ascPochhammer_nat_eval_succ /-
+theorem ascPochhammer_nat_eval_succ (r : ℕ) :
+    ∀ n : ℕ, n * (ascPochhammer ℕ r).eval (n + 1) = (n + r) * (ascPochhammer ℕ r).eval n
   | 0 => by
     by_cases h : r = 0
     · simp only [h, MulZeroClass.zero_mul, zero_add]
-    · simp only [pochhammer_eval_zero, MulZeroClass.zero_mul, if_neg h, MulZeroClass.mul_zero]
-  | k + 1 => by simp only [pochhammer_nat_eq_ascFactorial, Nat.succ_ascFactorial, add_right_comm]
-#align pochhammer_nat_eval_succ pochhammer_nat_eval_succ
+    · simp only [ascPochhammer_eval_zero, MulZeroClass.zero_mul, if_neg h, MulZeroClass.mul_zero]
+  | k + 1 => by simp only [ascPochhammer_nat_eq_ascFactorial, Nat.succ_ascFactorial, add_right_comm]
+#align pochhammer_nat_eval_succ ascPochhammer_nat_eval_succ
 -/
 
-#print pochhammer_eval_succ /-
-theorem pochhammer_eval_succ (r n : ℕ) :
-    (n : S) * (pochhammer S r).eval (n + 1 : S) = (n + r) * (pochhammer S r).eval n := by
-  exact_mod_cast congr_arg Nat.cast (pochhammer_nat_eval_succ r n)
-#align pochhammer_eval_succ pochhammer_eval_succ
+#print ascPochhammer_eval_succ /-
+theorem ascPochhammer_eval_succ (r n : ℕ) :
+    (n : S) * (ascPochhammer S r).eval (n + 1 : S) = (n + r) * (ascPochhammer S r).eval n := by
+  exact_mod_cast congr_arg Nat.cast (ascPochhammer_nat_eval_succ r n)
+#align pochhammer_eval_succ ascPochhammer_eval_succ
 -/
 
 end Factorial
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module ring_theory.polynomial.pochhammer
-! leanprover-community/mathlib commit 69c6a5a12d8a2b159f20933e60115a4f2de62b58
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Tactic.Abel
 import Mathbin.Data.Polynomial.Eval
 
+#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"69c6a5a12d8a2b159f20933e60115a4f2de62b58"
+
 /-!
 # The Pochhammer polynomials
 
Diff
@@ -98,20 +98,26 @@ theorem pochhammer_eval_cast (n k : ℕ) : ((pochhammer ℕ n).eval k : S) = (po
 #align pochhammer_eval_cast pochhammer_eval_cast
 -/
 
+#print pochhammer_eval_zero /-
 theorem pochhammer_eval_zero {n : ℕ} : (pochhammer S n).eval 0 = if n = 0 then 1 else 0 :=
   by
   cases n
   · simp
   · simp [X_mul, Nat.succ_ne_zero, pochhammer_succ_left]
 #align pochhammer_eval_zero pochhammer_eval_zero
+-/
 
+#print pochhammer_zero_eval_zero /-
 theorem pochhammer_zero_eval_zero : (pochhammer S 0).eval 0 = 1 := by simp
 #align pochhammer_zero_eval_zero pochhammer_zero_eval_zero
+-/
 
+#print pochhammer_ne_zero_eval_zero /-
 @[simp]
 theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).eval 0 = 0 := by
   simp [pochhammer_eval_zero, h]
 #align pochhammer_ne_zero_eval_zero pochhammer_ne_zero_eval_zero
+-/
 
 #print pochhammer_succ_right /-
 theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n * (X + n) :=
@@ -129,11 +135,13 @@ theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n
 #align pochhammer_succ_right pochhammer_succ_right
 -/
 
+#print pochhammer_succ_eval /-
 theorem pochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
     (pochhammer S (n + 1)).eval k = (pochhammer S n).eval k * (k + n) := by
   rw [pochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
     eval_C_mul, Nat.cast_comm, ← mul_add]
 #align pochhammer_succ_eval pochhammer_succ_eval
+-/
 
 #print pochhammer_succ_comp_X_add_one /-
 theorem pochhammer_succ_comp_X_add_one (n : ℕ) :
@@ -203,6 +211,7 @@ section StrictOrderedSemiring
 
 variable {S : Type _} [StrictOrderedSemiring S]
 
+#print pochhammer_pos /-
 theorem pochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (pochhammer S n).eval s :=
   by
   induction' n with n ih
@@ -211,6 +220,7 @@ theorem pochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (pochhammer S n).eval
       Nat.cast_comm, ← mul_add]
     exact mul_pos ih (lt_of_lt_of_le h ((le_add_iff_nonneg_right _).mpr (Nat.cast_nonneg n)))
 #align pochhammer_pos pochhammer_pos
+-/
 
 end StrictOrderedSemiring
 
@@ -228,10 +238,12 @@ theorem pochhammer_eval_one (S : Type _) [Semiring S] (n : ℕ) :
 #align pochhammer_eval_one pochhammer_eval_one
 -/
 
+#print factorial_mul_pochhammer /-
 theorem factorial_mul_pochhammer (S : Type _) [Semiring S] (r n : ℕ) :
     (r ! : S) * (pochhammer S n).eval (r + 1) = (r + n)! := by
   rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
 #align factorial_mul_pochhammer factorial_mul_pochhammer
+-/
 
 #print pochhammer_nat_eval_succ /-
 theorem pochhammer_nat_eval_succ (r : ℕ) :
@@ -244,10 +256,12 @@ theorem pochhammer_nat_eval_succ (r : ℕ) :
 #align pochhammer_nat_eval_succ pochhammer_nat_eval_succ
 -/
 
+#print pochhammer_eval_succ /-
 theorem pochhammer_eval_succ (r n : ℕ) :
     (n : S) * (pochhammer S r).eval (n + 1 : S) = (n + r) * (pochhammer S r).eval n := by
   exact_mod_cast congr_arg Nat.cast (pochhammer_nat_eval_succ r n)
 #align pochhammer_eval_succ pochhammer_eval_succ
+-/
 
 end Factorial
 
Diff
@@ -117,7 +117,7 @@ theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).
 theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n * (X + n) :=
   by
   suffices h : pochhammer ℕ (n + 1) = pochhammer ℕ n * (X + n)
-  · apply_fun Polynomial.map (algebraMap ℕ S)  at h 
+  · apply_fun Polynomial.map (algebraMap ℕ S) at h 
     simpa only [pochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
       Polynomial.map_nat_cast] using h
   induction' n with n ih
Diff
@@ -117,7 +117,7 @@ theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).
 theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n * (X + n) :=
   by
   suffices h : pochhammer ℕ (n + 1) = pochhammer ℕ n * (X + n)
-  · apply_fun Polynomial.map (algebraMap ℕ S)  at h
+  · apply_fun Polynomial.map (algebraMap ℕ S)  at h 
     simpa only [pochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
       Polynomial.map_nat_cast] using h
   induction' n with n ih
Diff
@@ -38,7 +38,7 @@ universe u v
 
 open Polynomial
 
-open Polynomial
+open scoped Polynomial
 
 section Semiring
 
@@ -216,7 +216,7 @@ end StrictOrderedSemiring
 
 section Factorial
 
-open Nat
+open scoped Nat
 
 variable (S : Type _) [Semiring S] (r n : ℕ)
 
Diff
@@ -98,12 +98,6 @@ theorem pochhammer_eval_cast (n k : ℕ) : ((pochhammer ℕ n).eval k : S) = (po
 #align pochhammer_eval_cast pochhammer_eval_cast
 -/
 
-/- warning: pochhammer_eval_zero -> pochhammer_eval_zero is a dubious translation:
-lean 3 declaration is
-  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] {n : Nat}, Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) (pochhammer.{u1} S _inst_1 n)) (ite.{succ u1} S (Eq.{1} Nat n (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (Nat.decidableEq n (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (OfNat.ofNat.{u1} S 1 (OfNat.mk.{u1} S 1 (One.one.{u1} S (AddMonoidWithOne.toOne.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))))
-but is expected to have type
-  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] {n : Nat}, Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))) (pochhammer.{u1} S _inst_1 n)) (ite.{succ u1} S (Eq.{1} Nat n (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (instDecidableEqNat n (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (OfNat.ofNat.{u1} S 1 (One.toOfNat1.{u1} S (Semiring.toOne.{u1} S _inst_1))) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))))
-Case conversion may be inaccurate. Consider using '#align pochhammer_eval_zero pochhammer_eval_zeroₓ'. -/
 theorem pochhammer_eval_zero {n : ℕ} : (pochhammer S n).eval 0 = if n = 0 then 1 else 0 :=
   by
   cases n
@@ -111,21 +105,9 @@ theorem pochhammer_eval_zero {n : ℕ} : (pochhammer S n).eval 0 = if n = 0 then
   · simp [X_mul, Nat.succ_ne_zero, pochhammer_succ_left]
 #align pochhammer_eval_zero pochhammer_eval_zero
 
-/- warning: pochhammer_zero_eval_zero -> pochhammer_zero_eval_zero is a dubious translation:
-lean 3 declaration is
-  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S], Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) (pochhammer.{u1} S _inst_1 (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))))) (OfNat.ofNat.{u1} S 1 (OfNat.mk.{u1} S 1 (One.one.{u1} S (AddMonoidWithOne.toOne.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1)))))))
-but is expected to have type
-  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S], Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))) (pochhammer.{u1} S _inst_1 (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))) (OfNat.ofNat.{u1} S 1 (One.toOfNat1.{u1} S (Semiring.toOne.{u1} S _inst_1)))
-Case conversion may be inaccurate. Consider using '#align pochhammer_zero_eval_zero pochhammer_zero_eval_zeroₓ'. -/
 theorem pochhammer_zero_eval_zero : (pochhammer S 0).eval 0 = 1 := by simp
 #align pochhammer_zero_eval_zero pochhammer_zero_eval_zero
 
-/- warning: pochhammer_ne_zero_eval_zero -> pochhammer_ne_zero_eval_zero is a dubious translation:
-lean 3 declaration is
-  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] {n : Nat}, (Ne.{1} Nat n (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) -> (Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) (pochhammer.{u1} S _inst_1 n)) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))))
-but is expected to have type
-  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] {n : Nat}, (Ne.{1} Nat n (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) -> (Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))) (pochhammer.{u1} S _inst_1 n)) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))))
-Case conversion may be inaccurate. Consider using '#align pochhammer_ne_zero_eval_zero pochhammer_ne_zero_eval_zeroₓ'. -/
 @[simp]
 theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).eval 0 = 0 := by
   simp [pochhammer_eval_zero, h]
@@ -147,12 +129,6 @@ theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n
 #align pochhammer_succ_right pochhammer_succ_right
 -/
 
-/- warning: pochhammer_succ_eval -> pochhammer_succ_eval is a dubious translation:
-lean 3 declaration is
-  forall {S : Type.{u1}} [_inst_2 : Semiring.{u1} S] (n : Nat) (k : S), Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_2 k (pochhammer.{u1} S _inst_2 (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) (Polynomial.eval.{u1} S _inst_2 k (pochhammer.{u1} S _inst_2 n)) (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toHasAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) k ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))))) n)))
-but is expected to have type
-  forall {S : Type.{u1}} [_inst_2 : Semiring.{u1} S] (n : Nat) (k : S), Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_2 k (pochhammer.{u1} S _inst_2 (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))) (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)))) (Polynomial.eval.{u1} S _inst_2 k (pochhammer.{u1} S _inst_2 n)) (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) k (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_2) n)))
-Case conversion may be inaccurate. Consider using '#align pochhammer_succ_eval pochhammer_succ_evalₓ'. -/
 theorem pochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
     (pochhammer S (n + 1)).eval k = (pochhammer S n).eval k * (k + n) := by
   rw [pochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
@@ -227,12 +203,6 @@ section StrictOrderedSemiring
 
 variable {S : Type _} [StrictOrderedSemiring S]
 
-/- warning: pochhammer_pos -> pochhammer_pos is a dubious translation:
-lean 3 declaration is
-  forall {S : Type.{u1}} [_inst_1 : StrictOrderedSemiring.{u1} S] (n : Nat) (s : S), (LT.lt.{u1} S (Preorder.toHasLt.{u1} S (PartialOrder.toPreorder.{u1} S (OrderedCancelAddCommMonoid.toPartialOrder.{u1} S (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} S _inst_1)))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1)))))))) s) -> (LT.lt.{u1} S (Preorder.toHasLt.{u1} S (PartialOrder.toPreorder.{u1} S (OrderedCancelAddCommMonoid.toPartialOrder.{u1} S (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} S _inst_1)))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1)))))))) (Polynomial.eval.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) s (pochhammer.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) n)))
-but is expected to have type
-  forall {S : Type.{u1}} [_inst_1 : StrictOrderedSemiring.{u1} S] (n : Nat) (s : S), (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (StrictOrderedSemiring.toPartialOrder.{u1} S _inst_1))) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1))))) s) -> (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (StrictOrderedSemiring.toPartialOrder.{u1} S _inst_1))) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1))))) (Polynomial.eval.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) s (pochhammer.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) n)))
-Case conversion may be inaccurate. Consider using '#align pochhammer_pos pochhammer_posₓ'. -/
 theorem pochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (pochhammer S n).eval s :=
   by
   induction' n with n ih
@@ -258,12 +228,6 @@ theorem pochhammer_eval_one (S : Type _) [Semiring S] (n : ℕ) :
 #align pochhammer_eval_one pochhammer_eval_one
 -/
 
-/- warning: factorial_mul_pochhammer -> factorial_mul_pochhammer is a dubious translation:
-lean 3 declaration is
-  forall (S : Type.{u1}) [_inst_2 : Semiring.{u1} S] (r : Nat) (n : Nat), Eq.{succ u1} S (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))))) (Nat.factorial r)) (Polynomial.eval.{u1} S _inst_2 (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toHasAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))))) r) (OfNat.ofNat.{u1} S 1 (OfNat.mk.{u1} S 1 (One.one.{u1} S (AddMonoidWithOne.toOne.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)))))))) (pochhammer.{u1} S _inst_2 n))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))))) (Nat.factorial (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) r n)))
-but is expected to have type
-  forall (S : Type.{u1}) [_inst_2 : Semiring.{u1} S] (r : Nat) (n : Nat), Eq.{succ u1} S (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_2) (Nat.factorial r)) (Polynomial.eval.{u1} S _inst_2 (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_2) r) (OfNat.ofNat.{u1} S 1 (One.toOfNat1.{u1} S (Semiring.toOne.{u1} S _inst_2)))) (pochhammer.{u1} S _inst_2 n))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_2) (Nat.factorial (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) r n)))
-Case conversion may be inaccurate. Consider using '#align factorial_mul_pochhammer factorial_mul_pochhammerₓ'. -/
 theorem factorial_mul_pochhammer (S : Type _) [Semiring S] (r n : ℕ) :
     (r ! : S) * (pochhammer S n).eval (r + 1) = (r + n)! := by
   rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
@@ -280,12 +244,6 @@ theorem pochhammer_nat_eval_succ (r : ℕ) :
 #align pochhammer_nat_eval_succ pochhammer_nat_eval_succ
 -/
 
-/- warning: pochhammer_eval_succ -> pochhammer_eval_succ is a dubious translation:
-lean 3 declaration is
-  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] (r : Nat) (n : Nat), Eq.{succ u1} S (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) n) (Polynomial.eval.{u1} S _inst_1 (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toHasAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) n) (OfNat.ofNat.{u1} S 1 (OfNat.mk.{u1} S 1 (One.one.{u1} S (AddMonoidWithOne.toOne.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1)))))))) (pochhammer.{u1} S _inst_1 r))) (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toHasAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) n) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) r)) (Polynomial.eval.{u1} S _inst_1 ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) n) (pochhammer.{u1} S _inst_1 r)))
-but is expected to have type
-  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] (r : Nat) (n : Nat), Eq.{succ u1} S (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1)))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) n) (Polynomial.eval.{u1} S _inst_1 (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) n) (OfNat.ofNat.{u1} S 1 (One.toOfNat1.{u1} S (Semiring.toOne.{u1} S _inst_1)))) (pochhammer.{u1} S _inst_1 r))) (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1)))) (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) n) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) r)) (Polynomial.eval.{u1} S _inst_1 (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) n) (pochhammer.{u1} S _inst_1 r)))
-Case conversion may be inaccurate. Consider using '#align pochhammer_eval_succ pochhammer_eval_succₓ'. -/
 theorem pochhammer_eval_succ (r n : ℕ) :
     (n : S) * (pochhammer S r).eval (n + 1 : S) = (n + r) * (pochhammer S r).eval n := by
   exact_mod_cast congr_arg Nat.cast (pochhammer_nat_eval_succ r n)
Diff
@@ -236,8 +236,7 @@ Case conversion may be inaccurate. Consider using '#align pochhammer_pos pochham
 theorem pochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (pochhammer S n).eval s :=
   by
   induction' n with n ih
-  · simp only [Nat.zero_eq, pochhammer_zero, eval_one]
-    exact zero_lt_one
+  · simp only [Nat.zero_eq, pochhammer_zero, eval_one]; exact zero_lt_one
   · rw [pochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
       Nat.cast_comm, ← mul_add]
     exact mul_pos ih (lt_of_lt_of_le h ((le_add_iff_nonneg_right _).mpr (Nat.cast_nonneg n)))
Diff
@@ -229,7 +229,7 @@ variable {S : Type _} [StrictOrderedSemiring S]
 
 /- warning: pochhammer_pos -> pochhammer_pos is a dubious translation:
 lean 3 declaration is
-  forall {S : Type.{u1}} [_inst_1 : StrictOrderedSemiring.{u1} S] (n : Nat) (s : S), (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (OrderedCancelAddCommMonoid.toPartialOrder.{u1} S (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} S _inst_1)))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1)))))))) s) -> (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (OrderedCancelAddCommMonoid.toPartialOrder.{u1} S (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} S _inst_1)))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1)))))))) (Polynomial.eval.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) s (pochhammer.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) n)))
+  forall {S : Type.{u1}} [_inst_1 : StrictOrderedSemiring.{u1} S] (n : Nat) (s : S), (LT.lt.{u1} S (Preorder.toHasLt.{u1} S (PartialOrder.toPreorder.{u1} S (OrderedCancelAddCommMonoid.toPartialOrder.{u1} S (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} S _inst_1)))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1)))))))) s) -> (LT.lt.{u1} S (Preorder.toHasLt.{u1} S (PartialOrder.toPreorder.{u1} S (OrderedCancelAddCommMonoid.toPartialOrder.{u1} S (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} S _inst_1)))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1)))))))) (Polynomial.eval.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) s (pochhammer.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) n)))
 but is expected to have type
   forall {S : Type.{u1}} [_inst_1 : StrictOrderedSemiring.{u1} S] (n : Nat) (s : S), (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (StrictOrderedSemiring.toPartialOrder.{u1} S _inst_1))) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1))))) s) -> (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (StrictOrderedSemiring.toPartialOrder.{u1} S _inst_1))) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1))))) (Polynomial.eval.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) s (pochhammer.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align pochhammer_pos pochhammer_posₓ'. -/
Diff
@@ -159,8 +159,8 @@ theorem pochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
     eval_C_mul, Nat.cast_comm, ← mul_add]
 #align pochhammer_succ_eval pochhammer_succ_eval
 
-#print pochhammer_succ_comp_x_add_one /-
-theorem pochhammer_succ_comp_x_add_one (n : ℕ) :
+#print pochhammer_succ_comp_X_add_one /-
+theorem pochhammer_succ_comp_X_add_one (n : ℕ) :
     (pochhammer S (n + 1)).comp (X + 1) =
       pochhammer S (n + 1) + (n + 1) • (pochhammer S n).comp (X + 1) :=
   by
@@ -171,14 +171,14 @@ theorem pochhammer_succ_comp_x_add_one (n : ℕ) :
   nth_rw 2 [pochhammer_succ_left]
   rw [← add_mul, pochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
     add_comm ↑n, ← add_assoc]
-#align pochhammer_succ_comp_X_add_one pochhammer_succ_comp_x_add_one
+#align pochhammer_succ_comp_X_add_one pochhammer_succ_comp_X_add_one
 -/
 
-#print Polynomial.mul_x_add_nat_cast_comp /-
-theorem Polynomial.mul_x_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
+#print Polynomial.mul_X_add_nat_cast_comp /-
+theorem Polynomial.mul_X_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
     (p * (X + n)).comp q = p.comp q * (q + n) := by
   rw [mul_add, add_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_add]
-#align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_x_add_nat_cast_comp
+#align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_X_add_nat_cast_comp
 -/
 
 #print pochhammer_mul /-
@@ -188,7 +188,7 @@ theorem pochhammer_mul (n m : ℕ) :
   induction' m with m ih
   · simp
   ·
-    rw [pochhammer_succ_right, Polynomial.mul_x_add_nat_cast_comp, ← mul_assoc, ih,
+    rw [pochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
       Nat.succ_eq_add_one, ← add_assoc, pochhammer_succ_right, Nat.cast_add, add_assoc]
 #align pochhammer_mul pochhammer_mul
 -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 
 ! This file was ported from Lean 3 source module ring_theory.polynomial.pochhammer
-! leanprover-community/mathlib commit 53b216bcc1146df1c4a0a86877890ea9f1f01589
+! leanprover-community/mathlib commit 69c6a5a12d8a2b159f20933e60115a4f2de62b58
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Data.Polynomial.Eval
 /-!
 # The Pochhammer polynomials
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define and prove some basic relations about
 `pochhammer S n : S[X] := X * (X + 1) * ... * (X + n - 1)`
 which is also known as the rising factorial. A version of this definition
Diff
@@ -272,8 +272,8 @@ theorem pochhammer_nat_eval_succ (r : ℕ) :
     ∀ n : ℕ, n * (pochhammer ℕ r).eval (n + 1) = (n + r) * (pochhammer ℕ r).eval n
   | 0 => by
     by_cases h : r = 0
-    · simp only [h, zero_mul, zero_add]
-    · simp only [pochhammer_eval_zero, zero_mul, if_neg h, mul_zero]
+    · simp only [h, MulZeroClass.zero_mul, zero_add]
+    · simp only [pochhammer_eval_zero, MulZeroClass.zero_mul, if_neg h, MulZeroClass.mul_zero]
   | k + 1 => by simp only [pochhammer_nat_eq_ascFactorial, Nat.succ_ascFactorial, add_right_comm]
 #align pochhammer_nat_eval_succ pochhammer_nat_eval_succ
 -/
Diff
@@ -41,6 +41,7 @@ section Semiring
 
 variable (S : Type u) [Semiring S]
 
+#print pochhammer /-
 /-- `pochhammer S n` is the polynomial `X * (X+1) * ... * (X + n - 1)`,
 with coefficients in the semiring `S`.
 -/
@@ -48,24 +49,32 @@ noncomputable def pochhammer : ℕ → S[X]
   | 0 => 1
   | n + 1 => X * (pochhammer n).comp (X + 1)
 #align pochhammer pochhammer
+-/
 
+#print pochhammer_zero /-
 @[simp]
 theorem pochhammer_zero : pochhammer S 0 = 1 :=
   rfl
 #align pochhammer_zero pochhammer_zero
+-/
 
+#print pochhammer_one /-
 @[simp]
 theorem pochhammer_one : pochhammer S 1 = X := by simp [pochhammer]
 #align pochhammer_one pochhammer_one
+-/
 
+#print pochhammer_succ_left /-
 theorem pochhammer_succ_left (n : ℕ) : pochhammer S (n + 1) = X * (pochhammer S n).comp (X + 1) :=
   by rw [pochhammer]
 #align pochhammer_succ_left pochhammer_succ_left
+-/
 
 section
 
 variable {S} {T : Type v} [Semiring T]
 
+#print pochhammer_map /-
 @[simp]
 theorem pochhammer_map (f : S →+* T) (n : ℕ) : (pochhammer S n).map f = pochhammer T n :=
   by
@@ -73,16 +82,25 @@ theorem pochhammer_map (f : S →+* T) (n : ℕ) : (pochhammer S n).map f = poch
   · simp
   · simp [ih, pochhammer_succ_left, map_comp]
 #align pochhammer_map pochhammer_map
+-/
 
 end
 
+#print pochhammer_eval_cast /-
 @[simp, norm_cast]
 theorem pochhammer_eval_cast (n k : ℕ) : ((pochhammer ℕ n).eval k : S) = (pochhammer S n).eval k :=
   by
   rw [← pochhammer_map (algebraMap ℕ S), eval_map, ← eq_natCast (algebraMap ℕ S), eval₂_at_nat_cast,
     Nat.cast_id, eq_natCast]
 #align pochhammer_eval_cast pochhammer_eval_cast
+-/
 
+/- warning: pochhammer_eval_zero -> pochhammer_eval_zero is a dubious translation:
+lean 3 declaration is
+  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] {n : Nat}, Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) (pochhammer.{u1} S _inst_1 n)) (ite.{succ u1} S (Eq.{1} Nat n (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (Nat.decidableEq n (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (OfNat.ofNat.{u1} S 1 (OfNat.mk.{u1} S 1 (One.one.{u1} S (AddMonoidWithOne.toOne.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))))
+but is expected to have type
+  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] {n : Nat}, Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))) (pochhammer.{u1} S _inst_1 n)) (ite.{succ u1} S (Eq.{1} Nat n (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (instDecidableEqNat n (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (OfNat.ofNat.{u1} S 1 (One.toOfNat1.{u1} S (Semiring.toOne.{u1} S _inst_1))) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))))
+Case conversion may be inaccurate. Consider using '#align pochhammer_eval_zero pochhammer_eval_zeroₓ'. -/
 theorem pochhammer_eval_zero {n : ℕ} : (pochhammer S n).eval 0 = if n = 0 then 1 else 0 :=
   by
   cases n
@@ -90,14 +108,27 @@ theorem pochhammer_eval_zero {n : ℕ} : (pochhammer S n).eval 0 = if n = 0 then
   · simp [X_mul, Nat.succ_ne_zero, pochhammer_succ_left]
 #align pochhammer_eval_zero pochhammer_eval_zero
 
+/- warning: pochhammer_zero_eval_zero -> pochhammer_zero_eval_zero is a dubious translation:
+lean 3 declaration is
+  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S], Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) (pochhammer.{u1} S _inst_1 (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))))) (OfNat.ofNat.{u1} S 1 (OfNat.mk.{u1} S 1 (One.one.{u1} S (AddMonoidWithOne.toOne.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1)))))))
+but is expected to have type
+  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S], Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))) (pochhammer.{u1} S _inst_1 (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))) (OfNat.ofNat.{u1} S 1 (One.toOfNat1.{u1} S (Semiring.toOne.{u1} S _inst_1)))
+Case conversion may be inaccurate. Consider using '#align pochhammer_zero_eval_zero pochhammer_zero_eval_zeroₓ'. -/
 theorem pochhammer_zero_eval_zero : (pochhammer S 0).eval 0 = 1 := by simp
 #align pochhammer_zero_eval_zero pochhammer_zero_eval_zero
 
+/- warning: pochhammer_ne_zero_eval_zero -> pochhammer_ne_zero_eval_zero is a dubious translation:
+lean 3 declaration is
+  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] {n : Nat}, (Ne.{1} Nat n (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) -> (Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) (pochhammer.{u1} S _inst_1 n)) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))))
+but is expected to have type
+  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] {n : Nat}, (Ne.{1} Nat n (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) -> (Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_1 (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))) (pochhammer.{u1} S _inst_1 n)) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_1)))))
+Case conversion may be inaccurate. Consider using '#align pochhammer_ne_zero_eval_zero pochhammer_ne_zero_eval_zeroₓ'. -/
 @[simp]
 theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).eval 0 = 0 := by
   simp [pochhammer_eval_zero, h]
 #align pochhammer_ne_zero_eval_zero pochhammer_ne_zero_eval_zero
 
+#print pochhammer_succ_right /-
 theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n * (X + n) :=
   by
   suffices h : pochhammer ℕ (n + 1) = pochhammer ℕ n * (X + n)
@@ -111,13 +142,21 @@ theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n
       rw [pochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← pochhammer_succ_left, add_comp, X_comp,
         nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
 #align pochhammer_succ_right pochhammer_succ_right
+-/
 
+/- warning: pochhammer_succ_eval -> pochhammer_succ_eval is a dubious translation:
+lean 3 declaration is
+  forall {S : Type.{u1}} [_inst_2 : Semiring.{u1} S] (n : Nat) (k : S), Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_2 k (pochhammer.{u1} S _inst_2 (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) (Polynomial.eval.{u1} S _inst_2 k (pochhammer.{u1} S _inst_2 n)) (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toHasAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) k ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))))) n)))
+but is expected to have type
+  forall {S : Type.{u1}} [_inst_2 : Semiring.{u1} S] (n : Nat) (k : S), Eq.{succ u1} S (Polynomial.eval.{u1} S _inst_2 k (pochhammer.{u1} S _inst_2 (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))) (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)))) (Polynomial.eval.{u1} S _inst_2 k (pochhammer.{u1} S _inst_2 n)) (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) k (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_2) n)))
+Case conversion may be inaccurate. Consider using '#align pochhammer_succ_eval pochhammer_succ_evalₓ'. -/
 theorem pochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
     (pochhammer S (n + 1)).eval k = (pochhammer S n).eval k * (k + n) := by
   rw [pochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
     eval_C_mul, Nat.cast_comm, ← mul_add]
 #align pochhammer_succ_eval pochhammer_succ_eval
 
+#print pochhammer_succ_comp_x_add_one /-
 theorem pochhammer_succ_comp_x_add_one (n : ℕ) :
     (pochhammer S (n + 1)).comp (X + 1) =
       pochhammer S (n + 1) + (n + 1) • (pochhammer S n).comp (X + 1) :=
@@ -130,12 +169,16 @@ theorem pochhammer_succ_comp_x_add_one (n : ℕ) :
   rw [← add_mul, pochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
     add_comm ↑n, ← add_assoc]
 #align pochhammer_succ_comp_X_add_one pochhammer_succ_comp_x_add_one
+-/
 
+#print Polynomial.mul_x_add_nat_cast_comp /-
 theorem Polynomial.mul_x_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
     (p * (X + n)).comp q = p.comp q * (q + n) := by
   rw [mul_add, add_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_add]
 #align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_x_add_nat_cast_comp
+-/
 
+#print pochhammer_mul /-
 theorem pochhammer_mul (n m : ℕ) :
     pochhammer S n * (pochhammer S m).comp (X + n) = pochhammer S (n + m) :=
   by
@@ -145,7 +188,9 @@ theorem pochhammer_mul (n m : ℕ) :
     rw [pochhammer_succ_right, Polynomial.mul_x_add_nat_cast_comp, ← mul_assoc, ih,
       Nat.succ_eq_add_one, ← add_assoc, pochhammer_succ_right, Nat.cast_add, add_assoc]
 #align pochhammer_mul pochhammer_mul
+-/
 
+#print pochhammer_nat_eq_ascFactorial /-
 theorem pochhammer_nat_eq_ascFactorial (n : ℕ) :
     ∀ k, (pochhammer ℕ k).eval (n + 1) = n.ascFactorial k
   | 0 => by erw [eval_one] <;> rfl
@@ -154,7 +199,9 @@ theorem pochhammer_nat_eq_ascFactorial (n : ℕ) :
     suffices n.asc_factorial t * (n + 1 + t) = n.asc_factorial (t + 1) by simpa
     rw [Nat.ascFactorial_succ, add_right_comm, mul_comm]
 #align pochhammer_nat_eq_asc_factorial pochhammer_nat_eq_ascFactorial
+-/
 
+#print pochhammer_nat_eq_descFactorial /-
 theorem pochhammer_nat_eq_descFactorial (a b : ℕ) :
     (pochhammer ℕ b).eval a = (a + b - 1).descFactorial b :=
   by
@@ -169,6 +216,7 @@ theorem pochhammer_nat_eq_descFactorial (a b : ℕ) :
     rw [Nat.succ_add, ← Nat.add_succ, Nat.add_descFactorial_eq_ascFactorial,
       pochhammer_nat_eq_ascFactorial]
 #align pochhammer_nat_eq_desc_factorial pochhammer_nat_eq_descFactorial
+-/
 
 end Semiring
 
@@ -176,6 +224,12 @@ section StrictOrderedSemiring
 
 variable {S : Type _} [StrictOrderedSemiring S]
 
+/- warning: pochhammer_pos -> pochhammer_pos is a dubious translation:
+lean 3 declaration is
+  forall {S : Type.{u1}} [_inst_1 : StrictOrderedSemiring.{u1} S] (n : Nat) (s : S), (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (OrderedCancelAddCommMonoid.toPartialOrder.{u1} S (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} S _inst_1)))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1)))))))) s) -> (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (OrderedCancelAddCommMonoid.toPartialOrder.{u1} S (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u1} S _inst_1)))) (OfNat.ofNat.{u1} S 0 (OfNat.mk.{u1} S 0 (Zero.zero.{u1} S (MulZeroClass.toHasZero.{u1} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1)))))))) (Polynomial.eval.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) s (pochhammer.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) n)))
+but is expected to have type
+  forall {S : Type.{u1}} [_inst_1 : StrictOrderedSemiring.{u1} S] (n : Nat) (s : S), (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (StrictOrderedSemiring.toPartialOrder.{u1} S _inst_1))) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1))))) s) -> (LT.lt.{u1} S (Preorder.toLT.{u1} S (PartialOrder.toPreorder.{u1} S (StrictOrderedSemiring.toPartialOrder.{u1} S _inst_1))) (OfNat.ofNat.{u1} S 0 (Zero.toOfNat0.{u1} S (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1))))) (Polynomial.eval.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) s (pochhammer.{u1} S (StrictOrderedSemiring.toSemiring.{u1} S _inst_1) n)))
+Case conversion may be inaccurate. Consider using '#align pochhammer_pos pochhammer_posₓ'. -/
 theorem pochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (pochhammer S n).eval s :=
   by
   induction' n with n ih
@@ -194,17 +248,26 @@ open Nat
 
 variable (S : Type _) [Semiring S] (r n : ℕ)
 
+#print pochhammer_eval_one /-
 @[simp]
 theorem pochhammer_eval_one (S : Type _) [Semiring S] (n : ℕ) :
     (pochhammer S n).eval (1 : S) = (n ! : S) := by
   rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.zero_ascFactorial]
 #align pochhammer_eval_one pochhammer_eval_one
+-/
 
+/- warning: factorial_mul_pochhammer -> factorial_mul_pochhammer is a dubious translation:
+lean 3 declaration is
+  forall (S : Type.{u1}) [_inst_2 : Semiring.{u1} S] (r : Nat) (n : Nat), Eq.{succ u1} S (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))))) (Nat.factorial r)) (Polynomial.eval.{u1} S _inst_2 (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toHasAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))))) r) (OfNat.ofNat.{u1} S 1 (OfNat.mk.{u1} S 1 (One.one.{u1} S (AddMonoidWithOne.toOne.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)))))))) (pochhammer.{u1} S _inst_2 n))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))))) (Nat.factorial (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) r n)))
+but is expected to have type
+  forall (S : Type.{u1}) [_inst_2 : Semiring.{u1} S] (r : Nat) (n : Nat), Eq.{succ u1} S (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2)))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_2) (Nat.factorial r)) (Polynomial.eval.{u1} S _inst_2 (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_2))))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_2) r) (OfNat.ofNat.{u1} S 1 (One.toOfNat1.{u1} S (Semiring.toOne.{u1} S _inst_2)))) (pochhammer.{u1} S _inst_2 n))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_2) (Nat.factorial (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) r n)))
+Case conversion may be inaccurate. Consider using '#align factorial_mul_pochhammer factorial_mul_pochhammerₓ'. -/
 theorem factorial_mul_pochhammer (S : Type _) [Semiring S] (r n : ℕ) :
     (r ! : S) * (pochhammer S n).eval (r + 1) = (r + n)! := by
   rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
 #align factorial_mul_pochhammer factorial_mul_pochhammer
 
+#print pochhammer_nat_eval_succ /-
 theorem pochhammer_nat_eval_succ (r : ℕ) :
     ∀ n : ℕ, n * (pochhammer ℕ r).eval (n + 1) = (n + r) * (pochhammer ℕ r).eval n
   | 0 => by
@@ -213,7 +276,14 @@ theorem pochhammer_nat_eval_succ (r : ℕ) :
     · simp only [pochhammer_eval_zero, zero_mul, if_neg h, mul_zero]
   | k + 1 => by simp only [pochhammer_nat_eq_ascFactorial, Nat.succ_ascFactorial, add_right_comm]
 #align pochhammer_nat_eval_succ pochhammer_nat_eval_succ
+-/
 
+/- warning: pochhammer_eval_succ -> pochhammer_eval_succ is a dubious translation:
+lean 3 declaration is
+  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] (r : Nat) (n : Nat), Eq.{succ u1} S (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) n) (Polynomial.eval.{u1} S _inst_1 (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toHasAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) n) (OfNat.ofNat.{u1} S 1 (OfNat.mk.{u1} S 1 (One.one.{u1} S (AddMonoidWithOne.toOne.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1)))))))) (pochhammer.{u1} S _inst_1 r))) (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toHasAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) n) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) r)) (Polynomial.eval.{u1} S _inst_1 ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat S (HasLiftT.mk.{1, succ u1} Nat S (CoeTCₓ.coe.{1, succ u1} Nat S (Nat.castCoe.{u1} S (AddMonoidWithOne.toNatCast.{u1} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} S (NonAssocSemiring.toAddCommMonoidWithOne.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))))) n) (pochhammer.{u1} S _inst_1 r)))
+but is expected to have type
+  forall (S : Type.{u1}) [_inst_1 : Semiring.{u1} S] (r : Nat) (n : Nat), Eq.{succ u1} S (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1)))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) n) (Polynomial.eval.{u1} S _inst_1 (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) n) (OfNat.ofNat.{u1} S 1 (One.toOfNat1.{u1} S (Semiring.toOne.{u1} S _inst_1)))) (pochhammer.{u1} S _inst_1 r))) (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1)))) (HAdd.hAdd.{u1, u1, u1} S S S (instHAdd.{u1} S (Distrib.toAdd.{u1} S (NonUnitalNonAssocSemiring.toDistrib.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_1))))) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) n) (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) r)) (Polynomial.eval.{u1} S _inst_1 (Nat.cast.{u1} S (Semiring.toNatCast.{u1} S _inst_1) n) (pochhammer.{u1} S _inst_1 r)))
+Case conversion may be inaccurate. Consider using '#align pochhammer_eval_succ pochhammer_eval_succₓ'. -/
 theorem pochhammer_eval_succ (r n : ℕ) :
     (n : S) * (pochhammer S r).eval (n + 1 : S) = (n + r) * (pochhammer S r).eval n := by
   exact_mod_cast congr_arg Nat.cast (pochhammer_nat_eval_succ r n)
Diff
@@ -46,7 +46,7 @@ with coefficients in the semiring `S`.
 -/
 noncomputable def pochhammer : ℕ → S[X]
   | 0 => 1
-  | n + 1 => x * (pochhammer n).comp (x + 1)
+  | n + 1 => X * (pochhammer n).comp (X + 1)
 #align pochhammer pochhammer
 
 @[simp]
@@ -55,10 +55,10 @@ theorem pochhammer_zero : pochhammer S 0 = 1 :=
 #align pochhammer_zero pochhammer_zero
 
 @[simp]
-theorem pochhammer_one : pochhammer S 1 = x := by simp [pochhammer]
+theorem pochhammer_one : pochhammer S 1 = X := by simp [pochhammer]
 #align pochhammer_one pochhammer_one
 
-theorem pochhammer_succ_left (n : ℕ) : pochhammer S (n + 1) = x * (pochhammer S n).comp (x + 1) :=
+theorem pochhammer_succ_left (n : ℕ) : pochhammer S (n + 1) = X * (pochhammer S n).comp (X + 1) :=
   by rw [pochhammer]
 #align pochhammer_succ_left pochhammer_succ_left
 
@@ -98,7 +98,7 @@ theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).
   simp [pochhammer_eval_zero, h]
 #align pochhammer_ne_zero_eval_zero pochhammer_ne_zero_eval_zero
 
-theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n * (x + n) :=
+theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n * (X + n) :=
   by
   suffices h : pochhammer ℕ (n + 1) = pochhammer ℕ n * (X + n)
   · apply_fun Polynomial.map (algebraMap ℕ S)  at h
@@ -119,8 +119,8 @@ theorem pochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
 #align pochhammer_succ_eval pochhammer_succ_eval
 
 theorem pochhammer_succ_comp_x_add_one (n : ℕ) :
-    (pochhammer S (n + 1)).comp (x + 1) =
-      pochhammer S (n + 1) + (n + 1) • (pochhammer S n).comp (x + 1) :=
+    (pochhammer S (n + 1)).comp (X + 1) =
+      pochhammer S (n + 1) + (n + 1) • (pochhammer S n).comp (X + 1) :=
   by
   suffices
     (pochhammer ℕ (n + 1)).comp (X + 1) =
@@ -132,12 +132,12 @@ theorem pochhammer_succ_comp_x_add_one (n : ℕ) :
 #align pochhammer_succ_comp_X_add_one pochhammer_succ_comp_x_add_one
 
 theorem Polynomial.mul_x_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
-    (p * (x + n)).comp q = p.comp q * (q + n) := by
+    (p * (X + n)).comp q = p.comp q * (q + n) := by
   rw [mul_add, add_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_add]
 #align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_x_add_nat_cast_comp
 
 theorem pochhammer_mul (n m : ℕ) :
-    pochhammer S n * (pochhammer S m).comp (x + n) = pochhammer S (n + m) :=
+    pochhammer S n * (pochhammer S m).comp (X + n) = pochhammer S (n + m) :=
   by
   induction' m with m ih
   · simp

Changes in mathlib4

mathlib3
mathlib4
chore: Rename nat_cast/int_cast/rat_cast to natCast/intCast/ratCast (#11486)

Now that I am defining NNRat.cast, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast/intCast/ratCast over nat_cast/int_cast/rat_cast, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.

Diff
@@ -104,7 +104,7 @@ end
 theorem ascPochhammer_eval_cast (n k : ℕ) :
     (((ascPochhammer ℕ n).eval k : ℕ) : S) = ((ascPochhammer S n).eval k : S) := by
   rw [← ascPochhammer_map (algebraMap ℕ S), eval_map, ← eq_natCast (algebraMap ℕ S),
-      eval₂_at_nat_cast,Nat.cast_id]
+      eval₂_at_natCast,Nat.cast_id]
 #align pochhammer_eval_cast ascPochhammer_eval_cast
 
 theorem ascPochhammer_eval_zero {n : ℕ} : (ascPochhammer S n).eval 0 = if n = 0 then 1 else 0 := by
@@ -126,17 +126,17 @@ theorem ascPochhammer_succ_right (n : ℕ) :
   suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X])) by
     apply_fun Polynomial.map (algebraMap ℕ S) at h
     simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
-      Polynomial.map_nat_cast] using h
+      Polynomial.map_natCast] using h
   induction' n with n ih
   · simp
   · conv_lhs =>
       rw [ascPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← ascPochhammer_succ_left, add_comp,
-          X_comp, nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
+          X_comp, natCast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
 #align pochhammer_succ_right ascPochhammer_succ_right
 
 theorem ascPochhammer_succ_eval {S : Type*} [Semiring S] (n : ℕ) (k : S) :
     (ascPochhammer S (n + 1)).eval k = (ascPochhammer S n).eval k * (k + n) := by
-  rw [ascPochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
+  rw [ascPochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_natCast,
     eval_C_mul, Nat.cast_comm, ← mul_add]
 #align pochhammer_succ_eval ascPochhammer_succ_eval
 
@@ -147,7 +147,7 @@ theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
       ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
     by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
   nth_rw 2 [ascPochhammer_succ_left]
-  rw [← add_mul, ascPochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
+  rw [← add_mul, ascPochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, natCast_comp,
     add_comm, ← add_assoc]
   ring
 set_option linter.uppercaseLean3 false in
@@ -157,7 +157,7 @@ theorem ascPochhammer_mul (n m : ℕ) :
     ascPochhammer S n * (ascPochhammer S m).comp (X + (n : S[X])) = ascPochhammer S (n + m) := by
   induction' m with m ih
   · simp
-  · rw [ascPochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
+  · rw [ascPochhammer_succ_right, Polynomial.mul_X_add_natCast_comp, ← mul_assoc, ih,
       Nat.succ_eq_add_one, ← add_assoc, ascPochhammer_succ_right, Nat.cast_add, add_assoc]
 #align pochhammer_mul ascPochhammer_mul
 
@@ -166,7 +166,7 @@ theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
   | 0 => by rw [ascPochhammer_zero, eval_one, Nat.ascFactorial_zero]
   | t + 1 => by
     rw [ascPochhammer_succ_right, eval_mul, ascPochhammer_nat_eq_ascFactorial n t, eval_add, eval_X,
-      eval_nat_cast, Nat.cast_id, Nat.ascFactorial_succ, mul_comm]
+      eval_natCast, Nat.cast_id, Nat.ascFactorial_succ, mul_comm]
 #align pochhammer_nat_eq_asc_factorial ascPochhammer_nat_eq_ascFactorial
 
 theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
@@ -196,7 +196,7 @@ theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n
   induction' n with n ih
   · simp only [Nat.zero_eq, ascPochhammer_zero, eval_one]
     exact zero_lt_one
-  · rw [ascPochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
+  · rw [ascPochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_natCast_mul, eval_mul_X,
       Nat.cast_comm, ← mul_add]
     exact mul_pos ih (lt_of_lt_of_le h ((le_add_iff_nonneg_right _).mpr (Nat.cast_nonneg n)))
 #align pochhammer_pos ascPochhammer_pos
@@ -284,7 +284,7 @@ end
 theorem descPochhammer_eval_cast (n : ℕ) (k : ℤ) :
     (((descPochhammer ℤ n).eval k : ℤ) : R) = ((descPochhammer R n).eval k : R) := by
   rw [← descPochhammer_map (algebraMap ℤ R), eval_map, ← eq_intCast (algebraMap ℤ R)]
-  simp only [algebraMap_int_eq, eq_intCast, eval₂_at_int_cast, Nat.cast_id, eq_natCast, Int.cast_id]
+  simp only [algebraMap_int_eq, eq_intCast, eval₂_at_intCast, Nat.cast_id, eq_natCast, Int.cast_id]
 
 theorem descPochhammer_eval_zero {n : ℕ} :
     (descPochhammer R n).eval 0 = if n = 0 then 1 else 0 := by
@@ -303,12 +303,12 @@ theorem descPochhammer_succ_right (n : ℕ) :
   suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X])) by
     apply_fun Polynomial.map (algebraMap ℤ R) at h
     simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
-      Polynomial.map_int_cast] using h
+      Polynomial.map_intCast] using h
   induction' n with n ih
   · simp [descPochhammer]
   · conv_lhs =>
       rw [descPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← descPochhammer_succ_left, sub_comp,
-          X_comp, nat_cast_comp]
+          X_comp, natCast_comp]
     nth_rw 1 [Nat.succ_eq_add_one]
     rw [Nat.succ_eq_one_add, Nat.cast_add, Nat.cast_one, sub_add_eq_sub_sub]
 
@@ -326,7 +326,7 @@ theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
 
 theorem descPochhammer_succ_eval {S : Type*} [Ring S] (n : ℕ) (k : S) :
     (descPochhammer S (n + 1)).eval k = (descPochhammer S n).eval k * (k - n) := by
-  rw [descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
+  rw [descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, ← C_eq_natCast,
     eval_C_mul, Nat.cast_comm, ← mul_sub]
 
 theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
@@ -336,7 +336,7 @@ theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
       descPochhammer ℤ (n + 1) - (n + 1) * (descPochhammer ℤ n).comp (X - 1)
     by simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this
   nth_rw 2 [descPochhammer_succ_left]
-  rw [← sub_mul, descPochhammer_succ_right ℤ n, mul_comp, mul_comm, sub_comp, X_comp, nat_cast_comp]
+  rw [← sub_mul, descPochhammer_succ_right ℤ n, mul_comp, mul_comm, sub_comp, X_comp, natCast_comp]
   ring
 
 theorem descPochhammer_eval_eq_ascPochhammer (r : R) (n : ℕ) :
@@ -353,7 +353,7 @@ theorem descPochhammer_mul (n m : ℕ) :
     descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m) := by
   induction' m with m ih
   · simp
-  · rw [descPochhammer_succ_right, Polynomial.mul_X_sub_int_cast_comp, ← mul_assoc, ih,
+  · rw [descPochhammer_succ_right, Polynomial.mul_X_sub_intCast_comp, ← mul_assoc, ih,
       Nat.succ_eq_add_one, ← add_assoc, descPochhammer_succ_right, Nat.cast_add, sub_add_eq_sub_sub]
 
 theorem ascPochhammer_eval_neg_eq_descPochhammer (r : R) : ∀ (k : ℕ),
@@ -362,9 +362,9 @@ theorem ascPochhammer_eval_neg_eq_descPochhammer (r : R) : ∀ (k : ℕ),
     rw [ascPochhammer_zero, descPochhammer_zero]
     simp only [eval_one, pow_zero, mul_one]
   | (k+1) => by
-    rw [ascPochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, eval_nat_cast_mul,
+    rw [ascPochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, eval_natCast_mul,
       Nat.cast_comm, ← mul_add, ascPochhammer_eval_neg_eq_descPochhammer r k, mul_assoc,
-      descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, eval_nat_cast_mul,
+      descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, eval_natCast_mul,
       pow_add, pow_one, mul_assoc ((-1)^k) (-1), mul_sub, neg_one_mul, neg_mul_eq_mul_neg,
       Nat.cast_comm, sub_eq_add_neg, neg_one_mul, neg_neg, ← mul_add]
 
@@ -374,7 +374,7 @@ theorem descPochhammer_eval_eq_descFactorial (n k : ℕ) :
   | zero => rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero, Nat.cast_one]
   | succ k ih =>
     rw [descPochhammer_succ_right, Nat.descFactorial_succ, mul_sub, eval_sub, eval_mul_X,
-      ← Nat.cast_comm k, eval_nat_cast_mul, ← Nat.cast_comm n, ← sub_mul, ih]
+      ← Nat.cast_comm k, eval_natCast_mul, ← Nat.cast_comm n, ← sub_mul, ih]
     by_cases h : n < k
     · rw [Nat.descFactorial_eq_zero_iff_lt.mpr h, Nat.cast_zero, mul_zero, mul_zero, Nat.cast_zero]
     · rw [Nat.cast_mul, Nat.cast_sub <| not_lt.mp h]
chore: rename IsRoot.definition back to IsRoot.def (#11999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -71,7 +71,7 @@ theorem monic_ascPochhammer (n : ℕ) [Nontrivial S] [NoZeroDivisors S] :
   induction' n with n hn
   · simp
   · have : leadingCoeff (X + 1 : S[X]) = 1 := leadingCoeff_X_add_C 1
-    rw [ascPochhammer_succ_left, Monic.def', leadingCoeff_mul,
+    rw [ascPochhammer_succ_left, Monic.def, leadingCoeff_mul,
       leadingCoeff_comp (ne_zero_of_eq_one <| natDegree_X_add_C 1 : natDegree (X + 1) ≠ 0), hn,
       monic_X, one_mul, one_mul, this, one_pow]
 
@@ -265,7 +265,7 @@ theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] :
   · simp
   · have h : leadingCoeff (X - 1 : R[X]) = 1 := leadingCoeff_X_sub_C 1
     have : natDegree (X - (1 : R[X])) ≠ 0 := ne_zero_of_eq_one <| natDegree_X_sub_C (1 : R)
-    rw [descPochhammer_succ_left, Monic.def', leadingCoeff_mul, leadingCoeff_comp this, hn, monic_X,
+    rw [descPochhammer_succ_left, Monic.def, leadingCoeff_mul, leadingCoeff_comp this, hn, monic_X,
         one_mul, one_mul, h, one_pow]
 
 section
move(Polynomial): Move out of Data (#11751)

Polynomial and MvPolynomial are algebraic objects, hence should be under Algebra (or at least not under Data)

Diff
@@ -3,11 +3,11 @@ Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
+import Mathlib.Algebra.Polynomial.Degree.Definitions
+import Mathlib.Algebra.Polynomial.Eval
+import Mathlib.Algebra.Polynomial.Monic
+import Mathlib.Algebra.Polynomial.RingDivision
 import Mathlib.Tactic.Abel
-import Mathlib.Data.Polynomial.Degree.Definitions
-import Mathlib.Data.Polynomial.Eval
-import Mathlib.Data.Polynomial.Monic
-import Mathlib.Data.Polynomial.RingDivision
 
 #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a86877890ea9f1f01589"
 
chore: tidy various files (#11624)
Diff
@@ -376,8 +376,8 @@ theorem descPochhammer_eval_eq_descFactorial (n k : ℕ) :
     rw [descPochhammer_succ_right, Nat.descFactorial_succ, mul_sub, eval_sub, eval_mul_X,
       ← Nat.cast_comm k, eval_nat_cast_mul, ← Nat.cast_comm n, ← sub_mul, ih]
     by_cases h : n < k
-    rw [Nat.descFactorial_eq_zero_iff_lt.mpr h, Nat.cast_zero, mul_zero, mul_zero, Nat.cast_zero]
-    rw [Nat.cast_mul, Nat.cast_sub <| not_lt.mp h]
+    · rw [Nat.descFactorial_eq_zero_iff_lt.mpr h, Nat.cast_zero, mul_zero, mul_zero, Nat.cast_zero]
+    · rw [Nat.cast_mul, Nat.cast_sub <| not_lt.mp h]
 
 theorem descPochhammer_int_eq_ascFactorial (a b : ℕ) :
     (descPochhammer ℤ b).eval (a + b : ℤ) = (a + 1).ascFactorial b := by
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -344,7 +344,7 @@ theorem descPochhammer_eval_eq_ascPochhammer (r : R) (n : ℕ) :
   induction n with
   | zero => rw [descPochhammer_zero, eval_one, ascPochhammer_zero, eval_one]
   | succ n ih =>
-    rw [Nat.cast_succ, sub_add, add_sub_cancel, descPochhammer_succ_eval, ih,
+    rw [Nat.cast_succ, sub_add, add_sub_cancel_right, descPochhammer_succ_eval, ih,
       ascPochhammer_succ_left, X_mul, eval_mul_X, show (X + 1 : R[X]) =
       (X + 1 : ℕ[X]).map (algebraMap ℕ R) by simp only [Polynomial.map_add, map_X,
       Polynomial.map_one], ascPochhammer_eval_comp, eval₂_add, eval₂_X, eval₂_one]
chore: rename away from 'def' (#11548)

This will become an error in 2024-03-16 nightly, possibly not permanently.

Co-authored-by: Scott Morrison <scott@tqft.net>

Diff
@@ -71,7 +71,7 @@ theorem monic_ascPochhammer (n : ℕ) [Nontrivial S] [NoZeroDivisors S] :
   induction' n with n hn
   · simp
   · have : leadingCoeff (X + 1 : S[X]) = 1 := leadingCoeff_X_add_C 1
-    rw [ascPochhammer_succ_left, Monic.def, leadingCoeff_mul,
+    rw [ascPochhammer_succ_left, Monic.def', leadingCoeff_mul,
       leadingCoeff_comp (ne_zero_of_eq_one <| natDegree_X_add_C 1 : natDegree (X + 1) ≠ 0), hn,
       monic_X, one_mul, one_mul, this, one_pow]
 
@@ -265,7 +265,7 @@ theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] :
   · simp
   · have h : leadingCoeff (X - 1 : R[X]) = 1 := leadingCoeff_X_sub_C 1
     have : natDegree (X - (1 : R[X])) ≠ 0 := ne_zero_of_eq_one <| natDegree_X_sub_C (1 : R)
-    rw [descPochhammer_succ_left, Monic.def, leadingCoeff_mul, leadingCoeff_comp this, hn, monic_X,
+    rw [descPochhammer_succ_left, Monic.def', leadingCoeff_mul, leadingCoeff_comp this, hn, monic_X,
         one_mul, one_mul, h, one_pow]
 
 section
chore: Remove unnecessary "rw"s (#10704)

Remove unnecessary "rw"s.

Diff
@@ -104,7 +104,7 @@ end
 theorem ascPochhammer_eval_cast (n k : ℕ) :
     (((ascPochhammer ℕ n).eval k : ℕ) : S) = ((ascPochhammer S n).eval k : S) := by
   rw [← ascPochhammer_map (algebraMap ℕ S), eval_map, ← eq_natCast (algebraMap ℕ S),
-      eval₂_at_nat_cast,Nat.cast_id, eq_natCast]
+      eval₂_at_nat_cast,Nat.cast_id]
 #align pochhammer_eval_cast ascPochhammer_eval_cast
 
 theorem ascPochhammer_eval_zero {n : ℕ} : (ascPochhammer S n).eval 0 = if n = 0 then 1 else 0 := by
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -123,8 +123,8 @@ theorem ascPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (ascPochhammer
 
 theorem ascPochhammer_succ_right (n : ℕ) :
     ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
-  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
-  · apply_fun Polynomial.map (algebraMap ℕ S) at h
+  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X])) by
+    apply_fun Polynomial.map (algebraMap ℕ S) at h
     simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
       Polynomial.map_nat_cast] using h
   induction' n with n ih
@@ -300,8 +300,8 @@ theorem descPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (descPochhamm
 
 theorem descPochhammer_succ_right (n : ℕ) :
     descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
-  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
-  · apply_fun Polynomial.map (algebraMap ℤ R) at h
+  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X])) by
+    apply_fun Polynomial.map (algebraMap ℤ R) at h
     simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
       Polynomial.map_int_cast] using h
   induction' n with n ih
feat: Define general binomial coefficients (Ring.choose) (#9719)

We define generalized binomial coefficients, and prove a couple basic properties. In particular, we show that multiplication by a suitable factorial yields a descending Pochhammer evaluation. We also show that casting Nat.choose is the same as taking Ring.choose of a natural number cast. To prove these, we add some results about polynomial evaluation.

Diff
@@ -87,6 +87,17 @@ theorem ascPochhammer_map (f : S →+* T) (n : ℕ) :
   · simp [ih, ascPochhammer_succ_left, map_comp]
 #align pochhammer_map ascPochhammer_map
 
+theorem ascPochhammer_eval₂ (f : S →+* T) (n : ℕ) (t : T) :
+    (ascPochhammer T n).eval t = (ascPochhammer S n).eval₂ f t := by
+  rw [← ascPochhammer_map f]
+  exact eval_map f t
+
+theorem ascPochhammer_eval_comp {R : Type*} [CommSemiring R] (n : ℕ) (p : R[X]) [Algebra R S]
+    (x : S) : ((ascPochhammer S n).comp (p.map (algebraMap R S))).eval x =
+    (ascPochhammer S n).eval (p.eval₂ (algebraMap R S) x) := by
+  rw [ascPochhammer_eval₂ (algebraMap R S), ← eval₂_comp', ← ascPochhammer_map (algebraMap R S),
+    ← map_comp, eval_map]
+
 end
 
 @[simp, norm_cast]
@@ -328,6 +339,16 @@ theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
   rw [← sub_mul, descPochhammer_succ_right ℤ n, mul_comp, mul_comm, sub_comp, X_comp, nat_cast_comp]
   ring
 
+theorem descPochhammer_eval_eq_ascPochhammer (r : R) (n : ℕ) :
+    (descPochhammer R n).eval r = (ascPochhammer R n).eval (r - n + 1) := by
+  induction n with
+  | zero => rw [descPochhammer_zero, eval_one, ascPochhammer_zero, eval_one]
+  | succ n ih =>
+    rw [Nat.cast_succ, sub_add, add_sub_cancel, descPochhammer_succ_eval, ih,
+      ascPochhammer_succ_left, X_mul, eval_mul_X, show (X + 1 : R[X]) =
+      (X + 1 : ℕ[X]).map (algebraMap ℕ R) by simp only [Polynomial.map_add, map_X,
+      Polynomial.map_one], ascPochhammer_eval_comp, eval₂_add, eval₂_X, eval₂_one]
+
 theorem descPochhammer_mul (n m : ℕ) :
     descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m) := by
   induction' m with m ih
@@ -347,25 +368,20 @@ theorem ascPochhammer_eval_neg_eq_descPochhammer (r : R) : ∀ (k : ℕ),
       pow_add, pow_one, mul_assoc ((-1)^k) (-1), mul_sub, neg_one_mul, neg_mul_eq_mul_neg,
       Nat.cast_comm, sub_eq_add_neg, neg_one_mul, neg_neg, ← mul_add]
 
-theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
-    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
-  | 0 => by
-    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
-    rfl
-  | t + 1 => by
-    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
-    simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
-        Nat.descFactorial_eq_zero_iff_lt]
-    rw [mul_comm]
-    simp only [mul_eq_mul_right_iff, Nat.cast_eq_zero, Nat.descFactorial_eq_zero_iff_lt]
-    by_cases h : n < t
-    · tauto
-    · left
-      exact (Int.ofNat_sub <| not_lt.mp h).symm
+theorem descPochhammer_eval_eq_descFactorial (n k : ℕ) :
+    (descPochhammer R k).eval (n : R) = n.descFactorial k := by
+  induction k with
+  | zero => rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero, Nat.cast_one]
+  | succ k ih =>
+    rw [descPochhammer_succ_right, Nat.descFactorial_succ, mul_sub, eval_sub, eval_mul_X,
+      ← Nat.cast_comm k, eval_nat_cast_mul, ← Nat.cast_comm n, ← sub_mul, ih]
+    by_cases h : n < k
+    rw [Nat.descFactorial_eq_zero_iff_lt.mpr h, Nat.cast_zero, mul_zero, mul_zero, Nat.cast_zero]
+    rw [Nat.cast_mul, Nat.cast_sub <| not_lt.mp h]
 
 theorem descPochhammer_int_eq_ascFactorial (a b : ℕ) :
     (descPochhammer ℤ b).eval (a + b : ℤ) = (a + 1).ascFactorial b := by
-  rw [← Nat.cast_add, descPochhammer_int_eq_descFactorial (a + b) b,
+  rw [← Nat.cast_add, descPochhammer_eval_eq_descFactorial ℤ (a + b) b,
     Nat.add_descFactorial_eq_ascFactorial]
 
 end Ring
feat: BinomialRing instance for integers (#9537)

We add a binomial ring instance for integers. To prove the necessary identity for negative integers, we add a lemma comparing evaluations of ascending and descending Pochhammer polynomials.

Diff
@@ -335,6 +335,18 @@ theorem descPochhammer_mul (n m : ℕ) :
   · rw [descPochhammer_succ_right, Polynomial.mul_X_sub_int_cast_comp, ← mul_assoc, ih,
       Nat.succ_eq_add_one, ← add_assoc, descPochhammer_succ_right, Nat.cast_add, sub_add_eq_sub_sub]
 
+theorem ascPochhammer_eval_neg_eq_descPochhammer (r : R) : ∀ (k : ℕ),
+    (ascPochhammer R k).eval (-r) = (-1)^k * (descPochhammer R k).eval r
+  | 0 => by
+    rw [ascPochhammer_zero, descPochhammer_zero]
+    simp only [eval_one, pow_zero, mul_one]
+  | (k+1) => by
+    rw [ascPochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, eval_nat_cast_mul,
+      Nat.cast_comm, ← mul_add, ascPochhammer_eval_neg_eq_descPochhammer r k, mul_assoc,
+      descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, eval_nat_cast_mul,
+      pow_add, pow_one, mul_assoc ((-1)^k) (-1), mul_sub, neg_one_mul, neg_mul_eq_mul_neg,
+      Nat.cast_comm, sub_eq_add_neg, neg_one_mul, neg_neg, ← mul_add]
+
 theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
     ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
   | 0 => by
chore: shift Nat.ascFactorial down by one (#7965)

change ascending factorial function Nat.ascFactorial to agree with mathematical literature. This means Nat.ascFactorial n k becomes n (n + 1) ⋯ (n + k - 1) instead of (n + 1) ⋯ (n + k)

Co-authored-by: Johan Commelin <johan@commelin.net>

Diff
@@ -151,24 +151,16 @@ theorem ascPochhammer_mul (n m : ℕ) :
 #align pochhammer_mul ascPochhammer_mul
 
 theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
-    ∀ k, (ascPochhammer ℕ k).eval (n + 1) = n.ascFactorial k
+    ∀ k, (ascPochhammer ℕ k).eval n = n.ascFactorial k
   | 0 => by rw [ascPochhammer_zero, eval_one, Nat.ascFactorial_zero]
   | t + 1 => by
-    rw [ascPochhammer_succ_right, eval_mul, ascPochhammer_nat_eq_ascFactorial n t]
-    simp only [eval_add, eval_X, eval_nat_cast, Nat.cast_id]
-    rw [Nat.ascFactorial_succ, add_right_comm, mul_comm]
+    rw [ascPochhammer_succ_right, eval_mul, ascPochhammer_nat_eq_ascFactorial n t, eval_add, eval_X,
+      eval_nat_cast, Nat.cast_id, Nat.ascFactorial_succ, mul_comm]
 #align pochhammer_nat_eq_asc_factorial ascPochhammer_nat_eq_ascFactorial
 
 theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
     (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
-  cases' b with b
-  · rw [Nat.descFactorial_zero, ascPochhammer_zero, Polynomial.eval_one]
-  rw [Nat.add_succ, Nat.succ_sub_succ, tsub_zero]
-  cases a
-  · simp only [Nat.zero_eq, ne_eq, Nat.succ_ne_zero, not_false_iff, ascPochhammer_ne_zero_eval_zero,
-    zero_add, Nat.descFactorial_succ, le_refl, tsub_eq_zero_of_le, zero_mul]
-  · rw [Nat.succ_add, ← Nat.add_succ, Nat.add_descFactorial_eq_ascFactorial,
-      ascPochhammer_nat_eq_ascFactorial]
+  rw [ascPochhammer_nat_eq_ascFactorial, Nat.add_descFactorial_eq_ascFactorial']
 #align pochhammer_nat_eq_desc_factorial ascPochhammer_nat_eq_descFactorial
 
 @[simp]
@@ -209,7 +201,7 @@ variable (S : Type*) [Semiring S] (r n : ℕ)
 @[simp]
 theorem ascPochhammer_eval_one (S : Type*) [Semiring S] (n : ℕ) :
     (ascPochhammer S n).eval (1 : S) = (n ! : S) := by
-  rw_mod_cast [ascPochhammer_nat_eq_ascFactorial, Nat.zero_ascFactorial]
+  rw_mod_cast [ascPochhammer_nat_eq_ascFactorial, Nat.one_ascFactorial]
 #align pochhammer_eval_one ascPochhammer_eval_one
 
 theorem factorial_mul_ascPochhammer (S : Type*) [Semiring S] (r n : ℕ) :
@@ -360,8 +352,8 @@ theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
       exact (Int.ofNat_sub <| not_lt.mp h).symm
 
 theorem descPochhammer_int_eq_ascFactorial (a b : ℕ) :
-    (descPochhammer ℤ b).eval (a + b : ℤ) = a.ascFactorial b := by
+    (descPochhammer ℤ b).eval (a + b : ℤ) = (a + 1).ascFactorial b := by
   rw [← Nat.cast_add, descPochhammer_int_eq_descFactorial (a + b) b,
-      Nat.add_descFactorial_eq_ascFactorial]
+    Nat.add_descFactorial_eq_ascFactorial]
 
 end Ring
chore: add missing hypothesis names to by_cases (#8533)

I've also got a change to make this required, but I'd like to land this first.

Diff
@@ -354,7 +354,7 @@ theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
         Nat.descFactorial_eq_zero_iff_lt]
     rw [mul_comm]
     simp only [mul_eq_mul_right_iff, Nat.cast_eq_zero, Nat.descFactorial_eq_zero_iff_lt]
-    by_cases n < t
+    by_cases h : n < t
     · tauto
     · left
       exact (Int.ofNat_sub <| not_lt.mp h).symm
chore: replace exact_mod_cast tactic with mod_cast elaborator where possible (#8404)

We still have the exact_mod_cast tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast are the ones that don't work using the term elaborator by itself.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -228,8 +228,8 @@ theorem ascPochhammer_nat_eval_succ (r : ℕ) :
 
 theorem ascPochhammer_eval_succ (r n : ℕ) :
     (n : S) * (ascPochhammer S r).eval (n + 1 : S) =
-    (n + r) * (ascPochhammer S r).eval (n : S) := by
-  exact_mod_cast congr_arg Nat.cast (ascPochhammer_nat_eval_succ r n)
+    (n + r) * (ascPochhammer S r).eval (n : S) :=
+  mod_cast congr_arg Nat.cast (ascPochhammer_nat_eval_succ r n)
 #align pochhammer_eval_succ ascPochhammer_eval_succ
 
 end Factorial
chore: fix whitespace typos (#7950)
Diff
@@ -310,7 +310,7 @@ theorem descPochhammer_succ_right (n : ℕ) :
     rw [Nat.succ_eq_one_add, Nat.cast_add, Nat.cast_one, sub_add_eq_sub_sub]
 
 @[simp]
-theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R]:
+theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R] :
     (descPochhammer R n).natDegree = n := by
   induction' n with n hn
   · simp
chore: mv mul_X_add_nat_cast_comp and mul_X_sub_int_cast_comp (#7175)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -142,14 +142,6 @@ theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
 set_option linter.uppercaseLean3 false in
 #align pochhammer_succ_comp_X_add_one ascPochhammer_succ_comp_X_add_one
 
-
--- TODO: find a better place for this lemma?
-theorem Polynomial.mul_X_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
-    (p * (X + (n : S[X]))).comp q = p.comp q * (q + n) := by
-  rw [mul_add, add_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_add]
-set_option linter.uppercaseLean3 false in
-#align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_X_add_nat_cast_comp
-
 theorem ascPochhammer_mul (n m : ℕ) :
     ascPochhammer S n * (ascPochhammer S m).comp (X + (n : S[X])) = ascPochhammer S (n + m) := by
   induction' m with m ih
@@ -344,11 +336,6 @@ theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
   rw [← sub_mul, descPochhammer_succ_right ℤ n, mul_comp, mul_comm, sub_comp, X_comp, nat_cast_comp]
   ring
 
--- TODO: find a better place for this lemma?
-theorem Polynomial.mul_X_sub_int_cast_comp {p q : R[X]} {n : ℕ} :
-    (p * (X - (n : R[X]))).comp q = p.comp q * (q - n) := by
-  rw [mul_sub, sub_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_sub]
-
 theorem descPochhammer_mul (n m : ℕ) :
     descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m) := by
   induction' m with m ih
chore: fix pochhammer names (#7161)

those got somehow lost in the merges...

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -66,7 +66,7 @@ theorem ascPochhammer_succ_left (n : ℕ) :
   by rw [ascPochhammer]
 #align pochhammer_succ_left ascPochhammer_succ_left
 
-theorem monic_pochhammer (n : ℕ) [Nontrivial S] [NoZeroDivisors S] :
+theorem monic_ascPochhammer (n : ℕ) [Nontrivial S] [NoZeroDivisors S] :
     Monic <| ascPochhammer S n := by
   induction' n with n hn
   · simp
@@ -180,7 +180,7 @@ theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
 #align pochhammer_nat_eq_desc_factorial ascPochhammer_nat_eq_descFactorial
 
 @[simp]
-theorem pochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
+theorem ascPochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
     (ascPochhammer S n).natDegree = n := by
   induction' n with n hn
   · simp
@@ -356,13 +356,13 @@ theorem descPochhammer_mul (n m : ℕ) :
   · rw [descPochhammer_succ_right, Polynomial.mul_X_sub_int_cast_comp, ← mul_assoc, ih,
       Nat.succ_eq_add_one, ← add_assoc, descPochhammer_succ_right, Nat.cast_add, sub_add_eq_sub_sub]
 
-theorem descPochhammer_int_eq_ascFactorial (n : ℕ) :
+theorem descPochhammer_int_eq_descFactorial (n : ℕ) :
     ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
   | 0 => by
     rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
     rfl
   | t + 1 => by
-    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_ascFactorial n t]
+    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_descFactorial n t]
     simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
         Nat.descFactorial_eq_zero_iff_lt]
     rw [mul_comm]
@@ -372,9 +372,9 @@ theorem descPochhammer_int_eq_ascFactorial (n : ℕ) :
     · left
       exact (Int.ofNat_sub <| not_lt.mp h).symm
 
-theorem Pochhammer_int_eq_descFactorial (a b : ℕ) :
+theorem descPochhammer_int_eq_ascFactorial (a b : ℕ) :
     (descPochhammer ℤ b).eval (a + b : ℤ) = a.ascFactorial b := by
-  rw [← Nat.cast_add, descPochhammer_int_eq_ascFactorial (a + b) b,
+  rw [← Nat.cast_add, descPochhammer_int_eq_descFactorial (a + b) b,
       Nat.add_descFactorial_eq_ascFactorial]
 
 end Ring
feat: descPochhammer_natDegree (#6929)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -317,6 +317,18 @@ theorem descPochhammer_succ_right (n : ℕ) :
     nth_rw 1 [Nat.succ_eq_add_one]
     rw [Nat.succ_eq_one_add, Nat.cast_add, Nat.cast_one, sub_add_eq_sub_sub]
 
+@[simp]
+theorem descPochhammer_natDegree (n : ℕ) [NoZeroDivisors R] [Nontrivial R]:
+    (descPochhammer R n).natDegree = n := by
+  induction' n with n hn
+  · simp
+  · have : natDegree (X - (n : R[X])) = 1 := natDegree_X_sub_C (n : R)
+    rw [descPochhammer_succ_right,
+        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
+    cases n
+    · simp
+    · refine' ne_zero_of_natDegree_gt <| hn.symm ▸ Nat.succ_pos _
+
 theorem descPochhammer_succ_eval {S : Type*} [Ring S] (n : ℕ) (k : S) :
     (descPochhammer S (n + 1)).eval k = (descPochhammer S n).eval k * (k - n) := by
   rw [descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
feat: monic_descPochhammer (#6927)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -264,6 +264,15 @@ theorem descPochhammer_succ_left (n : ℕ) :
     descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1) :=
   by rw [descPochhammer]
 
+theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] :
+    Monic <| descPochhammer R n := by
+  induction' n with n hn
+  · simp
+  · have h : leadingCoeff (X - 1 : R[X]) = 1 := leadingCoeff_X_sub_C 1
+    have : natDegree (X - (1 : R[X])) ≠ 0 := ne_zero_of_eq_one <| natDegree_X_sub_C (1 : R)
+    rw [descPochhammer_succ_left, Monic.def, leadingCoeff_mul, leadingCoeff_comp this, hn, monic_X,
+        one_mul, one_mul, h, one_pow]
+
 section
 
 variable {R} {T : Type v} [Ring T]
feat: descPochhammer (#6918)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -16,13 +16,16 @@ import Mathlib.Data.Polynomial.RingDivision
 
 We define and prove some basic relations about
 `ascPochhammer S n : S[X] := X * (X + 1) * ... * (X + n - 1)`
-which is also known as the rising factorial. A version of this definition
-that is focused on `Nat` can be found in `Data.Nat.Factorial` as `Nat.ascFactorial`.
+which is also known as the rising factorial and about
+`descPochhammer R n : R[X] := X * (X - 1) * ... * (X - n + 1)`
+which is also known as the falling factorial. Versions of this definition
+that are focused on `Nat` can be found in `Data.Nat.Factorial` as `Nat.ascFactorial` and
+`Nat.descFactorial`.
 
 ## Implementation
 
-As with many other families of polynomials, even though the coefficients are always in `ℕ`,
-we define the polynomial with coefficients in any `[Semiring S]`.
+As with many other families of polynomials, even though the coefficients are always in `ℕ` or `ℤ` ,
+we define the polynomial with coefficients in any `[Semiring S]` or `[Ring R]`.
 
 ## TODO
 
@@ -41,7 +44,7 @@ section Semiring
 
 variable (S : Type u) [Semiring S]
 
-/-- `ascPochhammer S n` is the polynomial `X * (X+1) * ... * (X + n - 1)`,
+/-- `ascPochhammer S n` is the polynomial `X * (X + 1) * ... * (X + n - 1)`,
 with coefficients in the semiring `S`.
 -/
 noncomputable def ascPochhammer : ℕ → S[X]
@@ -139,6 +142,8 @@ theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
 set_option linter.uppercaseLean3 false in
 #align pochhammer_succ_comp_X_add_one ascPochhammer_succ_comp_X_add_one
 
+
+-- TODO: find a better place for this lemma?
 theorem Polynomial.mul_X_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
     (p * (X + (n : S[X]))).comp q = p.comp q * (q + n) := by
   rw [mul_add, add_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_add]
@@ -236,3 +241,119 @@ theorem ascPochhammer_eval_succ (r n : ℕ) :
 #align pochhammer_eval_succ ascPochhammer_eval_succ
 
 end Factorial
+
+section Ring
+
+variable (R : Type u) [Ring R]
+
+/-- `descPochhammer R n` is the polynomial `X * (X - 1) * ... * (X - n + 1)`,
+with coefficients in the ring `R`.
+-/
+noncomputable def descPochhammer : ℕ → R[X]
+  | 0 => 1
+  | n + 1 => X * (descPochhammer n).comp (X - 1)
+
+@[simp]
+theorem descPochhammer_zero : descPochhammer R 0 = 1 :=
+  rfl
+
+@[simp]
+theorem descPochhammer_one : descPochhammer R 1 = X := by simp [descPochhammer]
+
+theorem descPochhammer_succ_left (n : ℕ) :
+    descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1) :=
+  by rw [descPochhammer]
+
+section
+
+variable {R} {T : Type v} [Ring T]
+
+@[simp]
+theorem descPochhammer_map (f : R →+* T) (n : ℕ) :
+    (descPochhammer R n).map f = descPochhammer T n := by
+  induction' n with n ih
+  · simp
+  · simp [ih, descPochhammer_succ_left, map_comp]
+end
+
+@[simp, norm_cast]
+theorem descPochhammer_eval_cast (n : ℕ) (k : ℤ) :
+    (((descPochhammer ℤ n).eval k : ℤ) : R) = ((descPochhammer R n).eval k : R) := by
+  rw [← descPochhammer_map (algebraMap ℤ R), eval_map, ← eq_intCast (algebraMap ℤ R)]
+  simp only [algebraMap_int_eq, eq_intCast, eval₂_at_int_cast, Nat.cast_id, eq_natCast, Int.cast_id]
+
+theorem descPochhammer_eval_zero {n : ℕ} :
+    (descPochhammer R n).eval 0 = if n = 0 then 1 else 0 := by
+  cases n
+  · simp
+  · simp [X_mul, Nat.succ_ne_zero, descPochhammer_succ_left]
+
+theorem descPochhammer_zero_eval_zero : (descPochhammer R 0).eval 0 = 1 := by simp
+
+@[simp]
+theorem descPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (descPochhammer R n).eval 0 = 0 := by
+  simp [descPochhammer_eval_zero, h]
+
+theorem descPochhammer_succ_right (n : ℕ) :
+    descPochhammer R (n + 1) = descPochhammer R n * (X - (n : R[X])) := by
+  suffices h : descPochhammer ℤ (n + 1) = descPochhammer ℤ n * (X - (n : ℤ[X]))
+  · apply_fun Polynomial.map (algebraMap ℤ R) at h
+    simpa [descPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
+      Polynomial.map_int_cast] using h
+  induction' n with n ih
+  · simp [descPochhammer]
+  · conv_lhs =>
+      rw [descPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← descPochhammer_succ_left, sub_comp,
+          X_comp, nat_cast_comp]
+    nth_rw 1 [Nat.succ_eq_add_one]
+    rw [Nat.succ_eq_one_add, Nat.cast_add, Nat.cast_one, sub_add_eq_sub_sub]
+
+theorem descPochhammer_succ_eval {S : Type*} [Ring S] (n : ℕ) (k : S) :
+    (descPochhammer S (n + 1)).eval k = (descPochhammer S n).eval k * (k - n) := by
+  rw [descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
+    eval_C_mul, Nat.cast_comm, ← mul_sub]
+
+theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
+    (descPochhammer R (n + 1)).comp (X - 1) =
+      descPochhammer R (n + 1) - (n + (1 : R[X])) • (descPochhammer R n).comp (X - 1) := by
+  suffices (descPochhammer ℤ (n + 1)).comp (X - 1) =
+      descPochhammer ℤ (n + 1) - (n + 1) * (descPochhammer ℤ n).comp (X - 1)
+    by simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this
+  nth_rw 2 [descPochhammer_succ_left]
+  rw [← sub_mul, descPochhammer_succ_right ℤ n, mul_comp, mul_comm, sub_comp, X_comp, nat_cast_comp]
+  ring
+
+-- TODO: find a better place for this lemma?
+theorem Polynomial.mul_X_sub_int_cast_comp {p q : R[X]} {n : ℕ} :
+    (p * (X - (n : R[X]))).comp q = p.comp q * (q - n) := by
+  rw [mul_sub, sub_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_sub]
+
+theorem descPochhammer_mul (n m : ℕ) :
+    descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m) := by
+  induction' m with m ih
+  · simp
+  · rw [descPochhammer_succ_right, Polynomial.mul_X_sub_int_cast_comp, ← mul_assoc, ih,
+      Nat.succ_eq_add_one, ← add_assoc, descPochhammer_succ_right, Nat.cast_add, sub_add_eq_sub_sub]
+
+theorem descPochhammer_int_eq_ascFactorial (n : ℕ) :
+    ∀ k, (descPochhammer ℤ k).eval (n : ℤ) = n.descFactorial k
+  | 0 => by
+    rw [descPochhammer_zero, eval_one, Nat.descFactorial_zero]
+    rfl
+  | t + 1 => by
+    rw [descPochhammer_succ_right, eval_mul, descPochhammer_int_eq_ascFactorial n t]
+    simp only [eval_sub, eval_X, eval_nat_cast, Nat.descFactorial_succ, Nat.cast_mul,
+        Nat.descFactorial_eq_zero_iff_lt]
+    rw [mul_comm]
+    simp only [mul_eq_mul_right_iff, Nat.cast_eq_zero, Nat.descFactorial_eq_zero_iff_lt]
+    by_cases n < t
+    · tauto
+    · left
+      exact (Int.ofNat_sub <| not_lt.mp h).symm
+
+theorem Pochhammer_int_eq_descFactorial (a b : ℕ) :
+    (descPochhammer ℤ b).eval (a + b : ℤ) = a.ascFactorial b := by
+  rw [← Nat.cast_add, descPochhammer_int_eq_ascFactorial (a + b) b,
+      Nat.add_descFactorial_eq_ascFactorial]
+
+end Ring
chore: rename pochhammer (#6917)

We rename pochhammer to ascPochhammer to prepare adding descPochhammer.

Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>

Diff
@@ -15,7 +15,7 @@ import Mathlib.Data.Polynomial.RingDivision
 # The Pochhammer polynomials
 
 We define and prove some basic relations about
-`pochhammer S n : S[X] := X * (X + 1) * ... * (X + n - 1)`
+`ascPochhammer S n : S[X] := X * (X + 1) * ... * (X + n - 1)`
 which is also known as the rising factorial. A version of this definition
 that is focused on `Nat` can be found in `Data.Nat.Factorial` as `Nat.ascFactorial`.
 
@@ -41,100 +41,103 @@ section Semiring
 
 variable (S : Type u) [Semiring S]
 
-/-- `pochhammer S n` is the polynomial `X * (X+1) * ... * (X + n - 1)`,
+/-- `ascPochhammer S n` is the polynomial `X * (X+1) * ... * (X + n - 1)`,
 with coefficients in the semiring `S`.
 -/
-noncomputable def pochhammer : ℕ → S[X]
+noncomputable def ascPochhammer : ℕ → S[X]
   | 0 => 1
-  | n + 1 => X * (pochhammer n).comp (X + 1)
-#align pochhammer pochhammer
+  | n + 1 => X * (ascPochhammer n).comp (X + 1)
+#align pochhammer ascPochhammer
 
 @[simp]
-theorem pochhammer_zero : pochhammer S 0 = 1 :=
+theorem ascPochhammer_zero : ascPochhammer S 0 = 1 :=
   rfl
-#align pochhammer_zero pochhammer_zero
+#align pochhammer_zero ascPochhammer_zero
 
 @[simp]
-theorem pochhammer_one : pochhammer S 1 = X := by simp [pochhammer]
-#align pochhammer_one pochhammer_one
+theorem ascPochhammer_one : ascPochhammer S 1 = X := by simp [ascPochhammer]
+#align pochhammer_one ascPochhammer_one
 
-theorem pochhammer_succ_left (n : ℕ) : pochhammer S (n + 1) = X * (pochhammer S n).comp (X + 1) :=
-  by rw [pochhammer]
-#align pochhammer_succ_left pochhammer_succ_left
+theorem ascPochhammer_succ_left (n : ℕ) :
+    ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1) :=
+  by rw [ascPochhammer]
+#align pochhammer_succ_left ascPochhammer_succ_left
 
 theorem monic_pochhammer (n : ℕ) [Nontrivial S] [NoZeroDivisors S] :
-    Monic <| pochhammer S n := by
+    Monic <| ascPochhammer S n := by
   induction' n with n hn
   · simp
   · have : leadingCoeff (X + 1 : S[X]) = 1 := leadingCoeff_X_add_C 1
-    rw [pochhammer_succ_left, Monic.def, leadingCoeff_mul, leadingCoeff_comp (ne_zero_of_eq_one <|
-        natDegree_X_add_C 1 : natDegree (X + 1) ≠ 0), hn, monic_X, one_mul, one_mul, this, one_pow]
+    rw [ascPochhammer_succ_left, Monic.def, leadingCoeff_mul,
+      leadingCoeff_comp (ne_zero_of_eq_one <| natDegree_X_add_C 1 : natDegree (X + 1) ≠ 0), hn,
+      monic_X, one_mul, one_mul, this, one_pow]
 
 section
 
 variable {S} {T : Type v} [Semiring T]
 
 @[simp]
-theorem pochhammer_map (f : S →+* T) (n : ℕ) : (pochhammer S n).map f = pochhammer T n := by
+theorem ascPochhammer_map (f : S →+* T) (n : ℕ) :
+    (ascPochhammer S n).map f = ascPochhammer T n := by
   induction' n with n ih
   · simp
-  · simp [ih, pochhammer_succ_left, map_comp]
-#align pochhammer_map pochhammer_map
+  · simp [ih, ascPochhammer_succ_left, map_comp]
+#align pochhammer_map ascPochhammer_map
 
 end
 
 @[simp, norm_cast]
-theorem pochhammer_eval_cast (n k : ℕ) :
-    (((pochhammer ℕ n).eval k : ℕ) : S) = ((pochhammer S n).eval k : S) := by
-  rw [← pochhammer_map (algebraMap ℕ S), eval_map, ← eq_natCast (algebraMap ℕ S), eval₂_at_nat_cast,
-    Nat.cast_id, eq_natCast]
-#align pochhammer_eval_cast pochhammer_eval_cast
+theorem ascPochhammer_eval_cast (n k : ℕ) :
+    (((ascPochhammer ℕ n).eval k : ℕ) : S) = ((ascPochhammer S n).eval k : S) := by
+  rw [← ascPochhammer_map (algebraMap ℕ S), eval_map, ← eq_natCast (algebraMap ℕ S),
+      eval₂_at_nat_cast,Nat.cast_id, eq_natCast]
+#align pochhammer_eval_cast ascPochhammer_eval_cast
 
-theorem pochhammer_eval_zero {n : ℕ} : (pochhammer S n).eval 0 = if n = 0 then 1 else 0 := by
+theorem ascPochhammer_eval_zero {n : ℕ} : (ascPochhammer S n).eval 0 = if n = 0 then 1 else 0 := by
   cases n
   · simp
-  · simp [X_mul, Nat.succ_ne_zero, pochhammer_succ_left]
-#align pochhammer_eval_zero pochhammer_eval_zero
+  · simp [X_mul, Nat.succ_ne_zero, ascPochhammer_succ_left]
+#align pochhammer_eval_zero ascPochhammer_eval_zero
 
-theorem pochhammer_zero_eval_zero : (pochhammer S 0).eval 0 = 1 := by simp
-#align pochhammer_zero_eval_zero pochhammer_zero_eval_zero
+theorem ascPochhammer_zero_eval_zero : (ascPochhammer S 0).eval 0 = 1 := by simp
+#align pochhammer_zero_eval_zero ascPochhammer_zero_eval_zero
 
 @[simp]
-theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).eval 0 = 0 := by
-  simp [pochhammer_eval_zero, h]
-#align pochhammer_ne_zero_eval_zero pochhammer_ne_zero_eval_zero
+theorem ascPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (ascPochhammer S n).eval 0 = 0 := by
+  simp [ascPochhammer_eval_zero, h]
+#align pochhammer_ne_zero_eval_zero ascPochhammer_ne_zero_eval_zero
 
-theorem pochhammer_succ_right (n : ℕ) :
-    pochhammer S (n + 1) = pochhammer S n * (X + (n : S[X])) := by
-  suffices h : pochhammer ℕ (n + 1) = pochhammer ℕ n * (X + (n : ℕ[X]))
+theorem ascPochhammer_succ_right (n : ℕ) :
+    ascPochhammer S (n + 1) = ascPochhammer S n * (X + (n : S[X])) := by
+  suffices h : ascPochhammer ℕ (n + 1) = ascPochhammer ℕ n * (X + (n : ℕ[X]))
   · apply_fun Polynomial.map (algebraMap ℕ S) at h
-    simpa only [pochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
+    simpa only [ascPochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
       Polynomial.map_nat_cast] using h
   induction' n with n ih
   · simp
   · conv_lhs =>
-      rw [pochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← pochhammer_succ_left, add_comp, X_comp,
-        nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
-#align pochhammer_succ_right pochhammer_succ_right
+      rw [ascPochhammer_succ_left, ih, mul_comp, ← mul_assoc, ← ascPochhammer_succ_left, add_comp,
+          X_comp, nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
+#align pochhammer_succ_right ascPochhammer_succ_right
 
-theorem pochhammer_succ_eval {S : Type*} [Semiring S] (n : ℕ) (k : S) :
-    (pochhammer S (n + 1)).eval k = (pochhammer S n).eval k * (k + n) := by
-  rw [pochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
+theorem ascPochhammer_succ_eval {S : Type*} [Semiring S] (n : ℕ) (k : S) :
+    (ascPochhammer S (n + 1)).eval k = (ascPochhammer S n).eval k * (k + n) := by
+  rw [ascPochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
     eval_C_mul, Nat.cast_comm, ← mul_add]
-#align pochhammer_succ_eval pochhammer_succ_eval
+#align pochhammer_succ_eval ascPochhammer_succ_eval
 
-theorem pochhammer_succ_comp_X_add_one (n : ℕ) :
-    (pochhammer S (n + 1)).comp (X + 1) =
-      pochhammer S (n + 1) + (n + 1) • (pochhammer S n).comp (X + 1) := by
-  suffices (pochhammer ℕ (n + 1)).comp (X + 1) =
-      pochhammer ℕ (n + 1) + (n + 1) * (pochhammer ℕ n).comp (X + 1)
+theorem ascPochhammer_succ_comp_X_add_one (n : ℕ) :
+    (ascPochhammer S (n + 1)).comp (X + 1) =
+      ascPochhammer S (n + 1) + (n + 1) • (ascPochhammer S n).comp (X + 1) := by
+  suffices (ascPochhammer ℕ (n + 1)).comp (X + 1) =
+      ascPochhammer ℕ (n + 1) + (n + 1) * (ascPochhammer ℕ n).comp (X + 1)
     by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
-  nth_rw 2 [pochhammer_succ_left]
-  rw [← add_mul, pochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
+  nth_rw 2 [ascPochhammer_succ_left]
+  rw [← add_mul, ascPochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
     add_comm, ← add_assoc]
   ring
 set_option linter.uppercaseLean3 false in
-#align pochhammer_succ_comp_X_add_one pochhammer_succ_comp_X_add_one
+#align pochhammer_succ_comp_X_add_one ascPochhammer_succ_comp_X_add_one
 
 theorem Polynomial.mul_X_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
     (p * (X + (n : S[X]))).comp q = p.comp q * (q + n) := by
@@ -142,42 +145,42 @@ theorem Polynomial.mul_X_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
 set_option linter.uppercaseLean3 false in
 #align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_X_add_nat_cast_comp
 
-theorem pochhammer_mul (n m : ℕ) :
-    pochhammer S n * (pochhammer S m).comp (X + (n : S[X])) = pochhammer S (n + m) := by
+theorem ascPochhammer_mul (n m : ℕ) :
+    ascPochhammer S n * (ascPochhammer S m).comp (X + (n : S[X])) = ascPochhammer S (n + m) := by
   induction' m with m ih
   · simp
-  · rw [pochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
-      Nat.succ_eq_add_one, ← add_assoc, pochhammer_succ_right, Nat.cast_add, add_assoc]
-#align pochhammer_mul pochhammer_mul
+  · rw [ascPochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
+      Nat.succ_eq_add_one, ← add_assoc, ascPochhammer_succ_right, Nat.cast_add, add_assoc]
+#align pochhammer_mul ascPochhammer_mul
 
-theorem pochhammer_nat_eq_ascFactorial (n : ℕ) :
-    ∀ k, (pochhammer ℕ k).eval (n + 1) = n.ascFactorial k
-  | 0 => by rw [pochhammer_zero, eval_one, Nat.ascFactorial_zero]
+theorem ascPochhammer_nat_eq_ascFactorial (n : ℕ) :
+    ∀ k, (ascPochhammer ℕ k).eval (n + 1) = n.ascFactorial k
+  | 0 => by rw [ascPochhammer_zero, eval_one, Nat.ascFactorial_zero]
   | t + 1 => by
-    rw [pochhammer_succ_right, eval_mul, pochhammer_nat_eq_ascFactorial n t]
+    rw [ascPochhammer_succ_right, eval_mul, ascPochhammer_nat_eq_ascFactorial n t]
     simp only [eval_add, eval_X, eval_nat_cast, Nat.cast_id]
     rw [Nat.ascFactorial_succ, add_right_comm, mul_comm]
-#align pochhammer_nat_eq_asc_factorial pochhammer_nat_eq_ascFactorial
+#align pochhammer_nat_eq_asc_factorial ascPochhammer_nat_eq_ascFactorial
 
-theorem pochhammer_nat_eq_descFactorial (a b : ℕ) :
-    (pochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
+theorem ascPochhammer_nat_eq_descFactorial (a b : ℕ) :
+    (ascPochhammer ℕ b).eval a = (a + b - 1).descFactorial b := by
   cases' b with b
-  · rw [Nat.descFactorial_zero, pochhammer_zero, Polynomial.eval_one]
+  · rw [Nat.descFactorial_zero, ascPochhammer_zero, Polynomial.eval_one]
   rw [Nat.add_succ, Nat.succ_sub_succ, tsub_zero]
   cases a
-  · simp only [Nat.zero_eq, ne_eq, Nat.succ_ne_zero, not_false_iff, pochhammer_ne_zero_eval_zero,
+  · simp only [Nat.zero_eq, ne_eq, Nat.succ_ne_zero, not_false_iff, ascPochhammer_ne_zero_eval_zero,
     zero_add, Nat.descFactorial_succ, le_refl, tsub_eq_zero_of_le, zero_mul]
   · rw [Nat.succ_add, ← Nat.add_succ, Nat.add_descFactorial_eq_ascFactorial,
-      pochhammer_nat_eq_ascFactorial]
-#align pochhammer_nat_eq_desc_factorial pochhammer_nat_eq_descFactorial
+      ascPochhammer_nat_eq_ascFactorial]
+#align pochhammer_nat_eq_desc_factorial ascPochhammer_nat_eq_descFactorial
 
 @[simp]
 theorem pochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
-    (pochhammer S n).natDegree = n := by
+    (ascPochhammer S n).natDegree = n := by
   induction' n with n hn
   · simp
   · have : natDegree (X + (n : S[X])) = 1 := natDegree_X_add_C (n : S)
-    rw [pochhammer_succ_right,
+    rw [ascPochhammer_succ_right,
         natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
     cases n
     · simp
@@ -189,14 +192,14 @@ section StrictOrderedSemiring
 
 variable {S : Type*} [StrictOrderedSemiring S]
 
-theorem pochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (pochhammer S n).eval s := by
+theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s := by
   induction' n with n ih
-  · simp only [Nat.zero_eq, pochhammer_zero, eval_one]
+  · simp only [Nat.zero_eq, ascPochhammer_zero, eval_one]
     exact zero_lt_one
-  · rw [pochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
+  · rw [ascPochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
       Nat.cast_comm, ← mul_add]
     exact mul_pos ih (lt_of_lt_of_le h ((le_add_iff_nonneg_right _).mpr (Nat.cast_nonneg n)))
-#align pochhammer_pos pochhammer_pos
+#align pochhammer_pos ascPochhammer_pos
 
 end StrictOrderedSemiring
 
@@ -207,28 +210,29 @@ open Nat
 variable (S : Type*) [Semiring S] (r n : ℕ)
 
 @[simp]
-theorem pochhammer_eval_one (S : Type*) [Semiring S] (n : ℕ) :
-    (pochhammer S n).eval (1 : S) = (n ! : S) := by
-  rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.zero_ascFactorial]
-#align pochhammer_eval_one pochhammer_eval_one
-
-theorem factorial_mul_pochhammer (S : Type*) [Semiring S] (r n : ℕ) :
-    (r ! : S) * (pochhammer S n).eval (r + 1 : S) = (r + n)! := by
-  rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
-#align factorial_mul_pochhammer factorial_mul_pochhammer
-
-theorem pochhammer_nat_eval_succ (r : ℕ) :
-    ∀ n : ℕ, n * (pochhammer ℕ r).eval (n + 1) = (n + r) * (pochhammer ℕ r).eval n
+theorem ascPochhammer_eval_one (S : Type*) [Semiring S] (n : ℕ) :
+    (ascPochhammer S n).eval (1 : S) = (n ! : S) := by
+  rw_mod_cast [ascPochhammer_nat_eq_ascFactorial, Nat.zero_ascFactorial]
+#align pochhammer_eval_one ascPochhammer_eval_one
+
+theorem factorial_mul_ascPochhammer (S : Type*) [Semiring S] (r n : ℕ) :
+    (r ! : S) * (ascPochhammer S n).eval (r + 1 : S) = (r + n)! := by
+  rw_mod_cast [ascPochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
+#align factorial_mul_pochhammer factorial_mul_ascPochhammer
+
+theorem ascPochhammer_nat_eval_succ (r : ℕ) :
+    ∀ n : ℕ, n * (ascPochhammer ℕ r).eval (n + 1) = (n + r) * (ascPochhammer ℕ r).eval n
   | 0 => by
     by_cases h : r = 0
     · simp only [h, zero_mul, zero_add]
-    · simp only [pochhammer_eval_zero, zero_mul, if_neg h, mul_zero]
-  | k + 1 => by simp only [pochhammer_nat_eq_ascFactorial, Nat.succ_ascFactorial, add_right_comm]
-#align pochhammer_nat_eval_succ pochhammer_nat_eval_succ
-
-theorem pochhammer_eval_succ (r n : ℕ) :
-    (n : S) * (pochhammer S r).eval (n + 1 : S) = (n + r) * (pochhammer S r).eval (n : S) := by
-  exact_mod_cast congr_arg Nat.cast (pochhammer_nat_eval_succ r n)
-#align pochhammer_eval_succ pochhammer_eval_succ
+    · simp only [ascPochhammer_eval_zero, zero_mul, if_neg h, mul_zero]
+  | k + 1 => by simp only [ascPochhammer_nat_eq_ascFactorial, Nat.succ_ascFactorial, add_right_comm]
+#align pochhammer_nat_eval_succ ascPochhammer_nat_eval_succ
+
+theorem ascPochhammer_eval_succ (r n : ℕ) :
+    (n : S) * (ascPochhammer S r).eval (n + 1 : S) =
+    (n + r) * (ascPochhammer S r).eval (n : S) := by
+  exact_mod_cast congr_arg Nat.cast (ascPochhammer_nat_eval_succ r n)
+#align pochhammer_eval_succ ascPochhammer_eval_succ
 
 end Factorial
feat: Monic pochhammer (#6906)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -6,6 +6,7 @@ Authors: Scott Morrison
 import Mathlib.Tactic.Abel
 import Mathlib.Data.Polynomial.Degree.Definitions
 import Mathlib.Data.Polynomial.Eval
+import Mathlib.Data.Polynomial.Monic
 import Mathlib.Data.Polynomial.RingDivision
 
 #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a86877890ea9f1f01589"
@@ -61,6 +62,14 @@ theorem pochhammer_succ_left (n : ℕ) : pochhammer S (n + 1) = X * (pochhammer
   by rw [pochhammer]
 #align pochhammer_succ_left pochhammer_succ_left
 
+theorem monic_pochhammer (n : ℕ) [Nontrivial S] [NoZeroDivisors S] :
+    Monic <| pochhammer S n := by
+  induction' n with n hn
+  · simp
+  · have : leadingCoeff (X + 1 : S[X]) = 1 := leadingCoeff_X_add_C 1
+    rw [pochhammer_succ_left, Monic.def, leadingCoeff_mul, leadingCoeff_comp (ne_zero_of_eq_one <|
+        natDegree_X_add_C 1 : natDegree (X + 1) ≠ 0), hn, monic_X, one_mul, one_mul, this, one_pow]
+
 section
 
 variable {S} {T : Type v} [Semiring T]
feat: pochhammer_natDegree (#6897)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -4,7 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
 -/
 import Mathlib.Tactic.Abel
+import Mathlib.Data.Polynomial.Degree.Definitions
 import Mathlib.Data.Polynomial.Eval
+import Mathlib.Data.Polynomial.RingDivision
 
 #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a86877890ea9f1f01589"
 
@@ -160,6 +162,18 @@ theorem pochhammer_nat_eq_descFactorial (a b : ℕ) :
       pochhammer_nat_eq_ascFactorial]
 #align pochhammer_nat_eq_desc_factorial pochhammer_nat_eq_descFactorial
 
+@[simp]
+theorem pochhammer_natDegree (n : ℕ) [NoZeroDivisors S] [Nontrivial S] :
+    (pochhammer S n).natDegree = n := by
+  induction' n with n hn
+  · simp
+  · have : natDegree (X + (n : S[X])) = 1 := natDegree_X_add_C (n : S)
+    rw [pochhammer_succ_right,
+        natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
+    cases n
+    · simp
+    · refine' ne_zero_of_natDegree_gt <| hn.symm ▸ Nat.succ_pos _
+
 end Semiring
 
 section StrictOrderedSemiring
chore: remove unused simps (#6632)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -119,7 +119,6 @@ theorem pochhammer_succ_comp_X_add_one (n : ℕ) :
       pochhammer ℕ (n + 1) + (n + 1) * (pochhammer ℕ n).comp (X + 1)
     by simpa [map_comp] using congr_arg (Polynomial.map (Nat.castRingHom S)) this
   nth_rw 2 [pochhammer_succ_left]
-  simp only
   rw [← add_mul, pochhammer_succ_right ℕ n, mul_comp, mul_comm, add_comp, X_comp, nat_cast_comp,
     add_comm, ← add_assoc]
   ring
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -106,7 +106,7 @@ theorem pochhammer_succ_right (n : ℕ) :
         nat_cast_comp, add_assoc, add_comm (1 : ℕ[X]), ← Nat.cast_succ]
 #align pochhammer_succ_right pochhammer_succ_right
 
-theorem pochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
+theorem pochhammer_succ_eval {S : Type*} [Semiring S] (n : ℕ) (k : S) :
     (pochhammer S (n + 1)).eval k = (pochhammer S n).eval k * (k + n) := by
   rw [pochhammer_succ_right, mul_add, eval_add, eval_mul_X, ← Nat.cast_comm, ← C_eq_nat_cast,
     eval_C_mul, Nat.cast_comm, ← mul_add]
@@ -165,7 +165,7 @@ end Semiring
 
 section StrictOrderedSemiring
 
-variable {S : Type _} [StrictOrderedSemiring S]
+variable {S : Type*} [StrictOrderedSemiring S]
 
 theorem pochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (pochhammer S n).eval s := by
   induction' n with n ih
@@ -182,15 +182,15 @@ section Factorial
 
 open Nat
 
-variable (S : Type _) [Semiring S] (r n : ℕ)
+variable (S : Type*) [Semiring S] (r n : ℕ)
 
 @[simp]
-theorem pochhammer_eval_one (S : Type _) [Semiring S] (n : ℕ) :
+theorem pochhammer_eval_one (S : Type*) [Semiring S] (n : ℕ) :
     (pochhammer S n).eval (1 : S) = (n ! : S) := by
   rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.zero_ascFactorial]
 #align pochhammer_eval_one pochhammer_eval_one
 
-theorem factorial_mul_pochhammer (S : Type _) [Semiring S] (r n : ℕ) :
+theorem factorial_mul_pochhammer (S : Type*) [Semiring S] (r n : ℕ) :
     (r ! : S) * (pochhammer S n).eval (r + 1 : S) = (r + n)! := by
   rw_mod_cast [pochhammer_nat_eq_ascFactorial, Nat.factorial_mul_ascFactorial]
 #align factorial_mul_pochhammer factorial_mul_pochhammer
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Scott Morrison. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module ring_theory.polynomial.pochhammer
-! leanprover-community/mathlib commit 53b216bcc1146df1c4a0a86877890ea9f1f01589
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Tactic.Abel
 import Mathlib.Data.Polynomial.Eval
 
+#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a86877890ea9f1f01589"
+
 /-!
 # The Pochhammer polynomials
 
chore: formatting issues (#4947)

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -143,7 +143,7 @@ theorem pochhammer_mul (n m : ℕ) :
       Nat.succ_eq_add_one, ← add_assoc, pochhammer_succ_right, Nat.cast_add, add_assoc]
 #align pochhammer_mul pochhammer_mul
 
-theorem pochhammer_nat_eq_ascFactorial (n : ℕ):
+theorem pochhammer_nat_eq_ascFactorial (n : ℕ) :
     ∀ k, (pochhammer ℕ k).eval (n + 1) = n.ascFactorial k
   | 0 => by rw [pochhammer_zero, eval_one, Nat.ascFactorial_zero]
   | t + 1 => by
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -96,8 +96,8 @@ theorem pochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (pochhammer S n).
   simp [pochhammer_eval_zero, h]
 #align pochhammer_ne_zero_eval_zero pochhammer_ne_zero_eval_zero
 
-theorem pochhammer_succ_right (n : ℕ) : pochhammer S (n + 1) = pochhammer S n * (X + (n : S[X])) :=
-  by
+theorem pochhammer_succ_right (n : ℕ) :
+    pochhammer S (n + 1) = pochhammer S n * (X + (n : S[X])) := by
   suffices h : pochhammer ℕ (n + 1) = pochhammer ℕ n * (X + (n : ℕ[X]))
   · apply_fun Polynomial.map (algebraMap ℕ S) at h
     simpa only [pochhammer_map, Polynomial.map_mul, Polynomial.map_add, map_X,
chore: tidy various files (#3124)
Diff
@@ -17,12 +17,12 @@ import Mathlib.Data.Polynomial.Eval
 We define and prove some basic relations about
 `pochhammer S n : S[X] := X * (X + 1) * ... * (X + n - 1)`
 which is also known as the rising factorial. A version of this definition
-that is focused on `nat` can be found in `data.nat.factorial` as `nat.asc_factorial`.
+that is focused on `Nat` can be found in `Data.Nat.Factorial` as `Nat.ascFactorial`.
 
 ## Implementation
 
 As with many other families of polynomials, even though the coefficients are always in `ℕ`,
-we define the polynomial with coefficients in any `[semiring S]`.
+we define the polynomial with coefficients in any `[Semiring S]`.
 
 ## TODO
 
@@ -77,8 +77,7 @@ end
 
 @[simp, norm_cast]
 theorem pochhammer_eval_cast (n k : ℕ) :
-    (((pochhammer ℕ n).eval k : ℕ) : S) = ((pochhammer S n).eval k : S):=
-  by
+    (((pochhammer ℕ n).eval k : ℕ) : S) = ((pochhammer S n).eval k : S) := by
   rw [← pochhammer_map (algebraMap ℕ S), eval_map, ← eq_natCast (algebraMap ℕ S), eval₂_at_nat_cast,
     Nat.cast_id, eq_natCast]
 #align pochhammer_eval_cast pochhammer_eval_cast
@@ -116,7 +115,7 @@ theorem pochhammer_succ_eval {S : Type _} [Semiring S] (n : ℕ) (k : S) :
     eval_C_mul, Nat.cast_comm, ← mul_add]
 #align pochhammer_succ_eval pochhammer_succ_eval
 
-theorem pochhammer_succ_comp_x_add_one (n : ℕ) :
+theorem pochhammer_succ_comp_X_add_one (n : ℕ) :
     (pochhammer S (n + 1)).comp (X + 1) =
       pochhammer S (n + 1) + (n + 1) • (pochhammer S n).comp (X + 1) := by
   suffices (pochhammer ℕ (n + 1)).comp (X + 1) =
@@ -128,28 +127,28 @@ theorem pochhammer_succ_comp_x_add_one (n : ℕ) :
     add_comm, ← add_assoc]
   ring
 set_option linter.uppercaseLean3 false in
-#align pochhammer_succ_comp_X_add_one pochhammer_succ_comp_x_add_one
+#align pochhammer_succ_comp_X_add_one pochhammer_succ_comp_X_add_one
 
-theorem Polynomial.mul_x_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
+theorem Polynomial.mul_X_add_nat_cast_comp {p q : S[X]} {n : ℕ} :
     (p * (X + (n : S[X]))).comp q = p.comp q * (q + n) := by
   rw [mul_add, add_comp, mul_X_comp, ← Nat.cast_comm, nat_cast_mul_comp, Nat.cast_comm, mul_add]
 set_option linter.uppercaseLean3 false in
-#align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_x_add_nat_cast_comp
+#align polynomial.mul_X_add_nat_cast_comp Polynomial.mul_X_add_nat_cast_comp
 
 theorem pochhammer_mul (n m : ℕ) :
     pochhammer S n * (pochhammer S m).comp (X + (n : S[X])) = pochhammer S (n + m) := by
   induction' m with m ih
   · simp
-  · rw [pochhammer_succ_right, Polynomial.mul_x_add_nat_cast_comp, ← mul_assoc, ih,
+  · rw [pochhammer_succ_right, Polynomial.mul_X_add_nat_cast_comp, ← mul_assoc, ih,
       Nat.succ_eq_add_one, ← add_assoc, pochhammer_succ_right, Nat.cast_add, add_assoc]
 #align pochhammer_mul pochhammer_mul
 
 theorem pochhammer_nat_eq_ascFactorial (n : ℕ):
     ∀ k, (pochhammer ℕ k).eval (n + 1) = n.ascFactorial k
-  | 0 => (by erw [eval_one]; rfl)
+  | 0 => by rw [pochhammer_zero, eval_one, Nat.ascFactorial_zero]
   | t + 1 => by
     rw [pochhammer_succ_right, eval_mul, pochhammer_nat_eq_ascFactorial n t]
-    suffices n.ascFactorial t * (n + 1 + t) = n.ascFactorial (t + 1) by simpa
+    simp only [eval_add, eval_X, eval_nat_cast, Nat.cast_id]
     rw [Nat.ascFactorial_succ, add_right_comm, mul_comm]
 #align pochhammer_nat_eq_asc_factorial pochhammer_nat_eq_ascFactorial
 
feat: port RingTheory.Polynomial.Pochhammer (#2733)

Co-authored-by: Moritz Firsching <firsching@google.com>

Dependencies 8 + 395

396 files ported (98.0%)
164088 lines ported (98.1%)
Show graph

The unported dependencies are