Skip to content

[Merged by Bors] - chore(Data/Ineq): remove duplicate instance - #44383

Closed
grunweg wants to merge 1 commit into
leanprover-community:masterfrom
grunweg:format-duplicate
Closed

grunweg wants to merge 1 commit into
leanprover-community:masterfrom
grunweg:format-duplicate

Conversation

@grunweg

@grunweg grunweg commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

There is already a ToFormat instance from ToString, which this instance is identical to. However, the instances are not defeq at implicit transparency, causing an instance diamond. Found by the linter in #38781.

Co-authored-by: Jovan Gerbscheid [email protected]


@grunweg grunweg added easy < 20s of review time. See the lifecycle page for guidelines. t-meta Tactics, attributes or user commands labels Oct 1, 2026
@github-actions github-actions Bot added large-import Automatically added label for PRs with a significant increase in transitive imports t-data Data (lists, quotients, numbers, etc) labels Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

PR summary 6a72407505

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

- instance : ToFormat Ineq := ⟨fun i => Ineq.toString i⟩

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit 6a72407).

  • +0 new declarations
  • −1 removed declarations
-Mathlib.Ineq.instToFormat

No changes to strong technical debt.
No changes to weak technical debt.

Current commit 6a72407505
Reference commit 1f2e1a8c80

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

There is already a ToFormat instance from ToString, which this instance is identical to.
However, the instances are not defeq at implicit transparency, causing an instance diamond.
Found by the linter in leanprover-community#38781.
@github-actions github-actions Bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Oct 1, 2026
@grunweg grunweg added the tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip label Oct 1, 2026

@Vierkantor Vierkantor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

bors r+

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Oct 6, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Oct 6, 2026
There is already a ToFormat instance from ToString, which this instance is identical to. However, the instances are not defeq at implicit transparency, causing an instance diamond. Found by the linter in #38781.

Co-authored-by: Jovan Gerbscheid <[email protected]>
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Oct 6, 2026
@mathlib-bors

mathlib-bors Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title chore(Data/Ineq): remove duplicate instance [Merged by Bors] - chore(Data/Ineq): remove duplicate instance Oct 6, 2026
@mathlib-bors mathlib-bors Bot closed this Oct 6, 2026
@grunweg
grunweg deleted the format-duplicate branch October 6, 2026 11:24
kim-em added a commit that referenced this pull request Oct 12, 2026
Most conflicts come from master's regrouping of public and private imports
(#44512, #44513): resolved by taking master's import layout and reapplying
this PR's meta/removal changes line by line.

- Mathlib/Init.lean: keep master's new `Batteries.Tactic.Alias` import and
  `Linter.DeclType` (which bundles the instance linters, #44436), the latter
  as a `public meta import`.
- Mathlib/Data/Ineq.lean: drop the duplicate `ToFormat` instance as master
  did (#44383); the parsing functions stay moved to `Mathlib.Tactic.Ineq`.
- Control/Monad/{Basic,Cont}, Lean/Expr/Basic, FieldSimp,
  Linarith/Lemmas, LinearCombination/Lemmas: re-add this PR's new imports
  (`Batteries.Data.Except`, `Lean.ProjFns`, `Lean.Structure`,
  `Mathlib.Tactic.Ineq`) in master's public import group.
- Mathlib/Tactic/Push.lean: drop the `public import Lean.Elab.ConfigEval`
  that git's auto-merge reintroduced.
- Mathlib/Tactic/Echelon/Core.lean: master added `public import Qq` to this
  `public meta section` file; make it `public meta import Qq`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. easy < 20s of review time. See the lifecycle page for guidelines. ready-to-merge This PR has been sent to bors. t-data Data (lists, quotients, numbers, etc) t-meta Tactics, attributes or user commands tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants