Skip to content

[Merged by Bors] - fix: use rfl instead of namedPattern rfl rfl rfl#2276

Closed
dwrensha wants to merge 1 commit intomasterfrom
fin-named-pattern
Closed

[Merged by Bors] - fix: use rfl instead of namedPattern rfl rfl rfl#2276
dwrensha wants to merge 1 commit intomasterfrom
fin-named-pattern

Conversation

@dwrensha
Copy link
Copy Markdown
Member

library_search currently has a bug where it sometimes unnecessarily wraps its output in namedPattern.

This PR removes a usage of namedPattern that got introduced in #1895, presumably due to the library_search bug.

@dwrensha
Copy link
Copy Markdown
Member Author

cc @arienmalec

@dwrensha
Copy link
Copy Markdown
Member Author

#2302 has a fix for the library_search bug.

bors bot pushed a commit that referenced this pull request Feb 15, 2023
…2302)

Fixes a bug introduced in #856.
If `solveByElim` succeeds, then we should return early. Otherwise, we look through all lemmas in the environment and find something like `namedPattern` or `Eq.mp` and unnecessarily wrap the result in that.

See #2276 for an example bad output caused by this bug.

Another example is this test: https://github.com/leanprover-community/mathlib4/blob/4ed65899eca4909e9b8f23a113b52ff8cb3f5d41/test/librarySearch.lean#L15
On master, it emits `exact namedPattern p p rfl`, and after this PR it correctly emits `exact p`.
@gebner
Copy link
Copy Markdown
Member

gebner commented Feb 15, 2023

bors r+

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Feb 15, 2023
bors bot pushed a commit that referenced this pull request Feb 15, 2023
`library_search` currently has a bug where it sometimes unnecessarily wraps its output in `namedPattern`.

This PR removes a usage of `namedPattern` that got introduced in #1895, presumably due to the `library_search` bug.
@bors
Copy link
Copy Markdown

bors bot commented Feb 15, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix: use rfl instead of namedPattern rfl rfl rfl [Merged by Bors] - fix: use rfl instead of namedPattern rfl rfl rfl Feb 15, 2023
@bors bors bot closed this Feb 15, 2023
@bors bors bot deleted the fin-named-pattern branch February 15, 2023 17:59
mo271 pushed a commit that referenced this pull request Feb 18, 2023
…2302)

Fixes a bug introduced in #856.
If `solveByElim` succeeds, then we should return early. Otherwise, we look through all lemmas in the environment and find something like `namedPattern` or `Eq.mp` and unnecessarily wrap the result in that.

See #2276 for an example bad output caused by this bug.

Another example is this test: https://github.com/leanprover-community/mathlib4/blob/4ed65899eca4909e9b8f23a113b52ff8cb3f5d41/test/librarySearch.lean#L15
On master, it emits `exact namedPattern p p rfl`, and after this PR it correctly emits `exact p`.
mo271 pushed a commit that referenced this pull request Feb 18, 2023
`library_search` currently has a bug where it sometimes unnecessarily wraps its output in `namedPattern`.

This PR removes a usage of `namedPattern` that got introduced in #1895, presumably due to the `library_search` bug.
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.

2 participants