[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedSemiring α
a b c d : α
H : 0 ≤ a
⊢ 0 ≤ a ^ 0
[PROOFSTEP]
rw [pow_zero]
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedSemiring α
a b c d : α
H : 0 ≤ a
⊢ 0 ≤ 1
[PROOFSTEP]
exact zero_le_one
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedSemiring α
a b c d : α
H : 0 ≤ a
n : ℕ
⊢ 0 ≤ a ^ (n + 1)
[PROOFSTEP]
rw [pow_succ]
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedSemiring α
a b c d : α
H : 0 ≤ a
n : ℕ
⊢ 0 ≤ a * a ^ n
[PROOFSTEP]
exact mul_nonneg H (pow_nonneg H _)
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedSemiring α
a b c d : α
a2 : 2 ≤ a
b0 : 0 ≤ b
⊢ a + (a + a * b) ≤ a * (2 + b)
[PROOFSTEP]
rw [mul_add, mul_two, add_assoc]
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedSemiring α
a b c d : α
h : 0 < a
⊢ 0 < bit1 a
[PROOFSTEP]
nontriviality
[GOAL]
α : Type u
β : Type u_1
inst✝¹ : OrderedSemiring α
a b c d : α
h : 0 < a
inst✝ : Nontrivial α
⊢ 0 < bit1 a
[PROOFSTEP]
exact bit1_pos h.le
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a✝ b✝ c✝ d : α
src✝¹ : OrderedRing α := inst✝
src✝ : Semiring α := Ring.toSemiring
a b c : α
h : a ≤ b
hc : 0 ≤ c
⊢ c * a ≤ c * b
[PROOFSTEP]
simpa only [mul_sub, sub_nonneg] using OrderedRing.mul_nonneg _ _ hc (sub_nonneg.2 h)
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a✝ b✝ c✝ d : α
src✝¹ : OrderedRing α := inst✝
src✝ : Semiring α := Ring.toSemiring
a b c : α
h : a ≤ b
hc : 0 ≤ c
⊢ a * c ≤ b * c
[PROOFSTEP]
simpa only [sub_mul, sub_nonneg] using OrderedRing.mul_nonneg _ _ (sub_nonneg.2 h) hc
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a b c d : α
h : b ≤ a
hc : c ≤ 0
⊢ c * a ≤ c * b
[PROOFSTEP]
simpa only [neg_mul, neg_le_neg_iff] using mul_le_mul_of_nonneg_left h (neg_nonneg.2 hc)
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a b c d : α
h : b ≤ a
hc : c ≤ 0
⊢ a * c ≤ b * c
[PROOFSTEP]
simpa only [mul_neg, neg_le_neg_iff] using mul_le_mul_of_nonneg_right h (neg_nonneg.2 hc)
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a b c d : α
ha : a ≤ 0
hb : b ≤ 0
⊢ 0 ≤ a * b
[PROOFSTEP]
simpa only [zero_mul] using mul_le_mul_of_nonpos_right ha hb
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a b c d : α
hb : b ≤ 0
h : a ≤ 1
⊢ b ≤ a * b
[PROOFSTEP]
simpa only [one_mul] using mul_le_mul_of_nonpos_right h hb
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a b c d : α
hb : b ≤ 0
h : 1 ≤ a
⊢ a * b ≤ b
[PROOFSTEP]
simpa only [one_mul] using mul_le_mul_of_nonpos_right h hb
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a b c d : α
ha : a ≤ 0
h : b ≤ 1
⊢ a ≤ a * b
[PROOFSTEP]
simpa only [mul_one] using mul_le_mul_of_nonpos_left h ha
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a b c d : α
ha : a ≤ 0
h : 1 ≤ b
⊢ a * b ≤ a
[PROOFSTEP]
simpa only [mul_one] using mul_le_mul_of_nonpos_left h ha
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a✝ b✝ c d a b : α
h : a ≤ b
⊢ b = a + (b - a)
[PROOFSTEP]
simp
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a✝ b✝ c✝ d a b : α
x✝ : ∃ c, c ≥ 0 ∧ b = a + c
c : α
hc : c ≥ 0
h : b = a + c
⊢ a ≤ b
[PROOFSTEP]
rw [h, le_add_iff_nonneg_right]
[GOAL]
α : Type u
β : Type u_1
inst✝ : OrderedRing α
a✝ b✝ c✝ d a b : α
x✝ : ∃ c, c ≥ 0 ∧ b = a + c
c : α
hc : c ≥ 0
h : b = a + c
⊢ 0 ≤ c
[PROOFSTEP]
exact hc
[GOAL]
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b✝ c✝ d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a b c : α
hab : a ≤ b
hc : 0 ≤ c
⊢ c * a ≤ c * b
[PROOFSTEP]
obtain rfl | hab := Decidable.eq_or_lt_of_le hab
[GOAL]
case inl
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b c✝ d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a c : α
hc : 0 ≤ c
hab : a ≤ a
⊢ c * a ≤ c * a
[PROOFSTEP]
rfl
[GOAL]
case inr
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b✝ c✝ d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a b c : α
hab✝ : a ≤ b
hc : 0 ≤ c
hab : a < b
⊢ c * a ≤ c * b
[PROOFSTEP]
obtain rfl | hc := Decidable.eq_or_lt_of_le hc
[GOAL]
case inr.inl
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b✝ c d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a b : α
hab✝ : a ≤ b
hab : a < b
hc : 0 ≤ 0
⊢ 0 * a ≤ 0 * b
[PROOFSTEP]
simp
[GOAL]
case inr.inr
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b✝ c✝ d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a b c : α
hab✝ : a ≤ b
hc✝ : 0 ≤ c
hab : a < b
hc : 0 < c
⊢ c * a ≤ c * b
[PROOFSTEP]
exact (mul_lt_mul_of_pos_left hab hc).le
[GOAL]
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b✝ c✝ d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a b c : α
hab : a ≤ b
hc : 0 ≤ c
⊢ a * c ≤ b * c
[PROOFSTEP]
obtain rfl | hab := Decidable.eq_or_lt_of_le hab
[GOAL]
case inl
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b c✝ d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a c : α
hc : 0 ≤ c
hab : a ≤ a
⊢ a * c ≤ a * c
[PROOFSTEP]
rfl
[GOAL]
case inr
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b✝ c✝ d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a b c : α
hab✝ : a ≤ b
hc : 0 ≤ c
hab : a < b
⊢ a * c ≤ b * c
[PROOFSTEP]
obtain rfl | hc := Decidable.eq_or_lt_of_le hc
[GOAL]
case inr.inl
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b✝ c d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a b : α
hab✝ : a ≤ b
hab : a < b
hc : 0 ≤ 0
⊢ a * 0 ≤ b * 0
[PROOFSTEP]
simp
[GOAL]
case inr.inr
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a✝ b✝ c✝ d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : StrictOrderedSemiring α := inst✝¹
a b c : α
hab✝ : a ≤ b
hc✝ : 0 ≤ c
hab : a < b
hc : 0 < c
⊢ a * c ≤ b * c
[PROOFSTEP]
exact (mul_lt_mul_of_pos_right hab hc).le
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
H : 0 < a
⊢ 0 < a ^ 0
[PROOFSTEP]
nontriviality
[GOAL]
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
H : 0 < a
inst✝ : Nontrivial α
⊢ 0 < a ^ 0
[PROOFSTEP]
rw [pow_zero]
[GOAL]
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
H : 0 < a
inst✝ : Nontrivial α
⊢ 0 < 1
[PROOFSTEP]
exact zero_lt_one
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
H : 0 < a
n : ℕ
⊢ 0 < a ^ (n + 1)
[PROOFSTEP]
rw [pow_succ]
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
H : 0 < a
n : ℕ
⊢ 0 < a * a ^ n
[PROOFSTEP]
exact mul_pos H (pow_pos H _)
[GOAL]
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
h1 : a < c
h2 : b < d
h3 : 0 ≤ a
h4 : 0 ≤ b
b0 : 0 = b
⊢ a * b < c * d
[PROOFSTEP]
rw [← b0, mul_zero]
[GOAL]
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
h1 : a < c
h2 : b < d
h3 : 0 ≤ a
h4 : 0 ≤ b
b0 : 0 = b
⊢ 0 < c * d
[PROOFSTEP]
exact mul_pos (h3.trans_lt h1) (h4.trans_lt h2)
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
⊢ a < c → b < d → 0 ≤ a → 0 ≤ b → a * b < c * d
[PROOFSTEP]
classical exact Decidable.mul_lt_mul''
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
⊢ a < c → b < d → 0 ≤ a → 0 ≤ b → a * b < c * d
[PROOFSTEP]
exact Decidable.mul_lt_mul''
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
hn : 0 < a
hm : 1 < b
⊢ a < b * a
[PROOFSTEP]
convert mul_lt_mul_of_pos_right hm hn
[GOAL]
case h.e'_3
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
hn : 0 < a
hm : 1 < b
⊢ a = 1 * a
[PROOFSTEP]
rw [one_mul]
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
hn : 0 < a
hm : 1 < b
⊢ a < a * b
[PROOFSTEP]
convert mul_lt_mul_of_pos_left hm hn
[GOAL]
case h.e'_3
α : Type u
β : Type u_1
inst✝ : StrictOrderedSemiring α
a b c d : α
hn : 0 < a
hm : 1 < b
⊢ a = a * 1
[PROOFSTEP]
rw [mul_one]
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a✝ b✝ c✝ : α
src✝¹ : StrictOrderedRing α := inst✝
src✝ : Semiring α := Ring.toSemiring
a b c : α
h : a < b
hc : 0 < c
⊢ c * a < c * b
[PROOFSTEP]
simpa only [mul_sub, sub_pos] using StrictOrderedRing.mul_pos _ _ hc (sub_pos.2 h)
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a✝ b✝ c✝ : α
src✝¹ : StrictOrderedRing α := inst✝
src✝ : Semiring α := Ring.toSemiring
a b c : α
h : a < b
hc : 0 < c
⊢ a * c < b * c
[PROOFSTEP]
simpa only [sub_mul, sub_pos] using StrictOrderedRing.mul_pos _ _ (sub_pos.2 h) hc
[GOAL]
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedRing α
a✝ b✝ c : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : StrictOrderedRing α := inst✝¹
src✝ : Semiring α := Ring.toSemiring
a b : α
ha : 0 ≤ a
hb : 0 ≤ b
⊢ 0 ≤ a * b
[PROOFSTEP]
obtain ha | ha := Decidable.eq_or_lt_of_le ha
[GOAL]
case inl
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedRing α
a✝ b✝ c : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : StrictOrderedRing α := inst✝¹
src✝ : Semiring α := Ring.toSemiring
a b : α
ha✝ : 0 ≤ a
hb : 0 ≤ b
ha : 0 = a
⊢ 0 ≤ a * b
[PROOFSTEP]
rw [← ha, zero_mul]
[GOAL]
case inr
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedRing α
a✝ b✝ c : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : StrictOrderedRing α := inst✝¹
src✝ : Semiring α := Ring.toSemiring
a b : α
ha✝ : 0 ≤ a
hb : 0 ≤ b
ha : 0 < a
⊢ 0 ≤ a * b
[PROOFSTEP]
obtain hb | hb := Decidable.eq_or_lt_of_le hb
[GOAL]
case inr.inl
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedRing α
a✝ b✝ c : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : StrictOrderedRing α := inst✝¹
src✝ : Semiring α := Ring.toSemiring
a b : α
ha✝ : 0 ≤ a
hb✝ : 0 ≤ b
ha : 0 < a
hb : 0 = b
⊢ 0 ≤ a * b
[PROOFSTEP]
rw [← hb, mul_zero]
[GOAL]
case inr.inr
α : Type u
β : Type u_1
inst✝¹ : StrictOrderedRing α
a✝ b✝ c : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝¹ : StrictOrderedRing α := inst✝¹
src✝ : Semiring α := Ring.toSemiring
a b : α
ha✝ : 0 ≤ a
hb✝ : 0 ≤ b
ha : 0 < a
hb : 0 < b
⊢ 0 ≤ a * b
[PROOFSTEP]
exact (StrictOrderedRing.mul_pos _ _ ha hb).le
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a b c : α
h : b < a
hc : c < 0
⊢ c * a < c * b
[PROOFSTEP]
simpa only [neg_mul, neg_lt_neg_iff] using mul_lt_mul_of_pos_left h (neg_pos_of_neg hc)
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a b c : α
h : b < a
hc : c < 0
⊢ a * c < b * c
[PROOFSTEP]
simpa only [mul_neg, neg_lt_neg_iff] using mul_lt_mul_of_pos_right h (neg_pos_of_neg hc)
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a✝ b✝ c a b : α
ha : a < 0
hb : b < 0
⊢ 0 < a * b
[PROOFSTEP]
simpa only [zero_mul] using mul_lt_mul_of_neg_right ha hb
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a b c : α
hb : b < 0
h : a < 1
⊢ b < a * b
[PROOFSTEP]
simpa only [one_mul] using mul_lt_mul_of_neg_right h hb
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a b c : α
hb : b < 0
h : 1 < a
⊢ a * b < b
[PROOFSTEP]
simpa only [one_mul] using mul_lt_mul_of_neg_right h hb
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a b c : α
ha : a < 0
h : b < 1
⊢ a < a * b
[PROOFSTEP]
simpa only [mul_one] using mul_lt_mul_of_neg_left h ha
[GOAL]
α : Type u
β : Type u_1
inst✝ : StrictOrderedRing α
a b c : α
ha : a < 0
h : 1 < b
⊢ a * b < a
[PROOFSTEP]
simpa only [mul_one] using mul_lt_mul_of_neg_left h ha
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
hab : 0 ≤ a * b
⊢ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0
[PROOFSTEP]
refine' Decidable.or_iff_not_and_not.2 _
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
hab : 0 ≤ a * b
⊢ ¬(¬(0 ≤ a ∧ 0 ≤ b) ∧ ¬(a ≤ 0 ∧ b ≤ 0))
[PROOFSTEP]
simp only [not_and, not_le]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
hab : 0 ≤ a * b
⊢ (0 ≤ a → b < 0) → ¬(a ≤ 0 → 0 < b)
[PROOFSTEP]
intro ab nab
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
hab : 0 ≤ a * b
ab : 0 ≤ a → b < 0
nab : a ≤ 0 → 0 < b
⊢ False
[PROOFSTEP]
apply
  not_lt_of_le hab
    _
      -- Porting note: for the middle case, we used to have `rfl`, but it is now rejected.
        -- https://github.com/leanprover/std4/issues/62
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
hab : 0 ≤ a * b
ab : 0 ≤ a → b < 0
nab : a ≤ 0 → 0 < b
⊢ a * b < 0
[PROOFSTEP]
rcases lt_trichotomy 0 a with (ha | ha | ha)
[GOAL]
case inl
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
hab : 0 ≤ a * b
ab : 0 ≤ a → b < 0
nab : a ≤ 0 → 0 < b
ha : 0 < a
⊢ a * b < 0
[PROOFSTEP]
exact mul_neg_of_pos_of_neg ha (ab ha.le)
[GOAL]
case inr.inl
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
hab : 0 ≤ a * b
ab : 0 ≤ a → b < 0
nab : a ≤ 0 → 0 < b
ha : 0 = a
⊢ a * b < 0
[PROOFSTEP]
subst ha
[GOAL]
case inr.inl
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
b c d : α
hab : 0 ≤ 0 * b
ab : 0 ≤ 0 → b < 0
nab : 0 ≤ 0 → 0 < b
⊢ 0 * b < 0
[PROOFSTEP]
exact ((ab le_rfl).asymm (nab le_rfl)).elim
[GOAL]
case inr.inr
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
hab : 0 ≤ a * b
ab : 0 ≤ a → b < 0
nab : a ≤ 0 → 0 < b
ha : a < 0
⊢ a * b < 0
[PROOFSTEP]
exact mul_neg_of_neg_of_pos ha (nab ha.le)
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
h : 0 < c
⊢ 0 ≤ c * b ↔ 0 ≤ b
[PROOFSTEP]
simpa using (mul_le_mul_left h : c * 0 ≤ c * b ↔ 0 ≤ b)
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
h : 0 < c
⊢ 0 ≤ b * c ↔ 0 ≤ b
[PROOFSTEP]
simpa using (mul_le_mul_right h : 0 * c ≤ b * c ↔ 0 ≤ b)
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
⊢ bit0 a ≤ bit0 b ↔ a ≤ b
[PROOFSTEP]
rw [bit0, bit0, ← two_mul, ← two_mul, mul_le_mul_left (zero_lt_two : 0 < (2 : α))]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
⊢ bit0 a < bit0 b ↔ a < b
[PROOFSTEP]
rw [bit0, bit0, ← two_mul, ← two_mul, mul_lt_mul_left (zero_lt_two : 0 < (2 : α))]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
⊢ 1 ≤ bit1 a ↔ 0 ≤ a
[PROOFSTEP]
rw [bit1, le_add_iff_nonneg_left, bit0, ← two_mul, zero_le_mul_left (zero_lt_two : 0 < (2 : α))]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
⊢ 1 < bit1 a ↔ 0 < a
[PROOFSTEP]
rw [bit1, lt_add_iff_pos_left, bit0, ← two_mul, zero_lt_mul_left (zero_lt_two : 0 < (2 : α))]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
⊢ 0 ≤ bit0 a ↔ 0 ≤ a
[PROOFSTEP]
rw [bit0, ← two_mul, zero_le_mul_left (zero_lt_two : 0 < (2 : α))]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedSemiring α
a b c d : α
⊢ 0 < bit0 a ↔ 0 < a
[PROOFSTEP]
rw [bit0, ← two_mul, zero_lt_mul_left (zero_lt_two : 0 < (2 : α))]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
src✝ : LinearOrderedRing α := inst✝
⊢ ∀ {a b : α}, a * b = 0 → a = 0 ∨ b = 0
[PROOFSTEP]
intro a b hab
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
hab : a * b = 0
⊢ a = 0 ∨ b = 0
[PROOFSTEP]
refine' Decidable.or_iff_not_and_not.2 fun h => _
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
hab : a * b = 0
h : ¬a = 0 ∧ ¬b = 0
⊢ False
[PROOFSTEP]
revert hab
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
h : ¬a = 0 ∧ ¬b = 0
⊢ a * b = 0 → False
[PROOFSTEP]
cases' lt_or_gt_of_ne h.1 with ha ha
[GOAL]
case inl
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
h : ¬a = 0 ∧ ¬b = 0
ha : a < 0
⊢ a * b = 0 → False
[PROOFSTEP]
cases' lt_or_gt_of_ne h.2 with hb hb
[GOAL]
case inr
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
h : ¬a = 0 ∧ ¬b = 0
ha : a > 0
⊢ a * b = 0 → False
[PROOFSTEP]
cases' lt_or_gt_of_ne h.2 with hb hb
[GOAL]
case inl.inl
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
h : ¬a = 0 ∧ ¬b = 0
ha : a < 0
hb : b < 0
⊢ a * b = 0 → False
case inl.inr
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
h : ¬a = 0 ∧ ¬b = 0
ha : a < 0
hb : b > 0
⊢ a * b = 0 → False
case inr.inl
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
h : ¬a = 0 ∧ ¬b = 0
ha : a > 0
hb : b < 0
⊢ a * b = 0 → False
case inr.inr
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c : α
src✝ : LinearOrderedRing α := inst✝
a b : α
h : ¬a = 0 ∧ ¬b = 0
ha : a > 0
hb : b > 0
⊢ a * b = 0 → False
[PROOFSTEP]
exacts [(mul_pos_of_neg_of_neg ha hb).ne.symm, (mul_neg_of_neg_of_pos ha hb).ne, (mul_neg_of_pos_of_neg ha hb).ne,
  (mul_pos ha hb).ne.symm]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ : α
src✝ : Nontrivial α := inferInstance
a b c : α
ha : a ≠ 0
h : a * b = a * c
⊢ b = c
[PROOFSTEP]
rw [← sub_eq_zero, ← mul_sub] at h
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ : α
src✝ : Nontrivial α := inferInstance
a b c : α
ha : a ≠ 0
h✝ : a * b = a * c
h : a * (b - c) = 0
⊢ b = c
[PROOFSTEP]
exact sub_eq_zero.1 ((eq_zero_or_eq_zero_of_mul_eq_zero h).resolve_left ha)
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ : α
src✝ : Nontrivial α := inferInstance
a b c : α
hb : b ≠ 0
h : a * b = c * b
⊢ a = c
[PROOFSTEP]
rw [← sub_eq_zero, ← sub_mul] at h
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ : α
src✝ : Nontrivial α := inferInstance
a b c : α
hb : b ≠ 0
h✝ : a * b = c * b
h : (a - c) * b = 0
⊢ a = c
[PROOFSTEP]
exact sub_eq_zero.1 ((eq_zero_or_eq_zero_of_mul_eq_zero h).resolve_right hb)
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ a * b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b
[PROOFSTEP]
rw [← neg_pos, neg_mul_eq_mul_neg, mul_pos_iff, neg_pos, neg_lt_zero]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ a b c : α
⊢ 0 ≤ a * b ∨ 0 ≤ b * c ∨ 0 ≤ c * a
[PROOFSTEP]
iterate 3 rw [mul_nonneg_iff]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ a b c : α
⊢ 0 ≤ a * b ∨ 0 ≤ b * c ∨ 0 ≤ c * a
[PROOFSTEP]
rw [mul_nonneg_iff]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ a b c : α
⊢ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0) ∨ 0 ≤ b * c ∨ 0 ≤ c * a
[PROOFSTEP]
rw [mul_nonneg_iff]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ a b c : α
⊢ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0) ∨ (0 ≤ b ∧ 0 ≤ c ∨ b ≤ 0 ∧ c ≤ 0) ∨ 0 ≤ c * a
[PROOFSTEP]
rw [mul_nonneg_iff]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ a b c : α
⊢ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0) ∨ (0 ≤ b ∧ 0 ≤ c ∨ b ≤ 0 ∧ c ≤ 0) ∨ 0 ≤ c ∧ 0 ≤ a ∨ c ≤ 0 ∧ a ≤ 0
[PROOFSTEP]
have or_a := le_total 0 a
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ a b c : α
or_a : 0 ≤ a ∨ a ≤ 0
⊢ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0) ∨ (0 ≤ b ∧ 0 ≤ c ∨ b ≤ 0 ∧ c ≤ 0) ∨ 0 ≤ c ∧ 0 ≤ a ∨ c ≤ 0 ∧ a ≤ 0
[PROOFSTEP]
have or_b := le_total 0 b
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ a b c : α
or_a : 0 ≤ a ∨ a ≤ 0
or_b : 0 ≤ b ∨ b ≤ 0
⊢ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0) ∨ (0 ≤ b ∧ 0 ≤ c ∨ b ≤ 0 ∧ c ≤ 0) ∨ 0 ≤ c ∧ 0 ≤ a ∨ c ≤ 0 ∧ a ≤ 0
[PROOFSTEP]
have or_c := le_total 0 c
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c✝ a b c : α
or_a : 0 ≤ a ∨ a ≤ 0
or_b : 0 ≤ b ∨ b ≤ 0
or_c : 0 ≤ c ∨ c ≤ 0
⊢ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0) ∨ (0 ≤ b ∧ 0 ≤ c ∨ b ≤ 0 ∧ c ≤ 0) ∨ 0 ≤ c ∧ 0 ≤ a ∨ c ≤ 0 ∧ a ≤ 0
[PROOFSTEP]
exact
  Or.elim or_c
    (fun (h0 : 0 ≤ c) =>
      Or.elim or_b
        (fun (h1 : 0 ≤ b) =>
          Or.elim or_a (fun (h2 : 0 ≤ a) => Or.inl (Or.inl ⟨h2, h1⟩))
            (fun (_ : a ≤ 0) => Or.inr (Or.inl (Or.inl ⟨h1, h0⟩))))
        (fun (h1 : b ≤ 0) =>
          Or.elim or_a (fun (h3 : 0 ≤ a) => Or.inr (Or.inr (Or.inl ⟨h0, h3⟩)))
            (fun (h3 : a ≤ 0) => Or.inl (Or.inr ⟨h3, h1⟩))))
    (fun (h0 : c ≤ 0) =>
      Or.elim or_b
        (fun (h4 : 0 ≤ b) =>
          Or.elim or_a (fun (h5 : 0 ≤ a) => Or.inl (Or.inl ⟨h5, h4⟩))
            (fun (h5 : a ≤ 0) => Or.inr (Or.inr (Or.inr ⟨h0, h5⟩))))
        (fun (h4 : b ≤ 0) =>
          Or.elim or_a (fun (_ : 0 ≤ a) => Or.inr (Or.inl (Or.inr ⟨h4, h0⟩)))
            (fun (h6 : a ≤ 0) => Or.inl (Or.inr ⟨h6, h4⟩))))
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ a * b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b
[PROOFSTEP]
rw [← neg_nonneg, neg_mul_eq_mul_neg, mul_nonneg_iff, neg_nonneg, neg_nonpos]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ -a ≤ a ↔ 0 ≤ a
[PROOFSTEP]
simp [neg_le_iff_add_nonneg, ← two_mul, mul_nonneg_iff, zero_le_one, (zero_lt_two' α).not_le]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ -a < a ↔ 0 < a
[PROOFSTEP]
simp [neg_lt_iff_pos_add, ← two_mul, mul_pos_iff, zero_lt_one, (zero_lt_two' α).not_lt]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ a ≤ -a ↔ - -a ≤ -a
[PROOFSTEP]
rw [neg_neg]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ a < -a ↔ - -a < -a
[PROOFSTEP]
rw [neg_neg]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
h : c * a < c * b
hc : c ≤ 0
⊢ -c * b < -c * a
[PROOFSTEP]
rwa [neg_mul, neg_mul, neg_lt_neg_iff]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
h : a * c < b * c
hc : c ≤ 0
⊢ b * -c < a * -c
[PROOFSTEP]
rwa [mul_neg, mul_neg, neg_lt_neg_iff]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ 0 < a * a ↔ a ≠ 0
[PROOFSTEP]
constructor
[GOAL]
case mp
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ 0 < a * a → a ≠ 0
[PROOFSTEP]
rintro h rfl
[GOAL]
case mp
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
h : 0 < 0 * 0
⊢ False
[PROOFSTEP]
rw [mul_zero] at h
[GOAL]
case mp
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
h : 0 < 0
⊢ False
[PROOFSTEP]
exact h.false
[GOAL]
case mpr
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ a ≠ 0 → 0 < a * a
[PROOFSTEP]
intro h
[GOAL]
case mpr
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
h : a ≠ 0
⊢ 0 < a * a
[PROOFSTEP]
cases' h.lt_or_lt with h h
[GOAL]
case mpr.inl
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
h✝ : a ≠ 0
h : a < 0
⊢ 0 < a * a
case mpr.inr α : Type u β : Type u_1 inst✝ : LinearOrderedRing α a✝ b c a : α h✝ : a ≠ 0 h : 0 < a ⊢ 0 < a * a
[PROOFSTEP]
exacts [mul_pos_of_neg_of_neg h h, mul_pos h h]
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c x y : α
⊢ x * x + y * y = 0 ↔ x = 0 ∧ y = 0
[PROOFSTEP]
rw [add_eq_zero_iff', mul_self_eq_zero, mul_self_eq_zero]
[GOAL]
case ha
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c x y : α
⊢ 0 ≤ x * x
[PROOFSTEP]
apply mul_self_nonneg
[GOAL]
case hb
α : Type u
β : Type u_1
inst✝ : LinearOrderedRing α
a b c x y : α
⊢ 0 ≤ y * y
[PROOFSTEP]
apply mul_self_nonneg
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedCommRing α
a b✝ c✝ d b c : α
ha : 0 ≤ a
hd : 0 ≤ d
ba : b * a ≤ max d b * max c a
cd : c * d ≤ max a c * max b d
⊢ a * b ≤ max a c * max d b
[PROOFSTEP]
simpa [mul_comm, max_comm] using ba
[GOAL]
α : Type u
β : Type u_1
inst✝ : LinearOrderedCommRing α
a b✝ c✝ d b c : α
ha : 0 ≤ a
hd : 0 ≤ d
ba : b * a ≤ max d b * max c a
cd : c * d ≤ max a c * max b d
⊢ d * c ≤ max a c * max d b
[PROOFSTEP]
simpa [mul_comm, max_comm] using cd