l3lab/ntp-mathlib huggingface dataset:
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
n : ℤ
hs : Set.Nonempty s
hns : n ∈ upperBounds s
this : Set.Nonempty s ∧ BddAbove s
⊢ ↑(greatestOfBdd (choose (_ : BddAbove s)) (_ : choose (_ : BddAbove s) ∈ upperBounds s) (_ : Set.Nonempty s)) ≤ n

Next tactic:
exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
⊢ ∀ (s : Set ℤ) (a : ℤ), BddBelow s → a ∈ s → sInf s ≤ a

Next tactic:
intro s n hs hns
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
n : ℤ
hs : BddBelow s
hns : n ∈ s
⊢ sInf s ≤ n

Next tactic:
have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
n : ℤ
hs : BddBelow s
hns : n ∈ s
this : Set.Nonempty s ∧ BddBelow s
⊢ sInf s ≤ n

Next tactic:
simp only [this, and_self, dite_true, ge_iff_le]
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
n : ℤ
hs : BddBelow s
hns : n ∈ s
this : Set.Nonempty s ∧ BddBelow s
⊢ ↑(leastOfBdd (choose (_ : BddBelow s)) (_ : choose (_ : BddBelow s) ∈ lowerBounds s) (_ : Set.Nonempty s)) ≤ n

Next tactic:
exact (leastOfBdd _ _ _).2.2 n hns
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (leastOfBdd _ _ _).2.2 n hns
    le_csInf := by
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
⊢ ∀ (s : Set ℤ) (a : ℤ), Set.Nonempty s → a ∈ lowerBounds s → a ≤ sInf s

Next tactic:
intro s n hs hns
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (leastOfBdd _ _ _).2.2 n hns
    le_csInf := by
      intro s n hs hns
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
n : ℤ
hs : Set.Nonempty s
hns : n ∈ lowerBounds s
⊢ n ≤ sInf s

Next tactic:
have : s.Nonempty ∧ BddBelow s := ⟨hs, ⟨n, hns⟩⟩
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (leastOfBdd _ _ _).2.2 n hns
    le_csInf := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
n : ℤ
hs : Set.Nonempty s
hns : n ∈ lowerBounds s
this : Set.Nonempty s ∧ BddBelow s
⊢ n ≤ sInf s

Next tactic:
simp only [this, and_self, dite_true, ge_iff_le]
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (leastOfBdd _ _ _).2.2 n hns
    le_csInf := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
n : ℤ
hs : Set.Nonempty s
hns : n ∈ lowerBounds s
this : Set.Nonempty s ∧ BddBelow s
⊢ n ≤ ↑(leastOfBdd (choose (_ : BddBelow s)) (_ : choose (_ : BddBelow s) ∈ lowerBounds s) (_ : Set.Nonempty s))

Next tactic:
exact hns (leastOfBdd _ (Classical.choose_spec this.2) _).2.1
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (leastOfBdd _ _ _).2.2 n hns
    le_csInf := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (leastOfBdd _ (Classical.choose_spec this.2) _).2.1
    csSup_of_not_bddAbove := fun s hs ↦ by 

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
hs : ¬BddAbove s
⊢ sSup s = sSup ∅

Next tactic:
simp [hs]
instance : ConditionallyCompleteLinearOrder ℤ :=
  { Int.linearOrderedCommRing,
    LinearOrder.toLattice with
    sSup := fun s =>
      if h : s.Nonempty ∧ BddAbove s then
        greatestOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    sInf := fun s =>
      if h : s.Nonempty ∧ BddBelow s then
        leastOfBdd (Classical.choose h.2) (Classical.choose_spec h.2) h.1
      else 0
    le_csSup := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (greatestOfBdd _ _ _).2.2 n hns
    csSup_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddAbove s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1
    csInf_le := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨⟨n, hns⟩, hs⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact (leastOfBdd _ _ _).2.2 n hns
    le_csInf := by
      intro s n hs hns
      have : s.Nonempty ∧ BddBelow s := ⟨hs, ⟨n, hns⟩⟩
      -- Porting note: this was `rw [dif_pos this]`
      simp only [this, and_self, dite_true, ge_iff_le]
      exact hns (leastOfBdd _ (Classical.choose_spec this.2) _).2.1
    csSup_of_not_bddAbove := fun s hs ↦ by simp [hs]
    csInf_of_not_bddBelow := fun s hs ↦ by 

Proof state:
src✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing
src✝ : Lattice ℤ := LinearOrder.toLattice
s : Set ℤ
hs : ¬BddBelow s
⊢ sInf s = sInf ∅

Next tactic:
simp [hs]
theorem csSup_eq_greatest_of_bdd {s : Set ℤ} [DecidablePred (· ∈ s)] (b : ℤ) (Hb : ∀ z ∈ s, z ≤ b)
    (Hinh : ∃ z : ℤ, z ∈ s) : sSup s = greatestOfBdd b Hb Hinh := by
  

Proof state:
s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, z ≤ b
Hinh : ∃ z, z ∈ s
⊢ sSup s = ↑(greatestOfBdd b Hb Hinh)

Next tactic:
have : s.Nonempty ∧ BddAbove s := ⟨Hinh, b, Hb⟩
theorem csSup_eq_greatest_of_bdd {s : Set ℤ} [DecidablePred (· ∈ s)] (b : ℤ) (Hb : ∀ z ∈ s, z ≤ b)
    (Hinh : ∃ z : ℤ, z ∈ s) : sSup s = greatestOfBdd b Hb Hinh := by
  have : s.Nonempty ∧ BddAbove s := ⟨Hinh, b, Hb⟩
  

Proof state:
s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, z ≤ b
Hinh : ∃ z, z ∈ s
this : Set.Nonempty s ∧ BddAbove s
⊢ sSup s = ↑(greatestOfBdd b Hb Hinh)

Next tactic:
simp only [sSup, this, and_self, dite_true]
theorem csSup_eq_greatest_of_bdd {s : Set ℤ} [DecidablePred (· ∈ s)] (b : ℤ) (Hb : ∀ z ∈ s, z ≤ b)
    (Hinh : ∃ z : ℤ, z ∈ s) : sSup s = greatestOfBdd b Hb Hinh := by
  have : s.Nonempty ∧ BddAbove s := ⟨Hinh, b, Hb⟩
  simp only [sSup, this, and_self, dite_true]
  

Proof state:
s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, z ≤ b
Hinh : ∃ z, z ∈ s
this : Set.Nonempty s ∧ BddAbove s
⊢ ↑(greatestOfBdd (choose (_ : BddAbove s)) (_ : choose (_ : BddAbove s) ∈ upperBounds s) (_ : Set.Nonempty s)) =
    ↑(greatestOfBdd b Hb Hinh)

Next tactic:
convert (coe_greatestOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddAbove s)) Hinh).symm
@[simp]
theorem csSup_empty : sSup (∅ : Set ℤ) = 0 :=
  dif_neg (by 

Proof state:
⊢ ¬(Set.Nonempty ∅ ∧ BddAbove ∅)

Next tactic:
simp
theorem csSup_of_not_bdd_above {s : Set ℤ} (h : ¬BddAbove s) : sSup s = 0 :=
  dif_neg (by 

Proof state:
s : Set ℤ
h : ¬BddAbove s
⊢ ¬(Set.Nonempty s ∧ BddAbove s)

Next tactic:
simp [h]
theorem csInf_eq_least_of_bdd {s : Set ℤ} [DecidablePred (· ∈ s)] (b : ℤ) (Hb : ∀ z ∈ s, b ≤ z)
    (Hinh : ∃ z : ℤ, z ∈ s) : sInf s = leastOfBdd b Hb Hinh := by
  

Proof state:
s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, b ≤ z
Hinh : ∃ z, z ∈ s
⊢ sInf s = ↑(leastOfBdd b Hb Hinh)

Next tactic:
have : s.Nonempty ∧ BddBelow s := ⟨Hinh, b, Hb⟩
theorem csInf_eq_least_of_bdd {s : Set ℤ} [DecidablePred (· ∈ s)] (b : ℤ) (Hb : ∀ z ∈ s, b ≤ z)
    (Hinh : ∃ z : ℤ, z ∈ s) : sInf s = leastOfBdd b Hb Hinh := by
  have : s.Nonempty ∧ BddBelow s := ⟨Hinh, b, Hb⟩
  

Proof state:
s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, b ≤ z
Hinh : ∃ z, z ∈ s
this : Set.Nonempty s ∧ BddBelow s
⊢ sInf s = ↑(leastOfBdd b Hb Hinh)

Next tactic:
simp only [sInf, this, and_self, dite_true]
theorem csInf_eq_least_of_bdd {s : Set ℤ} [DecidablePred (· ∈ s)] (b : ℤ) (Hb : ∀ z ∈ s, b ≤ z)
    (Hinh : ∃ z : ℤ, z ∈ s) : sInf s = leastOfBdd b Hb Hinh := by
  have : s.Nonempty ∧ BddBelow s := ⟨Hinh, b, Hb⟩
  simp only [sInf, this, and_self, dite_true]
  

Proof state:
s : Set ℤ
inst✝ : DecidablePred fun x => x ∈ s
b : ℤ
Hb : ∀ z ∈ s, b ≤ z
Hinh : ∃ z, z ∈ s
this : Set.Nonempty s ∧ BddBelow s
⊢ ↑(leastOfBdd (choose (_ : BddBelow s)) (_ : choose (_ : BddBelow s) ∈ lowerBounds s) (_ : Set.Nonempty s)) =
    ↑(leastOfBdd b Hb Hinh)

Next tactic:
convert (coe_leastOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddBelow s)) Hinh).symm
@[simp]
theorem csInf_empty : sInf (∅ : Set ℤ) = 0 :=
  dif_neg (by 

Proof state:
⊢ ¬(Set.Nonempty ∅ ∧ BddBelow ∅)

Next tactic:
simp
theorem csInf_of_not_bdd_below {s : Set ℤ} (h : ¬BddBelow s) : sInf s = 0 :=
  dif_neg (by 

Proof state:
s : Set ℤ
h : ¬BddBelow s
⊢ ¬(Set.Nonempty s ∧ BddBelow s)

Next tactic:
simp [h]
theorem csSup_mem {s : Set ℤ} (h1 : s.Nonempty) (h2 : BddAbove s) : sSup s ∈ s := by
  

Proof state:
s : Set ℤ
h1 : Set.Nonempty s
h2 : BddAbove s
⊢ sSup s ∈ s

Next tactic:
convert (greatestOfBdd _ (Classical.choose_spec h2) h1).2.1
theorem csSup_mem {s : Set ℤ} (h1 : s.Nonempty) (h2 : BddAbove s) : sSup s ∈ s := by
  convert (greatestOfBdd _ (Classical.choose_spec h2) h1).2.1
  

Proof state:
case h.e'_4
s : Set ℤ
h1 : Set.Nonempty s
h2 : BddAbove s
⊢ sSup s = ↑(greatestOfBdd (choose h2) (_ : choose h2 ∈ upperBounds s) h1)

Next tactic:
exact dif_pos ⟨h1, h2⟩
theorem csInf_mem {s : Set ℤ} (h1 : s.Nonempty) (h2 : BddBelow s) : sInf s ∈ s := by
  

Proof state:
s : Set ℤ
h1 : Set.Nonempty s
h2 : BddBelow s
⊢ sInf s ∈ s

Next tactic:
convert (leastOfBdd _ (Classical.choose_spec h2) h1).2.1
theorem csInf_mem {s : Set ℤ} (h1 : s.Nonempty) (h2 : BddBelow s) : sInf s ∈ s := by
  convert (leastOfBdd _ (Classical.choose_spec h2) h1).2.1
  

Proof state:
case h.e'_4
s : Set ℤ
h1 : Set.Nonempty s
h2 : BddBelow s
⊢ sInf s = ↑(leastOfBdd (choose h2) (_ : choose h2 ∈ lowerBounds s) h1)

Next tactic:
exact dif_pos ⟨h1, h2⟩
theorem Algebra.leftMulMatrix_complex (z : ℂ) :
    Algebra.leftMulMatrix Complex.basisOneI z = !![z.re, -z.im; z.im, z.re] := by
  

Proof state:
z : ℂ
⊢ (leftMulMatrix basisOneI) z = Matrix.of ![![z.re, -z.im], ![z.im, z.re]]

Next tactic:
ext i j
theorem Algebra.leftMulMatrix_complex (z : ℂ) :
    Algebra.leftMulMatrix Complex.basisOneI z = !![z.re, -z.im; z.im, z.re] := by
  ext i j
  

Proof state:
case a.h
z : ℂ
i j : Fin 2
⊢ (leftMulMatrix basisOneI) z i j = Matrix.of ![![z.re, -z.im], ![z.im, z.re]] i j

Next tactic:
rw [Algebra.leftMulMatrix_eq_repr_mul, Complex.coe_basisOneI_repr, Complex.coe_basisOneI, mul_re,
    mul_im, Matrix.of_apply]
theorem Algebra.leftMulMatrix_complex (z : ℂ) :
    Algebra.leftMulMatrix Complex.basisOneI z = !![z.re, -z.im; z.im, z.re] := by
  ext i j
  rw [Algebra.leftMulMatrix_eq_repr_mul, Complex.coe_basisOneI_repr, Complex.coe_basisOneI, mul_re,
    mul_im, Matrix.of_apply]
  

Proof state:
case a.h
z : ℂ
i j : Fin 2
⊢ Matrix.vecCons (z.re * (Matrix.vecCons 1 ![I] j).re - z.im * (Matrix.vecCons 1 ![I] j).im)
      ![z.re * (Matrix.vecCons 1 ![I] j).im + z.im * (Matrix.vecCons 1 ![I] j).re] i =
    Matrix.vecCons ![z.re, -z.im] ![![z.im, z.re]] i j

Next tactic:
fin_cases j
theorem Algebra.leftMulMatrix_complex (z : ℂ) :
    Algebra.leftMulMatrix Complex.basisOneI z = !![z.re, -z.im; z.im, z.re] := by
  ext i j
  rw [Algebra.leftMulMatrix_eq_repr_mul, Complex.coe_basisOneI_repr, Complex.coe_basisOneI, mul_re,
    mul_im, Matrix.of_apply]
  fin_cases j
  · 

Proof state:
case a.h.head
z : ℂ
i : Fin 2
⊢ Matrix.vecCons
      (z.re * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).re -
        z.im * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).im)
      ![z.re * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).im +
          z.im * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).re]
      i =
    Matrix.vecCons ![z.re, -z.im] ![![z.im, z.re]] i { val := 0, isLt := (_ : 0 < 2) }

Next tactic:
simp only [Fin.mk_zero, Matrix.cons_val_zero, one_re, mul_one, one_im, mul_zero, sub_zero,
      zero_add]
theorem Algebra.leftMulMatrix_complex (z : ℂ) :
    Algebra.leftMulMatrix Complex.basisOneI z = !![z.re, -z.im; z.im, z.re] := by
  ext i j
  rw [Algebra.leftMulMatrix_eq_repr_mul, Complex.coe_basisOneI_repr, Complex.coe_basisOneI, mul_re,
    mul_im, Matrix.of_apply]
  fin_cases j
  · simp only [Fin.mk_zero, Matrix.cons_val_zero, one_re, mul_one, one_im, mul_zero, sub_zero,
      zero_add]
    

Proof state:
case a.h.head
z : ℂ
i : Fin 2
⊢ Matrix.vecCons z.re ![z.im] i = Matrix.vecCons ![z.re, -z.im] ![![z.im, z.re]] i 0

Next tactic:
fin_cases i
theorem Algebra.leftMulMatrix_complex (z : ℂ) :
    Algebra.leftMulMatrix Complex.basisOneI z = !![z.re, -z.im; z.im, z.re] := by
  ext i j
  rw [Algebra.leftMulMatrix_eq_repr_mul, Complex.coe_basisOneI_repr, Complex.coe_basisOneI, mul_re,
    mul_im, Matrix.of_apply]
  fin_cases j
  · simp only [Fin.mk_zero, Matrix.cons_val_zero, one_re, mul_one, one_im, mul_zero, sub_zero,
      zero_add]
    fin_cases i <;> 

Proof state:
case a.h.head.head
z : ℂ
⊢ Matrix.vecCons z.re ![z.im] { val := 0, isLt := (_ : 0 < 2) } =
    Matrix.vecCons ![z.re, -z.im] ![![z.im, z.re]] { val := 0, isLt := (_ : 0 < 2) } 0

Next tactic:
rfl