l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  induction x, y using induction₂_symm_neg with
  

Proof state:
case top_zero
⊢ EReal.abs (⊤ * 0) = EReal.abs ⊤ * EReal.abs 0

Next tactic:
| top_zero => simp only [zero_mul, mul_zero, abs_zero]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  induction x, y using induction₂_symm_neg with
  | top_zero => 

Proof state:
case top_zero
⊢ EReal.abs (⊤ * 0) = EReal.abs ⊤ * EReal.abs 0

Next tactic:
simp only [zero_mul, mul_zero, abs_zero]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, abs_zero]
  

Proof state:
case top_top
⊢ EReal.abs (⊤ * ⊤) = EReal.abs ⊤ * EReal.abs ⊤

Next tactic:
| top_top => rfl
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, abs_zero]
  | top_top => 

Proof state:
case top_top
⊢ EReal.abs (⊤ * ⊤) = EReal.abs ⊤ * EReal.abs ⊤

Next tactic:
rfl
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, abs_zero]
  | top_top => rfl
  

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

Next tactic:
| symm h => rwa [mul_comm, EReal.mul_comm]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, abs_zero]
  | top_top => rfl
  | symm h => 

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

Next tactic:
rwa [mul_comm, EReal.mul_comm]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  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]
  

Proof state:
case coe_coe
x✝ y✝ : ℝ
⊢ EReal.abs (↑x✝ * ↑y✝) = EReal.abs ↑x✝ * EReal.abs ↑y✝

Next tactic:
| coe_coe => simp only [← coe_mul, abs_def, _root_.abs_mul, ENNReal.ofReal_mul (abs_nonneg _)]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  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 => 

Proof state:
case coe_coe
x✝ y✝ : ℝ
⊢ EReal.abs (↑x✝ * ↑y✝) = EReal.abs ↑x✝ * EReal.abs ↑y✝

Next tactic:
simp only [← coe_mul, abs_def, _root_.abs_mul, ENNReal.ofReal_mul (abs_nonneg _)]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  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 _)]
  

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

Next tactic:
| 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'
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  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 =>
    

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

Next tactic:
rw [top_mul_coe_of_pos h, abs_top, ENNReal.top_mul]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  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]
    

Proof state:
case top_pos
x✝ : ℝ
h : 0 < x✝
⊢ EReal.abs ↑x✝ ≠ 0

Next tactic:
rw [Ne.def, abs_eq_zero_iff, coe_eq_zero]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  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]
    

Proof state:
case top_pos
x✝ : ℝ
h : 0 < x✝
⊢ ¬x✝ = 0

Next tactic:
exact h.ne'
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  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'
  

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

Next tactic:
| neg_left h => rwa [neg_mul, EReal.abs_neg, EReal.abs_neg]
@[simp]
theorem abs_mul (x y : EReal) : (x * y).abs = x.abs * y.abs := by
  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 => 

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

Next tactic:
rwa [neg_mul, EReal.abs_neg, EReal.abs_neg]
@[simp]
theorem sign_coe (x : ℝ) : sign (x : EReal) = sign x := by
  

Proof state:
x : ℝ
⊢ sign ↑x = sign x

Next tactic:
simp only [sign, OrderHom.coe_mk, EReal.coe_pos, EReal.coe_neg']
@[simp, norm_cast]
theorem coe_coe_sign (x : SignType) : ((x : ℝ) : EReal) = x := by 

Proof state:
x : SignType
⊢ ↑↑x = ↑x

Next tactic:
cases x
@[simp, norm_cast]
theorem coe_coe_sign (x : SignType) : ((x : ℝ) : EReal) = x := by cases x <;> 

Proof state:
case zero
⊢ ↑↑SignType.zero = ↑SignType.zero

Next tactic:
rfl
@[simp, norm_cast]
theorem coe_coe_sign (x : SignType) : ((x : ℝ) : EReal) = x := by cases x <;> 

Proof state:
case neg
⊢ ↑↑SignType.neg = ↑SignType.neg

Next tactic:
rfl
@[simp, norm_cast]
theorem coe_coe_sign (x : SignType) : ((x : ℝ) : EReal) = x := by cases x <;> 

Proof state:
case pos
⊢ ↑↑SignType.pos = ↑SignType.pos

Next tactic:
rfl
@[simp] theorem sign_neg : ∀ x : EReal, sign (-x) = -sign x
  | ⊤ => rfl
  | ⊥ => rfl
  | (x : ℝ) => by 

Proof state:
x : ℝ
⊢ sign (-↑x) = -sign ↑x

Next tactic:
rw [← coe_neg, sign_coe, sign_coe, Left.sign_neg]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  

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

Next tactic:
induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => simp only [← coe_mul, sign_coe, _root_.sign_mul, ENNReal.ofReal_mul (abs_nonneg _)]
  | top_pos _ h =>
    rw [top_mul_coe_of_pos h, sign_top, one_mul, sign_pos (EReal.coe_pos.2 h)]
  | neg_left h => rw [neg_mul, sign_neg, sign_neg, h, neg_mul]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  

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

Next tactic:
| top_zero => simp only [zero_mul, mul_zero, sign_zero]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => 

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

Next tactic:
simp only [zero_mul, mul_zero, sign_zero]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  

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

Next tactic:
| top_top => rfl
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => 

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

Next tactic:
rfl
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  

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

Next tactic:
| symm h => rwa [mul_comm, EReal.mul_comm]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  | symm h => 

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

Next tactic:
rwa [mul_comm, EReal.mul_comm]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  | symm h => rwa [mul_comm, EReal.mul_comm]
  

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

Next tactic:
| coe_coe => simp only [← coe_mul, sign_coe, _root_.sign_mul, ENNReal.ofReal_mul (abs_nonneg _)]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => 

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

Next tactic:
simp only [← coe_mul, sign_coe, _root_.sign_mul, ENNReal.ofReal_mul (abs_nonneg _)]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => simp only [← coe_mul, sign_coe, _root_.sign_mul, ENNReal.ofReal_mul (abs_nonneg _)]
  

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

Next tactic:
| top_pos _ h =>
    rw [top_mul_coe_of_pos h, sign_top, one_mul, sign_pos (EReal.coe_pos.2 h)]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => simp only [← coe_mul, sign_coe, _root_.sign_mul, ENNReal.ofReal_mul (abs_nonneg _)]
  | top_pos _ h =>
    

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

Next tactic:
rw [top_mul_coe_of_pos h, sign_top, one_mul, sign_pos (EReal.coe_pos.2 h)]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => simp only [← coe_mul, sign_coe, _root_.sign_mul, ENNReal.ofReal_mul (abs_nonneg _)]
  | top_pos _ h =>
    rw [top_mul_coe_of_pos h, sign_top, one_mul, sign_pos (EReal.coe_pos.2 h)]
  

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

Next tactic:
| neg_left h => rw [neg_mul, sign_neg, sign_neg, h, neg_mul]
@[simp]
theorem sign_mul (x y : EReal) : sign (x * y) = sign x * sign y := by
  induction x, y using induction₂_symm_neg with
  | top_zero => simp only [zero_mul, mul_zero, sign_zero]
  | top_top => rfl
  | symm h => rwa [mul_comm, EReal.mul_comm]
  | coe_coe => simp only [← coe_mul, sign_coe, _root_.sign_mul, ENNReal.ofReal_mul (abs_nonneg _)]
  | top_pos _ h =>
    rw [top_mul_coe_of_pos h, sign_top, one_mul, sign_pos (EReal.coe_pos.2 h)]
  | neg_left h => 

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

Next tactic:
rw [neg_mul, sign_neg, sign_neg, h, neg_mul]
@[simp] protected theorem sign_mul_abs : ∀ x : EReal, (sign x * x.abs : EReal) = x
  | ⊥ => by 

Proof state:
⊢ ↑(sign ⊥) * ↑(EReal.abs ⊥) = ⊥

Next tactic:
simp
@[simp] protected theorem sign_mul_abs : ∀ x : EReal, (sign x * x.abs : EReal) = x
  | ⊥ => by simp
  | ⊤ => by 

Proof state:
⊢ ↑(sign ⊤) * ↑(EReal.abs ⊤) = ⊤

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

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

Next tactic:
rw [sign_coe, coe_abs, ← coe_coe_sign, ← coe_mul, sign_mul_abs]
@[simp] protected theorem abs_mul_sign (x : EReal) : (x.abs * sign x : EReal) = x := by
  

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

Next tactic:
rw [EReal.mul_comm, EReal.sign_mul_abs]
theorem sign_eq_and_abs_eq_iff_eq {x y : EReal} :
    x.abs = y.abs ∧ sign x = sign y ↔ x = y := by
  

Proof state:
x y : EReal
⊢ EReal.abs x = EReal.abs y ∧ sign x = sign y ↔ x = y

Next tactic:
constructor
theorem sign_eq_and_abs_eq_iff_eq {x y : EReal} :
    x.abs = y.abs ∧ sign x = sign y ↔ x = y := by
  constructor
  · 

Proof state:
case mp
x y : EReal
⊢ EReal.abs x = EReal.abs y ∧ sign x = sign y → x = y

Next tactic:
rintro ⟨habs, hsign⟩
theorem sign_eq_and_abs_eq_iff_eq {x y : EReal} :
    x.abs = y.abs ∧ sign x = sign y ↔ x = y := by
  constructor
  · rintro ⟨habs, hsign⟩
    

Proof state:
case mp.intro
x y : EReal
habs : EReal.abs x = EReal.abs y
hsign : sign x = sign y
⊢ x = y

Next tactic:
rw [← x.sign_mul_abs, ← y.sign_mul_abs, habs, hsign]
theorem sign_eq_and_abs_eq_iff_eq {x y : EReal} :
    x.abs = y.abs ∧ sign x = sign y ↔ x = y := by
  constructor
  · rintro ⟨habs, hsign⟩
    rw [← x.sign_mul_abs, ← y.sign_mul_abs, habs, hsign]
  · 

Proof state:
case mpr
x y : EReal
⊢ x = y → EReal.abs x = EReal.abs y ∧ sign x = sign y

Next tactic:
rintro rfl
theorem sign_eq_and_abs_eq_iff_eq {x y : EReal} :
    x.abs = y.abs ∧ sign x = sign y ↔ x = y := by
  constructor
  · rintro ⟨habs, hsign⟩
    rw [← x.sign_mul_abs, ← y.sign_mul_abs, habs, hsign]
  · rintro rfl
    

Proof state:
case mpr
x : EReal
⊢ EReal.abs x = EReal.abs x ∧ sign x = sign x

Next tactic:
exact ⟨rfl, rfl⟩
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  

Proof state:
x y : EReal
⊢ x ≤ y ↔
    sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
constructor
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · 

Proof state:
case mp
x y : EReal
⊢ x ≤ y →
    sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
intro h
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    

Proof state:
case mp
x y : EReal
h : x ≤ y
⊢ sign x < sign y ∨
    sign x = SignType.neg ∧ sign y = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
      sign x = SignType.zero ∧ sign y = SignType.zero ∨
        sign x = SignType.pos ∧ sign y = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
    

Proof state:
case mp
x y : EReal
h : x ≤ y
hs : sign x = sign y
⊢ sign x = SignType.neg ∧ sign y = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
    sign x = SignType.zero ∧ sign y = SignType.zero ∨
      sign x = SignType.pos ∧ sign y = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
rw [← x.sign_mul_abs, ← y.sign_mul_abs] at h
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
    rw [← x.sign_mul_abs, ← y.sign_mul_abs] at h
    

Proof state:
case mp
x y : EReal
h : ↑(sign x) * ↑(EReal.abs x) ≤ ↑(sign y) * ↑(EReal.abs y)
hs : sign x = sign y
⊢ sign x = SignType.neg ∧ sign y = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
    sign x = SignType.zero ∧ sign y = SignType.zero ∨
      sign x = SignType.pos ∧ sign y = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
cases hy : sign y
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
    rw [← x.sign_mul_abs, ← y.sign_mul_abs] at h
    cases hy : sign y <;> 

Proof state:
case mp.zero
x y : EReal
h : ↑(sign x) * ↑(EReal.abs x) ≤ ↑(sign y) * ↑(EReal.abs y)
hs : sign x = sign y
hy : sign y = SignType.zero
⊢ sign x = SignType.neg ∧ SignType.zero = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
    sign x = SignType.zero ∧ SignType.zero = SignType.zero ∨
      sign x = SignType.pos ∧ SignType.zero = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
rw [hs, hy] at h ⊢
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
    rw [← x.sign_mul_abs, ← y.sign_mul_abs] at h
    cases hy : sign y <;> 

Proof state:
case mp.neg
x y : EReal
h : ↑(sign x) * ↑(EReal.abs x) ≤ ↑(sign y) * ↑(EReal.abs y)
hs : sign x = sign y
hy : sign y = SignType.neg
⊢ sign x = SignType.neg ∧ SignType.neg = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
    sign x = SignType.zero ∧ SignType.neg = SignType.zero ∨
      sign x = SignType.pos ∧ SignType.neg = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
rw [hs, hy] at h ⊢
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
    rw [← x.sign_mul_abs, ← y.sign_mul_abs] at h
    cases hy : sign y <;> 

Proof state:
case mp.pos
x y : EReal
h : ↑(sign x) * ↑(EReal.abs x) ≤ ↑(sign y) * ↑(EReal.abs y)
hs : sign x = sign y
hy : sign y = SignType.pos
⊢ sign x = SignType.neg ∧ SignType.pos = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
    sign x = SignType.zero ∧ SignType.pos = SignType.zero ∨
      sign x = SignType.pos ∧ SignType.pos = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
rw [hs, hy] at h ⊢
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
    rw [← x.sign_mul_abs, ← y.sign_mul_abs] at h
    cases hy : sign y <;> rw [hs, hy] at h ⊢
    · 

Proof state:
case mp.zero
x y : EReal
h : ↑SignType.zero * ↑(EReal.abs x) ≤ ↑SignType.zero * ↑(EReal.abs y)
hs : sign x = sign y
hy : sign y = SignType.zero
⊢ SignType.zero = SignType.neg ∧ SignType.zero = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
    SignType.zero = SignType.zero ∧ SignType.zero = SignType.zero ∨
      SignType.zero = SignType.pos ∧ SignType.zero = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
simp
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
    rw [← x.sign_mul_abs, ← y.sign_mul_abs] at h
    cases hy : sign y <;> rw [hs, hy] at h ⊢
    · simp
    · 

Proof state:
case mp.neg
x y : EReal
h : ↑SignType.neg * ↑(EReal.abs x) ≤ ↑SignType.neg * ↑(EReal.abs y)
hs : sign x = sign y
hy : sign y = SignType.neg
⊢ SignType.neg = SignType.neg ∧ SignType.neg = SignType.neg ∧ EReal.abs y ≤ EReal.abs x ∨
    SignType.neg = SignType.zero ∧ SignType.neg = SignType.zero ∨
      SignType.neg = SignType.pos ∧ SignType.neg = SignType.pos ∧ EReal.abs x ≤ EReal.abs y

Next tactic:
left
theorem le_iff_sign {x y : EReal} :
    x ≤ y ↔ sign x < sign y ∨
      sign x = SignType.neg ∧ sign y = SignType.neg ∧ y.abs ≤ x.abs ∨
        sign x = SignType.zero ∧ sign y = SignType.zero ∨
          sign x = SignType.pos ∧ sign y = SignType.pos ∧ x.abs ≤ y.abs := by
  constructor
  · intro h
    refine (sign.monotone h).lt_or_eq.imp_right (fun hs => ?_)
    rw [← x.sign_mul_abs, ← y.sign_mul_abs] at h
    cases hy : sign y <;> rw [hs, hy] at h ⊢
    · simp
    · left; 

Proof state:
case mp.neg.h
x y : EReal
h : ↑SignType.neg * ↑(EReal.abs x) ≤ ↑SignType.neg * ↑(EReal.abs y)
hs : sign x = sign y
hy : sign y = SignType.neg
⊢ SignType.neg = SignType.neg ∧ SignType.neg = SignType.neg ∧ EReal.abs y ≤ EReal.abs x

Next tactic:
simpa using h