Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 1cf59fc

Browse files
committed
chore(src/algebra/ordered_ring.lean): fix linting errors (#2827)
[Mentioned, but not really discussed, in this Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/How.20to.20get.20familiar.20enough.20with.20Mathlib.20to.20use.20it/near/198747067). This PR also removes `mul_pos'` and `mul_nonneg'` lemmas because they are now identical to the improved `mul_pos` and `mul_nonneg`.
1 parent 7d86475 commit 1cf59fc

File tree

9 files changed

+71
-57
lines changed

9 files changed

+71
-57
lines changed

src/algebra/ordered_ring.lean

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ set_option old_structure_cmd true
1212
universe u
1313
variable {α : Type u}
1414

15+
/-- An `ordered_semiring α` is a semiring `α` with a partial order such that
16+
multiplication with a positive number and addition are monotone. -/
1517
class ordered_semiring (α : Type u) extends semiring α, ordered_cancel_add_comm_monoid α :=
1618
(mul_lt_mul_of_pos_left : ∀ a b c : α, a < b → 0 < c → c * a < c * b)
1719
(mul_lt_mul_of_pos_right : ∀ a b c : α, a < b → 0 < c → a * c < b * c)
@@ -53,15 +55,10 @@ calc
5355
a * b ≤ c * b : mul_le_mul_of_nonneg_right hac nn_b
5456
... ≤ c * d : mul_le_mul_of_nonneg_left hbd nn_c
5557

56-
lemma mul_nonneg (ha : a ≥ 0) (hb : b ≥ 0) : a * b0 :=
58+
lemma mul_nonneg (ha : 0 ≤ a) (hb : 0 ≤ b) : 0a * b :=
5759
have h : 0 * b ≤ a * b, from mul_le_mul_of_nonneg_right ha hb,
5860
by rwa [zero_mul] at h
5961

60-
-- `mul_nonneg` and `mul_pos` in core are stated in terms of `≥` and `>`, so we restate them here
61-
-- for use in syntactic tactics (e.g. `simp` and `rw`).
62-
lemma mul_nonneg' : 0 ≤ a → 0 ≤ b → 0 ≤ a * b :=
63-
mul_nonneg
64-
6562
lemma mul_nonpos_of_nonneg_of_nonpos (ha : a ≥ 0) (hb : b ≤ 0) : a * b ≤ 0 :=
6663
have h : a * b ≤ a * 0, from mul_le_mul_of_nonneg_left hb ha,
6764
by rwa mul_zero at h
@@ -80,13 +77,10 @@ calc
8077
a * b ≤ c * b : mul_le_mul_of_nonneg_right h1 h3
8178
... < c * d : mul_lt_mul_of_pos_left h2 h4
8279

83-
lemma mul_pos (ha : a > 0) (hb : b > 0) : a * b > 0 :=
80+
lemma mul_pos (ha : 0 < a) (hb : 0 < b) : 0 < a * b :=
8481
have h : 0 * b < a * b, from mul_lt_mul_of_pos_right ha hb,
8582
by rwa zero_mul at h
8683

87-
lemma mul_pos' (ha : 0 < a) (hb : 0 < b) : 0 < a * b :=
88-
mul_pos ha hb
89-
9084
lemma mul_neg_of_pos_of_neg (ha : a > 0) (hb : b < 0) : a * b < 0 :=
9185
have h : a * b < a * 0, from mul_lt_mul_of_pos_left hb ha,
9286
by rwa mul_zero at h
@@ -103,6 +97,8 @@ mul_lt_mul' (le_of_lt h2) h2 h1 (lt_of_le_of_lt h1 h2)
10397

10498
end ordered_semiring
10599

100+
/-- A `linear_ordered_semiring α` is a semiring `α` with a linear order
101+
such that multiplication with a positive number and addition are monotone. -/
106102
class linear_ordered_semiring (α : Type u) extends ordered_semiring α, linear_order α :=
107103
(zero_lt_one : zero < one)
108104

@@ -120,14 +116,14 @@ lemma two_pos : 0 < (2:α) := add_pos zero_lt_one zero_lt_one
120116
@[field_simps] lemma two_ne_zero : (2:α) ≠ 0 :=
121117
ne.symm (ne_of_lt two_pos)
122118

123-
lemma two_gt_one : (2:α) > 1 :=
119+
lemma two_gt_one : 1 < (2:α) :=
124120
calc (2:α) = 1+1 : one_add_one_eq_two
125121
... > 1+0 : add_lt_add_left zero_lt_one _
126122
... = 1 : add_zero 1
127123

128-
lemma two_ge_one : (2:α)1 := le_of_lt two_gt_one
124+
lemma two_ge_one : 1(2:α) := le_of_lt two_gt_one
129125

130-
lemma four_pos : (4:α) > 0 := add_pos two_pos two_pos
126+
lemma four_pos : 0 < (4:α) := add_pos two_pos two_pos
131127

132128
lemma lt_of_mul_lt_mul_left (h : c * a < c * b) (hc : c ≥ 0) : a < b :=
133129
lt_of_not_ge
@@ -415,7 +411,10 @@ lemma strict_mono.mul (hf : strict_mono f) (hg : strict_mono g) (hf0 : ∀ x, 0
415411

416412
end mono
417413

418-
class decidable_linear_ordered_semiring (α : Type u) extends linear_ordered_semiring α, decidable_linear_order α
414+
/-- A `decidable_linear_ordered_semiring α` is a semiring `α` with a decidable linear order
415+
such that multiplication with a positive number and addition are monotone. -/
416+
class decidable_linear_ordered_semiring (α : Type u)
417+
extends linear_ordered_semiring α, decidable_linear_order α
419418

420419
section decidable_linear_ordered_semiring
421420
variables [decidable_linear_ordered_semiring α] {a b c : α}
@@ -428,6 +427,8 @@ decidable.le_iff_le_iff_lt_iff_lt.2 $ mul_lt_mul_right h
428427

429428
end decidable_linear_ordered_semiring
430429

430+
/-- An `ordered_ring α` is a ring `α` with a partial order such that
431+
multiplication with a positive number and addition are monotone. -/
431432
class ordered_ring (α : Type u) extends ring α, ordered_add_comm_group α, zero_ne_one_class α :=
432433
(mul_pos : ∀ a b : α, 0 < a → 0 < b → 0 < a * b)
433434

@@ -517,6 +518,8 @@ by rwa zero_mul at this
517518

518519
end ordered_ring
519520

521+
/-- A `linear_ordered_ring α` is a ring `α` with a linear order such that
522+
multiplication with a positive number and addition are monotone. -/
520523
class linear_ordered_ring (α : Type u) extends ordered_ring α, linear_order α :=
521524
(zero_lt_one : zero < one)
522525

@@ -534,13 +537,13 @@ instance linear_ordered_ring.to_linear_ordered_semiring : linear_ordered_semirin
534537
le_total := linear_ordered_ring.le_total,
535538
..‹linear_ordered_ring α› }
536539

537-
lemma mul_self_nonneg (a : α) : a * a 0 :=
540+
lemma mul_self_nonneg (a : α) : 0 a * a :=
538541
or.elim (le_total 0 a)
539542
(assume h : a ≥ 0, mul_nonneg h h)
540543
(assume h : a ≤ 0, mul_nonneg_of_nonpos_of_nonpos h h)
541544

542-
lemma pos_and_pos_or_neg_and_neg_of_mul_pos (hab : a * b > 0) :
543-
(a > 0b > 0) ∨ (a < 0 ∧ b < 0) :=
545+
lemma pos_and_pos_or_neg_and_neg_of_mul_pos (hab : 0 < a * b) :
546+
(0 < a0 < b) ∨ (a < 0 ∧ b < 0) :=
544547
match lt_trichotomy 0 a with
545548
| or.inl hlt₁ :=
546549
match lt_trichotomy 0 b with
@@ -557,8 +560,8 @@ match lt_trichotomy 0 a with
557560
end
558561
end
559562

560-
lemma gt_of_mul_lt_mul_neg_left (h : c * a < c * b) (hc : c ≤ 0) : a > b :=
561-
have nhc : -c ≥ 0, from neg_nonneg_of_nonpos hc,
563+
lemma gt_of_mul_lt_mul_neg_left (h : c * a < c * b) (hc : c ≤ 0) : b < a :=
564+
have nhc : 0 ≤ -c, from neg_nonneg_of_nonpos hc,
562565
have h2 : -(c * b) < -(c * a), from neg_lt_neg h,
563566
have h3 : (-c) * b < (-c) * a, from calc
564567
(-c) * b = - (c * b) : by rewrite neg_mul_eq_neg_mul
@@ -676,12 +679,17 @@ end
676679

677680
end linear_ordered_ring
678681

682+
/-- A `linear_ordered_comm_ring α` is a commutative ring `α` with a linear order
683+
such that multiplication with a positive number and addition are monotone. -/
679684
class linear_ordered_comm_ring (α : Type u) extends linear_ordered_ring α, comm_monoid α
680685

681686
instance linear_ordered_comm_ring.to_integral_domain [s: linear_ordered_comm_ring α] : integral_domain α :=
682687
{ eq_zero_or_eq_zero_of_mul_eq_zero := @linear_ordered_ring.eq_zero_or_eq_zero_of_mul_eq_zero α _,
683688
..s }
684689

690+
/-- A `decidable_linear_ordered_comm_ring α` is a commutative ring `α` with a
691+
decidable linear order such that multiplication with a positive number and
692+
addition are monotone. -/
685693
class decidable_linear_ordered_comm_ring (α : Type u) extends linear_ordered_comm_ring α,
686694
decidable_linear_ordered_add_comm_group α
687695

@@ -827,6 +835,8 @@ instance to_ordered_ring : ordered_ring α :=
827835
mul_pos := λ a b, by simp [pos_def.symm]; exact mul_pos,
828836
..‹nonneg_ring α› }
829837

838+
/-- `to_linear_nonneg_ring` shows that a `nonneg_ring` with a total order is a `domain`,
839+
hence a `linear_nonneg_ring`. -/
830840
def to_linear_nonneg_ring
831841
(nonneg_total : ∀ a : α, nonneg a ∨ nonneg (-a))
832842
: linear_nonneg_ring α :=
@@ -907,6 +917,9 @@ def to_decidable_linear_ordered_comm_ring
907917

908918
end linear_nonneg_ring
909919

920+
/-- A canonically ordered commutative semiring is an ordered, commutative semiring
921+
in which `a ≤ b` iff there exists `c` with `b = a + c`. This is satisfied by the
922+
natural numbers, for example, but not the integers or other ordered groups. -/
910923
class canonically_ordered_comm_semiring (α : Type*) extends
911924
canonically_ordered_add_monoid α, comm_semiring α, zero_ne_one_class α :=
912925
(mul_eq_zero_iff (a b : α) : a * b = 0 ↔ a = 0 ∨ b = 0)
@@ -935,31 +948,33 @@ by simp only [zero_lt_iff_ne_zero, ne.def, canonically_ordered_comm_semiring.mul
935948
end canonically_ordered_semiring
936949

937950
namespace with_top
938-
variables [canonically_ordered_comm_semiring α] [decidable_eq α]
939-
940-
instance : mul_zero_class (with_top α) :=
941-
{ zero := 0,
942-
mul := λm n, if m = 0 ∨ n = 0 then 0 else m.bind (λa, n.bind $ λb, ↑(a * b)),
943-
zero_mul := assume a, if_pos $ or.inl rfl,
944-
mul_zero := assume a, if_pos $ or.inr rfl }
951+
variables [canonically_ordered_comm_semiring α]
945952

946953
instance : has_one (with_top α) := ⟨↑(1:α)⟩
947954

948-
lemma mul_def {a b : with_top α} :
949-
a * b = if a = 0 ∨ b = 0 then 0 else a.bind (λa, b.bind $ λb, ↑(a * b)) := rfl
950-
951-
@[simp] theorem top_ne_zero [partial_order α] : ⊤ ≠ (0 : with_top α) .
952-
@[simp] theorem zero_ne_top [partial_order α] : (0 : with_top α) ≠ ⊤ .
955+
@[simp] theorem top_ne_zero : ⊤ ≠ (0 : with_top α) .
956+
@[simp] theorem zero_ne_top : (0 : with_top α) ≠ ⊤ .
953957

954-
@[simp] theorem coe_eq_zero [partial_order α] {a : α} : (a : with_top α) = 0 ↔ a = 0 :=
958+
@[simp] theorem coe_eq_zero {a : α} : (a : with_top α) = 0 ↔ a = 0 :=
955959
iff.intro
956960
(assume h, match a, h with _, rfl := rfl end)
957961
(assume h, h.symm ▸ rfl)
958962

959-
@[simp] theorem zero_eq_coe [partial_order α] {a : α} : 0 = (a : with_top α) ↔ a = 0 :=
963+
@[simp] theorem zero_eq_coe {a : α} : 0 = (a : with_top α) ↔ a = 0 :=
960964
by rw [eq_comm, coe_eq_zero]
961965

962-
@[simp] theorem coe_zero [partial_order α] : ↑(0 : α) = (0 : with_top α) := rfl
966+
@[simp] theorem coe_zero : ↑(0 : α) = (0 : with_top α) := rfl
967+
968+
variable [decidable_eq α]
969+
970+
instance : mul_zero_class (with_top α) :=
971+
{ zero := 0,
972+
mul := λm n, if m = 0 ∨ n = 0 then 0 else m.bind (λa, n.bind $ λb, ↑(a * b)),
973+
zero_mul := assume a, if_pos $ or.inl rfl,
974+
mul_zero := assume a, if_pos $ or.inr rfl }
975+
976+
lemma mul_def {a b : with_top α} :
977+
a * b = if a = 0 ∨ b = 0 then 0 else a.bind (λa, b.bind $ λb, ↑(a * b)) := rfl
963978

964979
@[simp] lemma mul_top {a : with_top α} (h : a ≠ 0) : a * ⊤ = ⊤ :=
965980
by cases a; simp [mul_def, h]; refl
@@ -1029,8 +1044,7 @@ private lemma one_mul' : ∀a : with_top α, 1 * a = a
10291044
| none := show ((1:α) : with_top α) * ⊤ = ⊤, by simp [-with_bot.coe_one]
10301045
| (some a) := show ((1:α) : with_top α) * a = a, by simp [coe_mul.symm, -with_bot.coe_one]
10311046

1032-
instance [canonically_ordered_comm_semiring α] [decidable_eq α] :
1033-
canonically_ordered_comm_semiring (with_top α) :=
1047+
instance : canonically_ordered_comm_semiring (with_top α) :=
10341048
{ one := (1 : α),
10351049
right_distrib := distrib',
10361050
left_distrib := assume a b c, by rw [comm, distrib', comm b, comm c]; refl,

src/analysis/analytic/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ begin
620620
have A_nonneg : ∀ i, 0 ≤ A i,
621621
{ rintros ⟨k, n, s, hs⟩,
622622
change 0 ≤ ∥(p n).restr s hs x∥ * (r : ℝ) ^ k,
623-
refine mul_nonneg' (norm_nonneg _) (pow_nonneg (nnreal.coe_nonneg _) _) },
623+
refine mul_nonneg (norm_nonneg _) (pow_nonneg (nnreal.coe_nonneg _) _) },
624624
have tsum_nonneg : 0 ≤ tsum A := tsum_nonneg A_nonneg,
625625
apply le_radius_of_bound _ (nnreal.of_real (tsum A)) (λ k, _),
626626
rw [← nnreal.coe_le_coe, nnreal.coe_mul, nnreal.coe_pow, coe_nnnorm,

src/analysis/analytic/composition.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ begin
362362
let r0 : nnreal := (4 * max Cp 1)⁻¹,
363363
set r := min rp 1 * min rq 1 * r0,
364364
have r_pos : 0 < r,
365-
{ apply mul_pos' (mul_pos' _ _),
365+
{ apply mul_pos (mul_pos _ _),
366366
{ rw [nnreal.inv_pos],
367-
apply mul_pos',
367+
apply mul_pos,
368368
{ norm_num },
369369
{ exact lt_of_lt_of_le zero_lt_one (le_max_right _ _) } },
370370
{ rw ennreal.coe_pos at rp_pos, simp [rp_pos, zero_lt_one] },

src/analysis/normed_space/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ begin
564564
refine (nhds_basis_closed_ball.tendsto_iff nhds_basis_closed_ball).2 (λε εpos, _),
565565
let δ := min (ε/2 * ∥r∥^2) (∥r∥/2),
566566
have norm_r_pos : 0 < ∥r∥ := norm_pos_iff.mpr r0,
567-
have A : 0 < ε / 2 * ∥r∥ ^ 2 := mul_pos' (half_pos εpos) (pow_pos norm_r_pos 2),
567+
have A : 0 < ε / 2 * ∥r∥ ^ 2 := mul_pos (half_pos εpos) (pow_pos norm_r_pos 2),
568568
have δpos : 0 < δ, by simp [half_pos norm_r_pos, A],
569569
refine ⟨δ, δpos, λ x hx, _⟩,
570570
have rx : ∥r∥/2 ≤ ∥x∥ := calc

src/analysis/normed_space/bounded_linear_maps.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ begin
187187
refine is_linear_map.with_bound ⟨λ f₁ f₂, by { ext m, refl }, λ c f, by { ext m, refl }⟩
188188
(∥g∥ ^ (fintype.card ι)) (λ f, _),
189189
apply continuous_multilinear_map.op_norm_le_bound _ _ (λ m, _),
190-
{ apply_rules [mul_nonneg', pow_nonneg, norm_nonneg, norm_nonneg] },
190+
{ apply_rules [mul_nonneg, pow_nonneg, norm_nonneg, norm_nonneg] },
191191
calc ∥f (g ∘ m)∥ ≤
192192
∥f∥ * finset.univ.prod (λ (i : ι), ∥g (m i)∥) : f.le_op_norm _
193193
... ≤ ∥f∥ * finset.univ.prod (λ (i : ι), ∥g∥ * ∥m i∥) : begin
@@ -248,11 +248,11 @@ lemma is_bounded_bilinear_map.is_bounded_linear_map_left (h : is_bounded_bilinea
248248
smul := λ c x, h.smul_left _ _ _,
249249
bound := begin
250250
rcases h.bound with ⟨C, C_pos, hC⟩,
251-
refine ⟨C * (∥y∥ + 1), mul_pos' C_pos (lt_of_lt_of_le (zero_lt_one) (by simp)), λ x, _⟩,
251+
refine ⟨C * (∥y∥ + 1), mul_pos C_pos (lt_of_lt_of_le (zero_lt_one) (by simp)), λ x, _⟩,
252252
have : ∥y∥ ≤ ∥y∥ + 1, by simp [zero_le_one],
253253
calc ∥f (x, y)∥ ≤ C * ∥x∥ * ∥y∥ : hC x y
254254
... ≤ C * ∥x∥ * (∥y∥ + 1) :
255-
by apply_rules [norm_nonneg, mul_le_mul_of_nonneg_left, le_of_lt C_pos, mul_nonneg']
255+
by apply_rules [norm_nonneg, mul_le_mul_of_nonneg_left, le_of_lt C_pos, mul_nonneg]
256256
... = C * (∥y∥ + 1) * ∥x∥ : by ring
257257
end }
258258

@@ -262,7 +262,7 @@ lemma is_bounded_bilinear_map.is_bounded_linear_map_right (h : is_bounded_biline
262262
smul := λ c y, h.smul_right _ _ _,
263263
bound := begin
264264
rcases h.bound with ⟨C, C_pos, hC⟩,
265-
refine ⟨C * (∥x∥ + 1), mul_pos' C_pos (lt_of_lt_of_le (zero_lt_one) (by simp)), λ y, _⟩,
265+
refine ⟨C * (∥x∥ + 1), mul_pos C_pos (lt_of_lt_of_le (zero_lt_one) (by simp)), λ y, _⟩,
266266
have : ∥x∥ ≤ ∥x∥ + 1, by simp [zero_le_one],
267267
calc ∥f (x, y)∥ ≤ C * ∥x∥ * ∥y∥ : hC x y
268268
... ≤ C * (∥x∥ + 1) * ∥y∥ :

src/analysis/normed_space/multilinear.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ begin
110110
by_cases h : ∃i, m i = 0,
111111
{ rcases h with ⟨i, hi⟩,
112112
rw [f.map_coord_zero i hi, _root_.norm_zero],
113-
exact mul_nonneg' (le_of_lt C_pos) (prod_nonneg (λi hi, norm_nonneg _)) },
113+
exact mul_nonneg (le_of_lt C_pos) (prod_nonneg (λi hi, norm_nonneg _)) },
114114
{ push_neg at h,
115115
have : ∀i, ∃d:𝕜, d ≠ 0 ∧ ∥d • m i∥ ≤ δ ∧ (δ/∥c∥ ≤ ∥d • m i∥) ∧ (∥d∥⁻¹ ≤ δ⁻¹ * ∥c∥ * ∥m i∥) :=
116116
λi, rescale_to_shell hc δ_pos (h i),
@@ -233,7 +233,7 @@ begin
233233
≤ D * (fintype.card ι) * (max ∥m'∥ ∥m∥) ^ (fintype.card ι - 1) * ∥m' - m∥ :
234234
f.norm_image_sub_le_of_bound D_pos H m' m
235235
... ≤ D * (fintype.card ι) * (∥m∥ + 1) ^ (fintype.card ι - 1) * ∥m' - m∥ :
236-
by apply_rules [mul_le_mul_of_nonneg_right, mul_le_mul_of_nonneg_left, mul_nonneg',
236+
by apply_rules [mul_le_mul_of_nonneg_right, mul_le_mul_of_nonneg_left, mul_nonneg,
237237
norm_nonneg, nat.cast_nonneg, pow_le_pow_of_le_left]
238238
end
239239

@@ -326,7 +326,7 @@ begin
326326
rw norm_eq_zero at hi,
327327
have : f m = 0 := f.map_coord_zero i hi,
328328
rw [this, norm_zero],
329-
exact mul_nonneg' (op_norm_nonneg f) A },
329+
exact mul_nonneg (op_norm_nonneg f) A },
330330
{ have hlt : 0 < finset.univ.prod (λi, ∥m i∥) := lt_of_le_of_ne A (ne.symm h),
331331
exact le_mul_of_div_le hlt ((le_Inf _ bounds_nonempty bounds_bdd_below).2
332332
(λ c ⟨_, hc⟩, div_le_of_le_mul hlt (begin rw mul_comm, apply hc, end))) }
@@ -434,7 +434,7 @@ begin
434434
... ≤ (∥p∥ + 1) * (fintype.card ι) * (∥p∥ + 1) ^ (fintype.card ι - 1) * ∥q - p∥
435435
+ ∥q - p∥ * univ.prod (λi, ∥p.2 i∥) :
436436
by apply_rules [add_le_add, mul_le_mul, le_refl, le_trans (norm_fst_le q) A, nat.cast_nonneg,
437-
mul_nonneg', pow_le_pow_of_le_left, pow_nonneg, norm_snd_le (q - p), norm_nonneg,
437+
mul_nonneg, pow_le_pow_of_le_left, pow_nonneg, norm_snd_le (q - p), norm_nonneg,
438438
norm_fst_le (q - p), norm_nonneg, prod_nonneg]
439439
... = ((∥p∥ + 1) * (fintype.card ι) * (∥p∥ + 1) ^ (fintype.card ι - 1)
440440
+ univ.prod (λi, ∥p.2 i∥)) * dist q p : by { rw dist_eq_norm, ring }
@@ -707,7 +707,7 @@ linear_map.mk_continuous
707707
add := λx y, by { ext m, exact f.cons_add m x y },
708708
smul := λc x, by { ext m, exact f.cons_smul m c x } }
709709
-- then register its continuity thanks to its boundedness properties.
710-
(∥f∥) (λx, multilinear_map.mk_continuous_norm_le _ (mul_nonneg' (norm_nonneg _) (norm_nonneg _)) _)
710+
(∥f∥) (λx, multilinear_map.mk_continuous_norm_le _ (mul_nonneg (norm_nonneg _) (norm_nonneg _)) _)
711711

712712
@[simp] lemma continuous_multilinear_map.curry_left_apply
713713
(f : continuous_multilinear_map 𝕜 E E₂) (x : E 0) (m : Π(i : fin n), E i.succ) :
@@ -835,7 +835,7 @@ let f' : multilinear_map 𝕜 (λ(i : fin n), E i.cast_succ) (E (last n) →L[
835835
add := λ m i x y, by { simp, refl },
836836
smul := λ m i c x, by { simp, refl } } in
837837
f'.mk_continuous (∥f∥) (λm, linear_map.mk_continuous_norm_le _
838-
(mul_nonneg' (norm_nonneg _) (prod_nonneg (λj hj, norm_nonneg _))) _)
838+
(mul_nonneg (norm_nonneg _) (prod_nonneg (λj hj, norm_nonneg _))) _)
839839

840840
@[simp] lemma continuous_multilinear_map.curry_right_apply
841841
(f : continuous_multilinear_map 𝕜 E E₂) (m : Π(i : fin n), E i.cast_succ) (x : E (last n)) :

src/analysis/normed_space/operator_norm.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ begin
120120
{ assume x,
121121
by_cases hx : f x = 0,
122122
{ rw [hx, norm_zero],
123-
apply_rules [mul_nonneg', norm_nonneg, inv_nonneg.2, norm_nonneg] },
123+
apply_rules [mul_nonneg, norm_nonneg, inv_nonneg.2, norm_nonneg] },
124124
{ let y := x₀ - (f x₀ * (f x)⁻¹ ) • x,
125125
have fy_zero : f y = 0, by calc
126126
f y = f x₀ - (f x₀ * (f x)⁻¹ ) * f x : by simp [y]
@@ -135,7 +135,7 @@ begin
135135
∥f x∥ = (r * ∥x₀∥)⁻¹ * (r * ∥x₀∥) * ∥f x∥ : by rwa [inv_mul_cancel, one_mul]
136136
... ≤ (r * ∥x₀∥)⁻¹ * (∥f x₀∥ * ∥f x∥⁻¹ * ∥x∥) * ∥f x∥ : begin
137137
apply mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left A _) (norm_nonneg _),
138-
exact inv_nonneg.2 (mul_nonneg' (by norm_num) (norm_nonneg _))
138+
exact inv_nonneg.2 (mul_nonneg (by norm_num) (norm_nonneg _))
139139
end
140140
... = (∥f x∥ ⁻¹ * ∥f x∥) * (((r * ∥x₀∥)⁻¹) * ∥f x₀∥) * ∥x∥ : by ring
141141
... = (((r * ∥x₀∥)⁻¹) * ∥f x₀∥) * ∥x∥ :

src/data/rat/order.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ num_denom_cases_on' b $ λ n₂ d₂ h₂,
4747
begin
4848
have d₁0 : 0 < (d₁:ℤ) := int.coe_nat_pos.2 (nat.pos_of_ne_zero h₁),
4949
have d₂0 : 0 < (d₂:ℤ) := int.coe_nat_pos.2 (nat.pos_of_ne_zero h₂),
50-
simp [d₁0, d₂0, h₁, h₂, mul_pos' d₁0 d₂0],
50+
simp [d₁0, d₂0, h₁, h₂, mul_pos d₁0 d₂0],
5151
intros n₁0 n₂0,
5252
apply add_nonneg; apply mul_nonneg; {assumption <|> apply int.coe_zero_le},
5353
end
@@ -58,7 +58,7 @@ num_denom_cases_on' b $ λ n₂ d₂ h₂,
5858
begin
5959
have d₁0 : 0 < (d₁:ℤ) := int.coe_nat_pos.2 (nat.pos_of_ne_zero h₁),
6060
have d₂0 : 0 < (d₂:ℤ) := int.coe_nat_pos.2 (nat.pos_of_ne_zero h₂),
61-
simp [d₁0, d₂0, h₁, h₂, mul_pos' d₁0 d₂0],
61+
simp [d₁0, d₂0, h₁, h₂, mul_pos d₁0 d₂0],
6262
exact mul_nonneg
6363
end
6464

@@ -89,7 +89,7 @@ protected theorem le_def {a b c d : ℤ} (b0 : 0 < b) (d0 : 0 < d) :
8989
begin
9090
show rat.nonneg _ ↔ _,
9191
rw ← sub_nonneg,
92-
simp [sub_eq_add_neg, ne_of_gt b0, ne_of_gt d0, mul_pos' d0 b0]
92+
simp [sub_eq_add_neg, ne_of_gt b0, ne_of_gt d0, mul_pos d0 b0]
9393
end
9494

9595
protected theorem le_refl : a ≤ a :=

0 commit comments

Comments
 (0)