Documentation

Mathlib.Algebra.Tropical.BigOperators

Tropicalization of finitary operations #

This file provides the "big-op" or notation-based finitary operations on tropicalized types. This allows easy conversion between sums to Infs and prods to sums. Results here are important for expressing that evaluation of tropical polynomials are the minimum over a finite piecewise collection of linear functions.

Main declarations #

Implementation notes #

No concrete (semi)ring is used here, only ones with inferrable order/lattice structure, to support Real, Rat, EReal, and others (ERat is not yet defined).

Minima over List α are defined as producing a value in WithTop α so proofs about lists do not directly transfer to minima over multisets or finsets.

theorem List.trop_sum {R : Type u_1} [AddMonoid R] (l : List R) :
Tropical.trop l.sum = (List.map Tropical.trop l).prod
theorem Multiset.trop_sum {R : Type u_1} [AddCommMonoid R] (s : Multiset R) :
Tropical.trop s.sum = (Multiset.map Tropical.trop s).prod
theorem trop_sum {R : Type u_1} {S : Type u_2} [AddCommMonoid R] (s : Finset S) (f : SR) :
Tropical.trop (∑ is, f i) = is, Tropical.trop (f i)
theorem List.untrop_prod {R : Type u_1} [AddMonoid R] (l : List (Tropical R)) :
Tropical.untrop l.prod = (List.map Tropical.untrop l).sum
theorem Multiset.untrop_prod {R : Type u_1} [AddCommMonoid R] (s : Multiset (Tropical R)) :
Tropical.untrop s.prod = (Multiset.map Tropical.untrop s).sum
theorem untrop_prod {R : Type u_1} {S : Type u_2} [AddCommMonoid R] (s : Finset S) (f : STropical R) :
Tropical.untrop (∏ is, f i) = is, Tropical.untrop (f i)
theorem List.trop_minimum {R : Type u_1} [LinearOrder R] (l : List R) :
Tropical.trop l.minimum = (List.map (Tropical.trop WithTop.some) l).sum
theorem Multiset.trop_inf {R : Type u_1} [LinearOrder R] [OrderTop R] (s : Multiset R) :
Tropical.trop s.inf = (Multiset.map Tropical.trop s).sum
theorem Finset.trop_inf {R : Type u_1} {S : Type u_2} [LinearOrder R] [OrderTop R] (s : Finset S) (f : SR) :
Tropical.trop (s.inf f) = is, Tropical.trop (f i)
theorem trop_sInf_image {R : Type u_1} {S : Type u_2} [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : SWithTop R) :
Tropical.trop (sInf (f '' s)) = is, Tropical.trop (f i)
theorem trop_iInf {R : Type u_1} {S : Type u_2} [ConditionallyCompleteLinearOrder R] [Fintype S] (f : SWithTop R) :
Tropical.trop (⨅ (i : S), f i) = i : S, Tropical.trop (f i)
theorem Multiset.untrop_sum {R : Type u_1} [LinearOrder R] [OrderTop R] (s : Multiset (Tropical R)) :
Tropical.untrop s.sum = (Multiset.map Tropical.untrop s).inf
theorem Finset.untrop_sum' {R : Type u_1} {S : Type u_2} [LinearOrder R] [OrderTop R] (s : Finset S) (f : STropical R) :
Tropical.untrop (∑ is, f i) = s.inf (Tropical.untrop f)
theorem untrop_sum_eq_sInf_image {R : Type u_1} {S : Type u_2} [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : STropical (WithTop R)) :
Tropical.untrop (∑ is, f i) = sInf (Tropical.untrop f '' s)
theorem untrop_sum {R : Type u_1} {S : Type u_2} [ConditionallyCompleteLinearOrder R] [Fintype S] (f : STropical (WithTop R)) :
Tropical.untrop (∑ i : S, f i) = ⨅ (i : S), Tropical.untrop (f i)
theorem Finset.untrop_sum {R : Type u_1} {S : Type u_2} [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : STropical (WithTop R)) :
Tropical.untrop (∑ is, f i) = ⨅ (i : { x : S // x s }), Tropical.untrop (f i)

Note we cannot use i ∈ s instead of i : s here as it is simply not true on conditionally complete lattices!