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] - fix(*): fix universe levels #8677

Closed
wants to merge 13 commits into from
Closed

Conversation

fpvandoorn
Copy link
Member

@fpvandoorn fpvandoorn commented Aug 15, 2021

The universe levels in the following declarations have been fixed .
This means that there was an argument of the form Type (max u v) or Sort (max u v), which could be generalized to Type u or Sort u. In a few cases, I made explicit that there is a universe restriction (sometimes max u v is legitimately used as an arbitrary universe level higher than u)

In some files I also cleaned up some declarations around these.

algebraic_geometry.Spec.SheafedSpace_map
algebraic_geometry.Spec.to_SheafedSpace
algebraic_geometry.Spec.to_PresheafedSpace
category_theory.discrete_is_connected_equiv_punit
writer_t.uliftable'
writer_t.uliftable
equiv.prod_equiv_of_equiv_nat
free_algebra.dim_eq
linear_equiv.alg_conj
module.flat
cardinal.add_def
slim_check.injective_function.mk
topological_add_group.of_nhds_zero'
topological_group.of_nhds_one'
topological_group.of_comm_of_nhds_one
topological_add_group.of_comm_of_nhds_zero
has_continuous_mul.of_nhds_one
has_continuous_add.of_nhds_zero
has_continuous_add_of_comm_of_nhds_zero
has_continuous_mul_of_comm_of_nhds_one
uniform_space_of_compact_t2
AddCommGroup.cokernel_iso_quotient
algebraic_geometry.Scheme
algebraic_geometry.Scheme.Spec_obj
simplex_category.skeletal_functor
category_theory.Type_to_Cat.full
CommMon_.equiv_lax_braided_functor_punit.lax_braided_to_CommMon
CommMon_.equiv_lax_braided_functor_punit.unit_iso
Mon_.equiv_lax_monoidal_functor_punit.lax_monoidal_to_Mon
Mon_.equiv_lax_monoidal_functor_punit.unit_iso
uliftable.down_map
weak_dual.has_continuous_smul
stone_cech_equivalence
Compactum_to_CompHaus.full
TopCommRing.category_theory.forget₂.category_theory.reflects_isomorphisms

Open in Gitpod

https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/crazy.20universe

@fpvandoorn fpvandoorn added the awaiting-review The author would like community review of the PR label Aug 15, 2021
@digama0
Copy link
Member

digama0 commented Aug 15, 2021

Did you make a linter for this to find all these? Because that would be amazing.

@fpvandoorn
Copy link
Member Author

Yes, but it's not ready for mathlib yet. See my comment in https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/crazy.20universe

@@ -300,7 +300,7 @@ open quotient_add_group
The categorical cokernel of a morphism in `AddCommGroup`
agrees with the usual group-theoretical quotient.
-/
noncomputable def cokernel_iso_quotient {G H : AddCommGroup} (f : G ⟶ H) :
noncomputable def cokernel_iso_quotient {G H : AddCommGroup.{u}} (f : G ⟶ H) :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are G and H not allowed to reside in different universes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, G ⟶ H is only defined when G and H are in the same category, so they must have the same type (including universe level)

@semorrison
Copy link
Collaborator

This is great, @fpvandoorn! With the linting coming along soon, let's get this merged.

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) merge-conflict Please `git merge origin/master` then a bot will remove this label. and removed awaiting-review The author would like community review of the PR labels Aug 16, 2021
@bors
Copy link

bors bot commented Aug 16, 2021

Canceled.

@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Aug 16, 2021
@fpvandoorn
Copy link
Member Author

fpvandoorn commented Aug 16, 2021

can I

bors r-

this myself? Or was that automatic?

I think someone else has to bors r+ it again? @semorrison

@fpvandoorn fpvandoorn added awaiting-review The author would like community review of the PR and removed ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) labels Aug 16, 2021
@digama0
Copy link
Member

digama0 commented Aug 16, 2021

Pushing a commit to an already r+'d PR automatically cancels it.

@digama0
Copy link
Member

digama0 commented Aug 16, 2021

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Aug 16, 2021
bors bot pushed a commit that referenced this pull request Aug 16, 2021
The universe levels in the following declarations have been fixed . 
This means that there was an argument of the form `Type (max u v)` or `Sort (max u v)`, which could be generalized to `Type u` or `Sort u`. In a few cases, I made explicit that there is a universe restriction (sometimes `max u v` is legitimately used as an arbitrary universe level higher than `u`)

In some files I also cleaned up some declarations around these.
```
algebraic_geometry.Spec.SheafedSpace_map
algebraic_geometry.Spec.to_SheafedSpace
algebraic_geometry.Spec.to_PresheafedSpace
category_theory.discrete_is_connected_equiv_punit
writer_t.uliftable'
writer_t.uliftable
equiv.prod_equiv_of_equiv_nat
free_algebra.dim_eq
linear_equiv.alg_conj
module.flat
cardinal.add_def
slim_check.injective_function.mk
topological_add_group.of_nhds_zero'
topological_group.of_nhds_one'
topological_group.of_comm_of_nhds_one
topological_add_group.of_comm_of_nhds_zero
has_continuous_mul.of_nhds_one
has_continuous_add.of_nhds_zero
has_continuous_add_of_comm_of_nhds_zero
has_continuous_mul_of_comm_of_nhds_one
uniform_space_of_compact_t2
AddCommGroup.cokernel_iso_quotient
algebraic_geometry.Scheme
algebraic_geometry.Scheme.Spec_obj
simplex_category.skeletal_functor
category_theory.Type_to_Cat.full
CommMon_.equiv_lax_braided_functor_punit.lax_braided_to_CommMon
CommMon_.equiv_lax_braided_functor_punit.unit_iso
Mon_.equiv_lax_monoidal_functor_punit.lax_monoidal_to_Mon
Mon_.equiv_lax_monoidal_functor_punit.unit_iso
uliftable.down_map
weak_dual.has_continuous_smul
stone_cech_equivalence
Compactum_to_CompHaus.full
TopCommRing.category_theory.forget₂.category_theory.reflects_isomorphisms
```



Co-authored-by: Floris van Doorn <fpv@andrew.cmu.edu>
@bors
Copy link

bors bot commented Aug 16, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix(*): fix universe levels [Merged by Bors] - fix(*): fix universe levels Aug 16, 2021
@bors bors bot closed this Aug 16, 2021
@bors bors bot deleted the univ-levels branch August 16, 2021 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants