Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ring of integers of a number field K is free of dimension [K : ℚ] / develop the theory of lattices #18150

Closed
riccardobrasca opened this issue Jan 12, 2023 · 3 comments
Assignees
Labels
feature-request This issue is a feature request, either for mathematics, tactics, or CI good-first-project t-algebra Algebra (groups, rings, fields etc) t-number-theory Number theory (also use t-algebra or t-analysis to specialize)

Comments

@riccardobrasca
Copy link
Member

riccardobrasca commented Jan 12, 2023

We are absolutely ready to prove this. For example the fact that 𝓞 K is free over is very easy

instance {K : Type*} [field K] [number_field K] : module.free ℤ (𝓞 K) :=
begin
  have basis : Σ n, basis (fin n) ℤ (𝓞 K) := module.free_of_finite_type_torsion_free',
  obtain ⟨n, b⟩ := basis,
  exact module.free.of_basis b
end

But the correct thing to do is to develop the theory of lattices, proving that a -basis gives also a -basis. Note that we have basis.localization, but this is the wrong statement, since it take a -basis of M and produces a -basis of M (in practice it only applies in trivial cases).

A sketch would be something like (of course one should not use tactic mode for the whole definition)

def foo {I K : Type*} [field K] [number_field K] (b : basis I ℤ (𝓞 K)) : basis I ℚ K :=
begin
  let b' : I → K := λ i, b i,
  have hb'li : linear_independent ℚ b',
  { rw [← linear_independent.iff_fraction_ring ℤ ℚ, linear_independent_iff'],
    intros s f H i hi,
    refine linear_independent_iff'.1 b.linear_independent s f ((𝓞 K).coe_eq_zero.1 _) i hi,
    convert H,
    simp only [zsmul_eq_mul, add_submonoid_class.coe_finset_sum, mul_mem_class.coe_mul,
      subring_class.coe_int_cast],
    apply_instance },
  refine basis.mk hb'li (λ x hx, _),
  obtain ⟨n, hn⟩ := (is_separable.is_integral ℚ x).exists_multiple_integral_of_is_localization
      (non_zero_divisors ℤ) x,
      sorry
end

See this comment for a nice application.

@riccardobrasca riccardobrasca added feature-request This issue is a feature request, either for mathematics, tactics, or CI good-first-project t-algebra Algebra (groups, rings, fields etc) t-number-theory Number theory (also use t-algebra or t-analysis to specialize) labels Jan 12, 2023
@riccardobrasca riccardobrasca added this to To do in Basic arithmetic of number fields via automation Jan 12, 2023
@Vierkantor
Copy link
Collaborator

I have the following result on my ideal-span-norm branch:

noncomputable def basis.localization_localization {R S : Type*} [comm_ring R] [comm_ring S]
  [algebra R S] {ι : Type*} [fintype ι] (b : basis ι R S)
  (M : submonoid R) (Rₘ Sₘ : Type*)
  [comm_ring Rₘ] [algebra R Rₘ] [comm_ring Sₘ] [algebra S Sₘ]
  [algebra Rₘ Sₘ] [algebra R Sₘ] [is_scalar_tower R Rₘ Sₘ] [is_scalar_tower R S Sₘ]
  [is_localization M Rₘ] [is_localization (M.map (algebra_map R S)) Sₘ]
  (hM : submonoid.map (algebra_map R S) M ≤ S ⁰) :
  basis ι Rₘ Sₘ :=

That is what we're looking for, right?

@riccardobrasca
Copy link
Member Author

riccardobrasca commented Jan 23, 2023

I have the following result on my ideal-span-norm branch:

noncomputable def basis.localization_localization {R S : Type*} [comm_ring R] [comm_ring S]
  [algebra R S] {ι : Type*} [fintype ι] (b : basis ι R S)
  (M : submonoid R) (Rₘ Sₘ : Type*)
  [comm_ring Rₘ] [algebra R Rₘ] [comm_ring Sₘ] [algebra S Sₘ]
  [algebra Rₘ Sₘ] [algebra R Sₘ] [is_scalar_tower R Rₘ Sₘ] [is_scalar_tower R S Sₘ]
  [is_localization M Rₘ] [is_localization (M.map (algebra_map R S)) Sₘ]
  (hM : submonoid.map (algebra_map R S) M ≤ S ⁰) :
  basis ι Rₘ Sₘ :=

That is what we're looking for, right?

Yes! This should replace basis.localization, whose assumptions essentially never apply (we take a -basis of a -vector space).

Vierkantor added a commit that referenced this issue Jan 23, 2023
This PR adds `basis.localization_localization`, which maps `basis ι R S` to `basis ι Rm Sm`, where `Rm` and `Sm` are the localizations of `R` and `S` at `m`. This differs from the existing `basis.localization` by localizing in two places at once.

See also: #18150
@Vierkantor
Copy link
Collaborator

I PR'd the result above in #18261.

bors bot pushed a commit that referenced this issue Jan 24, 2023
This PR replaces `basis.localization` with `basis.localization_localization`, which maps `basis ι R S` to `basis ι Rm Sm`, where `Rm` and `Sm` are the localizations of `R` and `S` at `m`. This differs from the existing `basis.localization` by localizing in two places at once, since localizing only the coefficients is probably not useful.

See also: #18150



Co-authored-by: Vierkantor <vierkantor@vierkantor.com>
@riccardobrasca riccardobrasca moved this from To do to In progress in Basic arithmetic of number fields Feb 24, 2023
@xroblot xroblot closed this as completed Mar 4, 2023
Basic arithmetic of number fields automation moved this from In progress to Done Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue is a feature request, either for mathematics, tactics, or CI good-first-project t-algebra Algebra (groups, rings, fields etc) t-number-theory Number theory (also use t-algebra or t-analysis to specialize)
3 participants