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} [inst : AddMonoid R] (l : List R) :
Tropical.trop (List.sum l) = List.prod (List.map Tropical.trop l)
theorem Multiset.trop_sum {R : Type u_1} [inst : AddCommMonoid R] (s : Multiset R) :
theorem trop_sum {R : Type u_1} {S : Type u_2} [inst : AddCommMonoid R] (s : Finset S) (f : SR) :
Tropical.trop (Finset.sum s fun i => f i) = Finset.prod s fun i => Tropical.trop (f i)
theorem List.untrop_prod {R : Type u_1} [inst : AddMonoid R] (l : List (Tropical R)) :
Tropical.untrop (List.prod l) = List.sum (List.map Tropical.untrop l)
theorem untrop_prod {R : Type u_1} {S : Type u_2} [inst : AddCommMonoid R] (s : Finset S) (f : STropical R) :
Tropical.untrop (Finset.prod s fun i => f i) = Finset.sum s fun i => Tropical.untrop (f i)
theorem List.trop_minimum {R : Type u_1} [inst : LinearOrder R] (l : List R) :
Tropical.trop (List.minimum l) = List.sum (List.map (Tropical.trop WithTop.some) l)
theorem Multiset.trop_inf {R : Type u_1} [inst : LinearOrder R] [inst : OrderTop R] (s : Multiset R) :
theorem Finset.trop_inf {R : Type u_1} {S : Type u_2} [inst : LinearOrder R] [inst : OrderTop R] (s : Finset S) (f : SR) :
theorem trop_infₛ_image {R : Type u_1} {S : Type u_2} [inst : ConditionallyCompleteLinearOrder R] (s : Finset S) (f : SWithTop R) :
Tropical.trop (infₛ (f '' s)) = Finset.sum s fun i => Tropical.trop (f i)
theorem trop_infᵢ {R : Type u_1} {S : Type u_2} [inst : ConditionallyCompleteLinearOrder R] [inst : Fintype S] (f : SWithTop R) :
Tropical.trop (i, f i) = Finset.sum Finset.univ fun i => Tropical.trop (f i)
theorem Multiset.untrop_sum {R : Type u_1} [inst : LinearOrder R] [inst : OrderTop R] (s : Multiset (Tropical R)) :
theorem Finset.untrop_sum' {R : Type u_1} {S : Type u_2} [inst : LinearOrder R] [inst : OrderTop R] (s : Finset S) (f : STropical R) :
Tropical.untrop (Finset.sum s fun i => f i) = Finset.inf s (Tropical.untrop f)
theorem untrop_sum_eq_infₛ_image {R : Type u_1} {S : Type u_2} [inst : ConditionallyCompleteLinearOrder R] (s : Finset S) (f : STropical (WithTop R)) :
Tropical.untrop (Finset.sum s fun i => f i) = infₛ (Tropical.untrop f '' s)
theorem untrop_sum {R : Type u_1} {S : Type u_2} [inst : ConditionallyCompleteLinearOrder R] [inst : Fintype S] (f : STropical (WithTop R)) :
Tropical.untrop (Finset.sum Finset.univ fun i => f i) = i, Tropical.untrop (f i)
theorem Finset.untrop_sum {R : Type u_1} {S : Type u_2} [inst : ConditionallyCompleteLinearOrder R] (s : Finset S) (f : STropical (WithTop R)) :
Tropical.untrop (Finset.sum s fun i => f i) = i, Tropical.untrop (f i)

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