Skip to content

chore: use a type synonym instead of an abbrev for Interval#37508

Open
sgouezel wants to merge 3 commits intoleanprover-community:masterfrom
sgouezel:SG_lintInterval
Open

chore: use a type synonym instead of an abbrev for Interval#37508
sgouezel wants to merge 3 commits intoleanprover-community:masterfrom
sgouezel:SG_lintInterval

Conversation

@sgouezel
Copy link
Copy Markdown
Contributor

@sgouezel sgouezel commented Apr 1, 2026

Otherwise, there are conflicting instances between Interval and its definition WithBot ..., creating diamonds.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

PR summary 865d150803

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ coe
+ coe_le_coe
+ inf_coe
+ instance : One (Interval α)
+ length_bot
- instance : Inhabited (Interval α) := WithBot.inhabited
- instance : LE (Interval α) := WithBot.instLE
- instance : OrderBot (Interval α) := WithBot.instOrderBot
-+-+ divisionCommMonoid

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

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

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


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh 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).

@github-actions github-actions bot added the t-order Order theory label Apr 1, 2026
Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

Otherwise this looks good to me.

bors d+

rfl

theorem coe_inj : (s : Interval α) = t ↔ s = t := WithBot.coe_inj

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.

Doesn't this already appear on Line 314? Note that this is in the root namespace which is why it didn't conflict with the pre-existing one.

Comment on lines +471 to +473
@[simp, norm_cast]
lemma coe_le_coe {s t : NonemptyInterval α} : (s : Interval α) ≤ t ↔ s ≤ t :=
WithBot.coe_le_coe
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.

This assumes Lattice α, which seems too strong. I think you should move it up into the Preorder section.

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Apr 1, 2026

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

@mathlib-triage mathlib-triage bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Apr 1, 2026
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). t-order Order theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants