Skip to content

feat(Algebra/Tropical/Basic): split Tropical into MinTropical/MaxTropical#42076

Draft
JovanGerb wants to merge 1 commit into
leanprover-community:masterfrom
JovanGerb:Jovan-to_dual-Tropical
Draft

feat(Algebra/Tropical/Basic): split Tropical into MinTropical/MaxTropical#42076
JovanGerb wants to merge 1 commit into
leanprover-community:masterfrom
JovanGerb:Jovan-to_dual-Tropical

Conversation

@JovanGerb

@JovanGerb JovanGerb commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

This PR renames Tropical to MinTropical, and uses to_dual to generate MaxTropical from it.

Note: for further tagging, #37751 should be merged first.


Open in Gitpod

@JovanGerb
JovanGerb marked this pull request as draft July 25, 2026 01:12
@mathlib-bors

mathlib-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

This pull request is now in draft mode. No active bors state needed cleanup.

While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like bors r+ or bors try.

@github-actions

Copy link
Copy Markdown

PR summary a3c9ef0b98

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ MinTropical
+ instance : Add (MinTropical R)
+ instance : CommSemiring (MinTropical R)
+ instance : LinearOrder (MinTropical R)
+ instance [Add R] : Mul (MinTropical R)
+ instance [AddCommGroup R] : CommGroup (MinTropical R)
+ instance [AddCommMonoid R] : CommMonoid (MinTropical R)
+ instance [AddGroup R] : Group (MinTropical R)
+ instance [AddMonoid R] : Monoid (MinTropical R)
+ instance [AddZeroClass R] : MulOneClass (MinTropical R)
+ instance [ConditionallyCompleteLinearOrder R] : ConditionallyCompleteLinearOrder (MinTropical R)
+ instance [DecidableEq R] : DecidableEq (MinTropical R) := fun _ _ =>
+ instance [InfSet R] : InfSet (MinTropical R) where sInf s := trop (sInf (untrop '' s))
+ instance [Inhabited R] : Inhabited (MinTropical R)
+ instance [LE R] [Add R] [AddLeftMono R] : MulLeftMono (MinTropical R)
+ instance [LE R] [DecidableLE R] : DecidableLE (MinTropical R)
+ instance [LE R] [OrderTop R] : OrderTop (MinTropical R)
+ instance [LT R] : LT (MinTropical R) where lt x y := untrop x < untrop y
+ instance [LT R] [DecidableLT R] : DecidableLT (MinTropical R)
+ instance [LinearOrder R] [OrderTop R] [Zero R] : AddMonoidWithOne (MinTropical R)
+ instance [Neg R] : Inv (MinTropical R)
+ instance [OrderTop R] : AddCommMonoid (MinTropical R)
+ instance [PartialOrder R] : PartialOrder (MinTropical R)
+ instance [Preorder R] : Preorder (MinTropical R)
+ instance [Sub R] : Div (MinTropical R)
+ instance [SupSet R] : SupSet (MinTropical R) where sSup s := trop (sSup (untrop '' s))
+ instance [Top R] : Top (MinTropical R)
+ instance [Top R] : Zero (MinTropical R)
+ instance [Zero R] : Nontrivial (MinTropical (WithTop R))
+ instance _root_.MaxTropical.instLinearOrder : LinearOrder (MaxTropical R)
+ instance {α : Type*} [SMul α R] : Pow (MinTropical R) α where pow x n := trop <| n • untrop x
- decidableLE
- decidableLT
- instAddCommMonoidTropical
- instAddMonoidWithOneTropical
- instCommMonoidTropical
- instGroupTropical
- instLTTropical
- instLinearOrderTropical
- instMonoidTropical
- instMulOneClassTropical
- instPartialOrderTropical
- instPreorderTropical
- instTopTropical
- instZeroTropical
- instance : Add (Tropical R)
- instance : CommSemiring (Tropical R)
- instance [Add R] : Mul (Tropical R)
- instance [AddCommGroup R] : CommGroup (Tropical R)
- instance [ConditionallyCompleteLinearOrder R] : ConditionallyCompleteLinearOrder (Tropical R)
- instance [DecidableEq R] : DecidableEq (Tropical R) := fun _ _ =>
- instance [InfSet R] : InfSet (Tropical R) where sInf s := trop (sInf (untrop '' s))
- instance [Inhabited R] : Inhabited (Tropical R)
- instance [LE R] [OrderTop R] : OrderTop (Tropical R)
- instance [Neg R] : Inv (Tropical R)
- instance [Sub R] : Div (Tropical R)
- instance [SupSet R] : SupSet (Tropical R) where sSup s := trop (sSup (untrop '' s))
- instance [Zero R] : Nontrivial (Tropical (WithTop R))
- instance {α : Type*} [SMul α R] : Pow (Tropical R) α where pow x n := trop <| n • untrop x
- mulLeftMono

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 -- pending)

Computed after the build finishes.


No changes to strong technical debt.

No changes to weak technical debt.

Current commit a3c9ef0b98
Reference commit c07d30b9c8

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 t-algebra Algebra (groups, rings, fields, etc) label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant