Skip to content

feat: IsBotOneClass and IsBotZeroClass#38663

Open
vihdzp wants to merge 38 commits intoleanprover-community:masterfrom
vihdzp:bot_zero
Open

feat: IsBotOneClass and IsBotZeroClass#38663
vihdzp wants to merge 38 commits intoleanprover-community:masterfrom
vihdzp:bot_zero

Conversation

@vihdzp
Copy link
Copy Markdown
Collaborator

@vihdzp vihdzp commented Apr 28, 2026

We create typeclasses expressing that 0 or 1 is a bottom element in a type. We use this to unify and generalize various theorems which are currently stated for canonically ordered monoids.

See Zulip.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

PR summary b9cac30121

Import changes exceeding 2%

% File
+2.56% Mathlib.Algebra.Order.Monoid.Canonical.Defs
+4.44% Mathlib.Algebra.Order.Monoid.Unbundled.Basic
+4.15% Mathlib.Order.Interval.Set.Basic

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.Order.Monoid.Unbundled.Basic 180 188 +8 (+4.44%)
Mathlib.Order.Interval.Set.Basic 193 201 +8 (+4.15%)
Mathlib.Algebra.Order.Monoid.Canonical.Defs 195 200 +5 (+2.56%)
Mathlib.Algebra.Order.Sub.Basic 221 225 +4 (+1.81%)
Mathlib.Algebra.Order.BigOperators.Group.List 343 347 +4 (+1.17%)
Mathlib.Algebra.Order.Group.Indicator 305 307 +2 (+0.66%)
Mathlib.Algebra.Order.Kleene 411 413 +2 (+0.49%)
Mathlib.Dynamics.PeriodicPts.Defs 519 521 +2 (+0.39%)
Mathlib.Algebra.Order.BigOperators.Group.Finset 542 544 +2 (+0.37%)
Mathlib.Order.SuccPred.LinearLocallyFinite 561 563 +2 (+0.36%)
Mathlib.Combinatorics.Enumerative.Composition 671 673 +2 (+0.30%)
Import changes for all files
Files Import difference
../mathlib-ci/scripts/pr_summary/import_trans_difference.sh all
There are 6740 files with changed transitive imports taking up over 303649 characters: this is too many to display!
You can run this locally from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci


Declarations diff

+ IsBotOneClass
+ IsBotZeroClass
+ LT.lt.ne_one
+ instance (priority := 10) of_gt' [Preorder α] [IsBotZeroClass α] [One α]
+ instance (priority := 100) [LE α] [Zero α] [One α] [IsBotZeroClass α] : ZeroLEOneClass α
+ instance : IsBotOneClass α
+ instance : IsBotZeroClass (WithZero α)
+ ne_one_of_lt
- LT.lt.pos
- Ne.pos
- instance (priority := 10) of_gt' {M : Type*} [AddZeroClass M] [Preorder M] [CanonicallyOrderedAdd M]
- instance (priority := 100) LinearOrderedCommMonoidWithZero.toZeroLeOneClass : ZeroLEOneClass α
- ne_zero_of_lt

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.


No changes to technical debt.

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.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 large-import Automatically added label for PRs with a significant increase in transitive imports label Apr 28, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Apr 28, 2026
@mathlib-dependent-issues
Copy link
Copy Markdown

This PR/issue depends on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) large-import Automatically added label for PRs with a significant increase in transitive imports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant