Skip to content

Commit f890c3e

Browse files
committed
chore: golf using ext; simpa (#32553)
1 parent 60579c1 commit f890c3e

File tree

5 files changed

+10
-24
lines changed

5 files changed

+10
-24
lines changed

Mathlib/Algebra/Star/Pointwise.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,5 @@ end Set
129129
@[simp]
130130
lemma StarMemClass.star_coe_eq {S α : Type*} [InvolutiveStar α] [SetLike S α]
131131
[StarMemClass S α] (s : S) : star (s : Set α) = s := by
132-
ext x
133-
simp only [Set.mem_star, SetLike.mem_coe]
134-
exact ⟨by simpa only [star_star] using star_mem (s := s) (r := star x), star_mem⟩
132+
ext
133+
simpa using star_mem_iff

Mathlib/Data/Set/Function.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,8 @@ theorem MapsTo.iterate {f : α → α} {s : Set α} (h : MapsTo f s s) : ∀ n,
159159

160160
theorem MapsTo.iterate_restrict {f : α → α} {s : Set α} (h : MapsTo f s s) (n : ℕ) :
161161
(h.restrict f s s)^[n] = (h.iterate n).restrict _ _ _ := by
162-
funext x
163-
rw [Subtype.ext_iff, MapsTo.val_restrict_apply]
164-
induction n generalizing x with
165-
| zero => rfl
166-
| succ n ihn => simp [Nat.iterate, ihn]
162+
ext
163+
simpa using coe_iterate_restrict _ _ _
167164

168165
lemma mapsTo_of_subsingleton' [Subsingleton β] (f : α → β) (h : s.Nonempty → t.Nonempty) :
169166
MapsTo f s t :=

Mathlib/Order/Atoms/Finite.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@ open scoped _root_.IsSimpleOrder
5454
variable [LE α] [BoundedOrder α] [IsSimpleOrder α] [DecidableEq α]
5555

5656
theorem univ : (Finset.univ : Finset α) = {⊤, ⊥} := by
57-
change Finset.map _ (Finset.univ : Finset Bool) = _
58-
rw [Fintype.univ_bool]
59-
simp only [Finset.map_insert, Function.Embedding.coeFn_mk, Finset.map_singleton]
60-
rfl
57+
ext
58+
simpa using (eq_bot_or_eq_top _).symm
6159

6260
theorem card : Fintype.card α = 2 :=
6361
(Fintype.ofEquiv_card _).trans Fintype.card_bool

Mathlib/Order/ConditionallyCompleteLattice/Indexed.lean

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,8 @@ theorem ciSup_mem_iInter_Icc_of_antitone_Icc [SemilatticeSup β] {f g : β →
278278

279279
lemma Set.Iic_ciInf [Nonempty ι] {f : ι → α} (hf : BddBelow (range f)) :
280280
Iic (⨅ i, f i) = ⋂ i, Iic (f i) := by
281-
apply Subset.antisymm
282-
· rintro x hx - ⟨i, rfl⟩
283-
exact hx.trans (ciInf_le hf _)
284-
· rintro x hx
285-
apply le_ciInf
286-
simpa using hx
281+
ext
282+
simpa using le_ciInf_iff hf
287283

288284
lemma Set.Ici_ciSup [Nonempty ι] {f : ι → α} (hf : BddAbove (range f)) :
289285
Ici (⨆ i, f i) = ⋂ i, Ici (f i) :=

Mathlib/RingTheory/DedekindDomain/Ideal/Lemmas.lean

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,12 +1008,8 @@ variable {A : Type*} [CommRing A] {p : Ideal A} (hpb : p ≠ ⊥) [hpm : p.IsMax
10081008

10091009
include hpb in
10101010
theorem coe_primesOverFinset : primesOverFinset p B = primesOver p B := by
1011-
classical
1012-
ext P
1013-
rw [primesOverFinset, factors_eq_normalizedFactors, Finset.mem_coe, Multiset.mem_toFinset]
1014-
exact (P.mem_normalizedFactors_iff (map_ne_bot_of_ne_bot hpb)).trans <| Iff.intro
1015-
(fun ⟨hPp, h⟩ => ⟨hPp, ⟨hpm.eq_of_le (comap_ne_top _ hPp.ne_top) (le_comap_of_map_le h)⟩⟩)
1016-
(fun ⟨hPp, h⟩ => ⟨hPp, map_le_of_le_comap h.1.le⟩)
1011+
ext
1012+
simpa using (mem_primesOver_iff_mem_normalizedFactors _ hpb).symm
10171013

10181014
include hpb in
10191015
theorem mem_primesOverFinset_iff {P : Ideal B} : P ∈ primesOverFinset p B ↔ P ∈ primesOver p B := by

0 commit comments

Comments
 (0)