l3lab/ntp-mathlib huggingface dataset:
theorem coe_real_ereal_eq_coe_toNNReal_sub_coe_toNNReal (x : ℝ) :
    (x : EReal) = Real.toNNReal x - Real.toNNReal (-x) := by
  rcases le_total 0 x with (h | h)
  · lift x to ℝ≥0 using h
    rw [Real.toNNReal_of_nonpos (neg_nonpos.mpr x.coe_nonneg), Real.toNNReal_coe, ENNReal.coe_zero,
      coe_ennreal_zero, sub_zero]
    rfl
  · rw [Real.toNNReal_of_nonpos h, ENNReal.coe_zero, coe_ennreal_zero, coe_nnreal_eq_coe_real,
      Real.coe_toNNReal, zero_sub, coe_neg, neg_neg]
    

Proof state:
case inr.hr
x : ℝ
h : x ≤ 0
⊢ 0 ≤ -x

Next tactic:
exact neg_nonneg.2 h
theorem toReal_sub {x y : EReal} (hx : x ≠ ⊤) (h'x : x ≠ ⊥) (hy : y ≠ ⊤) (h'y : y ≠ ⊥) :
    toReal (x - y) = toReal x - toReal y := by
  

Proof state:
x y : EReal
hx : x ≠ ⊤
h'x : x ≠ ⊥
hy : y ≠ ⊤
h'y : y ≠ ⊥
⊢ toReal (x - y) = toReal x - toReal y

Next tactic:
lift x to ℝ using ⟨hx, h'x⟩
theorem toReal_sub {x y : EReal} (hx : x ≠ ⊤) (h'x : x ≠ ⊥) (hy : y ≠ ⊤) (h'y : y ≠ ⊥) :
    toReal (x - y) = toReal x - toReal y := by
  lift x to ℝ using ⟨hx, h'x⟩
  

Proof state:
case intro
y : EReal
hy : y ≠ ⊤
h'y : y ≠ ⊥
x : ℝ
hx : ↑x ≠ ⊤
h'x : ↑x ≠ ⊥
⊢ toReal (↑x - y) = toReal ↑x - toReal y

Next tactic:
lift y to ℝ using ⟨hy, h'y⟩
theorem toReal_sub {x y : EReal} (hx : x ≠ ⊤) (h'x : x ≠ ⊥) (hy : y ≠ ⊤) (h'y : y ≠ ⊥) :
    toReal (x - y) = toReal x - toReal y := by
  lift x to ℝ using ⟨hx, h'x⟩
  lift y to ℝ using ⟨hy, h'y⟩
  

Proof state:
case intro.intro
x : ℝ
hx : ↑x ≠ ⊤
h'x : ↑x ≠ ⊥
y : ℝ
hy : ↑y ≠ ⊤
h'y : ↑y ≠ ⊥
⊢ toReal (↑x - ↑y) = toReal ↑x - toReal ↑y

Next tactic:
rfl
theorem top_mul_of_pos {x : EReal} (h : 0 < x) : ⊤ * x = ⊤ := by
  

Proof state:
x : EReal
h : 0 < x
⊢ ⊤ * x = ⊤

Next tactic:
rw [EReal.mul_comm]
theorem top_mul_of_pos {x : EReal} (h : 0 < x) : ⊤ * x = ⊤ := by
  rw [EReal.mul_comm]
  

Proof state:
x : EReal
h : 0 < x
⊢ x * ⊤ = ⊤

Next tactic:
exact mul_top_of_pos h
theorem top_mul_of_neg {x : EReal} (h : x < 0) : ⊤ * x = ⊥ := by
  

Proof state:
x : EReal
h : x < 0
⊢ ⊤ * x = ⊥

Next tactic:
rw [EReal.mul_comm]
theorem top_mul_of_neg {x : EReal} (h : x < 0) : ⊤ * x = ⊥ := by
  rw [EReal.mul_comm]
  

Proof state:
x : EReal
h : x < 0
⊢ x * ⊤ = ⊥

Next tactic:
exact mul_top_of_neg h
theorem bot_mul_of_pos {x : EReal} (h : 0 < x) : ⊥ * x = ⊥ := by
  

Proof state:
x : EReal
h : 0 < x
⊢ ⊥ * x = ⊥

Next tactic:
rw [EReal.mul_comm]
theorem bot_mul_of_pos {x : EReal} (h : 0 < x) : ⊥ * x = ⊥ := by
  rw [EReal.mul_comm]
  

Proof state:
x : EReal
h : 0 < x
⊢ x * ⊥ = ⊥

Next tactic:
exact mul_bot_of_pos h
theorem bot_mul_of_neg {x : EReal} (h : x < 0) : ⊥ * x = ⊤ := by
  

Proof state:
x : EReal
h : x < 0
⊢ ⊥ * x = ⊤

Next tactic:
rw [EReal.mul_comm]
theorem bot_mul_of_neg {x : EReal} (h : x < 0) : ⊥ * x = ⊤ := by
  rw [EReal.mul_comm]
  

Proof state:
x : EReal
h : x < 0
⊢ x * ⊥ = ⊤

Next tactic:
exact mul_bot_of_neg h
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  

Proof state:
x y : EReal
⊢ toReal (x * y) = toReal x * toReal y

Next tactic:
induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  | top_pos _ h => simp [top_mul_coe_of_pos h]
  | top_neg _ h => simp [top_mul_coe_of_neg h]
  | pos_bot _ h => simp [coe_mul_bot_of_pos h]
  | neg_bot _ h => simp [coe_mul_bot_of_neg h]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  

Proof state:
case top_zero
⊢ toReal (⊤ * 0) = toReal ⊤ * toReal 0

Next tactic:
| top_zero | zero_bot | top_top | top_bot | bot_bot => simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => 

Proof state:
case top_zero
⊢ toReal (⊤ * 0) = toReal ⊤ * toReal 0

Next tactic:
simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero 

Proof state:
case zero_bot
⊢ toReal (0 * ⊥) = toReal 0 * toReal ⊥

Next tactic:
| zero_bot | top_top | top_bot | bot_bot => simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => 

Proof state:
case zero_bot
⊢ toReal (0 * ⊥) = toReal 0 * toReal ⊥

Next tactic:
simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot 

Proof state:
case top_top
⊢ toReal (⊤ * ⊤) = toReal ⊤ * toReal ⊤

Next tactic:
| top_top | top_bot | bot_bot => simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => 

Proof state:
case top_top
⊢ toReal (⊤ * ⊤) = toReal ⊤ * toReal ⊤

Next tactic:
simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top 

Proof state:
case top_bot
⊢ toReal (⊤ * ⊥) = toReal ⊤ * toReal ⊥

Next tactic:
| top_bot | bot_bot => simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => 

Proof state:
case top_bot
⊢ toReal (⊤ * ⊥) = toReal ⊤ * toReal ⊥

Next tactic:
simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot 

Proof state:
case bot_bot
⊢ toReal (⊥ * ⊥) = toReal ⊥ * toReal ⊥

Next tactic:
| bot_bot => simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => 

Proof state:
case bot_bot
⊢ toReal (⊥ * ⊥) = toReal ⊥ * toReal ⊥

Next tactic:
simp
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  

Proof state:
case symm
x✝ y✝ : EReal
h : toReal (x✝ * y✝) = toReal x✝ * toReal y✝
⊢ toReal (y✝ * x✝) = toReal y✝ * toReal x✝

Next tactic:
| symm h => rwa [mul_comm, EReal.mul_comm]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => 

Proof state:
case symm
x✝ y✝ : EReal
h : toReal (x✝ * y✝) = toReal x✝ * toReal y✝
⊢ toReal (y✝ * x✝) = toReal y✝ * toReal x✝

Next tactic:
rwa [mul_comm, EReal.mul_comm]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  

Proof state:
case coe_coe
x✝ y✝ : ℝ
⊢ toReal (↑x✝ * ↑y✝) = toReal ↑x✝ * toReal ↑y✝

Next tactic:
| coe_coe => norm_cast
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => 

Proof state:
case coe_coe
x✝ y✝ : ℝ
⊢ toReal (↑x✝ * ↑y✝) = toReal ↑x✝ * toReal ↑y✝

Next tactic:
norm_cast
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  

Proof state:
case top_pos
x✝ : ℝ
h : 0 < x✝
⊢ toReal (⊤ * ↑x✝) = toReal ⊤ * toReal ↑x✝

Next tactic:
| top_pos _ h => simp [top_mul_coe_of_pos h]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  | top_pos _ h => 

Proof state:
case top_pos
x✝ : ℝ
h : 0 < x✝
⊢ toReal (⊤ * ↑x✝) = toReal ⊤ * toReal ↑x✝

Next tactic:
simp [top_mul_coe_of_pos h]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  | top_pos _ h => simp [top_mul_coe_of_pos h]
  

Proof state:
case top_neg
x✝ : ℝ
h : x✝ < 0
⊢ toReal (⊤ * ↑x✝) = toReal ⊤ * toReal ↑x✝

Next tactic:
| top_neg _ h => simp [top_mul_coe_of_neg h]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  | top_pos _ h => simp [top_mul_coe_of_pos h]
  | top_neg _ h => 

Proof state:
case top_neg
x✝ : ℝ
h : x✝ < 0
⊢ toReal (⊤ * ↑x✝) = toReal ⊤ * toReal ↑x✝

Next tactic:
simp [top_mul_coe_of_neg h]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  | top_pos _ h => simp [top_mul_coe_of_pos h]
  | top_neg _ h => simp [top_mul_coe_of_neg h]
  

Proof state:
case pos_bot
x✝ : ℝ
h : 0 < x✝
⊢ toReal (↑x✝ * ⊥) = toReal ↑x✝ * toReal ⊥

Next tactic:
| pos_bot _ h => simp [coe_mul_bot_of_pos h]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  | top_pos _ h => simp [top_mul_coe_of_pos h]
  | top_neg _ h => simp [top_mul_coe_of_neg h]
  | pos_bot _ h => 

Proof state:
case pos_bot
x✝ : ℝ
h : 0 < x✝
⊢ toReal (↑x✝ * ⊥) = toReal ↑x✝ * toReal ⊥

Next tactic:
simp [coe_mul_bot_of_pos h]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  | top_pos _ h => simp [top_mul_coe_of_pos h]
  | top_neg _ h => simp [top_mul_coe_of_neg h]
  | pos_bot _ h => simp [coe_mul_bot_of_pos h]
  

Proof state:
case neg_bot
x✝ : ℝ
h : x✝ < 0
⊢ toReal (↑x✝ * ⊥) = toReal ↑x✝ * toReal ⊥

Next tactic:
| neg_bot _ h => simp [coe_mul_bot_of_neg h]
theorem toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y := by
  induction x, y using induction₂_symm with
  | top_zero | zero_bot | top_top | top_bot | bot_bot => simp
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => norm_cast
  | top_pos _ h => simp [top_mul_coe_of_pos h]
  | top_neg _ h => simp [top_mul_coe_of_neg h]
  | pos_bot _ h => simp [coe_mul_bot_of_pos h]
  | neg_bot _ h => 

Proof state:
case neg_bot
x✝ : ℝ
h : x✝ < 0
⊢ toReal (↑x✝ * ⊥) = toReal ↑x✝ * toReal ⊥

Next tactic:
simp [coe_mul_bot_of_neg h]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  

Proof state:
x y : EReal
⊢ -x * y = -(x * y)

Next tactic:
induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  | top_pos _ h => rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
  | pos_top _ h => rw [coe_mul_top_of_pos h, neg_top, ← coe_neg,
    coe_mul_top_of_neg (neg_neg_of_pos h)]
  | top_neg _ h => rw [top_mul_coe_of_neg h, neg_top, bot_mul_coe_of_neg h, neg_bot]
  | pos_bot _ h => rw [coe_mul_bot_of_pos h, neg_bot, ← coe_neg,
    coe_mul_bot_of_neg (neg_neg_of_pos h)]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  

Proof state:
case top_zero
⊢ -⊤ * 0 = -(⊤ * 0)

Next tactic:
| top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => 

Proof state:
case top_zero
⊢ -⊤ * 0 = -(⊤ * 0)

Next tactic:
simp only [zero_mul, mul_zero, neg_zero]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero 

Proof state:
case zero_top
⊢ -0 * ⊤ = -(0 * ⊤)

Next tactic:
| zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => 

Proof state:
case zero_top
⊢ -0 * ⊤ = -(0 * ⊤)

Next tactic:
simp only [zero_mul, mul_zero, neg_zero]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top 

Proof state:
case zero_bot
⊢ -0 * ⊥ = -(0 * ⊥)

Next tactic:
| zero_bot => simp only [zero_mul, mul_zero, neg_zero]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => 

Proof state:
case zero_bot
⊢ -0 * ⊥ = -(0 * ⊥)

Next tactic:
simp only [zero_mul, mul_zero, neg_zero]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  

Proof state:
case top_top
⊢ -⊤ * ⊤ = -(⊤ * ⊤)

Next tactic:
| top_top | top_bot => rfl
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => 

Proof state:
case top_top
⊢ -⊤ * ⊤ = -(⊤ * ⊤)

Next tactic:
rfl
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top 

Proof state:
case top_bot
⊢ -⊤ * ⊥ = -(⊤ * ⊥)

Next tactic:
| top_bot => rfl
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => 

Proof state:
case top_bot
⊢ -⊤ * ⊥ = -(⊤ * ⊥)

Next tactic:
rfl
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  

Proof state:
case neg_left
x✝ y✝ : EReal
h : -x✝ * y✝ = -(x✝ * y✝)
⊢ - -x✝ * y✝ = -(-x✝ * y✝)

Next tactic:
| neg_left h => rw [h, neg_neg, neg_neg]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => 

Proof state:
case neg_left
x✝ y✝ : EReal
h : -x✝ * y✝ = -(x✝ * y✝)
⊢ - -x✝ * y✝ = -(-x✝ * y✝)

Next tactic:
rw [h, neg_neg, neg_neg]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  

Proof state:
case coe_coe
x✝ y✝ : ℝ
⊢ -↑x✝ * ↑y✝ = -(↑x✝ * ↑y✝)

Next tactic:
| coe_coe => norm_cast; exact neg_mul _ _
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => 

Proof state:
case coe_coe
x✝ y✝ : ℝ
⊢ -↑x✝ * ↑y✝ = -(↑x✝ * ↑y✝)

Next tactic:
norm_cast
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; 

Proof state:
case coe_coe
x✝ y✝ : ℝ
⊢ -x✝ * y✝ = -(x✝ * y✝)

Next tactic:
exact neg_mul _ _
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  

Proof state:
case top_pos
x✝ : ℝ
h : 0 < x✝
⊢ -⊤ * ↑x✝ = -(⊤ * ↑x✝)

Next tactic:
| top_pos _ h => rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  | top_pos _ h => 

Proof state:
case top_pos
x✝ : ℝ
h : 0 < x✝
⊢ -⊤ * ↑x✝ = -(⊤ * ↑x✝)

Next tactic:
rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  | top_pos _ h => rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
  

Proof state:
case pos_top
x✝ : ℝ
h : 0 < x✝
⊢ -↑x✝ * ⊤ = -(↑x✝ * ⊤)

Next tactic:
| pos_top _ h => rw [coe_mul_top_of_pos h, neg_top, ← coe_neg,
    coe_mul_top_of_neg (neg_neg_of_pos h)]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  | top_pos _ h => rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
  | pos_top _ h => 

Proof state:
case pos_top
x✝ : ℝ
h : 0 < x✝
⊢ -↑x✝ * ⊤ = -(↑x✝ * ⊤)

Next tactic:
rw [coe_mul_top_of_pos h, neg_top, ← coe_neg,
    coe_mul_top_of_neg (neg_neg_of_pos h)]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  | top_pos _ h => rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
  | pos_top _ h => rw [coe_mul_top_of_pos h, neg_top, ← coe_neg,
    coe_mul_top_of_neg (neg_neg_of_pos h)]
  

Proof state:
case top_neg
x✝ : ℝ
h : x✝ < 0
⊢ -⊤ * ↑x✝ = -(⊤ * ↑x✝)

Next tactic:
| top_neg _ h => rw [top_mul_coe_of_neg h, neg_top, bot_mul_coe_of_neg h, neg_bot]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  | top_pos _ h => rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
  | pos_top _ h => rw [coe_mul_top_of_pos h, neg_top, ← coe_neg,
    coe_mul_top_of_neg (neg_neg_of_pos h)]
  | top_neg _ h => 

Proof state:
case top_neg
x✝ : ℝ
h : x✝ < 0
⊢ -⊤ * ↑x✝ = -(⊤ * ↑x✝)

Next tactic:
rw [top_mul_coe_of_neg h, neg_top, bot_mul_coe_of_neg h, neg_bot]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  | top_pos _ h => rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
  | pos_top _ h => rw [coe_mul_top_of_pos h, neg_top, ← coe_neg,
    coe_mul_top_of_neg (neg_neg_of_pos h)]
  | top_neg _ h => rw [top_mul_coe_of_neg h, neg_top, bot_mul_coe_of_neg h, neg_bot]
  

Proof state:
case pos_bot
x✝ : ℝ
h : 0 < x✝
⊢ -↑x✝ * ⊥ = -(↑x✝ * ⊥)

Next tactic:
| pos_bot _ h => rw [coe_mul_bot_of_pos h, neg_bot, ← coe_neg,
    coe_mul_bot_of_neg (neg_neg_of_pos h)]
protected theorem neg_mul (x y : EReal) : -x * y = -(x * y) := by
  induction x, y using induction₂_neg_left with
  | top_zero | zero_top | zero_bot => simp only [zero_mul, mul_zero, neg_zero]
  | top_top | top_bot => rfl
  | neg_left h => rw [h, neg_neg, neg_neg]
  | coe_coe => norm_cast; exact neg_mul _ _
  | top_pos _ h => rw [top_mul_coe_of_pos h, neg_top, bot_mul_coe_of_pos h]
  | pos_top _ h => rw [coe_mul_top_of_pos h, neg_top, ← coe_neg,
    coe_mul_top_of_neg (neg_neg_of_pos h)]
  | top_neg _ h => rw [top_mul_coe_of_neg h, neg_top, bot_mul_coe_of_neg h, neg_bot]
  | pos_bot _ h => 

Proof state:
case pos_bot
x✝ : ℝ
h : 0 < x✝
⊢ -↑x✝ * ⊥ = -(↑x✝ * ⊥)

Next tactic:
rw [coe_mul_bot_of_pos h, neg_bot, ← coe_neg,
    coe_mul_bot_of_neg (neg_neg_of_pos h)]
instance : HasDistribNeg EReal where
  neg_mul := EReal.neg_mul
  mul_neg := fun x y => by
    

Proof state:
x y : EReal
⊢ x * -y = -(x * y)

Next tactic:
rw [x.mul_comm, x.mul_comm]
instance : HasDistribNeg EReal where
  neg_mul := EReal.neg_mul
  mul_neg := fun x y => by
    rw [x.mul_comm, x.mul_comm]
    

Proof state:
x y : EReal
⊢ -y * x = -(y * x)

Next tactic:
exact y.neg_mul x
@[simp]
theorem abs_eq_zero_iff {x : EReal} : x.abs = 0 ↔ x = 0 := by
  

Proof state:
x : EReal
⊢ EReal.abs x = 0 ↔ x = 0

Next tactic:
induction x using EReal.rec
@[simp]
theorem abs_eq_zero_iff {x : EReal} : x.abs = 0 ↔ x = 0 := by
  induction x using EReal.rec
  · 

Proof state:
case h_bot
⊢ EReal.abs ⊥ = 0 ↔ ⊥ = 0

Next tactic:
simp only [abs_bot, ENNReal.top_ne_zero, bot_ne_zero]
@[simp]
theorem abs_eq_zero_iff {x : EReal} : x.abs = 0 ↔ x = 0 := by
  induction x using EReal.rec
  · simp only [abs_bot, ENNReal.top_ne_zero, bot_ne_zero]
  · 

Proof state:
case h_real
a✝ : ℝ
⊢ EReal.abs ↑a✝ = 0 ↔ ↑a✝ = 0

Next tactic:
simp only [abs_def, coe_eq_zero, ENNReal.ofReal_eq_zero, abs_nonpos_iff]
@[simp]
theorem abs_eq_zero_iff {x : EReal} : x.abs = 0 ↔ x = 0 := by
  induction x using EReal.rec
  · simp only [abs_bot, ENNReal.top_ne_zero, bot_ne_zero]
  · simp only [abs_def, coe_eq_zero, ENNReal.ofReal_eq_zero, abs_nonpos_iff]
  · 

Proof state:
case h_top
⊢ EReal.abs ⊤ = 0 ↔ ⊤ = 0

Next tactic:
simp only [abs_top, ENNReal.top_ne_zero, top_ne_zero]
@[simp]
theorem abs_zero : (0 : EReal).abs = 0 := by 

Proof state:
⊢ EReal.abs 0 = 0

Next tactic:
rw [abs_eq_zero_iff]
@[simp]
theorem coe_abs (x : ℝ) : ((x : EReal).abs : EReal) = (|x| : ℝ) := by
  

Proof state:
x : ℝ
⊢ ↑(EReal.abs ↑x) = ↑|x|

Next tactic:
rw [abs_def, ← Real.coe_nnabs, ENNReal.ofReal_coe_nnreal]
@[simp]
theorem coe_abs (x : ℝ) : ((x : EReal).abs : EReal) = (|x| : ℝ) := by
  rw [abs_def, ← Real.coe_nnabs, ENNReal.ofReal_coe_nnreal]; 

Proof state:
x : ℝ
⊢ ↑↑(Real.nnabs x) = ↑↑(Real.nnabs x)

Next tactic:
rfl
@[simp]
protected theorem abs_neg : ∀ x : EReal, (-x).abs = x.abs
  | ⊤ => rfl
  | ⊥ => rfl
  | (x : ℝ) => by 

Proof state:
x : ℝ
⊢ EReal.abs (-↑x) = EReal.abs ↑x

Next tactic:
rw [abs_def, ← coe_neg, abs_def, abs_neg]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  

Proof state:
x y : EReal
⊢ EReal.abs (x * y) = EReal.abs x * EReal.abs y

Next tactic:
induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, abs_zero]
  | top_top => rfl
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => simp only [← coe_mul, abs_def, _root_.abs_mul, ENNReal.ofReal_mul (abs_nonneg _)]
  | top_pos _ h =>
    rw [top_mul_coe_of_pos h, abs_top, ENNReal.top_mul]
    rw [Ne.def, abs_eq_zero_iff, coe_eq_zero]
    exact h.ne'
  | neg_left h => rwa [neg_mul, EReal.abs_neg, EReal.abs_neg]