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

Commit 0783742

Browse files
committed
chore(*): more assumptions to lemmas that are removable (#13364)
This time I look at assumptions that are actually provable by simp from the earlier assumptions (fortunately there are only a couple of these), and one more from the review of #13316 that was slightly too nontrivial to be found automatically.
1 parent 56f6c8e commit 0783742

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

src/analysis/special_functions/pow.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,8 +1113,8 @@ begin
11131113
exact rpow_pos_of_nonneg (neg_pos.mpr hp_neg) },
11141114
end
11151115

1116-
lemma rpow_lt_one {x : ℝ≥0} {z : ℝ} (hx : 0 ≤ x) (hx1 : x < 1) (hz : 0 < z) : x^z < 1 :=
1117-
real.rpow_lt_one hx hx1 hz
1116+
lemma rpow_lt_one {x : ℝ≥0} {z : ℝ} (hx1 : x < 1) (hz : 0 < z) : x^z < 1 :=
1117+
real.rpow_lt_one (coe_nonneg x) hx1 hz
11181118

11191119
lemma rpow_le_one {x : ℝ≥0} {z : ℝ} (hx2 : x ≤ 1) (hz : 0 ≤ z) : x^z ≤ 1 :=
11201120
real.rpow_le_one x.2 hx2 hz
@@ -1581,7 +1581,7 @@ lemma rpow_lt_one {x : ℝ≥0∞} {z : ℝ} (hx : x < 1) (hz : 0 < z) : x^z < 1
15811581
begin
15821582
lift x to ℝ≥0 using ne_of_lt (lt_of_lt_of_le hx le_top),
15831583
simp only [coe_lt_one_iff] at hx,
1584-
simp [coe_rpow_of_nonneg _ (le_of_lt hz), nnreal.rpow_lt_one (zero_le x) hx hz],
1584+
simp [coe_rpow_of_nonneg _ (le_of_lt hz), nnreal.rpow_lt_one hx hz],
15851585
end
15861586

15871587
lemma rpow_le_one {x : ℝ≥0∞} {z : ℝ} (hx : x ≤ 1) (hz : 0 ≤ z) : x^z ≤ 1 :=

src/data/nat/log.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,12 @@ begin
128128
simp [hn, this]
129129
end
130130

131-
lemma lt_pow_succ_log_self {b : ℕ} (hb : 1 < b) {x : ℕ} (hx : 0 < x) :
131+
lemma lt_pow_succ_log_self {b : ℕ} (hb : 1 < b) (x : ℕ) :
132132
x < b ^ (log b x).succ :=
133133
begin
134+
cases x.eq_zero_or_pos with hx hx,
135+
{ simp only [hx, log_zero_right, pow_one],
136+
exact pos_of_gt hb },
134137
rw [←not_le, pow_le_iff_le_log hb hx, not_le],
135138
exact lt_succ_self _,
136139
end

src/ring_theory/adjoin/basic.lean

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,14 @@ lemma adjoin_induction₂ {p : A → A → Prop} {a b : A} (ha : a ∈ adjoin R
8383
(Hadd_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ + x₂) y)
8484
(Hadd_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ + y₂))
8585
(Hmul_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ * x₂) y)
86-
(Hmul_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ * y₂))
87-
(Hadd_alg : ∀ x y r, p x (algebra_map R A r) →
88-
p y (algebra_map R A r) → p (x + y) (algebra_map R A r))
89-
(Hmul_alg : ∀ x y r, p x (algebra_map R A r) →
90-
p y (algebra_map R A r) → p (x * y) (algebra_map R A r)) : p a b :=
86+
(Hmul_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ * y₂)) : p a b :=
9187
begin
9288
refine adjoin_induction hb _ (λ r, _) (Hadd_right a) (Hmul_right a),
9389
{ exact adjoin_induction ha Hs Halg_left (λ x y Hx Hy z hz, Hadd_left x y z (Hx z hz) (Hy z hz))
9490
(λ x y Hx Hy z hz, Hmul_left x y z (Hx z hz) (Hy z hz)) },
95-
{ exact adjoin_induction ha (Halg_right r) (λ r', Halg r' r) (λ x y, Hadd_alg x y r)
96-
(λ x y, Hmul_alg x y r) },
91+
{ exact adjoin_induction ha (Halg_right r) (λ r', Halg r' r)
92+
(λ x y, Hadd_left x y ((algebra_map R A) r))
93+
(λ x y, Hmul_left x y ((algebra_map R A) r)) },
9794
end
9895

9996
/-- The difference with `algebra.adjoin_induction` is that this acts on the subtype. -/
@@ -236,8 +233,6 @@ def adjoin_comm_semiring_of_comm {s : set A} (hcomm : ∀ (a ∈ s) (b ∈ s), a
236233
(λ _ _ _ h₁ h₂, by simp only [add_mul, mul_add, h₁, h₂])
237234
(λ x₁ x₂ y₁ h₁ h₂, by rw [mul_assoc, h₂, ←mul_assoc y₁, ←h₁, mul_assoc x₁])
238235
(λ x₁ x₂ y₁ h₁ h₂, by rw [mul_assoc x₂, ←h₂, ←mul_assoc x₂, ←h₁, ←mul_assoc])
239-
(λ _ _ _ _ _, by simp only [add_mul, mul_add, commutes])
240-
(λ _ _ _ _ _, by rw [commutes])
241236
end,
242237
..(adjoin R s).to_semiring }
243238

0 commit comments

Comments
 (0)