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: if the body constrains universes, make it explicit in the signature. #14069

Closed
wants to merge 7 commits into from

Conversation

kim-em
Copy link
Contributor

@kim-em kim-em commented Jun 24, 2024

In many places in Mathlib universes in the type signature are invisibly constrained by the RHS of the def.

This PR makes all these explicit in the type signature.

Likely we will change the Lean behaviour to disallow this in leanprover/lean4#4482 (i.e. this is the backport to master of the fixes required for that).

fixes

more fixes
Copy link

github-actions bot commented Jun 24, 2024

PR summary b30ac189df

Import changes

No significant changes to the import graph


Declarations diff

+ instance (C : Type u) [Category.{v} C] [LocallySmall.{w} C] (X Y : C) : Small.{w, v} (X ⟶ Y)
+ instance (F : C ⥤ D) [PreservesEffectiveEpiFamilies.{_, _, 0} F] :
+ instance (F : C ⥤ D) [ReflectsEffectiveEpiFamilies.{_, _, 0} F] :
+ instance : EssentiallySmall.{u} LightDiagram.{u}
+ instance : EssentiallySmall.{u} LightProfinite.{u}
+ instance : HasLimitsOfSize.{u, u + 1} (CondensedMod.{u} R)
+ instance : HasLimitsOfSize.{u, u + 1} CondensedSet.{u}
+ instance [(forget D).IsRightAdjoint] : (sheafForget (D := D) J).IsRightAdjoint
+ instance [HasColimits.{v, u} C] (X : TopCat.{w}) : HasColimitsOfSize.{v, v} (Presheaf C X)
+ instance [HasLimits C] (X : TopCat) : CreatesLimits.{v, v} (Sheaf.forget C X)
+ instance [HasLimits C] (X : TopCat.{v}) : HasLimits.{v} (Presheaf C X)
+ instance [HasLimits C] (X : TopCat.{v}) : HasLimitsOfSize.{v, v} (Sheaf.{v} C X)
+ instance [HasLimits C] : HasColimits.{v} (SheafedSpace C)
- instance (C : Type u) [Category.{v} C] [LocallySmall.{w} C] (X Y : C) : Small (X ⟶ Y)
- instance (F : C ⥤ D) [PreservesEffectiveEpiFamilies F] : PreservesFiniteEffectiveEpiFamilies F
- instance (F : C ⥤ D) [ReflectsEffectiveEpiFamilies F] : ReflectsFiniteEffectiveEpiFamilies F
- instance : EssentiallySmall LightDiagram.{u}
- instance : EssentiallySmall LightProfinite.{u}
- instance : HasLimitsOfSize.{u} (CondensedMod.{u} R) := hasLimitsOfSizeShrink.{u, u+1, u+1, u} _
- instance : HasLimitsOfSize.{u} CondensedSet.{u} := hasLimitsOfSizeShrink.{u, u+1, u+1, u} _
- instance [(forget D).IsRightAdjoint ] : (sheafForget J : Sheaf J D ⥤ _).IsRightAdjoint
- instance [HasColimits C] (X : TopCat) : HasColimitsOfSize.{v} (Presheaf C X)
- instance [HasLimits C] (X : TopCat) : CreatesLimits (Sheaf.forget C X)
- instance [HasLimits C] (X : TopCat) : HasLimits (Presheaf C X)
- instance [HasLimits C] (X : TopCat) : HasLimitsOfSize.{v} (Sheaf.{v} C X)
- instance [HasLimits C] : HasColimits (SheafedSpace C)

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

The other changes look good.

Just to make sure, by RHS you mean example : LHS := RHS, not example : LHS = RHS := ...? I would rather call that the "body" of the declaration.

@sgouezel sgouezel added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review labels Jun 25, 2024
@kim-em kim-em changed the title feat: if the RHS constrains universes, make it explicit in the signature. feat: if the body constrains universes, make it explicit in the signature. Jun 26, 2024
@kim-em kim-em added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jun 26, 2024
@sgouezel
Copy link
Contributor

bors r+
Thanks!

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jun 26, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jun 26, 2024
…ture. (#14069)

In many places in Mathlib universes in the type signature are invisibly constrained by the RHS of the `def`.

This PR makes all these explicit in the type signature.

Likely we will change the Lean behaviour to disallow this in leanprover/lean4#4482 (i.e. this is the backport to `master` of the fixes required for that).
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jun 26, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: if the body constrains universes, make it explicit in the signature. [Merged by Bors] - feat: if the body constrains universes, make it explicit in the signature. Jun 26, 2024
@mathlib-bors mathlib-bors bot closed this Jun 26, 2024
@mathlib-bors mathlib-bors bot deleted the universes_from_rhs branch June 26, 2024 06:40
kbuzzard pushed a commit that referenced this pull request Jun 26, 2024
…ture. (#14069)

In many places in Mathlib universes in the type signature are invisibly constrained by the RHS of the `def`.

This PR makes all these explicit in the type signature.

Likely we will change the Lean behaviour to disallow this in leanprover/lean4#4482 (i.e. this is the backport to `master` of the fixes required for that).
dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
…ture. (#14069)

In many places in Mathlib universes in the type signature are invisibly constrained by the RHS of the `def`.

This PR makes all these explicit in the type signature.

Likely we will change the Lean behaviour to disallow this in leanprover/lean4#4482 (i.e. this is the backport to `master` of the fixes required for that).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants