Tropical algebraic structures #
This file defines algebraic structures of the min/max-tropical numbers, up to the tropical semiring.
All declarations about MinTropical are translated to MaxTropical using to_dual.
Some basic lemmas about conversion from the base type R to MinTropical R/MaxTropical R are
provided, as well as the expected implementations of tropical addition and tropical multiplication.
Main declarations #
MinTropical R: The type synonym of the tropical interpretation ofR. If[LinearOrder R], then addition onRis viamin.Semiring (MinTropical R): ALinearOrderedAddCommMonoidWithTop Rinduces aSemiring (MinTropical R). If one solely has[LinearOrderedAddCommMonoid R], then the "tropicalization ofR" would beMinTropical (WithTop R).
Implementation notes #
Inspiration was drawn from the implementation of Additive/Multiplicative/Opposite,
where a type synonym is created with some barebones API, and quickly made irreducible.
Algebraic structures are provided with as few typeclass assumptions as possible, even though
most references rely on Semiring (MinTropical R) for building up the whole theory.
References followed #
- https://arxiv.org/pdf/math/0408099.pdf
- https://www.mathenjeans.fr/sites/default/files/sujets/tropical_geometry_-_casagrande.pdf
Reinterpret x : R as an element of MinTropical R.
See MinTropical.tropEquiv for the equivalence.
Equations
Instances For
Reinterpret x : R as an element of MaxTropical R.
See MaxTropical.tropEquiv for the equivalence.
Equations
Instances For
Reinterpret x : MinTropical R as an element of R.
See MinTropical.tropEquiv for the equivalence.
Equations
Instances For
Reinterpret x : MaxTropical R as an element of R.
See MaxTropical.tropEquiv for the equivalence.
Equations
Instances For
Reinterpret x : R as an element of MinTropical R.
See MinTropical.tropOrderIso for the order-preserving equivalence.
Equations
- MinTropical.tropEquiv = { toFun := MinTropical.trop, invFun := MinTropical.untrop, left_inv := ⋯, right_inv := ⋯ }
Instances For
Reinterpret x : R as an element of MaxTropical R.
See MaxTropical.tropOrderIso for the order-preserving equivalence.
Equations
- MaxTropical.tropEquiv = { toFun := MaxTropical.trop, invFun := MaxTropical.untrop, left_inv := ⋯, right_inv := ⋯ }
Instances For
Equations
- MinTropical.instInhabited = { default := MinTropical.trop default }
Equations
- MaxTropical.instInhabited = { default := MaxTropical.trop default }
Recursing on an x' : MinTropical R is the same as recursing on an x : R reinterpreted
as a term of MinTropical R via trop x.
Equations
- MinTropical.tropRec h X = h (MinTropical.untrop X)
Instances For
Recursing on an x' : MaxTropical R is the same as recursing on an x : R reinterpreted
as a term of MaxTropical R via trop x.
Equations
- MaxTropical.tropRec h X = h (MaxTropical.untrop X)
Instances For
Equations
- x✝¹.instDecidableEq x✝ = decidable_of_iff (MinTropical.untrop x✝¹ = MinTropical.untrop x✝) ⋯
Equations
- x✝¹.instDecidableEq x✝ = decidable_of_iff (MaxTropical.untrop x✝¹ = MaxTropical.untrop x✝) ⋯
Equations
- MinTropical.instLE = { le := fun (x y : MinTropical R) => MinTropical.untrop x ≤ MinTropical.untrop y }
Equations
- MaxTropical.instLE = { le := fun (y x : MaxTropical R) => MaxTropical.untrop y ≤ MaxTropical.untrop x }
Equations
- MinTropical.instLT = { lt := fun (x y : MinTropical R) => MinTropical.untrop x < MinTropical.untrop y }
Equations
- MaxTropical.instLT = { lt := fun (y x : MaxTropical R) => MaxTropical.untrop y < MaxTropical.untrop x }
Equations
- MinTropical.instPreorder = { toLE := MinTropical.instLE, toLT := MinTropical.instLT, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯ }
Equations
- MaxTropical.instPreorder = { toLE := MaxTropical.instLE, toLT := MaxTropical.instLT, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯ }
Reinterpret x : R as an element of MinTropical R, preserving the order.
Equations
- MinTropical.tropOrderIso = { toEquiv := MinTropical.tropEquiv, map_rel_iff' := ⋯ }
Instances For
Reinterpret x : R as an element of MaxTropical R, preserving the order.
Equations
- MaxTropical.tropOrderIso = { toEquiv := (let __src := MaxTropical.tropEquiv; { toEquiv := __src, map_rel_iff' := ⋯ }).toEquiv, map_rel_iff' := ⋯ }
Instances For
Equations
- MinTropical.instPartialOrder = { toPreorder := MinTropical.instPreorder, le_antisymm := ⋯ }
Equations
- MaxTropical.instPartialOrder = { toPreorder := MaxTropical.instPreorder, le_antisymm := ⋯ }
Equations
- MinTropical.instZeroOfTop = { zero := MinTropical.trop ⊤ }
Equations
- MaxTropical.instZeroOfBot = { zero := MaxTropical.trop ⊥ }
Equations
- MinTropical.instTop = { top := 0 }
Equations
- MaxTropical.instBot = { bot := 0 }
Equations
- MinTropical.instOrderTop = { toTop := MinTropical.instTop, le_top := ⋯ }
Equations
- MaxTropical.instOrderBot = { toBot := MaxTropical.instBot, bot_le := ⋯ }
Tropical addition is the minimum of two underlying elements of R.
Equations
- MinTropical.instAdd = { add := fun (x y : MinTropical R) => MinTropical.trop (min (MinTropical.untrop x) (MinTropical.untrop y)) }
Tropical addition is the maximum of two underlying elements of R.
Equations
- MaxTropical.instAdd = { add := fun (x y : MaxTropical R) => MaxTropical.trop (max (MaxTropical.untrop x) (MaxTropical.untrop y)) }
Equations
- MinTropical.instAddCommSemigroup = { toAdd := MinTropical.instAdd, add_assoc := ⋯, add_comm := ⋯ }
Equations
- MaxTropical.instAddCommSemigroup = { toAdd := MaxTropical.instAdd, add_assoc := ⋯, add_comm := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Tropical multiplication is the addition in the underlying R.
Equations
- MinTropical.instMulOfAdd = { mul := fun (x y : MinTropical R) => MinTropical.trop (MinTropical.untrop x + MinTropical.untrop y) }
Tropical multiplication is the addition in the underlying R.
Equations
- MaxTropical.instMulOfAdd = { mul := fun (x y : MaxTropical R) => MaxTropical.trop (MaxTropical.untrop x + MaxTropical.untrop y) }
The ring structure on MinTropical R is the same as on MaxTropical Rᵒᵈ.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ring structure on MaxTropical R is the same as on MinTropical Rᵒᵈ.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- MinTropical.instOneOfZero = { one := MinTropical.trop 0 }
Equations
- MaxTropical.instOneOfZero = { one := MaxTropical.trop 0 }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- MinTropical.instInvOfNeg = { inv := fun (x : MinTropical R) => MinTropical.trop (-MinTropical.untrop x) }
Equations
- MaxTropical.instInvOfNeg = { inv := fun (x : MaxTropical R) => MaxTropical.trop (-MaxTropical.untrop x) }
Equations
- MinTropical.instDivOfSub = { div := fun (x y : MinTropical R) => MinTropical.trop (MinTropical.untrop x - MinTropical.untrop y) }
Equations
- MaxTropical.instDivOfSub = { div := fun (x y : MaxTropical R) => MaxTropical.trop (MaxTropical.untrop x - MaxTropical.untrop y) }
Equations
- MinTropical.instSemigroupOfAddSemigroup = { toMul := MinTropical.instMulOfAdd, mul_assoc := ⋯ }
Equations
- MaxTropical.instSemigroupOfAddSemigroup = { toMul := MaxTropical.instMulOfAdd, mul_assoc := ⋯ }
Equations
- MinTropical.instCommSemigroupOfAddCommSemigroup = { toSemigroup := MinTropical.instSemigroupOfAddSemigroup, mul_comm := ⋯ }
Equations
- MaxTropical.instCommSemigroupOfAddCommSemigroup = { toSemigroup := MaxTropical.instSemigroupOfAddSemigroup, mul_comm := ⋯ }
Equations
- MinTropical.instPowOfSMul = { pow := fun (x : MinTropical R) (n : α) => MinTropical.trop (n • MinTropical.untrop x) }
Equations
- MaxTropical.instPowOfSMul = { pow := fun (x : MaxTropical R) (n : α) => MaxTropical.trop (n • MaxTropical.untrop x) }
Equations
- MinTropical.instMulOneClassOfAddZeroClass = { toOne := MinTropical.instOneOfZero, toMul := MinTropical.instMulOfAdd, one_mul := ⋯, mul_one := ⋯ }
Equations
- MaxTropical.instMulOneClassOfAddZeroClass = { toOne := MaxTropical.instOneOfZero, toMul := MaxTropical.instMulOfAdd, one_mul := ⋯, mul_one := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- MinTropical.instCommMonoidOfAddCommMonoid = { toMonoid := MinTropical.instMonoidOfAddMonoid, mul_comm := ⋯ }
Equations
- MaxTropical.instCommMonoidOfAddCommMonoid = { toMonoid := MaxTropical.instMonoidOfAddMonoid, mul_comm := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- MinTropical.instCommGroupOfAddCommGroup = { toGroup := MinTropical.instGroupOfAddGroup, mul_comm := ⋯ }
Equations
- MaxTropical.instCommGroupOfAddCommGroup = { toGroup := MaxTropical.instGroupOfAddGroup, mul_comm := ⋯ }
Equations
- MinTropical.instDistribOfAddLeftMonoOfAddRightMono = { toMul := MinTropical.instMulOfAdd, toAdd := MinTropical.instAdd, left_distrib := ⋯, right_distrib := ⋯ }
Equations
- MaxTropical.instDistribOfAddLeftMonoOfAddRightMono = { toMul := MaxTropical.instMulOfAdd, toAdd := MaxTropical.instAdd, left_distrib := ⋯, right_distrib := ⋯ }
Equations
- One or more equations did not get rendered due to their size.