import OAI.NumberTheory.PadicHodge.IntegralComparison.Frobenius.Geometry /-! # Fixed Points -/ namespace OAI.NumberTheory.PadicHodge.IntegralComparison.Affine.FixedPoints noncomputable section /-! # IntegralComparison: the affine Frobenius fixed locus For a finite-type algebra R over a finite field k, the fixed locus of q-power Frobenius is defined by the actual ideal generated by r^q - r. Its coordinate ring is finite over k and étale. The vanishing of its Kähler differentials supplies the infinitesimal fixed-point calculation; no cohomological trace formula is asserted here. -/ open _root_.Polynomial universe u v variable (k : Type u) [Field k] [Fintype k] variable (R : Type v) [CommRing R] [Algebra k R] /-- The equations of the scheme-theoretic q-Frobenius fixed locus. -/ def fixedIdeal : Ideal R := Ideal.span (Set.range fun r : R => r ^ Fintype.card k - r) /-- The coordinate ring of the affine fixed locus. -/ abbrev FixedAlgebra := R ⧸ fixedIdeal k R omit [Field k] [Algebra k R] in lemma pow_card_eq (x : FixedAlgebra k R) : x ^ Fintype.card k = x := by obtain ⟨r, rfl⟩ := Ideal.Quotient.mk_surjective x apply sub_eq_zero.mp rw [← map_pow, ← map_sub, Ideal.Quotient.eq_zero_iff_mem] exact Ideal.subset_span ⟨r, rfl⟩ /-- The quotient map equalizes q-Frobenius and the identity. -/ lemma quotient_equalizes : (Ideal.Quotient.mkₐ k (fixedIdeal k R)).comp (FiniteField.frobeniusAlgHom k R) = Ideal.Quotient.mkₐ k (fixedIdeal k R) := by ext r change Ideal.Quotient.mk _ (r ^ Fintype.card k) = Ideal.Quotient.mk _ r rw [map_pow, pow_card_eq] variable {k R} /-- The universal property of the fixed-locus equations, for all target algebras. -/ lemma kills_fixedIdeal_iff {S : Type*} [CommRing S] [Algebra k S] (x : R →ₐ[k] S) : fixedIdeal k R ≤ RingHom.ker x ↔ x.comp (FiniteField.frobeniusAlgHom k R) = x := by rw [fixedIdeal, Ideal.span_le] constructor · intro h ext r exact sub_eq_zero.mp (by simpa using h ⟨r, rfl⟩) · intro h s hs obtain ⟨r, rfl⟩ := hs change x (r ^ Fintype.card k - r) = 0 rw [map_sub] exact sub_eq_zero.mpr (AlgHom.congr_fun h r) /-- Maps out of the fixed locus are precisely the maps fixed by Frobenius. -/ def fixedPointEquiv (S : Type*) [CommRing S] [Algebra k S] : (FixedAlgebra k R →ₐ[k] S) ≃ {x : R →ₐ[k] S // x.comp (FiniteField.frobeniusAlgHom k R) = x} where toFun y := ⟨y.comp (Ideal.Quotient.mkₐ k (fixedIdeal k R)), by rw [AlgHom.comp_assoc, quotient_equalizes]⟩ invFun x := Ideal.Quotient.liftₐ (fixedIdeal k R) x.val ((kills_fixedIdeal_iff x.val).mpr x.property) left_inv y := by ext r obtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective r rfl right_inv x := by apply Subtype.ext; rfl variable (k R) /-- Every element of the fixed-locus algebra is integral over k, since it is annihilated by the monic polynomial X^q - X. -/ instance fixedAlgebraIntegral : Algebra.IsIntegral k (FixedAlgebra k R) where isIntegral x := by refine ⟨X ^ Fintype.card k - X, monic_X_pow_sub ?_, ?_⟩ · rw [degree_X] exact_mod_cast Fintype.one_lt_card (α := k) · simpa only [eval₂_sub, eval₂_pow, eval₂_X, sub_eq_zero] using pow_card_eq k R x /-- A finite-type affine scheme has a finite Frobenius fixed locus. -/ instance fixedAlgebraFinite [Algebra.FiniteType k R] : Module.Finite k (FixedAlgebra k R) := Algebra.IsIntegral.finite /-- The differential of every q-th power vanishes over the finite base field. -/ lemma differential_pow_card (r : R) : KaehlerDifferential.D k R (r ^ Fintype.card k) = 0 := by rw [Derivation.leibniz_pow, ← Nat.cast_smul_eq_nsmul k, FiniteField.cast_card_eq_zero, zero_smul] /-- The fixed-locus equations have no nonzero infinitesimal differentials. -/ instance fixedAlgebraDifferentials : Subsingleton (KaehlerDifferential k (FixedAlgebra k R)) := by suffices (⊤ : Submodule (FixedAlgebra k R) (KaehlerDifferential k (FixedAlgebra k R))) ≤ ⊥ from (subsingleton_iff_forall_eq 0).mpr fun y => this trivial rw [← KaehlerDifferential.span_range_derivation, Submodule.span_le] rintro _ ⟨x, rfl⟩ change KaehlerDifferential.D k (FixedAlgebra k R) x = 0 rw [← pow_card_eq k R x] exact differential_pow_card k (FixedAlgebra k R) x instance fixedAlgebraFormallyUnramified : Algebra.FormallyUnramified k (FixedAlgebra k R) := ⟨inferInstance⟩ /-- The finite-type Frobenius fixed locus is étale over k. -/ instance fixedAlgebraEtale [Algebra.FiniteType k R] : Algebra.Etale k (FixedAlgebra k R) where formallyEtale := Algebra.FormallyEtale.of_formallyUnramified_of_field k (FixedAlgebra k R) finitePresentation := Algebra.FinitePresentation.of_finiteType.mp inferInstance /-- In particular there are no nilpotent contributions at fixed points. -/ instance fixedAlgebraReduced [Algebra.FiniteType k R] : IsReduced (FixedAlgebra k R) := Algebra.FormallyUnramified.isReduced_of_field k (FixedAlgebra k R) instance fixedAlgebraArtinian [Algebra.FiniteType k R] : IsArtinianRing (FixedAlgebra k R) := .of_finite k (FixedAlgebra k R) /-- Every residue field of the fixed locus is the base field itself. -/ def residueFieldEquiv (m : MaximalSpectrum (FixedAlgebra k R)) : (FixedAlgebra k R ⧸ m.asIdeal) ≃ₐ[k] k := by letI : Field (FixedAlgebra k R ⧸ m.asIdeal) := Ideal.Quotient.field m.asIdeal refine (AlgEquiv.ofBijective (Algebra.ofId k (FixedAlgebra k R ⧸ m.asIdeal)) ⟨(algebraMap k _).injective, ?_⟩).symm intro z apply (Frobenius.Geometry.fixed_by_card_power_iff k _ z).mp obtain ⟨x, rfl⟩ := Ideal.Quotient.mk_surjective z rw [← map_pow, pow_card_eq] /-- The fixed-locus algebra is a finite product of copies of k. Thus each geometric fixed point contributes one to the length of this locus. -/ def fixedAlgebraProduct [Algebra.FiniteType k R] : FixedAlgebra k R ≃ₐ[k] (MaximalSpectrum (FixedAlgebra k R) → k) := ((IsArtinianRing.equivPi (FixedAlgebra k R)).restrictScalars k).trans (AlgEquiv.piCongrRight (residueFieldEquiv k R)) instance fixedAlgebraSplit [Algebra.FiniteType k R] : Algebra.IsFiniteSplit k (FixedAlgebra k R) := .of_algEquiv (fixedAlgebraProduct k R).symm /-- All k-rational points factor uniquely through the fixed locus. -/ def rationalPointEquiv : (FixedAlgebra k R →ₐ[k] k) ≃ (R →ₐ[k] k) := (fixedPointEquiv (k := k) (R := R) k).trans { toFun := Subtype.val invFun := fun x => ⟨x, by ext r change x (r ^ Fintype.card k) = x r rw [map_pow, FiniteField.pow_card]⟩ left_inv := fun _ => rfl right_inv := fun _ => rfl } /-- Points of the fixed locus agree with the rational points of Spec R. -/ def rationalPointMaximalEquiv [Algebra.FiniteType k R] : (R →ₐ[k] k) ≃ MaximalSpectrum (FixedAlgebra k R) := (rationalPointEquiv k R).symm.trans ((Algebra.IsFiniteSplit.algHomEquivPrimeSpectrum k (FixedAlgebra k R)).trans { toFun := fun x => ⟨x.asIdeal, inferInstance⟩ invFun := MaximalSpectrum.toPrimeSpectrum left_inv := fun _ => rfl right_inv := fun _ => rfl }) /-- The length of the fixed locus is its number of distinct points. -/ lemma fixedAlgebra_finrank [Algebra.FiniteType k R] : Module.finrank k (FixedAlgebra k R) = Nat.card (MaximalSpectrum (FixedAlgebra k R)) := by let := Fintype.ofFinite (MaximalSpectrum (FixedAlgebra k R)) rw [(fixedAlgebraProduct k R).toLinearEquiv.finrank_eq, Module.finrank_pi] simp [Nat.card_eq_fintype_card] /-- The length of the Frobenius fixed locus counts the rational points. -/ lemma fixedAlgebra_finrank_eq_rationalPointCount [Algebra.FiniteType k R] : Module.finrank k (FixedAlgebra k R) = Nat.card (R →ₐ[k] k) := by rw [fixedAlgebra_finrank, Nat.card_congr (rationalPointMaximalEquiv k R)] end end OAI.NumberTheory.PadicHodge.IntegralComparison.Affine.FixedPoints