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

feat: all direct parents of classes create projections #5920

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kmill
Copy link
Collaborator

@kmill kmill commented Nov 1, 2024

Before, all class ancestors that were representable as subobject fields had their projections be instances. This (1) didn't include all direct parents and (2) might include indirect parents. Now, all direct parent classes are instances.

Features:

  • Only parents that are not ancestors of other parents get instances. This allows "discretionary" indirect parents to be inserted for the purpose of computing strict resolution orders when structure.strictResolutionOrder is enabled, without having an impact on typeclass synthesis.
  • Non-subobject projections are now theorems if the parent is a proposition.

Closes #2905

Before, all class ancestors that were representable as subobject fields had their projections be instances. This (1) didn't include all direct parents and (2) might include indirect parents. Now, all direct parent classes are instances.

Features:
- Only parents that are not ancestors of other parents get instances. This allows "discretionary" indirect parents to be inserted without having an impact on typeclass synthesis for the purpose of computing strict resolution orders when `structure.strictResolutionOrder` is enabled.
- Non-subobject projections are now theorems if the parent is a proposition.
- Parent projections are no longer added as instances for the `structure` command. Only the `class` command`.

Closes leanprover#2905
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Nov 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Nov 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 1, 2024
@leanprover-community-bot leanprover-community-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Nov 1, 2024
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-direct class parents should not be instances
2 participants