data.qpf.univariate.basic
⟷
Mathlib.Data.QPF.Univariate.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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2018 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad
-/
-import Data.Pfunctor.Univariate.M
+import Data.PFunctor.Univariate.M
#align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"8eb9c42d4d34c77f6ee84ea766ae4070233a973c"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -686,7 +686,7 @@ theorem has_good_supp_iff {α : Type u} (x : F α) :
constructor
· intro h
have : liftp (supp x) x := by rw [h] <;> intro u <;> exact id
- rw [liftp_iff] at this ; rcases this with ⟨a, f, xeq, h'⟩
+ rw [liftp_iff] at this; rcases this with ⟨a, f, xeq, h'⟩
refine' ⟨a, f, xeq.symm, _⟩
intro a' f' h''
rintro u ⟨i, _, hfi⟩
@@ -781,13 +781,13 @@ theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpP
by
constructor <;> intro h
· rintro α p ⟨a, f⟩
- have h' := h; rw [supp_preservation_iff_uniform] at h'
- dsimp only [supp_preservation, supp] at h
+ have h' := h; rw [supp_preservation_iff_uniform] at h'
+ dsimp only [supp_preservation, supp] at h
rwa [liftp_iff_of_is_uniform, supp_eq_of_is_uniform, PFunctor.liftp_iff'] <;> try assumption
· simp only [image_univ, mem_range, exists_imp]
constructor <;> intros <;> subst_vars <;> solve_by_elim
· rintro α ⟨a, f⟩
- simp only [liftp_preservation] at h
+ simp only [liftp_preservation] at h
simp only [supp, h]
#align qpf.supp_preservation_iff_liftp_preservation QPF.suppPreservation_iff_liftpPreservation
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -302,7 +302,7 @@ theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
rw [fix.rec, fix.mk]
dsimp
cases' h : repr x with a f
- rw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, ← PFunctor.comp_map, abs_map,
+ rw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, ← PFunctor.map_map, abs_map,
← h, abs_repr, this]
#align qpf.fix.rec_eq QPF.Fix.rec_eq
-/
@@ -492,9 +492,9 @@ private theorem cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x,
intro c d; apply Quot.inductionOn d; clear d
intro d rcd; apply Quot.sound; apply rcd)
have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl
- rw [← this, PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map,
- abs_map, h₀]
- rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
+ rw [← this, PFunctor.map_map _ _ f, PFunctor.map_map _ _ (Quot.mk r), abs_map, abs_map, abs_map,
+ h₀]
+ rw [PFunctor.map_map _ _ f, PFunctor.map_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
refine' ⟨r', this, rxy⟩
#print QPF.Cofix.bisim_rel /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/c8f305514e0d47dfaa710f5a52f0d21b588e6328
@@ -44,29 +44,29 @@ The present theory focuses on the univariate case for qpfs
universe u
-#print Qpf /-
+#print QPF /-
/-- Quotients of polynomial functors.
Roughly speaking, saying that `F` is a quotient of a polynomial functor means that for each `α`,
elements of `F α` are represented by pairs `⟨a, f⟩`, where `a` is the shape of the object and
`f` indexes the relevant elements of `α`, in a suitably natural manner.
-/
-class Qpf (F : Type u → Type u) [Functor F] where
+class QPF (F : Type u → Type u) [Functor F] where
p : PFunctor.{u}
abs : ∀ {α}, P.Obj α → F α
repr : ∀ {α}, F α → P.Obj α
abs_repr : ∀ {α} (x : F α), abs (repr x) = x
abs_map : ∀ {α β} (f : α → β) (p : P.Obj α), abs (f <$> p) = f <$> abs p
-#align qpf Qpf
+#align qpf QPF
-/
-namespace Qpf
+namespace QPF
-variable {F : Type u → Type u} [Functor F] [q : Qpf F]
+variable {F : Type u → Type u} [Functor F] [q : QPF F]
open Functor (Liftp Liftr)
-#print Qpf.id_map /-
+#print QPF.id_map /-
/-
Show that every qpf is a lawful functor.
@@ -75,24 +75,24 @@ characterization. We can only propagate the assumption.
-/
theorem id_map {α : Type _} (x : F α) : id <$> x = x := by rw [← abs_repr x];
cases' repr x with a f; rw [← abs_map]; rfl
-#align qpf.id_map Qpf.id_map
+#align qpf.id_map QPF.id_map
-/
-#print Qpf.comp_map /-
+#print QPF.comp_map /-
theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α) :
(g ∘ f) <$> x = g <$> f <$> x := by rw [← abs_repr x]; cases' repr x with a f;
rw [← abs_map, ← abs_map, ← abs_map]; rfl
-#align qpf.comp_map Qpf.comp_map
+#align qpf.comp_map QPF.comp_map
-/
-#print Qpf.lawfulFunctor /-
+#print QPF.lawfulFunctor /-
theorem lawfulFunctor
(h : ∀ α β : Type u, @Functor.mapConst F _ α _ = Functor.map ∘ Function.const β) :
LawfulFunctor F :=
{ map_const := h
id_map := @id_map F _ _
comp_map := @comp_map F _ _ }
-#align qpf.is_lawful_functor Qpf.lawfulFunctor
+#align qpf.is_lawful_functor QPF.lawfulFunctor
-/
/-
@@ -102,7 +102,7 @@ section
open Functor
-#print Qpf.liftp_iff /-
+#print QPF.liftp_iff /-
theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
Liftp p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i, p (f i) :=
by
@@ -114,10 +114,10 @@ theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
rintro ⟨a, f, h₀, h₁⟩; dsimp at *
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, h₀]; rfl
-#align qpf.liftp_iff Qpf.liftp_iff
+#align qpf.liftp_iff QPF.liftp_iff
-/
-#print Qpf.liftp_iff' /-
+#print QPF.liftp_iff' /-
theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
Liftp p x ↔ ∃ u : q.p.Obj α, abs u = x ∧ ∀ i, p (u.snd i) :=
by
@@ -129,10 +129,10 @@ theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
rintro ⟨⟨a, f⟩, h₀, h₁⟩; dsimp at *
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, ← h₀]; rfl
-#align qpf.liftp_iff' Qpf.liftp_iff'
+#align qpf.liftp_iff' QPF.liftp_iff'
-/
-#print Qpf.liftr_iff /-
+#print QPF.liftr_iff /-
theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
Liftr r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i, r (f₀ i) (f₁ i) :=
by
@@ -147,12 +147,12 @@ theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
dsimp; constructor
· rw [xeq, ← abs_map]; rfl
rw [yeq, ← abs_map]; rfl
-#align qpf.liftr_iff Qpf.liftr_iff
+#align qpf.liftr_iff QPF.liftr_iff
-/
end
-#print Qpf.recF /-
+#print QPF.recF /-
/-
Think of trees in the `W` type corresponding to `P` as representatives of elements of the
least fixed point of `F`, and assign a canonical representative to each equivalence class
@@ -161,23 +161,23 @@ of trees.
/-- does recursion on `q.P.W` using `g : F α → α` rather than `g : P α → α` -/
def recF {α : Type _} (g : F α → α) : q.p.W → α
| ⟨a, f⟩ => g (abs ⟨a, fun x => recF (f x)⟩)
-#align qpf.recF Qpf.recF
+#align qpf.recF QPF.recF
-/
-#print Qpf.recF_eq /-
+#print QPF.recF_eq /-
theorem recF_eq {α : Type _} (g : F α → α) (x : q.p.W) : recF g x = g (abs (recF g <$> x.dest)) :=
by cases x <;> rfl
-#align qpf.recF_eq Qpf.recF_eq
+#align qpf.recF_eq QPF.recF_eq
-/
-#print Qpf.recF_eq' /-
+#print QPF.recF_eq' /-
theorem recF_eq' {α : Type _} (g : F α → α) (a : q.p.A) (f : q.p.B a → q.p.W) :
recF g ⟨a, f⟩ = g (abs (recF g <$> ⟨a, f⟩)) :=
rfl
-#align qpf.recF_eq' Qpf.recF_eq'
+#align qpf.recF_eq' QPF.recF_eq'
-/
-#print Qpf.Wequiv /-
+#print QPF.Wequiv /-
/-- two trees are equivalent if their F-abstractions are -/
inductive Wequiv : q.p.W → q.p.W → Prop
| ind (a : q.p.A) (f f' : q.p.B a → q.p.W) : (∀ x, Wequiv (f x) (f' x)) → Wequiv ⟨a, f⟩ ⟨a, f'⟩
@@ -185,10 +185,10 @@ inductive Wequiv : q.p.W → q.p.W → Prop
abs (a : q.p.A) (f : q.p.B a → q.p.W) (a' : q.p.A) (f' : q.p.B a' → q.p.W) :
abs ⟨a, f⟩ = abs ⟨a', f'⟩ → Wequiv ⟨a, f⟩ ⟨a', f'⟩
| trans (u v w : q.p.W) : Wequiv u v → Wequiv v w → Wequiv u w
-#align qpf.Wequiv Qpf.Wequiv
+#align qpf.Wequiv QPF.Wequiv
-/
-#print Qpf.recF_eq_of_Wequiv /-
+#print QPF.recF_eq_of_Wequiv /-
/-- recF is insensitive to the representation -/
theorem recF_eq_of_Wequiv {α : Type u} (u : F α → α) (x y : q.p.W) :
Wequiv x y → recF u x = recF u y := by
@@ -197,40 +197,40 @@ theorem recF_eq_of_Wequiv {α : Type u} (u : F α → α) (x y : q.p.W) :
case ind a f f' h ih => simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]
case abs a f a' f' h => simp only [recF_eq', abs_map, h]
case trans x y z e₁ e₂ ih₁ ih₂ => exact Eq.trans ih₁ ih₂
-#align qpf.recF_eq_of_Wequiv Qpf.recF_eq_of_Wequiv
+#align qpf.recF_eq_of_Wequiv QPF.recF_eq_of_Wequiv
-/
-#print Qpf.Wequiv.abs' /-
+#print QPF.Wequiv.abs' /-
theorem Wequiv.abs' (x y : q.p.W) (h : abs x.dest = abs y.dest) : Wequiv x y := by cases x; cases y;
apply Wequiv.abs; apply h
-#align qpf.Wequiv.abs' Qpf.Wequiv.abs'
+#align qpf.Wequiv.abs' QPF.Wequiv.abs'
-/
-#print Qpf.Wequiv.refl /-
+#print QPF.Wequiv.refl /-
theorem Wequiv.refl (x : q.p.W) : Wequiv x x := by
cases' x with a f <;> exact Wequiv.abs a f a f rfl
-#align qpf.Wequiv.refl Qpf.Wequiv.refl
+#align qpf.Wequiv.refl QPF.Wequiv.refl
-/
-#print Qpf.Wequiv.symm /-
+#print QPF.Wequiv.symm /-
theorem Wequiv.symm (x y : q.p.W) : Wequiv x y → Wequiv y x :=
by
cases' x with a f; cases' y with b g
intro h; induction h
case ind a f f' h ih => exact Wequiv.ind _ _ _ ih
case abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm
- case trans x y z e₁ e₂ ih₁ ih₂ => exact Qpf.Wequiv.trans _ _ _ ih₂ ih₁
-#align qpf.Wequiv.symm Qpf.Wequiv.symm
+ case trans x y z e₁ e₂ ih₁ ih₂ => exact QPF.Wequiv.trans _ _ _ ih₂ ih₁
+#align qpf.Wequiv.symm QPF.Wequiv.symm
-/
-#print Qpf.Wrepr /-
+#print QPF.Wrepr /-
/-- maps every element of the W type to a canonical representative -/
def Wrepr : q.p.W → q.p.W :=
recF (PFunctor.W.mk ∘ repr)
-#align qpf.Wrepr Qpf.Wrepr
+#align qpf.Wrepr QPF.Wrepr
-/
-#print Qpf.Wrepr_equiv /-
+#print QPF.Wrepr_equiv /-
theorem Wrepr_equiv (x : q.p.W) : Wequiv (Wrepr x) x :=
by
induction' x with a f ih
@@ -241,56 +241,56 @@ theorem Wrepr_equiv (x : q.p.W) : Wequiv (Wrepr x) x :=
rw [this, PFunctor.W.dest_mk, abs_repr]
rfl
apply Wequiv.ind; exact ih
-#align qpf.Wrepr_equiv Qpf.Wrepr_equiv
+#align qpf.Wrepr_equiv QPF.Wrepr_equiv
-/
-#print Qpf.Wsetoid /-
+#print QPF.Wsetoid /-
/-- Define the fixed point as the quotient of trees under the equivalence relation `Wequiv`.
-/
def Wsetoid : Setoid q.p.W :=
⟨Wequiv, @Wequiv.refl _ _ _, @Wequiv.symm _ _ _, @Wequiv.trans _ _ _⟩
-#align qpf.W_setoid Qpf.Wsetoid
+#align qpf.W_setoid QPF.Wsetoid
-/
attribute [local instance] W_setoid
-#print Qpf.Fix /-
+#print QPF.Fix /-
/-- inductive type defined as initial algebra of a Quotient of Polynomial Functor -/
@[nolint has_nonempty_instance]
-def Fix (F : Type u → Type u) [Functor F] [q : Qpf F] :=
+def Fix (F : Type u → Type u) [Functor F] [q : QPF F] :=
Quotient (Wsetoid : Setoid q.p.W)
-#align qpf.fix Qpf.Fix
+#align qpf.fix QPF.Fix
-/
-#print Qpf.Fix.rec /-
+#print QPF.Fix.rec /-
/-- recursor of a type defined by a qpf -/
def Fix.rec {α : Type _} (g : F α → α) : Fix F → α :=
Quot.lift (recF g) (recF_eq_of_Wequiv g)
-#align qpf.fix.rec Qpf.Fix.rec
+#align qpf.fix.rec QPF.Fix.rec
-/
-#print Qpf.fixToW /-
+#print QPF.fixToW /-
/-- access the underlying W-type of a fixpoint data type -/
def fixToW : Fix F → q.p.W :=
Quotient.lift Wrepr (recF_eq_of_Wequiv fun x => @PFunctor.W.mk q.p (repr x))
-#align qpf.fix_to_W Qpf.fixToW
+#align qpf.fix_to_W QPF.fixToW
-/
-#print Qpf.Fix.mk /-
+#print QPF.Fix.mk /-
/-- constructor of a type defined by a qpf -/
def Fix.mk (x : F (Fix F)) : Fix F :=
Quot.mk _ (PFunctor.W.mk (fixToW <$> repr x))
-#align qpf.fix.mk Qpf.Fix.mk
+#align qpf.fix.mk QPF.Fix.mk
-/
-#print Qpf.Fix.dest /-
+#print QPF.Fix.dest /-
/-- destructor of a type defined by a qpf -/
def Fix.dest : Fix F → F (Fix F) :=
Fix.rec (Functor.map Fix.mk)
-#align qpf.fix.dest Qpf.Fix.dest
+#align qpf.fix.dest QPF.Fix.dest
-/
-#print Qpf.Fix.rec_eq /-
+#print QPF.Fix.rec_eq /-
theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
Fix.rec g (Fix.mk x) = g (Fix.rec g <$> x) :=
by
@@ -304,10 +304,10 @@ theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
cases' h : repr x with a f
rw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, ← PFunctor.comp_map, abs_map,
← h, abs_repr, this]
-#align qpf.fix.rec_eq Qpf.Fix.rec_eq
+#align qpf.fix.rec_eq QPF.Fix.rec_eq
-/
-#print Qpf.Fix.ind_aux /-
+#print QPF.Fix.ind_aux /-
theorem Fix.ind_aux (a : q.p.A) (f : q.p.B a → q.p.W) :
Fix.mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦⟨a, f⟩⟧ :=
by
@@ -322,10 +322,10 @@ theorem Fix.ind_aux (a : q.p.A) (f : q.p.B a → q.p.W) :
rw [this]
apply Quot.sound
apply Wrepr_equiv
-#align qpf.fix.ind_aux Qpf.Fix.ind_aux
+#align qpf.fix.ind_aux QPF.Fix.ind_aux
-/
-#print Qpf.Fix.ind_rec /-
+#print QPF.Fix.ind_rec /-
theorem Fix.ind_rec {α : Type u} (g₁ g₂ : Fix F → α)
(h : ∀ x : F (Fix F), g₁ <$> x = g₂ <$> x → g₁ (Fix.mk x) = g₂ (Fix.mk x)) : ∀ x, g₁ x = g₂ x :=
by
@@ -337,10 +337,10 @@ theorem Fix.ind_rec {α : Type u} (g₁ g₂ : Fix F → α)
rw [← abs_map, ← abs_map, PFunctor.map_eq, PFunctor.map_eq]
dsimp [Function.comp]
congr with x; apply ih
-#align qpf.fix.ind_rec Qpf.Fix.ind_rec
+#align qpf.fix.ind_rec QPF.Fix.ind_rec
-/
-#print Qpf.Fix.rec_unique /-
+#print QPF.Fix.rec_unique /-
theorem Fix.rec_unique {α : Type u} (g : F α → α) (h : Fix F → α)
(hyp : ∀ x, h (Fix.mk x) = g (h <$> x)) : Fix.rec g = h :=
by
@@ -348,10 +348,10 @@ theorem Fix.rec_unique {α : Type u} (g : F α → α) (h : Fix F → α)
apply fix.ind_rec
intro x hyp'
rw [hyp, ← hyp', fix.rec_eq]
-#align qpf.fix.rec_unique Qpf.Fix.rec_unique
+#align qpf.fix.rec_unique QPF.Fix.rec_unique
-/
-#print Qpf.Fix.mk_dest /-
+#print QPF.Fix.mk_dest /-
theorem Fix.mk_dest (x : Fix F) : Fix.mk (Fix.dest x) = x :=
by
change (fix.mk ∘ fix.dest) x = id x
@@ -359,10 +359,10 @@ theorem Fix.mk_dest (x : Fix F) : Fix.mk (Fix.dest x) = x :=
intro x; dsimp
rw [fix.dest, fix.rec_eq, id_map, comp_map]
intro h; rw [h]
-#align qpf.fix.mk_dest Qpf.Fix.mk_dest
+#align qpf.fix.mk_dest QPF.Fix.mk_dest
-/
-#print Qpf.Fix.dest_mk /-
+#print QPF.Fix.dest_mk /-
theorem Fix.dest_mk (x : F (Fix F)) : Fix.dest (Fix.mk x) = x :=
by
unfold fix.dest; rw [fix.rec_eq, ← fix.dest, ← comp_map]
@@ -370,10 +370,10 @@ theorem Fix.dest_mk (x : F (Fix F)) : Fix.dest (Fix.mk x) = x :=
rhs
rw [← id_map x]
congr with x; apply fix.mk_dest
-#align qpf.fix.dest_mk Qpf.Fix.dest_mk
+#align qpf.fix.dest_mk QPF.Fix.dest_mk
-/
-#print Qpf.Fix.ind /-
+#print QPF.Fix.ind /-
theorem Fix.ind (p : Fix F → Prop) (h : ∀ x : F (Fix F), Liftp p x → p (Fix.mk x)) : ∀ x, p x :=
by
apply Quot.ind
@@ -385,65 +385,65 @@ theorem Fix.ind (p : Fix F → Prop) (h : ∀ x : F (Fix F), Liftp p x → p (Fi
rw [liftp_iff]
refine' ⟨_, _, rfl, _⟩
apply ih
-#align qpf.fix.ind Qpf.Fix.ind
+#align qpf.fix.ind QPF.Fix.ind
-/
-end Qpf
+end QPF
/-
Construct the final coalgebra to a qpf.
-/
-namespace Qpf
+namespace QPF
-variable {F : Type u → Type u} [Functor F] [q : Qpf F]
+variable {F : Type u → Type u} [Functor F] [q : QPF F]
open Functor (Liftp Liftr)
-#print Qpf.corecF /-
+#print QPF.corecF /-
/-- does recursion on `q.P.M` using `g : α → F α` rather than `g : α → P α` -/
def corecF {α : Type _} (g : α → F α) : α → q.p.M :=
PFunctor.M.corec fun x => repr (g x)
-#align qpf.corecF Qpf.corecF
+#align qpf.corecF QPF.corecF
-/
-#print Qpf.corecF_eq /-
+#print QPF.corecF_eq /-
theorem corecF_eq {α : Type _} (g : α → F α) (x : α) :
PFunctor.M.dest (corecF g x) = corecF g <$> repr (g x) := by rw [corecF, PFunctor.M.dest_corec]
-#align qpf.corecF_eq Qpf.corecF_eq
+#align qpf.corecF_eq QPF.corecF_eq
-/
-#print Qpf.IsPrecongr /-
+#print QPF.IsPrecongr /-
-- Equivalence
/-- A pre-congruence on q.P.M *viewed as an F-coalgebra*. Not necessarily symmetric. -/
def IsPrecongr (r : q.p.M → q.p.M → Prop) : Prop :=
∀ ⦃x y⦄, r x y → abs (Quot.mk r <$> PFunctor.M.dest x) = abs (Quot.mk r <$> PFunctor.M.dest y)
-#align qpf.is_precongr Qpf.IsPrecongr
+#align qpf.is_precongr QPF.IsPrecongr
-/
-#print Qpf.Mcongr /-
+#print QPF.Mcongr /-
/-- The maximal congruence on q.P.M -/
def Mcongr : q.p.M → q.p.M → Prop := fun x y => ∃ r, IsPrecongr r ∧ r x y
-#align qpf.Mcongr Qpf.Mcongr
+#align qpf.Mcongr QPF.Mcongr
-/
-#print Qpf.Cofix /-
+#print QPF.Cofix /-
/-- coinductive type defined as the final coalgebra of a qpf -/
-def Cofix (F : Type u → Type u) [Functor F] [q : Qpf F] :=
+def Cofix (F : Type u → Type u) [Functor F] [q : QPF F] :=
Quot (@Mcongr F _ q)
-#align qpf.cofix Qpf.Cofix
+#align qpf.cofix QPF.Cofix
-/
instance [Inhabited q.p.A] : Inhabited (Cofix F) :=
⟨Quot.mk _ default⟩
-#print Qpf.Cofix.corec /-
+#print QPF.Cofix.corec /-
/-- corecursor for type defined by `cofix` -/
def Cofix.corec {α : Type _} (g : α → F α) (x : α) : Cofix F :=
Quot.mk _ (corecF g x)
-#align qpf.cofix.corec Qpf.Cofix.corec
+#align qpf.cofix.corec QPF.Cofix.corec
-/
-#print Qpf.Cofix.dest /-
+#print QPF.Cofix.dest /-
/-- destructor for type defined by `cofix` -/
def Cofix.dest : Cofix F → F (Cofix F) :=
Quot.lift (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x))
@@ -454,10 +454,10 @@ def Cofix.dest : Cofix F → F (Cofix F) :=
conv =>
lhs
rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map])
-#align qpf.cofix.dest Qpf.Cofix.dest
+#align qpf.cofix.dest QPF.Cofix.dest
-/
-#print Qpf.Cofix.dest_corec /-
+#print QPF.Cofix.dest_corec /-
theorem Cofix.dest_corec {α : Type u} (g : α → F α) (x : α) :
Cofix.dest (Cofix.corec g x) = Cofix.corec g <$> g x :=
by
@@ -466,7 +466,7 @@ theorem Cofix.dest_corec {α : Type u} (g : α → F α) (x : α) :
rw [cofix.dest, cofix.corec];
dsimp
rw [corecF_eq, abs_map, abs_repr, ← comp_map]; rfl
-#align qpf.cofix.dest_corec Qpf.Cofix.dest_corec
+#align qpf.cofix.dest_corec QPF.Cofix.dest_corec
-/
private theorem cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x, r x x)
@@ -497,7 +497,7 @@ private theorem cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x,
rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
refine' ⟨r', this, rxy⟩
-#print Qpf.Cofix.bisim_rel /-
+#print QPF.Cofix.bisim_rel /-
theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
(h : ∀ x y, r x y → Quot.mk r <$> Cofix.dest x = Quot.mk r <$> Cofix.dest y) :
∀ x y, r x y → x = y := by
@@ -512,10 +512,10 @@ theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
rw [@comp_map _ _ q _ _ _ (Quot.mk r), @comp_map _ _ q _ _ _ (Quot.mk r)]
rw [h _ _ r'xy]
right; exact rxy
-#align qpf.cofix.bisim_rel Qpf.Cofix.bisim_rel
+#align qpf.cofix.bisim_rel QPF.Cofix.bisim_rel
-/
-#print Qpf.Cofix.bisim /-
+#print QPF.Cofix.bisim /-
theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
(h : ∀ x y, r x y → Liftr r (Cofix.dest x) (Cofix.dest y)) : ∀ x y, r x y → x = y :=
by
@@ -526,10 +526,10 @@ theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
congr 2 with i
apply Quot.sound
apply h'
-#align qpf.cofix.bisim Qpf.Cofix.bisim
+#align qpf.cofix.bisim QPF.Cofix.bisim
-/
-#print Qpf.Cofix.bisim' /-
+#print QPF.Cofix.bisim' /-
theorem Cofix.bisim' {α : Type _} (Q : α → Prop) (u v : α → Cofix F)
(h :
∀ x,
@@ -546,23 +546,23 @@ theorem Cofix.bisim' {α : Type _} (Q : α → Prop) (u v : α → Cofix F)
rw [liftr_iff]
refine' ⟨a, f, f', xeq.symm ▸ ux'eq, yeq.symm ▸ vx'eq, h'⟩)
_ _ ⟨x, Qx, rfl, rfl⟩
-#align qpf.cofix.bisim' Qpf.Cofix.bisim'
+#align qpf.cofix.bisim' QPF.Cofix.bisim'
-/
-end Qpf
+end QPF
/-
Composition of qpfs.
-/
-namespace Qpf
+namespace QPF
-variable {F₂ : Type u → Type u} [Functor F₂] [q₂ : Qpf F₂]
+variable {F₂ : Type u → Type u} [Functor F₂] [q₂ : QPF F₂]
-variable {F₁ : Type u → Type u} [Functor F₁] [q₁ : Qpf F₁]
+variable {F₁ : Type u → Type u} [Functor F₁] [q₁ : QPF F₁]
-#print Qpf.comp /-
+#print QPF.comp /-
/-- composition of qpfs gives another qpf -/
-def comp : Qpf (Functor.Comp F₂ F₁)
+def comp : QPF (Functor.Comp F₂ F₁)
where
p := PFunctor.comp q₂.p q₁.p
abs α := by
@@ -607,19 +607,19 @@ def comp : Qpf (Functor.Comp F₂ F₁)
ext x
rw [← abs_map]
rfl
-#align qpf.comp Qpf.comp
+#align qpf.comp QPF.comp
-/
-end Qpf
+end QPF
/-
Quotients.
We show that if `F` is a qpf and `G` is a suitable quotient of `F`, then `G` is a qpf.
-/
-namespace Qpf
+namespace QPF
-variable {F : Type u → Type u} [Functor F] [q : Qpf F]
+variable {F : Type u → Type u} [Functor F] [q : QPF F]
variable {G : Type u → Type u} [Functor G]
@@ -627,36 +627,36 @@ variable {FG_abs : ∀ {α}, F α → G α}
variable {FG_repr : ∀ {α}, G α → F α}
-#print Qpf.quotientQpf /-
+#print QPF.quotientQPF /-
/-- Given a qpf `F` and a well-behaved surjection `FG_abs` from F α to
functor G α, `G` is a qpf. We can consider `G` a quotient on `F` where
elements `x y : F α` are in the same equivalence class if
`FG_abs x = FG_abs y` -/
-def quotientQpf (FG_abs_repr : ∀ {α} (x : G α), FG_abs (FG_repr x) = x)
- (FG_abs_map : ∀ {α β} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x) : Qpf G
+def quotientQPF (FG_abs_repr : ∀ {α} (x : G α), FG_abs (FG_repr x) = x)
+ (FG_abs_map : ∀ {α β} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x) : QPF G
where
p := q.p
abs {α} p := FG_abs (abs p)
repr {α} x := repr (FG_repr x)
abs_repr {α} x := by rw [abs_repr, FG_abs_repr]
abs_map {α β} f x := by rw [abs_map, FG_abs_map]
-#align qpf.quotient_qpf Qpf.quotientQpf
+#align qpf.quotient_qpf QPF.quotientQPF
-/
-end Qpf
+end QPF
/-
Support.
-/
-namespace Qpf
+namespace QPF
-variable {F : Type u → Type u} [Functor F] [q : Qpf F]
+variable {F : Type u → Type u} [Functor F] [q : QPF F]
open Functor (Liftp Liftr supp)
open Set
-#print Qpf.mem_supp /-
+#print QPF.mem_supp /-
theorem mem_supp {α : Type u} (x : F α) (u : α) :
u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ :=
by
@@ -669,16 +669,16 @@ theorem mem_supp {α : Type u} (x : F α) (u : α) :
rintro ⟨a, f, xeq, h'⟩
rcases h a f xeq.symm with ⟨i, _, hi⟩
rw [← hi]; apply h'
-#align qpf.mem_supp Qpf.mem_supp
+#align qpf.mem_supp QPF.mem_supp
-/
-#print Qpf.supp_eq /-
+#print QPF.supp_eq /-
theorem supp_eq {α : Type u} (x : F α) : supp x = {u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ} := by
ext <;> apply mem_supp
-#align qpf.supp_eq Qpf.supp_eq
+#align qpf.supp_eq QPF.supp_eq
-/
-#print Qpf.has_good_supp_iff /-
+#print QPF.has_good_supp_iff /-
theorem has_good_supp_iff {α : Type u} (x : F α) :
(∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ :=
@@ -702,47 +702,47 @@ theorem has_good_supp_iff {α : Type u} (x : F α) :
intro a' f' xeq'
apply h a' f' xeq'
apply mem_image_of_mem _ (mem_univ _)
-#align qpf.has_good_supp_iff Qpf.has_good_supp_iff
+#align qpf.has_good_supp_iff QPF.has_good_supp_iff
-/
variable (q)
-#print Qpf.IsUniform /-
+#print QPF.IsUniform /-
/-- A qpf is said to be uniform if every polynomial functor
representing a single value all have the same range. -/
def IsUniform : Prop :=
∀ ⦃α : Type u⦄ (a a' : q.p.A) (f : q.p.B a → α) (f' : q.p.B a' → α),
abs ⟨a, f⟩ = abs ⟨a', f'⟩ → f '' univ = f' '' univ
-#align qpf.is_uniform Qpf.IsUniform
+#align qpf.is_uniform QPF.IsUniform
-/
-#print Qpf.LiftpPreservation /-
+#print QPF.LiftpPreservation /-
/-- does `abs` preserve `liftp`? -/
def LiftpPreservation : Prop :=
∀ ⦃α⦄ (p : α → Prop) (x : q.p.Obj α), Liftp p (abs x) ↔ Liftp p x
-#align qpf.liftp_preservation Qpf.LiftpPreservation
+#align qpf.liftp_preservation QPF.LiftpPreservation
-/
-#print Qpf.SuppPreservation /-
+#print QPF.SuppPreservation /-
/-- does `abs` preserve `supp`? -/
def SuppPreservation : Prop :=
∀ ⦃α⦄ (x : q.p.Obj α), supp (abs x) = supp x
-#align qpf.supp_preservation Qpf.SuppPreservation
+#align qpf.supp_preservation QPF.SuppPreservation
-/
variable (q)
-#print Qpf.supp_eq_of_isUniform /-
+#print QPF.supp_eq_of_isUniform /-
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : Type u} (a : q.p.A) (f : q.p.B a → α) :
supp (abs ⟨a, f⟩) = f '' univ := by
ext u; rw [mem_supp]; constructor
· intro h'; apply h' _ _ rfl
intro h' a' f' e
rw [← h _ _ _ _ e.symm]; apply h'
-#align qpf.supp_eq_of_is_uniform Qpf.supp_eq_of_isUniform
+#align qpf.supp_eq_of_is_uniform QPF.supp_eq_of_isUniform
-/
-#print Qpf.liftp_iff_of_isUniform /-
+#print QPF.liftp_iff_of_isUniform /-
theorem liftp_iff_of_isUniform (h : q.IsUniform) {α : Type u} (x : F α) (p : α → Prop) :
Liftp p x ↔ ∀ u ∈ supp x, p u :=
by
@@ -755,28 +755,28 @@ theorem liftp_iff_of_isUniform (h : q.IsUniform) {α : Type u} (x : F α) (p :
refine' ⟨a, f, rfl, fun i => h' _ _⟩
rw [supp_eq_of_is_uniform h]
exact ⟨i, mem_univ i, rfl⟩
-#align qpf.liftp_iff_of_is_uniform Qpf.liftp_iff_of_isUniform
+#align qpf.liftp_iff_of_is_uniform QPF.liftp_iff_of_isUniform
-/
-#print Qpf.supp_map /-
+#print QPF.supp_map /-
theorem supp_map (h : q.IsUniform) {α β : Type u} (g : α → β) (x : F α) :
supp (g <$> x) = g '' supp x := by
rw [← abs_repr x]; cases' repr x with a f; rw [← abs_map, PFunctor.map_eq]
rw [supp_eq_of_is_uniform h, supp_eq_of_is_uniform h, image_comp]
-#align qpf.supp_map Qpf.supp_map
+#align qpf.supp_map QPF.supp_map
-/
-#print Qpf.suppPreservation_iff_uniform /-
+#print QPF.suppPreservation_iff_uniform /-
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform :=
by
constructor
· intro h α a a' f f' h'
rw [← PFunctor.supp_eq, ← PFunctor.supp_eq, ← h, h', h]
· rintro h α ⟨a, f⟩; rwa [supp_eq_of_is_uniform, PFunctor.supp_eq]
-#align qpf.supp_preservation_iff_uniform Qpf.suppPreservation_iff_uniform
+#align qpf.supp_preservation_iff_uniform QPF.suppPreservation_iff_uniform
-/
-#print Qpf.suppPreservation_iff_liftpPreservation /-
+#print QPF.suppPreservation_iff_liftpPreservation /-
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation :=
by
constructor <;> intro h
@@ -789,14 +789,14 @@ theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpP
· rintro α ⟨a, f⟩
simp only [liftp_preservation] at h
simp only [supp, h]
-#align qpf.supp_preservation_iff_liftp_preservation Qpf.suppPreservation_iff_liftpPreservation
+#align qpf.supp_preservation_iff_liftp_preservation QPF.suppPreservation_iff_liftpPreservation
-/
-#print Qpf.liftpPreservation_iff_uniform /-
+#print QPF.liftpPreservation_iff_uniform /-
theorem liftpPreservation_iff_uniform : q.LiftpPreservation ↔ q.IsUniform := by
rw [← supp_preservation_iff_liftp_preservation, supp_preservation_iff_uniform]
-#align qpf.liftp_preservation_iff_uniform Qpf.liftpPreservation_iff_uniform
+#align qpf.liftp_preservation_iff_uniform QPF.liftpPreservation_iff_uniform
-/
-end Qpf
+end QPF
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2018 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad
-/
-import Mathbin.Data.Pfunctor.Univariate.M
+import Data.Pfunctor.Univariate.M
#align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"8eb9c42d4d34c77f6ee84ea766ae4070233a973c"
mathlib commit https://github.com/leanprover-community/mathlib/commit/63721b2c3eba6c325ecf8ae8cca27155a4f6306f
@@ -123,7 +123,7 @@ theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
by
constructor
· rintro ⟨y, hy⟩; cases' h : repr y with a f
- use ⟨a, fun i => (f i).val⟩; dsimp; constructor
+ use⟨a, fun i => (f i).val⟩; dsimp; constructor
· rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
intro i; apply (f i).property
rintro ⟨⟨a, f⟩, h₀, h₁⟩; dsimp at *
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2018 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad
-
-! This file was ported from Lean 3 source module data.qpf.univariate.basic
-! leanprover-community/mathlib commit 8eb9c42d4d34c77f6ee84ea766ae4070233a973c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Pfunctor.Univariate.M
+#align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"8eb9c42d4d34c77f6ee84ea766ae4070233a973c"
+
/-!
# Quotients of Polynomial Functors
mathlib commit https://github.com/leanprover-community/mathlib/commit/8efcf8022aac8e01df8d302dcebdbc25d6a886c8
@@ -92,7 +92,7 @@ theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α)
theorem lawfulFunctor
(h : ∀ α β : Type u, @Functor.mapConst F _ α _ = Functor.map ∘ Function.const β) :
LawfulFunctor F :=
- { mapConst_eq := h
+ { map_const := h
id_map := @id_map F _ _
comp_map := @comp_map F _ _ }
#align qpf.is_lawful_functor Qpf.lawfulFunctor
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -67,8 +67,6 @@ namespace Qpf
variable {F : Type u → Type u} [Functor F] [q : Qpf F]
-include q
-
open Functor (Liftp Liftr)
#print Qpf.id_map /-
@@ -402,8 +400,6 @@ namespace Qpf
variable {F : Type u → Type u} [Functor F] [q : Qpf F]
-include q
-
open Functor (Liftp Liftr)
#print Qpf.corecF /-
@@ -536,6 +532,7 @@ theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
#align qpf.cofix.bisim Qpf.Cofix.bisim
-/
+#print Qpf.Cofix.bisim' /-
theorem Cofix.bisim' {α : Type _} (Q : α → Prop) (u v : α → Cofix F)
(h :
∀ x,
@@ -553,6 +550,7 @@ theorem Cofix.bisim' {α : Type _} (Q : α → Prop) (u v : α → Cofix F)
refine' ⟨a, f, f', xeq.symm ▸ ux'eq, yeq.symm ▸ vx'eq, h'⟩)
_ _ ⟨x, Qx, rfl, rfl⟩
#align qpf.cofix.bisim' Qpf.Cofix.bisim'
+-/
end Qpf
@@ -565,8 +563,6 @@ variable {F₂ : Type u → Type u} [Functor F₂] [q₂ : Qpf F₂]
variable {F₁ : Type u → Type u} [Functor F₁] [q₁ : Qpf F₁]
-include q₂ q₁
-
#print Qpf.comp /-
/-- composition of qpfs gives another qpf -/
def comp : Qpf (Functor.Comp F₂ F₁)
@@ -659,8 +655,6 @@ namespace Qpf
variable {F : Type u → Type u} [Functor F] [q : Qpf F]
-include q
-
open Functor (Liftp Liftr supp)
open Set
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -682,8 +682,8 @@ theorem mem_supp {α : Type u} (x : F α) (u : α) :
-/
#print Qpf.supp_eq /-
-theorem supp_eq {α : Type u} (x : F α) : supp x = { u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ } :=
- by ext <;> apply mem_supp
+theorem supp_eq {α : Type u} (x : F α) : supp x = {u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ} := by
+ ext <;> apply mem_supp
#align qpf.supp_eq Qpf.supp_eq
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -695,7 +695,7 @@ theorem has_good_supp_iff {α : Type u} (x : F α) :
constructor
· intro h
have : liftp (supp x) x := by rw [h] <;> intro u <;> exact id
- rw [liftp_iff] at this; rcases this with ⟨a, f, xeq, h'⟩
+ rw [liftp_iff] at this ; rcases this with ⟨a, f, xeq, h'⟩
refine' ⟨a, f, xeq.symm, _⟩
intro a' f' h''
rintro u ⟨i, _, hfi⟩
@@ -790,13 +790,13 @@ theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpP
by
constructor <;> intro h
· rintro α p ⟨a, f⟩
- have h' := h; rw [supp_preservation_iff_uniform] at h'
- dsimp only [supp_preservation, supp] at h
+ have h' := h; rw [supp_preservation_iff_uniform] at h'
+ dsimp only [supp_preservation, supp] at h
rwa [liftp_iff_of_is_uniform, supp_eq_of_is_uniform, PFunctor.liftp_iff'] <;> try assumption
· simp only [image_univ, mem_range, exists_imp]
constructor <;> intros <;> subst_vars <;> solve_by_elim
· rintro α ⟨a, f⟩
- simp only [liftp_preservation] at h
+ simp only [liftp_preservation] at h
simp only [supp, h]
#align qpf.supp_preservation_iff_liftp_preservation Qpf.suppPreservation_iff_liftpPreservation
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -536,9 +536,6 @@ theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
#align qpf.cofix.bisim Qpf.Cofix.bisim
-/
-/- warning: qpf.cofix.bisim' -> Qpf.Cofix.bisim' is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align qpf.cofix.bisim' Qpf.Cofix.bisim'ₓ'. -/
theorem Cofix.bisim' {α : Type _} (Q : α → Prop) (u v : α → Cofix F)
(h :
∀ x,
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -78,22 +78,15 @@ Show that every qpf is a lawful functor.
Note: every functor has a field, `map_const`, and is_lawful_functor has the defining
characterization. We can only propagate the assumption.
-/
-theorem id_map {α : Type _} (x : F α) : id <$> x = x :=
- by
- rw [← abs_repr x]
- cases' repr x with a f
- rw [← abs_map]
- rfl
+theorem id_map {α : Type _} (x : F α) : id <$> x = x := by rw [← abs_repr x];
+ cases' repr x with a f; rw [← abs_map]; rfl
#align qpf.id_map Qpf.id_map
-/
#print Qpf.comp_map /-
theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α) :
- (g ∘ f) <$> x = g <$> f <$> x := by
- rw [← abs_repr x]
- cases' repr x with a f
- rw [← abs_map, ← abs_map, ← abs_map]
- rfl
+ (g ∘ f) <$> x = g <$> f <$> x := by rw [← abs_repr x]; cases' repr x with a f;
+ rw [← abs_map, ← abs_map, ← abs_map]; rfl
#align qpf.comp_map Qpf.comp_map
-/
@@ -119,14 +112,10 @@ theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
Liftp p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i, p (f i) :=
by
constructor
- · rintro ⟨y, hy⟩
- cases' h : repr y with a f
- use a, fun i => (f i).val
- constructor
- · rw [← hy, ← abs_repr y, h, ← abs_map]
- rfl
- intro i
- apply (f i).property
+ · rintro ⟨y, hy⟩; cases' h : repr y with a f
+ use a, fun i => (f i).val; constructor
+ · rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
+ intro i; apply (f i).property
rintro ⟨a, f, h₀, h₁⟩; dsimp at *
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, h₀]; rfl
@@ -138,15 +127,10 @@ theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
Liftp p x ↔ ∃ u : q.p.Obj α, abs u = x ∧ ∀ i, p (u.snd i) :=
by
constructor
- · rintro ⟨y, hy⟩
- cases' h : repr y with a f
- use ⟨a, fun i => (f i).val⟩
- dsimp
- constructor
- · rw [← hy, ← abs_repr y, h, ← abs_map]
- rfl
- intro i
- apply (f i).property
+ · rintro ⟨y, hy⟩; cases' h : repr y with a f
+ use ⟨a, fun i => (f i).val⟩; dsimp; constructor
+ · rw [← hy, ← abs_repr y, h, ← abs_map]; rfl
+ intro i; apply (f i).property
rintro ⟨⟨a, f⟩, h₀, h₁⟩; dsimp at *
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, ← h₀]; rfl
@@ -158,22 +142,15 @@ theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
Liftr r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i, r (f₀ i) (f₁ i) :=
by
constructor
- · rintro ⟨u, xeq, yeq⟩
- cases' h : repr u with a f
+ · rintro ⟨u, xeq, yeq⟩; cases' h : repr u with a f
use a, fun i => (f i).val.fst, fun i => (f i).val.snd
- constructor
- · rw [← xeq, ← abs_repr u, h, ← abs_map]
- rfl
- constructor
- · rw [← yeq, ← abs_repr u, h, ← abs_map]
- rfl
- intro i
- exact (f i).property
+ constructor; · rw [← xeq, ← abs_repr u, h, ← abs_map]; rfl
+ constructor; · rw [← yeq, ← abs_repr u, h, ← abs_map]; rfl
+ intro i; exact (f i).property
rintro ⟨a, f₀, f₁, xeq, yeq, h⟩
use abs ⟨a, fun i => ⟨(f₀ i, f₁ i), h i⟩⟩
dsimp; constructor
- · rw [xeq, ← abs_map]
- rfl
+ · rw [xeq, ← abs_map]; rfl
rw [yeq, ← abs_map]; rfl
#align qpf.liftr_iff Qpf.liftr_iff
-/
@@ -229,12 +206,8 @@ theorem recF_eq_of_Wequiv {α : Type u} (u : F α → α) (x y : q.p.W) :
-/
#print Qpf.Wequiv.abs' /-
-theorem Wequiv.abs' (x y : q.p.W) (h : abs x.dest = abs y.dest) : Wequiv x y :=
- by
- cases x
- cases y
- apply Wequiv.abs
- apply h
+theorem Wequiv.abs' (x y : q.p.W) (h : abs x.dest = abs y.dest) : Wequiv x y := by cases x; cases y;
+ apply Wequiv.abs; apply h
#align qpf.Wequiv.abs' Qpf.Wequiv.abs'
-/
@@ -327,12 +300,8 @@ theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
Fix.rec g (Fix.mk x) = g (Fix.rec g <$> x) :=
by
have : recF g ∘ fixToW = Fix.rec g := by
- apply funext
- apply Quotient.ind
- intro x
- apply recF_eq_of_Wequiv
- rw [fix_to_W]
- apply Wrepr_equiv
+ apply funext; apply Quotient.ind; intro x; apply recF_eq_of_Wequiv
+ rw [fix_to_W]; apply Wrepr_equiv
conv =>
lhs
rw [fix.rec, fix.mk]
@@ -486,13 +455,9 @@ def Cofix.corec {α : Type _} (g : α → F α) (x : α) : Cofix F :=
def Cofix.dest : Cofix F → F (Cofix F) :=
Quot.lift (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x))
(by
- rintro x y ⟨r, pr, rxy⟩
- dsimp
- have : ∀ x y, r x y → Mcongr x y := by
- intro x y h
- exact ⟨r, pr, h⟩
- rw [← Quot.factor_mk_eq _ _ this]
- dsimp
+ rintro x y ⟨r, pr, rxy⟩; dsimp
+ have : ∀ x y, r x y → Mcongr x y := by intro x y h; exact ⟨r, pr, h⟩
+ rw [← Quot.factor_mk_eq _ _ this]; dsimp
conv =>
lhs
rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map])
@@ -514,12 +479,8 @@ theorem Cofix.dest_corec {α : Type u} (g : α → F α) (x : α) :
private theorem cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x, r x x)
(h : ∀ x y, r x y → Quot.mk r <$> Cofix.dest x = Quot.mk r <$> Cofix.dest y) :
∀ x y, r x y → x = y := by
- intro x
- apply Quot.inductionOn x
- clear x
- intro x y
- apply Quot.inductionOn y
- clear y
+ intro x; apply Quot.inductionOn x; clear x
+ intro x y; apply Quot.inductionOn y; clear y
intro y rxy
apply Quot.sound
let r' x y := r (Quot.mk _ x) (Quot.mk _ y)
@@ -529,13 +490,8 @@ private theorem cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x,
Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) =
Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) :=
h _ _ r'ab
- have h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v :=
- by
- intro u v cuv
- apply Quot.sound
- dsimp [r']
- rw [Quot.sound cuv]
- apply h'
+ have h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v := by intro u v cuv;
+ apply Quot.sound; dsimp [r']; rw [Quot.sound cuv]; apply h'
let f : Quot r → Quot r' :=
Quot.lift (Quot.lift (Quot.mk r') h₁)
(by
@@ -555,15 +511,11 @@ theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
let r' (x y) := x = y ∨ r x y
intro x y rxy
apply cofix.bisim_aux r'
- · intro x
- left
- rfl
+ · intro x; left; rfl
· intro x y r'xy
- cases r'xy
- · rw [r'xy]
+ cases r'xy; · rw [r'xy]
have : ∀ x y, r x y → r' x y := fun x y h => Or.inr h
- rw [← Quot.factor_mk_eq _ _ this]
- dsimp
+ rw [← Quot.factor_mk_eq _ _ this]; dsimp
rw [@comp_map _ _ q _ _ _ (Quot.mk r), @comp_map _ _ q _ _ _ (Quot.mk r)]
rw [h _ _ r'xy]
right; exact rxy
@@ -722,9 +674,7 @@ theorem mem_supp {α : Type u} (x : F α) (u : α) :
by
rw [supp]; dsimp; constructor
· intro h a f haf
- have : liftp (fun u => u ∈ f '' univ) x :=
- by
- rw [liftp_iff]
+ have : liftp (fun u => u ∈ f '' univ) x := by rw [liftp_iff];
refine' ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩
exact h this
intro h p; rw [liftp_iff]
@@ -748,8 +698,7 @@ theorem has_good_supp_iff {α : Type u} (x : F α) :
constructor
· intro h
have : liftp (supp x) x := by rw [h] <;> intro u <;> exact id
- rw [liftp_iff] at this
- rcases this with ⟨a, f, xeq, h'⟩
+ rw [liftp_iff] at this; rcases this with ⟨a, f, xeq, h'⟩
refine' ⟨a, f, xeq.symm, _⟩
intro a' f' h''
rintro u ⟨i, _, hfi⟩
@@ -758,8 +707,7 @@ theorem has_good_supp_iff {α : Type u} (x : F α) :
rintro ⟨a, f, xeq, h⟩ p; rw [liftp_iff]; constructor
· rintro ⟨a', f', xeq', h'⟩ u usuppx
rcases(mem_supp x u).mp usuppx a' f' xeq'.symm with ⟨i, _, f'ieq⟩
- rw [← f'ieq]
- apply h'
+ rw [← f'ieq]; apply h'
intro h'
refine' ⟨a, f, xeq.symm, _⟩; intro i
apply h'; rw [mem_supp]
@@ -800,8 +748,7 @@ variable (q)
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : Type u} (a : q.p.A) (f : q.p.B a → α) :
supp (abs ⟨a, f⟩) = f '' univ := by
ext u; rw [mem_supp]; constructor
- · intro h'
- apply h' _ _ rfl
+ · intro h'; apply h' _ _ rfl
intro h' a' f' e
rw [← h _ _ _ _ e.symm]; apply h'
#align qpf.supp_eq_of_is_uniform Qpf.supp_eq_of_isUniform
@@ -815,9 +762,7 @@ theorem liftp_iff_of_isUniform (h : q.IsUniform) {α : Type u} (x : F α) (p :
cases' repr x with a f; constructor
· rintro ⟨a', f', abseq, hf⟩ u
rw [supp_eq_of_is_uniform h, h _ _ _ _ abseq]
- rintro ⟨i, _, hi⟩
- rw [← hi]
- apply hf
+ rintro ⟨i, _, hi⟩; rw [← hi]; apply hf
intro h'
refine' ⟨a, f, rfl, fun i => h' _ _⟩
rw [supp_eq_of_is_uniform h]
@@ -839,8 +784,7 @@ theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform :=
constructor
· intro h α a a' f f' h'
rw [← PFunctor.supp_eq, ← PFunctor.supp_eq, ← h, h', h]
- · rintro h α ⟨a, f⟩
- rwa [supp_eq_of_is_uniform, PFunctor.supp_eq]
+ · rintro h α ⟨a, f⟩; rwa [supp_eq_of_is_uniform, PFunctor.supp_eq]
#align qpf.supp_preservation_iff_uniform Qpf.suppPreservation_iff_uniform
-/
@@ -849,8 +793,7 @@ theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpP
by
constructor <;> intro h
· rintro α p ⟨a, f⟩
- have h' := h
- rw [supp_preservation_iff_uniform] at h'
+ have h' := h; rw [supp_preservation_iff_uniform] at h'
dsimp only [supp_preservation, supp] at h
rwa [liftp_iff_of_is_uniform, supp_eq_of_is_uniform, PFunctor.liftp_iff'] <;> try assumption
· simp only [image_univ, mem_range, exists_imp]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -547,7 +547,6 @@ private theorem cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x,
abs_map, h₀]
rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
refine' ⟨r', this, rxy⟩
-#align qpf.cofix.bisim_aux qpf.cofix.bisim_aux
#print Qpf.Cofix.bisim_rel /-
theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
@@ -586,10 +585,7 @@ theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
-/
/- warning: qpf.cofix.bisim' -> Qpf.Cofix.bisim' is a dubious translation:
-lean 3 declaration is
- forall {F : Type.{u1} -> Type.{u1}} [_inst_1 : Functor.{u1, u1} F] [q : Qpf.{u1} F _inst_1] {α : Type.{u2}} (Q : α -> Prop) (u : α -> (Qpf.Cofix.{u1} F _inst_1 q)) (v : α -> (Qpf.Cofix.{u1} F _inst_1 q)), (forall (x : α), (Q x) -> (Exists.{succ u1} (PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) (fun (a : PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) => Exists.{succ u1} ((PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a) -> (Qpf.Cofix.{u1} F _inst_1 q)) (fun (f : (PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a) -> (Qpf.Cofix.{u1} F _inst_1 q)) => Exists.{succ u1} ((PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a) -> (Qpf.Cofix.{u1} F _inst_1 q)) (fun (f' : (PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a) -> (Qpf.Cofix.{u1} F _inst_1 q)) => And (Eq.{succ u1} (F (Qpf.Cofix.{u1} F _inst_1 q)) (Qpf.Cofix.dest.{u1} F _inst_1 q (u x)) (Qpf.abs.{u1} F _inst_1 q (Qpf.Cofix.{u1} F _inst_1 q) (Sigma.mk.{u1, u1} (PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) (fun (x : PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) => (PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) x) -> (Qpf.Cofix.{u1} F _inst_1 q)) a f))) (And (Eq.{succ u1} (F (Qpf.Cofix.{u1} F _inst_1 q)) (Qpf.Cofix.dest.{u1} F _inst_1 q (v x)) (Qpf.abs.{u1} F _inst_1 q (Qpf.Cofix.{u1} F _inst_1 q) (Sigma.mk.{u1, u1} (PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) (fun (x : PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) => (PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) x) -> (Qpf.Cofix.{u1} F _inst_1 q)) a f'))) (forall (i : PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a), Exists.{succ u2} α (fun (x' : α) => And (Q x') (And (Eq.{succ u1} (Qpf.Cofix.{u1} F _inst_1 q) (f i) (u x')) (Eq.{succ u1} (Qpf.Cofix.{u1} F _inst_1 q) (f' i) (v x'))))))))))) -> (forall (x : α), (Q x) -> (Eq.{succ u1} (Qpf.Cofix.{u1} F _inst_1 q) (u x) (v x)))
-but is expected to have type
- forall {F : Type.{u2} -> Type.{u2}} [_inst_1 : Functor.{u2, u2} F] [q : Qpf.{u2} F _inst_1] {α : Type.{u1}} (Q : α -> Prop) (u : α -> (Qpf.Cofix.{u2} F _inst_1 q)) (v : α -> (Qpf.Cofix.{u2} F _inst_1 q)), (forall (x : α), (Q x) -> (Exists.{succ u2} (PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) (fun (a : PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) => Exists.{succ u2} ((PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a) -> (Qpf.Cofix.{u2} F _inst_1 q)) (fun (f : (PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a) -> (Qpf.Cofix.{u2} F _inst_1 q)) => Exists.{succ u2} ((PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a) -> (Qpf.Cofix.{u2} F _inst_1 q)) (fun (f' : (PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a) -> (Qpf.Cofix.{u2} F _inst_1 q)) => And (Eq.{succ u2} (F (Qpf.Cofix.{u2} F _inst_1 q)) (Qpf.Cofix.dest.{u2} F _inst_1 q (u x)) (Qpf.abs.{u2} F _inst_1 q (Qpf.Cofix.{u2} F _inst_1 q) (Sigma.mk.{u2, u2} (PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) (fun (x : PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) => (PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) x) -> (Qpf.Cofix.{u2} F _inst_1 q)) a f))) (And (Eq.{succ u2} (F (Qpf.Cofix.{u2} F _inst_1 q)) (Qpf.Cofix.dest.{u2} F _inst_1 q (v x)) (Qpf.abs.{u2} F _inst_1 q (Qpf.Cofix.{u2} F _inst_1 q) (Sigma.mk.{u2, u2} (PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) (fun (x : PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) => (PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) x) -> (Qpf.Cofix.{u2} F _inst_1 q)) a f'))) (forall (i : PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a), Exists.{succ u1} α (fun (x' : α) => And (Q x') (And (Eq.{succ u2} (Qpf.Cofix.{u2} F _inst_1 q) (f i) (u x')) (Eq.{succ u2} (Qpf.Cofix.{u2} F _inst_1 q) (f' i) (v x'))))))))))) -> (forall (x : α), (Q x) -> (Eq.{succ u2} (Qpf.Cofix.{u2} F _inst_1 q) (u x) (v x)))
+<too large>
Case conversion may be inaccurate. Consider using '#align qpf.cofix.bisim' Qpf.Cofix.bisim'ₓ'. -/
theorem Cofix.bisim' {α : Type _} (Q : α → Prop) (u v : α → Cofix F)
(h :
mathlib commit https://github.com/leanprover-community/mathlib/commit/730c6d4cab72b9d84fcfb9e95e8796e9cd8f40ba
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad
! This file was ported from Lean 3 source module data.qpf.univariate.basic
-! leanprover-community/mathlib commit 14b69e9f3c16630440a2cbd46f1ddad0d561dee7
+! leanprover-community/mathlib commit 8eb9c42d4d34c77f6ee84ea766ae4070233a973c
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.Data.Pfunctor.Univariate.M
# Quotients of Polynomial Functors
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We assume the following:
`P` : a polynomial functor
mathlib commit https://github.com/leanprover-community/mathlib/commit/49b7f94aab3a3bdca1f9f34c5d818afb253b3993
@@ -44,6 +44,7 @@ The present theory focuses on the univariate case for qpfs
universe u
+#print Qpf /-
/-- Quotients of polynomial functors.
Roughly speaking, saying that `F` is a quotient of a polynomial functor means that for each `α`,
@@ -57,6 +58,7 @@ class Qpf (F : Type u → Type u) [Functor F] where
abs_repr : ∀ {α} (x : F α), abs (repr x) = x
abs_map : ∀ {α β} (f : α → β) (p : P.Obj α), abs (f <$> p) = f <$> abs p
#align qpf Qpf
+-/
namespace Qpf
@@ -66,6 +68,7 @@ include q
open Functor (Liftp Liftr)
+#print Qpf.id_map /-
/-
Show that every qpf is a lawful functor.
@@ -79,7 +82,9 @@ theorem id_map {α : Type _} (x : F α) : id <$> x = x :=
rw [← abs_map]
rfl
#align qpf.id_map Qpf.id_map
+-/
+#print Qpf.comp_map /-
theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α) :
(g ∘ f) <$> x = g <$> f <$> x := by
rw [← abs_repr x]
@@ -87,7 +92,9 @@ theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α)
rw [← abs_map, ← abs_map, ← abs_map]
rfl
#align qpf.comp_map Qpf.comp_map
+-/
+#print Qpf.lawfulFunctor /-
theorem lawfulFunctor
(h : ∀ α β : Type u, @Functor.mapConst F _ α _ = Functor.map ∘ Function.const β) :
LawfulFunctor F :=
@@ -95,6 +102,7 @@ theorem lawfulFunctor
id_map := @id_map F _ _
comp_map := @comp_map F _ _ }
#align qpf.is_lawful_functor Qpf.lawfulFunctor
+-/
/-
Lifting predicates and relations
@@ -103,6 +111,7 @@ section
open Functor
+#print Qpf.liftp_iff /-
theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
Liftp p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i, p (f i) :=
by
@@ -119,7 +128,9 @@ theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, h₀]; rfl
#align qpf.liftp_iff Qpf.liftp_iff
+-/
+#print Qpf.liftp_iff' /-
theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
Liftp p x ↔ ∃ u : q.p.Obj α, abs u = x ∧ ∀ i, p (u.snd i) :=
by
@@ -137,7 +148,9 @@ theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, ← h₀]; rfl
#align qpf.liftp_iff' Qpf.liftp_iff'
+-/
+#print Qpf.liftr_iff /-
theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
Liftr r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i, r (f₀ i) (f₁ i) :=
by
@@ -160,9 +173,11 @@ theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
rfl
rw [yeq, ← abs_map]; rfl
#align qpf.liftr_iff Qpf.liftr_iff
+-/
end
+#print Qpf.recF /-
/-
Think of trees in the `W` type corresponding to `P` as representatives of elements of the
least fixed point of `F`, and assign a canonical representative to each equivalence class
@@ -172,16 +187,22 @@ of trees.
def recF {α : Type _} (g : F α → α) : q.p.W → α
| ⟨a, f⟩ => g (abs ⟨a, fun x => recF (f x)⟩)
#align qpf.recF Qpf.recF
+-/
+#print Qpf.recF_eq /-
theorem recF_eq {α : Type _} (g : F α → α) (x : q.p.W) : recF g x = g (abs (recF g <$> x.dest)) :=
by cases x <;> rfl
#align qpf.recF_eq Qpf.recF_eq
+-/
+#print Qpf.recF_eq' /-
theorem recF_eq' {α : Type _} (g : F α → α) (a : q.p.A) (f : q.p.B a → q.p.W) :
recF g ⟨a, f⟩ = g (abs (recF g <$> ⟨a, f⟩)) :=
rfl
#align qpf.recF_eq' Qpf.recF_eq'
+-/
+#print Qpf.Wequiv /-
/-- two trees are equivalent if their F-abstractions are -/
inductive Wequiv : q.p.W → q.p.W → Prop
| ind (a : q.p.A) (f f' : q.p.B a → q.p.W) : (∀ x, Wequiv (f x) (f' x)) → Wequiv ⟨a, f⟩ ⟨a, f'⟩
@@ -190,17 +211,21 @@ inductive Wequiv : q.p.W → q.p.W → Prop
abs ⟨a, f⟩ = abs ⟨a', f'⟩ → Wequiv ⟨a, f⟩ ⟨a', f'⟩
| trans (u v w : q.p.W) : Wequiv u v → Wequiv v w → Wequiv u w
#align qpf.Wequiv Qpf.Wequiv
+-/
+#print Qpf.recF_eq_of_Wequiv /-
/-- recF is insensitive to the representation -/
-theorem recF_eq_of_wequiv {α : Type u} (u : F α → α) (x y : q.p.W) :
+theorem recF_eq_of_Wequiv {α : Type u} (u : F α → α) (x y : q.p.W) :
Wequiv x y → recF u x = recF u y := by
cases' x with a f; cases' y with b g
intro h; induction h
case ind a f f' h ih => simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]
case abs a f a' f' h => simp only [recF_eq', abs_map, h]
case trans x y z e₁ e₂ ih₁ ih₂ => exact Eq.trans ih₁ ih₂
-#align qpf.recF_eq_of_Wequiv Qpf.recF_eq_of_wequiv
+#align qpf.recF_eq_of_Wequiv Qpf.recF_eq_of_Wequiv
+-/
+#print Qpf.Wequiv.abs' /-
theorem Wequiv.abs' (x y : q.p.W) (h : abs x.dest = abs y.dest) : Wequiv x y :=
by
cases x
@@ -208,11 +233,15 @@ theorem Wequiv.abs' (x y : q.p.W) (h : abs x.dest = abs y.dest) : Wequiv x y :=
apply Wequiv.abs
apply h
#align qpf.Wequiv.abs' Qpf.Wequiv.abs'
+-/
+#print Qpf.Wequiv.refl /-
theorem Wequiv.refl (x : q.p.W) : Wequiv x x := by
cases' x with a f <;> exact Wequiv.abs a f a f rfl
#align qpf.Wequiv.refl Qpf.Wequiv.refl
+-/
+#print Qpf.Wequiv.symm /-
theorem Wequiv.symm (x y : q.p.W) : Wequiv x y → Wequiv y x :=
by
cases' x with a f; cases' y with b g
@@ -221,13 +250,17 @@ theorem Wequiv.symm (x y : q.p.W) : Wequiv x y → Wequiv y x :=
case abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm
case trans x y z e₁ e₂ ih₁ ih₂ => exact Qpf.Wequiv.trans _ _ _ ih₂ ih₁
#align qpf.Wequiv.symm Qpf.Wequiv.symm
+-/
+#print Qpf.Wrepr /-
/-- maps every element of the W type to a canonical representative -/
-def wrepr : q.p.W → q.p.W :=
+def Wrepr : q.p.W → q.p.W :=
recF (PFunctor.W.mk ∘ repr)
-#align qpf.Wrepr Qpf.wrepr
+#align qpf.Wrepr Qpf.Wrepr
+-/
-theorem wrepr_equiv (x : q.p.W) : Wequiv (wrepr x) x :=
+#print Qpf.Wrepr_equiv /-
+theorem Wrepr_equiv (x : q.p.W) : Wequiv (Wrepr x) x :=
by
induction' x with a f ih
apply Wequiv.trans
@@ -237,42 +270,56 @@ theorem wrepr_equiv (x : q.p.W) : Wequiv (wrepr x) x :=
rw [this, PFunctor.W.dest_mk, abs_repr]
rfl
apply Wequiv.ind; exact ih
-#align qpf.Wrepr_equiv Qpf.wrepr_equiv
+#align qpf.Wrepr_equiv Qpf.Wrepr_equiv
+-/
+#print Qpf.Wsetoid /-
/-- Define the fixed point as the quotient of trees under the equivalence relation `Wequiv`.
-/
-def wSetoid : Setoid q.p.W :=
+def Wsetoid : Setoid q.p.W :=
⟨Wequiv, @Wequiv.refl _ _ _, @Wequiv.symm _ _ _, @Wequiv.trans _ _ _⟩
-#align qpf.W_setoid Qpf.wSetoid
+#align qpf.W_setoid Qpf.Wsetoid
+-/
attribute [local instance] W_setoid
+#print Qpf.Fix /-
/-- inductive type defined as initial algebra of a Quotient of Polynomial Functor -/
@[nolint has_nonempty_instance]
def Fix (F : Type u → Type u) [Functor F] [q : Qpf F] :=
- Quotient (wSetoid : Setoid q.p.W)
+ Quotient (Wsetoid : Setoid q.p.W)
#align qpf.fix Qpf.Fix
+-/
+#print Qpf.Fix.rec /-
/-- recursor of a type defined by a qpf -/
def Fix.rec {α : Type _} (g : F α → α) : Fix F → α :=
- Quot.lift (recF g) (recF_eq_of_wequiv g)
+ Quot.lift (recF g) (recF_eq_of_Wequiv g)
#align qpf.fix.rec Qpf.Fix.rec
+-/
+#print Qpf.fixToW /-
/-- access the underlying W-type of a fixpoint data type -/
def fixToW : Fix F → q.p.W :=
- Quotient.lift wrepr (recF_eq_of_wequiv fun x => @PFunctor.W.mk q.p (repr x))
+ Quotient.lift Wrepr (recF_eq_of_Wequiv fun x => @PFunctor.W.mk q.p (repr x))
#align qpf.fix_to_W Qpf.fixToW
+-/
+#print Qpf.Fix.mk /-
/-- constructor of a type defined by a qpf -/
def Fix.mk (x : F (Fix F)) : Fix F :=
Quot.mk _ (PFunctor.W.mk (fixToW <$> repr x))
#align qpf.fix.mk Qpf.Fix.mk
+-/
+#print Qpf.Fix.dest /-
/-- destructor of a type defined by a qpf -/
def Fix.dest : Fix F → F (Fix F) :=
Fix.rec (Functor.map Fix.mk)
#align qpf.fix.dest Qpf.Fix.dest
+-/
+#print Qpf.Fix.rec_eq /-
theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
Fix.rec g (Fix.mk x) = g (Fix.rec g <$> x) :=
by
@@ -291,11 +338,13 @@ theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
rw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, ← PFunctor.comp_map, abs_map,
← h, abs_repr, this]
#align qpf.fix.rec_eq Qpf.Fix.rec_eq
+-/
+#print Qpf.Fix.ind_aux /-
theorem Fix.ind_aux (a : q.p.A) (f : q.p.B a → q.p.W) :
Fix.mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦⟨a, f⟩⟧ :=
by
- have : Fix.mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦wrepr ⟨a, f⟩⟧ :=
+ have : Fix.mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr ⟨a, f⟩⟧ :=
by
apply Quot.sound; apply Wequiv.abs'
rw [PFunctor.W.dest_mk, abs_map, abs_repr, ← abs_map, PFunctor.map_eq]
@@ -307,7 +356,9 @@ theorem Fix.ind_aux (a : q.p.A) (f : q.p.B a → q.p.W) :
apply Quot.sound
apply Wrepr_equiv
#align qpf.fix.ind_aux Qpf.Fix.ind_aux
+-/
+#print Qpf.Fix.ind_rec /-
theorem Fix.ind_rec {α : Type u} (g₁ g₂ : Fix F → α)
(h : ∀ x : F (Fix F), g₁ <$> x = g₂ <$> x → g₁ (Fix.mk x) = g₂ (Fix.mk x)) : ∀ x, g₁ x = g₂ x :=
by
@@ -320,7 +371,9 @@ theorem Fix.ind_rec {α : Type u} (g₁ g₂ : Fix F → α)
dsimp [Function.comp]
congr with x; apply ih
#align qpf.fix.ind_rec Qpf.Fix.ind_rec
+-/
+#print Qpf.Fix.rec_unique /-
theorem Fix.rec_unique {α : Type u} (g : F α → α) (h : Fix F → α)
(hyp : ∀ x, h (Fix.mk x) = g (h <$> x)) : Fix.rec g = h :=
by
@@ -329,7 +382,9 @@ theorem Fix.rec_unique {α : Type u} (g : F α → α) (h : Fix F → α)
intro x hyp'
rw [hyp, ← hyp', fix.rec_eq]
#align qpf.fix.rec_unique Qpf.Fix.rec_unique
+-/
+#print Qpf.Fix.mk_dest /-
theorem Fix.mk_dest (x : Fix F) : Fix.mk (Fix.dest x) = x :=
by
change (fix.mk ∘ fix.dest) x = id x
@@ -338,7 +393,9 @@ theorem Fix.mk_dest (x : Fix F) : Fix.mk (Fix.dest x) = x :=
rw [fix.dest, fix.rec_eq, id_map, comp_map]
intro h; rw [h]
#align qpf.fix.mk_dest Qpf.Fix.mk_dest
+-/
+#print Qpf.Fix.dest_mk /-
theorem Fix.dest_mk (x : F (Fix F)) : Fix.dest (Fix.mk x) = x :=
by
unfold fix.dest; rw [fix.rec_eq, ← fix.dest, ← comp_map]
@@ -347,7 +404,9 @@ theorem Fix.dest_mk (x : F (Fix F)) : Fix.dest (Fix.mk x) = x :=
rw [← id_map x]
congr with x; apply fix.mk_dest
#align qpf.fix.dest_mk Qpf.Fix.dest_mk
+-/
+#print Qpf.Fix.ind /-
theorem Fix.ind (p : Fix F → Prop) (h : ∀ x : F (Fix F), Liftp p x → p (Fix.mk x)) : ∀ x, p x :=
by
apply Quot.ind
@@ -360,6 +419,7 @@ theorem Fix.ind (p : Fix F → Prop) (h : ∀ x : F (Fix F), Liftp p x → p (Fi
refine' ⟨_, _, rfl, _⟩
apply ih
#align qpf.fix.ind Qpf.Fix.ind
+-/
end Qpf
@@ -374,38 +434,51 @@ include q
open Functor (Liftp Liftr)
+#print Qpf.corecF /-
/-- does recursion on `q.P.M` using `g : α → F α` rather than `g : α → P α` -/
def corecF {α : Type _} (g : α → F α) : α → q.p.M :=
PFunctor.M.corec fun x => repr (g x)
#align qpf.corecF Qpf.corecF
+-/
+#print Qpf.corecF_eq /-
theorem corecF_eq {α : Type _} (g : α → F α) (x : α) :
PFunctor.M.dest (corecF g x) = corecF g <$> repr (g x) := by rw [corecF, PFunctor.M.dest_corec]
#align qpf.corecF_eq Qpf.corecF_eq
+-/
+#print Qpf.IsPrecongr /-
-- Equivalence
/-- A pre-congruence on q.P.M *viewed as an F-coalgebra*. Not necessarily symmetric. -/
def IsPrecongr (r : q.p.M → q.p.M → Prop) : Prop :=
∀ ⦃x y⦄, r x y → abs (Quot.mk r <$> PFunctor.M.dest x) = abs (Quot.mk r <$> PFunctor.M.dest y)
#align qpf.is_precongr Qpf.IsPrecongr
+-/
+#print Qpf.Mcongr /-
/-- The maximal congruence on q.P.M -/
def Mcongr : q.p.M → q.p.M → Prop := fun x y => ∃ r, IsPrecongr r ∧ r x y
#align qpf.Mcongr Qpf.Mcongr
+-/
+#print Qpf.Cofix /-
/-- coinductive type defined as the final coalgebra of a qpf -/
def Cofix (F : Type u → Type u) [Functor F] [q : Qpf F] :=
Quot (@Mcongr F _ q)
#align qpf.cofix Qpf.Cofix
+-/
instance [Inhabited q.p.A] : Inhabited (Cofix F) :=
⟨Quot.mk _ default⟩
+#print Qpf.Cofix.corec /-
/-- corecursor for type defined by `cofix` -/
def Cofix.corec {α : Type _} (g : α → F α) (x : α) : Cofix F :=
Quot.mk _ (corecF g x)
#align qpf.cofix.corec Qpf.Cofix.corec
+-/
+#print Qpf.Cofix.dest /-
/-- destructor for type defined by `cofix` -/
def Cofix.dest : Cofix F → F (Cofix F) :=
Quot.lift (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x))
@@ -421,7 +494,9 @@ def Cofix.dest : Cofix F → F (Cofix F) :=
lhs
rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map])
#align qpf.cofix.dest Qpf.Cofix.dest
+-/
+#print Qpf.Cofix.dest_corec /-
theorem Cofix.dest_corec {α : Type u} (g : α → F α) (x : α) :
Cofix.dest (Cofix.corec g x) = Cofix.corec g <$> g x :=
by
@@ -431,6 +506,7 @@ theorem Cofix.dest_corec {α : Type u} (g : α → F α) (x : α) :
dsimp
rw [corecF_eq, abs_map, abs_repr, ← comp_map]; rfl
#align qpf.cofix.dest_corec Qpf.Cofix.dest_corec
+-/
private theorem cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x, r x x)
(h : ∀ x y, r x y → Quot.mk r <$> Cofix.dest x = Quot.mk r <$> Cofix.dest y) :
@@ -470,6 +546,7 @@ private theorem cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x,
refine' ⟨r', this, rxy⟩
#align qpf.cofix.bisim_aux qpf.cofix.bisim_aux
+#print Qpf.Cofix.bisim_rel /-
theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
(h : ∀ x y, r x y → Quot.mk r <$> Cofix.dest x = Quot.mk r <$> Cofix.dest y) :
∀ x y, r x y → x = y := by
@@ -489,7 +566,9 @@ theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
rw [h _ _ r'xy]
right; exact rxy
#align qpf.cofix.bisim_rel Qpf.Cofix.bisim_rel
+-/
+#print Qpf.Cofix.bisim /-
theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
(h : ∀ x y, r x y → Liftr r (Cofix.dest x) (Cofix.dest y)) : ∀ x y, r x y → x = y :=
by
@@ -501,7 +580,14 @@ theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
apply Quot.sound
apply h'
#align qpf.cofix.bisim Qpf.Cofix.bisim
+-/
+/- warning: qpf.cofix.bisim' -> Qpf.Cofix.bisim' is a dubious translation:
+lean 3 declaration is
+ forall {F : Type.{u1} -> Type.{u1}} [_inst_1 : Functor.{u1, u1} F] [q : Qpf.{u1} F _inst_1] {α : Type.{u2}} (Q : α -> Prop) (u : α -> (Qpf.Cofix.{u1} F _inst_1 q)) (v : α -> (Qpf.Cofix.{u1} F _inst_1 q)), (forall (x : α), (Q x) -> (Exists.{succ u1} (PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) (fun (a : PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) => Exists.{succ u1} ((PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a) -> (Qpf.Cofix.{u1} F _inst_1 q)) (fun (f : (PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a) -> (Qpf.Cofix.{u1} F _inst_1 q)) => Exists.{succ u1} ((PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a) -> (Qpf.Cofix.{u1} F _inst_1 q)) (fun (f' : (PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a) -> (Qpf.Cofix.{u1} F _inst_1 q)) => And (Eq.{succ u1} (F (Qpf.Cofix.{u1} F _inst_1 q)) (Qpf.Cofix.dest.{u1} F _inst_1 q (u x)) (Qpf.abs.{u1} F _inst_1 q (Qpf.Cofix.{u1} F _inst_1 q) (Sigma.mk.{u1, u1} (PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) (fun (x : PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) => (PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) x) -> (Qpf.Cofix.{u1} F _inst_1 q)) a f))) (And (Eq.{succ u1} (F (Qpf.Cofix.{u1} F _inst_1 q)) (Qpf.Cofix.dest.{u1} F _inst_1 q (v x)) (Qpf.abs.{u1} F _inst_1 q (Qpf.Cofix.{u1} F _inst_1 q) (Sigma.mk.{u1, u1} (PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) (fun (x : PFunctor.A.{u1} (Qpf.p.{u1} F _inst_1 q)) => (PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) x) -> (Qpf.Cofix.{u1} F _inst_1 q)) a f'))) (forall (i : PFunctor.B.{u1} (Qpf.p.{u1} F _inst_1 q) a), Exists.{succ u2} α (fun (x' : α) => And (Q x') (And (Eq.{succ u1} (Qpf.Cofix.{u1} F _inst_1 q) (f i) (u x')) (Eq.{succ u1} (Qpf.Cofix.{u1} F _inst_1 q) (f' i) (v x'))))))))))) -> (forall (x : α), (Q x) -> (Eq.{succ u1} (Qpf.Cofix.{u1} F _inst_1 q) (u x) (v x)))
+but is expected to have type
+ forall {F : Type.{u2} -> Type.{u2}} [_inst_1 : Functor.{u2, u2} F] [q : Qpf.{u2} F _inst_1] {α : Type.{u1}} (Q : α -> Prop) (u : α -> (Qpf.Cofix.{u2} F _inst_1 q)) (v : α -> (Qpf.Cofix.{u2} F _inst_1 q)), (forall (x : α), (Q x) -> (Exists.{succ u2} (PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) (fun (a : PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) => Exists.{succ u2} ((PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a) -> (Qpf.Cofix.{u2} F _inst_1 q)) (fun (f : (PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a) -> (Qpf.Cofix.{u2} F _inst_1 q)) => Exists.{succ u2} ((PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a) -> (Qpf.Cofix.{u2} F _inst_1 q)) (fun (f' : (PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a) -> (Qpf.Cofix.{u2} F _inst_1 q)) => And (Eq.{succ u2} (F (Qpf.Cofix.{u2} F _inst_1 q)) (Qpf.Cofix.dest.{u2} F _inst_1 q (u x)) (Qpf.abs.{u2} F _inst_1 q (Qpf.Cofix.{u2} F _inst_1 q) (Sigma.mk.{u2, u2} (PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) (fun (x : PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) => (PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) x) -> (Qpf.Cofix.{u2} F _inst_1 q)) a f))) (And (Eq.{succ u2} (F (Qpf.Cofix.{u2} F _inst_1 q)) (Qpf.Cofix.dest.{u2} F _inst_1 q (v x)) (Qpf.abs.{u2} F _inst_1 q (Qpf.Cofix.{u2} F _inst_1 q) (Sigma.mk.{u2, u2} (PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) (fun (x : PFunctor.A.{u2} (Qpf.P.{u2} F _inst_1 q)) => (PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) x) -> (Qpf.Cofix.{u2} F _inst_1 q)) a f'))) (forall (i : PFunctor.B.{u2} (Qpf.P.{u2} F _inst_1 q) a), Exists.{succ u1} α (fun (x' : α) => And (Q x') (And (Eq.{succ u2} (Qpf.Cofix.{u2} F _inst_1 q) (f i) (u x')) (Eq.{succ u2} (Qpf.Cofix.{u2} F _inst_1 q) (f' i) (v x'))))))))))) -> (forall (x : α), (Q x) -> (Eq.{succ u2} (Qpf.Cofix.{u2} F _inst_1 q) (u x) (v x)))
+Case conversion may be inaccurate. Consider using '#align qpf.cofix.bisim' Qpf.Cofix.bisim'ₓ'. -/
theorem Cofix.bisim' {α : Type _} (Q : α → Prop) (u v : α → Cofix F)
(h :
∀ x,
@@ -533,6 +619,7 @@ variable {F₁ : Type u → Type u} [Functor F₁] [q₁ : Qpf F₁]
include q₂ q₁
+#print Qpf.comp /-
/-- composition of qpfs gives another qpf -/
def comp : Qpf (Functor.Comp F₂ F₁)
where
@@ -580,6 +667,7 @@ def comp : Qpf (Functor.Comp F₂ F₁)
rw [← abs_map]
rfl
#align qpf.comp Qpf.comp
+-/
end Qpf
@@ -598,6 +686,7 @@ variable {FG_abs : ∀ {α}, F α → G α}
variable {FG_repr : ∀ {α}, G α → F α}
+#print Qpf.quotientQpf /-
/-- Given a qpf `F` and a well-behaved surjection `FG_abs` from F α to
functor G α, `G` is a qpf. We can consider `G` a quotient on `F` where
elements `x y : F α` are in the same equivalence class if
@@ -611,6 +700,7 @@ def quotientQpf (FG_abs_repr : ∀ {α} (x : G α), FG_abs (FG_repr x) = x)
abs_repr {α} x := by rw [abs_repr, FG_abs_repr]
abs_map {α β} f x := by rw [abs_map, FG_abs_map]
#align qpf.quotient_qpf Qpf.quotientQpf
+-/
end Qpf
@@ -627,6 +717,7 @@ open Functor (Liftp Liftr supp)
open Set
+#print Qpf.mem_supp /-
theorem mem_supp {α : Type u} (x : F α) (u : α) :
u ∈ supp x ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ :=
by
@@ -642,11 +733,15 @@ theorem mem_supp {α : Type u} (x : F α) (u : α) :
rcases h a f xeq.symm with ⟨i, _, hi⟩
rw [← hi]; apply h'
#align qpf.mem_supp Qpf.mem_supp
+-/
+#print Qpf.supp_eq /-
theorem supp_eq {α : Type u} (x : F α) : supp x = { u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ } :=
by ext <;> apply mem_supp
#align qpf.supp_eq Qpf.supp_eq
+-/
+#print Qpf.has_good_supp_iff /-
theorem has_good_supp_iff {α : Type u} (x : F α) :
(∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ :=
@@ -673,28 +768,36 @@ theorem has_good_supp_iff {α : Type u} (x : F α) :
apply h a' f' xeq'
apply mem_image_of_mem _ (mem_univ _)
#align qpf.has_good_supp_iff Qpf.has_good_supp_iff
+-/
variable (q)
+#print Qpf.IsUniform /-
/-- A qpf is said to be uniform if every polynomial functor
representing a single value all have the same range. -/
def IsUniform : Prop :=
∀ ⦃α : Type u⦄ (a a' : q.p.A) (f : q.p.B a → α) (f' : q.p.B a' → α),
abs ⟨a, f⟩ = abs ⟨a', f'⟩ → f '' univ = f' '' univ
#align qpf.is_uniform Qpf.IsUniform
+-/
+#print Qpf.LiftpPreservation /-
/-- does `abs` preserve `liftp`? -/
def LiftpPreservation : Prop :=
∀ ⦃α⦄ (p : α → Prop) (x : q.p.Obj α), Liftp p (abs x) ↔ Liftp p x
#align qpf.liftp_preservation Qpf.LiftpPreservation
+-/
+#print Qpf.SuppPreservation /-
/-- does `abs` preserve `supp`? -/
def SuppPreservation : Prop :=
∀ ⦃α⦄ (x : q.p.Obj α), supp (abs x) = supp x
#align qpf.supp_preservation Qpf.SuppPreservation
+-/
variable (q)
+#print Qpf.supp_eq_of_isUniform /-
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : Type u} (a : q.p.A) (f : q.p.B a → α) :
supp (abs ⟨a, f⟩) = f '' univ := by
ext u; rw [mem_supp]; constructor
@@ -703,7 +806,9 @@ theorem supp_eq_of_isUniform (h : q.IsUniform) {α : Type u} (a : q.p.A) (f : q.
intro h' a' f' e
rw [← h _ _ _ _ e.symm]; apply h'
#align qpf.supp_eq_of_is_uniform Qpf.supp_eq_of_isUniform
+-/
+#print Qpf.liftp_iff_of_isUniform /-
theorem liftp_iff_of_isUniform (h : q.IsUniform) {α : Type u} (x : F α) (p : α → Prop) :
Liftp p x ↔ ∀ u ∈ supp x, p u :=
by
@@ -719,13 +824,17 @@ theorem liftp_iff_of_isUniform (h : q.IsUniform) {α : Type u} (x : F α) (p :
rw [supp_eq_of_is_uniform h]
exact ⟨i, mem_univ i, rfl⟩
#align qpf.liftp_iff_of_is_uniform Qpf.liftp_iff_of_isUniform
+-/
+#print Qpf.supp_map /-
theorem supp_map (h : q.IsUniform) {α β : Type u} (g : α → β) (x : F α) :
supp (g <$> x) = g '' supp x := by
rw [← abs_repr x]; cases' repr x with a f; rw [← abs_map, PFunctor.map_eq]
rw [supp_eq_of_is_uniform h, supp_eq_of_is_uniform h, image_comp]
#align qpf.supp_map Qpf.supp_map
+-/
+#print Qpf.suppPreservation_iff_uniform /-
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform :=
by
constructor
@@ -734,7 +843,9 @@ theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform :=
· rintro h α ⟨a, f⟩
rwa [supp_eq_of_is_uniform, PFunctor.supp_eq]
#align qpf.supp_preservation_iff_uniform Qpf.suppPreservation_iff_uniform
+-/
+#print Qpf.suppPreservation_iff_liftpPreservation /-
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation :=
by
constructor <;> intro h
@@ -749,10 +860,13 @@ theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpP
simp only [liftp_preservation] at h
simp only [supp, h]
#align qpf.supp_preservation_iff_liftp_preservation Qpf.suppPreservation_iff_liftpPreservation
+-/
+#print Qpf.liftpPreservation_iff_uniform /-
theorem liftpPreservation_iff_uniform : q.LiftpPreservation ↔ q.IsUniform := by
rw [← supp_preservation_iff_liftp_preservation, supp_preservation_iff_uniform]
#align qpf.liftp_preservation_iff_uniform Qpf.liftpPreservation_iff_uniform
+-/
end Qpf
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -553,8 +553,8 @@ def comp : QPF (Functor.Comp F₂ F₁) where
cases' a with b h; dsimp
symm
trans
- symm
- apply abs_map
+ · symm
+ apply abs_map
congr
rw [PFunctor.map_eq]
dsimp [Function.comp_def]
@@ -249,7 +249,8 @@ set_option linter.uppercaseLean3 false in
attribute [local instance] Wsetoid
/-- inductive type defined as initial algebra of a Quotient of Polynomial Functor -/
---@[nolint has_nonempty_instance] Porting note: linter does not exist
+-- Porting note(#5171): this linter isn't ported yet.
+-- @[nolint has_nonempty_instance]
def Fix (F : Type u → Type u) [Functor F] [q : QPF F] :=
Quotient (Wsetoid : Setoid q.P.W)
#align qpf.fix QPF.Fix
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)
@@ -518,7 +518,6 @@ Composition of qpfs.
namespace QPF
variable {F₂ : Type u → Type u} [Functor F₂] [q₂ : QPF F₂]
-
variable {F₁ : Type u → Type u} [Functor F₁] [q₁ : QPF F₁]
/-- composition of qpfs gives another qpf -/
@@ -574,11 +573,8 @@ We show that if `F` is a qpf and `G` is a suitable quotient of `F`, then `G` is
namespace QPF
variable {F : Type u → Type u} [Functor F] [q : QPF F]
-
variable {G : Type u → Type u} [Functor G]
-
variable {FG_abs : ∀ {α}, F α → G α}
-
variable {FG_repr : ∀ {α}, G α → F α}
/-- Given a qpf `F` and a well-behaved surjection `FG_abs` from `F α` to
@@ -451,7 +451,7 @@ private theorem Cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x,
have h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v := by
intro u v cuv
apply Quot.sound
- simp only
+ simp only [r']
rw [Quot.sound cuv]
apply h'
let f : Quot r → Quot r' :=
@@ -480,7 +480,7 @@ theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
· rw [r'xy]
have : ∀ x y, r x y → r' x y := fun x y h => Or.inr h
rw [← Quot.factor_mk_eq _ _ this]
- dsimp
+ dsimp [r']
rw [@comp_map _ _ q _ _ _ (Quot.mk r), @comp_map _ _ q _ _ _ (Quot.mk r)]
rw [h _ _ r'xy]
right; exact rxy
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.
@@ -464,7 +464,7 @@ private theorem Cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x,
rw [← this, ← PFunctor.map_map _ _ f, ← PFunctor.map_map _ _ (Quot.mk r), abs_map, abs_map,
abs_map, h₀]
rw [← PFunctor.map_map _ _ f, ← PFunctor.map_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
- refine' ⟨r', this, rxy⟩
+ exact ⟨r', this, rxy⟩
theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
(h : ∀ x y, r x y → Quot.mk r <$> Cofix.dest x = Quot.mk r <$> Cofix.dest y) :
@@ -506,7 +506,7 @@ theorem Cofix.bisim' {α : Type*} (Q : α → Prop) (u v : α → Cofix F)
(fun x y ⟨x', Qx', xeq, yeq⟩ => by
rcases h x' Qx' with ⟨a, f, f', ux'eq, vx'eq, h'⟩
rw [liftr_iff]
- refine' ⟨a, f, f', xeq.symm ▸ ux'eq, yeq.symm ▸ vx'eq, h'⟩)
+ exact ⟨a, f, f', xeq.symm ▸ ux'eq, yeq.symm ▸ vx'eq, h'⟩)
_ _ ⟨x, Qx, rfl, rfl⟩
#align qpf.cofix.bisim' QPF.Cofix.bisim'
@@ -613,7 +613,7 @@ theorem mem_supp {α : Type u} (x : F α) (u : α) :
· intro h a f haf
have : Liftp (fun u => u ∈ f '' univ) x := by
rw [liftp_iff]
- refine' ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩
+ exact ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩
exact h this
intro h p; rw [liftp_iff]
rintro ⟨a, f, xeq, h'⟩
@@ -541,7 +541,7 @@ def comp : QPF (Functor.Comp F₂ F₁) where
conv =>
rhs
rw [← abs_repr x]
- cases' h : repr x with a f
+ cases' repr x with a f
dsimp
congr with x
cases' h' : repr (f x) with b g
cases x with | ...
instead of cases x; case => ...
(#9321)
This converts usages of the pattern
cases h
case inl h' => ...
case inr h' => ...
which derive from mathported code, to the "structured cases
" syntax:
cases h with
| inl h' => ...
| inr h' => ...
The case where the subgoals are handled with ·
instead of case
is more contentious (and much more numerous) so I left those alone. This pattern also appears with cases'
, induction
, induction'
, and rcases
. Furthermore, there is a similar transformation for by_cases
:
by_cases h : cond
case pos => ...
case neg => ...
is replaced by:
if h : cond then
...
else
...
Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@@ -192,10 +192,10 @@ set_option linter.uppercaseLean3 false in
theorem recF_eq_of_Wequiv {α : Type u} (u : F α → α) (x y : q.P.W) :
Wequiv x y → recF u x = recF u y := by
intro h
- induction h
- case ind a f f' _ ih => simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]
- case abs a f a' f' h => simp only [recF_eq', abs_map, h]
- case trans x y z _ _ ih₁ ih₂ => exact Eq.trans ih₁ ih₂
+ induction h with
+ | ind a f f' _ ih => simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]
+ | abs a f a' f' h => simp only [recF_eq', abs_map, h]
+ | trans x y z _ _ ih₁ ih₂ => exact Eq.trans ih₁ ih₂
set_option linter.uppercaseLean3 false in
#align qpf.recF_eq_of_Wequiv QPF.recF_eq_of_Wequiv
@@ -215,10 +215,10 @@ set_option linter.uppercaseLean3 false in
theorem Wequiv.symm (x y : q.P.W) : Wequiv x y → Wequiv y x := by
intro h
- induction h
- case ind a f f' _ ih => exact Wequiv.ind _ _ _ ih
- case abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm
- case trans x y z _ _ ih₁ ih₂ => exact QPF.Wequiv.trans _ _ _ ih₂ ih₁
+ induction h with
+ | ind a f f' _ ih => exact Wequiv.ind _ _ _ ih
+ | abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm
+ | trans x y z _ _ ih₁ ih₂ => exact QPF.Wequiv.trans _ _ _ ih₂ ih₁
set_option linter.uppercaseLean3 false in
#align qpf.Wequiv.symm QPF.Wequiv.symm
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.
In particular this includes adjustments for the Lean PRs
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).
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})
.
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:
(config := { unfoldPartialApp := true })
in some places, to recover the old behaviour@[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>
@@ -547,7 +547,7 @@ def comp : QPF (Functor.Comp F₂ F₁) where
cases' h' : repr (f x) with b g
dsimp; rw [← h', abs_repr]
abs_map {α β} f := by
- dsimp [Functor.Comp, PFunctor.comp]
+ dsimp (config := { unfoldPartialApp := true }) [Functor.Comp, PFunctor.comp]
intro p
cases' p with a g; dsimp
cases' a with b h; dsimp
@@ -557,7 +557,7 @@ def comp : QPF (Functor.Comp F₂ F₁) where
apply abs_map
congr
rw [PFunctor.map_eq]
- dsimp [Function.comp]
+ dsimp [Function.comp_def]
congr
ext x
rw [← abs_map]
@@ -13,19 +13,19 @@ import Mathlib.Data.PFunctor.Univariate.M
We assume the following:
-`P` : a polynomial functor
-`W` : its W-type
-`M` : its M-type
-`F` : a functor
+* `P`: a polynomial functor
+* `W`: its W-type
+* `M`: its M-type
+* `F`: a functor
We define:
-`q` : `QPF` data, representing `F` as a quotient of `P`
+* `q`: `QPF` data, representing `F` as a quotient of `P`
The main goal is to construct:
-`Fix` : the initial algebra with structure map `F Fix → Fix`.
-`Cofix` : the final coalgebra with structure map `Cofix → F Cofix`
+* `Fix`: the initial algebra with structure map `F Fix → Fix`.
+* `Cofix`: the final coalgebra with structure map `Cofix → F Cofix`
We also show that the composition of qpfs is a qpf, and that the quotient of a qpf
is a qpf.
PFunctor.map
instead of Functor.map
(#7743)
Functor.map
is monomorphic, so the universe of α
in this theorem is fixed to the universe of P
:
theorem dest_corec {P : PFunctor.{u}} {α : Type u} (g : α → P α) (x : α) : M.dest (M.corec g x) = M.corec g <$> g x
PFunctor.map
is polymorphic, so the universe of α
is free from the universe of P
:
theorem dest_corec {P : PFunctor.{u}} {α : Type v} (g : α → P α) (x : α) : M.dest (M.corec g x) = P.map (M.corec g) (g x)
Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Pol'tta / Miyahara Kō <52843868+Komyyy@users.noreply.github.com>
@@ -53,7 +53,7 @@ class QPF (F : Type u → Type u) [Functor F] where
abs : ∀ {α}, P α → F α
repr : ∀ {α}, F α → P α
abs_repr : ∀ {α} (x : F α), abs (repr x) = x
- abs_map : ∀ {α β} (f : α → β) (p : P α), abs (f <$> p) = f <$> abs p
+ abs_map : ∀ {α β} (f : α → β) (p : P α), abs (P.map f p) = f <$> abs p
#align qpf QPF
namespace QPF
@@ -167,14 +167,14 @@ set_option linter.uppercaseLean3 false in
#align qpf.recF QPF.recF
theorem recF_eq {α : Type _} (g : F α → α) (x : q.P.W) :
- recF g x = g (abs (recF g <$> x.dest)) := by
+ recF g x = g (abs (q.P.map (recF g) x.dest)) := by
cases x
rfl
set_option linter.uppercaseLean3 false in
#align qpf.recF_eq QPF.recF_eq
theorem recF_eq' {α : Type _} (g : F α → α) (a : q.P.A) (f : q.P.B a → q.P.W) :
- recF g ⟨a, f⟩ = g (abs (recF g <$> ⟨a, f⟩)) :=
+ recF g ⟨a, f⟩ = g (abs (q.P.map (recF g) ⟨a, f⟩)) :=
rfl
set_option linter.uppercaseLean3 false in
#align qpf.recF_eq' QPF.recF_eq'
@@ -231,9 +231,9 @@ set_option linter.uppercaseLean3 false in
theorem Wrepr_equiv (x : q.P.W) : Wequiv (Wrepr x) x := by
induction' x with a f ih
apply Wequiv.trans
- · change Wequiv (Wrepr ⟨a, f⟩) (PFunctor.W.mk (Wrepr <$> ⟨a, f⟩))
+ · change Wequiv (Wrepr ⟨a, f⟩) (PFunctor.W.mk (q.P.map Wrepr ⟨a, f⟩))
apply Wequiv.abs'
- have : Wrepr ⟨a, f⟩ = PFunctor.W.mk (repr (abs (Wrepr <$> ⟨a, f⟩))) := rfl
+ have : Wrepr ⟨a, f⟩ = PFunctor.W.mk (repr (abs (q.P.map Wrepr ⟨a, f⟩))) := rfl
rw [this, PFunctor.W.dest_mk, abs_repr]
rfl
apply Wequiv.ind; exact ih
@@ -267,7 +267,7 @@ set_option linter.uppercaseLean3 false in
/-- constructor of a type defined by a qpf -/
def Fix.mk (x : F (Fix F)) : Fix F :=
- Quot.mk _ (PFunctor.W.mk (fixToW <$> repr x))
+ Quot.mk _ (PFunctor.W.mk (q.P.map fixToW (repr x)))
#align qpf.fix.mk QPF.Fix.mk
/-- destructor of a type defined by a qpf -/
@@ -289,7 +289,7 @@ theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
rw [Fix.rec, Fix.mk]
dsimp
cases' h : repr x with a f
- rw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, ← PFunctor.comp_map, abs_map,
+ rw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, PFunctor.map_map, abs_map,
← h, abs_repr, this]
#align qpf.fix.rec_eq QPF.Fix.rec_eq
@@ -375,14 +375,16 @@ set_option linter.uppercaseLean3 false in
#align qpf.corecF QPF.corecF
theorem corecF_eq {α : Type _} (g : α → F α) (x : α) :
- PFunctor.M.dest (corecF g x) = corecF g <$> repr (g x) := by rw [corecF, PFunctor.M.dest_corec]
+ PFunctor.M.dest (corecF g x) = q.P.map (corecF g) (repr (g x)) := by
+ rw [corecF, PFunctor.M.dest_corec]
set_option linter.uppercaseLean3 false in
#align qpf.corecF_eq QPF.corecF_eq
-- Equivalence
/-- A pre-congruence on `q.P.M` *viewed as an F-coalgebra*. Not necessarily symmetric. -/
def IsPrecongr (r : q.P.M → q.P.M → Prop) : Prop :=
- ∀ ⦃x y⦄, r x y → abs (Quot.mk r <$> PFunctor.M.dest x) = abs (Quot.mk r <$> PFunctor.M.dest y)
+ ∀ ⦃x y⦄, r x y →
+ abs (q.P.map (Quot.mk r) (PFunctor.M.dest x)) = abs (q.P.map (Quot.mk r) (PFunctor.M.dest y))
#align qpf.is_precongr QPF.IsPrecongr
/-- The maximal congruence on `q.P.M`. -/
@@ -459,9 +461,9 @@ private theorem Cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x,
intro c d; apply Quot.inductionOn (motive := _) d; clear d
intro d rcd; apply Quot.sound; apply rcd)
have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl
- rw [← this, PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map,
+ rw [← this, ← PFunctor.map_map _ _ f, ← PFunctor.map_map _ _ (Quot.mk r), abs_map, abs_map,
abs_map, h₀]
- rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
+ rw [← PFunctor.map_map _ _ f, ← PFunctor.map_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
refine' ⟨r', this, rxy⟩
theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
@@ -50,10 +50,10 @@ elements of `F α` are represented by pairs `⟨a, f⟩`, where `a` is the shape
-/
class QPF (F : Type u → Type u) [Functor F] where
P : PFunctor.{u}
- abs : ∀ {α}, P.Obj α → F α
- repr : ∀ {α}, F α → P.Obj α
+ abs : ∀ {α}, P α → F α
+ repr : ∀ {α}, F α → P α
abs_repr : ∀ {α} (x : F α), abs (repr x) = x
- abs_map : ∀ {α β} (f : α → β) (p : P.Obj α), abs (f <$> p) = f <$> abs p
+ abs_map : ∀ {α β} (f : α → β) (p : P α), abs (f <$> p) = f <$> abs p
#align qpf QPF
namespace QPF
@@ -115,7 +115,7 @@ theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
#align qpf.liftp_iff QPF.liftp_iff
theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
- Liftp p x ↔ ∃ u : q.P.Obj α, abs u = x ∧ ∀ i, p (u.snd i) := by
+ Liftp p x ↔ ∃ u : q.P α, abs u = x ∧ ∀ i, p (u.snd i) := by
constructor
· rintro ⟨y, hy⟩
cases' h : repr y with a f
@@ -660,12 +660,12 @@ def IsUniform : Prop :=
/-- does `abs` preserve `Liftp`? -/
def LiftpPreservation : Prop :=
- ∀ ⦃α⦄ (p : α → Prop) (x : q.P.Obj α), Liftp p (abs x) ↔ Liftp p x
+ ∀ ⦃α⦄ (p : α → Prop) (x : q.P α), Liftp p (abs x) ↔ Liftp p x
#align qpf.liftp_preservation QPF.LiftpPreservation
/-- does `abs` preserve `supp`? -/
def SuppPreservation : Prop :=
- ∀ ⦃α⦄ (x : q.P.Obj α), supp (abs x) = supp x
+ ∀ ⦃α⦄ (x : q.P α), supp (abs x) = supp x
#align qpf.supp_preservation QPF.SuppPreservation
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : Type u} (a : q.P.A) (f : q.P.B a → α) :
Qpf
to QPF
& PFunctor.IdxCat
to PFunctor.Idx
(#7499)
IdxCat
was a mathport-ism caused by the name being capitalized in Lean 3.
@@ -20,7 +20,7 @@ We assume the following:
We define:
-`q` : `Qpf` data, representing `F` as a quotient of `P`
+`q` : `QPF` data, representing `F` as a quotient of `P`
The main goal is to construct:
@@ -48,17 +48,17 @@ Roughly speaking, saying that `F` is a quotient of a polynomial functor means th
elements of `F α` are represented by pairs `⟨a, f⟩`, where `a` is the shape of the object and
`f` indexes the relevant elements of `α`, in a suitably natural manner.
-/
-class Qpf (F : Type u → Type u) [Functor F] where
+class QPF (F : Type u → Type u) [Functor F] where
P : PFunctor.{u}
abs : ∀ {α}, P.Obj α → F α
repr : ∀ {α}, F α → P.Obj α
abs_repr : ∀ {α} (x : F α), abs (repr x) = x
abs_map : ∀ {α β} (f : α → β) (p : P.Obj α), abs (f <$> p) = f <$> abs p
-#align qpf Qpf
+#align qpf QPF
-namespace Qpf
+namespace QPF
-variable {F : Type u → Type u} [Functor F] [q : Qpf F]
+variable {F : Type u → Type u} [Functor F] [q : QPF F]
open Functor (Liftp Liftr)
@@ -73,7 +73,7 @@ theorem id_map {α : Type _} (x : F α) : id <$> x = x := by
cases' repr x with a f
rw [← abs_map]
rfl
-#align qpf.id_map Qpf.id_map
+#align qpf.id_map QPF.id_map
theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α) :
(g ∘ f) <$> x = g <$> f <$> x := by
@@ -81,7 +81,7 @@ theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α)
cases' repr x with a f
rw [← abs_map, ← abs_map, ← abs_map]
rfl
-#align qpf.comp_map Qpf.comp_map
+#align qpf.comp_map QPF.comp_map
theorem lawfulFunctor
(h : ∀ α β : Type u, @Functor.mapConst F _ α _ = Functor.map ∘ Function.const β) :
@@ -89,7 +89,7 @@ theorem lawfulFunctor
{ map_const := @h
id_map := @id_map F _ _
comp_map := @comp_map F _ _ }
-#align qpf.is_lawful_functor Qpf.lawfulFunctor
+#align qpf.is_lawful_functor QPF.lawfulFunctor
/-
Lifting predicates and relations
@@ -112,7 +112,7 @@ theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
rintro ⟨a, f, h₀, h₁⟩
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, h₀]; rfl
-#align qpf.liftp_iff Qpf.liftp_iff
+#align qpf.liftp_iff QPF.liftp_iff
theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
Liftp p x ↔ ∃ u : q.P.Obj α, abs u = x ∧ ∀ i, p (u.snd i) := by
@@ -129,7 +129,7 @@ theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) :
rintro ⟨⟨a, f⟩, h₀, h₁⟩; dsimp at *
use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩
rw [← abs_map, ← h₀]; rfl
-#align qpf.liftp_iff' Qpf.liftp_iff'
+#align qpf.liftp_iff' QPF.liftp_iff'
theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
Liftr r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i, r (f₀ i) (f₁ i) := by
@@ -151,7 +151,7 @@ theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
· rw [xeq, ← abs_map]
rfl
rw [yeq, ← abs_map]; rfl
-#align qpf.liftr_iff Qpf.liftr_iff
+#align qpf.liftr_iff QPF.liftr_iff
end
@@ -164,20 +164,20 @@ of trees.
def recF {α : Type _} (g : F α → α) : q.P.W → α
| ⟨a, f⟩ => g (abs ⟨a, fun x => recF g (f x)⟩)
set_option linter.uppercaseLean3 false in
-#align qpf.recF Qpf.recF
+#align qpf.recF QPF.recF
theorem recF_eq {α : Type _} (g : F α → α) (x : q.P.W) :
recF g x = g (abs (recF g <$> x.dest)) := by
cases x
rfl
set_option linter.uppercaseLean3 false in
-#align qpf.recF_eq Qpf.recF_eq
+#align qpf.recF_eq QPF.recF_eq
theorem recF_eq' {α : Type _} (g : F α → α) (a : q.P.A) (f : q.P.B a → q.P.W) :
recF g ⟨a, f⟩ = g (abs (recF g <$> ⟨a, f⟩)) :=
rfl
set_option linter.uppercaseLean3 false in
-#align qpf.recF_eq' Qpf.recF_eq'
+#align qpf.recF_eq' QPF.recF_eq'
/-- two trees are equivalent if their F-abstractions are -/
inductive Wequiv : q.P.W → q.P.W → Prop
@@ -186,7 +186,7 @@ inductive Wequiv : q.P.W → q.P.W → Prop
abs ⟨a, f⟩ = abs ⟨a', f'⟩ → Wequiv ⟨a, f⟩ ⟨a', f'⟩
| trans (u v w : q.P.W) : Wequiv u v → Wequiv v w → Wequiv u w
set_option linter.uppercaseLean3 false in
-#align qpf.Wequiv Qpf.Wequiv
+#align qpf.Wequiv QPF.Wequiv
/-- `recF` is insensitive to the representation -/
theorem recF_eq_of_Wequiv {α : Type u} (u : F α → α) (x y : q.P.W) :
@@ -197,36 +197,36 @@ theorem recF_eq_of_Wequiv {α : Type u} (u : F α → α) (x y : q.P.W) :
case abs a f a' f' h => simp only [recF_eq', abs_map, h]
case trans x y z _ _ ih₁ ih₂ => exact Eq.trans ih₁ ih₂
set_option linter.uppercaseLean3 false in
-#align qpf.recF_eq_of_Wequiv Qpf.recF_eq_of_Wequiv
+#align qpf.recF_eq_of_Wequiv QPF.recF_eq_of_Wequiv
-theorem Wequiv.abs' (x y : q.P.W) (h : Qpf.abs x.dest = Qpf.abs y.dest) : Wequiv x y := by
+theorem Wequiv.abs' (x y : q.P.W) (h : QPF.abs x.dest = QPF.abs y.dest) : Wequiv x y := by
cases x
cases y
apply Wequiv.abs
apply h
set_option linter.uppercaseLean3 false in
-#align qpf.Wequiv.abs' Qpf.Wequiv.abs'
+#align qpf.Wequiv.abs' QPF.Wequiv.abs'
theorem Wequiv.refl (x : q.P.W) : Wequiv x x := by
cases' x with a f
exact Wequiv.abs a f a f rfl
set_option linter.uppercaseLean3 false in
-#align qpf.Wequiv.refl Qpf.Wequiv.refl
+#align qpf.Wequiv.refl QPF.Wequiv.refl
theorem Wequiv.symm (x y : q.P.W) : Wequiv x y → Wequiv y x := by
intro h
induction h
case ind a f f' _ ih => exact Wequiv.ind _ _ _ ih
case abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm
- case trans x y z _ _ ih₁ ih₂ => exact Qpf.Wequiv.trans _ _ _ ih₂ ih₁
+ case trans x y z _ _ ih₁ ih₂ => exact QPF.Wequiv.trans _ _ _ ih₂ ih₁
set_option linter.uppercaseLean3 false in
-#align qpf.Wequiv.symm Qpf.Wequiv.symm
+#align qpf.Wequiv.symm QPF.Wequiv.symm
/-- maps every element of the W type to a canonical representative -/
def Wrepr : q.P.W → q.P.W :=
recF (PFunctor.W.mk ∘ repr)
set_option linter.uppercaseLean3 false in
-#align qpf.Wrepr Qpf.Wrepr
+#align qpf.Wrepr QPF.Wrepr
theorem Wrepr_equiv (x : q.P.W) : Wequiv (Wrepr x) x := by
induction' x with a f ih
@@ -238,42 +238,42 @@ theorem Wrepr_equiv (x : q.P.W) : Wequiv (Wrepr x) x := by
rfl
apply Wequiv.ind; exact ih
set_option linter.uppercaseLean3 false in
-#align qpf.Wrepr_equiv Qpf.Wrepr_equiv
+#align qpf.Wrepr_equiv QPF.Wrepr_equiv
/-- Define the fixed point as the quotient of trees under the equivalence relation `Wequiv`. -/
def Wsetoid : Setoid q.P.W :=
⟨Wequiv, @Wequiv.refl _ _ _, @Wequiv.symm _ _ _, @Wequiv.trans _ _ _⟩
set_option linter.uppercaseLean3 false in
-#align qpf.W_setoid Qpf.Wsetoid
+#align qpf.W_setoid QPF.Wsetoid
attribute [local instance] Wsetoid
/-- inductive type defined as initial algebra of a Quotient of Polynomial Functor -/
--@[nolint has_nonempty_instance] Porting note: linter does not exist
-def Fix (F : Type u → Type u) [Functor F] [q : Qpf F] :=
+def Fix (F : Type u → Type u) [Functor F] [q : QPF F] :=
Quotient (Wsetoid : Setoid q.P.W)
-#align qpf.fix Qpf.Fix
+#align qpf.fix QPF.Fix
/-- recursor of a type defined by a qpf -/
def Fix.rec {α : Type _} (g : F α → α) : Fix F → α :=
Quot.lift (recF g) (recF_eq_of_Wequiv g)
-#align qpf.fix.rec Qpf.Fix.rec
+#align qpf.fix.rec QPF.Fix.rec
/-- access the underlying W-type of a fixpoint data type -/
def fixToW : Fix F → q.P.W :=
Quotient.lift Wrepr (recF_eq_of_Wequiv fun x => @PFunctor.W.mk q.P (repr x))
set_option linter.uppercaseLean3 false in
-#align qpf.fix_to_W Qpf.fixToW
+#align qpf.fix_to_W QPF.fixToW
/-- constructor of a type defined by a qpf -/
def Fix.mk (x : F (Fix F)) : Fix F :=
Quot.mk _ (PFunctor.W.mk (fixToW <$> repr x))
-#align qpf.fix.mk Qpf.Fix.mk
+#align qpf.fix.mk QPF.Fix.mk
/-- destructor of a type defined by a qpf -/
def Fix.dest : Fix F → F (Fix F) :=
Fix.rec (Functor.map Fix.mk)
-#align qpf.fix.dest Qpf.Fix.dest
+#align qpf.fix.dest QPF.Fix.dest
theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
Fix.rec g (Fix.mk x) = g (Fix.rec g <$> x) := by
@@ -291,7 +291,7 @@ theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
cases' h : repr x with a f
rw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, ← PFunctor.comp_map, abs_map,
← h, abs_repr, this]
-#align qpf.fix.rec_eq Qpf.Fix.rec_eq
+#align qpf.fix.rec_eq QPF.Fix.rec_eq
theorem Fix.ind_aux (a : q.P.A) (f : q.P.B a → q.P.W) :
Fix.mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦⟨a, f⟩⟧ := by
@@ -304,7 +304,7 @@ theorem Fix.ind_aux (a : q.P.A) (f : q.P.B a → q.P.W) :
rw [this]
apply Quot.sound
apply Wrepr_equiv
-#align qpf.fix.ind_aux Qpf.Fix.ind_aux
+#align qpf.fix.ind_aux QPF.Fix.ind_aux
theorem Fix.ind_rec {α : Type u} (g₁ g₂ : Fix F → α)
(h : ∀ x : F (Fix F), g₁ <$> x = g₂ <$> x → g₁ (Fix.mk x) = g₂ (Fix.mk x)) :
@@ -317,7 +317,7 @@ theorem Fix.ind_rec {α : Type u} (g₁ g₂ : Fix F → α)
rw [← abs_map, ← abs_map, PFunctor.map_eq, PFunctor.map_eq]
congr with x
apply ih
-#align qpf.fix.ind_rec Qpf.Fix.ind_rec
+#align qpf.fix.ind_rec QPF.Fix.ind_rec
theorem Fix.rec_unique {α : Type u} (g : F α → α) (h : Fix F → α)
(hyp : ∀ x, h (Fix.mk x) = g (h <$> x)) : Fix.rec g = h := by
@@ -325,7 +325,7 @@ theorem Fix.rec_unique {α : Type u} (g : F α → α) (h : Fix F → α)
apply Fix.ind_rec
intro x hyp'
rw [hyp, ← hyp', Fix.rec_eq]
-#align qpf.fix.rec_unique Qpf.Fix.rec_unique
+#align qpf.fix.rec_unique QPF.Fix.rec_unique
theorem Fix.mk_dest (x : Fix F) : Fix.mk (Fix.dest x) = x := by
change (Fix.mk ∘ Fix.dest) x = id x
@@ -334,7 +334,7 @@ theorem Fix.mk_dest (x : Fix F) : Fix.mk (Fix.dest x) = x := by
rw [Function.comp_apply, id_eq, Fix.dest, Fix.rec_eq, id_map, comp_map]
intro h
rw [h]
-#align qpf.fix.mk_dest Qpf.Fix.mk_dest
+#align qpf.fix.mk_dest QPF.Fix.mk_dest
theorem Fix.dest_mk (x : F (Fix F)) : Fix.dest (Fix.mk x) = x := by
unfold Fix.dest; rw [Fix.rec_eq, ← Fix.dest, ← comp_map]
@@ -343,7 +343,7 @@ theorem Fix.dest_mk (x : F (Fix F)) : Fix.dest (Fix.mk x) = x := by
rw [← id_map x]
congr with x
apply Fix.mk_dest
-#align qpf.fix.dest_mk Qpf.Fix.dest_mk
+#align qpf.fix.dest_mk QPF.Fix.dest_mk
theorem Fix.ind (p : Fix F → Prop) (h : ∀ x : F (Fix F), Liftp p x → p (Fix.mk x)) : ∀ x, p x := by
apply Quot.ind
@@ -355,16 +355,16 @@ theorem Fix.ind (p : Fix F → Prop) (h : ∀ x : F (Fix F), Liftp p x → p (Fi
rw [liftp_iff]
refine' ⟨_, _, rfl, _⟩
convert ih
-#align qpf.fix.ind Qpf.Fix.ind
+#align qpf.fix.ind QPF.Fix.ind
-end Qpf
+end QPF
/-
Construct the final coalgebra to a qpf.
-/
-namespace Qpf
+namespace QPF
-variable {F : Type u → Type u} [Functor F] [q : Qpf F]
+variable {F : Type u → Type u} [Functor F] [q : QPF F]
open Functor (Liftp Liftr)
@@ -372,28 +372,28 @@ open Functor (Liftp Liftr)
def corecF {α : Type _} (g : α → F α) : α → q.P.M :=
PFunctor.M.corec fun x => repr (g x)
set_option linter.uppercaseLean3 false in
-#align qpf.corecF Qpf.corecF
+#align qpf.corecF QPF.corecF
theorem corecF_eq {α : Type _} (g : α → F α) (x : α) :
PFunctor.M.dest (corecF g x) = corecF g <$> repr (g x) := by rw [corecF, PFunctor.M.dest_corec]
set_option linter.uppercaseLean3 false in
-#align qpf.corecF_eq Qpf.corecF_eq
+#align qpf.corecF_eq QPF.corecF_eq
-- Equivalence
/-- A pre-congruence on `q.P.M` *viewed as an F-coalgebra*. Not necessarily symmetric. -/
def IsPrecongr (r : q.P.M → q.P.M → Prop) : Prop :=
∀ ⦃x y⦄, r x y → abs (Quot.mk r <$> PFunctor.M.dest x) = abs (Quot.mk r <$> PFunctor.M.dest y)
-#align qpf.is_precongr Qpf.IsPrecongr
+#align qpf.is_precongr QPF.IsPrecongr
/-- The maximal congruence on `q.P.M`. -/
def Mcongr : q.P.M → q.P.M → Prop := fun x y => ∃ r, IsPrecongr r ∧ r x y
set_option linter.uppercaseLean3 false in
-#align qpf.Mcongr Qpf.Mcongr
+#align qpf.Mcongr QPF.Mcongr
/-- coinductive type defined as the final coalgebra of a qpf -/
-def Cofix (F : Type u → Type u) [Functor F] [q : Qpf F] :=
+def Cofix (F : Type u → Type u) [Functor F] [q : QPF F] :=
Quot (@Mcongr F _ q)
-#align qpf.cofix Qpf.Cofix
+#align qpf.cofix QPF.Cofix
instance [Inhabited q.P.A] : Inhabited (Cofix F) :=
⟨Quot.mk _ default⟩
@@ -401,7 +401,7 @@ instance [Inhabited q.P.A] : Inhabited (Cofix F) :=
/-- corecursor for type defined by `Cofix` -/
def Cofix.corec {α : Type _} (g : α → F α) (x : α) : Cofix F :=
Quot.mk _ (corecF g x)
-#align qpf.cofix.corec Qpf.Cofix.corec
+#align qpf.cofix.corec QPF.Cofix.corec
/-- destructor for type defined by `Cofix` -/
def Cofix.dest : Cofix F → F (Cofix F) :=
@@ -416,7 +416,7 @@ def Cofix.dest : Cofix F → F (Cofix F) :=
conv =>
lhs
rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map])
-#align qpf.cofix.dest Qpf.Cofix.dest
+#align qpf.cofix.dest QPF.Cofix.dest
theorem Cofix.dest_corec {α : Type u} (g : α → F α) (x : α) :
Cofix.dest (Cofix.corec g x) = Cofix.corec g <$> g x := by
@@ -425,7 +425,7 @@ theorem Cofix.dest_corec {α : Type u} (g : α → F α) (x : α) :
rw [Cofix.dest, Cofix.corec];
dsimp
rw [corecF_eq, abs_map, abs_repr, ← comp_map]; rfl
-#align qpf.cofix.dest_corec Qpf.Cofix.dest_corec
+#align qpf.cofix.dest_corec QPF.Cofix.dest_corec
-- Porting note: Needed to add `(motive := _)` to get `Quot.inductionOn` to work
private theorem Cofix.bisim_aux (r : Cofix F → Cofix F → Prop) (h' : ∀ x, r x x)
@@ -482,7 +482,7 @@ theorem Cofix.bisim_rel (r : Cofix F → Cofix F → Prop)
rw [@comp_map _ _ q _ _ _ (Quot.mk r), @comp_map _ _ q _ _ _ (Quot.mk r)]
rw [h _ _ r'xy]
right; exact rxy
-#align qpf.cofix.bisim_rel Qpf.Cofix.bisim_rel
+#align qpf.cofix.bisim_rel QPF.Cofix.bisim_rel
theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
(h : ∀ x y, r x y → Liftr r (Cofix.dest x) (Cofix.dest y)) : ∀ x y, r x y → x = y := by
@@ -493,7 +493,7 @@ theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
congr 2 with i
apply Quot.sound
apply h'
-#align qpf.cofix.bisim Qpf.Cofix.bisim
+#align qpf.cofix.bisim QPF.Cofix.bisim
theorem Cofix.bisim' {α : Type*} (Q : α → Prop) (u v : α → Cofix F)
(h : ∀ x, Q x → ∃ a f f', Cofix.dest (u x) = abs ⟨a, f⟩ ∧ Cofix.dest (v x) = abs ⟨a, f'⟩ ∧
@@ -506,21 +506,21 @@ theorem Cofix.bisim' {α : Type*} (Q : α → Prop) (u v : α → Cofix F)
rw [liftr_iff]
refine' ⟨a, f, f', xeq.symm ▸ ux'eq, yeq.symm ▸ vx'eq, h'⟩)
_ _ ⟨x, Qx, rfl, rfl⟩
-#align qpf.cofix.bisim' Qpf.Cofix.bisim'
+#align qpf.cofix.bisim' QPF.Cofix.bisim'
-end Qpf
+end QPF
/-
Composition of qpfs.
-/
-namespace Qpf
+namespace QPF
-variable {F₂ : Type u → Type u} [Functor F₂] [q₂ : Qpf F₂]
+variable {F₂ : Type u → Type u} [Functor F₂] [q₂ : QPF F₂]
-variable {F₁ : Type u → Type u} [Functor F₁] [q₁ : Qpf F₁]
+variable {F₁ : Type u → Type u} [Functor F₁] [q₁ : QPF F₁]
/-- composition of qpfs gives another qpf -/
-def comp : Qpf (Functor.Comp F₂ F₁) where
+def comp : QPF (Functor.Comp F₂ F₁) where
P := PFunctor.comp q₂.P q₁.P
abs {α} := by
dsimp [Functor.Comp]
@@ -560,18 +560,18 @@ def comp : Qpf (Functor.Comp F₂ F₁) where
ext x
rw [← abs_map]
rfl
-#align qpf.comp Qpf.comp
+#align qpf.comp QPF.comp
-end Qpf
+end QPF
/-
Quotients.
We show that if `F` is a qpf and `G` is a suitable quotient of `F`, then `G` is a qpf.
-/
-namespace Qpf
+namespace QPF
-variable {F : Type u → Type u} [Functor F] [q : Qpf F]
+variable {F : Type u → Type u} [Functor F] [q : QPF F]
variable {G : Type u → Type u} [Functor G]
@@ -583,23 +583,23 @@ variable {FG_repr : ∀ {α}, G α → F α}
functor `G α`, `G` is a qpf. We can consider `G` a quotient on `F` where
elements `x y : F α` are in the same equivalence class if
`FG_abs x = FG_abs y`. -/
-def quotientQpf (FG_abs_repr : ∀ {α} (x : G α), FG_abs (FG_repr x) = x)
- (FG_abs_map : ∀ {α β} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x) : Qpf G where
+def quotientQPF (FG_abs_repr : ∀ {α} (x : G α), FG_abs (FG_repr x) = x)
+ (FG_abs_map : ∀ {α β} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x) : QPF G where
P := q.P
abs {α} p := FG_abs (abs p)
repr {α} x := repr (FG_repr x)
abs_repr {α} x := by simp only; rw [abs_repr, FG_abs_repr]
abs_map {α β} f x := by simp only; rw [abs_map, FG_abs_map]
-#align qpf.quotient_qpf Qpf.quotientQpf
+#align qpf.quotient_qpf QPF.quotientQPF
-end Qpf
+end QPF
/-
Support.
-/
-namespace Qpf
+namespace QPF
-variable {F : Type u → Type u} [Functor F] [q : Qpf F]
+variable {F : Type u → Type u} [Functor F] [q : QPF F]
open Functor (Liftp Liftr supp)
@@ -617,13 +617,13 @@ theorem mem_supp {α : Type u} (x : F α) (u : α) :
rintro ⟨a, f, xeq, h'⟩
rcases h a f xeq.symm with ⟨i, _, hi⟩
rw [← hi]; apply h'
-#align qpf.mem_supp Qpf.mem_supp
+#align qpf.mem_supp QPF.mem_supp
theorem supp_eq {α : Type u} (x : F α) :
supp x = { u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f '' univ } := by
ext
apply mem_supp
-#align qpf.supp_eq Qpf.supp_eq
+#align qpf.supp_eq QPF.supp_eq
theorem has_good_supp_iff {α : Type u} (x : F α) :
(∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
@@ -649,24 +649,24 @@ theorem has_good_supp_iff {α : Type u} (x : F α) :
intro a' f' xeq'
apply h a' f' xeq'
apply mem_image_of_mem _ (mem_univ _)
-#align qpf.has_good_supp_iff Qpf.has_good_supp_iff
+#align qpf.has_good_supp_iff QPF.has_good_supp_iff
/-- A qpf is said to be uniform if every polynomial functor
representing a single value all have the same range. -/
def IsUniform : Prop :=
∀ ⦃α : Type u⦄ (a a' : q.P.A) (f : q.P.B a → α) (f' : q.P.B a' → α),
abs ⟨a, f⟩ = abs ⟨a', f'⟩ → f '' univ = f' '' univ
-#align qpf.is_uniform Qpf.IsUniform
+#align qpf.is_uniform QPF.IsUniform
/-- does `abs` preserve `Liftp`? -/
def LiftpPreservation : Prop :=
∀ ⦃α⦄ (p : α → Prop) (x : q.P.Obj α), Liftp p (abs x) ↔ Liftp p x
-#align qpf.liftp_preservation Qpf.LiftpPreservation
+#align qpf.liftp_preservation QPF.LiftpPreservation
/-- does `abs` preserve `supp`? -/
def SuppPreservation : Prop :=
∀ ⦃α⦄ (x : q.P.Obj α), supp (abs x) = supp x
-#align qpf.supp_preservation Qpf.SuppPreservation
+#align qpf.supp_preservation QPF.SuppPreservation
theorem supp_eq_of_isUniform (h : q.IsUniform) {α : Type u} (a : q.P.A) (f : q.P.B a → α) :
supp (abs ⟨a, f⟩) = f '' univ := by
@@ -675,7 +675,7 @@ theorem supp_eq_of_isUniform (h : q.IsUniform) {α : Type u} (a : q.P.A) (f : q.
apply h' _ _ rfl
intro h' a' f' e
rw [← h _ _ _ _ e.symm]; apply h'
-#align qpf.supp_eq_of_is_uniform Qpf.supp_eq_of_isUniform
+#align qpf.supp_eq_of_is_uniform QPF.supp_eq_of_isUniform
theorem liftp_iff_of_isUniform (h : q.IsUniform) {α : Type u} (x : F α) (p : α → Prop) :
Liftp p x ↔ ∀ u ∈ supp x, p u := by
@@ -690,13 +690,13 @@ theorem liftp_iff_of_isUniform (h : q.IsUniform) {α : Type u} (x : F α) (p :
refine' ⟨a, f, rfl, fun i => h' _ _⟩
rw [supp_eq_of_isUniform h]
exact ⟨i, mem_univ i, rfl⟩
-#align qpf.liftp_iff_of_is_uniform Qpf.liftp_iff_of_isUniform
+#align qpf.liftp_iff_of_is_uniform QPF.liftp_iff_of_isUniform
theorem supp_map (h : q.IsUniform) {α β : Type u} (g : α → β) (x : F α) :
supp (g <$> x) = g '' supp x := by
rw [← abs_repr x]; cases' repr x with a f; rw [← abs_map, PFunctor.map_eq]
rw [supp_eq_of_isUniform h, supp_eq_of_isUniform h, image_comp]
-#align qpf.supp_map Qpf.supp_map
+#align qpf.supp_map QPF.supp_map
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform := by
constructor
@@ -704,7 +704,7 @@ theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform := by
rw [← PFunctor.supp_eq, ← PFunctor.supp_eq, ← h, h', h]
· rintro h α ⟨a, f⟩
rwa [supp_eq_of_isUniform, PFunctor.supp_eq]
-#align qpf.supp_preservation_iff_uniform Qpf.suppPreservation_iff_uniform
+#align qpf.supp_preservation_iff_uniform QPF.suppPreservation_iff_uniform
theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation := by
constructor <;> intro h
@@ -718,10 +718,10 @@ theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpP
· rintro α ⟨a, f⟩
simp only [LiftpPreservation] at h
simp only [supp, h]
-#align qpf.supp_preservation_iff_liftp_preservation Qpf.suppPreservation_iff_liftpPreservation
+#align qpf.supp_preservation_iff_liftp_preservation QPF.suppPreservation_iff_liftpPreservation
theorem liftpPreservation_iff_uniform : q.LiftpPreservation ↔ q.IsUniform := by
rw [← suppPreservation_iff_liftpPreservation, suppPreservation_iff_uniform]
-#align qpf.liftp_preservation_iff_uniform Qpf.liftpPreservation_iff_uniform
+#align qpf.liftp_preservation_iff_uniform QPF.liftpPreservation_iff_uniform
-end Qpf
+end QPF
@@ -413,7 +413,6 @@ def Cofix.dest : Cofix F → F (Cofix F) :=
intro x y h
exact ⟨r, pr, h⟩
rw [← Quot.factor_mk_eq _ _ this]
- dsimp
conv =>
lhs
rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map])
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -496,7 +496,7 @@ theorem Cofix.bisim (r : Cofix F → Cofix F → Prop)
apply h'
#align qpf.cofix.bisim Qpf.Cofix.bisim
-theorem Cofix.bisim' {α : Type _} (Q : α → Prop) (u v : α → Cofix F)
+theorem Cofix.bisim' {α : Type*} (Q : α → Prop) (u v : α → Cofix F)
(h : ∀ x, Q x → ∃ a f f', Cofix.dest (u x) = abs ⟨a, f⟩ ∧ Cofix.dest (v x) = abs ⟨a, f'⟩ ∧
∀ i, ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x') :
∀ x, Q x → u x = v x := fun x Qx =>
@@ -2,14 +2,11 @@
Copyright (c) 2018 Jeremy Avigad. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jeremy Avigad
-
-! This file was ported from Lean 3 source module data.qpf.univariate.basic
-! leanprover-community/mathlib commit 14b69e9f3c16630440a2cbd46f1ddad0d561dee7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.PFunctor.Univariate.M
+#align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7"
+
/-!
# Quotients of Polynomial Functors
The unported dependencies are