Skip to content

Commit defda89

Browse files
committed
chore(*): reduce defeq abuse of Set α = α → Prop (leanprover-community#39019)
1 parent 1c1dadb commit defda89

8 files changed

Lines changed: 17 additions & 16 deletions

File tree

Mathlib/Analysis/Complex/CoveringMap.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ theorem isCoveringMapOn_zpow (n : ℤ) (hn : (n : 𝕜) ≠ 0) :
8989
refine .of_isCoveringMap_restrictPreimage _ (by simp) ?_ ?_
9090
· convert isClosed_singleton (x := (0 : 𝕜)).isOpen_compl using 1
9191
ext; simp [this]
92-
· convert (isCoveringMap_zpow n hn).comp_homeomorph (.setCongr _) using 1
92+
· convert (isCoveringMap_zpow n hn).comp_homeomorph (.ofEqSubtypes _) using 1
9393
ext; simpa using (this _).not
9494

9595
attribute [-instance] Units.mulAction'
@@ -103,9 +103,9 @@ theorem isQuotientCoveringMap_npow (n : ℕ) (hn : (n : 𝕜) ≠ 0)
103103
(by fun_prop) (.restrictPreimage _ surj)
104104
have : IsQuotientMap fun x : 𝕜ˣ ↦ x ^ n := by
105105
let e := unitsHomeomorphNeZero (G₀ := 𝕜)
106-
convert (e.symm.isQuotientMap.comp this).comp (e.trans (.setCongr _)).isQuotientMap
106+
convert (e.symm.isQuotientMap.comp this).comp (e.trans (.ofEqSubtypes _)).isQuotientMap
107107
· exact (e.left_inv _).symm
108-
· ext; simp [NeZero.ne]; rfl
108+
· ext; simp [NeZero.ne]
109109
refine this.isQuotientCoveringMap_of_subgroup _
110110
(Set.Finite.isDiscrete <| inferInstanceAs (Finite (rootsOfUnity ..))) ?_
111111
simp [mul_pow, mul_inv_eq_one, eq_comm]

Mathlib/Analysis/Normed/Group/FunctionSeries.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ theorem tendstoUniformlyOn_tsum_of_cofinite_eventually {ι : Type*} {f : ι →
7474
apply lt_of_le_of_lt _ (ht n (Finset.union_subset_right hn))
7575
apply (norm_tsum_le_tsum_norm (A.subtype _)).trans
7676
apply (A.subtype _).tsum_le_tsum _ (hu.subtype _)
77-
simp only [comp_apply, Subtype.forall, imp_false]
77+
simp only [comp_apply, Subtype.forall]
7878
apply fun i hi => HN i ?_ x hx
7979
have : i ∉ hN.toFinset := fun hg ↦ hi (Finset.union_subset_left hn hg)
8080
simp_all

Mathlib/Data/Nat/Order/Lemmas.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ instance Subtype.orderBot (s : Set ℕ) [DecidablePred (· ∈ s)] [h : Nonempty
3030
bot := ⟨Nat.find (nonempty_subtype.1 h), Nat.find_spec (nonempty_subtype.1 h)⟩
3131
bot_le x := Nat.find_min' _ x.2
3232

33-
instance Subtype.semilatticeSup (s : Set ℕ) : SemilatticeSup s :=
34-
{ Subtype.instLinearOrder (· ∈ s), LinearOrder.toLattice with }
33+
instance Subtype.semilatticeSup (p : ℕ → Prop) : SemilatticeSup (Subtype p) :=
34+
{ Subtype.instLinearOrder p, LinearOrder.toLattice with }
3535

3636
theorem Subtype.coe_bot {s : Set ℕ} [DecidablePred (· ∈ s)] [h : Nonempty s] :
3737
((⊥ : s) : ℕ) = Nat.find (nonempty_subtype.1 h) :=

Mathlib/NumberTheory/EulerProduct/ExpLog.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ theorem exp_tsum_primes_log_eq_tsum {f : ℕ →*₀ ℂ} (hsum : Summable (‖f
4141
have hs {p : ℕ} (hp : 1 < p) : ‖f p‖ < 1 := hsum.of_norm.norm_lt_one (f := f.toMonoidHom) hp
4242
have hp (p : Nat.Primes) : 1 - f p ≠ 0 :=
4343
fun h ↦ (norm_one (α := ℂ) ▸ (sub_eq_zero.mp h) ▸ hs p.prop.one_lt).false
44-
have H := hsum.of_norm.clog_one_sub.neg.subtype {p | p.Prime} |>.hasSum.cexp.tprod_eq
45-
simp only [Set.coe_setOf, Set.mem_setOf_eq, Function.comp_apply, exp_neg, exp_log (hp _)] at H
44+
have H := hsum.of_norm.clog_one_sub.neg.subtype Nat.Prime |>.hasSum.cexp.tprod_eq
45+
simp only [Function.comp_apply, exp_neg, exp_log (hp _)] at H
4646
exact H.symm.trans <| eulerProduct_completely_multiplicative_tprod hsum
4747

4848
end EulerProduct

Mathlib/NumberTheory/NumberField/Ideal/Asymptotics.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private def tendsto_norm_le_and_mk_eq_div_atTop_aux₂ :
5858
(ZLattice.comap ℝ (idealLattice K ((FractionalIdeal.mk0 K) J)) (toMixed K).toLinearMap))
5959
≃ {a : idealSet K J // mixedEmbedding.norm (a : mixedSpace K) ≤ s} := by
6060
rw [ZLattice.coe_comap]
61-
refine (((toMixed K).toEquiv.image _).trans (Equiv.setCongr ?_)).trans
61+
refine (((toMixed K).toEquiv.image _).trans (Equiv.subtypeEquivProp ?_)).trans
6262
(Equiv.subtypeSubtypeEquivSubtypeInter _ (mixedEmbedding.norm · ≤ s)).symm
6363
ext
6464
simp_rw [mem_idealSet, Set.mem_image, Set.mem_inter_iff, Set.mem_preimage, SetLike.mem_coe,

Mathlib/NumberTheory/NumberField/Ideal/KummerDedekind.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ theorem primesOverSpanEquivMonicFactorsMod_symm_apply (hp : ¬ p ∣ exponent θ
181181
inferInstance (by simp [NeZero.ne p]) (not_dvd_exponent_iff.mp hp).eq_top θ.isIntegral).symm
182182
⟨Q.map (Int.quotientSpanNatEquivZMod p).symm, by
183183
rw [← primesOverSpanEquivMonicFactorsModAux_symm_apply]
184-
exact ((primesOverSpanEquivMonicFactorsModAux _).symm ⟨Q, hQ⟩).coe_prop⟩ := rfl
184+
exact ((primesOverSpanEquivMonicFactorsModAux _).symm ⟨Q, hQ⟩).prop⟩ := rfl
185185

186186
/--
187187
The ideal corresponding to the class of `Q ∈ ℤ[X]` modulo `p` via

Mathlib/Topology/Algebra/InfiniteSum/Group.lean

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,18 +297,19 @@ theorem Multipliable.comp_injective {i : γ → β} (hf : Multipliable f) (hi :
297297
(hf.mulIndicator (Set.range i))
298298

299299
@[to_additive]
300-
theorem Multipliable.subtype (hf : Multipliable f) (s : Set β) : Multipliable (f ∘ (↑) : s → α) :=
300+
theorem Multipliable.subtype (hf : Multipliable f) (p : β → Prop) :
301+
Multipliable (f ∘ (↑) : Subtype p → α) :=
301302
hf.comp_injective Subtype.coe_injective
302303

303304
@[to_additive]
304305
theorem multipliable_subtype_and_compl {s : Set β} :
305306
((Multipliable fun x : s ↦ f x) ∧ Multipliable fun x : ↑sᶜ ↦ f x) ↔ Multipliable f :=
306-
⟨and_imp.2 Multipliable.mul_compl, fun h ↦ ⟨h.subtype s, h.subtype sᶜ⟩⟩
307+
⟨and_imp.2 Multipliable.mul_compl, fun h ↦ ⟨h.subtype (· ∈ s), h.subtype (· ∈ sᶜ)⟩⟩
307308

308309
@[to_additive]
309310
protected theorem Multipliable.tprod_subtype_mul_tprod_subtype_compl [T2Space α] {f : β → α}
310311
(hf : Multipliable f) (s : Set β) : (∏' x : s, f x) * ∏' x : ↑sᶜ, f x = ∏' x, f x :=
311-
((hf.subtype s).hasProd.mul_compl (hf.subtype { x | x ∉ s }).hasProd).unique hf.hasProd
312+
((hf.subtype _).hasProd.mul_compl (hf.subtype _).hasProd).unique hf.hasProd
312313

313314
@[to_additive]
314315
protected theorem Multipliable.prod_mul_tprod_subtype_compl [T2Space α] {f : β → α}
@@ -352,8 +353,8 @@ theorem tendsto_tprod_compl_atTop_one (f : α → G) :
352353
by_cases H : Multipliable f
353354
· intro e he
354355
obtain ⟨s, hs⟩ := H.tprod_vanishing he
355-
rw [Filter.mem_map, mem_atTop_sets]
356-
exact ⟨s, fun t hts ↦ hs _ <| Set.disjoint_left.mpr fun a ha has ↦ ha (hts has)⟩
356+
simp only [Filter.mem_map, mem_atTop_sets, Set.mem_preimage]
357+
exact ⟨s, fun t hts ↦ hs tᶜ <| Set.disjoint_left.mpr fun a ha has ↦ ha (hts has)⟩
357358
· refine tendsto_const_nhds.congr fun _ ↦ (tprod_eq_one_of_not_multipliable ?_).symm
358359
rwa [Finset.multipliable_compl_iff]
359360

Mathlib/Topology/FiberBundle/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ theorem totalSpaceMk_isClosedEmbedding [T1Space B] (x : B) :
276276
This is useful to transfer topological properties of the model fiber. -/
277277
noncomputable def homeomorphAt (b : B) : E b ≃ₜ F :=
278278
((totalSpaceMk_isEmbedding F E b).toHomeomorph.trans <|
279-
Homeomorph.ofEqSubtypes <| TotalSpace.range_mk b).trans <|
279+
Homeomorph.setCongr <| TotalSpace.range_mk b).trans <|
280280
(trivializationAt F E b).preimageSingletonHomeomorph <| mem_baseSet_trivializationAt' b
281281

282282
lemma t0Space [T0Space F] (b : B) : T0Space (E b) :=

0 commit comments

Comments
 (0)