Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(category_theory/monad): monadicity theorems #5137

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
21c9cdd
stuff
b-mehta Nov 27, 2020
87d1b50
feat(category_theory/limits/preserves): preserving equalizers
b-mehta Nov 19, 2020
ec30d1a
amend docs
b-mehta Nov 19, 2020
4e48ab0
monadicity
b-mehta Nov 27, 2020
8599d49
beck!"
b-mehta Nov 28, 2020
b2a0807
changes
b-mehta Nov 28, 2020
d9e53ff
more change
b-mehta Nov 28, 2020
25e5a6f
lint
b-mehta Nov 28, 2020
e17d7f4
steamroll
b-mehta Nov 28, 2020
ad62a8c
fix
b-mehta Nov 28, 2020
aa32fc4
change
b-mehta Nov 28, 2020
67031bf
import
b-mehta Nov 28, 2020
c500043
stuff
b-mehta Nov 28, 2020
1c84d59
shuffle
b-mehta Nov 29, 2020
0165cc6
lint
b-mehta Nov 29, 2020
21d3f6d
simps
b-mehta Nov 29, 2020
e4b8f0a
reduce
b-mehta Nov 29, 2020
c3767bc
converse
b-mehta Nov 29, 2020
7781753
universe
b-mehta Nov 29, 2020
60d3931
Merge branch 'master' into monadicity
b-mehta Dec 2, 2020
c86e081
edit
b-mehta Dec 2, 2020
be1c78d
Merge branch 'monadicity-clean' into monadicity
b-mehta Dec 2, 2020
727fe81
improve monad algebra
b-mehta Dec 2, 2020
28b7417
Merge branch 'master' into monadicity
b-mehta Dec 4, 2020
7aaf0c8
Merge branch 'master' into monadicity
b-mehta Dec 4, 2020
2e45061
Merge branch 'master' into monadicity
b-mehta Dec 5, 2020
2eb13b7
fix
b-mehta Dec 5, 2020
c4a3c8f
Merge branch 'master' into monadicity
b-mehta Dec 5, 2020
45c2fdd
fix
b-mehta Dec 5, 2020
917664e
fix
b-mehta Dec 6, 2020
e646c04
fix
b-mehta Dec 6, 2020
889104e
remove
b-mehta Dec 7, 2020
febd87a
Merge branch 'master' into monadicity
b-mehta Dec 8, 2020
ed6b21e
restore import
b-mehta Dec 8, 2020
989677d
restore imports
b-mehta Dec 8, 2020
1ae48e1
restore
b-mehta Dec 8, 2020
07bf735
restore imports
b-mehta Dec 8, 2020
fa066ab
Merge branch 'master' into monadicity
b-mehta Dec 9, 2020
59eebe7
Merge branch 'master' into monadicity
b-mehta Dec 9, 2020
348d69a
Merge branch 'master' into monadicity
b-mehta Dec 10, 2020
4417225
revert
b-mehta Dec 10, 2020
cd11bee
restore more
b-mehta Dec 10, 2020
311c667
Update normal_mono.lean
b-mehta Dec 10, 2020
9f4006d
update doc
b-mehta Dec 11, 2020
70b3565
Merge branch 'master' into monadicity
b-mehta Dec 11, 2020
54f68f3
fix build
b-mehta Dec 11, 2020
73ead8e
no more abbrev
b-mehta Dec 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/category_theory/monad/adjunction.lean
Expand Up @@ -78,8 +78,6 @@ by { dsimp [adjunction.monad], apply_instance }

attribute [instance] monadic_right_adjoint.eqv

-- PROJECT prove Beck's monadicity theorem, e.g. from Section 5.5 of [Riehl][riehl2017]

namespace reflective

lemma comparison_ess_surj_aux [reflective R] (X : monad.algebra ((left_adjoint R) ⋙ R)) :
Expand Down
18 changes: 9 additions & 9 deletions src/category_theory/monad/coequalizer.lean
Expand Up @@ -6,7 +6,6 @@ Authors: Bhavik Mehta

import category_theory.limits.shapes.reflexive
import category_theory.limits.preserves.shapes.equalizers
import category_theory.limits.shapes.split_coequalizer
import category_theory.limits.preserves.limits
import category_theory.monad.adjunction

Expand Down Expand Up @@ -36,26 +35,27 @@ Show that any algebra is a coequalizer of free algebras.

/-- The top map in the coequalizer diagram we will construct. -/
@[simps {rhs_md := semireducible}]
def coequalizer.top_map : (monad.free T).obj (T.obj X.A) ⟶ (monad.free T).obj X.A :=
def free_coequalizer.top_map : (monad.free T).obj (T.obj X.A) ⟶ (monad.free T).obj X.A :=
b-mehta marked this conversation as resolved.
Show resolved Hide resolved
(monad.free T).map X.a

/-- The bottom map in the coequalizer diagram we will construct. -/
@[simps]
def coequalizer.bottom_map : (monad.free T).obj (T.obj X.A) ⟶ (monad.free T).obj X.A :=
def free_coequalizer.bottom_map : (monad.free T).obj (T.obj X.A) ⟶ (monad.free T).obj X.A :=
{ f := (μ_ T).app X.A,
h' := monad.assoc X.A }

/-- The cofork map in the coequalizer diagram we will construct. -/
@[simps]
def coequalizer.π : (monad.free T).obj X.A ⟶ X :=
def free_coequalizer.π : (monad.free T).obj X.A ⟶ X :=
{ f := X.a,
h' := X.assoc.symm }

lemma coequalizer.condition :
coequalizer.top_map X ≫ coequalizer.π X = coequalizer.bottom_map X ≫ coequalizer.π X :=
lemma free_coequalizer.condition :
free_coequalizer.top_map X ≫ free_coequalizer.π X =
free_coequalizer.bottom_map X ≫ free_coequalizer.π X :=
algebra.hom.ext _ _ X.assoc.symm

instance : is_reflexive_pair (coequalizer.top_map X) (coequalizer.bottom_map X) :=
instance : is_reflexive_pair (free_coequalizer.top_map X) (free_coequalizer.bottom_map X) :=
begin
apply is_reflexive_pair.mk' _ _ _,
apply (free T).map ((η_ T).app X.A),
Expand All @@ -71,8 +71,8 @@ Construct the Beck cofork in the category of algebras. This cofork is reflexive
coequalizer.
-/
@[simps {rhs_md := semireducible}]
def beck_algebra_cofork : cofork (coequalizer.top_map X) (coequalizer.bottom_map X) :=
cofork.of_π _ (coequalizer.condition X)
def beck_algebra_cofork : cofork (free_coequalizer.top_map X) (free_coequalizer.bottom_map X) :=
cofork.of_π _ (free_coequalizer.condition X)

/--
The cofork constructed is a colimit. This shows that any algebra is a (reflexive) coequalizer of
Expand Down