Skip to content

Commit

Permalink
chore(analysis/*): remove some non-terminal simps (#17346)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdoll committed Nov 5, 2022
1 parent 83f7236 commit 9726554
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/analysis/calculus/deriv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,9 @@ begin
{ assume n a h,
convert h.mul (has_strict_deriv_at_id x),
{ ext y, simp [pow_add, mul_assoc] },
{ simp [pow_add], ring } }
{ simp only [pow_add, pow_one, derivative_mul, derivative_C, zero_mul, derivative_X_pow,
derivative_X, mul_one, zero_add, eval_mul, eval_C, eval_add, eval_nat_cast, eval_pow, eval_X,
id.def], ring } }
end

/-- The derivative (in the analysis sense) of a polynomial `p` is given by `p.derivative`. -/
Expand Down
9 changes: 5 additions & 4 deletions src/analysis/inner_product_space/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ add_group_norm.to_normed_add_comm_group
have h₃ : re ⟪x, y⟫ ≤ ∥x∥ * ∥y∥ := by linarith,
have h₄ : re ⟪y, x⟫ ≤ ∥x∥ * ∥y∥ := by rwa [←inner_conj_sym, conj_re],
have : ∥x + y∥ * ∥x + y∥ ≤ (∥x∥ + ∥y∥) * (∥x∥ + ∥y∥),
{ simp [←inner_self_eq_norm_mul_norm, inner_add_add_self, add_mul, mul_add, mul_comm],
{ simp only [←inner_self_eq_norm_mul_norm, inner_add_add_self, mul_add, mul_comm, map_add],
linarith },
exact nonneg_le_nonneg_of_sq_le_sq (add_nonneg (sqrt_nonneg _) (sqrt_nonneg _)) this,
end,
Expand Down Expand Up @@ -490,7 +490,8 @@ lemma real_inner_self_nonneg {x : F} : 0 ≤ ⟪x, x⟫_ℝ := @inner_self_nonne
begin
split,
{ intro h,
have h₁ : re ⟪x, x⟫ = 0 := by rw is_R_or_C.ext_iff at h; simp [h.1],
have h₁ : re ⟪x, x⟫ = 0 :=
by rw is_R_or_C.ext_iff at h; simp only [h.1, zero_re'],
rw [←norm_sq_eq_inner x] at h₁,
rw [←norm_eq_zero],
exact pow_eq_zero h₁ },
Expand Down Expand Up @@ -568,7 +569,7 @@ by simp only [inner_add_left, inner_add_right]; ring
lemma real_inner_add_add_self {x y : F} : ⟪x + y, x + y⟫_ℝ = ⟪x, x⟫_ℝ + 2 * ⟪x, y⟫_ℝ + ⟪y, y⟫_ℝ :=
begin
have : ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ := by rw [←inner_conj_sym]; refl,
simp [inner_add_add_self, this],
simp only [inner_add_add_self, this, add_left_inj],
ring,
end

Expand All @@ -580,7 +581,7 @@ by simp only [inner_sub_left, inner_sub_right]; ring
lemma real_inner_sub_sub_self {x y : F} : ⟪x - y, x - y⟫_ℝ = ⟪x, x⟫_ℝ - 2 * ⟪x, y⟫_ℝ + ⟪y, y⟫_ℝ :=
begin
have : ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ := by rw [←inner_conj_sym]; refl,
simp [inner_sub_sub_self, this],
simp only [inner_sub_sub_self, this, add_left_inj],
ring,
end

Expand Down

0 comments on commit 9726554

Please sign in to comment.