Theorem: NNReal.coe_sSup
File: Mathlib/Data/NNReal/Basic.lean

tactic: rcases Set.eq_empty_or_nonempty s with rfl|hs
state_before: r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
⊢ ↑(sSup s) = sSup (toReal '' s)
state_after: case inl
r r₁ r₂ : ℝ≥0
x y : ℝ
⊢ ↑(sSup ∅) = sSup (toReal '' ∅)

case inr
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
⊢ ↑(sSup s) = sSup (toReal '' s)

tactic: by_cases H : BddAbove s
state_before: case inr
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
⊢ ↑(sSup s) = sSup (toReal '' s)
state_after: case pos
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
⊢ ↑(sSup s) = sSup (toReal '' s)

case neg
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : ¬BddAbove s
⊢ ↑(sSup s) = sSup (toReal '' s)

tactic: simp
state_before: case inl
r r₁ r₂ : ℝ≥0
x y : ℝ
⊢ ↑(sSup ∅) = sSup (toReal '' ∅)
state_after: no goals

tactic: have A : sSup (Subtype.val '' s) ∈ Set.Ici 0 := by
  apply Real.sSup_nonneg
  rintro - ⟨y, -, rfl⟩
  exact y.2
state_before: case pos
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
⊢ ↑(sSup s) = sSup (toReal '' s)
state_after: case pos
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
A : sSup (Subtype.val '' s) ∈ Set.Ici 0
⊢ ↑(sSup s) = sSup (toReal '' s)

tactic: exact (@subset_sSup_of_within ℝ (Set.Ici (0 : ℝ)) _ _ (_) s hs H A).symm
state_before: case pos
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
A : sSup (Subtype.val '' s) ∈ Set.Ici 0
⊢ ↑(sSup s) = sSup (toReal '' s)
state_after: no goals

tactic: apply Real.sSup_nonneg
state_before: r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
⊢ sSup (Subtype.val '' s) ∈ Set.Ici 0
state_after: case hS
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
⊢ ∀ x ∈ Subtype.val '' s, 0 ≤ x

tactic: rintro - ⟨y, -, rfl⟩
state_before: case hS
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
⊢ ∀ x ∈ Subtype.val '' s, 0 ≤ x
state_after: case hS.intro.intro
r r₁ r₂ : ℝ≥0
x y✝ : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
y : { r // 0 ≤ r }
⊢ 0 ≤ ↑y

tactic: exact y.2
state_before: case hS.intro.intro
r r₁ r₂ : ℝ≥0
x y✝ : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove s
y : { r // 0 ≤ r }
⊢ 0 ≤ ↑y
state_after: no goals

tactic: simp only [csSup_of_not_bddAbove H, csSup_empty, bot_eq_zero', NNReal.coe_zero]
state_before: case neg
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : ¬BddAbove s
⊢ ↑(sSup s) = sSup (toReal '' s)
state_after: case neg
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : ¬BddAbove s
⊢ 0 = sSup (toReal '' s)

tactic: apply (Real.sSup_of_not_bddAbove ?_).symm
state_before: case neg
r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : ¬BddAbove s
⊢ 0 = sSup (toReal '' s)
state_after: r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : ¬BddAbove s
⊢ ¬BddAbove (toReal '' s)

tactic: contrapose! H
state_before: r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : ¬BddAbove s
⊢ ¬BddAbove (toReal '' s)
state_after: r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove (toReal '' s)
⊢ BddAbove s

tactic: exact bddAbove_coe.1 H
state_before: r r₁ r₂ : ℝ≥0
x y : ℝ
s : Set ℝ≥0
hs : s.Nonempty
H : BddAbove (toReal '' s)
⊢ BddAbove s
state_after: no goals