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: DiscrTree: index the domain of #5686

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nomeata
Copy link
Contributor

@nomeata nomeata commented Oct 13, 2024

this is an experiment.

It bothered me that infering instances of the shape Decidable (∀ (x : Fin _), _)
will go lineary through all instances of that shape, even those that are
about Fin Nat. And that Decidable (∃ (x : Fin _), _) gets better
indexing than Decidable (∀ (x : Fin _), _).

Judging from code commments, the discr tree used to index arrow types
with two arguments (domain and body), and that led to bugs due to the
dependency, so the arguments were removed. But it seems that indexing
the domain is completely simple and innocent.

So let’s see what happens.

This is just a small baby step compared to the more invasive improvements
done in the RefinedDiscrTree by J. W. Gerbscheid in mathlib.

TODO: Update the comment around .arrow.

this is an experiment.

It bothered me that infering instances of the shape `Decidable (∀ (x : Fin _), _)`
will go lineary through all instances of that shape, even those that are
about `Fin Nat`. And that  `Decidable (∃ (x : Fin _), _)` gets better
indexing than `Decidable (∀ (x : Fin _), _)`.

Judging from code commments, the discr tree used to index arrow types
with two arguments (domain and body), and that led to bugs due to the
dependency, so the arguments were removed. But it seems that indexing
the domain is completely simple and innocent.

So let’s see what happens.
@github-actions github-actions bot added the changes-stage0 Contains stage0 changes, merge manually using rebase label Oct 13, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc October 13, 2024 10:30 Inactive
@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 Oct 13, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Oct 13, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 13, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Oct 13, 2024

Mathlib CI status (docs):

@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 Oct 13, 2024
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 changes-stage0 Contains stage0 changes, merge manually using rebase 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.

2 participants