ring_theory.witt_vector.basic ⟷ Mathlib.RingTheory.WittVector.Basic

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -170,18 +170,18 @@ theorem pow (n : β„•) : mapFun f (x ^ n) = mapFun f x ^ n := by
 #align witt_vector.map_fun.pow WittVector.mapFun.pow
 -/
 
-#print WittVector.mapFun.nat_cast /-
-theorem nat_cast (n : β„•) : mapFun f (n : π•Ž R) = n :=
+#print WittVector.mapFun.natCast /-
+theorem natCast (n : β„•) : mapFun f (n : π•Ž R) = n :=
   show mapFun f n.unaryCast = coe n by
     induction n <;> simp [*, Nat.unaryCast, add, one, zero] <;> rfl
-#align witt_vector.map_fun.nat_cast WittVector.mapFun.nat_cast
+#align witt_vector.map_fun.nat_cast WittVector.mapFun.natCast
 -/
 
-#print WittVector.mapFun.int_cast /-
-theorem int_cast (n : β„€) : mapFun f (n : π•Ž R) = n :=
+#print WittVector.mapFun.intCast /-
+theorem intCast (n : β„€) : mapFun f (n : π•Ž R) = n :=
   show mapFun f n.castDef = coe n by
     cases n <;> simp [*, Int.castDef, add, one, neg, zero, nat_cast] <;> rfl
-#align witt_vector.map_fun.int_cast WittVector.mapFun.int_cast
+#align witt_vector.map_fun.int_cast WittVector.mapFun.intCast
 -/
 
 end MapFun
@@ -299,7 +299,7 @@ private def comm_ring_aux₁ : CommRing (π•Ž (MvPolynomial R β„š)) :=
 private def comm_ring_auxβ‚‚ : CommRing (π•Ž (MvPolynomial R β„€)) :=
   (mapFun.injective _ <| map_injective (Int.castRingHom β„š) Int.cast_injective).CommRing _
     (mapFun.zero _) (mapFun.one _) (mapFun.add _) (mapFun.mul _) (mapFun.neg _) (mapFun.sub _)
-    (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.nat_cast _) (mapFun.int_cast _)
+    (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.natCast _) (mapFun.intCast _)
 
 attribute [reducible] comm_ring_auxβ‚‚
 
@@ -307,7 +307,7 @@ attribute [reducible] comm_ring_auxβ‚‚
 instance : CommRing (π•Ž R) :=
   (mapFun.surjective _ <| counit_surjective _).CommRing (mapFun <| MvPolynomial.counit _)
     (mapFun.zero _) (mapFun.one _) (mapFun.add _) (mapFun.mul _) (mapFun.neg _) (mapFun.sub _)
-    (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.nat_cast _) (mapFun.int_cast _)
+    (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.natCast _) (mapFun.intCast _)
 
 variable {p R}
 
Diff
@@ -241,7 +241,7 @@ private theorem ghost_fun_add : ghostFun (x + y) = ghostFun x + ghostFun y := by
 private theorem ghost_fun_nat_cast (i : β„•) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.unaryCast = _ by
     induction i <;>
-      simp [*, Nat.unaryCast, ghost_fun_zero, ghost_fun_one, ghost_fun_add, -Pi.coe_nat]
+      simp [*, Nat.unaryCast, ghost_fun_zero, ghost_fun_one, ghost_fun_add, -Pi.natCast_def]
 
 private theorem ghost_fun_sub : ghostFun (x - y) = ghostFun x - ghostFun y := by
   ghost_fun_tac X 0 - X 1,![x.coeff, y.coeff]
@@ -253,7 +253,8 @@ private theorem ghost_fun_neg : ghostFun (-x) = -ghostFun x := by ghost_fun_tac-
 
 private theorem ghost_fun_int_cast (i : β„€) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.castDef = _ by
-    cases i <;> simp [*, Int.castDef, ghost_fun_nat_cast, ghost_fun_neg, -Pi.coe_nat, -Pi.coe_int]
+    cases i <;>
+      simp [*, Int.castDef, ghost_fun_nat_cast, ghost_fun_neg, -Pi.natCast_def, -Pi.intCast_def]
 
 private theorem ghost_fun_nsmul (m : β„•) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
   ghost_fun_tac m β€’ X 0,![x.coeff]
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin, Robert Y. Lewis
 -/
-import Data.MvPolynomial.Counit
-import Data.MvPolynomial.Invertible
+import Algebra.MvPolynomial.Counit
+import Algebra.MvPolynomial.Invertible
 import RingTheory.WittVector.Defs
 
 #align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"6b31d1eebd64eab86d5bd9936bfaada6ca8b5842"
Diff
@@ -278,13 +278,13 @@ private def ghost_equiv' [Invertible (p : R)] : π•Ž R ≃ (β„• β†’ R)
     intro x
     ext n
     have := bind₁_wittPolynomial_xInTermsOfW p R n
-    apply_fun aeval x.coeff at this 
+    apply_fun aeval x.coeff at this
     simpa only [aeval_bind₁, aeval_X, ghost_fun, aeval_wittPolynomial]
   right_inv := by
     intro x
     ext n
     have := bind₁_xInTermsOfW_wittPolynomial p R n
-    apply_fun aeval x at this 
+    apply_fun aeval x at this
     simpa only [aeval_bind₁, aeval_X, ghost_fun, aeval_wittPolynomial]
 
 @[local instance]
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin, Robert Y. Lewis
 -/
-import Mathbin.Data.MvPolynomial.Counit
-import Mathbin.Data.MvPolynomial.Invertible
-import Mathbin.RingTheory.WittVector.Defs
+import Data.MvPolynomial.Counit
+import Data.MvPolynomial.Invertible
+import RingTheory.WittVector.Defs
 
 #align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"6b31d1eebd64eab86d5bd9936bfaada6ca8b5842"
 
@@ -91,7 +91,7 @@ theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f :
 
 variable (f : R β†’+* S) (x y : π•Ž R)
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
 /-- Auxiliary tactic for showing that `map_fun` respects the ring operations. -/
 unsafe def map_fun_tac : tactic Unit :=
   sorry
@@ -193,9 +193,9 @@ section Tactic
 /- ./././Mathport/Syntax/Translate/Tactic/Mathlib/Core.lean:38:34: unsupported: setup_tactic_parser -/
 open Tactic
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:337:4: warning: unsupported (TODO): `[tacs] -/
 /-- An auxiliary tactic for proving that `ghost_fun` respects the ring operations. -/
 unsafe def tactic.interactive.ghost_fun_tac (Ο† fn : parse parser.pexpr) : tactic Unit := do
   let fn ← to_expr `(($(fn) : Fin _ β†’ β„• β†’ R))
Diff
@@ -350,7 +350,7 @@ def ghostMap : π•Ž R β†’+* β„• β†’ R where
   map_zero' := ghostFun_zero
   map_one' := ghostFun_one
   map_add' := ghostFun_add
-  map_mul' := ghostFun_mul
+  map_mul' := ghostFun_hMul
 #align witt_vector.ghost_map WittVector.ghostMap
 -/
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2020 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin, Robert Y. Lewis
-
-! This file was ported from Lean 3 source module ring_theory.witt_vector.basic
-! leanprover-community/mathlib commit 6b31d1eebd64eab86d5bd9936bfaada6ca8b5842
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.MvPolynomial.Counit
 import Mathbin.Data.MvPolynomial.Invertible
 import Mathbin.RingTheory.WittVector.Defs
 
+#align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"6b31d1eebd64eab86d5bd9936bfaada6ca8b5842"
+
 /-!
 # Witt vectors
 
Diff
@@ -234,12 +234,12 @@ theorem matrix_vecEmpty_coeff {R} (i j) :
 #align witt_vector.matrix_vec_empty_coeff WittVector.matrix_vecEmpty_coeff
 -/
 
-private theorem ghost_fun_zero : ghostFun (0 : π•Ž R) = 0 := by ghost_fun_tac 0, ![]
+private theorem ghost_fun_zero : ghostFun (0 : π•Ž R) = 0 := by ghost_fun_tac 0,![]
 
-private theorem ghost_fun_one : ghostFun (1 : π•Ž R) = 1 := by ghost_fun_tac 1, ![]
+private theorem ghost_fun_one : ghostFun (1 : π•Ž R) = 1 := by ghost_fun_tac 1,![]
 
 private theorem ghost_fun_add : ghostFun (x + y) = ghostFun x + ghostFun y := by
-  ghost_fun_tac X 0 + X 1, ![x.coeff, y.coeff]
+  ghost_fun_tac X 0 + X 1,![x.coeff, y.coeff]
 
 private theorem ghost_fun_nat_cast (i : β„•) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.unaryCast = _ by
@@ -247,25 +247,25 @@ private theorem ghost_fun_nat_cast (i : β„•) : ghostFun (i : π•Ž R) = i :=
       simp [*, Nat.unaryCast, ghost_fun_zero, ghost_fun_one, ghost_fun_add, -Pi.coe_nat]
 
 private theorem ghost_fun_sub : ghostFun (x - y) = ghostFun x - ghostFun y := by
-  ghost_fun_tac X 0 - X 1, ![x.coeff, y.coeff]
+  ghost_fun_tac X 0 - X 1,![x.coeff, y.coeff]
 
 private theorem ghost_fun_mul : ghostFun (x * y) = ghostFun x * ghostFun y := by
-  ghost_fun_tac X 0 * X 1, ![x.coeff, y.coeff]
+  ghost_fun_tac X 0 * X 1,![x.coeff, y.coeff]
 
-private theorem ghost_fun_neg : ghostFun (-x) = -ghostFun x := by ghost_fun_tac -X 0, ![x.coeff]
+private theorem ghost_fun_neg : ghostFun (-x) = -ghostFun x := by ghost_fun_tac-X 0,![x.coeff]
 
 private theorem ghost_fun_int_cast (i : β„€) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.castDef = _ by
     cases i <;> simp [*, Int.castDef, ghost_fun_nat_cast, ghost_fun_neg, -Pi.coe_nat, -Pi.coe_int]
 
 private theorem ghost_fun_nsmul (m : β„•) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
-  ghost_fun_tac m β€’ X 0, ![x.coeff]
+  ghost_fun_tac m β€’ X 0,![x.coeff]
 
 private theorem ghost_fun_zsmul (m : β„€) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
-  ghost_fun_tac m β€’ X 0, ![x.coeff]
+  ghost_fun_tac m β€’ X 0,![x.coeff]
 
 private theorem ghost_fun_pow (m : β„•) : ghostFun (x ^ m) = ghostFun x ^ m := by
-  ghost_fun_tac X 0 ^ m, ![x.coeff]
+  ghost_fun_tac X 0 ^ m,![x.coeff]
 
 end GhostFun
 
Diff
@@ -63,7 +63,6 @@ variable {p : β„•} {R S T : Type _} [hp : Fact p.Prime] [CommRing R] [CommRing S
 
 variable {Ξ± : Type _} {Ξ² : Type _}
 
--- mathport name: exprπ•Ž
 local notation "π•Ž" => WittVector p
 
 -- type as `\bbW`
@@ -80,14 +79,18 @@ def mapFun (f : Ξ± β†’ Ξ²) : π•Ž Ξ± β†’ π•Ž Ξ² := fun x => mk' _ (f ∘ x.coef
 
 namespace MapFun
 
+#print WittVector.mapFun.injective /-
 theorem injective (f : Ξ± β†’ Ξ²) (hf : Injective f) : Injective (mapFun f : π•Ž Ξ± β†’ π•Ž Ξ²) := fun x y h =>
   ext fun n => hf (congr_arg (fun x => coeff x n) h : _)
 #align witt_vector.map_fun.injective WittVector.mapFun.injective
+-/
 
+#print WittVector.mapFun.surjective /-
 theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f : π•Ž Ξ± β†’ π•Ž Ξ²) := fun x =>
   ⟨mk' _ fun n => Classical.choose <| hf <| x.coeff n, by ext n; dsimp [map_fun];
     rw [Classical.choose_spec (hf (x.coeff n))]⟩
 #align witt_vector.map_fun.surjective WittVector.mapFun.surjective
+-/
 
 variable (f : R β†’+* S) (x y : π•Ž R)
 
@@ -97,72 +100,92 @@ unsafe def map_fun_tac : tactic Unit :=
   sorry
 #align witt_vector.map_fun.map_fun_tac witt_vector.map_fun.map_fun_tac
 
-include hp
-
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.zero /-
 -- We do not tag these lemmas as `@[simp]` because they will be bundled in `map` later on.
 theorem zero : mapFun f (0 : π•Ž R) = 0 := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.zero WittVector.mapFun.zero
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.one /-
 theorem one : mapFun f (1 : π•Ž R) = 1 := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.one WittVector.mapFun.one
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.add /-
 theorem add : mapFun f (x + y) = mapFun f x + mapFun f y := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.add WittVector.mapFun.add
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.sub /-
 theorem sub : mapFun f (x - y) = mapFun f x - mapFun f y := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.sub WittVector.mapFun.sub
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.mul /-
 theorem mul : mapFun f (x * y) = mapFun f x * mapFun f y := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.mul WittVector.mapFun.mul
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.neg /-
 theorem neg : mapFun f (-x) = -mapFun f x := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.neg WittVector.mapFun.neg
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.nsmul /-
 theorem nsmul (n : β„•) : mapFun f (n β€’ x) = n β€’ mapFun f x := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.nsmul WittVector.mapFun.nsmul
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.zsmul /-
 theorem zsmul (z : β„€) : mapFun f (z β€’ x) = z β€’ mapFun f x := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.zsmul WittVector.mapFun.zsmul
+-/
 
 /- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+#print WittVector.mapFun.pow /-
 theorem pow (n : β„•) : mapFun f (x ^ n) = mapFun f x ^ n := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.pow WittVector.mapFun.pow
+-/
 
+#print WittVector.mapFun.nat_cast /-
 theorem nat_cast (n : β„•) : mapFun f (n : π•Ž R) = n :=
   show mapFun f n.unaryCast = coe n by
     induction n <;> simp [*, Nat.unaryCast, add, one, zero] <;> rfl
 #align witt_vector.map_fun.nat_cast WittVector.mapFun.nat_cast
+-/
 
+#print WittVector.mapFun.int_cast /-
 theorem int_cast (n : β„€) : mapFun f (n : π•Ž R) = n :=
   show mapFun f n.castDef = coe n by
     cases n <;> simp [*, Int.castDef, add, one, neg, zero, nat_cast] <;> rfl
 #align witt_vector.map_fun.int_cast WittVector.mapFun.int_cast
+-/
 
 end MapFun
 
@@ -200,13 +223,9 @@ private def ghost_fun : π•Ž R β†’ β„• β†’ R := fun x n => aeval x.coeff (W_ β„€
 
 section GhostFun
 
-include hp
-
 -- The following lemmas are not `@[simp]` because they will be bundled in `ghost_map` later on.
 variable (x y : π•Ž R)
 
-omit hp
-
 #print WittVector.matrix_vecEmpty_coeff /-
 @[local simp]
 theorem matrix_vecEmpty_coeff {R} (i j) :
@@ -215,8 +234,6 @@ theorem matrix_vecEmpty_coeff {R} (i j) :
 #align witt_vector.matrix_vec_empty_coeff WittVector.matrix_vecEmpty_coeff
 -/
 
-include hp
-
 private theorem ghost_fun_zero : ghostFun (0 : π•Ž R) = 0 := by ghost_fun_tac 0, ![]
 
 private theorem ghost_fun_one : ghostFun (1 : π•Ž R) = 1 := by ghost_fun_tac 1, ![]
@@ -273,8 +290,6 @@ private def ghost_equiv' [Invertible (p : R)] : π•Ž R ≃ (β„• β†’ R)
     apply_fun aeval x at this 
     simpa only [aeval_bind₁, aeval_X, ghost_fun, aeval_wittPolynomial]
 
-include hp
-
 @[local instance]
 private def comm_ring_aux₁ : CommRing (π•Ž (MvPolynomial R β„š)) :=
   letI : CommRing (MvPolynomial R β„š) := MvPolynomial.commRing
@@ -298,6 +313,7 @@ instance : CommRing (π•Ž R) :=
 
 variable {p R}
 
+#print WittVector.map /-
 /-- `witt_vector.map f` is the ring homomorphism `π•Ž R β†’+* π•Ž S` naturally induced
 by a ring homomorphism `f : R β†’+* S`. It acts coefficientwise. -/
 noncomputable def map (f : R β†’+* S) : π•Ž R β†’+* π•Ž S
@@ -308,20 +324,28 @@ noncomputable def map (f : R β†’+* S) : π•Ž R β†’+* π•Ž S
   map_add' := mapFun.add f
   map_mul' := mapFun.mul f
 #align witt_vector.map WittVector.map
+-/
 
+#print WittVector.map_injective /-
 theorem map_injective (f : R β†’+* S) (hf : Injective f) : Injective (map f : π•Ž R β†’ π•Ž S) :=
   mapFun.injective f hf
 #align witt_vector.map_injective WittVector.map_injective
+-/
 
+#print WittVector.map_surjective /-
 theorem map_surjective (f : R β†’+* S) (hf : Surjective f) : Surjective (map f : π•Ž R β†’ π•Ž S) :=
   mapFun.surjective f hf
 #align witt_vector.map_surjective WittVector.map_surjective
+-/
 
+#print WittVector.map_coeff /-
 @[simp]
 theorem map_coeff (f : R β†’+* S) (x : π•Ž R) (n : β„•) : (map f x).coeff n = f (x.coeff n) :=
   rfl
 #align witt_vector.map_coeff WittVector.map_coeff
+-/
 
+#print WittVector.ghostMap /-
 /-- `witt_vector.ghost_map` is a ring homomorphism that maps each Witt vector
 to the sequence of its ghost components. -/
 def ghostMap : π•Ž R β†’+* β„• β†’ R where
@@ -331,42 +355,56 @@ def ghostMap : π•Ž R β†’+* β„• β†’ R where
   map_add' := ghostFun_add
   map_mul' := ghostFun_mul
 #align witt_vector.ghost_map WittVector.ghostMap
+-/
 
+#print WittVector.ghostComponent /-
 /-- Evaluates the `n`th Witt polynomial on the first `n` coefficients of `x`,
 producing a value in `R`. -/
 def ghostComponent (n : β„•) : π•Ž R β†’+* R :=
   (Pi.evalRingHom _ n).comp ghostMap
 #align witt_vector.ghost_component WittVector.ghostComponent
+-/
 
+#print WittVector.ghostComponent_apply /-
 theorem ghostComponent_apply (n : β„•) (x : π•Ž R) : ghostComponent n x = aeval x.coeff (W_ β„€ n) :=
   rfl
 #align witt_vector.ghost_component_apply WittVector.ghostComponent_apply
+-/
 
+#print WittVector.ghostMap_apply /-
 @[simp]
 theorem ghostMap_apply (x : π•Ž R) (n : β„•) : ghostMap x n = ghostComponent n x :=
   rfl
 #align witt_vector.ghost_map_apply WittVector.ghostMap_apply
+-/
 
 section Invertible
 
 variable (p R) [Invertible (p : R)]
 
+#print WittVector.ghostEquiv /-
 /-- `witt_vector.ghost_map` is a ring isomorphism when `p` is invertible in `R`. -/
 def ghostEquiv : π•Ž R ≃+* (β„• β†’ R) :=
   { (ghostMap : π•Ž R β†’+* β„• β†’ R), ghostEquiv' p R with }
 #align witt_vector.ghost_equiv WittVector.ghostEquiv
+-/
 
+#print WittVector.ghostEquiv_coe /-
 @[simp]
 theorem ghostEquiv_coe : (ghostEquiv p R : π•Ž R β†’+* β„• β†’ R) = ghostMap :=
   rfl
 #align witt_vector.ghost_equiv_coe WittVector.ghostEquiv_coe
+-/
 
+#print WittVector.ghostMap.bijective_of_invertible /-
 theorem ghostMap.bijective_of_invertible : Function.Bijective (ghostMap : π•Ž R β†’ β„• β†’ R) :=
   (ghostEquiv p R).Bijective
 #align witt_vector.ghost_map.bijective_of_invertible WittVector.ghostMap.bijective_of_invertible
+-/
 
 end Invertible
 
+#print WittVector.constantCoeff /-
 /-- `witt_vector.coeff x 0` as a `ring_hom` -/
 @[simps]
 noncomputable def constantCoeff : π•Ž R β†’+* R
@@ -377,6 +415,7 @@ noncomputable def constantCoeff : π•Ž R β†’+* R
   map_add' := add_coeff_zero
   map_mul' := mul_coeff_zero
 #align witt_vector.constant_coeff WittVector.constantCoeff
+-/
 
 instance [Nontrivial R] : Nontrivial (π•Ž R) :=
   constantCoeff.domain_nontrivial
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin, Robert Y. Lewis
 
 ! This file was ported from Lean 3 source module ring_theory.witt_vector.basic
-! leanprover-community/mathlib commit 9556784a5b84697562e9c6acb40500d4a82e675a
+! leanprover-community/mathlib commit 6b31d1eebd64eab86d5bd9936bfaada6ca8b5842
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.RingTheory.WittVector.Defs
 /-!
 # Witt vectors
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file verifies that the ring operations on `witt_vector p R`
 satisfy the axioms of a commutative ring.
 
Diff
@@ -88,7 +88,7 @@ theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f :
 
 variable (f : R β†’+* S) (x y : π•Ž R)
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
 /-- Auxiliary tactic for showing that `map_fun` respects the ring operations. -/
 unsafe def map_fun_tac : tactic Unit :=
   sorry
@@ -170,9 +170,9 @@ section Tactic
 /- ./././Mathport/Syntax/Translate/Tactic/Mathlib/Core.lean:38:34: unsupported: setup_tactic_parser -/
 open Tactic
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:336:4: warning: unsupported (TODO): `[tacs] -/
 /-- An auxiliary tactic for proving that `ghost_fun` respects the ring operations. -/
 unsafe def tactic.interactive.ghost_fun_tac (Ο† fn : parse parser.pexpr) : tactic Unit := do
   let fn ← to_expr `(($(fn) : Fin _ β†’ β„• β†’ R))
Diff
@@ -68,10 +68,12 @@ open scoped Witt
 
 namespace WittVector
 
+#print WittVector.mapFun /-
 /-- `f : Ξ± β†’ Ξ²` induces a map from `π•Ž Ξ±` to `π•Ž Ξ²` by applying `f` componentwise.
 If `f` is a ring homomorphism, then so is `f`, see `witt_vector.map f`. -/
 def mapFun (f : Ξ± β†’ Ξ²) : π•Ž Ξ± β†’ π•Ž Ξ² := fun x => mk' _ (f ∘ x.coeff)
 #align witt_vector.map_fun WittVector.mapFun
+-/
 
 namespace MapFun
 
@@ -202,11 +204,13 @@ variable (x y : π•Ž R)
 
 omit hp
 
+#print WittVector.matrix_vecEmpty_coeff /-
 @[local simp]
 theorem matrix_vecEmpty_coeff {R} (i j) :
     @coeff p R (Matrix.vecEmpty i) j = (Matrix.vecEmpty i : β„• β†’ R) j := by
   rcases i with ⟨_ | _ | _ | _ | i_val, ⟨⟩⟩
 #align witt_vector.matrix_vec_empty_coeff WittVector.matrix_vecEmpty_coeff
+-/
 
 include hp
 
Diff
@@ -70,7 +70,7 @@ namespace WittVector
 
 /-- `f : Ξ± β†’ Ξ²` induces a map from `π•Ž Ξ±` to `π•Ž Ξ²` by applying `f` componentwise.
 If `f` is a ring homomorphism, then so is `f`, see `witt_vector.map f`. -/
-def mapFun (f : Ξ± β†’ Ξ²) : π•Ž Ξ± β†’ π•Ž Ξ² := fun x => mk _ (f ∘ x.coeff)
+def mapFun (f : Ξ± β†’ Ξ²) : π•Ž Ξ± β†’ π•Ž Ξ² := fun x => mk' _ (f ∘ x.coeff)
 #align witt_vector.map_fun WittVector.mapFun
 
 namespace MapFun
@@ -80,7 +80,7 @@ theorem injective (f : Ξ± β†’ Ξ²) (hf : Injective f) : Injective (mapFun f : 
 #align witt_vector.map_fun.injective WittVector.mapFun.injective
 
 theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f : π•Ž Ξ± β†’ π•Ž Ξ²) := fun x =>
-  ⟨mk _ fun n => Classical.choose <| hf <| x.coeff n, by ext n; dsimp [map_fun];
+  ⟨mk' _ fun n => Classical.choose <| hf <| x.coeff n, by ext n; dsimp [map_fun];
     rw [Classical.choose_spec (hf (x.coeff n))]⟩
 #align witt_vector.map_fun.surjective WittVector.mapFun.surjective
 
@@ -252,7 +252,7 @@ In `witt_vector.ghost_equiv` we upgrade this to an isomorphism of rings. -/
 private def ghost_equiv' [Invertible (p : R)] : π•Ž R ≃ (β„• β†’ R)
     where
   toFun := ghostFun
-  invFun x := mk p fun n => aeval x (xInTermsOfW p R n)
+  invFun x := mk' p fun n => aeval x (xInTermsOfW p R n)
   left_inv := by
     intro x
     ext n
Diff
@@ -257,13 +257,13 @@ private def ghost_equiv' [Invertible (p : R)] : π•Ž R ≃ (β„• β†’ R)
     intro x
     ext n
     have := bind₁_wittPolynomial_xInTermsOfW p R n
-    apply_fun aeval x.coeff  at this 
+    apply_fun aeval x.coeff at this 
     simpa only [aeval_bind₁, aeval_X, ghost_fun, aeval_wittPolynomial]
   right_inv := by
     intro x
     ext n
     have := bind₁_xInTermsOfW_wittPolynomial p R n
-    apply_fun aeval x  at this 
+    apply_fun aeval x at this 
     simpa only [aeval_bind₁, aeval_X, ghost_fun, aeval_wittPolynomial]
 
 include hp
Diff
@@ -257,13 +257,13 @@ private def ghost_equiv' [Invertible (p : R)] : π•Ž R ≃ (β„• β†’ R)
     intro x
     ext n
     have := bind₁_wittPolynomial_xInTermsOfW p R n
-    apply_fun aeval x.coeff  at this
+    apply_fun aeval x.coeff  at this 
     simpa only [aeval_bind₁, aeval_X, ghost_fun, aeval_wittPolynomial]
   right_inv := by
     intro x
     ext n
     have := bind₁_xInTermsOfW_wittPolynomial p R n
-    apply_fun aeval x  at this
+    apply_fun aeval x  at this 
     simpa only [aeval_bind₁, aeval_X, ghost_fun, aeval_wittPolynomial]
 
 include hp
Diff
@@ -54,7 +54,7 @@ noncomputable section
 
 open MvPolynomial Function
 
-open BigOperators
+open scoped BigOperators
 
 variable {p : β„•} {R S T : Type _} [hp : Fact p.Prime] [CommRing R] [CommRing S] [CommRing T]
 
@@ -64,7 +64,7 @@ variable {Ξ± : Type _} {Ξ² : Type _}
 local notation "π•Ž" => WittVector p
 
 -- type as `\bbW`
-open Witt
+open scoped Witt
 
 namespace WittVector
 
Diff
@@ -80,10 +80,7 @@ theorem injective (f : Ξ± β†’ Ξ²) (hf : Injective f) : Injective (mapFun f : 
 #align witt_vector.map_fun.injective WittVector.mapFun.injective
 
 theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f : π•Ž Ξ± β†’ π•Ž Ξ²) := fun x =>
-  ⟨mk _ fun n => Classical.choose <| hf <| x.coeff n,
-    by
-    ext n
-    dsimp [map_fun]
+  ⟨mk _ fun n => Classical.choose <| hf <| x.coeff n, by ext n; dsimp [map_fun];
     rw [Classical.choose_spec (hf (x.coeff n))]⟩
 #align witt_vector.map_fun.surjective WittVector.mapFun.surjective
 
Diff
@@ -195,7 +195,6 @@ This function will be bundled as the ring homomorphism `witt_vector.ghost_map`
 once the ring structure is available,
 but we rely on it to set up the ring structure in the first place. -/
 private def ghost_fun : π•Ž R β†’ β„• β†’ R := fun x n => aeval x.coeff (W_ β„€ n)
-#align witt_vector.ghost_fun witt_vector.ghost_fun
 
 section GhostFun
 
@@ -215,48 +214,37 @@ theorem matrix_vecEmpty_coeff {R} (i j) :
 include hp
 
 private theorem ghost_fun_zero : ghostFun (0 : π•Ž R) = 0 := by ghost_fun_tac 0, ![]
-#align witt_vector.ghost_fun_zero witt_vector.ghost_fun_zero
 
 private theorem ghost_fun_one : ghostFun (1 : π•Ž R) = 1 := by ghost_fun_tac 1, ![]
-#align witt_vector.ghost_fun_one witt_vector.ghost_fun_one
 
 private theorem ghost_fun_add : ghostFun (x + y) = ghostFun x + ghostFun y := by
   ghost_fun_tac X 0 + X 1, ![x.coeff, y.coeff]
-#align witt_vector.ghost_fun_add witt_vector.ghost_fun_add
 
 private theorem ghost_fun_nat_cast (i : β„•) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.unaryCast = _ by
     induction i <;>
       simp [*, Nat.unaryCast, ghost_fun_zero, ghost_fun_one, ghost_fun_add, -Pi.coe_nat]
-#align witt_vector.ghost_fun_nat_cast witt_vector.ghost_fun_nat_cast
 
 private theorem ghost_fun_sub : ghostFun (x - y) = ghostFun x - ghostFun y := by
   ghost_fun_tac X 0 - X 1, ![x.coeff, y.coeff]
-#align witt_vector.ghost_fun_sub witt_vector.ghost_fun_sub
 
 private theorem ghost_fun_mul : ghostFun (x * y) = ghostFun x * ghostFun y := by
   ghost_fun_tac X 0 * X 1, ![x.coeff, y.coeff]
-#align witt_vector.ghost_fun_mul witt_vector.ghost_fun_mul
 
 private theorem ghost_fun_neg : ghostFun (-x) = -ghostFun x := by ghost_fun_tac -X 0, ![x.coeff]
-#align witt_vector.ghost_fun_neg witt_vector.ghost_fun_neg
 
 private theorem ghost_fun_int_cast (i : β„€) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.castDef = _ by
     cases i <;> simp [*, Int.castDef, ghost_fun_nat_cast, ghost_fun_neg, -Pi.coe_nat, -Pi.coe_int]
-#align witt_vector.ghost_fun_int_cast witt_vector.ghost_fun_int_cast
 
 private theorem ghost_fun_nsmul (m : β„•) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
   ghost_fun_tac m β€’ X 0, ![x.coeff]
-#align witt_vector.ghost_fun_nsmul witt_vector.ghost_fun_nsmul
 
 private theorem ghost_fun_zsmul (m : β„€) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
   ghost_fun_tac m β€’ X 0, ![x.coeff]
-#align witt_vector.ghost_fun_zsmul witt_vector.ghost_fun_zsmul
 
 private theorem ghost_fun_pow (m : β„•) : ghostFun (x ^ m) = ghostFun x ^ m := by
   ghost_fun_tac X 0 ^ m, ![x.coeff]
-#align witt_vector.ghost_fun_pow witt_vector.ghost_fun_pow
 
 end GhostFun
 
@@ -280,7 +268,6 @@ private def ghost_equiv' [Invertible (p : R)] : π•Ž R ≃ (β„• β†’ R)
     have := bind₁_xInTermsOfW_wittPolynomial p R n
     apply_fun aeval x  at this
     simpa only [aeval_bind₁, aeval_X, ghost_fun, aeval_wittPolynomial]
-#align witt_vector.ghost_equiv' witt_vector.ghost_equiv'
 
 include hp
 
@@ -290,14 +277,12 @@ private def comm_ring_aux₁ : CommRing (π•Ž (MvPolynomial R β„š)) :=
   (ghost_equiv' p (MvPolynomial R β„š)).Injective.CommRing ghost_fun ghost_fun_zero ghost_fun_one
     ghost_fun_add ghost_fun_mul ghost_fun_neg ghost_fun_sub ghost_fun_nsmul ghost_fun_zsmul
     ghost_fun_pow ghost_fun_nat_cast ghost_fun_int_cast
-#align witt_vector.comm_ring_aux₁ witt_vector.comm_ring_aux₁
 
 @[local instance]
 private def comm_ring_auxβ‚‚ : CommRing (π•Ž (MvPolynomial R β„€)) :=
   (mapFun.injective _ <| map_injective (Int.castRingHom β„š) Int.cast_injective).CommRing _
     (mapFun.zero _) (mapFun.one _) (mapFun.add _) (mapFun.mul _) (mapFun.neg _) (mapFun.sub _)
     (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.nat_cast _) (mapFun.int_cast _)
-#align witt_vector.comm_ring_auxβ‚‚ witt_vector.comm_ring_auxβ‚‚
 
 attribute [reducible] comm_ring_auxβ‚‚
 
Diff
@@ -89,7 +89,7 @@ theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f :
 
 variable (f : R β†’+* S) (x y : π•Ž R)
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
 /-- Auxiliary tactic for showing that `map_fun` respects the ring operations. -/
 unsafe def map_fun_tac : tactic Unit :=
   sorry
@@ -97,56 +97,56 @@ unsafe def map_fun_tac : tactic Unit :=
 
 include hp
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 -- We do not tag these lemmas as `@[simp]` because they will be bundled in `map` later on.
 theorem zero : mapFun f (0 : π•Ž R) = 0 := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.zero WittVector.mapFun.zero
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 theorem one : mapFun f (1 : π•Ž R) = 1 := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.one WittVector.mapFun.one
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 theorem add : mapFun f (x + y) = mapFun f x + mapFun f y := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.add WittVector.mapFun.add
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 theorem sub : mapFun f (x - y) = mapFun f x - mapFun f y := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.sub WittVector.mapFun.sub
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 theorem mul : mapFun f (x * y) = mapFun f x * mapFun f y := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.mul WittVector.mapFun.mul
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 theorem neg : mapFun f (-x) = -mapFun f x := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.neg WittVector.mapFun.neg
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 theorem nsmul (n : β„•) : mapFun f (n β€’ x) = n β€’ mapFun f x := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.nsmul WittVector.mapFun.nsmul
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 theorem zsmul (z : β„€) : mapFun f (z β€’ x) = z β€’ mapFun f x := by
   run_tac
     map_fun_tac
 #align witt_vector.map_fun.zsmul WittVector.mapFun.zsmul
 
-/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:72:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
+/- ./././Mathport/Syntax/Translate/Tactic/Builtin.lean:69:18: unsupported non-interactive tactic witt_vector.map_fun.map_fun_tac -/
 theorem pow (n : β„•) : mapFun f (x ^ n) = mapFun f x ^ n := by
   run_tac
     map_fun_tac
@@ -171,9 +171,9 @@ section Tactic
 /- ./././Mathport/Syntax/Translate/Tactic/Mathlib/Core.lean:38:34: unsupported: setup_tactic_parser -/
 open Tactic
 
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
-/- ./././Mathport/Syntax/Translate/Expr.lean:334:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
+/- ./././Mathport/Syntax/Translate/Expr.lean:330:4: warning: unsupported (TODO): `[tacs] -/
 /-- An auxiliary tactic for proving that `ghost_fun` respects the ring operations. -/
 unsafe def tactic.interactive.ghost_fun_tac (Ο† fn : parse parser.pexpr) : tactic Unit := do
   let fn ← to_expr `(($(fn) : Fin _ β†’ β„• β†’ R))

Changes in mathlib4

mathlib3
mathlib4
chore: remove a few miscellaneous now-resolved porting notes (#12127)
Diff
@@ -87,7 +87,7 @@ theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f :
 variable (f : R β†’+* S) (x y : WittVector p R)
 
 /-- Auxiliary tactic for showing that `mapFun` respects the ring operations. -/
---  porting note: a very crude port.
+-- porting note: a very crude port.
 macro "map_fun_tac" : tactic => `(tactic| (
   ext n
   simp only [mapFun, mk, comp_apply, zero_coeff, map_zero,
@@ -154,8 +154,7 @@ private def ghostFun : π•Ž R β†’ β„• β†’ R := fun x n => aeval x.coeff (W_ β„€
 section Tactic
 open Lean Elab Tactic
 
---  porting note: removed mathport output related to meta code.
---  I do not know what to do with `#align`
+-- porting note: removed mathport output related to meta code.
 /-- An auxiliary tactic for proving that `ghostFun` respects the ring operations. -/
 elab "ghost_fun_tac" Ο†:term "," fn:term : tactic => do
   evalTactic (← `(tactic| (
@@ -210,13 +209,13 @@ private theorem ghostFun_intCast (i : β„€) : ghostFun (i : π•Ž R) = i :=
       -Pi.intCast_def]
 
 private lemma ghostFun_nsmul (m : β„•) (x : WittVector p R) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
-  --  porting note: I had to add the explicit type ascription.
-  --  This could very well be due to my poor tactic writing!
+  -- porting note: I had to add the explicit type ascription.
+  -- This could very well be due to my poor tactic writing!
   ghost_fun_tac m β€’ (X 0 : MvPolynomial _ β„€), ![x.coeff]
 
 private lemma ghostFun_zsmul (m : β„€) (x : WittVector p R) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
-  --  porting note: I had to add the explicit type ascription.
-  --  This could very well be due to my poor tactic writing!
+  -- porting note: I had to add the explicit type ascription.
+  -- This could very well be due to my poor tactic writing!
   ghost_fun_tac m β€’ (X 0 : MvPolynomial _ β„€), ![x.coeff]
 
 private theorem ghostFun_pow (m : β„•) : ghostFun (x ^ m) = ghostFun x ^ m := by
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
@@ -128,15 +128,15 @@ theorem zsmul (z : β„€) (x : WittVector p R) : mapFun f (z β€’ x) = z β€’ mapFun
 theorem pow (n : β„•) : mapFun f (x ^ n) = mapFun f x ^ n := by map_fun_tac
 #align witt_vector.map_fun.pow WittVector.mapFun.pow
 
-theorem nat_cast (n : β„•) : mapFun f (n : π•Ž R) = n :=
+theorem natCast (n : β„•) : mapFun f (n : π•Ž R) = n :=
   show mapFun f n.unaryCast = (n : WittVector p S) by
     induction n <;> simp [*, Nat.unaryCast, add, one, zero] <;> rfl
-#align witt_vector.map_fun.nat_cast WittVector.mapFun.nat_cast
+#align witt_vector.map_fun.nat_cast WittVector.mapFun.natCast
 
-theorem int_cast (n : β„€) : mapFun f (n : π•Ž R) = n :=
+theorem intCast (n : β„€) : mapFun f (n : π•Ž R) = n :=
   show mapFun f n.castDef = (n : WittVector p S) by
-    cases n <;> simp [*, Int.castDef, add, one, neg, zero, nat_cast] <;> rfl
-#align witt_vector.map_fun.int_cast WittVector.mapFun.int_cast
+    cases n <;> simp [*, Int.castDef, add, one, neg, zero, natCast] <;> rfl
+#align witt_vector.map_fun.int_cast WittVector.mapFun.intCast
 
 end mapFun
 
@@ -191,7 +191,7 @@ private theorem ghostFun_one : ghostFun (1 : π•Ž R) = 1 := by
 private theorem ghostFun_add : ghostFun (x + y) = ghostFun x + ghostFun y := by
   ghost_fun_tac X 0 + X 1, ![x.coeff, y.coeff]
 
-private theorem ghostFun_nat_cast (i : β„•) : ghostFun (i : π•Ž R) = i :=
+private theorem ghostFun_natCast (i : β„•) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.unaryCast = _ by
     induction i <;>
       simp [*, Nat.unaryCast, ghostFun_zero, ghostFun_one, ghostFun_add, -Pi.natCast_def]
@@ -204,9 +204,9 @@ private theorem ghostFun_mul : ghostFun (x * y) = ghostFun x * ghostFun y := by
 
 private theorem ghostFun_neg : ghostFun (-x) = -ghostFun x := by ghost_fun_tac -X 0, ![x.coeff]
 
-private theorem ghostFun_int_cast (i : β„€) : ghostFun (i : π•Ž R) = i :=
+private theorem ghostFun_intCast (i : β„€) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.castDef = _ by
-    cases i <;> simp [*, Int.castDef, ghostFun_nat_cast, ghostFun_neg, -Pi.natCast_def,
+    cases i <;> simp [*, Int.castDef, ghostFun_natCast, ghostFun_neg, -Pi.natCast_def,
       -Pi.intCast_def]
 
 private lemma ghostFun_nsmul (m : β„•) (x : WittVector p R) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
@@ -251,13 +251,13 @@ private def comm_ring_aux₁ : CommRing (π•Ž (MvPolynomial R β„š)) :=
   -- letI : CommRing (MvPolynomial R β„š) := MvPolynomial.commRing
   (ghostEquiv' p (MvPolynomial R β„š)).injective.commRing ghostFun ghostFun_zero ghostFun_one
     ghostFun_add ghostFun_mul ghostFun_neg ghostFun_sub ghostFun_nsmul ghostFun_zsmul
-    ghostFun_pow ghostFun_nat_cast ghostFun_int_cast
+    ghostFun_pow ghostFun_natCast ghostFun_intCast
 
 @[local instance]
 private def comm_ring_auxβ‚‚ : CommRing (π•Ž (MvPolynomial R β„€)) :=
   (mapFun.injective _ <| map_injective (Int.castRingHom β„š) Int.cast_injective).commRing _
     (mapFun.zero _) (mapFun.one _) (mapFun.add _) (mapFun.mul _) (mapFun.neg _) (mapFun.sub _)
-    (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.nat_cast _) (mapFun.int_cast _)
+    (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.natCast _) (mapFun.intCast _)
 
 attribute [reducible] comm_ring_auxβ‚‚
 
@@ -265,7 +265,7 @@ attribute [reducible] comm_ring_auxβ‚‚
 instance : CommRing (π•Ž R) :=
   (mapFun.surjective _ <| counit_surjective _).commRing (mapFun <| MvPolynomial.counit _)
     (mapFun.zero _) (mapFun.one _) (mapFun.add _) (mapFun.mul _) (mapFun.neg _) (mapFun.sub _)
-    (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.nat_cast _) (mapFun.int_cast _)
+    (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.natCast _) (mapFun.intCast _)
 
 variable {p R}
 
chore: Rename coe_nat/coe_int/coe_rat to natCast/intCast/ratCast (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203

Diff
@@ -194,7 +194,7 @@ private theorem ghostFun_add : ghostFun (x + y) = ghostFun x + ghostFun y := by
 private theorem ghostFun_nat_cast (i : β„•) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.unaryCast = _ by
     induction i <;>
-      simp [*, Nat.unaryCast, ghostFun_zero, ghostFun_one, ghostFun_add, -Pi.coe_nat]
+      simp [*, Nat.unaryCast, ghostFun_zero, ghostFun_one, ghostFun_add, -Pi.natCast_def]
 
 private theorem ghostFun_sub : ghostFun (x - y) = ghostFun x - ghostFun y := by
   ghost_fun_tac X 0 - X 1, ![x.coeff, y.coeff]
@@ -206,7 +206,8 @@ private theorem ghostFun_neg : ghostFun (-x) = -ghostFun x := by ghost_fun_tac -
 
 private theorem ghostFun_int_cast (i : β„€) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.castDef = _ by
-    cases i <;> simp [*, Int.castDef, ghostFun_nat_cast, ghostFun_neg, -Pi.coe_nat, -Pi.coe_int]
+    cases i <;> simp [*, Int.castDef, ghostFun_nat_cast, ghostFun_neg, -Pi.natCast_def,
+      -Pi.intCast_def]
 
 private lemma ghostFun_nsmul (m : β„•) (x : WittVector p R) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
   --  porting note: I had to add the explicit type ascription.
chore: remove mathport name: <expression> lines (#11928)

Quoting [@digama0](https://github.com/digama0):

These were actually never meant to go in the file, they are basically debugging information and only useful on significantly broken mathport files. You can safely remove all of them.

Diff
@@ -56,7 +56,6 @@ open scoped BigOperators
 variable {p : β„•} {R S T : Type*} [hp : Fact p.Prime] [CommRing R] [CommRing S] [CommRing T]
 variable {Ξ± : Type*} {Ξ² : Type*}
 
--- mathport name: exprπ•Ž
 local notation "π•Ž" => WittVector p
 local notation "W_" => wittPolynomial p
 
chore(Field/InjSurj): Tidy (#11480)

Among other things, change the nsmul, zsmul, qsmul fields to have n/q come before x, because this matches the lemmas we want to write about them. It would be preferrable to perform the same changes to the AddMonoid/AddGroup-like typeclasses, but this is impossible with the current to_additive framework, so instead I have inserted some Function.swap at the interface between AddMonoid/AddGroup and Ring/Field.

Reduce the diff of #11203

Diff
@@ -120,10 +120,10 @@ theorem mul : mapFun f (x * y) = mapFun f x * mapFun f y := by map_fun_tac
 theorem neg : mapFun f (-x) = -mapFun f x := by map_fun_tac
 #align witt_vector.map_fun.neg WittVector.mapFun.neg
 
-theorem nsmul (n : β„•) : mapFun f (n β€’ x) = n β€’ mapFun f x := by map_fun_tac
+theorem nsmul (n : β„•) (x : WittVector p R) : mapFun f (n β€’ x) = n β€’ mapFun f x := by map_fun_tac
 #align witt_vector.map_fun.nsmul WittVector.mapFun.nsmul
 
-theorem zsmul (z : β„€) : mapFun f (z β€’ x) = z β€’ mapFun f x := by map_fun_tac
+theorem zsmul (z : β„€) (x : WittVector p R) : mapFun f (z β€’ x) = z β€’ mapFun f x := by map_fun_tac
 #align witt_vector.map_fun.zsmul WittVector.mapFun.zsmul
 
 theorem pow (n : β„•) : mapFun f (x ^ n) = mapFun f x ^ n := by map_fun_tac
@@ -209,12 +209,12 @@ private theorem ghostFun_int_cast (i : β„€) : ghostFun (i : π•Ž R) = i :=
   show ghostFun i.castDef = _ by
     cases i <;> simp [*, Int.castDef, ghostFun_nat_cast, ghostFun_neg, -Pi.coe_nat, -Pi.coe_int]
 
-private theorem ghostFun_nsmul (m : β„•) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
+private lemma ghostFun_nsmul (m : β„•) (x : WittVector p R) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
   --  porting note: I had to add the explicit type ascription.
   --  This could very well be due to my poor tactic writing!
   ghost_fun_tac m β€’ (X 0 : MvPolynomial _ β„€), ![x.coeff]
 
-private theorem ghostFun_zsmul (m : β„€) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
+private lemma ghostFun_zsmul (m : β„€) (x : WittVector p R) : ghostFun (m β€’ x) = m β€’ ghostFun x := by
   --  porting note: I had to add the explicit type ascription.
   --  This could very well be due to my poor tactic writing!
   ghost_fun_tac m β€’ (X 0 : MvPolynomial _ β„€), ![x.coeff]
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,8 +3,8 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin, Robert Y. Lewis
 -/
-import Mathlib.Data.MvPolynomial.Counit
-import Mathlib.Data.MvPolynomial.Invertible
+import Mathlib.Algebra.MvPolynomial.Counit
+import Mathlib.Algebra.MvPolynomial.Invertible
 import Mathlib.RingTheory.WittVector.Defs
 
 #align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a"
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -54,7 +54,6 @@ open MvPolynomial Function
 open scoped BigOperators
 
 variable {p : β„•} {R S T : Type*} [hp : Fact p.Prime] [CommRing R] [CommRing S] [CommRing T]
-
 variable {Ξ± : Type*} {Ξ² : Type*}
 
 -- mathport name: exprπ•Ž
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -73,7 +73,7 @@ def mapFun (f : Ξ± β†’ Ξ²) : π•Ž Ξ± β†’ π•Ž Ξ² := fun x => mk _ (f ∘ x.coeff
 
 namespace mapFun
 
--- porting note: switched the proof to tactic mode. I think that `ext` was the issue.
+-- Porting note: switched the proof to tactic mode. I think that `ext` was the issue.
 theorem injective (f : Ξ± β†’ Ξ²) (hf : Injective f) : Injective (mapFun f : π•Ž Ξ± β†’ π•Ž Ξ²) := by
   intros _ _ h
   ext p
@@ -85,7 +85,7 @@ theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f :
     by ext n; simp only [mapFun, coeff_mk, comp_apply, Classical.choose_spec (hf (x.coeff n))]⟩
 #align witt_vector.map_fun.surjective WittVector.mapFun.surjective
 
--- porting note: using `(x y : π•Ž R)` instead of `(x y : WittVector p R)` produced sorries.
+-- Porting note: using `(x y : π•Ž R)` instead of `(x y : WittVector p R)` produced sorries.
 variable (f : R β†’+* S) (x y : WittVector p R)
 
 /-- Auxiliary tactic for showing that `mapFun` respects the ring operations. -/
@@ -93,10 +93,10 @@ variable (f : R β†’+* S) (x y : WittVector p R)
 macro "map_fun_tac" : tactic => `(tactic| (
   ext n
   simp only [mapFun, mk, comp_apply, zero_coeff, map_zero,
-    -- porting note: the lemmas on the next line do not have the `simp` tag in mathlib4
+    -- Porting note: the lemmas on the next line do not have the `simp` tag in mathlib4
     add_coeff, sub_coeff, mul_coeff, neg_coeff, nsmul_coeff, zsmul_coeff, pow_coeff,
     peval, map_aeval, algebraMap_int_eq, coe_evalβ‚‚Hom] <;>
-  try { cases n <;> simp <;> done } <;>  -- porting note: this line solves `one`
+  try { cases n <;> simp <;> done } <;>  -- Porting note: this line solves `one`
   apply evalβ‚‚Hom_congr (RingHom.ext_int _ _) _ rfl <;>
   ext ⟨i, k⟩ <;>
     fin_cases i <;> rfl))
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -166,7 +166,8 @@ elab "ghost_fun_tac" Ο†:term "," fn:term : tactic => do
   simp only [wittZero, OfNat.ofNat, Zero.zero, wittOne, One.one,
     HAdd.hAdd, Add.add, HSub.hSub, Sub.sub, Neg.neg, HMul.hMul, Mul.mul,HPow.hPow, Pow.pow,
     wittNSMul, wittZSMul, HSMul.hSMul, SMul.smul]
-  simpa [WittVector.ghostFun, aeval_rename, aeval_bind₁, comp, uncurry, peval, eval] using this
+  simpa (config := { unfoldPartialApp := true }) [WittVector.ghostFun, aeval_rename, aeval_bind₁,
+    comp, uncurry, peval, eval] using this
   )))
 
 end Tactic
@@ -236,7 +237,8 @@ private def ghostEquiv' [Invertible (p : R)] : π•Ž R ≃ (β„• β†’ R) where
     ext n
     have := bind₁_wittPolynomial_xInTermsOfW p R n
     apply_fun aeval x.coeff at this
-    simpa only [aeval_bind₁, aeval_X, ghostFun, aeval_wittPolynomial]
+    simpa (config := { unfoldPartialApp := true }) only [aeval_bind₁, aeval_X, ghostFun,
+      aeval_wittPolynomial]
   right_inv := by
     intro x
     ext n
chore: cleanup some spaces (#7484)

Purely cosmetic PR.

Diff
@@ -99,7 +99,7 @@ macro "map_fun_tac" : tactic => `(tactic| (
   try { cases n <;> simp <;> done } <;>  -- porting note: this line solves `one`
   apply evalβ‚‚Hom_congr (RingHom.ext_int _ _) _ rfl <;>
   ext ⟨i, k⟩ <;>
-    fin_cases i <;> rfl ))
+    fin_cases i <;> rfl))
 
 --  and until `pow`.
 -- We do not tag these lemmas as `@[simp]` because they will be bundled in `map` later on.
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
@@ -53,9 +53,9 @@ open MvPolynomial Function
 
 open scoped BigOperators
 
-variable {p : β„•} {R S T : Type _} [hp : Fact p.Prime] [CommRing R] [CommRing S] [CommRing T]
+variable {p : β„•} {R S T : Type*} [hp : Fact p.Prime] [CommRing R] [CommRing S] [CommRing T]
 
-variable {Ξ± : Type _} {Ξ² : Type _}
+variable {Ξ± : Type*} {Ξ² : Type*}
 
 -- mathport name: exprπ•Ž
 local notation "π•Ž" => WittVector p
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,16 +2,13 @@
 Copyright (c) 2020 Johan Commelin. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johan Commelin, Robert Y. Lewis
-
-! This file was ported from Lean 3 source module ring_theory.witt_vector.basic
-! leanprover-community/mathlib commit 9556784a5b84697562e9c6acb40500d4a82e675a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.MvPolynomial.Counit
 import Mathlib.Data.MvPolynomial.Invertible
 import Mathlib.RingTheory.WittVector.Defs
 
+#align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a"
+
 /-!
 # Witt vectors
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

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

Diff
@@ -98,9 +98,9 @@ macro "map_fun_tac" : tactic => `(tactic| (
   simp only [mapFun, mk, comp_apply, zero_coeff, map_zero,
     -- porting note: the lemmas on the next line do not have the `simp` tag in mathlib4
     add_coeff, sub_coeff, mul_coeff, neg_coeff, nsmul_coeff, zsmul_coeff, pow_coeff,
-    peval, map_aeval, algebraMap_int_eq, coe_evalβ‚‚Hom]  <;>
-  try { cases n <;> simp <;> done }  <;>  -- porting note: this line solves `one`
-  apply evalβ‚‚Hom_congr (RingHom.ext_int _ _) _ rfl  <;>
+    peval, map_aeval, algebraMap_int_eq, coe_evalβ‚‚Hom] <;>
+  try { cases n <;> simp <;> done } <;>  -- porting note: this line solves `one`
+  apply evalβ‚‚Hom_congr (RingHom.ext_int _ _) _ rfl <;>
   ext ⟨i, k⟩ <;>
     fin_cases i <;> rfl ))
 
chore: formatting issues (#4947)

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

Diff
@@ -163,7 +163,7 @@ open Lean Elab Tactic
 --  I do not know what to do with `#align`
 /-- An auxiliary tactic for proving that `ghostFun` respects the ring operations. -/
 elab "ghost_fun_tac" Ο†:term "," fn:term : tactic => do
-  evalTactic (← `(tactic|(
+  evalTactic (← `(tactic| (
   ext n
   have := congr_fun (congr_arg (@peval R _ _) (wittStructureInt_prop p $Ο† n)) $fn
   simp only [wittZero, OfNat.ofNat, Zero.zero, wittOne, One.one,
feat: port RingTheory.WittVector.Basic (#4688)

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

Dependencies 10 + 671

672 files ported (98.5%)
277918 lines ported (98.8%)
Show graph

The unported dependencies are