Skip to content

fix: synthesize tc instances before propagating expected type#1893

Merged
leodemoura merged 2 commits intoleanprover:masterfrom
gebner:fix1892
Nov 29, 2022
Merged

fix: synthesize tc instances before propagating expected type#1893
leodemoura merged 2 commits intoleanprover:masterfrom
gebner:fix1892

Conversation

@gebner
Copy link
Copy Markdown
Member

@gebner gebner commented Nov 29, 2022

Fixes #1892.

The error in #1892 is caused by propagating the expected type before the instance for LE (OrderDual α) has been synthesized. Before TC synthesis, the unifier can still assign the metavariable for the instance.

This PR changes the application elaborator to try TC synthesis before propagating the expected type (we already do it before applying function coercions).

@leodemoura leodemoura merged commit 6e23ced into leanprover:master Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lean doesn't try unfolding when it could

2 participants