Skip to content

Commit

Permalink
feat(Algebra/CharP/IntermediateField): characteristic of intermediate…
Browse files Browse the repository at this point in the history
… fields (leanprover-community#10839)

Add some convenient instances for determining the characteristic of intermediate fields, similar to `SubsemiringClass.instCharZero`.
  • Loading branch information
acmepjz committed Feb 22, 2024
1 parent 1e5697b commit 965479b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ import Mathlib.Algebra.CharP.Algebra
import Mathlib.Algebra.CharP.Basic
import Mathlib.Algebra.CharP.CharAndCard
import Mathlib.Algebra.CharP.ExpChar
import Mathlib.Algebra.CharP.IntermediateField
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.Algebra.CharP.MixedCharZero
Expand Down
48 changes: 48 additions & 0 deletions Mathlib/Algebra/CharP/IntermediateField.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/-
Copyright (c) 2024 Jz Pan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jz Pan
-/
import Mathlib.FieldTheory.IntermediateField
import Mathlib.Algebra.CharP.ExpChar

/-!
# Characteristic of intermediate fields
This file contains some convenient instances for determining the characteristic of
intermediate fields. Some char zero instances are not provided, since they are already
covered by `SubsemiringClass.instCharZero`.
-/

variable {F E : Type*} [Field F] [Field E] [Algebra F E]

namespace Subfield

variable (L : Subfield F) (p : ℕ)

instance charP [CharP F p] : CharP L p := RingHom.charP _ (algebraMap _ F).injective p

instance expChar [ExpChar F p] : ExpChar L p := RingHom.expChar _ (algebraMap _ F).injective p

end Subfield

namespace IntermediateField

variable (L : IntermediateField F E) (p : ℕ)

instance charZero [CharZero F] : CharZero L :=
charZero_of_injective_algebraMap (algebraMap F _).injective

instance charP [CharP F p] : CharP L p :=
charP_of_injective_algebraMap (algebraMap F _).injective p

instance expChar [ExpChar F p] : ExpChar L p :=
expChar_of_injective_algebraMap (algebraMap F _).injective p

instance charP' [CharP E p] : CharP L p := Subfield.charP L.toSubfield p

instance expChar' [ExpChar E p] : ExpChar L p := Subfield.expChar L.toSubfield p

end IntermediateField

0 comments on commit 965479b

Please sign in to comment.