algebra.tropical.big_operators
⟷
Mathlib.Algebra.Tropical.BigOperators
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
-import Mathbin.Algebra.BigOperators.Basic
-import Mathbin.Data.List.MinMax
-import Mathbin.Algebra.Tropical.Basic
-import Mathbin.Order.ConditionallyCompleteLattice.Finset
+import Algebra.BigOperators.Basic
+import Data.List.MinMax
+import Algebra.Tropical.Basic
+import Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"63f84d91dd847f50bae04a01071f3a5491934e36"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-
-! This file was ported from Lean 3 source module algebra.tropical.big_operators
-! leanprover-community/mathlib commit 63f84d91dd847f50bae04a01071f3a5491934e36
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.BigOperators.Basic
import Mathbin.Data.List.MinMax
import Mathbin.Algebra.Tropical.Basic
import Mathbin.Order.ConditionallyCompleteLattice.Finset
+#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"63f84d91dd847f50bae04a01071f3a5491934e36"
+
/-!
# Tropicalization of finitary operations
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -46,18 +46,23 @@ variable {R S : Type _}
open Tropical Finset
+#print List.trop_sum /-
theorem List.trop_sum [AddMonoid R] (l : List R) : trop l.Sum = List.prod (l.map trop) :=
by
induction' l with hd tl IH
· simp
· simp [← IH]
#align list.trop_sum List.trop_sum
+-/
+#print Multiset.trop_sum /-
theorem Multiset.trop_sum [AddCommMonoid R] (s : Multiset R) :
trop s.Sum = Multiset.prod (s.map trop) :=
Quotient.inductionOn s (by simpa using List.trop_sum)
#align multiset.trop_sum Multiset.trop_sum
+-/
+#print trop_sum /-
theorem trop_sum [AddCommMonoid R] (s : Finset S) (f : S → R) :
trop (∑ i in s, f i) = ∏ i in s, trop (f i) :=
by
@@ -65,7 +70,9 @@ theorem trop_sum [AddCommMonoid R] (s : Finset S) (f : S → R) :
convert Multiset.trop_sum _
simp
#align trop_sum trop_sum
+-/
+#print List.untrop_prod /-
theorem List.untrop_prod [AddMonoid R] (l : List (Tropical R)) :
untrop l.Prod = List.sum (l.map untrop) :=
by
@@ -73,12 +80,16 @@ theorem List.untrop_prod [AddMonoid R] (l : List (Tropical R)) :
· simp
· simp [← IH]
#align list.untrop_prod List.untrop_prod
+-/
+#print Multiset.untrop_prod /-
theorem Multiset.untrop_prod [AddCommMonoid R] (s : Multiset (Tropical R)) :
untrop s.Prod = Multiset.sum (s.map untrop) :=
Quotient.inductionOn s (by simpa using List.untrop_prod)
#align multiset.untrop_prod Multiset.untrop_prod
+-/
+#print untrop_prod /-
theorem untrop_prod [AddCommMonoid R] (s : Finset S) (f : S → Tropical R) :
untrop (∏ i in s, f i) = ∑ i in s, untrop (f i) :=
by
@@ -86,6 +97,7 @@ theorem untrop_prod [AddCommMonoid R] (s : Finset S) (f : S → Tropical R) :
convert Multiset.untrop_prod _
simp
#align untrop_prod untrop_prod
+-/
#print List.trop_minimum /-
theorem List.trop_minimum [LinearOrder R] (l : List R) :
@@ -97,6 +109,7 @@ theorem List.trop_minimum [LinearOrder R] (l : List R) :
#align list.trop_minimum List.trop_minimum
-/
+#print Multiset.trop_inf /-
theorem Multiset.trop_inf [LinearOrder R] [OrderTop R] (s : Multiset R) :
trop s.inf = Multiset.sum (s.map trop) :=
by
@@ -104,14 +117,18 @@ theorem Multiset.trop_inf [LinearOrder R] [OrderTop R] (s : Multiset R) :
· simp
· simp [← IH]
#align multiset.trop_inf Multiset.trop_inf
+-/
+#print Finset.trop_inf /-
theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → R) :
trop (s.inf f) = ∑ i in s, trop (f i) := by
cases s
convert Multiset.trop_inf _
simp
#align finset.trop_inf Finset.trop_inf
+-/
+#print trop_sInf_image /-
theorem trop_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : S → WithTop R) :
trop (sInf (f '' s)) = ∑ i in s, trop (f i) :=
by
@@ -119,12 +136,16 @@ theorem trop_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f :
· simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, trop_top]
rw [← inf'_eq_cInf_image _ h, inf'_eq_inf, s.trop_inf]
#align trop_Inf_image trop_sInf_image
+-/
+#print trop_iInf /-
theorem trop_iInf [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → WithTop R) :
trop (⨅ i : S, f i) = ∑ i : S, trop (f i) := by
rw [iInf, ← Set.image_univ, ← coe_univ, trop_sInf_image]
#align trop_infi trop_iInf
+-/
+#print Multiset.untrop_sum /-
theorem Multiset.untrop_sum [LinearOrder R] [OrderTop R] (s : Multiset (Tropical R)) :
untrop s.Sum = Multiset.inf (s.map untrop) :=
by
@@ -132,7 +153,9 @@ theorem Multiset.untrop_sum [LinearOrder R] [OrderTop R] (s : Multiset (Tropical
· simp
· simpa [← IH]
#align multiset.untrop_sum Multiset.untrop_sum
+-/
+#print Finset.untrop_sum' /-
theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → Tropical R) :
untrop (∑ i in s, f i) = s.inf (untrop ∘ f) :=
by
@@ -140,7 +163,9 @@ theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S
convert Multiset.untrop_sum _
simpa
#align finset.untrop_sum' Finset.untrop_sum'
+-/
+#print untrop_sum_eq_sInf_image /-
theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S)
(f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = sInf (untrop ∘ f '' s) :=
by
@@ -148,16 +173,21 @@ theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finse
· simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, untrop_zero]
rw [← inf'_eq_cInf_image _ h, inf'_eq_inf, Finset.untrop_sum']
#align untrop_sum_eq_Inf_image untrop_sum_eq_sInf_image
+-/
+#print untrop_sum /-
theorem untrop_sum [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → Tropical (WithTop R)) :
untrop (∑ i : S, f i) = ⨅ i : S, untrop (f i) := by
rw [iInf, ← Set.image_univ, ← coe_univ, untrop_sum_eq_sInf_image]
#align untrop_sum untrop_sum
+-/
+#print Finset.untrop_sum /-
/-- Note we cannot use `i ∈ s` instead of `i : s` here
as it is simply not true on conditionally complete lattices! -/
theorem Finset.untrop_sum [ConditionallyCompleteLinearOrder R] (s : Finset S)
(f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = ⨅ i : s, untrop (f i) := by
simpa [← untrop_sum] using sum_attach.symm
#align finset.untrop_sum Finset.untrop_sum
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -40,7 +40,7 @@ directly transfer to minima over multisets or finsets.
-/
-open BigOperators
+open scoped BigOperators
variable {R S : Type _}
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -46,12 +46,6 @@ variable {R S : Type _}
open Tropical Finset
-/- warning: list.trop_sum -> List.trop_sum is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : AddMonoid.{u1} R] (l : List.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (List.sum.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) l)) (List.prod.{u1} (Tropical.{u1} R) (Tropical.hasMul.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1))) (Tropical.hasOne.{u1} R (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1))) (List.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) l))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : AddMonoid.{u1} R] (l : List.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (List.sum.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) (AddMonoid.toZero.{u1} R _inst_1) l)) (List.prod.{u1} (Tropical.{u1} R) (Tropical.instMulTropical.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1))) (Tropical.instOneTropical.{u1} R (AddMonoid.toZero.{u1} R _inst_1)) (List.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) l))
-Case conversion may be inaccurate. Consider using '#align list.trop_sum List.trop_sumₓ'. -/
theorem List.trop_sum [AddMonoid R] (l : List R) : trop l.Sum = List.prod (l.map trop) :=
by
induction' l with hd tl IH
@@ -59,23 +53,11 @@ theorem List.trop_sum [AddMonoid R] (l : List R) : trop l.Sum = List.prod (l.map
· simp [← IH]
#align list.trop_sum List.trop_sum
-/- warning: multiset.trop_sum -> Multiset.trop_sum is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : AddCommMonoid.{u1} R] (s : Multiset.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Multiset.sum.{u1} R _inst_1 s)) (Multiset.prod.{u1} (Tropical.{u1} R) (Tropical.commMonoid.{u1} R _inst_1) (Multiset.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) s))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : AddCommMonoid.{u1} R] (s : Multiset.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Multiset.sum.{u1} R _inst_1 s)) (Multiset.prod.{u1} (Tropical.{u1} R) (Tropical.instCommMonoidTropical.{u1} R _inst_1) (Multiset.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) s))
-Case conversion may be inaccurate. Consider using '#align multiset.trop_sum Multiset.trop_sumₓ'. -/
theorem Multiset.trop_sum [AddCommMonoid R] (s : Multiset R) :
trop s.Sum = Multiset.prod (s.map trop) :=
Quotient.inductionOn s (by simpa using List.trop_sum)
#align multiset.trop_sum Multiset.trop_sum
-/- warning: trop_sum -> trop_sum is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : AddCommMonoid.{u1} R] (s : Finset.{u2} S) (f : S -> R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Finset.sum.{u1, u2} R S _inst_1 s (fun (i : S) => f i))) (Finset.prod.{u1, u2} (Tropical.{u1} R) S (Tropical.commMonoid.{u1} R _inst_1) s (fun (i : S) => Tropical.trop.{u1} R (f i)))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : AddCommMonoid.{u2} R] (s : Finset.{u1} S) (f : S -> R), Eq.{succ u2} (Tropical.{u2} R) (Tropical.trop.{u2} R (Finset.sum.{u2, u1} R S _inst_1 s (fun (i : S) => f i))) (Finset.prod.{u2, u1} (Tropical.{u2} R) S (Tropical.instCommMonoidTropical.{u2} R _inst_1) s (fun (i : S) => Tropical.trop.{u2} R (f i)))
-Case conversion may be inaccurate. Consider using '#align trop_sum trop_sumₓ'. -/
theorem trop_sum [AddCommMonoid R] (s : Finset S) (f : S → R) :
trop (∑ i in s, f i) = ∏ i in s, trop (f i) :=
by
@@ -84,12 +66,6 @@ theorem trop_sum [AddCommMonoid R] (s : Finset S) (f : S → R) :
simp
#align trop_sum trop_sum
-/- warning: list.untrop_prod -> List.untrop_prod is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : AddMonoid.{u1} R] (l : List.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (List.prod.{u1} (Tropical.{u1} R) (Tropical.hasMul.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1))) (Tropical.hasOne.{u1} R (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1))) l)) (List.sum.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) (List.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) l))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : AddMonoid.{u1} R] (l : List.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (List.prod.{u1} (Tropical.{u1} R) (Tropical.instMulTropical.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1))) (Tropical.instOneTropical.{u1} R (AddMonoid.toZero.{u1} R _inst_1)) l)) (List.sum.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) (AddMonoid.toZero.{u1} R _inst_1) (List.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) l))
-Case conversion may be inaccurate. Consider using '#align list.untrop_prod List.untrop_prodₓ'. -/
theorem List.untrop_prod [AddMonoid R] (l : List (Tropical R)) :
untrop l.Prod = List.sum (l.map untrop) :=
by
@@ -98,23 +74,11 @@ theorem List.untrop_prod [AddMonoid R] (l : List (Tropical R)) :
· simp [← IH]
#align list.untrop_prod List.untrop_prod
-/- warning: multiset.untrop_prod -> Multiset.untrop_prod is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : AddCommMonoid.{u1} R] (s : Multiset.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Multiset.prod.{u1} (Tropical.{u1} R) (Tropical.commMonoid.{u1} R _inst_1) s)) (Multiset.sum.{u1} R _inst_1 (Multiset.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) s))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : AddCommMonoid.{u1} R] (s : Multiset.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Multiset.prod.{u1} (Tropical.{u1} R) (Tropical.instCommMonoidTropical.{u1} R _inst_1) s)) (Multiset.sum.{u1} R _inst_1 (Multiset.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) s))
-Case conversion may be inaccurate. Consider using '#align multiset.untrop_prod Multiset.untrop_prodₓ'. -/
theorem Multiset.untrop_prod [AddCommMonoid R] (s : Multiset (Tropical R)) :
untrop s.Prod = Multiset.sum (s.map untrop) :=
Quotient.inductionOn s (by simpa using List.untrop_prod)
#align multiset.untrop_prod Multiset.untrop_prod
-/- warning: untrop_prod -> untrop_prod is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : AddCommMonoid.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Finset.prod.{u1, u2} (Tropical.{u1} R) S (Tropical.commMonoid.{u1} R _inst_1) s (fun (i : S) => f i))) (Finset.sum.{u1, u2} R S _inst_1 s (fun (i : S) => Tropical.untrop.{u1} R (f i)))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : AddCommMonoid.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} R)), Eq.{succ u2} R (Tropical.untrop.{u2} R (Finset.prod.{u2, u1} (Tropical.{u2} R) S (Tropical.instCommMonoidTropical.{u2} R _inst_1) s (fun (i : S) => f i))) (Finset.sum.{u2, u1} R S _inst_1 s (fun (i : S) => Tropical.untrop.{u2} R (f i)))
-Case conversion may be inaccurate. Consider using '#align untrop_prod untrop_prodₓ'. -/
theorem untrop_prod [AddCommMonoid R] (s : Finset S) (f : S → Tropical R) :
untrop (∏ i in s, f i) = ∑ i in s, untrop (f i) :=
by
@@ -133,12 +97,6 @@ theorem List.trop_minimum [LinearOrder R] (l : List R) :
#align list.trop_minimum List.trop_minimum
-/
-/- warning: multiset.trop_inf -> Multiset.trop_inf is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Multiset.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s)) (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) (Multiset.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) s))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (DistribLattice.toLattice.{u1} R (instDistribLattice.{u1} R _inst_1))))))] (s : Multiset.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (DistribLattice.toLattice.{u1} R (instDistribLattice.{u1} R _inst_1))) _inst_2 s)) (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.instAddCommMonoidTropical.{u1} R _inst_1 _inst_2) (Multiset.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) s))
-Case conversion may be inaccurate. Consider using '#align multiset.trop_inf Multiset.trop_infₓ'. -/
theorem Multiset.trop_inf [LinearOrder R] [OrderTop R] (s : Multiset R) :
trop s.inf = Multiset.sum (s.map trop) :=
by
@@ -147,12 +105,6 @@ theorem Multiset.trop_inf [LinearOrder R] [OrderTop R] (s : Multiset R) :
· simp [← IH]
#align multiset.trop_inf Multiset.trop_inf
-/- warning: finset.trop_inf -> Finset.trop_inf is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Finset.{u2} S) (f : S -> R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Finset.inf.{u1, u2} R S (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s f)) (Finset.sum.{u1, u2} (Tropical.{u1} R) S (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s (fun (i : S) => Tropical.trop.{u1} R (f i)))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : LinearOrder.{u2} R] [_inst_2 : OrderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeInf.toPartialOrder.{u2} R (Lattice.toSemilatticeInf.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R _inst_1))))))] (s : Finset.{u1} S) (f : S -> R), Eq.{succ u2} (Tropical.{u2} R) (Tropical.trop.{u2} R (Finset.inf.{u2, u1} R S (Lattice.toSemilatticeInf.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R _inst_1))) _inst_2 s f)) (Finset.sum.{u2, u1} (Tropical.{u2} R) S (Tropical.instAddCommMonoidTropical.{u2} R _inst_1 _inst_2) s (fun (i : S) => Tropical.trop.{u2} R (f i)))
-Case conversion may be inaccurate. Consider using '#align finset.trop_inf Finset.trop_infₓ'. -/
theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → R) :
trop (s.inf f) = ∑ i in s, trop (f i) := by
cases s
@@ -160,12 +112,6 @@ theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → R
simp
#align finset.trop_inf Finset.trop_inf
-/- warning: trop_Inf_image -> trop_sInf_image is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (InfSet.sInf.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (WithTop.{u2} R)), Eq.{succ u2} (Tropical.{u2} (WithTop.{u2} R)) (Tropical.trop.{u2} (WithTop.{u2} R) (InfSet.sInf.{u2} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Set.image.{u1, u2} S (WithTop.{u2} R) f (Finset.toSet.{u1} S s)))) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => Tropical.trop.{u2} (WithTop.{u2} R) (f i)))
-Case conversion may be inaccurate. Consider using '#align trop_Inf_image trop_sInf_imageₓ'. -/
theorem trop_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : S → WithTop R) :
trop (sInf (f '' s)) = ∑ i in s, trop (f i) :=
by
@@ -174,23 +120,11 @@ theorem trop_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f :
rw [← inf'_eq_cInf_image _ h, inf'_eq_inf, s.trop_inf]
#align trop_Inf_image trop_sInf_image
-/- warning: trop_infi -> trop_iInf is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] [_inst_2 : Fintype.{u1} S] (f : S -> (WithTop.{u2} R)), Eq.{succ u2} (Tropical.{u2} (WithTop.{u2} R)) (Tropical.trop.{u2} (WithTop.{u2} R) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) (Finset.univ.{u1} S _inst_2) (fun (i : S) => Tropical.trop.{u2} (WithTop.{u2} R) (f i)))
-Case conversion may be inaccurate. Consider using '#align trop_infi trop_iInfₓ'. -/
theorem trop_iInf [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → WithTop R) :
trop (⨅ i : S, f i) = ∑ i : S, trop (f i) := by
rw [iInf, ← Set.image_univ, ← coe_univ, trop_sInf_image]
#align trop_infi trop_iInf
-/- warning: multiset.untrop_sum -> Multiset.untrop_sum is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Multiset.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s)) (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 (Multiset.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) s))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (DistribLattice.toLattice.{u1} R (instDistribLattice.{u1} R _inst_1))))))] (s : Multiset.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.instAddCommMonoidTropical.{u1} R _inst_1 _inst_2) s)) (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (DistribLattice.toLattice.{u1} R (instDistribLattice.{u1} R _inst_1))) _inst_2 (Multiset.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) s))
-Case conversion may be inaccurate. Consider using '#align multiset.untrop_sum Multiset.untrop_sumₓ'. -/
theorem Multiset.untrop_sum [LinearOrder R] [OrderTop R] (s : Multiset (Tropical R)) :
untrop s.Sum = Multiset.inf (s.map untrop) :=
by
@@ -199,12 +133,6 @@ theorem Multiset.untrop_sum [LinearOrder R] [OrderTop R] (s : Multiset (Tropical
· simpa [← IH]
#align multiset.untrop_sum Multiset.untrop_sum
-/- warning: finset.untrop_sum' -> Finset.untrop_sum' is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Finset.sum.{u1, u2} (Tropical.{u1} R) S (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s (fun (i : S) => f i))) (Finset.inf.{u1, u2} R S (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s (Function.comp.{succ u2, succ u1, succ u1} S (Tropical.{u1} R) R (Tropical.untrop.{u1} R) f))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : LinearOrder.{u2} R] [_inst_2 : OrderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeInf.toPartialOrder.{u2} R (Lattice.toSemilatticeInf.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R _inst_1))))))] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} R)), Eq.{succ u2} R (Tropical.untrop.{u2} R (Finset.sum.{u2, u1} (Tropical.{u2} R) S (Tropical.instAddCommMonoidTropical.{u2} R _inst_1 _inst_2) s (fun (i : S) => f i))) (Finset.inf.{u2, u1} R S (Lattice.toSemilatticeInf.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R _inst_1))) _inst_2 s (Function.comp.{succ u1, succ u2, succ u2} S (Tropical.{u2} R) R (Tropical.untrop.{u2} R) f))
-Case conversion may be inaccurate. Consider using '#align finset.untrop_sum' Finset.untrop_sum'ₓ'. -/
theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → Tropical R) :
untrop (∑ i in s, f i) = s.inf (untrop ∘ f) :=
by
@@ -213,12 +141,6 @@ theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S
simpa
#align finset.untrop_sum' Finset.untrop_sum'
-/- warning: untrop_sum_eq_Inf_image -> untrop_sum_eq_sInf_image is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (InfSet.sInf.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) (Function.comp.{succ u2, succ u1, succ u1} S (Tropical.{u1} (WithTop.{u1} R)) (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R)) f) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => f i))) (InfSet.sInf.{u2} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Set.image.{u1, u2} S (WithTop.{u2} R) (Function.comp.{succ u1, succ u2, succ u2} S (Tropical.{u2} (WithTop.{u2} R)) (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R)) f) (Finset.toSet.{u1} S s)))
-Case conversion may be inaccurate. Consider using '#align untrop_sum_eq_Inf_image untrop_sum_eq_sInf_imageₓ'. -/
theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S)
(f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = sInf (untrop ∘ f '' s) :=
by
@@ -227,23 +149,11 @@ theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finse
rw [← inf'_eq_cInf_image _ h, inf'_eq_inf, Finset.untrop_sum']
#align untrop_sum_eq_Inf_image untrop_sum_eq_sInf_image
-/- warning: untrop_sum -> untrop_sum is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => f i))) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u1} (WithTop.{u1} R) (f i)))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] [_inst_2 : Fintype.{u1} S] (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) (Finset.univ.{u1} S _inst_2) (fun (i : S) => f i))) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u2} (WithTop.{u2} R) (f i)))
-Case conversion may be inaccurate. Consider using '#align untrop_sum untrop_sumₓ'. -/
theorem untrop_sum [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → Tropical (WithTop R)) :
untrop (∑ i : S, f i) = ⨅ i : S, untrop (f i) := by
rw [iInf, ← Set.image_univ, ← coe_univ, untrop_sum_eq_sInf_image]
#align untrop_sum untrop_sum
-/- warning: finset.untrop_sum -> Finset.untrop_sum is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) (fun (i : coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) => Tropical.untrop.{u1} (WithTop.{u1} R) (f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeSubtype.{succ u2} S (fun (x : S) => Membership.Mem.{u2, u2} S (Finset.{u2} S) (Finset.hasMem.{u2} S) x s))))) i))))
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => f i))) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Subtype.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s)) (fun (i : Subtype.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s)) => Tropical.untrop.{u2} (WithTop.{u2} R) (f (Subtype.val.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s) i))))
-Case conversion may be inaccurate. Consider using '#align finset.untrop_sum Finset.untrop_sumₓ'. -/
/-- Note we cannot use `i ∈ s` instead of `i : s` here
as it is simply not true on conditionally complete lattices! -/
theorem Finset.untrop_sum [ConditionallyCompleteLinearOrder R] (s : Finset S)
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -135,7 +135,7 @@ theorem List.trop_minimum [LinearOrder R] (l : List R) :
/- warning: multiset.trop_inf -> Multiset.trop_inf is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Multiset.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s)) (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) (Multiset.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) s))
+ forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Multiset.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s)) (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) (Multiset.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) s))
but is expected to have type
forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (DistribLattice.toLattice.{u1} R (instDistribLattice.{u1} R _inst_1))))))] (s : Multiset.{u1} R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (DistribLattice.toLattice.{u1} R (instDistribLattice.{u1} R _inst_1))) _inst_2 s)) (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.instAddCommMonoidTropical.{u1} R _inst_1 _inst_2) (Multiset.map.{u1, u1} R (Tropical.{u1} R) (Tropical.trop.{u1} R) s))
Case conversion may be inaccurate. Consider using '#align multiset.trop_inf Multiset.trop_infₓ'. -/
@@ -149,7 +149,7 @@ theorem Multiset.trop_inf [LinearOrder R] [OrderTop R] (s : Multiset R) :
/- warning: finset.trop_inf -> Finset.trop_inf is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Finset.{u2} S) (f : S -> R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Finset.inf.{u1, u2} R S (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s f)) (Finset.sum.{u1, u2} (Tropical.{u1} R) S (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s (fun (i : S) => Tropical.trop.{u1} R (f i)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Finset.{u2} S) (f : S -> R), Eq.{succ u1} (Tropical.{u1} R) (Tropical.trop.{u1} R (Finset.inf.{u1, u2} R S (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s f)) (Finset.sum.{u1, u2} (Tropical.{u1} R) S (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s (fun (i : S) => Tropical.trop.{u1} R (f i)))
but is expected to have type
forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : LinearOrder.{u2} R] [_inst_2 : OrderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeInf.toPartialOrder.{u2} R (Lattice.toSemilatticeInf.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R _inst_1))))))] (s : Finset.{u1} S) (f : S -> R), Eq.{succ u2} (Tropical.{u2} R) (Tropical.trop.{u2} R (Finset.inf.{u2, u1} R S (Lattice.toSemilatticeInf.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R _inst_1))) _inst_2 s f)) (Finset.sum.{u2, u1} (Tropical.{u2} R) S (Tropical.instAddCommMonoidTropical.{u2} R _inst_1 _inst_2) s (fun (i : S) => Tropical.trop.{u2} R (f i)))
Case conversion may be inaccurate. Consider using '#align finset.trop_inf Finset.trop_infₓ'. -/
@@ -162,7 +162,7 @@ theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → R
/- warning: trop_Inf_image -> trop_sInf_image is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (InfSet.sInf.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (InfSet.sInf.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
but is expected to have type
forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (WithTop.{u2} R)), Eq.{succ u2} (Tropical.{u2} (WithTop.{u2} R)) (Tropical.trop.{u2} (WithTop.{u2} R) (InfSet.sInf.{u2} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Set.image.{u1, u2} S (WithTop.{u2} R) f (Finset.toSet.{u1} S s)))) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => Tropical.trop.{u2} (WithTop.{u2} R) (f i)))
Case conversion may be inaccurate. Consider using '#align trop_Inf_image trop_sInf_imageₓ'. -/
@@ -176,7 +176,7 @@ theorem trop_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f :
/- warning: trop_infi -> trop_iInf is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
but is expected to have type
forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] [_inst_2 : Fintype.{u1} S] (f : S -> (WithTop.{u2} R)), Eq.{succ u2} (Tropical.{u2} (WithTop.{u2} R)) (Tropical.trop.{u2} (WithTop.{u2} R) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) (Finset.univ.{u1} S _inst_2) (fun (i : S) => Tropical.trop.{u2} (WithTop.{u2} R) (f i)))
Case conversion may be inaccurate. Consider using '#align trop_infi trop_iInfₓ'. -/
@@ -187,7 +187,7 @@ theorem trop_iInf [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → Wi
/- warning: multiset.untrop_sum -> Multiset.untrop_sum is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Multiset.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s)) (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 (Multiset.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) s))
+ forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Multiset.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s)) (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 (Multiset.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) s))
but is expected to have type
forall {R : Type.{u1}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (DistribLattice.toLattice.{u1} R (instDistribLattice.{u1} R _inst_1))))))] (s : Multiset.{u1} (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Multiset.sum.{u1} (Tropical.{u1} R) (Tropical.instAddCommMonoidTropical.{u1} R _inst_1 _inst_2) s)) (Multiset.inf.{u1} R (Lattice.toSemilatticeInf.{u1} R (DistribLattice.toLattice.{u1} R (instDistribLattice.{u1} R _inst_1))) _inst_2 (Multiset.map.{u1, u1} (Tropical.{u1} R) R (Tropical.untrop.{u1} R) s))
Case conversion may be inaccurate. Consider using '#align multiset.untrop_sum Multiset.untrop_sumₓ'. -/
@@ -201,7 +201,7 @@ theorem Multiset.untrop_sum [LinearOrder R] [OrderTop R] (s : Multiset (Tropical
/- warning: finset.untrop_sum' -> Finset.untrop_sum' is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Finset.sum.{u1, u2} (Tropical.{u1} R) S (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s (fun (i : S) => f i))) (Finset.inf.{u1, u2} R S (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s (Function.comp.{succ u2, succ u1, succ u1} S (Tropical.{u1} R) R (Tropical.untrop.{u1} R) f))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : LinearOrder.{u1} R] [_inst_2 : OrderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)))))] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} R)), Eq.{succ u1} R (Tropical.untrop.{u1} R (Finset.sum.{u1, u2} (Tropical.{u1} R) S (Tropical.addCommMonoid.{u1} R _inst_1 _inst_2) s (fun (i : S) => f i))) (Finset.inf.{u1, u2} R S (Lattice.toSemilatticeInf.{u1} R (LinearOrder.toLattice.{u1} R _inst_1)) _inst_2 s (Function.comp.{succ u2, succ u1, succ u1} S (Tropical.{u1} R) R (Tropical.untrop.{u1} R) f))
but is expected to have type
forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : LinearOrder.{u2} R] [_inst_2 : OrderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeInf.toPartialOrder.{u2} R (Lattice.toSemilatticeInf.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R _inst_1))))))] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} R)), Eq.{succ u2} R (Tropical.untrop.{u2} R (Finset.sum.{u2, u1} (Tropical.{u2} R) S (Tropical.instAddCommMonoidTropical.{u2} R _inst_1 _inst_2) s (fun (i : S) => f i))) (Finset.inf.{u2, u1} R S (Lattice.toSemilatticeInf.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R _inst_1))) _inst_2 s (Function.comp.{succ u1, succ u2, succ u2} S (Tropical.{u2} R) R (Tropical.untrop.{u2} R) f))
Case conversion may be inaccurate. Consider using '#align finset.untrop_sum' Finset.untrop_sum'ₓ'. -/
@@ -215,7 +215,7 @@ theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S
/- warning: untrop_sum_eq_Inf_image -> untrop_sum_eq_sInf_image is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (InfSet.sInf.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) (Function.comp.{succ u2, succ u1, succ u1} S (Tropical.{u1} (WithTop.{u1} R)) (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R)) f) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (InfSet.sInf.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) (Function.comp.{succ u2, succ u1, succ u1} S (Tropical.{u1} (WithTop.{u1} R)) (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R)) f) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))
but is expected to have type
forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => f i))) (InfSet.sInf.{u2} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Set.image.{u1, u2} S (WithTop.{u2} R) (Function.comp.{succ u1, succ u2, succ u2} S (Tropical.{u2} (WithTop.{u2} R)) (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R)) f) (Finset.toSet.{u1} S s)))
Case conversion may be inaccurate. Consider using '#align untrop_sum_eq_Inf_image untrop_sum_eq_sInf_imageₓ'. -/
@@ -229,7 +229,7 @@ theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finse
/- warning: untrop_sum -> untrop_sum is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => f i))) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u1} (WithTop.{u1} R) (f i)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => f i))) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u1} (WithTop.{u1} R) (f i)))
but is expected to have type
forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] [_inst_2 : Fintype.{u1} S] (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) (Finset.univ.{u1} S _inst_2) (fun (i : S) => f i))) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u2} (WithTop.{u2} R) (f i)))
Case conversion may be inaccurate. Consider using '#align untrop_sum untrop_sumₓ'. -/
@@ -240,7 +240,7 @@ theorem untrop_sum [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → T
/- warning: finset.untrop_sum -> Finset.untrop_sum is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) (fun (i : coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) => Tropical.untrop.{u1} (WithTop.{u1} R) (f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeSubtype.{succ u2} S (fun (x : S) => Membership.Mem.{u2, u2} S (Finset.{u2} S) (Finset.hasMem.{u2} S) x s))))) i))))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) (fun (i : coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) => Tropical.untrop.{u1} (WithTop.{u1} R) (f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeSubtype.{succ u2} S (fun (x : S) => Membership.Mem.{u2, u2} S (Finset.{u2} S) (Finset.hasMem.{u2} S) x s))))) i))))
but is expected to have type
forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => f i))) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Subtype.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s)) (fun (i : Subtype.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s)) => Tropical.untrop.{u2} (WithTop.{u2} R) (f (Subtype.val.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s) i))))
Case conversion may be inaccurate. Consider using '#align finset.untrop_sum Finset.untrop_sumₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -160,30 +160,30 @@ theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → R
simp
#align finset.trop_inf Finset.trop_inf
-/- warning: trop_Inf_image -> trop_infₛ_image is a dubious translation:
+/- warning: trop_Inf_image -> trop_sInf_image is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (InfSet.infₛ.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (InfSet.sInf.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (WithTop.{u2} R)), Eq.{succ u2} (Tropical.{u2} (WithTop.{u2} R)) (Tropical.trop.{u2} (WithTop.{u2} R) (InfSet.infₛ.{u2} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Set.image.{u1, u2} S (WithTop.{u2} R) f (Finset.toSet.{u1} S s)))) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => Tropical.trop.{u2} (WithTop.{u2} R) (f i)))
-Case conversion may be inaccurate. Consider using '#align trop_Inf_image trop_infₛ_imageₓ'. -/
-theorem trop_infₛ_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : S → WithTop R) :
- trop (infₛ (f '' s)) = ∑ i in s, trop (f i) :=
+ forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (WithTop.{u2} R)), Eq.{succ u2} (Tropical.{u2} (WithTop.{u2} R)) (Tropical.trop.{u2} (WithTop.{u2} R) (InfSet.sInf.{u2} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Set.image.{u1, u2} S (WithTop.{u2} R) f (Finset.toSet.{u1} S s)))) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => Tropical.trop.{u2} (WithTop.{u2} R) (f i)))
+Case conversion may be inaccurate. Consider using '#align trop_Inf_image trop_sInf_imageₓ'. -/
+theorem trop_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : S → WithTop R) :
+ trop (sInf (f '' s)) = ∑ i in s, trop (f i) :=
by
rcases s.eq_empty_or_nonempty with (rfl | h)
- · simp only [Set.image_empty, coe_empty, sum_empty, WithTop.infₛ_empty, trop_top]
+ · simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, trop_top]
rw [← inf'_eq_cInf_image _ h, inf'_eq_inf, s.trop_inf]
-#align trop_Inf_image trop_infₛ_image
+#align trop_Inf_image trop_sInf_image
-/- warning: trop_infi -> trop_infᵢ is a dubious translation:
+/- warning: trop_infi -> trop_iInf is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (infᵢ.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (WithTop.{u1} R)), Eq.{succ u1} (Tropical.{u1} (WithTop.{u1} R)) (Tropical.trop.{u1} (WithTop.{u1} R) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => Tropical.trop.{u1} (WithTop.{u1} R) (f i)))
but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] [_inst_2 : Fintype.{u1} S] (f : S -> (WithTop.{u2} R)), Eq.{succ u2} (Tropical.{u2} (WithTop.{u2} R)) (Tropical.trop.{u2} (WithTop.{u2} R) (infᵢ.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) (Finset.univ.{u1} S _inst_2) (fun (i : S) => Tropical.trop.{u2} (WithTop.{u2} R) (f i)))
-Case conversion may be inaccurate. Consider using '#align trop_infi trop_infᵢₓ'. -/
-theorem trop_infᵢ [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → WithTop R) :
+ forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] [_inst_2 : Fintype.{u1} S] (f : S -> (WithTop.{u2} R)), Eq.{succ u2} (Tropical.{u2} (WithTop.{u2} R)) (Tropical.trop.{u2} (WithTop.{u2} R) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) S (fun (i : S) => f i))) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) (Finset.univ.{u1} S _inst_2) (fun (i : S) => Tropical.trop.{u2} (WithTop.{u2} R) (f i)))
+Case conversion may be inaccurate. Consider using '#align trop_infi trop_iInfₓ'. -/
+theorem trop_iInf [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → WithTop R) :
trop (⨅ i : S, f i) = ∑ i : S, trop (f i) := by
- rw [infᵢ, ← Set.image_univ, ← coe_univ, trop_infₛ_image]
-#align trop_infi trop_infᵢ
+ rw [iInf, ← Set.image_univ, ← coe_univ, trop_sInf_image]
+#align trop_infi trop_iInf
/- warning: multiset.untrop_sum -> Multiset.untrop_sum is a dubious translation:
lean 3 declaration is
@@ -213,36 +213,36 @@ theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S
simpa
#align finset.untrop_sum' Finset.untrop_sum'
-/- warning: untrop_sum_eq_Inf_image -> untrop_sum_eq_infₛ_image is a dubious translation:
+/- warning: untrop_sum_eq_Inf_image -> untrop_sum_eq_sInf_image is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (InfSet.infₛ.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) (Function.comp.{succ u2, succ u1, succ u1} S (Tropical.{u1} (WithTop.{u1} R)) (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R)) f) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (InfSet.sInf.{u1} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (Set.image.{u2, u1} S (WithTop.{u1} R) (Function.comp.{succ u2, succ u1, succ u1} S (Tropical.{u1} (WithTop.{u1} R)) (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R)) f) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} S) (Set.{u2} S) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} S) (Set.{u2} S) (Finset.Set.hasCoeT.{u2} S))) s)))
but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => f i))) (InfSet.infₛ.{u2} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Set.image.{u1, u2} S (WithTop.{u2} R) (Function.comp.{succ u1, succ u2, succ u2} S (Tropical.{u2} (WithTop.{u2} R)) (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R)) f) (Finset.toSet.{u1} S s)))
-Case conversion may be inaccurate. Consider using '#align untrop_sum_eq_Inf_image untrop_sum_eq_infₛ_imageₓ'. -/
-theorem untrop_sum_eq_infₛ_image [ConditionallyCompleteLinearOrder R] (s : Finset S)
- (f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = infₛ (untrop ∘ f '' s) :=
+ forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => f i))) (InfSet.sInf.{u2} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Set.image.{u1, u2} S (WithTop.{u2} R) (Function.comp.{succ u1, succ u2, succ u2} S (Tropical.{u2} (WithTop.{u2} R)) (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R)) f) (Finset.toSet.{u1} S s)))
+Case conversion may be inaccurate. Consider using '#align untrop_sum_eq_Inf_image untrop_sum_eq_sInf_imageₓ'. -/
+theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S)
+ (f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = sInf (untrop ∘ f '' s) :=
by
rcases s.eq_empty_or_nonempty with (rfl | h)
- · simp only [Set.image_empty, coe_empty, sum_empty, WithTop.infₛ_empty, untrop_zero]
+ · simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, untrop_zero]
rw [← inf'_eq_cInf_image _ h, inf'_eq_inf, Finset.untrop_sum']
-#align untrop_sum_eq_Inf_image untrop_sum_eq_infₛ_image
+#align untrop_sum_eq_Inf_image untrop_sum_eq_sInf_image
/- warning: untrop_sum -> untrop_sum is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => f i))) (infᵢ.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u1} (WithTop.{u1} R) (f i)))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] [_inst_2 : Fintype.{u2} S] (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) (Finset.univ.{u2} S _inst_2) (fun (i : S) => f i))) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u1} (WithTop.{u1} R) (f i)))
but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] [_inst_2 : Fintype.{u1} S] (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) (Finset.univ.{u1} S _inst_2) (fun (i : S) => f i))) (infᵢ.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u2} (WithTop.{u2} R) (f i)))
+ forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] [_inst_2 : Fintype.{u1} S] (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) (Finset.univ.{u1} S _inst_2) (fun (i : S) => f i))) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) S (fun (i : S) => Tropical.untrop.{u2} (WithTop.{u2} R) (f i)))
Case conversion may be inaccurate. Consider using '#align untrop_sum untrop_sumₓ'. -/
theorem untrop_sum [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → Tropical (WithTop R)) :
untrop (∑ i : S, f i) = ⨅ i : S, untrop (f i) := by
- rw [infᵢ, ← Set.image_univ, ← coe_univ, untrop_sum_eq_infₛ_image]
+ rw [iInf, ← Set.image_univ, ← coe_univ, untrop_sum_eq_sInf_image]
#align untrop_sum untrop_sum
/- warning: finset.untrop_sum -> Finset.untrop_sum is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (infᵢ.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) (fun (i : coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) => Tropical.untrop.{u1} (WithTop.{u1} R) (f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeSubtype.{succ u2} S (fun (x : S) => Membership.Mem.{u2, u2} S (Finset.{u2} S) (Finset.hasMem.{u2} S) x s))))) i))))
+ forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : ConditionallyCompleteLinearOrder.{u1} R] (s : Finset.{u2} S) (f : S -> (Tropical.{u1} (WithTop.{u1} R))), Eq.{succ u1} (WithTop.{u1} R) (Tropical.untrop.{u1} (WithTop.{u1} R) (Finset.sum.{u1, u2} (Tropical.{u1} (WithTop.{u1} R)) S (Tropical.addCommMonoid.{u1} (WithTop.{u1} R) (WithTop.linearOrder.{u1} R (ConditionallyCompleteLinearOrder.toLinearOrder.{u1} R _inst_1)) (WithTop.orderTop.{u1} R (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R (SemilatticeInf.toPartialOrder.{u1} R (Lattice.toSemilatticeInf.{u1} R (ConditionallyCompleteLattice.toLattice.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1)))))))) s (fun (i : S) => f i))) (iInf.{u1, succ u2} (WithTop.{u1} R) (WithTop.hasInf.{u1} R (ConditionallyCompleteLattice.toHasInf.{u1} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u1} R _inst_1))) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) (fun (i : coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) => Tropical.untrop.{u1} (WithTop.{u1} R) (f ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Finset.{u2} S) Type.{u2} (Finset.hasCoeToSort.{u2} S) s) S (coeSubtype.{succ u2} S (fun (x : S) => Membership.Mem.{u2, u2} S (Finset.{u2} S) (Finset.hasMem.{u2} S) x s))))) i))))
but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => f i))) (infᵢ.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Subtype.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s)) (fun (i : Subtype.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s)) => Tropical.untrop.{u2} (WithTop.{u2} R) (f (Subtype.val.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s) i))))
+ forall {R : Type.{u2}} {S : Type.{u1}} [_inst_1 : ConditionallyCompleteLinearOrder.{u2} R] (s : Finset.{u1} S) (f : S -> (Tropical.{u2} (WithTop.{u2} R))), Eq.{succ u2} (WithTop.{u2} R) (Tropical.untrop.{u2} (WithTop.{u2} R) (Finset.sum.{u2, u1} (Tropical.{u2} (WithTop.{u2} R)) S (Tropical.instAddCommMonoidTropical.{u2} (WithTop.{u2} R) (WithTop.linearOrder.{u2} R (instLinearOrder.{u2} R _inst_1)) (WithTop.orderTop.{u2} R (Preorder.toLE.{u2} R (PartialOrder.toPreorder.{u2} R (SemilatticeSup.toPartialOrder.{u2} R (Lattice.toSemilatticeSup.{u2} R (DistribLattice.toLattice.{u2} R (instDistribLattice.{u2} R (instLinearOrder.{u2} R _inst_1))))))))) s (fun (i : S) => f i))) (iInf.{u2, succ u1} (WithTop.{u2} R) (instInfSetWithTop.{u2} R (ConditionallyCompleteLattice.toInfSet.{u2} R (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{u2} R _inst_1))) (Subtype.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s)) (fun (i : Subtype.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s)) => Tropical.untrop.{u2} (WithTop.{u2} R) (f (Subtype.val.{succ u1} S (fun (x : S) => Membership.mem.{u1, u1} S (Finset.{u1} S) (Finset.instMembershipFinset.{u1} S) x s) i))))
Case conversion may be inaccurate. Consider using '#align finset.untrop_sum Finset.untrop_sumₓ'. -/
/-- Note we cannot use `i ∈ s` instead of `i : s` here
as it is simply not true on conditionally complete lattices! -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Lemmas around this were a mess, throth in terms of names, statement and location. This PR standardises everything to be in Algebra.BigOperators.Basic
and changes the lemmas to take in InjOn
and SurjOn
assumptions where possible (and where impossible make sure the hypotheses are taken in the correct order) and moves the equality of functions hypothesis last.
Also add a few lemmas that help fix downstream uses by golfing.
From LeanAPAP and LeanCamCombi
@@ -142,5 +142,5 @@ theorem untrop_sum [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → T
as it is simply not true on conditionally complete lattices! -/
theorem Finset.untrop_sum [ConditionallyCompleteLinearOrder R] (s : Finset S)
(f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = ⨅ i : s, untrop (f i) := by
- simpa [← _root_.untrop_sum] using sum_attach.symm
+ simpa [← _root_.untrop_sum] using (sum_attach _ _).symm
#align finset.untrop_sum Finset.untrop_sum
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -35,7 +35,7 @@ directly transfer to minima over multisets or finsets.
open BigOperators
-variable {R S : Type _}
+variable {R S : Type*}
open Tropical Finset
@@ -2,17 +2,14 @@
Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-
-! This file was ported from Lean 3 source module algebra.tropical.big_operators
-! leanprover-community/mathlib commit d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.BigOperators.Basic
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
+#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
+
/-!
# Tropicalization of finitary operations
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -101,17 +101,17 @@ theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → R
rfl
#align finset.trop_inf Finset.trop_inf
-theorem trop_infₛ_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : S → WithTop R) :
- trop (infₛ (f '' s)) = ∑ i in s, trop (f i) := by
+theorem trop_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : S → WithTop R) :
+ trop (sInf (f '' s)) = ∑ i in s, trop (f i) := by
rcases s.eq_empty_or_nonempty with (rfl | h)
- · simp only [Set.image_empty, coe_empty, sum_empty, WithTop.infₛ_empty, trop_top]
- rw [← inf'_eq_cinfₛ_image _ h, inf'_eq_inf, s.trop_inf]
-#align trop_Inf_image trop_infₛ_image
+ · simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, trop_top]
+ rw [← inf'_eq_csInf_image _ h, inf'_eq_inf, s.trop_inf]
+#align trop_Inf_image trop_sInf_image
-theorem trop_infᵢ [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → WithTop R) :
+theorem trop_iInf [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → WithTop R) :
trop (⨅ i : S, f i) = ∑ i : S, trop (f i) := by
- rw [infᵢ, ← Set.image_univ, ← coe_univ, trop_infₛ_image]
-#align trop_infi trop_infᵢ
+ rw [iInf, ← Set.image_univ, ← coe_univ, trop_sInf_image]
+#align trop_infi trop_iInf
theorem Multiset.untrop_sum [LinearOrder R] [OrderTop R] (s : Multiset (Tropical R)) :
untrop s.sum = Multiset.inf (s.map untrop) := by
@@ -128,16 +128,16 @@ theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S
rfl
#align finset.untrop_sum' Finset.untrop_sum'
-theorem untrop_sum_eq_infₛ_image [ConditionallyCompleteLinearOrder R] (s : Finset S)
- (f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = infₛ (untrop ∘ f '' s) := by
+theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S)
+ (f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = sInf (untrop ∘ f '' s) := by
rcases s.eq_empty_or_nonempty with (rfl | h)
- · simp only [Set.image_empty, coe_empty, sum_empty, WithTop.infₛ_empty, untrop_zero]
- · rw [← inf'_eq_cinfₛ_image _ h, inf'_eq_inf, Finset.untrop_sum']
-#align untrop_sum_eq_Inf_image untrop_sum_eq_infₛ_image
+ · simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, untrop_zero]
+ · rw [← inf'_eq_csInf_image _ h, inf'_eq_inf, Finset.untrop_sum']
+#align untrop_sum_eq_Inf_image untrop_sum_eq_sInf_image
theorem untrop_sum [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → Tropical (WithTop R)) :
untrop (∑ i : S, f i) = ⨅ i : S, untrop (f i) := by
- rw [infᵢ,← Set.image_univ,← coe_univ, untrop_sum_eq_infₛ_image]
+ rw [iInf,← Set.image_univ,← coe_univ, untrop_sum_eq_sInf_image]
rfl
#align untrop_sum untrop_sum
@@ -36,8 +36,7 @@ directly transfer to minima over multisets or finsets.
-/
--- Porting note: commented out the next line
--- open BigOperators
+open BigOperators
variable {R S : Type _}
@@ -106,7 +106,7 @@ theorem trop_infₛ_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f
trop (infₛ (f '' s)) = ∑ i in s, trop (f i) := by
rcases s.eq_empty_or_nonempty with (rfl | h)
· simp only [Set.image_empty, coe_empty, sum_empty, WithTop.infₛ_empty, trop_top]
- rw [← inf'_eq_cInf_image _ h, inf'_eq_inf, s.trop_inf]
+ rw [← inf'_eq_cinfₛ_image _ h, inf'_eq_inf, s.trop_inf]
#align trop_Inf_image trop_infₛ_image
theorem trop_infᵢ [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → WithTop R) :
@@ -133,7 +133,7 @@ theorem untrop_sum_eq_infₛ_image [ConditionallyCompleteLinearOrder R] (s : Fin
(f : S → Tropical (WithTop R)) : untrop (∑ i in s, f i) = infₛ (untrop ∘ f '' s) := by
rcases s.eq_empty_or_nonempty with (rfl | h)
· simp only [Set.image_empty, coe_empty, sum_empty, WithTop.infₛ_empty, untrop_zero]
- · rw [← inf'_eq_cInf_image _ h, inf'_eq_inf, Finset.untrop_sum']
+ · rw [← inf'_eq_cinfₛ_image _ h, inf'_eq_inf, Finset.untrop_sum']
#align untrop_sum_eq_Inf_image untrop_sum_eq_infₛ_image
theorem untrop_sum [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → Tropical (WithTop R)) :
The unported dependencies are