ring_theory.flat
β·
Mathlib.RingTheory.Flat.Basic
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
-/
-import Mathbin.RingTheory.Noetherian
+import RingTheory.Noetherian
#align_import ring_theory.flat from "leanprover-community/mathlib"@"c085f3044fe585c575e322bfab45b3633c48d820"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
-
-! This file was ported from Lean 3 source module ring_theory.flat
-! leanprover-community/mathlib commit c085f3044fe585c575e322bfab45b3633c48d820
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.RingTheory.Noetherian
+#align_import ring_theory.flat from "leanprover-community/mathlib"@"c085f3044fe585c575e322bfab45b3633c48d820"
+
/-!
# Flat modules
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -60,7 +60,7 @@ open Function (Injective)
open LinearMap (lsmul)
-open TensorProduct
+open scoped TensorProduct
#print Module.Flat /-
/-- An `R`-module `M` is flat if for all finitely generated ideals `I` of `R`,
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -66,7 +66,7 @@ open TensorProduct
/-- An `R`-module `M` is flat if for all finitely generated ideals `I` of `R`,
the canonical map `I β M ββ M` is injective. -/
class Flat (R : Type u) (M : Type v) [CommRing R] [AddCommGroup M] [Module R M] : Prop where
- out : β β¦I : Ideal Rβ¦ (hI : I.Fg), Injective (TensorProduct.lift ((lsmul R M).comp I.Subtype))
+ out : β β¦I : Ideal Rβ¦ (hI : I.FG), Injective (TensorProduct.lift ((lsmul R M).comp I.Subtype))
#align module.flat Module.Flat
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/57e09a1296bfb4330ddf6624f1028ba186117d82
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
! This file was ported from Lean 3 source module ring_theory.flat
-! leanprover-community/mathlib commit 62c0a4ef1441edb463095ea02a06e87f3dfe135c
+! leanprover-community/mathlib commit c085f3044fe585c575e322bfab45b3633c48d820
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.RingTheory.Noetherian
/-!
# Flat modules
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
A module `M` over a commutative ring `R` is *flat*
if for all finitely generated ideals `I` of `R`,
the canonical map `I β M ββ M` is injective.
mathlib commit https://github.com/leanprover-community/mathlib/commit/290a7ba01fbcab1b64757bdaa270d28f4dcede35
@@ -59,16 +59,19 @@ open LinearMap (lsmul)
open TensorProduct
+#print Module.Flat /-
/-- An `R`-module `M` is flat if for all finitely generated ideals `I` of `R`,
the canonical map `I β M ββ M` is injective. -/
class Flat (R : Type u) (M : Type v) [CommRing R] [AddCommGroup M] [Module R M] : Prop where
out : β β¦I : Ideal Rβ¦ (hI : I.Fg), Injective (TensorProduct.lift ((lsmul R M).comp I.Subtype))
#align module.flat Module.Flat
+-/
namespace Flat
open TensorProduct LinearMap _Root_.Submodule
+#print Module.Flat.self /-
instance self (R : Type u) [CommRing R] : Flat R R :=
β¨by
intro I hI
@@ -78,6 +81,7 @@ instance self (R : Type u) [CommRing R] : Flat R R :=
simp only [Function.comp_apply, LinearEquiv.coe_toEquiv, rid_symm_apply, comp_apply, mul_one,
lift.tmul, subtype_apply, Algebra.id.smul_eq_mul, lsmul_apply]β©
#align module.flat.self Module.Flat.self
+-/
end Flat
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -158,9 +158,9 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
letI : β i, AddCommGroup (I β[R] M i) := inferInstance
rw [β Equiv.comp_injective _ (TensorProduct.lid R (β¨ i, M i)).toEquiv]
set Ξ·β := TensorProduct.lid R (β¨ i, M i)
- set Ξ· := (fun i β¦ TensorProduct.lid R (M i))
- set Ο := (fun i β¦ rTensor (M i) I.subtype)
- set Ο := (fun i β¦ component R ΞΉ (fun j β¦ M j) i)
+ set Ξ· := fun i β¦ TensorProduct.lid R (M i)
+ set Ο := fun i β¦ rTensor (M i) I.subtype
+ set Ο := fun i β¦ component R ΞΉ (fun j β¦ M j) i
set Ο := (TensorProduct.directSumRight R {x // x β I} (fun i β¦ M i)).symm.toLinearMap with psi_def
set Ο := rTensor (β¨ i, M i) I.subtype
set Ο := (fun i β¦ component R ΞΉ (fun j β¦ ({x // x β I} β[R] (M j))) i)
@@ -184,7 +184,7 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
have f := LinearMap.congr_arg (f := (Ο i)) ha
erw [LinearMap.congr_fun (hβ i) a] at f
rw [(map_zero (Ο i) : (Ο i) 0 = (0 : M i))] at f
- have hβ := (F i)
+ have hβ := F i
rw [iff_rTensor_injective] at hβ
have hβ := hβ hI
simp only [coe_comp, LinearEquiv.coe_coe, Function.comp_apply, AddEquivClass.map_eq_zero_iff,
Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.
@@ -112,12 +112,12 @@ theorem iff_rTensor_injective' :
@[deprecated]
alias lTensor_inj_iff_rTensor_inj := LinearMap.lTensor_inj_iff_rTensor_inj
-/-- The `lTensor`-variant of `iff_rTensor_injective`. .-/
+/-- The `lTensor`-variant of `iff_rTensor_injective`. . -/
theorem iff_lTensor_injective :
Module.Flat R M β β β¦I : Ideal Rβ¦ (_ : I.FG), Function.Injective (lTensor M I.subtype) := by
simpa [β comm_comp_rTensor_comp_comm_eq] using Module.Flat.iff_rTensor_injective R M
-/-- The `lTensor`-variant of `iff_rTensor_injective'`. .-/
+/-- The `lTensor`-variant of `iff_rTensor_injective'`. . -/
theorem iff_lTensor_injective' :
Module.Flat R M β β (I : Ideal R), Function.Injective (lTensor M I.subtype) := by
simpa [β comm_comp_rTensor_comp_comm_eq] using Module.Flat.iff_rTensor_injective' R M
@@ -228,7 +228,7 @@ theorem iff_characterModule_baer : Flat R M β Module.Baer R (CharacterModule M
simp_rw [iff_rTensor_injective', Baer, rTensor_injective_iff_lcomp_surjective,
Surjective, DFunLike.ext_iff, Subtype.forall]; rfl
-/-- `CharacterModule M` is an injective module iff `M` is flat.-/
+/-- `CharacterModule M` is an injective module iff `M` is flat. -/
theorem iff_characterModule_injective [Small.{v} R] :
Flat R M β Module.Injective R (CharacterModule M) :=
iff_characterModule_baer.trans Module.Baer.iff_injective
lTensor_preserves_injective_linearMap
(#11748)
also move lTensor_inj_iff_rTensor_inj
to LinearMap
@@ -109,11 +109,8 @@ theorem iff_rTensor_injective' :
rewrite [β rTensor_comp_apply] at hxβ
rw [(injective_iff_map_eq_zero _).mp (h hfg) y hxβ, LinearMap.map_zero]
-/-- Given a linear map `f : N β P`, `f β M` is injective if and only if `M β f` is injective. -/
-@[deprecated] lemma lTensor_inj_iff_rTensor_inj {N P : Type*} [AddCommGroup N] [AddCommGroup P]
- [Module R N] [Module R P] (f : N ββ[R] P) :
- Function.Injective (lTensor M f) β Function.Injective (rTensor M f) := by
- simp [β comm_comp_rTensor_comp_comm_eq]
+@[deprecated]
+alias lTensor_inj_iff_rTensor_inj := LinearMap.lTensor_inj_iff_rTensor_inj
/-- The `lTensor`-variant of `iff_rTensor_injective`. .-/
theorem iff_lTensor_injective :
@@ -239,10 +236,22 @@ theorem iff_characterModule_injective [Small.{v} R] :
/--
If `M` is a flat module, then `f β π M` is injective for all injective linear maps `f`.
-/
-theorem preserves_injective_linearMap {N' : Type*} [AddCommGroup N'] [Module R N'] [h : Flat R M]
- (L : N ββ[R] N') (hL : Function.Injective L) : Function.Injective (L.rTensor M) :=
+theorem rTensor_preserves_injective_linearMap {N' : Type*} [AddCommGroup N'] [Module R N']
+ [h : Flat R M] (L : N ββ[R] N') (hL : Function.Injective L) :
+ Function.Injective (L.rTensor M) :=
rTensor_injective_iff_lcomp_surjective.2 ((iff_characterModule_baer.1 h).extension_property _ hL)
+@[deprecated]
+alias preserves_injective_linearMap := rTensor_preserves_injective_linearMap
+
+/--
+If `M` is a flat module, then `π M β f` is injective for all injective linear maps `f`.
+-/
+theorem lTensor_preserves_injective_linearMap {N' : Type*} [AddCommGroup N'] [Module R N']
+ [Flat R M] (L : N ββ[R] N') (hL : Function.Injective L) :
+ Function.Injective (L.lTensor M) :=
+ (L.lTensor_inj_iff_rTensor_inj M).2 (rTensor_preserves_injective_linearMap L hL)
+
variable (R M) in
/--
M is flat if and only if `f β π M` is injective whenever `f` is an injective linear map.
@@ -254,6 +263,16 @@ lemma iff_rTensor_preserves_injective_linearMap [Small.{v} R] :
rw [iff_characterModule_injective,
injective_characterModule_iff_rTensor_preserves_injective_linearMap]
+variable (R M) in
+/--
+M is flat if and only if `π M β f` is injective whenever `f` is an injective linear map.
+-/
+lemma iff_lTensor_preserves_injective_linearMap [Small.{v} R] :
+ Flat R M β
+ β β¦N N' : Type vβ¦ [AddCommGroup N] [AddCommGroup N'] [Module R N] [Module R N']
+ (L : N ββ[R] N'), Function.Injective L β Function.Injective (L.lTensor M) := by
+ simp_rw [iff_rTensor_preserves_injective_linearMap, LinearMap.lTensor_inj_iff_rTensor_inj]
+
end Flat
end Module
open Classical
(#11199)
We remove all but one open Classical
s, instead preferring to use open scoped Classical
. The only real side-effect this led to is moving a couple declarations to use Exists.choose
instead of Classical.choose
.
The first few commits are explicitly labelled regex replaces for ease of review.
@@ -194,7 +194,7 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
hβ, LinearMap.map_eq_zero_iff] at f
simp [f]
-open Classical in
+open scoped Classical in
/-- Free `R`-modules over discrete types are flat. -/
instance finsupp (ΞΉ : Type v) : Flat R (ΞΉ ββ R) :=
of_linearEquiv R _ _ (finsuppLEquivDirectSum R R ΞΉ)
@@ -1,14 +1,17 @@
/-
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
-Authors: Johan Commelin
+Authors: Johan Commelin, Jujian Zhang
-/
+import Mathlib.RingTheory.Noetherian
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.Algebra.Module.Projective
+import Mathlib.Algebra.Module.Injective
+import Mathlib.Algebra.Module.CharacterModule
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
import Mathlib.LinearAlgebra.FreeModule.Basic
-import Mathlib.RingTheory.Finiteness
+import Mathlib.Algebra.Module.Projective
#align_import ring_theory.flat from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
@@ -22,7 +25,6 @@ the canonical map `I β M ββ M` is injective.
This is equivalent to the claim that for all injective `R`-linear maps `f : Mβ β Mβ`
the induced map `Mβ β M β Mβ β M` is injective.
See <https://stacks.math.columbia.edu/tag/00HD>.
-This result is not yet formalised.
## Main declaration
@@ -35,22 +37,26 @@ This result is not yet formalised.
* `Module.Flat.directSum`: arbitrary direct sums of flat modules are flat
* `Module.Flat.of_free`: free modules are flat
* `Module.Flat.of_projective`: projective modules are flat
+* `Module.Flat.preserves_injective_linearMap`: If `M` is a flat module then tensoring with `M`
+ preserves injectivity of linear maps. This lemma is fully universally polymorphic in all
+ arguments, i.e. `R`, `M` and linear maps `N β N'` can all have different universe levels.
+* `Module.Flat.iff_rTensor_preserves_injective_linearMap`: a module is flat iff tensoring preserves
+ injectivity in the ring's universe (or higher).
+
+## Implementation notes
+In `Module.Flat.iff_rTensor_preserves_injective_linearMap`, we require that the universe level of
+the ring is lower than or equal to that of the module. This requirement is to make sure ideals of
+the ring can be lifted to the universe of the module. It is unclear if this lemma also holds
+when the module lives in a lower universe.
## TODO
-* Show that tensoring with a flat module preserves injective morphisms.
- Show that this is equivalent to be flat.
- See <https://stacks.math.columbia.edu/tag/00HD>.
- To do this, it is probably a good idea to think about a suitable
- categorical induction principle that should be applied to the category of `R`-modules,
- and that will take care of the administrative side of the proof.
* Show that flatness is stable under base change (aka extension of scalars)
- For base change, it will be very useful to have a "characteristic predicate"
- instead of relying on the construction `A β B`.
- Indeed, such a predicate should allow us to treat both
+ Using the `IsBaseChange` predicate should allow us to treat both
`A[X]` and `A β R[X]` as the base change of `R[X]` to `A`.
(Similar examples exist with `Fin n β R`, `R Γ R`, `β€[i] β β`, etc...)
* Generalize flatness to noncommutative rings.
+
-/
@@ -58,21 +64,22 @@ universe u v w
namespace Module
-open Function (Injective Surjective)
+open Function (Surjective)
-open LinearMap Submodule TensorProduct
+open LinearMap Submodule TensorProduct DirectSum
variable (R : Type u) (M : Type v) [CommRing R] [AddCommGroup M] [Module R M]
/-- An `R`-module `M` is flat if for all finitely generated ideals `I` of `R`,
the canonical map `I β M ββ M` is injective. -/
-class Flat : Prop where
- out : β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (TensorProduct.lift ((lsmul R M).comp I.subtype))
+@[mk_iff] class Flat : Prop where
+ out : β β¦I : Ideal Rβ¦ (_ : I.FG),
+ Function.Injective (TensorProduct.lift ((lsmul R M).comp I.subtype))
#align module.flat Module.Flat
namespace Flat
-instance self : Flat R R :=
+instance self (R : Type u) [CommRing R] : Flat R R :=
β¨by
intro I _
rw [β Equiv.injective_comp (TensorProduct.rid R I).symm.toEquiv]
@@ -86,58 +93,37 @@ instance self : Flat R R :=
tensor product of the inclusion `I β R` and the identity `M β M` is injective. See
`iff_rTensor_injective'` to extend to all ideals `I`. --/
lemma iff_rTensor_injective :
- Flat R M β β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (rTensor M I.subtype) := by
- have aux : β I : Ideal R, (TensorProduct.lid R M).comp (rTensor M I.subtype) =
- TensorProduct.lift ((lsmul R M).comp I.subtype) := by
- intro I; apply TensorProduct.ext'; intro x y; simp
- constructor
- Β· intro F I hI
- erw [β Equiv.comp_injective _ (TensorProduct.lid R M).toEquiv]
- have hβ := F.out hI
- rw [β aux] at hβ
- exact hβ
- Β· intro hβ
- constructor
- intro I hI
- rw [β aux]
- simp [hβ hI]
+ Flat R M β β β¦I : Ideal Rβ¦ (_ : I.FG), Function.Injective (rTensor M I.subtype) := by
+ simp [flat_iff, β lid_comp_rTensor]
/-- An `R`-module `M` is flat iff for all ideals `I` of `R`, the tensor product of the
inclusion `I β R` and the identity `M β M` is injective. See `iff_rTensor_injective` to
restrict to finitely generated ideals `I`. --/
theorem iff_rTensor_injective' :
- Flat R M β β I : Ideal R, Injective (rTensor M I.subtype) := by
+ Flat R M β β I : Ideal R, Function.Injective (rTensor M I.subtype) := by
rewrite [Flat.iff_rTensor_injective]
refine β¨fun h I => ?_, fun h I _ => h Iβ©
rewrite [injective_iff_map_eq_zero]
intro x hxβ
- obtain β¨J, hfg, hle, y, rflβ© := exists_fg_le_eq_rTensor_inclusion x
+ obtain β¨J, hfg, hle, y, rflβ© := Submodule.exists_fg_le_eq_rTensor_inclusion x
rewrite [β rTensor_comp_apply] at hxβ
rw [(injective_iff_map_eq_zero _).mp (h hfg) y hxβ, LinearMap.map_zero]
/-- Given a linear map `f : N β P`, `f β M` is injective if and only if `M β f` is injective. -/
-lemma lTensor_inj_iff_rTensor_inj {N P : Type*} [AddCommGroup N] [AddCommGroup P] [Module R N]
- [Module R P] (f : N ββ[R] P) :
- Injective (lTensor M f) β Injective (rTensor M f) := by
- haveI h1 : rTensor M f ββ TensorProduct.comm R M N =
- TensorProduct.comm R M P ββ lTensor M f := ext rfl
- haveI h2 : β(TensorProduct.comm R M P) β β(lTensor M f) =
- (TensorProduct.comm R M P) ββ (lTensor M f) := rfl
- simp only [β EquivLike.injective_comp (TensorProduct.comm R M N),
- β EquivLike.comp_injective _ (TensorProduct.comm R M P), h2, β h1]
- trivial
+@[deprecated] lemma lTensor_inj_iff_rTensor_inj {N P : Type*} [AddCommGroup N] [AddCommGroup P]
+ [Module R N] [Module R P] (f : N ββ[R] P) :
+ Function.Injective (lTensor M f) β Function.Injective (rTensor M f) := by
+ simp [β comm_comp_rTensor_comp_comm_eq]
/-- The `lTensor`-variant of `iff_rTensor_injective`. .-/
theorem iff_lTensor_injective :
- Module.Flat R M β β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (lTensor M I.subtype) := by
- simp only [lTensor_inj_iff_rTensor_inj]
- exact Module.Flat.iff_rTensor_injective R M
+ Module.Flat R M β β β¦I : Ideal Rβ¦ (_ : I.FG), Function.Injective (lTensor M I.subtype) := by
+ simpa [β comm_comp_rTensor_comp_comm_eq] using Module.Flat.iff_rTensor_injective R M
/-- The `lTensor`-variant of `iff_rTensor_injective'`. .-/
theorem iff_lTensor_injective' :
- Module.Flat R M β β (I : Ideal R), Injective (lTensor M I.subtype) := by
- simp only [lTensor_inj_iff_rTensor_inj]
- exact Module.Flat.iff_rTensor_injective' R M
+ Module.Flat R M β β (I : Ideal R), Function.Injective (lTensor M I.subtype) := by
+ simpa [β comm_comp_rTensor_comp_comm_eq] using Module.Flat.iff_rTensor_injective' R M
variable (N : Type w) [AddCommGroup N] [Module R N]
@@ -164,8 +150,6 @@ lemma of_linearEquiv [f : Flat R M] (e : N ββ[R] M) : Flat R N := by
have h : e.symm.toLinearMap.comp e.toLinearMap = LinearMap.id := by simp
exact of_retract _ _ _ e.toLinearMap e.symm.toLinearMap h
-open DirectSum
-
/-- A direct sum of flat `R`-modules is flat. -/
instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup (M i)]
[(i : ΞΉ) β Module R (M i)] [F : (i : ΞΉ) β (Flat R (M i))] : Flat R (β¨ i, M i) := by
@@ -194,7 +178,7 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
apply TensorProduct.ext'
intro a m
simp only [Ο, Ο, Ο, Ξ·, Ξ·β, coe_comp, LinearEquiv.coe_coe, Function.comp_apply,
- directSumRight_symm_lof_tmul, rTensor_tmul, coeSubtype, lid_tmul, map_smul]
+ directSumRight_symm_lof_tmul, rTensor_tmul, Submodule.coeSubtype, lid_tmul, map_smul]
rw [DirectSum.component.of, DirectSum.component.of]
by_cases hβ : j = i
Β· subst j; simp
@@ -210,9 +194,9 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
hβ, LinearMap.map_eq_zero_iff] at f
simp [f]
+open Classical in
/-- Free `R`-modules over discrete types are flat. -/
instance finsupp (ΞΉ : Type v) : Flat R (ΞΉ ββ R) :=
- haveI := Classical.decEq ΞΉ
of_linearEquiv R _ _ (finsuppLEquivDirectSum R R ΞΉ)
instance of_free [Free R M] : Flat R M := of_linearEquiv R _ _ (Free.repr R M)
@@ -229,6 +213,47 @@ instance of_projective [h : Projective R M] : Flat R M := by
cases h with
| _ e he => exact of_retract R _ _ _ _ he
+/--
+Define the character module of `M` to be `M β+ β β§Έ β€`.
+The character module of `M` is an injective module if and only if
+ `L β π M` is injective for any linear map `L` in the same universe as `M`.
+-/
+lemma injective_characterModule_iff_rTensor_preserves_injective_linearMap :
+ Module.Injective R (CharacterModule M) β
+ β β¦N N' : Type vβ¦ [AddCommGroup N] [AddCommGroup N'] [Module R N] [Module R N']
+ (L : N ββ[R] N'), Function.Injective L β Function.Injective (L.rTensor M) := by
+ simp_rw [injective_iff, rTensor_injective_iff_lcomp_surjective, Surjective, DFunLike.ext_iff]; rfl
+
+variable {R M N}
+
+/-- `CharacterModule M` is Baer iff `M` is flat. -/
+theorem iff_characterModule_baer : Flat R M β Module.Baer R (CharacterModule M) := by
+ simp_rw [iff_rTensor_injective', Baer, rTensor_injective_iff_lcomp_surjective,
+ Surjective, DFunLike.ext_iff, Subtype.forall]; rfl
+
+/-- `CharacterModule M` is an injective module iff `M` is flat.-/
+theorem iff_characterModule_injective [Small.{v} R] :
+ Flat R M β Module.Injective R (CharacterModule M) :=
+ iff_characterModule_baer.trans Module.Baer.iff_injective
+
+/--
+If `M` is a flat module, then `f β π M` is injective for all injective linear maps `f`.
+-/
+theorem preserves_injective_linearMap {N' : Type*} [AddCommGroup N'] [Module R N'] [h : Flat R M]
+ (L : N ββ[R] N') (hL : Function.Injective L) : Function.Injective (L.rTensor M) :=
+ rTensor_injective_iff_lcomp_surjective.2 ((iff_characterModule_baer.1 h).extension_property _ hL)
+
+variable (R M) in
+/--
+M is flat if and only if `f β π M` is injective whenever `f` is an injective linear map.
+-/
+lemma iff_rTensor_preserves_injective_linearMap [Small.{v} R] :
+ Flat R M β
+ β β¦N N' : Type vβ¦ [AddCommGroup N] [AddCommGroup N'] [Module R N] [Module R N']
+ (L : N ββ[R] N'), Function.Injective L β Function.Injective (L.rTensor M) := by
+ rw [iff_characterModule_injective,
+ injective_characterModule_iff_rTensor_preserves_injective_linearMap]
+
end Flat
end Module
@@ -193,8 +193,8 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
intro j
apply TensorProduct.ext'
intro a m
- simp only [coe_comp, LinearEquiv.coe_coe, Function.comp_apply, directSumRight_symm_lof_tmul,
- rTensor_tmul, coeSubtype, lid_tmul, map_smul]
+ simp only [Ο, Ο, Ο, Ξ·, Ξ·β, coe_comp, LinearEquiv.coe_coe, Function.comp_apply,
+ directSumRight_symm_lof_tmul, rTensor_tmul, coeSubtype, lid_tmul, map_smul]
rw [DirectSum.component.of, DirectSum.component.of]
by_cases hβ : j = i
Β· subst j; simp
DirectSum
results to avoid negation (#10965)
Generalize Basis.tensorProduct
and instance Module.Free.tensor
to CommSemiring and AddCommMonoid, as a follow-up to #10828.
Plus style fixes:
universe
declarationopen TensorProduct
noncomputable
annotation and associated comment (due to noncomputable section
in the same file)variable
section
/namespace
/open
/variable
)Co-authored-by: Richard Copley <rcopley@gmail.com>
@@ -51,7 +51,6 @@ This result is not yet formalised.
`A[X]` and `A β R[X]` as the base change of `R[X]` to `A`.
(Similar examples exist with `Fin n β R`, `R Γ R`, `β€[i] β β`, etc...)
* Generalize flatness to noncommutative rings.
-
-/
@@ -61,23 +60,19 @@ namespace Module
open Function (Injective Surjective)
-open LinearMap (lsmul rTensor lTensor)
+open LinearMap Submodule TensorProduct
-open TensorProduct
+variable (R : Type u) (M : Type v) [CommRing R] [AddCommGroup M] [Module R M]
/-- An `R`-module `M` is flat if for all finitely generated ideals `I` of `R`,
the canonical map `I β M ββ M` is injective. -/
-class Flat (R : Type u) (M : Type v) [CommRing R] [AddCommGroup M] [Module R M] : Prop where
+class Flat : Prop where
out : β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (TensorProduct.lift ((lsmul R M).comp I.subtype))
#align module.flat Module.Flat
namespace Flat
-variable (R : Type u) [CommRing R]
-
-open LinearMap Submodule
-
-instance self (R : Type u) [CommRing R] : Flat R R :=
+instance self : Flat R R :=
β¨by
intro I _
rw [β Equiv.injective_comp (TensorProduct.rid R I).symm.toEquiv]
@@ -87,8 +82,6 @@ instance self (R : Type u) [CommRing R] : Flat R R :=
lift.tmul, Submodule.subtype_apply, Algebra.id.smul_eq_mul, lsmul_apply]β©
#align module.flat.self Module.Flat.self
-variable (M : Type v) [AddCommGroup M] [Module R M]
-
/-- An `R`-module `M` is flat iff for all finitely generated ideals `I` of `R`, the
tensor product of the inclusion `I β R` and the identity `M β M` is injective. See
`iff_rTensor_injective'` to extend to all ideals `I`. --/
@@ -116,13 +109,11 @@ theorem iff_rTensor_injective' :
Flat R M β β I : Ideal R, Injective (rTensor M I.subtype) := by
rewrite [Flat.iff_rTensor_injective]
refine β¨fun h I => ?_, fun h I _ => h Iβ©
- letI : AddCommGroup (I β[R] M) := inferInstance -- Type class reminder
rewrite [injective_iff_map_eq_zero]
intro x hxβ
obtain β¨J, hfg, hle, y, rflβ© := exists_fg_le_eq_rTensor_inclusion x
rewrite [β rTensor_comp_apply] at hxβ
- letI : AddCommGroup (J β[R] M) := inferInstance -- Type class reminder
- rw [(injective_iff_map_eq_zero _).mp (h hfg) y hxβ, _root_.map_zero]
+ rw [(injective_iff_map_eq_zero _).mp (h hfg) y hxβ, LinearMap.map_zero]
/-- Given a linear map `f : N β P`, `f β M` is injective if and only if `M β f` is injective. -/
lemma lTensor_inj_iff_rTensor_inj {N P : Type*} [AddCommGroup N] [AddCommGroup P] [Module R N]
@@ -173,18 +164,12 @@ lemma of_linearEquiv [f : Flat R M] (e : N ββ[R] M) : Flat R N := by
have h : e.symm.toLinearMap.comp e.toLinearMap = LinearMap.id := by simp
exact of_retract _ _ _ e.toLinearMap e.symm.toLinearMap h
-end Flat
-
-namespace Flat
-
-open DirectSum LinearMap Submodule
-
-variable (R : Type u) [CommRing R]
+open DirectSum
/-- A direct sum of flat `R`-modules is flat. -/
instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup (M i)]
[(i : ΞΉ) β Module R (M i)] [F : (i : ΞΉ) β (Flat R (M i))] : Flat R (β¨ i, M i) := by
- classical
+ haveI := Classical.decEq ΞΉ
rw [iff_rTensor_injective]
intro I hI
-- This instance was added during PR #10828,
@@ -227,11 +212,9 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
/-- Free `R`-modules over discrete types are flat. -/
instance finsupp (ΞΉ : Type v) : Flat R (ΞΉ ββ R) :=
- let _ := Classical.decEq ΞΉ
+ haveI := Classical.decEq ΞΉ
of_linearEquiv R _ _ (finsuppLEquivDirectSum R R ΞΉ)
-variable (M : Type v) [AddCommGroup M] [Module R M]
-
instance of_free [Free R M] : Flat R M := of_linearEquiv R _ _ (Free.repr R M)
/-- A projective module with a discrete type of generator is flat -/
Three files are modified, where the hypotheses are relaxed from Ring
or CommRing
to Semiring
or CommSemiring
, and AddCommGroup
to AddCommMonoid
.
Besides this, no definition is changed, and for one proof in RingTheory.Flat.Basic
, I needed to add an instance (letI
β¦) in the proof.
(Everything pertains to direct sums of modules.)
Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -187,6 +187,9 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
classical
rw [iff_rTensor_injective]
intro I hI
+ -- This instance was added during PR #10828,
+ -- see https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/.2310828.20-.20generalizing.20CommRing.20to.20CommSemiring.20etc.2E/near/422684923
+ letI : β i, AddCommGroup (I β[R] M i) := inferInstance
rw [β Equiv.comp_injective _ (TensorProduct.lid R (β¨ i, M i)).toEquiv]
set Ξ·β := TensorProduct.lid R (β¨ i, M i)
set Ξ· := (fun i β¦ TensorProduct.lid R (M i))
refine
s (#10762)
I replaced a few "terminal" refine/refine'
s with exact
.
The strategy was very simple-minded: essentially any refine
whose following line had smaller indentation got replaced by exact
and then I cleaned up the mess.
This PR certainly leaves some further terminal refine
s, but maybe the current change is beneficial.
@@ -102,7 +102,7 @@ lemma iff_rTensor_injective :
erw [β Equiv.comp_injective _ (TensorProduct.lid R M).toEquiv]
have hβ := F.out hI
rw [β aux] at hβ
- refine hβ
+ exact hβ
Β· intro hβ
constructor
intro I hI
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -155,8 +155,8 @@ lemma of_retract [f : Flat R M] (i : N ββ[R] M) (r : M ββ[R] N) (h : r.c
Flat R N := by
rw [iff_rTensor_injective] at *
intro I hI
- have hβ : Function.Injective (lTensor R i)
- Β· apply Function.RightInverse.injective (g := (lTensor R r))
+ have hβ : Function.Injective (lTensor R i) := by
+ apply Function.RightInverse.injective (g := (lTensor R r))
intro x
rw [β LinearMap.comp_apply, β lTensor_comp, h]
simp
@@ -199,8 +199,8 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
rw [LinearEquiv.coe_toEquiv, β LinearEquiv.coe_coe, β LinearMap.coe_comp]
rw [LinearEquiv.coe_toEquiv, β LinearEquiv.coe_coe, β LinearMap.coe_comp]
rw [β psi_def, injective_iff_map_eq_zero ((Ξ·β.comp Ο).comp Ο)]
- have hβ : β (i : ΞΉ), (Ο i).comp ((Ξ·β.comp Ο).comp Ο) = (Ξ· i).comp ((Ο i).comp (Ο i))
- Β· intro i
+ have hβ : β (i : ΞΉ), (Ο i).comp ((Ξ·β.comp Ο).comp Ο) = (Ξ· i).comp ((Ο i).comp (Ο i)) := by
+ intro i
apply DirectSum.linearMap_ext
intro j
apply TensorProduct.ext'
@@ -44,10 +44,6 @@ This result is not yet formalised.
To do this, it is probably a good idea to think about a suitable
categorical induction principle that should be applied to the category of `R`-modules,
and that will take care of the administrative side of the proof.
-* Define flat `R`-algebras
-* Define flat ring homomorphisms
- - Show that the identity is flat
- - Show that composition of flat morphisms is flat
* Show that flatness is stable under base change (aka extension of scalars)
For base change, it will be very useful to have a "characteristic predicate"
instead of relying on the construction `A β B`.
Adds the definition of flat algebras, flat ring homomorphisms and shows that flatness is stable under composition.
@@ -128,6 +128,30 @@ theorem iff_rTensor_injective' :
letI : AddCommGroup (J β[R] M) := inferInstance -- Type class reminder
rw [(injective_iff_map_eq_zero _).mp (h hfg) y hxβ, _root_.map_zero]
+/-- Given a linear map `f : N β P`, `f β M` is injective if and only if `M β f` is injective. -/
+lemma lTensor_inj_iff_rTensor_inj {N P : Type*} [AddCommGroup N] [AddCommGroup P] [Module R N]
+ [Module R P] (f : N ββ[R] P) :
+ Injective (lTensor M f) β Injective (rTensor M f) := by
+ haveI h1 : rTensor M f ββ TensorProduct.comm R M N =
+ TensorProduct.comm R M P ββ lTensor M f := ext rfl
+ haveI h2 : β(TensorProduct.comm R M P) β β(lTensor M f) =
+ (TensorProduct.comm R M P) ββ (lTensor M f) := rfl
+ simp only [β EquivLike.injective_comp (TensorProduct.comm R M N),
+ β EquivLike.comp_injective _ (TensorProduct.comm R M P), h2, β h1]
+ trivial
+
+/-- The `lTensor`-variant of `iff_rTensor_injective`. .-/
+theorem iff_lTensor_injective :
+ Module.Flat R M β β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (lTensor M I.subtype) := by
+ simp only [lTensor_inj_iff_rTensor_inj]
+ exact Module.Flat.iff_rTensor_injective R M
+
+/-- The `lTensor`-variant of `iff_rTensor_injective'`. .-/
+theorem iff_lTensor_injective' :
+ Module.Flat R M β β (I : Ideal R), Injective (lTensor M I.subtype) := by
+ simp only [lTensor_inj_iff_rTensor_inj]
+ exact Module.Flat.iff_rTensor_injective' R M
+
variable (N : Type w) [AddCommGroup N] [Module R N]
/-- A retract of a flat `R`-module is flat. -/
@@ -3,12 +3,12 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
-/
-import Mathlib.RingTheory.Noetherian
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.DirectSum.Finsupp
+import Mathlib.Algebra.Module.Projective
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
import Mathlib.LinearAlgebra.FreeModule.Basic
-import Mathlib.Algebra.Module.Projective
+import Mathlib.RingTheory.Finiteness
#align_import ring_theory.flat from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
@@ -141,7 +141,7 @@ lemma of_retract [f : Flat R M] (i : N ββ[R] M) (r : M ββ[R] N) (h : r.c
rw [β LinearMap.comp_apply, β lTensor_comp, h]
simp
rw [β Function.Injective.of_comp_iff hβ (rTensor N I.subtype), β LinearMap.coe_comp]
- rw [LinearMap.lTensor_comp_rTensor, βLinearMap.rTensor_comp_lTensor]
+ rw [LinearMap.lTensor_comp_rTensor, β LinearMap.rTensor_comp_lTensor]
rw [LinearMap.coe_comp, Function.Injective.of_comp_iff (f hI)]
apply Function.RightInverse.injective (g := lTensor _ r)
intro x
Extend RingTheory.Flat.iff_rTensor_injective
to all ideals
Using an elementary argument after Dummit and Foote (2004, Ex. 10.25)
@@ -93,11 +93,14 @@ instance self (R : Type u) [CommRing R] : Flat R R :=
variable (M : Type v) [AddCommGroup M] [Module R M]
+/-- An `R`-module `M` is flat iff for all finitely generated ideals `I` of `R`, the
+tensor product of the inclusion `I β R` and the identity `M β M` is injective. See
+`iff_rTensor_injective'` to extend to all ideals `I`. --/
lemma iff_rTensor_injective :
- Flat R M β (β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (rTensor M I.subtype)) := by
- have aux : β (I : Ideal R), ((TensorProduct.lid R M).comp (rTensor M I.subtype)) =
- (TensorProduct.lift ((lsmul R M).comp I.subtype))
- Β· intro I; apply TensorProduct.ext'; intro x y; simp
+ Flat R M β β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (rTensor M I.subtype) := by
+ have aux : β I : Ideal R, (TensorProduct.lid R M).comp (rTensor M I.subtype) =
+ TensorProduct.lift ((lsmul R M).comp I.subtype) := by
+ intro I; apply TensorProduct.ext'; intro x y; simp
constructor
Β· intro F I hI
erw [β Equiv.comp_injective _ (TensorProduct.lid R M).toEquiv]
@@ -110,6 +113,21 @@ lemma iff_rTensor_injective :
rw [β aux]
simp [hβ hI]
+/-- An `R`-module `M` is flat iff for all ideals `I` of `R`, the tensor product of the
+inclusion `I β R` and the identity `M β M` is injective. See `iff_rTensor_injective` to
+restrict to finitely generated ideals `I`. --/
+theorem iff_rTensor_injective' :
+ Flat R M β β I : Ideal R, Injective (rTensor M I.subtype) := by
+ rewrite [Flat.iff_rTensor_injective]
+ refine β¨fun h I => ?_, fun h I _ => h Iβ©
+ letI : AddCommGroup (I β[R] M) := inferInstance -- Type class reminder
+ rewrite [injective_iff_map_eq_zero]
+ intro x hxβ
+ obtain β¨J, hfg, hle, y, rflβ© := exists_fg_le_eq_rTensor_inclusion x
+ rewrite [β rTensor_comp_apply] at hxβ
+ letI : AddCommGroup (J β[R] M) := inferInstance -- Type class reminder
+ rw [(injective_iff_map_eq_zero _).mp (h hfg) y hxβ, _root_.map_zero]
+
variable (N : Type w) [AddCommGroup N] [Module R N]
/-- A retract of a flat `R`-module is flat. -/
@@ -174,7 +174,7 @@ instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup
Β· subst j; simp
Β· simp [hβ]
intro a ha; rw [DirectSum.ext_iff R]; intro i
- have f := LinearMap.congr_arg (f:= (Ο i)) ha
+ have f := LinearMap.congr_arg (f := (Ο i)) ha
erw [LinearMap.congr_fun (hβ i) a] at f
rw [(map_zero (Ο i) : (Ο i) 0 = (0 : M i))] at f
have hβ := (F i)
CommRing
are flat (#7567)
Prove that flat modules are stable under retracts, isomorphisms and direct sums. Use this to deduce that free and projective modules are flat.
Co-authored-by: Robin Carlier <robin.carlier@ens-lyon.fr> Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com> Co-authored-by: Johan Commelin <johan@commelin.net>
@@ -4,6 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
-/
import Mathlib.RingTheory.Noetherian
+import Mathlib.Algebra.DirectSum.Module
+import Mathlib.Algebra.DirectSum.Finsupp
+import Mathlib.LinearAlgebra.DirectSum.TensorProduct
+import Mathlib.LinearAlgebra.FreeModule.Basic
+import Mathlib.Algebra.Module.Projective
#align_import ring_theory.flat from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
@@ -23,6 +28,14 @@ This result is not yet formalised.
* `Module.Flat`: the predicate asserting that an `R`-module `M` is flat.
+## Main theorems
+
+* `Module.Flat.of_retract`: retracts of flat modules are flat
+* `Module.Flat.of_linearEquiv`: modules linearly equivalent to a flat modules are flat
+* `Module.Flat.directSum`: arbitrary direct sums of flat modules are flat
+* `Module.Flat.of_free`: free modules are flat
+* `Module.Flat.of_projective`: projective modules are flat
+
## TODO
* Show that tensoring with a flat module preserves injective morphisms.
@@ -46,13 +59,13 @@ This result is not yet formalised.
-/
-universe u v
+universe u v w
namespace Module
-open Function (Injective)
+open Function (Injective Surjective)
-open LinearMap (lsmul)
+open LinearMap (lsmul rTensor lTensor)
open TensorProduct
@@ -64,7 +77,9 @@ class Flat (R : Type u) (M : Type v) [CommRing R] [AddCommGroup M] [Module R M]
namespace Flat
-open TensorProduct LinearMap Submodule
+variable (R : Type u) [CommRing R]
+
+open LinearMap Submodule
instance self (R : Type u) [CommRing R] : Flat R R :=
β¨by
@@ -76,6 +91,120 @@ instance self (R : Type u) [CommRing R] : Flat R R :=
lift.tmul, Submodule.subtype_apply, Algebra.id.smul_eq_mul, lsmul_apply]β©
#align module.flat.self Module.Flat.self
+variable (M : Type v) [AddCommGroup M] [Module R M]
+
+lemma iff_rTensor_injective :
+ Flat R M β (β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (rTensor M I.subtype)) := by
+ have aux : β (I : Ideal R), ((TensorProduct.lid R M).comp (rTensor M I.subtype)) =
+ (TensorProduct.lift ((lsmul R M).comp I.subtype))
+ Β· intro I; apply TensorProduct.ext'; intro x y; simp
+ constructor
+ Β· intro F I hI
+ erw [β Equiv.comp_injective _ (TensorProduct.lid R M).toEquiv]
+ have hβ := F.out hI
+ rw [β aux] at hβ
+ refine hβ
+ Β· intro hβ
+ constructor
+ intro I hI
+ rw [β aux]
+ simp [hβ hI]
+
+variable (N : Type w) [AddCommGroup N] [Module R N]
+
+/-- A retract of a flat `R`-module is flat. -/
+lemma of_retract [f : Flat R M] (i : N ββ[R] M) (r : M ββ[R] N) (h : r.comp i = LinearMap.id) :
+ Flat R N := by
+ rw [iff_rTensor_injective] at *
+ intro I hI
+ have hβ : Function.Injective (lTensor R i)
+ Β· apply Function.RightInverse.injective (g := (lTensor R r))
+ intro x
+ rw [β LinearMap.comp_apply, β lTensor_comp, h]
+ simp
+ rw [β Function.Injective.of_comp_iff hβ (rTensor N I.subtype), β LinearMap.coe_comp]
+ rw [LinearMap.lTensor_comp_rTensor, βLinearMap.rTensor_comp_lTensor]
+ rw [LinearMap.coe_comp, Function.Injective.of_comp_iff (f hI)]
+ apply Function.RightInverse.injective (g := lTensor _ r)
+ intro x
+ rw [β LinearMap.comp_apply, β lTensor_comp, h]
+ simp
+
+/-- A `R`-module linearly equivalent to a flat `R`-module is flat. -/
+lemma of_linearEquiv [f : Flat R M] (e : N ββ[R] M) : Flat R N := by
+ have h : e.symm.toLinearMap.comp e.toLinearMap = LinearMap.id := by simp
+ exact of_retract _ _ _ e.toLinearMap e.symm.toLinearMap h
+
+end Flat
+
+namespace Flat
+
+open DirectSum LinearMap Submodule
+
+variable (R : Type u) [CommRing R]
+
+/-- A direct sum of flat `R`-modules is flat. -/
+instance directSum (ΞΉ : Type v) (M : ΞΉ β Type w) [(i : ΞΉ) β AddCommGroup (M i)]
+ [(i : ΞΉ) β Module R (M i)] [F : (i : ΞΉ) β (Flat R (M i))] : Flat R (β¨ i, M i) := by
+ classical
+ rw [iff_rTensor_injective]
+ intro I hI
+ rw [β Equiv.comp_injective _ (TensorProduct.lid R (β¨ i, M i)).toEquiv]
+ set Ξ·β := TensorProduct.lid R (β¨ i, M i)
+ set Ξ· := (fun i β¦ TensorProduct.lid R (M i))
+ set Ο := (fun i β¦ rTensor (M i) I.subtype)
+ set Ο := (fun i β¦ component R ΞΉ (fun j β¦ M j) i)
+ set Ο := (TensorProduct.directSumRight R {x // x β I} (fun i β¦ M i)).symm.toLinearMap with psi_def
+ set Ο := rTensor (β¨ i, M i) I.subtype
+ set Ο := (fun i β¦ component R ΞΉ (fun j β¦ ({x // x β I} β[R] (M j))) i)
+ rw [β Equiv.injective_comp (TensorProduct.directSumRight _ _ _).symm.toEquiv]
+ rw [LinearEquiv.coe_toEquiv, β LinearEquiv.coe_coe, β LinearMap.coe_comp]
+ rw [LinearEquiv.coe_toEquiv, β LinearEquiv.coe_coe, β LinearMap.coe_comp]
+ rw [β psi_def, injective_iff_map_eq_zero ((Ξ·β.comp Ο).comp Ο)]
+ have hβ : β (i : ΞΉ), (Ο i).comp ((Ξ·β.comp Ο).comp Ο) = (Ξ· i).comp ((Ο i).comp (Ο i))
+ Β· intro i
+ apply DirectSum.linearMap_ext
+ intro j
+ apply TensorProduct.ext'
+ intro a m
+ simp only [coe_comp, LinearEquiv.coe_coe, Function.comp_apply, directSumRight_symm_lof_tmul,
+ rTensor_tmul, coeSubtype, lid_tmul, map_smul]
+ rw [DirectSum.component.of, DirectSum.component.of]
+ by_cases hβ : j = i
+ Β· subst j; simp
+ Β· simp [hβ]
+ intro a ha; rw [DirectSum.ext_iff R]; intro i
+ have f := LinearMap.congr_arg (f:= (Ο i)) ha
+ erw [LinearMap.congr_fun (hβ i) a] at f
+ rw [(map_zero (Ο i) : (Ο i) 0 = (0 : M i))] at f
+ have hβ := (F i)
+ rw [iff_rTensor_injective] at hβ
+ have hβ := hβ hI
+ simp only [coe_comp, LinearEquiv.coe_coe, Function.comp_apply, AddEquivClass.map_eq_zero_iff,
+ hβ, LinearMap.map_eq_zero_iff] at f
+ simp [f]
+
+/-- Free `R`-modules over discrete types are flat. -/
+instance finsupp (ΞΉ : Type v) : Flat R (ΞΉ ββ R) :=
+ let _ := Classical.decEq ΞΉ
+ of_linearEquiv R _ _ (finsuppLEquivDirectSum R R ΞΉ)
+
+variable (M : Type v) [AddCommGroup M] [Module R M]
+
+instance of_free [Free R M] : Flat R M := of_linearEquiv R _ _ (Free.repr R M)
+
+/-- A projective module with a discrete type of generator is flat -/
+lemma of_projective_surjective (ΞΉ : Type w) [Projective R M] (p : (ΞΉ ββ R) ββ[R] M)
+ (hp : Surjective p) : Flat R M := by
+ have h := Module.projective_lifting_property p (LinearMap.id) hp
+ cases h with
+ | _ e he => exact of_retract R _ _ _ _ he
+
+instance of_projective [h : Projective R M] : Flat R M := by
+ rw [Module.projective_def'] at h
+ cases h with
+ | _ e he => exact of_retract R _ _ _ _ he
+
end Flat
end Module
@@ -2,14 +2,11 @@
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
-
-! This file was ported from Lean 3 source module ring_theory.flat
-! leanprover-community/mathlib commit 62c0a4ef1441edb463095ea02a06e87f3dfe135c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.RingTheory.Noetherian
+#align_import ring_theory.flat from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
+
/-!
# Flat modules
Now that leanprover/lean4#2210 has been merged, this PR:
set_option synthInstance.etaExperiment true
commands (and some etaExperiment%
term elaborators)set_option maxHeartbeats
commandsCo-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email>
@@ -69,7 +69,6 @@ namespace Flat
open TensorProduct LinearMap Submodule
-set_option synthInstance.etaExperiment true in
instance self (R : Type u) [CommRing R] : Flat R R :=
β¨by
intro I _
Fg
to FG
(#3948)
Please refer to this Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Naming.20convention/near/357712556
@@ -62,7 +62,7 @@ open TensorProduct
/-- An `R`-module `M` is flat if for all finitely generated ideals `I` of `R`,
the canonical map `I β M ββ M` is injective. -/
class Flat (R : Type u) (M : Type v) [CommRing R] [AddCommGroup M] [Module R M] : Prop where
- out : β β¦I : Ideal Rβ¦ (_ : I.Fg), Injective (TensorProduct.lift ((lsmul R M).comp I.subtype))
+ out : β β¦I : Ideal Rβ¦ (_ : I.FG), Injective (TensorProduct.lift ((lsmul R M).comp I.subtype))
#align module.flat Module.Flat
namespace Flat
This is to fix timeouts in https://github.com/leanprover-community/mathlib4/pull/3552.
See discussion at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/!4.233552.20.28LinearAlgebra.2EMatrix.2EToLin.29.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -69,6 +69,7 @@ namespace Flat
open TensorProduct LinearMap Submodule
+set_option synthInstance.etaExperiment true in
instance self (R : Type u) [CommRing R] : Flat R R :=
β¨by
intro I _
The unported dependencies are