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

Commit a50170a

Browse files
chore(data/{finset,set}/basic): Align lemmas (#17805)
Match the `set` and `finset` statements. Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
1 parent c982179 commit a50170a

File tree

47 files changed

+127
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+127
-117
lines changed

archive/imo/imo1988_q6.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ begin
111111
-- And hence we are done by H_zero and H_diag.
112112
solve_by_elim } },
113113
-- To finish the main proof, we need to show that the exceptional locus is nonempty.
114-
-- So we assume that the exceptional locus is empty, and work towards dering a contradiction.
115-
rw set.ne_empty_iff_nonempty,
114+
-- So we assume that the exceptional locus is empty, and work towards deriving a contradiction.
115+
rw set.nonempty_iff_ne_empty,
116116
assume exceptional_empty,
117117
-- Observe that S is nonempty.
118118
have S_nonempty : S.nonempty,

counterexamples/phillips.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ begin
532532
⊆ ⋃ y ∈ φ.to_bounded_additive_measure.discrete_support, {x | y ∈ spf Hcont x},
533533
{ assume x hx,
534534
dsimp at hx,
535-
rw [← ne.def, ne_empty_iff_nonempty] at hx,
535+
rw [← ne.def, ←nonempty_iff_ne_empty] at hx,
536536
simp only [exists_prop, mem_Union, mem_set_of_eq],
537537
exact hx },
538538
apply countable.mono (subset.trans A B),

src/algebra/big_operators/finprod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ lemma finprod_mem_empty : ∏ᶠ i ∈ (∅ : set α), f i = 1 := by simp
540540
/-- A set `s` is nonempty if the product of some function over `s` is not equal to `1`. -/
541541
@[to_additive "A set `s` is nonempty if the sum of some function over `s` is not equal to `0`."]
542542
lemma nonempty_of_finprod_mem_ne_one (h : ∏ᶠ i ∈ s, f i ≠ 1) : s.nonempty :=
543-
ne_empty_iff_nonempty.1 $ λ h', h $ h'.symm ▸ finprod_mem_empty
543+
nonempty_iff_ne_empty.2 $ λ h', h $ h'.symm ▸ finprod_mem_empty
544544

545545
/-- Given finite sets `s` and `t`, the product of `f i` over `i ∈ s ∪ t` times the product of
546546
`f i` over `i ∈ s ∩ t` equals the product of `f i` over `i ∈ s` times the product of `f i`

src/algebra/lie/solvable.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ lemma derived_length_zero (I : lie_ideal R L) [hI : is_solvable R I] :
333333
begin
334334
let s := {k | derived_series_of_ideal R L k I = ⊥}, change Inf s = 0 ↔ _,
335335
have hne : s ≠ ∅,
336-
{ rw set.ne_empty_iff_nonempty,
337-
obtain ⟨k, hk⟩ := id hI, use k,
336+
{ obtain ⟨k, hk⟩ := id hI,
337+
refine set.nonempty.ne_empty ⟨k, _⟩,
338338
rw [derived_series_def, lie_ideal.derived_series_eq_bot_iff] at hk, exact hk, },
339339
simp [hne],
340340
end

src/algebra/module/dedekind_domain.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ theorem is_internal_prime_power_torsion [module.finite R M] (hM : module.is_tors
6262
begin
6363
obtain ⟨I, hI, hM'⟩ := is_torsion_by_ideal_of_finite_of_is_torsion hM,
6464
refine is_internal_prime_power_torsion_of_is_torsion_by_ideal _ hM',
65-
rw set.ne_empty_iff_nonempty at hI, rw submodule.ne_bot_iff,
65+
rw set.nonempty_iff_ne_empty at hI, rw submodule.ne_bot_iff,
6666
obtain ⟨x, H, hx⟩ := hI, exact ⟨x, H, non_zero_divisors.ne_zero hx⟩
6767
end
6868

src/algebra/module/torsion.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,7 @@ lemma is_torsion_by_ideal_of_finite_of_is_torsion [module.finite R M] (hM : modu
501501
begin
502502
cases (module.finite_def.mp infer_instance : (⊤ : submodule R M).fg) with S h,
503503
refine ⟨∏ x in S, ideal.torsion_of R M x, _, _⟩,
504-
{ rw set.ne_empty_iff_nonempty,
505-
refine ⟨_, _, (∏ x in S, (@hM x).some : R⁰).2⟩,
504+
{ refine set.nonempty.ne_empty ⟨_, _, (∏ x in S, (@hM x).some : R⁰).2⟩,
506505
rw [subtype.val_eq_coe, submonoid.coe_finset_prod],
507506
apply ideal.prod_mem_prod,
508507
exact λ x _, (@hM x).some_spec },

src/algebra/support.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ by { simp_rw [← subset_empty_iff, mul_support_subset_iff', funext_iff], simp }
7676

7777
@[simp, to_additive] lemma mul_support_nonempty_iff {f : α → M} :
7878
(mul_support f).nonempty ↔ f ≠ 1 :=
79-
by rw [← ne_empty_iff_nonempty, ne.def, mul_support_eq_empty_iff]
79+
by rw [nonempty_iff_ne_empty, ne.def, mul_support_eq_empty_iff]
8080

8181
@[to_additive]
8282
lemma range_subset_insert_image_mul_support (f : α → M) :

src/algebraic_geometry/function_field.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ begin
5454
replace ha := ne_of_apply_ne _ ha,
5555
have hs : generic_point X.carrier ∈ RingedSpace.basic_open _ s,
5656
{ rw [← opens.mem_coe, (generic_point_spec X.carrier).mem_open_set_iff, set.top_eq_univ,
57-
set.univ_inter, set.ne_empty_iff_nonempty, ne.def, ← opens.coe_bot,
57+
set.univ_inter, set.nonempty_iff_ne_empty, ne.def, ← opens.coe_bot,
5858
subtype.coe_injective.eq_iff, ← opens.empty_eq],
5959
erw basic_open_eq_bot_iff,
6060
exacts [ha, (RingedSpace.basic_open _ _).prop] },

src/algebraic_geometry/prime_spectrum/basic.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,8 @@ begin
260260
split,
261261
{ contrapose!,
262262
intro h,
263-
apply set.ne_empty_iff_nonempty.mpr,
264263
rcases ideal.exists_le_maximal I h with ⟨M, hM, hIM⟩,
265-
exact ⟨⟨M, hM.is_prime⟩, hIM⟩ },
264+
exact set.nonempty.ne_empty ⟨⟨M, hM.is_prime⟩, hIM⟩ },
266265
{ rintro rfl, apply zero_locus_empty_of_one_mem, trivial }
267266
end
268267

@@ -458,7 +457,7 @@ lemma is_irreducible_zero_locus_iff_of_radical (I : ideal R) (hI : I.is_radical)
458457
begin
459458
rw [ideal.is_prime_iff, is_irreducible],
460459
apply and_congr,
461-
{ rw [set.ne_empty_iff_nonempty, ne.def, zero_locus_empty_iff_eq_top] },
460+
{ rw [set.nonempty_iff_ne_empty, ne.def, zero_locus_empty_iff_eq_top] },
462461
{ transitivity ∀ (x y : ideal R), Z(I) ⊆ Z(x) ∪ Z(y) → Z(I) ⊆ Z(x) ∨ Z(I) ⊆ Z(y),
463462
{ simp_rw [is_preirreducible_iff_closed_union_closed, is_closed_iff_zero_locus_ideal],
464463
split,

src/analysis/bounded_variation.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,11 @@ begin
393393
by_cases hs : s = ∅,
394394
{ simp [hs] },
395395
haveI : nonempty {u // monotone u ∧ ∀ (i : ℕ), u i ∈ s},
396-
from nonempty_monotone_mem (ne_empty_iff_nonempty.1 hs),
396+
from nonempty_monotone_mem (nonempty_iff_ne_empty.2 hs),
397397
by_cases ht : t = ∅,
398398
{ simp [ht] },
399399
haveI : nonempty {u // monotone u ∧ ∀ (i : ℕ), u i ∈ t},
400-
from nonempty_monotone_mem (ne_empty_iff_nonempty.1 ht),
400+
from nonempty_monotone_mem (nonempty_iff_ne_empty.2 ht),
401401
refine ennreal.supr_add_supr_le _,
402402
/- We start from two sequences `u` and `v` along `s` and `t` respectively, and we build a new
403403
sequence `w` along `s ∪ t` by juxtaposing them. Its variation is larger than the sum of the

0 commit comments

Comments
 (0)