File: Mathlib/Order/WithBot.lean

full_name: WithBot
code: /-- Attach `⊥` to a type. -/
def WithBot (α : Type*) 
goal: Type u_5

full_name: WithBot.instRepr
code: instance [Repr α] : Repr (WithBot α) 
goal: Repr (WithBot α)

full_name: WithBot.some
code: /-- The canonical map from `α` into `WithBot α` -/
@[coe, match_pattern] def some : α → WithBot α 
goal: α → WithBot α

full_name: WithBot.coe
code: instance coe : Coe α (WithBot α) 
goal: Coe α (WithBot α)

full_name: WithBot.bot
code: instance bot : Bot (WithBot α) 
goal: Bot (WithBot α)

full_name: WithBot.inhabited
code: instance inhabited : Inhabited (WithBot α) 
goal: Inhabited (WithBot α)

full_name: WithBot.nontrivial
code: instance nontrivial [Nonempty α] : Nontrivial (WithBot α) 
goal: Nontrivial (WithBot α)

full_name: WithBot.coe_injective
code: theorem coe_injective : Injective ((↑) : α → WithBot α) 
goal: Function.Injective WithBot.some

full_name: WithBot.coe_inj
code: @[simp, norm_cast]
theorem coe_inj : (a : WithBot α) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: WithBot.forall
code: protected theorem «forall» {p : WithBot α → Prop} : (∀ x, p x) ↔ p ⊥ ∧ ∀ x : α, p x 
goal: (∀ (x : WithBot α), p x) ↔ p ⊥ ∧ ∀ (x : α), p ↑x

full_name: WithBot.exists
code: protected theorem «exists» {p : WithBot α → Prop} : (∃ x, p x) ↔ p ⊥ ∨ ∃ x : α, p x 
goal: (∃ x, p x) ↔ p ⊥ ∨ ∃ x, p ↑x

full_name: WithBot.none_eq_bot
code: theorem none_eq_bot : (none : WithBot α) = (⊥ : WithBot α) 
goal: none = ⊥

full_name: WithBot.some_eq_coe
code: theorem some_eq_coe (a : α) : (Option.some a : WithBot α) = (↑a : WithBot α) 
goal: some a = ↑a

full_name: WithBot.bot_ne_coe
code: @[simp]
theorem bot_ne_coe : ⊥ ≠ (a : WithBot α) 
goal: ⊥ ≠ ↑a

full_name: WithBot.coe_ne_bot
code: @[simp]
theorem coe_ne_bot : (a : WithBot α) ≠ ⊥ 
goal: ↑a ≠ ⊥

full_name: WithBot.recBotCoe
code: /-- Recursor for `WithBot` using the preferred forms `⊥` and `↑a`. -/
@[elab_as_elim, induction_eliminator, cases_eliminator]
def recBotCoe {C : WithBot α → Sort*} (bot : C ⊥) (coe : ∀ a : α, C a) : ∀ n : WithBot α, C n
  
goal: C n

full_name: WithBot.recBotCoe_bot
code: @[simp]
theorem recBotCoe_bot {C : WithBot α → Sort*} (d : C ⊥) (f : ∀ a : α, C a) :
    @recBotCoe _ C d f ⊥ = d 
goal: WithBot.recBotCoe d f ⊥ = d

full_name: WithBot.recBotCoe_coe
code: @[simp]
theorem recBotCoe_coe {C : WithBot α → Sort*} (d : C ⊥) (f : ∀ a : α, C a) (x : α) :
    @recBotCoe _ C d f ↑x = f x 
goal: WithBot.recBotCoe d f ↑x = f x

full_name: WithBot.unbot'
code: /-- Specialization of `Option.getD` to values in `WithBot α` that respects API boundaries.
-/
def unbot' (d : α) (x : WithBot α) : α 
goal: α

full_name: WithBot.unbot'_bot
code: @[simp]
theorem unbot'_bot {α} (d : α) : unbot' d ⊥ = d 
goal: WithBot.unbot' d ⊥ = d

full_name: WithBot.unbot'_coe
code: @[simp]
theorem unbot'_coe {α} (d x : α) : unbot' d x = x 
goal: WithBot.unbot' d ↑x = x

full_name: WithBot.coe_eq_coe
code: theorem coe_eq_coe : (a : WithBot α) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: WithBot.unbot'_eq_iff
code: theorem unbot'_eq_iff {d y : α} {x : WithBot α} : unbot' d x = y ↔ x = y ∨ x = ⊥ ∧ y = d 
goal: WithBot.unbot' d x = y ↔ x = ↑y ∨ x = ⊥ ∧ y = d

full_name: WithBot.unbot'_eq_self_iff
code: @[simp] theorem unbot'_eq_self_iff {d : α} {x : WithBot α} : unbot' d x = d ↔ x = d ∨ x = ⊥ 
goal: WithBot.unbot' d x = d ↔ x = ↑d ∨ x = ⊥

full_name: WithBot.unbot'_eq_unbot'_iff
code: theorem unbot'_eq_unbot'_iff {d : α} {x y : WithBot α} :
    unbot' d x = unbot' d y ↔ x = y ∨ x = d ∧ y = ⊥ ∨ x = ⊥ ∧ y = d 
goal: WithBot.unbot' d x = WithBot.unbot' d y ↔ x = y ∨ x = ↑d ∧ y = ⊥ ∨ x = ⊥ ∧ y = ↑d

full_name: WithBot.map
code: /-- Lift a map `f : α → β` to `WithBot α → WithBot β`. Implemented using `Option.map`. -/
def map (f : α → β) : WithBot α → WithBot β 
goal: WithBot α → WithBot β

full_name: WithBot.map_bot
code: @[simp]
theorem map_bot (f : α → β) : map f ⊥ = ⊥ 
goal: WithBot.map f ⊥ = ⊥

full_name: WithBot.map_coe
code: @[simp]
theorem map_coe (f : α → β) (a : α) : map f a = f a 
goal: WithBot.map f ↑a = ↑(f a)

full_name: WithBot.map_comm
code: theorem map_comm {f₁ : α → β} {f₂ : α → γ} {g₁ : β → δ} {g₂ : γ → δ}
    (h : g₁ ∘ f₁ = g₂ ∘ f₂) (a : α) :
    map g₁ (map f₁ a) = map g₂ (map f₂ a) 
goal: WithBot.map g₁ (WithBot.map f₁ ↑a) = WithBot.map g₂ (WithBot.map f₂ ↑a)

full_name: WithBot.map₂
code: /-- The image of a binary function `f : α → β → γ` as a function
`WithBot α → WithBot β → WithBot γ`.

Mathematically this should be thought of as the image of the corresponding function `α × β → γ`. -/
def map₂ : (α → β → γ) → WithBot α → WithBot β → WithBot γ 
goal: (α → β → γ) → WithBot α → WithBot β → WithBot γ

full_name: WithBot.map₂_coe_coe
code: lemma map₂_coe_coe (f : α → β → γ) (a : α) (b : β) : map₂ f a b = f a b 
goal: WithBot.map₂ f ↑a ↑b = ↑(f a b)

full_name: WithBot.map₂_bot_left
code: @[simp] lemma map₂_bot_left (f : α → β → γ) (b) : map₂ f ⊥ b = ⊥ 
goal: WithBot.map₂ f ⊥ b = ⊥

full_name: WithBot.map₂_bot_right
code: @[simp] lemma map₂_bot_right (f : α → β → γ) (a) : map₂ f a ⊥ = ⊥ 
goal: WithBot.map₂ f a ⊥ = ⊥

full_name: WithBot.map₂_coe_left
code: @[simp] lemma map₂_coe_left (f : α → β → γ) (a : α) (b) : map₂ f a b = b.map fun b ↦ f a b 
goal: WithBot.map₂ f (↑a) b = WithBot.map (fun b => f a b) b

full_name: WithBot.map₂_coe_right
code: @[simp] lemma map₂_coe_right (f : α → β → γ) (a) (b : β) : map₂ f a b = a.map (f · b) 
goal: WithBot.map₂ f a ↑b = WithBot.map (fun x => f x b) a

full_name: WithBot.map₂_eq_bot_iff
code: @[simp] lemma map₂_eq_bot_iff {f : α → β → γ} {a : WithBot α} {b : WithBot β} :
    map₂ f a b = ⊥ ↔ a = ⊥ ∨ b = ⊥ 
goal: WithBot.map₂ f a b = ⊥ ↔ a = ⊥ ∨ b = ⊥

full_name: WithBot.ne_bot_iff_exists
code: lemma ne_bot_iff_exists {x : WithBot α} : x ≠ ⊥ ↔ ∃ a : α, ↑a = x 
goal: x ≠ ⊥ ↔ ∃ a, ↑a = x

full_name: WithBot.forall_ne_iff_eq_bot
code: lemma forall_ne_iff_eq_bot {x : WithBot α} : (∀ a : α, ↑a ≠ x) ↔ x = ⊥ 
goal: (∀ (a : α), ↑a ≠ x) ↔ x = ⊥

full_name: WithBot.unbot
code: /-- Deconstruct a `x : WithBot α` to the underlying value in `α`, given a proof that `x ≠ ⊥`. -/
def unbot : ∀ x : WithBot α, x ≠ ⊥ → α 
goal: x ≠ ⊥ → α

full_name: WithBot.coe_unbot
code: @[simp] lemma coe_unbot : ∀ (x : WithBot α) hx, x.unbot hx = x 
goal: ↑(x.unbot hx) = x

full_name: WithBot.unbot_coe
code: @[simp]
theorem unbot_coe (x : α) (h : (x : WithBot α) ≠ ⊥ := coe_ne_bot) : (x : WithBot α).unbot h = x 
goal: (↑x).unbot h = x

full_name: WithBot.canLift
code: instance canLift : CanLift (WithBot α) α (↑) fun r => r ≠ ⊥ 
goal: CanLift (WithBot α) α WithBot.some fun r => r ≠ ⊥

full_name: WithBot.instTop
code: instance instTop [Top α] : Top (WithBot α) 
goal: Top (WithBot α)

full_name: WithBot.coe_top
code: @[simp, norm_cast] lemma coe_top [Top α] : ((⊤ : α) : WithBot α) = ⊤ 
goal: ↑⊤ = ⊤

full_name: WithBot.coe_eq_top
code: @[simp, norm_cast] lemma coe_eq_top [Top α] {a : α} : (a : WithBot α) = ⊤ ↔ a = ⊤ 
goal: ↑a = ⊤ ↔ a = ⊤

full_name: WithBot.top_eq_coe
code: @[simp, norm_cast] lemma top_eq_coe [Top α] {a : α} : ⊤ = (a : WithBot α) ↔ ⊤ = a 
goal: ⊤ = ↑a ↔ ⊤ = a

full_name: WithBot.le
code: instance (priority := 10) le : LE (WithBot α) 
goal: LE (WithBot α)

full_name: WithBot.coe_le_coe
code: @[simp, norm_cast]
theorem coe_le_coe : (a : WithBot α) ≤ b ↔ a ≤ b 
goal: ↑a ≤ ↑b ↔ a ≤ b

full_name: WithBot.orderBot
code: instance orderBot : OrderBot (WithBot α) 
goal: OrderBot (WithBot α)

full_name: WithBot.some_le_some
code: @[simp, deprecated coe_le_coe "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem some_le_some : @LE.le (WithBot α) _ (Option.some a) (Option.some b) ↔ a ≤ b 
goal: some a ≤ some b ↔ a ≤ b

full_name: WithBot.none_le
code: @[simp, deprecated bot_le "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem none_le {a : WithBot α} : @LE.le (WithBot α) _ none a 
goal: none ≤ a

full_name: WithBot.orderTop
code: instance orderTop [OrderTop α] : OrderTop (WithBot α) 
goal: OrderTop (WithBot α)

full_name: WithBot.instBoundedOrder
code: instance instBoundedOrder [OrderTop α] : BoundedOrder (WithBot α) 
goal: BoundedOrder (WithBot α)

full_name: WithBot.not_coe_le_bot
code: theorem not_coe_le_bot (a : α) : ¬(a : WithBot α) ≤ ⊥ 
goal: ¬↑a ≤ ⊥

full_name: WithBot.le_bot_iff
code: /-- There is a general version `le_bot_iff`, but this lemma does not require a `PartialOrder`. -/
@[simp]
protected theorem le_bot_iff : ∀ {a : WithBot α}, a ≤ ⊥ ↔ a = ⊥
  
goal: a ≤ ⊥ ↔ a = ⊥

full_name: WithBot.coe_le
code: theorem coe_le : ∀ {o : Option α}, b ∈ o → ((a : WithBot α) ≤ o ↔ a ≤ b)
  
goal: b ∈ o → (↑a ≤ o ↔ a ≤ b)

full_name: WithBot.coe_le_iff
code: theorem coe_le_iff : ∀ {x : WithBot α}, (a : WithBot α) ≤ x ↔ ∃ b : α, x = b ∧ a ≤ b
  
goal: ↑a ≤ x ↔ ∃ b, x = ↑b ∧ a ≤ b

full_name: WithBot.le_coe_iff
code: theorem le_coe_iff : ∀ {x : WithBot α}, x ≤ b ↔ ∀ a : α, x = ↑a → a ≤ b
  
goal: x ≤ ↑b ↔ ∀ (a : α), x = ↑a → a ≤ b

full_name: IsMax.withBot
code: protected theorem _root_.IsMax.withBot (h : IsMax a) : IsMax (a : WithBot α)
  
goal: IsMax ↑a

full_name: WithBot.le_unbot_iff
code: theorem le_unbot_iff {a : α} {b : WithBot α} (h : b ≠ ⊥) :
    a ≤ unbot b h ↔ (a : WithBot α) ≤ b 
goal: a ≤ b.unbot h ↔ ↑a ≤ b

full_name: WithBot.unbot_le_iff
code: theorem unbot_le_iff {a : WithBot α} (h : a ≠ ⊥) {b : α} :
    unbot a h ≤ b ↔ a ≤ (b : WithBot α) 
goal: a.unbot h ≤ b ↔ a ≤ ↑b

full_name: WithBot.unbot'_le_iff
code: theorem unbot'_le_iff {a : WithBot α} {b c : α} (h : a = ⊥ → b ≤ c) :
    a.unbot' b ≤ c ↔ a ≤ c 
goal: WithBot.unbot' b a ≤ c ↔ a ≤ ↑c

full_name: WithBot.lt
code: instance (priority := 10) lt : LT (WithBot α) 
goal: LT (WithBot α)

full_name: WithBot.coe_lt_coe
code: @[simp, norm_cast]
theorem coe_lt_coe : (a : WithBot α) < b ↔ a < b 
goal: ↑a < ↑b ↔ a < b

full_name: WithBot.bot_lt_coe
code: @[simp]
theorem bot_lt_coe (a : α) : ⊥ < (a : WithBot α) 
goal: ⊥ < ↑a

full_name: WithBot.not_lt_bot
code: @[simp]
protected theorem not_lt_bot (a : WithBot α) : ¬a < ⊥ 
goal: ¬a < ⊥

full_name: WithBot.some_lt_some
code: @[simp, deprecated coe_lt_coe "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem some_lt_some : @LT.lt (WithBot α) _ (Option.some a) (Option.some b) ↔ a < b 
goal: some a < some b ↔ a < b

full_name: WithBot.none_lt_some
code: @[simp, deprecated bot_lt_coe "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem none_lt_some (a : α) : @LT.lt (WithBot α) _ none (some a) 
goal: none < ↑a

full_name: WithBot.not_lt_none
code: @[simp, deprecated not_lt_bot "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem not_lt_none (a : WithBot α) : ¬@LT.lt (WithBot α) _ a none 
goal: ¬a < none

full_name: WithBot.lt_iff_exists_coe
code: theorem lt_iff_exists_coe : ∀ {a b : WithBot α}, a < b ↔ ∃ p : α, b = p ∧ a < p
  
goal: a < b ↔ ∃ p, b = ↑p ∧ a < ↑p

full_name: WithBot.lt_coe_iff
code: theorem lt_coe_iff : ∀ {x : WithBot α}, x < b ↔ ∀ a : α, x = a → a < b
  
goal: x < ↑b ↔ ∀ (a : α), x = ↑a → a < b

full_name: WithBot.bot_lt_iff_ne_bot
code: /-- A version of `bot_lt_iff_ne_bot` for `WithBot` that only requires `LT α`, not
`PartialOrder α`. -/
protected theorem bot_lt_iff_ne_bot : ∀ {x : WithBot α}, ⊥ < x ↔ x ≠ ⊥
  
goal: ⊥ < x ↔ x ≠ ⊥

full_name: WithBot.unbot'_lt_iff
code: theorem unbot'_lt_iff {a : WithBot α} {b c : α} (h : a = ⊥ → b < c) :
    a.unbot' b < c ↔ a < c 
goal: WithBot.unbot' b a < c ↔ a < ↑c

full_name: WithBot.preorder
code: instance preorder [Preorder α] : Preorder (WithBot α) 
goal: Preorder (WithBot α)

full_name: WithBot.partialOrder
code: instance partialOrder [PartialOrder α] : PartialOrder (WithBot α) 
goal: PartialOrder (WithBot α)

full_name: WithBot.coe_strictMono
code: theorem coe_strictMono : StrictMono (fun (a : α) => (a : WithBot α)) 
goal: StrictMono fun a => ↑a

full_name: WithBot.coe_mono
code: theorem coe_mono : Monotone (fun (a : α) => (a : WithBot α)) 
goal: Monotone fun a => ↑a

full_name: WithBot.monotone_iff
code: theorem monotone_iff {f : WithBot α → β} :
    Monotone f ↔ Monotone (fun a ↦ f a : α → β) ∧ ∀ x : α, f ⊥ ≤ f x 
goal: Monotone f ↔ (Monotone fun a => f ↑a) ∧ ∀ (x : α), f ⊥ ≤ f ↑x

full_name: WithBot.monotone_map_iff
code: @[simp]
theorem monotone_map_iff {f : α → β} : Monotone (WithBot.map f) ↔ Monotone f 
goal: Monotone (WithBot.map f) ↔ Monotone f

full_name: WithBot.strictMono_iff
code: theorem strictMono_iff {f : WithBot α → β} :
    StrictMono f ↔ StrictMono (fun a => f a : α → β) ∧ ∀ x : α, f ⊥ < f x 
goal: StrictMono f ↔ (StrictMono fun a => f ↑a) ∧ ∀ (x : α), f ⊥ < f ↑x

full_name: WithBot.strictAnti_iff
code: theorem strictAnti_iff {f : WithBot α → β} :
    StrictAnti f ↔ StrictAnti (fun a ↦ f a : α → β) ∧ ∀ x : α, f x < f ⊥ 
goal: StrictAnti f ↔ (StrictAnti fun a => f ↑a) ∧ ∀ (x : α), f ↑x < f ⊥

full_name: WithBot.strictMono_map_iff
code: @[simp]
theorem strictMono_map_iff {f : α → β} :
    StrictMono (WithBot.map f) ↔ StrictMono f 
goal: StrictMono (WithBot.map f) ↔ StrictMono f

full_name: WithBot.map_le_iff
code: theorem map_le_iff (f : α → β) (mono_iff : ∀ {a b}, f a ≤ f b ↔ a ≤ b) :
    ∀ a b : WithBot α, a.map f ≤ b.map f ↔ a ≤ b
  
goal: WithBot.map f a ≤ WithBot.map f b ↔ a ≤ b

full_name: WithBot.le_coe_unbot'
code: theorem le_coe_unbot' : ∀ (a : WithBot α) (b : α), a ≤ a.unbot' b
  
goal: a ≤ ↑(WithBot.unbot' b a)

full_name: WithBot.lt_coe_bot
code: @[simp]
theorem lt_coe_bot [OrderBot α] : ∀ {x : WithBot α}, x < (⊥ : α) ↔ x = ⊥
  
goal: x < ↑⊥ ↔ x = ⊥

full_name: WithBot.semilatticeSup
code: instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithBot α) 
goal: SemilatticeSup (WithBot α)

full_name: WithBot.coe_sup
code: theorem coe_sup [SemilatticeSup α] (a b : α) : ((a ⊔ b : α) : WithBot α) = (a : WithBot α) ⊔ b 
goal: ↑(a ⊔ b) = ↑a ⊔ ↑b

full_name: WithBot.semilatticeInf
code: instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithBot α) 
goal: SemilatticeInf (WithBot α)

full_name: WithBot.coe_inf
code: theorem coe_inf [SemilatticeInf α] (a b : α) : ((a ⊓ b : α) : WithBot α) = (a : WithBot α) ⊓ b 
goal: ↑(a ⊓ b) = ↑a ⊓ ↑b

full_name: WithBot.lattice
code: instance lattice [Lattice α] : Lattice (WithBot α) 
goal: Lattice (WithBot α)

full_name: WithBot.distribLattice
code: instance distribLattice [DistribLattice α] : DistribLattice (WithBot α) 
goal: DistribLattice (WithBot α)

full_name: WithBot.decidableEq
code: instance decidableEq [DecidableEq α] : DecidableEq (WithBot α) 
goal: DecidableEq (WithBot α)

full_name: WithBot.decidableLE
code: instance decidableLE [LE α] [@DecidableRel α (· ≤ ·)] : @DecidableRel (WithBot α) (· ≤ ·)
  
goal: DecidableRel fun x x_1 => x ≤ x_1

full_name: WithBot.decidableLT
code: instance decidableLT [LT α] [@DecidableRel α (· < ·)] : @DecidableRel (WithBot α) (· < ·)
  
goal: DecidableRel fun x x_1 => x < x_1

full_name: WithBot.isTotal_le
code: instance isTotal_le [LE α] [IsTotal α (· ≤ ·)] : IsTotal (WithBot α) (· ≤ ·) 
goal: IsTotal (WithBot α) fun x x_1 => x ≤ x_1

full_name: WithBot.linearOrder
code: instance linearOrder [LinearOrder α] : LinearOrder (WithBot α) 
goal: LinearOrder (WithBot α)

full_name: WithBot.coe_min
code: @[simp, norm_cast]
theorem coe_min [LinearOrder α] (x y : α) : ((min x y : α) : WithBot α) = min (x : WithBot α) y 
goal: ↑(min x y) = min ↑x ↑y

full_name: WithBot.coe_max
code: @[simp, norm_cast]
theorem coe_max [LinearOrder α] (x y : α) : ((max x y : α) : WithBot α) = max (x : WithBot α) y 
goal: ↑(max x y) = max ↑x ↑y

full_name: WithBot.instWellFoundedLT
code: instance instWellFoundedLT [LT α] [WellFoundedLT α] : WellFoundedLT (WithBot α) 
goal: WellFoundedLT (WithBot α)

full_name: WithBot.instWellFoundedGT
code: instance _root_.WithBot.instWellFoundedGT [LT α] [WellFoundedGT α] : WellFoundedGT (WithBot α) 
goal: WellFoundedGT (WithBot α)

full_name: WithBot.denselyOrdered
code: instance denselyOrdered [LT α] [DenselyOrdered α] [NoMinOrder α] : DenselyOrdered (WithBot α) 
goal: DenselyOrdered (WithBot α)

full_name: WithBot.lt_iff_exists_coe_btwn
code: theorem lt_iff_exists_coe_btwn [Preorder α] [DenselyOrdered α] [NoMinOrder α] {a b : WithBot α} :
    a < b ↔ ∃ x : α, a < ↑x ∧ ↑x < b 
goal: a < b ↔ ∃ x, a < ↑x ∧ ↑x < b

full_name: WithBot.noTopOrder
code: instance noTopOrder [LE α] [NoTopOrder α] [Nonempty α] : NoTopOrder (WithBot α) 
goal: NoTopOrder (WithBot α)

full_name: WithBot.noMaxOrder
code: instance noMaxOrder [LT α] [NoMaxOrder α] [Nonempty α] : NoMaxOrder (WithBot α) 
goal: NoMaxOrder (WithBot α)

full_name: WithTop
code: /-- Attach `⊤` to a type. -/
def WithTop (α : Type*) 
goal: Type u_5

full_name: WithTop.instRepr
code: instance [Repr α] : Repr (WithTop α) 
goal: Repr (WithTop α)

full_name: WithTop.some
code: /-- The canonical map from `α` into `WithTop α` -/
@[coe, match_pattern] def some : α → WithTop α 
goal: α → WithTop α

full_name: WithTop.coeTC
code: instance coeTC : CoeTC α (WithTop α) 
goal: CoeTC α (WithTop α)

full_name: WithTop.top
code: instance top : Top (WithTop α) 
goal: Top (WithTop α)

full_name: WithTop.inhabited
code: instance inhabited : Inhabited (WithTop α) 
goal: Inhabited (WithTop α)

full_name: WithTop.nontrivial
code: instance nontrivial [Nonempty α] : Nontrivial (WithTop α) 
goal: Nontrivial (WithTop α)

full_name: WithTop.coe_injective
code: theorem coe_injective : Injective ((↑) : α → WithTop α) 
goal: Function.Injective WithTop.some

full_name: WithTop.coe_inj
code: @[norm_cast]
theorem coe_inj : (a : WithTop α) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: WithTop.forall
code: protected theorem «forall» {p : WithTop α → Prop} : (∀ x, p x) ↔ p ⊤ ∧ ∀ x : α, p x 
goal: (∀ (x : WithTop α), p x) ↔ p ⊤ ∧ ∀ (x : α), p ↑x

full_name: WithTop.exists
code: protected theorem «exists» {p : WithTop α → Prop} : (∃ x, p x) ↔ p ⊤ ∨ ∃ x : α, p x 
goal: (∃ x, p x) ↔ p ⊤ ∨ ∃ x, p ↑x

full_name: WithTop.none_eq_top
code: theorem none_eq_top : (none : WithTop α) = (⊤ : WithTop α) 
goal: none = ⊤

full_name: WithTop.some_eq_coe
code: theorem some_eq_coe (a : α) : (Option.some a : WithTop α) = (↑a : WithTop α) 
goal: some a = ↑a

full_name: WithTop.top_ne_coe
code: @[simp]
theorem top_ne_coe : ⊤ ≠ (a : WithTop α) 
goal: ⊤ ≠ ↑a

full_name: WithTop.coe_ne_top
code: @[simp]
theorem coe_ne_top : (a : WithTop α) ≠ ⊤ 
goal: ↑a ≠ ⊤

full_name: WithTop.recTopCoe
code: /-- Recursor for `WithTop` using the preferred forms `⊤` and `↑a`. -/
@[elab_as_elim, induction_eliminator, cases_eliminator]
def recTopCoe {C : WithTop α → Sort*} (top : C ⊤) (coe : ∀ a : α, C a) : ∀ n : WithTop α, C n
  
goal: C n

full_name: WithTop.recTopCoe_top
code: @[simp]
theorem recTopCoe_top {C : WithTop α → Sort*} (d : C ⊤) (f : ∀ a : α, C a) :
    @recTopCoe _ C d f ⊤ = d 
goal: WithTop.recTopCoe d f ⊤ = d

full_name: WithTop.recTopCoe_coe
code: @[simp]
theorem recTopCoe_coe {C : WithTop α → Sort*} (d : C ⊤) (f : ∀ a : α, C a) (x : α) :
    @recTopCoe _ C d f ↑x = f x 
goal: WithTop.recTopCoe d f ↑x = f x

full_name: WithTop.toDual
code: /-- `WithTop.toDual` is the equivalence sending `⊤` to `⊥` and any `a : α` to `toDual a : αᵒᵈ`.
See `WithTop.toDualBotEquiv` for the related order-iso.
-/
protected def toDual : WithTop α ≃ WithBot αᵒᵈ 
goal: WithTop α ≃ WithBot αᵒᵈ

full_name: WithTop.ofDual
code: /-- `WithTop.ofDual` is the equivalence sending `⊤` to `⊥` and any `a : αᵒᵈ` to `ofDual a : α`.
See `WithTop.toDualBotEquiv` for the related order-iso.
-/
protected def ofDual : WithTop αᵒᵈ ≃ WithBot α 
goal: WithTop αᵒᵈ ≃ WithBot α

full_name: WithBot.toDual
code: /-- `WithBot.toDual` is the equivalence sending `⊥` to `⊤` and any `a : α` to `toDual a : αᵒᵈ`.
See `WithBot.toDual_top_equiv` for the related order-iso.
-/
protected def _root_.WithBot.toDual : WithBot α ≃ WithTop αᵒᵈ 
goal: WithBot α ≃ WithTop αᵒᵈ

full_name: WithBot.ofDual
code: /-- `WithBot.ofDual` is the equivalence sending `⊥` to `⊤` and any `a : αᵒᵈ` to `ofDual a : α`.
See `WithBot.ofDual_top_equiv` for the related order-iso.
-/
protected def _root_.WithBot.ofDual : WithBot αᵒᵈ ≃ WithTop α 
goal: WithBot αᵒᵈ ≃ WithTop α

full_name: WithTop.toDual_symm_apply
code: @[simp]
theorem toDual_symm_apply (a : WithBot αᵒᵈ) : WithTop.toDual.symm a = WithBot.ofDual a 
goal: WithTop.toDual.symm a = WithBot.ofDual a

full_name: WithTop.ofDual_symm_apply
code: @[simp]
theorem ofDual_symm_apply (a : WithBot α) : WithTop.ofDual.symm a = WithBot.toDual a 
goal: WithTop.ofDual.symm a = WithBot.toDual a

full_name: WithTop.toDual_apply_top
code: @[simp]
theorem toDual_apply_top : WithTop.toDual (⊤ : WithTop α) = ⊥ 
goal: WithTop.toDual ⊤ = ⊥

full_name: WithTop.ofDual_apply_top
code: @[simp]
theorem ofDual_apply_top : WithTop.ofDual (⊤ : WithTop α) = ⊥ 
goal: WithTop.ofDual ⊤ = ⊥

full_name: WithTop.toDual_apply_coe
code: @[simp]
theorem toDual_apply_coe (a : α) : WithTop.toDual (a : WithTop α) = toDual a 
goal: WithTop.toDual ↑a = ↑(OrderDual.toDual a)

full_name: WithTop.ofDual_apply_coe
code: @[simp]
theorem ofDual_apply_coe (a : αᵒᵈ) : WithTop.ofDual (a : WithTop αᵒᵈ) = ofDual a 
goal: WithTop.ofDual ↑a = ↑(OrderDual.ofDual a)

full_name: WithTop.untop'
code: /-- Specialization of `Option.getD` to values in `WithTop α` that respects API boundaries.
-/
def untop' (d : α) (x : WithTop α) : α 
goal: α

full_name: WithTop.untop'_top
code: @[simp]
theorem untop'_top {α} (d : α) : untop' d ⊤ = d 
goal: WithTop.untop' d ⊤ = d

full_name: WithTop.untop'_coe
code: @[simp]
theorem untop'_coe {α} (d x : α) : untop' d x = x 
goal: WithTop.untop' d ↑x = x

full_name: WithTop.coe_eq_coe
code: @[simp, norm_cast] -- Porting note: added `simp`
theorem coe_eq_coe : (a : WithTop α) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: WithTop.untop'_eq_iff
code: theorem untop'_eq_iff {d y : α} {x : WithTop α} : untop' d x = y ↔ x = y ∨ x = ⊤ ∧ y = d 
goal: WithTop.untop' d x = y ↔ x = ↑y ∨ x = ⊤ ∧ y = d

full_name: WithTop.untop'_eq_self_iff
code: @[simp] theorem untop'_eq_self_iff {d : α} {x : WithTop α} : untop' d x = d ↔ x = d ∨ x = ⊤ 
goal: WithTop.untop' d x = d ↔ x = ↑d ∨ x = ⊤

full_name: WithTop.untop'_eq_untop'_iff
code: theorem untop'_eq_untop'_iff {d : α} {x y : WithTop α} :
    untop' d x = untop' d y ↔ x = y ∨ x = d ∧ y = ⊤ ∨ x = ⊤ ∧ y = d 
goal: WithTop.untop' d x = WithTop.untop' d y ↔ x = y ∨ x = ↑d ∧ y = ⊤ ∨ x = ⊤ ∧ y = ↑d

full_name: WithTop.map
code: /-- Lift a map `f : α → β` to `WithTop α → WithTop β`. Implemented using `Option.map`. -/
def map (f : α → β) : WithTop α → WithTop β 
goal: WithTop α → WithTop β

full_name: WithTop.map_top
code: @[simp]
theorem map_top (f : α → β) : map f ⊤ = ⊤ 
goal: WithTop.map f ⊤ = ⊤

full_name: WithTop.map_coe
code: @[simp]
theorem map_coe (f : α → β) (a : α) : map f a = f a 
goal: WithTop.map f ↑a = ↑(f a)

full_name: WithTop.map_comm
code: theorem map_comm {f₁ : α → β} {f₂ : α → γ} {g₁ : β → δ} {g₂ : γ → δ}
    (h : g₁ ∘ f₁ = g₂ ∘ f₂) (a : α) : map g₁ (map f₁ a) = map g₂ (map f₂ a) 
goal: WithTop.map g₁ (WithTop.map f₁ ↑a) = WithTop.map g₂ (WithTop.map f₂ ↑a)

full_name: WithTop.map₂
code: /-- The image of a binary function `f : α → β → γ` as a function
`WithTop α → WithTop β → WithTop γ`.

Mathematically this should be thought of as the image of the corresponding function `α × β → γ`. -/
def map₂ : (α → β → γ) → WithTop α → WithTop β → WithTop γ 
goal: (α → β → γ) → WithTop α → WithTop β → WithTop γ

full_name: WithTop.map₂_coe_coe
code: lemma map₂_coe_coe (f : α → β → γ) (a : α) (b : β) : map₂ f a b = f a b 
goal: WithTop.map₂ f ↑a ↑b = ↑(f a b)

full_name: WithTop.map₂_top_left
code: @[simp] lemma map₂_top_left (f : α → β → γ) (b) : map₂ f ⊤ b = ⊤ 
goal: WithTop.map₂ f ⊤ b = ⊤

full_name: WithTop.map₂_top_right
code: @[simp] lemma map₂_top_right (f : α → β → γ) (a) : map₂ f a ⊤ = ⊤ 
goal: WithTop.map₂ f a ⊤ = ⊤

full_name: WithTop.map₂_coe_left
code: @[simp] lemma map₂_coe_left (f : α → β → γ) (a : α) (b) : map₂ f a b = b.map fun b ↦ f a b 
goal: WithTop.map₂ f (↑a) b = WithTop.map (fun b => f a b) b

full_name: WithTop.map₂_coe_right
code: @[simp] lemma map₂_coe_right (f : α → β → γ) (a) (b : β) : map₂ f a b = a.map (f · b) 
goal: WithTop.map₂ f a ↑b = WithTop.map (fun x => f x b) a

full_name: WithTop.map₂_eq_top_iff
code: @[simp] lemma map₂_eq_top_iff {f : α → β → γ} {a : WithTop α} {b : WithTop β} :
    map₂ f a b = ⊤ ↔ a = ⊤ ∨ b = ⊤ 
goal: WithTop.map₂ f a b = ⊤ ↔ a = ⊤ ∨ b = ⊤

full_name: WithTop.map_toDual
code: theorem map_toDual (f : αᵒᵈ → βᵒᵈ) (a : WithBot α) :
    map f (WithBot.toDual a) = a.map (toDual ∘ f) 
goal: WithTop.map f (WithBot.toDual a) = WithBot.map (⇑OrderDual.toDual ∘ f) a

full_name: WithTop.map_ofDual
code: theorem map_ofDual (f : α → β) (a : WithBot αᵒᵈ) : map f (WithBot.ofDual a) = a.map (ofDual ∘ f) 
goal: WithTop.map f (WithBot.ofDual a) = WithBot.map (⇑OrderDual.ofDual ∘ f) a

full_name: WithTop.toDual_map
code: theorem toDual_map (f : α → β) (a : WithTop α) :
    WithTop.toDual (map f a) = WithBot.map (toDual ∘ f ∘ ofDual) (WithTop.toDual a) 
goal: WithTop.toDual (WithTop.map f a) = WithBot.map (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) (WithTop.toDual a)

full_name: WithTop.ofDual_map
code: theorem ofDual_map (f : αᵒᵈ → βᵒᵈ) (a : WithTop αᵒᵈ) :
    WithTop.ofDual (map f a) = WithBot.map (ofDual ∘ f ∘ toDual) (WithTop.ofDual a) 
goal: WithTop.ofDual (WithTop.map f a) = WithBot.map (⇑OrderDual.ofDual ∘ f ∘ ⇑OrderDual.toDual) (WithTop.ofDual a)

full_name: WithTop.ne_top_iff_exists
code: lemma ne_top_iff_exists {x : WithTop α} : x ≠ ⊤ ↔ ∃ a : α, ↑a = x 
goal: x ≠ ⊤ ↔ ∃ a, ↑a = x

full_name: WithTop.forall_ne_iff_eq_top
code: lemma forall_ne_iff_eq_top {x : WithTop α} : (∀ a : α, ↑a ≠ x) ↔ x = ⊤ 
goal: (∀ (a : α), ↑a ≠ x) ↔ x = ⊤

full_name: WithTop.untop
code: /-- Deconstruct a `x : WithTop α` to the underlying value in `α`, given a proof that `x ≠ ⊤`. -/
def untop : ∀ x : WithTop α, x ≠ ⊤ → α 
goal: x ≠ ⊤ → α

full_name: WithTop.coe_untop
code: @[simp] lemma coe_untop : ∀ (x : WithTop α) hx, x.untop hx = x 
goal: ↑(x.untop hx) = x

full_name: WithTop.untop_coe
code: @[simp]
theorem untop_coe (x : α) (h : (x : WithTop α) ≠ ⊤ := coe_ne_top) : (x : WithTop α).untop h = x 
goal: (↑x).untop h = x

full_name: WithTop.canLift
code: instance canLift : CanLift (WithTop α) α (↑) fun r => r ≠ ⊤ 
goal: CanLift (WithTop α) α WithTop.some fun r => r ≠ ⊤

full_name: WithTop.instBot
code: instance instBot [Bot α] : Bot (WithTop α) 
goal: Bot (WithTop α)

full_name: WithTop.coe_bot
code: @[simp, norm_cast] lemma coe_bot [Bot α] : ((⊥ : α) : WithTop α) = ⊥ 
goal: ↑⊥ = ⊥

full_name: WithTop.coe_eq_bot
code: @[simp, norm_cast] lemma coe_eq_bot [Bot α] {a : α} : (a : WithTop α) = ⊥ ↔ a = ⊥ 
goal: ↑a = ⊥ ↔ a = ⊥

full_name: WithTop.bot_eq_coe
code: @[simp, norm_cast] lemma bot_eq_coe [Bot α] {a : α} : (⊥ : WithTop α) = a ↔ ⊥ = a 
goal: ⊥ = ↑a ↔ ⊥ = a

full_name: WithTop.le
code: instance (priority := 10) le : LE (WithTop α) 
goal: LE (WithTop α)

full_name: WithTop.toDual_le_iff
code: theorem toDual_le_iff {a : WithTop α} {b : WithBot αᵒᵈ} :
    WithTop.toDual a ≤ b ↔ WithBot.ofDual b ≤ a 
goal: WithTop.toDual a ≤ b ↔ WithBot.ofDual b ≤ a

full_name: WithTop.le_toDual_iff
code: theorem le_toDual_iff {a : WithBot αᵒᵈ} {b : WithTop α} :
    a ≤ WithTop.toDual b ↔ b ≤ WithBot.ofDual a 
goal: a ≤ WithTop.toDual b ↔ b ≤ WithBot.ofDual a

full_name: WithTop.toDual_le_toDual_iff
code: @[simp]
theorem toDual_le_toDual_iff {a b : WithTop α} : WithTop.toDual a ≤ WithTop.toDual b ↔ b ≤ a 
goal: WithTop.toDual a ≤ WithTop.toDual b ↔ b ≤ a

full_name: WithTop.ofDual_le_iff
code: theorem ofDual_le_iff {a : WithTop αᵒᵈ} {b : WithBot α} :
    WithTop.ofDual a ≤ b ↔ WithBot.toDual b ≤ a 
goal: WithTop.ofDual a ≤ b ↔ WithBot.toDual b ≤ a

full_name: WithTop.le_ofDual_iff
code: theorem le_ofDual_iff {a : WithBot α} {b : WithTop αᵒᵈ} :
    a ≤ WithTop.ofDual b ↔ b ≤ WithBot.toDual a 
goal: a ≤ WithTop.ofDual b ↔ b ≤ WithBot.toDual a

full_name: WithTop.ofDual_le_ofDual_iff
code: @[simp]
theorem ofDual_le_ofDual_iff {a b : WithTop αᵒᵈ} : WithTop.ofDual a ≤ WithTop.ofDual b ↔ b ≤ a 
goal: WithTop.ofDual a ≤ WithTop.ofDual b ↔ b ≤ a

full_name: WithTop.coe_le_coe
code: @[simp, norm_cast]
theorem coe_le_coe : (a : WithTop α) ≤ b ↔ a ≤ b 
goal: ↑a ≤ ↑b ↔ a ≤ b

full_name: WithTop.some_le_some
code: @[simp, deprecated coe_le_coe "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem some_le_some : @LE.le (WithTop α) _ (Option.some a) (Option.some b) ↔ a ≤ b 
goal: some a ≤ some b ↔ a ≤ b

full_name: WithTop.orderTop
code: instance orderTop : OrderTop (WithTop α) 
goal: OrderTop (WithTop α)

full_name: WithTop.le_none
code: @[simp, deprecated le_top "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem le_none {a : WithTop α} : @LE.le (WithTop α) _ a none 
goal: a ≤ none

full_name: WithTop.orderBot
code: instance orderBot [OrderBot α] : OrderBot (WithTop α) 
goal: OrderBot (WithTop α)

full_name: WithTop.boundedOrder
code: instance boundedOrder [OrderBot α] : BoundedOrder (WithTop α) 
goal: BoundedOrder (WithTop α)

full_name: WithTop.not_top_le_coe
code: theorem not_top_le_coe (a : α) : ¬(⊤ : WithTop α) ≤ ↑a 
goal: ¬⊤ ≤ ↑a

full_name: WithTop.top_le_iff
code: /-- There is a general version `top_le_iff`, but this lemma does not require a `PartialOrder`. -/
@[simp]
protected theorem top_le_iff : ∀ {a : WithTop α}, ⊤ ≤ a ↔ a = ⊤
  
goal: ⊤ ≤ a ↔ a = ⊤

full_name: WithTop.le_coe
code: theorem le_coe : ∀ {o : Option α}, a ∈ o → (@LE.le (WithTop α) _ o b ↔ a ≤ b)
  
goal: a ∈ o → (o ≤ ↑b ↔ a ≤ b)

full_name: WithTop.le_coe_iff
code: theorem le_coe_iff {x : WithTop α} : x ≤ b ↔ ∃ a : α, x = a ∧ a ≤ b 
goal: x ≤ ↑b ↔ ∃ a, x = ↑a ∧ a ≤ b

full_name: WithTop.coe_le_iff
code: theorem coe_le_iff {x : WithTop α} : ↑a ≤ x ↔ ∀ b : α, x = ↑b → a ≤ b 
goal: ↑a ≤ x ↔ ∀ (b : α), x = ↑b → a ≤ b

full_name: IsMin.withTop
code: protected theorem _root_.IsMin.withTop (h : IsMin a) : IsMin (a : WithTop α) 
goal: IsMin ↑a

full_name: WithTop.untop_le_iff
code: theorem untop_le_iff {a : WithTop α} {b : α} (h : a ≠ ⊤) :
    untop a h ≤ b ↔ a ≤ (b : WithTop α) 
goal: a.untop h ≤ b ↔ a ≤ ↑b

full_name: WithTop.le_untop_iff
code: theorem le_untop_iff {a : α} {b : WithTop α} (h : b ≠ ⊤) :
    a ≤ untop b h ↔ (a : WithTop α) ≤ b 
goal: a ≤ b.untop h ↔ ↑a ≤ b

full_name: WithTop.le_untop'_iff
code: theorem le_untop'_iff {a : WithTop α} {b c : α} (h : a = ⊤ → c ≤ b) :
    c ≤ a.untop' b ↔ c ≤ a 
goal: c ≤ WithTop.untop' b a ↔ ↑c ≤ a

full_name: WithTop.lt
code: instance (priority := 10) lt : LT (WithTop α) 
goal: LT (WithTop α)

full_name: WithTop.toDual_lt_iff
code: theorem toDual_lt_iff {a : WithTop α} {b : WithBot αᵒᵈ} :
    WithTop.toDual a < b ↔ WithBot.ofDual b < a 
goal: WithTop.toDual a < b ↔ WithBot.ofDual b < a

full_name: WithTop.lt_toDual_iff
code: theorem lt_toDual_iff {a : WithBot αᵒᵈ} {b : WithTop α} :
    a < WithTop.toDual b ↔ b < WithBot.ofDual a 
goal: a < WithTop.toDual b ↔ b < WithBot.ofDual a

full_name: WithTop.toDual_lt_toDual_iff
code: @[simp]
theorem toDual_lt_toDual_iff {a b : WithTop α} : WithTop.toDual a < WithTop.toDual b ↔ b < a 
goal: WithTop.toDual a < WithTop.toDual b ↔ b < a

full_name: WithTop.ofDual_lt_iff
code: theorem ofDual_lt_iff {a : WithTop αᵒᵈ} {b : WithBot α} :
    WithTop.ofDual a < b ↔ WithBot.toDual b < a 
goal: WithTop.ofDual a < b ↔ WithBot.toDual b < a

full_name: WithTop.lt_ofDual_iff
code: theorem lt_ofDual_iff {a : WithBot α} {b : WithTop αᵒᵈ} :
    a < WithTop.ofDual b ↔ b < WithBot.toDual a 
goal: a < WithTop.ofDual b ↔ b < WithBot.toDual a

full_name: WithTop.ofDual_lt_ofDual_iff
code: @[simp]
theorem ofDual_lt_ofDual_iff {a b : WithTop αᵒᵈ} : WithTop.ofDual a < WithTop.ofDual b ↔ b < a 
goal: WithTop.ofDual a < WithTop.ofDual b ↔ b < a

full_name: WithTop.lt_untop'_iff
code: theorem lt_untop'_iff {a : WithTop α} {b c : α} (h : a = ⊤ → c < b) :
    c < a.untop' b ↔ c < a 
goal: c < WithTop.untop' b a ↔ ↑c < a

full_name: WithBot.toDual_symm_apply
code: @[simp]
theorem toDual_symm_apply (a : WithTop αᵒᵈ) : WithBot.toDual.symm a = WithTop.ofDual a 
goal: WithBot.toDual.symm a = WithTop.ofDual a

full_name: WithBot.ofDual_symm_apply
code: @[simp]
theorem ofDual_symm_apply (a : WithTop α) : WithBot.ofDual.symm a = WithTop.toDual a 
goal: WithBot.ofDual.symm a = WithTop.toDual a

full_name: WithBot.toDual_apply_bot
code: @[simp]
theorem toDual_apply_bot : WithBot.toDual (⊥ : WithBot α) = ⊤ 
goal: WithBot.toDual ⊥ = ⊤

full_name: WithBot.ofDual_apply_bot
code: @[simp]
theorem ofDual_apply_bot : WithBot.ofDual (⊥ : WithBot α) = ⊤ 
goal: WithBot.ofDual ⊥ = ⊤

full_name: WithBot.toDual_apply_coe
code: @[simp]
theorem toDual_apply_coe (a : α) : WithBot.toDual (a : WithBot α) = toDual a 
goal: WithBot.toDual ↑a = ↑(OrderDual.toDual a)

full_name: WithBot.ofDual_apply_coe
code: @[simp]
theorem ofDual_apply_coe (a : αᵒᵈ) : WithBot.ofDual (a : WithBot αᵒᵈ) = ofDual a 
goal: WithBot.ofDual ↑a = ↑(OrderDual.ofDual a)

full_name: WithBot.map_toDual
code: theorem map_toDual (f : αᵒᵈ → βᵒᵈ) (a : WithTop α) :
    WithBot.map f (WithTop.toDual a) = a.map (toDual ∘ f) 
goal: WithBot.map f (WithTop.toDual a) = WithTop.map (⇑OrderDual.toDual ∘ f) a

full_name: WithBot.map_ofDual
code: theorem map_ofDual (f : α → β) (a : WithTop αᵒᵈ) :
    WithBot.map f (WithTop.ofDual a) = a.map (ofDual ∘ f) 
goal: WithBot.map f (WithTop.ofDual a) = WithTop.map (⇑OrderDual.ofDual ∘ f) a

full_name: WithBot.toDual_map
code: theorem toDual_map (f : α → β) (a : WithBot α) :
    WithBot.toDual (WithBot.map f a) = map (toDual ∘ f ∘ ofDual) (WithBot.toDual a) 
goal: WithBot.toDual (WithBot.map f a) = WithBot.map (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) (WithBot.toDual a)

full_name: WithBot.ofDual_map
code: theorem ofDual_map (f : αᵒᵈ → βᵒᵈ) (a : WithBot αᵒᵈ) :
    WithBot.ofDual (WithBot.map f a) = map (ofDual ∘ f ∘ toDual) (WithBot.ofDual a) 
goal: WithBot.ofDual (WithBot.map f a) = WithBot.map (⇑OrderDual.ofDual ∘ f ∘ ⇑OrderDual.toDual) (WithBot.ofDual a)

full_name: WithBot.forall_lt_iff_eq_bot
code: lemma forall_lt_iff_eq_bot [Preorder α] {x : WithBot α} :
    (∀ y : α, x < y) ↔ x = ⊥ 
goal: (∀ (y : α), x < ↑y) ↔ x = ⊥

full_name: WithBot.toDual_le_iff
code: theorem toDual_le_iff {a : WithBot α} {b : WithTop αᵒᵈ} :
    WithBot.toDual a ≤ b ↔ WithTop.ofDual b ≤ a 
goal: WithBot.toDual a ≤ b ↔ WithTop.ofDual b ≤ a

full_name: WithBot.le_toDual_iff
code: theorem le_toDual_iff {a : WithTop αᵒᵈ} {b : WithBot α} :
    a ≤ WithBot.toDual b ↔ b ≤ WithTop.ofDual a 
goal: a ≤ WithBot.toDual b ↔ b ≤ WithTop.ofDual a

full_name: WithBot.toDual_le_toDual_iff
code: @[simp]
theorem toDual_le_toDual_iff {a b : WithBot α} : WithBot.toDual a ≤ WithBot.toDual b ↔ b ≤ a 
goal: WithBot.toDual a ≤ WithBot.toDual b ↔ b ≤ a

full_name: WithBot.ofDual_le_iff
code: theorem ofDual_le_iff {a : WithBot αᵒᵈ} {b : WithTop α} :
    WithBot.ofDual a ≤ b ↔ WithTop.toDual b ≤ a 
goal: WithBot.ofDual a ≤ b ↔ WithTop.toDual b ≤ a

full_name: WithBot.le_ofDual_iff
code: theorem le_ofDual_iff {a : WithTop α} {b : WithBot αᵒᵈ} :
    a ≤ WithBot.ofDual b ↔ b ≤ WithTop.toDual a 
goal: a ≤ WithBot.ofDual b ↔ b ≤ WithTop.toDual a

full_name: WithBot.ofDual_le_ofDual_iff
code: @[simp]
theorem ofDual_le_ofDual_iff {a b : WithBot αᵒᵈ} : WithBot.ofDual a ≤ WithBot.ofDual b ↔ b ≤ a 
goal: WithBot.ofDual a ≤ WithBot.ofDual b ↔ b ≤ a

full_name: WithBot.toDual_lt_iff
code: theorem toDual_lt_iff {a : WithBot α} {b : WithTop αᵒᵈ} :
    WithBot.toDual a < b ↔ WithTop.ofDual b < a 
goal: WithBot.toDual a < b ↔ WithTop.ofDual b < a

full_name: WithBot.lt_toDual_iff
code: theorem lt_toDual_iff {a : WithTop αᵒᵈ} {b : WithBot α} :
    a < WithBot.toDual b ↔ b < WithTop.ofDual a 
goal: a < WithBot.toDual b ↔ b < WithTop.ofDual a

full_name: WithBot.toDual_lt_toDual_iff
code: @[simp]
theorem toDual_lt_toDual_iff {a b : WithBot α} : WithBot.toDual a < WithBot.toDual b ↔ b < a 
goal: WithBot.toDual a < WithBot.toDual b ↔ b < a

full_name: WithBot.ofDual_lt_iff
code: theorem ofDual_lt_iff {a : WithBot αᵒᵈ} {b : WithTop α} :
    WithBot.ofDual a < b ↔ WithTop.toDual b < a 
goal: WithBot.ofDual a < b ↔ WithTop.toDual b < a

full_name: WithBot.lt_ofDual_iff
code: theorem lt_ofDual_iff {a : WithTop α} {b : WithBot αᵒᵈ} :
    a < WithBot.ofDual b ↔ b < WithTop.toDual a 
goal: a < WithBot.ofDual b ↔ b < WithTop.toDual a

full_name: WithBot.ofDual_lt_ofDual_iff
code: @[simp]
theorem ofDual_lt_ofDual_iff {a b : WithBot αᵒᵈ} : WithBot.ofDual a < WithBot.ofDual b ↔ b < a 
goal: WithBot.ofDual a < WithBot.ofDual b ↔ b < a

full_name: WithTop.coe_lt_coe
code: @[simp, norm_cast]
theorem coe_lt_coe : (a : WithTop α) < b ↔ a < b 
goal: ↑a < ↑b ↔ a < b

full_name: WithTop.coe_lt_top
code: @[simp]
theorem coe_lt_top (a : α) : (a : WithTop α) < ⊤ 
goal: ↑a < ⊤

full_name: WithTop.not_top_lt
code: @[simp]
protected theorem not_top_lt (a : WithTop α) : ¬⊤ < a 
goal: ¬⊤ < a

full_name: WithTop.some_lt_some
code: @[simp, deprecated coe_lt_coe "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem some_lt_some : @LT.lt (WithTop α) _ (Option.some a) (Option.some b) ↔ a < b 
goal: some a < some b ↔ a < b

full_name: WithTop.some_lt_none
code: @[simp, deprecated coe_lt_top "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem some_lt_none (a : α) : @LT.lt (WithTop α) _ (Option.some a) none 
goal: some a < none

full_name: WithTop.not_none_lt
code: @[simp, deprecated not_top_lt "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem not_none_lt (a : WithTop α) : ¬@LT.lt (WithTop α) _ none a 
goal: ¬none < a

full_name: WithTop.lt_iff_exists_coe
code: theorem lt_iff_exists_coe {a b : WithTop α} : a < b ↔ ∃ p : α, a = p ∧ ↑p < b 
goal: a < b ↔ ∃ p, a = ↑p ∧ ↑p < b

full_name: WithTop.coe_lt_iff
code: theorem coe_lt_iff {x : WithTop α} : ↑a < x ↔ ∀ b : α, x = ↑b → a < b 
goal: ↑a < x ↔ ∀ (b : α), x = ↑b → a < b

full_name: WithTop.lt_top_iff_ne_top
code: /-- A version of `lt_top_iff_ne_top` for `WithTop` that only requires `LT α`, not
`PartialOrder α`. -/
protected theorem lt_top_iff_ne_top {x : WithTop α} : x < ⊤ ↔ x ≠ ⊤ 
goal: x < ⊤ ↔ x ≠ ⊤

full_name: WithTop.preorder
code: instance preorder [Preorder α] : Preorder (WithTop α) 
goal: Preorder (WithTop α)

full_name: WithTop.partialOrder
code: instance partialOrder [PartialOrder α] : PartialOrder (WithTop α) 
goal: PartialOrder (WithTop α)

full_name: WithTop.coe_strictMono
code: theorem coe_strictMono : StrictMono (fun a : α => (a : WithTop α)) 
goal: StrictMono fun a => ↑a

full_name: WithTop.coe_mono
code: theorem coe_mono : Monotone (fun a : α => (a : WithTop α)) 
goal: Monotone fun a => ↑a

full_name: WithTop.monotone_iff
code: theorem monotone_iff {f : WithTop α → β} :
    Monotone f ↔ Monotone (fun (a : α) => f a) ∧ ∀ x : α, f x ≤ f ⊤ 
goal: Monotone f ↔ (Monotone fun a => f ↑a) ∧ ∀ (x : α), f ↑x ≤ f ⊤

full_name: WithTop.monotone_map_iff
code: @[simp]
theorem monotone_map_iff {f : α → β} : Monotone (WithTop.map f) ↔ Monotone f 
goal: Monotone (WithTop.map f) ↔ Monotone f

full_name: WithTop.strictMono_iff
code: theorem strictMono_iff {f : WithTop α → β} :
    StrictMono f ↔ StrictMono (fun (a : α) => f a) ∧ ∀ x : α, f x < f ⊤ 
goal: StrictMono f ↔ (StrictMono fun a => f ↑a) ∧ ∀ (x : α), f ↑x < f ⊤

full_name: WithTop.strictAnti_iff
code: theorem strictAnti_iff {f : WithTop α → β} :
    StrictAnti f ↔ StrictAnti (fun a ↦ f a : α → β) ∧ ∀ x : α, f ⊤ < f x 
goal: StrictAnti f ↔ (StrictAnti fun a => f ↑a) ∧ ∀ (x : α), f ⊤ < f ↑x

full_name: WithTop.strictMono_map_iff
code: @[simp]
theorem strictMono_map_iff {f : α → β} : StrictMono (WithTop.map f) ↔ StrictMono f 
goal: StrictMono (WithTop.map f) ↔ StrictMono f

full_name: WithTop.map_le_iff
code: theorem map_le_iff (f : α → β) (a b : WithTop α)
    (mono_iff : ∀ {a b}, f a ≤ f b ↔ a ≤ b) :
    a.map f ≤ b.map f ↔ a ≤ b 
goal: WithTop.map f a ≤ WithTop.map f b ↔ a ≤ b

full_name: WithTop.coe_untop'_le
code: theorem coe_untop'_le (a : WithTop α) (b : α) : a.untop' b ≤ a 
goal: ↑(WithTop.untop' b a) ≤ a

full_name: WithTop.coe_top_lt
code: @[simp]
theorem coe_top_lt [OrderTop α] {x : WithTop α} : (⊤ : α) < x ↔ x = ⊤ 
goal: ↑⊤ < x ↔ x = ⊤

full_name: WithTop.forall_lt_iff_eq_top
code: lemma forall_lt_iff_eq_top {x : WithTop α} : (∀ y : α, y < x) ↔ x = ⊤ 
goal: (∀ (y : α), ↑y < x) ↔ x = ⊤

full_name: WithTop.semilatticeInf
code: instance semilatticeInf [SemilatticeInf α] : SemilatticeInf (WithTop α) 
goal: SemilatticeInf (WithTop α)

full_name: WithTop.coe_inf
code: theorem coe_inf [SemilatticeInf α] (a b : α) : ((a ⊓ b : α) : WithTop α) = (a : WithTop α) ⊓ b 
goal: ↑(a ⊓ b) = ↑a ⊓ ↑b

full_name: WithTop.semilatticeSup
code: instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithTop α) 
goal: SemilatticeSup (WithTop α)

full_name: WithTop.coe_sup
code: theorem coe_sup [SemilatticeSup α] (a b : α) : ((a ⊔ b : α) : WithTop α) = (a : WithTop α) ⊔ b 
goal: ↑(a ⊔ b) = ↑a ⊔ ↑b

full_name: WithTop.lattice
code: instance lattice [Lattice α] : Lattice (WithTop α) 
goal: Lattice (WithTop α)

full_name: WithTop.distribLattice
code: instance distribLattice [DistribLattice α] : DistribLattice (WithTop α) 
goal: DistribLattice (WithTop α)

full_name: WithTop.decidableEq
code: instance decidableEq [DecidableEq α] : DecidableEq (WithTop α) 
goal: DecidableEq (WithTop α)

full_name: WithTop.decidableLE
code: instance decidableLE [LE α] [@DecidableRel α (· ≤ ·)] :
    @DecidableRel (WithTop α) (· ≤ ·) 
goal: DecidableRel fun x x_1 => x ≤ x_1

full_name: WithTop.decidableLT
code: instance decidableLT [LT α] [@DecidableRel α (· < ·)] :
    @DecidableRel (WithTop α) (· < ·) 
goal: DecidableRel fun x x_1 => x < x_1

full_name: WithTop.isTotal_le
code: instance isTotal_le [LE α] [IsTotal α (· ≤ ·)] : IsTotal (WithTop α) (· ≤ ·) 
goal: IsTotal (WithTop α) fun x x_1 => x ≤ x_1

full_name: WithTop.linearOrder
code: instance linearOrder [LinearOrder α] : LinearOrder (WithTop α) 
goal: LinearOrder (WithTop α)

full_name: WithTop.coe_min
code: @[simp, norm_cast]
theorem coe_min [LinearOrder α] (x y : α) : (↑(min x y) : WithTop α) = min (x : WithTop α) y 
goal: ↑(min x y) = min ↑x ↑y

full_name: WithTop.coe_max
code: @[simp, norm_cast]
theorem coe_max [LinearOrder α] (x y : α) : (↑(max x y) : WithTop α) = max (x : WithTop α) y 
goal: ↑(max x y) = max ↑x ↑y

full_name: WithTop.instWellFoundedLT
code: instance instWellFoundedLT [LT α] [WellFoundedLT α] : WellFoundedLT (WithTop α) 
goal: WellFoundedLT (WithTop α)

full_name: WithTop.instWellFoundedGT
code: instance instWellFoundedGT [LT α] [WellFoundedGT α] : WellFoundedGT (WithTop α) 
goal: WellFoundedGT (WithTop α)

full_name: WithTop.trichotomous.lt
code: instance trichotomous.lt [Preorder α] [IsTrichotomous α (· < ·)] :
    IsTrichotomous (WithTop α) (· < ·) 
goal: IsTrichotomous (WithTop α) fun x x_1 => x < x_1

full_name: WithTop.IsWellOrder.lt
code: instance IsWellOrder.lt [Preorder α] [IsWellOrder α (· < ·)] : IsWellOrder (WithTop α) (· < ·) 
goal: IsWellOrder (WithTop α) fun x x_1 => x < x_1

full_name: WithTop.trichotomous.gt
code: instance trichotomous.gt [Preorder α] [IsTrichotomous α (· > ·)] :
    IsTrichotomous (WithTop α) (· > ·) 
goal: IsTrichotomous (WithTop α) fun x x_1 => x > x_1

full_name: WithTop.IsWellOrder.gt
code: instance IsWellOrder.gt [Preorder α] [IsWellOrder α (· > ·)] : IsWellOrder (WithTop α) (· > ·) 
goal: IsWellOrder (WithTop α) fun x x_1 => x > x_1

full_name: WithBot.trichotomous.lt
code: instance _root_.WithBot.trichotomous.lt [Preorder α] [h : IsTrichotomous α (· < ·)] :
    IsTrichotomous (WithBot α) (· < ·) 
goal: IsTrichotomous (WithBot α) fun x x_1 => x < x_1

full_name: WithBot.isWellOrder.lt
code: instance _root_.WithBot.isWellOrder.lt [Preorder α] [IsWellOrder α (· < ·)] :
    IsWellOrder (WithBot α) (· < ·) 
goal: IsWellOrder (WithBot α) fun x x_1 => x < x_1

full_name: WithBot.trichotomous.gt
code: instance _root_.WithBot.trichotomous.gt [Preorder α] [h : IsTrichotomous α (· > ·)] :
    IsTrichotomous (WithBot α) (· > ·) 
goal: IsTrichotomous (WithBot α) fun x x_1 => x > x_1

full_name: WithBot.isWellOrder.gt
code: instance _root_.WithBot.isWellOrder.gt [Preorder α] [h : IsWellOrder α (· > ·)] :
    IsWellOrder (WithBot α) (· > ·) 
goal: IsWellOrder (WithBot α) fun x x_1 => x > x_1

full_name: WithTop.instDenselyOrderedOfNoMaxOrder
code: instance [LT α] [DenselyOrdered α] [NoMaxOrder α] : DenselyOrdered (WithTop α) 
goal: DenselyOrdered (WithTop α)

full_name: WithTop.lt_iff_exists_coe_btwn
code: theorem lt_iff_exists_coe_btwn [Preorder α] [DenselyOrdered α] [NoMaxOrder α] {a b : WithTop α} :
    a < b ↔ ∃ x : α, a < ↑x ∧ ↑x < b 
goal: a < b ↔ ∃ x, a < ↑x ∧ ↑x < b

full_name: WithTop.noBotOrder
code: instance noBotOrder [LE α] [NoBotOrder α] [Nonempty α] : NoBotOrder (WithTop α) 
goal: NoBotOrder (WithTop α)

full_name: WithTop.noMinOrder
code: instance noMinOrder [LT α] [NoMinOrder α] [Nonempty α] : NoMinOrder (WithTop α) 
goal: NoMinOrder (WithTop α)