Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(field_theory): finite fields exist (#8692)
Co-authored-by: Alex J. Best <alex.j.best@gmail.com> Co-authored-by: Aaron Anderson <awainverse@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
- Loading branch information
1 parent
f72126b
commit 897e4ed
Showing
11 changed files
with
343 additions
and
8 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
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,43 @@ | ||
/- | ||
Copyright (c) 2021 Johan Commelin. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Johan Commelin | ||
-/ | ||
|
||
import data.zmod.basic | ||
import algebra.algebra.basic | ||
|
||
/-! | ||
# The `zmod n`-algebra structure on rings whose characteristic divides `n` | ||
-/ | ||
|
||
namespace zmod | ||
|
||
variables (R : Type*) [ring R] | ||
|
||
section | ||
variables {n : ℕ} (m : ℕ) [char_p R m] | ||
|
||
/-- The `zmod n`-algebra structure on rings whose characteristic `m` divides `n` -/ | ||
def algebra' (h : m ∣ n) : algebra (zmod n) R := | ||
{ smul := λ a r, a * r, | ||
commutes' := λ a r, show (a * r : R) = r * a, | ||
begin | ||
rcases zmod.int_cast_surjective a with ⟨k, rfl⟩, | ||
show zmod.cast_hom h R k * r = r * zmod.cast_hom h R k, | ||
rw ring_hom.map_int_cast, | ||
exact commute.cast_int_left r k, | ||
end, | ||
smul_def' := λ a r, rfl, | ||
.. zmod.cast_hom h R } | ||
|
||
end | ||
|
||
section | ||
variables (n : ℕ) [char_p R n] | ||
|
||
instance : algebra (zmod n) R := algebra' R n (dvd_refl n) | ||
|
||
end | ||
|
||
end zmod |
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
Oops, something went wrong.