Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
- Loading branch information
1 parent
544bdac
commit f6c95f5
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/- | ||
Copyright (c) 2022 Alex J. Best. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Alex J. Best | ||
! This file was ported from Lean 3 source module ring_theory.zmod | ||
! leanprover-community/mathlib commit 00d163e35035c3577c1c79fa53b68de17781ffc1 | ||
! Please do not edit these lines, except to modify the commit id | ||
! if you have ported upstream changes. | ||
-/ | ||
import Mathlib.Algebra.Squarefree | ||
import Mathlib.Data.ZMod.Basic | ||
import Mathlib.RingTheory.Int.Basic | ||
|
||
/-! | ||
# Ring theoretic facts about `ZMod n` | ||
We collect a few facts about `ZMod n` that need some ring theory to be proved/stated | ||
## Main statements | ||
* `isReduced_zmod` - `ZMod n` is reduced for all squarefree `n`. | ||
-/ | ||
|
||
|
||
@[simp] | ||
theorem isReduced_zmod {n : ℕ} : IsReduced (ZMod n) ↔ Squarefree n ∨ n = 0 := by | ||
rw [← RingHom.ker_isRadical_iff_reduced_of_surjective | ||
(ZMod.ringHom_surjective <| Int.castRingHom <| ZMod n), | ||
ZMod.ker_int_castRingHom, ← isRadical_iff_span_singleton, isRadical_iff_squarefree_or_zero, | ||
Int.squarefree_coe_nat, Nat.cast_eq_zero] | ||
#align is_reduced_zmod isReduced_zmod | ||
|
||
instance {n : ℕ} [Fact <| Squarefree n] : IsReduced (ZMod n) := | ||
isReduced_zmod.2 <| Or.inl <| Fact.out |