Skip to content

Commit

Permalink
chore(Data/ZMod/Parity): Delete (#17236)
Browse files Browse the repository at this point in the history
The files can be moved earlier at no cost
  • Loading branch information
YaelDillies committed Sep 30, 2024
1 parent cdd209a commit 07a4873
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 36 deletions.
1 change: 0 additions & 1 deletion Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,6 @@ import Mathlib.Data.ZMod.Defs
import Mathlib.Data.ZMod.Factorial
import Mathlib.Data.ZMod.IntUnitsPower
import Mathlib.Data.ZMod.Module
import Mathlib.Data.ZMod.Parity
import Mathlib.Data.ZMod.Quotient
import Mathlib.Data.ZMod.Units
import Mathlib.Deprecated.Aliases
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Authors: Kyle Miller
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Combinatorics.SimpleGraph.Dart
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Data.ZMod.Parity
import Mathlib.Data.ZMod.Basic

/-!
# Degree-sum formula and handshaking lemma
Expand Down
11 changes: 11 additions & 0 deletions Mathlib/Data/ZMod/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,17 @@ theorem eq_iff_modEq_nat (n : ℕ) {a b : ℕ} : (a : ZMod n) = b ↔ a ≡ b [M
· rw [Fin.ext_iff, Nat.ModEq, ← val_natCast, ← val_natCast]
exact Iff.rfl

theorem eq_zero_iff_even {n : ℕ} : (n : ZMod 2) = 0 ↔ Even n :=
(CharP.cast_eq_zero_iff (ZMod 2) 2 n).trans even_iff_two_dvd.symm

theorem eq_one_iff_odd {n : ℕ} : (n : ZMod 2) = 1 ↔ Odd n := by
rw [← @Nat.cast_one (ZMod 2), ZMod.eq_iff_modEq_nat, Nat.odd_iff, Nat.ModEq]

theorem ne_zero_iff_odd {n : ℕ} : (n : ZMod 2) ≠ 0 ↔ Odd n := by
constructor <;>
· contrapose
simp [eq_zero_iff_even]

theorem coe_mul_inv_eq_one {n : ℕ} (x : ℕ) (h : Nat.Coprime x n) :
((x : ZMod n) * (x : ZMod n)⁻¹) = 1 := by
rw [Nat.Coprime, Nat.gcd_comm, Nat.gcd_rec] at h
Expand Down
33 changes: 0 additions & 33 deletions Mathlib/Data/ZMod/Parity.lean

This file was deleted.

1 change: 0 additions & 1 deletion Mathlib/GroupTheory/Coxeter/Inversion.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mitchell Lee
-/
import Mathlib.GroupTheory.Coxeter.Length
import Mathlib.Data.ZMod.Parity
import Mathlib.Data.List.GetD

/-!
Expand Down

0 comments on commit 07a4873

Please sign in to comment.