Skip to content

[Merged by Bors] - fix: error positioning in linear_combination - #16072

Closed
hrmacbeth wants to merge 2 commits into
masterfrom
HM-linear-combination-withRef
Closed

hrmacbeth wants to merge 2 commits into
masterfrom
HM-linear-combination-withRef

Conversation

@hrmacbeth

Copy link
Copy Markdown
Member

A tweak to linear_combination so that when the default normalization tactic fails, the "red underlines" appear on the linear_combination call itself, rather than just on the "by" at the start of the proof. For example, compare before/after on this example:

import Mathlib

example {a : ℤ} (h : a = 1) : a = 2 := by
  linear_combination h

Zulip discussion:
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Propagating.20errors.20through.20Unhygienic.2Erun


Open in Gitpod

@github-actions

github-actions Bot commented Aug 22, 2024 •

Copy link
Copy Markdown

PR summary d22b8261c5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.

@hrmacbeth hrmacbeth added easy < 20s of review time. See the lifecycle page for guidelines. t-meta Tactics, attributes or user commands labels Aug 22, 2024
Comment thread Mathlib/Tactic/LinearCombination.lean Resolved

@eric-wieser eric-wieser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors d+

We can cleanup the Unhygienic.run in a later PR after hearing from Mario on Zulip.

@mathlib-bors

mathlib-bors Bot commented Aug 22, 2024

Copy link
Copy Markdown
Contributor

✌️ hrmacbeth can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Aug 22, 2024
@hrmacbeth

Copy link
Copy Markdown
Member Author

bors r+

@github-actions github-actions Bot added the ready-to-merge This PR has been sent to bors. label Aug 22, 2024
mathlib-bors Bot pushed a commit that referenced this pull request Aug 22, 2024
A tweak to `linear_combination` so that when the default normalization tactic fails, the "red underlines" appear on the `linear_combination` call itself, rather than just on the "by" at the start of the proof.  For example, compare before/after on this example:
```lean
import Mathlib

example {a : ℤ} (h : a = 1) : a = 2 := by
  linear_combination h
```

Zulip discussion:
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Propagating.20errors.20through.20Unhygienic.2Erun
@mathlib-bors

mathlib-bors Bot commented Aug 22, 2024

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title fix: error positioning in linear_combination [Merged by Bors] - fix: error positioning in linear_combination Aug 22, 2024
@mathlib-bors mathlib-bors Bot closed this Aug 22, 2024
@mathlib-bors
mathlib-bors Bot deleted the HM-linear-combination-withRef branch August 22, 2024 23:47
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
A tweak to `linear_combination` so that when the default normalization tactic fails, the "red underlines" appear on the `linear_combination` call itself, rather than just on the "by" at the start of the proof.  For example, compare before/after on this example:
```lean
import Mathlib

example {a : ℤ} (h : a = 1) : a = 2 := by
  linear_combination h
```

Zulip discussion:
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Propagating.20errors.20through.20Unhygienic.2Erun
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
A tweak to `linear_combination` so that when the default normalization tactic fails, the "red underlines" appear on the `linear_combination` call itself, rather than just on the "by" at the start of the proof.  For example, compare before/after on this example:
```lean
import Mathlib

example {a : ℤ} (h : a = 1) : a = 2 := by
  linear_combination h
```

Zulip discussion:
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Propagating.20errors.20through.20Unhygienic.2Erun
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 12, 2024
A tweak to `linear_combination` so that when the default normalization tactic fails, the "red underlines" appear on the `linear_combination` call itself, rather than just on the "by" at the start of the proof.  For example, compare before/after on this example:
```lean
import Mathlib

example {a : ℤ} (h : a = 1) : a = 2 := by
  linear_combination h
```

Zulip discussion:
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Propagating.20errors.20through.20Unhygienic.2Erun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). easy < 20s of review time. See the lifecycle page for guidelines. ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants