Skip to content

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

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

[Merged by Bors] - fix: error positioning in linear_combination#16072
hrmacbeth wants to merge 2 commits intomasterfrom
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
Copy link
Copy Markdown

github-actions bot commented Aug 22, 2024

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
Copy link
Copy Markdown
Member

@eric-wieser eric-wieser left a comment

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
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 22, 2024

✌️ 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
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 22, 2024

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