Skip to content

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

Closed
dwrensha wants to merge 1 commit into
masterfrom
fin-named-pattern
Closed

dwrensha wants to merge 1 commit into
masterfrom
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

gebner commented Feb 15, 2023

Copy link
Copy Markdown
Member

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

bors Bot commented Feb 15, 2023

Copy link
Copy Markdown

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