Skip to content

Commit 1757879

Browse files
committed
chore: change remaining _neq_ to _ne_ (leanprover-community#35350)
I found this minor mismatch while working on another project (leanprover-community/physlib#945). It's not a big deal, yet I would like to make a PR anyway 😄 Also I suggest adding this into "style guide" since 99% of existing code follow this rule. Co-authored-by: ichxorya <benghia1st@gmail.com>
1 parent 5698328 commit 1757879

12 files changed

Lines changed: 36 additions & 36 deletions

File tree

Archive/Imo/Imo2025Q3.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ lemma apply_prime_eq_one_or_dvd_self_sub_apply (hf : IsBonza f) {p : ℕ} (hp :
7373
/-- For each bonza function `f`, then `f p = 1` for sufficient big prime `p` -/
7474
theorem not_id_apply_prime_of_gt_eq_one (hf : IsBonza f) (hnf : ¬ ∀ x > (0 : ℕ), f x = x) :
7575
∃ N, ∀ p > N, p.Prime → f p = 1 := by
76-
obtain ⟨b, hb, neq⟩ : ∃ b, 0 < b ∧ f b ≠ b := Set.not_subset.mp hnf
76+
obtain ⟨b, hb, ne⟩ : ∃ b, 0 < b ∧ f b ≠ b := Set.not_subset.mp hnf
7777
use ((b : ℤ) - (f b : ℤ)).natAbs
7878
intro p _ pp
7979
have : f p = 1 ∨ (p : ℤ) ∣ (b : ℤ) - (f b : ℤ) :=

Mathlib/Algebra/Algebra/Spectrum/Basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ theorem smul_eq_smul [Nontrivial A] (k : 𝕜) (a : A) (ha : (σ a).Nonempty) :
367367
theorem nonzero_mul_comm (a b : A) : σ (a * b) \ {0} = σ (b * a) \ {0} := by
368368
suffices h : ∀ x y : A, σ (x * y) \ {0} ⊆ σ (y * x) \ {0} from
369369
Set.eq_of_subset_of_subset (h a b) (h b a)
370-
rintro _ _ k ⟨k_mem, k_neq
371-
change ((Units.mk0 k k_neq) : 𝕜) ∈ _ at k_mem
372-
exact ⟨unit_mem_mul_comm.mp k_mem, k_neq
370+
rintro _ _ k ⟨k_mem, k_ne
371+
change ((Units.mk0 k k_ne) : 𝕜) ∈ _ at k_mem
372+
exact ⟨unit_mem_mul_comm.mp k_mem, k_ne
373373

374374
protected theorem map_inv (a : Aˣ) : (σ (a : A))⁻¹ = σ (↑a⁻¹ : A) := by
375375
ext

Mathlib/Algebra/Module/Injective.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ variable {i f}
141141
theorem chain_linearPMap_of_chain_extensionOf {c : Set (ExtensionOf i f)}
142142
(hchain : IsChain (· ≤ ·) c) :
143143
IsChain (· ≤ ·) <| (fun x : ExtensionOf i f => x.toLinearPMap) '' c := by
144-
rintro _ ⟨a, a_mem, rfl⟩ _ ⟨b, b_mem, rfl⟩ neq
145-
exact hchain a_mem b_mem (ne_of_apply_ne _ neq)
144+
rintro _ ⟨a, a_mem, rfl⟩ _ ⟨b, b_mem, rfl⟩ ne
145+
exact hchain a_mem b_mem (ne_of_apply_ne _ ne)
146146

147147
/-- The maximal element of every nonempty chain of `extension_of i f`. -/
148148
def ExtensionOf.max {c : Set (ExtensionOf i f)} (hchain : IsChain (· ≤ ·) c)

Mathlib/Algebra/Module/ZLattice/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ theorem ZLattice.rank [hs : IsZLattice K L] : finrank ℤ L = finrank K E := by
599599
have : DiscreteTopology L.toAddSubgroup := (inferInstance : DiscreteTopology L)
600600
exact Metric.finite_isBounded_inter_isClosed DiscreteTopology.isDiscrete
601601
Metric.isBounded_closedBall inferInstance
602-
obtain ⟨n, -, m, -, h_neq, h_eq⟩ := Set.Infinite.exists_ne_map_eq_of_mapsTo
602+
obtain ⟨n, -, m, -, h_ne, h_eq⟩ := Set.Infinite.exists_ne_map_eq_of_mapsTo
603603
Set.infinite_univ h_mapsto h_finite
604604
have h_nz : (-n + m : ℚ) ≠ 0 := by
605605
rwa [Ne, add_eq_zero_iff_eq_neg.not, neg_inj, Rat.coe_int_inj, ← Ne]

Mathlib/Combinatorics/SimpleGraph/Acyclic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,11 @@ Adding an edge to an acyclic graph preserves acyclicity if the endpoints are not
364364
theorem isAcyclic_add_edge_iff_of_not_reachable (x y : V) (hxy : ¬ G.Reachable x y) :
365365
(G ⊔ fromEdgeSet {s(x, y)}).IsAcyclic ↔ IsAcyclic G := by
366366
refine ⟨fun h ↦ h.anti le_sup_left, fun hG ↦ ?_⟩
367-
have x_neq_y : x ≠ y := fun c => (c ▸ hxy) (Reachable.refl y)
367+
have x_ne_y : x ≠ y := fun c => (c ▸ hxy) (Reachable.refl y)
368368
have h_add_remove : (G ⊔ fromEdgeSet {s(x, y)}) \ fromEdgeSet {s(x, y)} = G := by
369369
simpa using fun h => hxy h.reachable
370370
have h_bridge : (G ⊔ fromEdgeSet {s(x, y)}).IsBridge s(x, y) := by
371-
simpa [isBridge_iff, x_neq_y, h_add_remove]
371+
simpa [isBridge_iff, x_ne_y, h_add_remove]
372372
rw [isBridge_iff_adj_and_forall_cycle_notMem] at h_bridge
373373
intro u c hc
374374
let c' : G.Walk u u := Walk.transfer c G (fun e he ↦ by

Mathlib/Data/Nat/Prime/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ theorem prime_eq_prime_of_dvd_pow {m p q} (pp : Prime p) (pq : Prime q) (h : p
216216
theorem dvd_prime_pow {p : ℕ} (pp : Prime p) {m i : ℕ} : i ∣ p ^ m ↔ ∃ k ≤ m, i = p ^ k := by
217217
simp_rw [_root_.dvd_prime_pow (prime_iff.mp pp) m, associated_eq_eq]
218218

219-
theorem Prime.dvd_mul_of_dvd_ne {p1 p2 n : ℕ} (h_neq : p1 ≠ p2) (pp1 : Prime p1) (pp2 : Prime p2)
219+
theorem Prime.dvd_mul_of_dvd_ne {p1 p2 n : ℕ} (h_ne : p1 ≠ p2) (pp1 : Prime p1) (pp2 : Prime p2)
220220
(h1 : p1 ∣ n) (h2 : p2 ∣ n) : p1 * p2 ∣ n :=
221-
Coprime.mul_dvd_of_dvd_of_dvd ((coprime_primes pp1 pp2).mpr h_neq) h1 h2
221+
Coprime.mul_dvd_of_dvd_of_dvd ((coprime_primes pp1 pp2).mpr h_ne) h1 h2
222222

223223
/-- If `p` is prime,
224224
and `a` doesn't divide `p^k`, but `a` does divide `p^(k+1)`

Mathlib/MeasureTheory/Integral/IntervalIntegral/TrapezoidalRule.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ theorem trapezoidal_error_le_of_c2 {f : ℝ → ℝ} {a b : ℝ} (h_f_c2 : ContD
261261
(N_nonzero : 0 < N) : |trapezoidal_error f N a b| ≤ |b - a| ^ 3 * ζ / (12 * N ^ 2) := by
262262
-- This use of rcases slightly duplicates effort from the proof of trapezoidal_error_le, but doing
263263
-- it any other way that I can think of would be worse.
264-
rcases eq_or_ne a b with h_eq | h_neq
264+
rcases eq_or_ne a b with h_eq | h_ne
265265
· simp [h_eq]
266266
-- Once we have a ≠ b, all the necessary assumptions on f follow pretty quickly from its being
267267
-- C^2.
268-
have ud : UniqueDiffOn ℝ [[a, b]] := uniqueDiffOn_Icc (inf_lt_sup.mpr h_neq)
268+
have ud : UniqueDiffOn ℝ [[a, b]] := uniqueDiffOn_Icc (inf_lt_sup.mpr h_ne)
269269
have h_df : DifferentiableOn ℝ f [[a, b]] := ContDiffOn.differentiableOn h_f_c2 two_ne_zero
270270
have h_ddf : DifferentiableOn ℝ (derivWithin f [[a, b]]) [[a, b]] := by
271271
rw [← iteratedDerivWithin_one]

Mathlib/NumberTheory/Padics/PadicNorm.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = (p : ℚ)⁻¹ :=
8686

8787
/-- The `p`-adic norm of `q` is `1` if `q` is prime and not equal to `p`. -/
8888
theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : Fact q.Prime]
89-
(neq : p ≠ q) : padicNorm p q = 1 := by
90-
have p : padicValRat p q = 0 := mod_cast padicValNat_primes neq
89+
(ne : p ≠ q) : padicNorm p q = 1 := by
90+
have p : padicValRat p q = 0 := mod_cast padicValNat_primes ne
9191
rw [padicNorm, p]
9292
simp [q_prime.1.ne_zero]
9393

Mathlib/NumberTheory/Padics/PadicVal/Basic.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -465,24 +465,24 @@ theorem pow_succ_padicValNat_not_dvd {n : ℕ} [hp : Fact p.Prime] (hn : n ≠ 0
465465
rw [padicValNat_dvd_iff_le hn, not_le]
466466
exact Nat.lt_succ_self _
467467

468-
theorem padicValNat_primes {q : ℕ} [hp : Fact p.Prime] [hq : Fact q.Prime] (neq : p ≠ q) :
468+
theorem padicValNat_primes {q : ℕ} [hp : Fact p.Prime] [hq : Fact q.Prime] (ne : p ≠ q) :
469469
padicValNat p q = 0 :=
470470
@padicValNat.eq_zero_of_not_dvd p q <|
471-
(not_congr (Iff.symm (prime_dvd_prime_iff_eq hp.1 hq.1))).mp neq
471+
(not_congr (Iff.symm (prime_dvd_prime_iff_eq hp.1 hq.1))).mp ne
472472

473473
theorem padicValNat_prime_prime_pow {q : ℕ} [hp : Fact p.Prime] [hq : Fact q.Prime]
474-
(n : ℕ) (neq : p ≠ q) : padicValNat p (q ^ n) = 0 := by
475-
rw [padicValNat.pow _ <| Nat.Prime.ne_zero hq.elim, padicValNat_primes neq, mul_zero]
474+
(n : ℕ) (ne : p ≠ q) : padicValNat p (q ^ n) = 0 := by
475+
rw [padicValNat.pow _ <| Nat.Prime.ne_zero hq.elim, padicValNat_primes ne, mul_zero]
476476

477477
theorem padicValNat_mul_pow_left {q : ℕ} [hp : Fact p.Prime] [hq : Fact q.Prime]
478-
(n m : ℕ) (neq : p ≠ q) : padicValNat p (p ^ n * q ^ m) = n := by
478+
(n m : ℕ) (ne : p ≠ q) : padicValNat p (p ^ n * q ^ m) = n := by
479479
rw [padicValNat.mul (NeZero.ne' (p ^ n)).symm (NeZero.ne' (q ^ m)).symm,
480-
padicValNat.prime_pow, padicValNat_prime_prime_pow m neq, add_zero]
480+
padicValNat.prime_pow, padicValNat_prime_prime_pow m ne, add_zero]
481481

482482
theorem padicValNat_mul_pow_right {q : ℕ} [hp : Fact p.Prime] [hq : Fact q.Prime]
483-
(n m : ℕ) (neq : q ≠ p) : padicValNat q (p ^ n * q ^ m) = m := by
483+
(n m : ℕ) (ne : q ≠ p) : padicValNat q (p ^ n * q ^ m) = m := by
484484
rw [mul_comm (p ^ n) (q ^ m)]
485-
exact padicValNat_mul_pow_left m n neq
485+
exact padicValNat_mul_pow_left m n ne
486486

487487
/-- The p-adic valuation of `n` is less than or equal to its logarithm w.r.t. `p`. -/
488488
lemma padicValNat_le_nat_log (n : ℕ) : padicValNat p n ≤ Nat.log p n := by

Mathlib/Order/SupIndep.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ lemma iSupIndep.injOn_iInf {β : ι → Type*} (t : (i : ι) → β i → α) (h
418418
InjOn (fun b : (i : ι) → β i ↦ ⨅ i, t i (b i)) {b | ⨅ i, t i (b i) ≠ ⊥} := by
419419
intro b₁ hb₁ b₂ hb₂ h_eq
420420
beta_reduce at h_eq
421-
by_contra h_neq
422-
obtain ⟨i, hi⟩ : ∃ i, b₁ i ≠ b₂ i := Function.ne_iff.mp h_neq
421+
by_contra h_ne
422+
obtain ⟨i, hi⟩ : ∃ i, b₁ i ≠ b₂ i := Function.ne_iff.mp h_ne
423423
have := calc
424424
⨅ i, t i (b₁ i) ≤ t i (b₁ i) ⊓ t i (b₂ i) := le_inf (iInf_le ..) (h_eq ▸ iInf_le ..)
425425
_ = ⊥ := (ht i (b₁ i) |>.mono_right <| le_iSup₂_of_le (b₂ i) hi.symm le_rfl).eq_bot

0 commit comments

Comments
 (0)