File: Mathlib/Algebra/Tropical/Basic.lean

full_name: Tropical
code: /-- The tropicalization of a type `R`. -/
def Tropical : Type u 
goal: Type u

full_name: Tropical.trop
code: /-- Reinterpret `x : R` as an element of `Tropical R`.
See `Tropical.tropEquiv` for the equivalence.
-/
def trop : R → Tropical R 
goal: R → Tropical R

full_name: Tropical.untrop
code: /-- Reinterpret `x : Tropical R` as an element of `R`.
See `Tropical.tropEquiv` for the equivalence. -/
@[pp_nodot]
def untrop : Tropical R → R 
goal: Tropical R → R

full_name: Tropical.trop_injective
code: theorem trop_injective : Function.Injective (trop : R → Tropical R) 
goal: Function.Injective Tropical.trop

full_name: Tropical.untrop_injective
code: theorem untrop_injective : Function.Injective (untrop : Tropical R → R) 
goal: Function.Injective Tropical.untrop

full_name: Tropical.trop_inj_iff
code: @[simp]
theorem trop_inj_iff (x y : R) : trop x = trop y ↔ x = y 
goal: Tropical.trop x = Tropical.trop y ↔ x = y

full_name: Tropical.untrop_inj_iff
code: @[simp]
theorem untrop_inj_iff (x y : Tropical R) : untrop x = untrop y ↔ x = y 
goal: Tropical.untrop x = Tropical.untrop y ↔ x = y

full_name: Tropical.trop_untrop
code: @[simp]
theorem trop_untrop (x : Tropical R) : trop (untrop x) = x 
goal: Tropical.trop (Tropical.untrop x) = x

full_name: Tropical.untrop_trop
code: @[simp]
theorem untrop_trop (x : R) : untrop (trop x) = x 
goal: Tropical.untrop (Tropical.trop x) = x

full_name: Tropical.leftInverse_trop
code: theorem leftInverse_trop : Function.LeftInverse (trop : R → Tropical R) untrop 
goal: Function.LeftInverse Tropical.trop Tropical.untrop

full_name: Tropical.rightInverse_trop
code: theorem rightInverse_trop : Function.RightInverse (trop : R → Tropical R) untrop 
goal: Function.RightInverse Tropical.trop Tropical.untrop

full_name: Tropical.tropEquiv
code: /-- Reinterpret `x : R` as an element of `Tropical R`.
See `Tropical.tropOrderIso` for the order-preserving equivalence. -/
def tropEquiv : R ≃ Tropical R 
goal: R ≃ Tropical R

full_name: Tropical.tropEquiv_coe_fn
code: @[simp]
theorem tropEquiv_coe_fn : (tropEquiv : R → Tropical R) = trop 
goal: ⇑Tropical.tropEquiv = Tropical.trop

full_name: Tropical.tropEquiv_symm_coe_fn
code: @[simp]
theorem tropEquiv_symm_coe_fn : (tropEquiv.symm : Tropical R → R) = untrop 
goal: ⇑Tropical.tropEquiv.symm = Tropical.untrop

full_name: Tropical.trop_eq_iff_eq_untrop
code: theorem trop_eq_iff_eq_untrop {x : R} {y} : trop x = y ↔ x = untrop y 
goal: Tropical.trop x = y ↔ x = Tropical.untrop y

full_name: Tropical.untrop_eq_iff_eq_trop
code: theorem untrop_eq_iff_eq_trop {x} {y : R} : untrop x = y ↔ x = trop y 
goal: Tropical.untrop x = y ↔ x = Tropical.trop y

full_name: Tropical.injective_trop
code: theorem injective_trop : Function.Injective (trop : R → Tropical R) 
goal: Function.Injective Tropical.trop

full_name: Tropical.injective_untrop
code: theorem injective_untrop : Function.Injective (untrop : Tropical R → R) 
goal: Function.Injective Tropical.untrop

full_name: Tropical.surjective_trop
code: theorem surjective_trop : Function.Surjective (trop : R → Tropical R) 
goal: Function.Surjective Tropical.trop

full_name: Tropical.surjective_untrop
code: theorem surjective_untrop : Function.Surjective (untrop : Tropical R → R) 
goal: Function.Surjective Tropical.untrop

full_name: Tropical.instInhabited
code: instance [Inhabited R] : Inhabited (Tropical R) 
goal: Inhabited (Tropical R)

full_name: Tropical.tropRec
code: /-- Recursing on an `x' : Tropical R` is the same as recursing on an `x : R` reinterpreted
as a term of `Tropical R` via `trop x`. -/
@[simp]
def tropRec {F : Tropical R → Sort v} (h : ∀ X, F (trop X)) : ∀ X, F X 
goal: F X

full_name: Tropical.instDecidableEq
code: instance [DecidableEq R] : DecidableEq (Tropical R) 
goal: DecidableEq (Tropical R)

full_name: Tropical.instLETropical
code: instance instLETropical [LE R] : LE (Tropical R) 
goal: LE (Tropical R)

full_name: Tropical.untrop_le_iff
code: @[simp]
theorem untrop_le_iff [LE R] {x y : Tropical R} : untrop x ≤ untrop y ↔ x ≤ y 
goal: Tropical.untrop x ≤ Tropical.untrop y ↔ x ≤ y

full_name: Tropical.decidableLE
code: instance decidableLE [LE R] [DecidableRel ((· ≤ ·) : R → R → Prop)] :
    DecidableRel ((· ≤ ·) : Tropical R → Tropical R → Prop) 
goal: DecidableRel fun x x_1 => x ≤ x_1

full_name: Tropical.instLTTropical
code: instance instLTTropical [LT R] : LT (Tropical R) 
goal: LT (Tropical R)

full_name: Tropical.untrop_lt_iff
code: @[simp]
theorem untrop_lt_iff [LT R] {x y : Tropical R} : untrop x < untrop y ↔ x < y 
goal: Tropical.untrop x < Tropical.untrop y ↔ x < y

full_name: Tropical.decidableLT
code: instance decidableLT [LT R] [DecidableRel ((· < ·) : R → R → Prop)] :
    DecidableRel ((· < ·) : Tropical R → Tropical R → Prop) 
goal: DecidableRel fun x x_1 => x < x_1

full_name: Tropical.instPreorderTropical
code: instance instPreorderTropical [Preorder R] : Preorder (Tropical R) 
goal: Preorder (Tropical R)

full_name: Tropical.tropOrderIso
code: /-- Reinterpret `x : R` as an element of `Tropical R`, preserving the order. -/
def tropOrderIso [Preorder R] : R ≃o Tropical R 
goal: R ≃o Tropical R

full_name: Tropical.tropOrderIso_coe_fn
code: @[simp]
theorem tropOrderIso_coe_fn [Preorder R] : (tropOrderIso : R → Tropical R) = trop 
goal: ⇑Tropical.tropOrderIso = Tropical.trop

full_name: Tropical.tropOrderIso_symm_coe_fn
code: @[simp]
theorem tropOrderIso_symm_coe_fn [Preorder R] : (tropOrderIso.symm : Tropical R → R) = untrop 
goal: ⇑Tropical.tropOrderIso.symm = Tropical.untrop

full_name: Tropical.trop_monotone
code: theorem trop_monotone [Preorder R] : Monotone (trop : R → Tropical R) 
goal: Monotone Tropical.trop

full_name: Tropical.untrop_monotone
code: theorem untrop_monotone [Preorder R] : Monotone (untrop : Tropical R → R) 
goal: Monotone Tropical.untrop

full_name: Tropical.instPartialOrderTropical
code: instance instPartialOrderTropical [PartialOrder R] : PartialOrder (Tropical R) 
goal: PartialOrder (Tropical R)

full_name: Tropical.instZeroTropical
code: instance instZeroTropical [Top R] : Zero (Tropical R) 
goal: Zero (Tropical R)

full_name: Tropical.instTopTropical
code: instance instTopTropical [Top R] : Top (Tropical R) 
goal: Top (Tropical R)

full_name: Tropical.untrop_zero
code: @[simp]
theorem untrop_zero [Top R] : untrop (0 : Tropical R) = ⊤ 
goal: Tropical.untrop 0 = ⊤

full_name: Tropical.trop_top
code: @[simp]
theorem trop_top [Top R] : trop (⊤ : R) = 0 
goal: Tropical.trop ⊤ = 0

full_name: Tropical.trop_coe_ne_zero
code: @[simp]
theorem trop_coe_ne_zero (x : R) : trop (x : WithTop R) ≠ 0 
goal: Tropical.trop ↑x ≠ 0

full_name: Tropical.zero_ne_trop_coe
code: @[simp]
theorem zero_ne_trop_coe (x : R) : (0 : Tropical (WithTop R)) ≠ trop x 
goal: 0 ≠ Tropical.trop ↑x

full_name: Tropical.le_zero
code: @[simp]
theorem le_zero [LE R] [OrderTop R] (x : Tropical R) : x ≤ 0 
goal: x ≤ 0

full_name: Tropical.instOrderTop
code: instance [LE R] [OrderTop R] : OrderTop (Tropical R) 
goal: OrderTop (Tropical R)

full_name: Tropical.instAdd
code: /-- Tropical addition is the minimum of two underlying elements of `R`. -/
instance : Add (Tropical R) 
goal: Add (Tropical R)

full_name: Tropical.instAddCommSemigroupTropical
code: instance instAddCommSemigroupTropical : AddCommSemigroup (Tropical R) 
goal: AddCommSemigroup (Tropical R)

full_name: Tropical.untrop_add
code: @[simp]
theorem untrop_add (x y : Tropical R) : untrop (x + y) = min (untrop x) (untrop y) 
goal: Tropical.untrop (x + y) = min (Tropical.untrop x) (Tropical.untrop y)

full_name: Tropical.trop_min
code: @[simp]
theorem trop_min (x y : R) : trop (min x y) = trop x + trop y 
goal: Tropical.trop (min x y) = Tropical.trop x + Tropical.trop y

full_name: Tropical.trop_inf
code: @[simp]
theorem trop_inf (x y : R) : trop (x ⊓ y) = trop x + trop y 
goal: Tropical.trop (x ⊓ y) = Tropical.trop x + Tropical.trop y

full_name: Tropical.trop_add_def
code: theorem trop_add_def (x y : Tropical R) : x + y = trop (min (untrop x) (untrop y)) 
goal: x + y = Tropical.trop (min (Tropical.untrop x) (Tropical.untrop y))

full_name: Tropical.instLinearOrderTropical
code: instance instLinearOrderTropical : LinearOrder (Tropical R) 
goal: LinearOrder (Tropical R)

full_name: Tropical.untrop_sup
code: @[simp]
theorem untrop_sup (x y : Tropical R) : untrop (x ⊔ y) = untrop x ⊔ untrop y 
goal: Tropical.untrop (x ⊔ y) = Tropical.untrop x ⊔ Tropical.untrop y

full_name: Tropical.untrop_max
code: @[simp]
theorem untrop_max (x y : Tropical R) : untrop (max x y) = max (untrop x) (untrop y) 
goal: Tropical.untrop (max x y) = max (Tropical.untrop x) (Tropical.untrop y)

full_name: Tropical.min_eq_add
code: @[simp]
theorem min_eq_add : (min : Tropical R → Tropical R → Tropical R) = (· + ·) 
goal: min = fun x x_1 => x + x_1

full_name: Tropical.inf_eq_add
code: @[simp]
theorem inf_eq_add : ((· ⊓ ·) : Tropical R → Tropical R → Tropical R) = (· + ·) 
goal: (fun x x_1 => x ⊓ x_1) = fun x x_1 => x + x_1

full_name: Tropical.trop_max_def
code: theorem trop_max_def (x y : Tropical R) : max x y = trop (max (untrop x) (untrop y)) 
goal: max x y = Tropical.trop (max (Tropical.untrop x) (Tropical.untrop y))

full_name: Tropical.trop_sup_def
code: theorem trop_sup_def (x y : Tropical R) : x ⊔ y = trop (untrop x ⊔ untrop y) 
goal: x ⊔ y = Tropical.trop (Tropical.untrop x ⊔ Tropical.untrop y)

full_name: Tropical.add_eq_left
code: @[simp]
theorem add_eq_left ⦃x y : Tropical R⦄ (h : x ≤ y) : x + y = x 
goal: x + y = x

full_name: Tropical.add_eq_right
code: @[simp]
theorem add_eq_right ⦃x y : Tropical R⦄ (h : y ≤ x) : x + y = y 
goal: x + y = y

full_name: Tropical.add_eq_left_iff
code: theorem add_eq_left_iff {x y : Tropical R} : x + y = x ↔ x ≤ y 
goal: x + y = x ↔ x ≤ y

full_name: Tropical.add_eq_right_iff
code: theorem add_eq_right_iff {x y : Tropical R} : x + y = y ↔ y ≤ x 
goal: x + y = y ↔ y ≤ x

full_name: Tropical.add_self
code: theorem add_self (x : Tropical R) : x + x = x 
goal: x + x = x

full_name: Tropical.add_eq_iff
code: theorem add_eq_iff {x y z : Tropical R} : x + y = z ↔ x = z ∧ x ≤ y ∨ y = z ∧ y ≤ x 
goal: x + y = z ↔ x = z ∧ x ≤ y ∨ y = z ∧ y ≤ x

full_name: Tropical.add_eq_zero_iff
code: @[simp]
theorem add_eq_zero_iff {a b : Tropical (WithTop R)} : a + b = 0 ↔ a = 0 ∧ b = 0 
goal: a + b = 0 ↔ a = 0 ∧ b = 0

full_name: Tropical.instAddCommMonoidTropical
code: instance instAddCommMonoidTropical [OrderTop R] : AddCommMonoid (Tropical R) 
goal: AddCommMonoid (Tropical R)

full_name: Tropical.instMulOfAdd
code: /-- Tropical multiplication is the addition in the underlying `R`. -/
instance [Add R] : Mul (Tropical R) 
goal: Mul (Tropical R)

full_name: Tropical.trop_add
code: @[simp]
theorem trop_add [Add R] (x y : R) : trop (x + y) = trop x * trop y 
goal: Tropical.trop (x + y) = Tropical.trop x * Tropical.trop y

full_name: Tropical.untrop_mul
code: @[simp]
theorem untrop_mul [Add R] (x y : Tropical R) : untrop (x * y) = untrop x + untrop y 
goal: Tropical.untrop (x * y) = Tropical.untrop x + Tropical.untrop y

full_name: Tropical.trop_mul_def
code: theorem trop_mul_def [Add R] (x y : Tropical R) : x * y = trop (untrop x + untrop y) 
goal: x * y = Tropical.trop (Tropical.untrop x + Tropical.untrop y)

full_name: Tropical.instOneTropical
code: instance instOneTropical [Zero R] : One (Tropical R) 
goal: One (Tropical R)

full_name: Tropical.trop_zero
code: @[simp]
theorem trop_zero [Zero R] : trop (0 : R) = 1 
goal: Tropical.trop 0 = 1

full_name: Tropical.untrop_one
code: @[simp]
theorem untrop_one [Zero R] : untrop (1 : Tropical R) = 0 
goal: Tropical.untrop 1 = 0

full_name: Tropical.instAddMonoidWithOneTropical
code: instance instAddMonoidWithOneTropical [LinearOrder R] [OrderTop R] [Zero R] :
    AddMonoidWithOne (Tropical R) 
goal: AddMonoidWithOne (Tropical R)

full_name: Tropical.instNontrivialWithTopOfZero
code: instance [Zero R] : Nontrivial (Tropical (WithTop R)) 
goal: Nontrivial (Tropical (WithTop R))

full_name: Tropical.instInvOfNeg
code: instance [Neg R] : Inv (Tropical R) 
goal: Inv (Tropical R)

full_name: Tropical.untrop_inv
code: @[simp]
theorem untrop_inv [Neg R] (x : Tropical R) : untrop x⁻¹ = -untrop x 
goal: Tropical.untrop x⁻¹ = -Tropical.untrop x

full_name: Tropical.instDivOfSub
code: instance [Sub R] : Div (Tropical R) 
goal: Div (Tropical R)

full_name: Tropical.untrop_div
code: @[simp]
theorem untrop_div [Sub R] (x y : Tropical R) : untrop (x / y) = untrop x - untrop y 
goal: Tropical.untrop (x / y) = Tropical.untrop x - Tropical.untrop y

full_name: Tropical.instSemigroupTropical
code: instance instSemigroupTropical [AddSemigroup R] : Semigroup (Tropical R) 
goal: Semigroup (Tropical R)

full_name: Tropical.instCommSemigroupTropical
code: instance instCommSemigroupTropical [AddCommSemigroup R] : CommSemigroup (Tropical R) 
goal: CommSemigroup (Tropical R)

full_name: Tropical.instPowOfSMul
code: instance {α : Type*} [SMul α R] : Pow (Tropical R) α 
goal: Pow (Tropical R) α

full_name: Tropical.untrop_pow
code: @[simp]
theorem untrop_pow {α : Type*} [SMul α R] (x : Tropical R) (n : α) :
    untrop (x ^ n) = n • untrop x 
goal: Tropical.untrop (x ^ n) = n • Tropical.untrop x

full_name: Tropical.trop_smul
code: @[simp]
theorem trop_smul {α : Type*} [SMul α R] (x : R) (n : α) : trop (n • x) = trop x ^ n 
goal: Tropical.trop (n • x) = Tropical.trop x ^ n

full_name: Tropical.instMulOneClassTropical
code: instance instMulOneClassTropical [AddZeroClass R] : MulOneClass (Tropical R) 
goal: MulOneClass (Tropical R)

full_name: Tropical.instMonoidTropical
code: instance instMonoidTropical [AddMonoid R] : Monoid (Tropical R) 
goal: Monoid (Tropical R)

full_name: Tropical.trop_nsmul
code: @[simp]
theorem trop_nsmul [AddMonoid R] (x : R) (n : ℕ) : trop (n • x) = trop x ^ n 
goal: Tropical.trop (n • x) = Tropical.trop x ^ n

full_name: Tropical.instCommMonoidTropical
code: instance instCommMonoidTropical [AddCommMonoid R] : CommMonoid (Tropical R) 
goal: CommMonoid (Tropical R)

full_name: Tropical.instGroupTropical
code: instance instGroupTropical [AddGroup R] : Group (Tropical R) 
goal: Group (Tropical R)

full_name: Tropical.instCommGroupOfAddCommGroup
code: instance [AddCommGroup R] : CommGroup (Tropical R) 
goal: CommGroup (Tropical R)

full_name: Tropical.untrop_zpow
code: @[simp]
theorem untrop_zpow [AddGroup R] (x : Tropical R) (n : ℤ) : untrop (x ^ n) = n • untrop x 
goal: Tropical.untrop (x ^ n) = n • Tropical.untrop x

full_name: Tropical.trop_zsmul
code: @[simp]
theorem trop_zsmul [AddGroup R] (x : R) (n : ℤ) : trop (n • x) = trop x ^ n 
goal: Tropical.trop (n • x) = Tropical.trop x ^ n

full_name: Tropical.covariant_mul
code: instance covariant_mul [LE R] [Add R] [CovariantClass R R (· + ·) (· ≤ ·)] :
    CovariantClass (Tropical R) (Tropical R) (· * ·) (· ≤ ·) 
goal: CovariantClass (Tropical R) (Tropical R) (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1

full_name: Tropical.covariant_swap_mul
code: instance covariant_swap_mul [LE R] [Add R] [CovariantClass R R (Function.swap (· + ·)) (· ≤ ·)] :
    CovariantClass (Tropical R) (Tropical R) (Function.swap (· * ·)) (· ≤ ·) 
goal: CovariantClass (Tropical R) (Tropical R) (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1

full_name: Tropical.covariant_add
code: instance covariant_add [LinearOrder R] : CovariantClass (Tropical R) (Tropical R) (· + ·) (· ≤ ·) 
goal: CovariantClass (Tropical R) (Tropical R) (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1

full_name: Tropical.covariant_mul_lt
code: instance covariant_mul_lt [LT R] [Add R] [CovariantClass R R (· + ·) (· < ·)] :
    CovariantClass (Tropical R) (Tropical R) (· * ·) (· < ·) 
goal: CovariantClass (Tropical R) (Tropical R) (fun x x_1 => x * x_1) fun x x_1 => x < x_1

full_name: Tropical.covariant_swap_mul_lt
code: instance covariant_swap_mul_lt [Preorder R] [Add R]
    [CovariantClass R R (Function.swap (· + ·)) (· < ·)] :
    CovariantClass (Tropical R) (Tropical R) (Function.swap (· * ·)) (· < ·) 
goal: CovariantClass (Tropical R) (Tropical R) (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1

full_name: Tropical.instDistribTropical
code: instance instDistribTropical [LinearOrder R] [Add R] [CovariantClass R R (· + ·) (· ≤ ·)]
    [CovariantClass R R (Function.swap (· + ·)) (· ≤ ·)] :
    Distrib (Tropical R) 
goal: Distrib (Tropical R)

full_name: Tropical.add_pow
code: @[simp]
theorem add_pow [LinearOrder R] [AddMonoid R] [CovariantClass R R (· + ·) (· ≤ ·)]
    [CovariantClass R R (Function.swap (· + ·)) (· ≤ ·)] (x y : Tropical R) (n : ℕ) :
    (x + y) ^ n = x ^ n + y ^ n 
goal: (x + y) ^ n = x ^ n + y ^ n

full_name: Tropical.instCommSemiring
code: instance : CommSemiring (Tropical R) 
goal: CommSemiring (Tropical R)

full_name: Tropical.succ_nsmul
code: @[simp]
theorem succ_nsmul {R} [LinearOrder R] [OrderTop R] (x : Tropical R) (n : ℕ) : (n + 1) • x = x 
goal: (n + 1) • x = x

full_name: Tropical.mul_eq_zero_iff
code: theorem mul_eq_zero_iff {R : Type*} [LinearOrderedAddCommMonoid R] {a b : Tropical (WithTop R)} :
    a * b = 0 ↔ a = 0 ∨ b = 0 
goal: a * b = 0 ↔ a = 0 ∨ b = 0

full_name: Tropical.instNoZeroDivisorsWithTop
code: instance {R : Type*} [LinearOrderedAddCommMonoid R] : NoZeroDivisors (Tropical (WithTop R)) 
goal: NoZeroDivisors (Tropical (WithTop R))