math / data /lean /OAI /NumberTheory /PiExponent /LocalAlgebra /GenericCombination.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
2.54 kB
import Mathlib.Algebra.Module.Submodule.RestrictScalars
import Mathlib.Algebra.Module.Submodule.Union
import Mathlib.LinearAlgebra.Finsupp.LinearCombination
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.RingTheory.Ideal.Span
namespace OAI
namespace PiExponentSiegel.W20
variable {K M I J : Type*} [Field K] [Infinite K]
[AddCommGroup M] [Module K M] [Finite I]
theorem exists_linearCombination_avoiding_submodules
(g : J β†’ M) (P : I β†’ Submodule K M)
(h : βˆ€ i, Β¬ Submodule.span K (Set.range g) ≀ P i) :
βˆƒ c : J β†’β‚€ K, βˆ€ i, Finsupp.linearCombination K g c βˆ‰ P i := by
let bad : I β†’ Submodule K (J β†’β‚€ K) :=
fun i => (P i).comap (Finsupp.linearCombination K g)
have hbad : βˆ€ i, bad i β‰  ⊀ := by
intro i hi
apply h i
apply Submodule.span_le.mpr
rintro _ ⟨j, rfl⟩
have hc : Finsupp.single j (1 : K) ∈ bad i := by
rw [hi]
trivial
change Finsupp.linearCombination K g (Finsupp.single j 1) ∈ P i at hc
simpa using hc
obtain ⟨c, hc⟩ := Submodule.exists_forall_notMem_of_forall_ne_top bad hbad
exact ⟨c, hc⟩
variable {R : Type*} [CommRing R] [Algebra K R]
theorem exists_linearCombination_avoiding_ideals
(g : J β†’ R) (P : I β†’ Ideal R)
(h : βˆ€ i, Β¬ Ideal.span (Set.range g) ≀ P i) :
βˆƒ c : J β†’β‚€ K, βˆ€ i, Finsupp.linearCombination K g c βˆ‰ P i := by
apply exists_linearCombination_avoiding_submodules g
(fun i => (P i).restrictScalars K)
intro i hi
apply h i
apply Ideal.span_le.mpr
intro x hx
exact hi (Submodule.subset_span hx)
theorem exists_span_element_avoiding_ideals
(g : J β†’ R) (P : I β†’ Ideal R)
(h : βˆ€ i, Β¬ Ideal.span (Set.range g) ≀ P i) :
βˆƒ x ∈ Submodule.span K (Set.range g), βˆ€ i, x βˆ‰ P i := by
obtain ⟨c, hc⟩ := exists_linearCombination_avoiding_ideals (K := K) g P h
refine ⟨Finsupp.linearCombination K g c, ?_, hc⟩
rw [← Finsupp.range_linearCombination]
exact ⟨c, rfl⟩
theorem exists_linearCombination_avoiding_primes_below_radical
(g : J β†’ R) (m : Ideal R)
(hgen : (Ideal.span (Set.range g)).radical = m)
(P : I β†’ Ideal R) (hprime : βˆ€ i, (P i).IsPrime)
(hbelow : βˆ€ i, P i < m) :
βˆƒ c : J β†’β‚€ K, βˆ€ i, Finsupp.linearCombination K g c βˆ‰ P i := by
apply exists_linearCombination_avoiding_ideals g P
intro i hle
have hmle : m ≀ P i := by
rw [← hgen]
exact (hprime i).radical_le_iff.mpr hle
exact (not_le_of_gt (hbelow i)) hmle
end PiExponentSiegel.W20
end OAI