import OAI.RepresentationTheory.Weil.AdelicSplitting.FinitePositionInsert import OAI.RepresentationTheory.Weil.AdelicSplitting.LocalCompact /-! # Finite Test Support -/ namespace OAI.RepresentationTheory.Weil.AdelicSplitting noncomputable section /-! The finite function of a restricted Bruhat family has compact support. A single nonzero algebraic integer clears all exceptional local supports. -/ open scoped Classical _root_.NumberField open IsDedekindDomain IsDedekindDomain.HeightOneSpectrum Filter variable (F : Type) [Field F] [NumberField F] (N : โ„•) theorem RestrictedTestFamilies.Construction.RestrictedTestFamily.finiteValue_denominator (f : RestrictedTestFamilies.Construction.RestrictedTestFamily F N) : โˆƒ r : ๐“ž F, r โ‰  0 โˆง โˆ€ a : Fin N โ†’ ArchimedeanAdeles.Construction.FiniteAdeles F, f.finiteValue F N a โ‰  0 โ†’ โˆ€ i, algebraMap (๐“ž F) (ArchimedeanAdeles.Construction.FiniteAdeles F) r * a i โˆˆ IntegralAdeles.Construction.finiteIntegralRing F := by have hlocal (v : HeightOneSpectrum (๐“ž F)) : IsCompact (tsupport (f (.inr v)).val) := (NonarchimedeanIntertwiner.LocalAnalysis.schwartzBruhat_totallyDisconnected_iff.mp (f (.inr v)).property).2 choose d hd hb using fun v => LocalCompact.Construction.compact_local_integer_denominator F v N _ (hlocal v) have hs := eventually_cofinite.mp f.unramified let s := hs.toFinset let r : ๐“ž F := โˆ v โˆˆ s, d v refine โŸจr, Finset.prod_ne_zero_iff.mpr (fun v _ => hd v), fun a ha i v => ?_โŸฉ have hnz (w : HeightOneSpectrum (๐“ž F)) : (f (.inr w)).val (fun j => a j w) โ‰  0 := by intro hw exact ha (tprod_of_exists_eq_zero โŸจw, hwโŸฉ) change algebraMap (๐“ž F) (v.adicCompletion F) r * a i v โˆˆ v.adicCompletionIntegers F by_cases hv : v โˆˆ s ยท have hbound := hb v (subset_tsupport _ (hnz v)) have hdv : d v โˆฃ r := Finset.dvd_prod_of_mem d hv exact LocalCompact.Construction.localIntegerPositionBox_mono F v N hdv hbound i ยท have hf : f (.inr v) = Vacuum.Construction.finiteVacuum F N v := by simpa [s] using hv have hint : โˆ€ j, a j v โˆˆ v.adicCompletionIntegers F := by by_contra hh apply hnz v rw [hf] exact FinitePositionInsert.Construction.finiteVacuum_eq_zero_of_not_integral F N v _ hh exact (v.adicCompletionIntegers F).toSubring.mul_mem (coe_mem_adicCompletionIntegers (K := F) v r) (hint i) theorem RestrictedTestFamilies.Construction.RestrictedTestFamily.finiteValue_compactSupport (f : RestrictedTestFamilies.Construction.RestrictedTestFamily F N) : HasCompactSupport (f.finiteValue F N) := by obtain โŸจr, hr, hbโŸฉ := f.finiteValue_denominator F N let q := algebraMap (๐“ž F) F r have hq : q โ‰  0 := (map_ne_zero_iff _ (IsFractionRing.injective (๐“ž F) F)).mpr hr apply HasCompactSupport.intro (FiniteLattices.Construction.finiteAdelicPositionLattice_isCompact qโปยน (inv_ne_zero hq)) intro a ha by_contra hnz apply ha apply (FiniteLattices.Construction.finiteAdelicPositionLattice_mem_iff qโปยน (inv_ne_zero hq) a).mpr intro i have hh := hb a hnz i change algebraMap F (ArchimedeanAdeles.Construction.FiniteAdeles F) (qโปยน)โปยน * a i โˆˆ IntegralAdeles.Construction.finiteIntegralRing F rw [inv_inv] simpa only [q, IsScalarTower.algebraMap_apply] using! hh end end OAI.RepresentationTheory.Weil.AdelicSplitting