Skip to content

[Merged by Bors] - refactor: define < on WithBot/WithTop as an inductive predicate#30848

Closed
YaelDillies wants to merge 1 commit intoleanprover-community:masterfrom
YaelDillies:with_bot_inductive_lt
Closed

[Merged by Bors] - refactor: define < on WithBot/WithTop as an inductive predicate#30848
YaelDillies wants to merge 1 commit intoleanprover-community:masterfrom
YaelDillies:with_bot_inductive_lt

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

Follow up to #19668, where I did the same for LE but forgot to do it for LT.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 24, 2025

PR summary 6c19380648

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ LT
+ instance (priority := 10) instLT : LT (WithBot α) where lt := WithBot.LT
+ instance (priority := 10) instLT : LT (WithTop α) where lt a b := WithBot.LT (α := αᵒᵈ) b a
+++ lt_iff_exists
+++--- lt_def
+--+ lt_coe_iff
- instance (priority := 10) instLT : LT (WithBot α)
- instance (priority := 10) instLT : LT (WithTop α)

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.


No changes to technical debt.

You can run this locally as

./scripts/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).

@grunweg grunweg added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Oct 24, 2025
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Oct 24, 2025
Equivalently, `x ≤ y` can be defined as `∀ a : α, x = ↑a → ∃ b : α, y = ↑b ∧ a ≤ b`,
see `le_if_forall`. The definition as an inductive predicate is preferred since it
cannot be accidentally unfolded too far. -/
/-- Auxiliary definition for the order on `WithBot`. -/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If this is auxiliary, why not just private it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

because that messes up with mk_iff unfortunately

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.

But surely there is the advantage of allowing people to use the cases tactic on this inductive? Is it really an implementation detail?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, not really. You're right, I forgot to mention that. I think it's good for it not to be private

Follow up to leanprover-community#19668, where I did the same for `LE` but forgot to do it for `LT`.
Copy link
Copy Markdown
Contributor

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

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

Thanks!

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Nov 3, 2025
mathlib-bors bot pushed a commit that referenced this pull request Nov 3, 2025
…#30848)

Follow up to #19668, where I did the same for `LE` but forgot to do it for `LT`.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 3, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor: define < on WithBot/WithTop as an inductive predicate [Merged by Bors] - refactor: define < on WithBot/WithTop as an inductive predicate Nov 3, 2025
@mathlib-bors mathlib-bors bot closed this Nov 3, 2025
@YaelDillies YaelDillies deleted the with_bot_inductive_lt branch November 3, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-order Order theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants