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

Commit 5fbebf6

Browse files
committed
fix(logic/{function}/basic): remove simp lemmas function.injective.eq_iff and imp_iff_right (#6402)
* `imp_iff_right` is a conditional simp lemma that matches a lot and should never successfully rewrite. * `function.injective.eq_iff` is a conditional simp lemma that matches a lot and is rarely used. Since you almost always need to give the proof `hf : function.injective f` as an argument to `simp`, you can replace it with `hf.eq_iff`. Co-authored-by: Rob Lewis <rob.y.lewis@gmail.com>
1 parent 0938880 commit 5fbebf6

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

src/analysis/hofer.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ begin
6363
{ intro n,
6464
induction n using nat.case_strong_induction_on with n IH,
6565
{ specialize hu 0,
66-
simpa [hu0, mul_nonneg_iff, zero_le_one, ε_pos.le] using hu },
66+
simpa [hu0, mul_nonneg_iff, zero_le_one, ε_pos.le, le_refl] using hu },
6767
have A : d (u (n+1)) x ≤ 2 * ε,
6868
{ rw [dist_comm],
6969
let r := range (n+1), -- range (n+1) = {0, ..., n}

src/analysis/normed_space/inner_product.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ begin
766766
rw orthonormal_iff_ite at ⊢ hv,
767767
intros i j,
768768
convert hv (f i) (f j) using 1,
769-
simp [hf]
769+
simp [hf.eq_iff]
770770
end
771771

772772
/-- A linear combination of some subset of an orthonormal set is orthogonal to other members of the

src/combinatorics/colex.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ begin
107107
simp only [colex.lt_def, not_exists, mem_image, exists_prop, not_and],
108108
split,
109109
{ rintro ⟨k, z, q, k', _, rfl⟩,
110-
exact ⟨k', λ x hx, by simpa [h₁.injective] using z (h₁ hx), λ t, q _ t rfl, ‹k' ∈ B›⟩ },
110+
exact ⟨k', λ x hx, by simpa [h₁.injective.eq_iff] using z (h₁ hx), λ t, q _ t rfl, ‹k' ∈ B›⟩ },
111111
rintro ⟨k, z, ka, _⟩,
112112
refine ⟨f k, λ x hx, _, _, k, ‹k ∈ B›, rfl⟩,
113113
{ split,

src/combinatorics/hall.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ begin
125125
specialize hfr x,
126126
rw ←h at hfr,
127127
simpa using hfr, },
128-
by_cases h₁ : z₁ = x; by_cases h₂ : z₂ = x; simp [h₁, h₂, hfinj, key, key.symm], },
128+
by_cases h₁ : z₁ = x; by_cases h₂ : z₂ = x; simp [h₁, h₂, hfinj.eq_iff, key, key.symm], },
129129
{ intro z,
130130
split_ifs with hz,
131131
{ rwa hz },

src/data/equiv/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ lemma image_symm_preimage {α β} {f : α → β} (hf : injective f) (u s : set
16341634
begin
16351635
ext ⟨b, a, has, rfl⟩,
16361636
have : ∀(h : ∃a', a' ∈ s ∧ a' = a), classical.some h = a := λ h, (classical.some_spec h).2,
1637-
simp [equiv.set.image, equiv.set.image_of_inj_on, hf, this],
1637+
simp [equiv.set.image, equiv.set.image_of_inj_on, hf.eq_iff, this],
16381638
end
16391639

16401640
/-- If `f : α → β` is an injective function, then `α` is equivalent to the range of `f`. -/

src/linear_algebra/basis.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ begin
179179
{ intro i,
180180
ext j,
181181
haveI : nontrivial R := ⟨⟨0, 1, H⟩⟩,
182-
simp [hv.range_repr_self, finsupp.single_apply, hv.injective] }
182+
simp [hv.range_repr_self, finsupp.single_apply, hv.injective.eq_iff] }
183183
end
184184

185185
/-- Construct a linear map given the value at the basis. -/

src/logic/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ iff_def.trans and.comm
219219
theorem imp_true_iff {α : Sort*} : (α → true) ↔ true :=
220220
iff_true_intro $ λ_, trivial
221221

222-
@[simp] theorem imp_iff_right (ha : a) : (a → b) ↔ b :=
222+
theorem imp_iff_right (ha : a) : (a → b) ↔ b :=
223223
⟨λf, f ha, imp_intro⟩
224224

225225
/-! ### Declarations about `not` -/

src/logic/function/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ iff.intro (assume h a, h ▸ rfl) funext
5656
protected lemma bijective.injective {f : α → β} (hf : bijective f) : injective f := hf.1
5757
protected lemma bijective.surjective {f : α → β} (hf : bijective f) : surjective f := hf.2
5858

59-
@[simp] theorem injective.eq_iff (I : injective f) {a b : α} :
59+
theorem injective.eq_iff (I : injective f) {a b : α} :
6060
f a = f b ↔ a = b :=
6161
⟨@I _ _, congr_arg f⟩
6262

src/order/rel_iso.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ end
282282
def order_embedding_of_lt_embedding [partial_order α] [partial_order β]
283283
(f : ((<) : α → α → Prop) ↪r ((<) : β → β → Prop)) :
284284
α ↪o β :=
285-
{ map_rel_iff' := by { intros, simp [le_iff_lt_or_eq,f.map_rel_iff, f.injective] }, .. f }
285+
{ map_rel_iff' := by { intros, simp [le_iff_lt_or_eq,f.map_rel_iff, f.injective.eq_iff] }, .. f }
286286

287287
@[simp]
288288
lemma order_embedding_of_lt_embedding_apply [partial_order α] [partial_order β]

0 commit comments

Comments
 (0)