algebra.tropical.lattice
⟷
Mathlib.Algebra.Tropical.Lattice
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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,8 +3,8 @@ 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.Tropical.Basic
-import Mathbin.Order.ConditionallyCompleteLattice.Basic
+import Algebra.Tropical.Basic
+import Order.ConditionallyCompleteLattice.Basic
#align_import algebra.tropical.lattice from "leanprover-community/mathlib"@"00f4ab49e7d5139216e0b3daad15fffa504897ab"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
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.lattice
-! leanprover-community/mathlib commit 00f4ab49e7d5139216e0b3daad15fffa504897ab
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Tropical.Basic
import Mathbin.Order.ConditionallyCompleteLattice.Basic
+#align_import algebra.tropical.lattice from "leanprover-community/mathlib"@"00f4ab49e7d5139216e0b3daad15fffa504897ab"
+
/-!
# Order on tropical algebraic structure
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -58,21 +58,21 @@ instance [SemilatticeSup R] : SemilatticeSup (Tropical R) :=
instance [Lattice R] : Lattice (Tropical R) :=
{ Tropical.semilatticeInf, Tropical.semilatticeSup with }
-instance [SupSet R] : SupSet (Tropical R) where supₛ s := trop (supₛ (untrop '' s))
+instance [SupSet R] : SupSet (Tropical R) where sSup s := trop (sSup (untrop '' s))
-instance [InfSet R] : InfSet (Tropical R) where infₛ s := trop (infₛ (untrop '' s))
+instance [InfSet R] : InfSet (Tropical R) where sInf s := trop (sInf (untrop '' s))
instance [ConditionallyCompleteLattice R] : ConditionallyCompleteLattice (Tropical R) :=
{ Tropical.hasSup, Tropical.hasInf,
Tropical.lattice with
le_cSup := fun s x hs hx =>
- le_csupₛ (untrop_monotone.map_bddAbove hs) (Set.mem_image_of_mem untrop hx)
+ le_csSup (untrop_monotone.map_bddAbove hs) (Set.mem_image_of_mem untrop hx)
cSup_le := fun s x hs hx =>
- csupₛ_le (hs.image untrop) (untrop_monotone.mem_upperBounds_image hx)
+ csSup_le (hs.image untrop) (untrop_monotone.mem_upperBounds_image hx)
le_cInf := fun s x hs hx =>
- le_cinfₛ (hs.image untrop) (untrop_monotone.mem_lowerBounds_image hx)
+ le_csInf (hs.image untrop) (untrop_monotone.mem_lowerBounds_image hx)
cInf_le := fun s x hs hx =>
- cinfₛ_le (untrop_monotone.map_bddBelow hs) (Set.mem_image_of_mem untrop hx) }
+ csInf_le (untrop_monotone.map_bddBelow hs) (Set.mem_image_of_mem untrop hx) }
instance [ConditionallyCompleteLinearOrder R] : ConditionallyCompleteLinearOrder (Tropical R) :=
{ Tropical.conditionallyCompleteLattice, Tropical.linearOrder with }
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -37,9 +37,9 @@ variable {R S : Type _}
open Tropical
-instance [HasSup R] : HasSup (Tropical R) where sup x y := trop (untrop x ⊔ untrop y)
+instance [Sup R] : Sup (Tropical R) where sup x y := trop (untrop x ⊔ untrop y)
-instance [HasInf R] : HasInf (Tropical R) where inf x y := trop (untrop x ⊓ untrop y)
+instance [Inf R] : Inf (Tropical R) where inf x y := trop (untrop x ⊓ untrop y)
instance [SemilatticeInf R] : SemilatticeInf (Tropical R) :=
{ Tropical.hasInf,
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Removes nonterminal simps on lines looking like simp [...]
@@ -76,7 +76,7 @@ instance [ConditionallyCompleteLinearOrder R] : ConditionallyCompleteLinearOrder
csSup_of_not_bddAbove := by
intro s hs
have : Set.range untrop = (Set.univ : Set R) := Equiv.range_eq_univ tropEquiv.symm
- simp [sSup, this]
+ simp only [sSup, Set.image_empty, trop_inj_iff]
apply csSup_of_not_bddAbove
contrapose! hs
change BddAbove (tropOrderIso.symm '' s) at hs
@@ -84,7 +84,7 @@ instance [ConditionallyCompleteLinearOrder R] : ConditionallyCompleteLinearOrder
csInf_of_not_bddBelow := by
intro s hs
have : Set.range untrop = (Set.univ : Set R) := Equiv.range_eq_univ tropEquiv.symm
- simp [sInf, this]
+ simp only [sInf, Set.image_empty, trop_inj_iff]
apply csInf_of_not_bddBelow
contrapose! hs
change BddBelow (tropOrderIso.symm '' s) at hs
@@ -62,7 +62,7 @@ instance instConditionallyCompleteLatticeTropical [ConditionallyCompleteLattice
ConditionallyCompleteLattice (Tropical R) :=
{ @instInfTropical R _, @instSupTropical R _,
instLatticeTropical with
- le_csSup := fun _s _x hs hx ↦
+ le_csSup := fun _s _x hs hx ↦
le_csSup (untrop_monotone.map_bddAbove hs) (Set.mem_image_of_mem untrop hx)
csSup_le := fun _s _x hs hx ↦
csSup_le (hs.image untrop) (untrop_monotone.mem_upperBounds_image hx)
Currently, in a conditionally complete linear order, the supremum of an unbounded set hasn't any specific property. However, in all instances in mathlib, all unbounded sets have the same supremum. This PR adds this requirement in mathlib. This will be convenient to remove boundedness assumptions in measurability statements.
@@ -72,4 +72,20 @@ instance instConditionallyCompleteLatticeTropical [ConditionallyCompleteLattice
csInf_le (untrop_monotone.map_bddBelow hs) (Set.mem_image_of_mem untrop hx) }
instance [ConditionallyCompleteLinearOrder R] : ConditionallyCompleteLinearOrder (Tropical R) :=
- { instConditionallyCompleteLatticeTropical, Tropical.instLinearOrderTropical with }
+ { instConditionallyCompleteLatticeTropical, Tropical.instLinearOrderTropical with
+ csSup_of_not_bddAbove := by
+ intro s hs
+ have : Set.range untrop = (Set.univ : Set R) := Equiv.range_eq_univ tropEquiv.symm
+ simp [sSup, this]
+ apply csSup_of_not_bddAbove
+ contrapose! hs
+ change BddAbove (tropOrderIso.symm '' s) at hs
+ exact tropOrderIso.symm.bddAbove_image.1 hs
+ csInf_of_not_bddBelow := by
+ intro s hs
+ have : Set.range untrop = (Set.univ : Set R) := Equiv.range_eq_univ tropEquiv.symm
+ simp [sInf, this]
+ apply csInf_of_not_bddBelow
+ contrapose! hs
+ change BddBelow (tropOrderIso.symm '' s) at hs
+ exact tropOrderIso.symm.bddBelow_image.1 hs }
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -27,7 +27,7 @@ constructions quicker to implement.
-/
-variable {R S : Type _}
+variable {R S : Type*}
open Tropical
Per https://github.com/leanprover/lean4/issues/2343, we are going to need to change the automatic generation of instance names, as they become too long.
This PR ensures that everywhere in Mathlib that refers to an instance by name, that name is given explicitly, rather than being automatically generated.
There are four exceptions, which are now commented, with links to https://github.com/leanprover/lean4/issues/2343.
This was implemented by running Mathlib against a modified Lean that appended _ᾰ
to all automatically generated names, and fixing everything.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -31,34 +31,35 @@ variable {R S : Type _}
open Tropical
-instance [Sup R] : Sup (Tropical R) where
+instance instSupTropical [Sup R] : Sup (Tropical R) where
sup x y := trop (untrop x ⊔ untrop y)
-instance [Inf R] : Inf (Tropical R) where
+instance instInfTropical [Inf R] : Inf (Tropical R) where
inf x y := trop (untrop x ⊓ untrop y)
-instance [SemilatticeInf R] : SemilatticeInf (Tropical R) :=
+instance instSemilatticeInfTropical [SemilatticeInf R] : SemilatticeInf (Tropical R) :=
{ instInfTropical,
Tropical.instPartialOrderTropical with
le_inf := fun _ _ _ ↦ @SemilatticeInf.le_inf R _ _ _ _
inf_le_left := fun _ _ ↦ inf_le_left
inf_le_right := fun _ _ ↦ inf_le_right }
-instance [SemilatticeSup R] : SemilatticeSup (Tropical R) :=
+instance instSemilatticeSupTropical [SemilatticeSup R] : SemilatticeSup (Tropical R) :=
{ instSupTropical,
Tropical.instPartialOrderTropical with
sup_le := fun _ _ _ ↦ @SemilatticeSup.sup_le R _ _ _ _
le_sup_left := fun _ _ ↦ le_sup_left
le_sup_right := fun _ _ ↦ le_sup_right }
-instance [Lattice R] : Lattice (Tropical R) :=
+instance instLatticeTropical [Lattice R] : Lattice (Tropical R) :=
{ instSemilatticeInfTropical, instSemilatticeSupTropical with }
instance [SupSet R] : SupSet (Tropical R) where sSup s := trop (sSup (untrop '' s))
instance [InfSet R] : InfSet (Tropical R) where sInf s := trop (sInf (untrop '' s))
-instance [ConditionallyCompleteLattice R] : ConditionallyCompleteLattice (Tropical R) :=
+instance instConditionallyCompleteLatticeTropical [ConditionallyCompleteLattice R] :
+ ConditionallyCompleteLattice (Tropical R) :=
{ @instInfTropical R _, @instSupTropical R _,
instLatticeTropical with
le_csSup := fun _s _x hs hx ↦
@@ -2,15 +2,12 @@
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.lattice
-! leanprover-community/mathlib commit 6d0adfa76594f304b4650d098273d4366edeb61b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Basic
+#align_import algebra.tropical.lattice from "leanprover-community/mathlib"@"6d0adfa76594f304b4650d098273d4366edeb61b"
+
/-!
# Order on tropical algebraic structure
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>
@@ -57,21 +57,21 @@ instance [SemilatticeSup R] : SemilatticeSup (Tropical R) :=
instance [Lattice R] : Lattice (Tropical R) :=
{ instSemilatticeInfTropical, instSemilatticeSupTropical with }
-instance [SupSet R] : SupSet (Tropical R) where supₛ s := trop (supₛ (untrop '' s))
+instance [SupSet R] : SupSet (Tropical R) where sSup s := trop (sSup (untrop '' s))
-instance [InfSet R] : InfSet (Tropical R) where infₛ s := trop (infₛ (untrop '' s))
+instance [InfSet R] : InfSet (Tropical R) where sInf s := trop (sInf (untrop '' s))
instance [ConditionallyCompleteLattice R] : ConditionallyCompleteLattice (Tropical R) :=
{ @instInfTropical R _, @instSupTropical R _,
instLatticeTropical with
- le_csupₛ := fun _s _x hs hx ↦
- le_csupₛ (untrop_monotone.map_bddAbove hs) (Set.mem_image_of_mem untrop hx)
- csupₛ_le := fun _s _x hs hx ↦
- csupₛ_le (hs.image untrop) (untrop_monotone.mem_upperBounds_image hx)
- le_cinfₛ := fun _s _x hs hx ↦
- le_cinfₛ (hs.image untrop) (untrop_monotone.mem_lowerBounds_image hx)
- cinfₛ_le := fun _s _x hs hx ↦
- cinfₛ_le (untrop_monotone.map_bddBelow hs) (Set.mem_image_of_mem untrop hx) }
+ le_csSup := fun _s _x hs hx ↦
+ le_csSup (untrop_monotone.map_bddAbove hs) (Set.mem_image_of_mem untrop hx)
+ csSup_le := fun _s _x hs hx ↦
+ csSup_le (hs.image untrop) (untrop_monotone.mem_upperBounds_image hx)
+ le_csInf := fun _s _x hs hx ↦
+ le_csInf (hs.image untrop) (untrop_monotone.mem_lowerBounds_image hx)
+ csInf_le := fun _s _x hs hx ↦
+ csInf_le (untrop_monotone.map_bddBelow hs) (Set.mem_image_of_mem untrop hx) }
instance [ConditionallyCompleteLinearOrder R] : ConditionallyCompleteLinearOrder (Tropical R) :=
{ instConditionallyCompleteLatticeTropical, Tropical.instLinearOrderTropical with }
@@ -34,21 +34,21 @@ variable {R S : Type _}
open Tropical
-instance [HasSup R] : HasSup (Tropical R) where
+instance [Sup R] : Sup (Tropical R) where
sup x y := trop (untrop x ⊔ untrop y)
-instance [HasInf R] : HasInf (Tropical R) where
+instance [Inf R] : Inf (Tropical R) where
inf x y := trop (untrop x ⊓ untrop y)
instance [SemilatticeInf R] : SemilatticeInf (Tropical R) :=
- { instHasInfTropical,
+ { instInfTropical,
Tropical.instPartialOrderTropical with
le_inf := fun _ _ _ ↦ @SemilatticeInf.le_inf R _ _ _ _
inf_le_left := fun _ _ ↦ inf_le_left
inf_le_right := fun _ _ ↦ inf_le_right }
instance [SemilatticeSup R] : SemilatticeSup (Tropical R) :=
- { instHasSupTropical,
+ { instSupTropical,
Tropical.instPartialOrderTropical with
sup_le := fun _ _ _ ↦ @SemilatticeSup.sup_le R _ _ _ _
le_sup_left := fun _ _ ↦ le_sup_left
@@ -62,7 +62,7 @@ instance [SupSet R] : SupSet (Tropical R) where supₛ s := trop (supₛ (untrop
instance [InfSet R] : InfSet (Tropical R) where infₛ s := trop (infₛ (untrop '' s))
instance [ConditionallyCompleteLattice R] : ConditionallyCompleteLattice (Tropical R) :=
- { @instHasInfTropical R _, @instHasSupTropical R _,
+ { @instInfTropical R _, @instSupTropical R _,
instLatticeTropical with
le_csupₛ := fun _s _x hs hx ↦
le_csupₛ (untrop_monotone.map_bddAbove hs) (Set.mem_image_of_mem untrop hx)
The unported dependencies are