Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
Zhangir Azerbayev
squashed?
4365a98
raw
history blame
30.5 kB
/-
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Buzzard, Johan Commelin, Patrick Massot
-/
import algebra.order.with_zero
import algebra.punit_instances
import ring_theory.ideal.operations
/-!
# The basics of valuation theory.
The basic theory of valuations (non-archimedean norms) on a commutative ring,
following T. Wedhorn's unpublished notes β€œAdic Spaces” ([wedhorn_adic]).
The definition of a valuation we use here is Definition 1.22 of [wedhorn_adic].
A valuation on a ring `R` is a monoid homomorphism `v` to a linearly ordered
commutative monoid with zero, that in addition satisfies the following two axioms:
* `v 0 = 0`
* `βˆ€ x y, v (x + y) ≀ max (v x) (v y)`
`valuation R Ξ“β‚€`is the type of valuations `R β†’ Ξ“β‚€`, with a coercion to the underlying
function. If `v` is a valuation from `R` to `Ξ“β‚€` then the induced group
homomorphism `units(R) β†’ Ξ“β‚€` is called `unit_map v`.
The equivalence "relation" `is_equiv v₁ vβ‚‚ : Prop` defined in 1.27 of [wedhorn_adic] is not strictly
speaking a relation, because `v₁ : valuation R Γ₁` and `vβ‚‚ : valuation R Ξ“β‚‚` might
not have the same type. This corresponds in ZFC to the set-theoretic difficulty
that the class of all valuations (as `Ξ“β‚€` varies) on a ring `R` is not a set.
The "relation" is however reflexive, symmetric and transitive in the obvious
sense. Note that we use 1.27(iii) of [wedhorn_adic] as the definition of equivalence.
The support of a valuation `v : valuation R Ξ“β‚€` is `supp v`. If `J` is an ideal of `R`
with `h : J βŠ† supp v` then the induced valuation
on R / J = `ideal.quotient J` is `on_quot v h`.
## Main definitions
* `valuation R Ξ“β‚€`, the type of valuations on `R` with values in `Ξ“β‚€`
* `valuation.is_equiv`, the heterogeneous equivalence relation on valuations
* `valuation.supp`, the support of a valuation
* `add_valuation R Ξ“β‚€`, the type of additive valuations on `R` with values in a
linearly ordered additive commutative group with a top element, `Ξ“β‚€`.
## Implementation Details
`add_valuation R Ξ“β‚€` is implemented as `valuation R (multiplicative Ξ“β‚€)α΅’α΅ˆ`.
## Notation
In the `discrete_valuation` locale:
* `β„•β‚˜β‚€` is a shorthand for `with_zero (multiplicative β„•)`
* `β„€β‚˜β‚€` is a shorthand for `with_zero (multiplicative β„€)`
## TODO
If ever someone extends `valuation`, we should fully comply to the `fun_like` by migrating the
boilerplate lemmas to `valuation_class`.
-/
open_locale classical big_operators
noncomputable theory
open function ideal
variables {K F R : Type*} [division_ring K]
section
variables (F R) (Ξ“β‚€ : Type*) [linear_ordered_comm_monoid_with_zero Ξ“β‚€] [ring R]
/-- The type of `Ξ“β‚€`-valued valuations on `R`.
When you extend this structure, make sure to extend `valuation_class`. -/
@[nolint has_inhabited_instance]
structure valuation extends R β†’*β‚€ Ξ“β‚€ :=
(map_add_le_max' : βˆ€ x y, to_fun (x + y) ≀ max (to_fun x) (to_fun y))
/-- `valuation_class F Ξ± Ξ²` states that `F` is a type of valuations.
You should also extend this typeclass when you extend `valuation`. -/
class valuation_class extends monoid_with_zero_hom_class F R Ξ“β‚€ :=
(map_add_le_max (f : F) (x y : R) : f (x + y) ≀ max (f x) (f y))
export valuation_class (map_add_le_max)
instance [valuation_class F R Ξ“β‚€] : has_coe_t F (valuation R Ξ“β‚€) :=
⟨λ f, { to_fun := f, map_one' := map_one f, map_zero' := map_zero f, map_mul' := map_mul f,
map_add_le_max' := map_add_le_max f }⟩
end
namespace valuation
variables {Ξ“β‚€ : Type*}
variables {Ξ“'β‚€ : Type*}
variables {Ξ“''β‚€ : Type*} [linear_ordered_comm_monoid_with_zero Ξ“''β‚€]
section basic
variables [ring R]
section monoid
variables [linear_ordered_comm_monoid_with_zero Ξ“β‚€] [linear_ordered_comm_monoid_with_zero Ξ“'β‚€]
instance : valuation_class (valuation R Ξ“β‚€) R Ξ“β‚€ :=
{ coe := Ξ» f, f.to_fun,
coe_injective' := λ f g h, by { obtain ⟨⟨_, _⟩, _⟩ := f, obtain ⟨⟨_, _⟩, _⟩ := g, congr' },
map_mul := Ξ» f, f.map_mul',
map_one := Ξ» f, f.map_one',
map_zero := Ξ» f, f.map_zero',
map_add_le_max := Ξ» f, f.map_add_le_max' }
/-- Helper instance for when there's too many metavariables to apply `fun_like.has_coe_to_fun`
directly. -/
instance : has_coe_to_fun (valuation R Ξ“β‚€) (Ξ» _, R β†’ Ξ“β‚€) := fun_like.has_coe_to_fun
@[simp] lemma to_fun_eq_coe (v : valuation R Ξ“β‚€) : v.to_fun = v := rfl
@[ext] lemma ext {v₁ vβ‚‚ : valuation R Ξ“β‚€} (h : βˆ€ r, v₁ r = vβ‚‚ r) : v₁ = vβ‚‚ := fun_like.ext _ _ h
variables (v : valuation R Ξ“β‚€) {x y z : R}
@[simp, norm_cast] lemma coe_coe : ⇑(v : R β†’*β‚€ Ξ“β‚€) = v := rfl
@[simp] lemma map_zero : v 0 = 0 := v.map_zero'
@[simp] lemma map_one : v 1 = 1 := v.map_one'
@[simp] lemma map_mul : βˆ€ x y, v (x * y) = v x * v y := v.map_mul'
@[simp] lemma map_add : βˆ€ x y, v (x + y) ≀ max (v x) (v y) := v.map_add_le_max'
lemma map_add_le {x y g} (hx : v x ≀ g) (hy : v y ≀ g) : v (x + y) ≀ g :=
le_trans (v.map_add x y) $ max_le hx hy
lemma map_add_lt {x y g} (hx : v x < g) (hy : v y < g) : v (x + y) < g :=
lt_of_le_of_lt (v.map_add x y) $ max_lt hx hy
lemma map_sum_le {ΞΉ : Type*} {s : finset ΞΉ} {f : ΞΉ β†’ R} {g : Ξ“β‚€} (hf : βˆ€ i ∈ s, v (f i) ≀ g) :
v (βˆ‘ i in s, f i) ≀ g :=
begin
refine finset.induction_on s
(Ξ» _, trans_rel_right (≀) v.map_zero zero_le') (Ξ» a s has ih hf, _) hf,
rw finset.forall_mem_insert at hf, rw finset.sum_insert has,
exact v.map_add_le hf.1 (ih hf.2)
end
lemma map_sum_lt {ΞΉ : Type*} {s : finset ΞΉ} {f : ΞΉ β†’ R} {g : Ξ“β‚€} (hg : g β‰  0)
(hf : βˆ€ i ∈ s, v (f i) < g) : v (βˆ‘ i in s, f i) < g :=
begin
refine finset.induction_on s
(Ξ» _, trans_rel_right (<) v.map_zero (zero_lt_iff.2 hg)) (Ξ» a s has ih hf, _) hf,
rw finset.forall_mem_insert at hf, rw finset.sum_insert has,
exact v.map_add_lt hf.1 (ih hf.2)
end
lemma map_sum_lt' {ΞΉ : Type*} {s : finset ΞΉ} {f : ΞΉ β†’ R} {g : Ξ“β‚€} (hg : 0 < g)
(hf : βˆ€ i ∈ s, v (f i) < g) : v (βˆ‘ i in s, f i) < g :=
v.map_sum_lt (ne_of_gt hg) hf
@[simp] lemma map_pow : βˆ€ x (n:β„•), v (x^n) = (v x)^n :=
v.to_monoid_with_zero_hom.to_monoid_hom.map_pow
/-- Deprecated. Use `fun_like.ext_iff`. -/
lemma ext_iff {v₁ vβ‚‚ : valuation R Ξ“β‚€} : v₁ = vβ‚‚ ↔ βˆ€ r, v₁ r = vβ‚‚ r := fun_like.ext_iff
-- The following definition is not an instance, because we have more than one `v` on a given `R`.
-- In addition, type class inference would not be able to infer `v`.
/-- A valuation gives a preorder on the underlying ring. -/
def to_preorder : preorder R := preorder.lift v
/-- If `v` is a valuation on a division ring then `v(x) = 0` iff `x = 0`. -/
@[simp] lemma zero_iff [nontrivial Ξ“β‚€] (v : valuation K Ξ“β‚€) {x : K} :
v x = 0 ↔ x = 0 :=
v.to_monoid_with_zero_hom.map_eq_zero
lemma ne_zero_iff [nontrivial Ξ“β‚€] (v : valuation K Ξ“β‚€) {x : K} :
v x β‰  0 ↔ x β‰  0 :=
v.to_monoid_with_zero_hom.map_ne_zero
theorem unit_map_eq (u : RΛ£) :
(units.map (v : R β†’* Ξ“β‚€) u : Ξ“β‚€) = v u := rfl
/-- A ring homomorphism `S β†’ R` induces a map `valuation R Ξ“β‚€ β†’ valuation S Ξ“β‚€`. -/
def comap {S : Type*} [ring S] (f : S β†’+* R) (v : valuation R Ξ“β‚€) :
valuation S Ξ“β‚€ :=
{ to_fun := v ∘ f,
map_add_le_max' := Ξ» x y, by simp only [comp_app, map_add, f.map_add],
.. v.to_monoid_with_zero_hom.comp f.to_monoid_with_zero_hom, }
@[simp]
lemma comap_apply {S : Type*} [ring S] (f : S β†’+* R) (v : valuation R Ξ“β‚€) (s : S) :
v.comap f s = v (f s) := rfl
@[simp] lemma comap_id : v.comap (ring_hom.id R) = v := ext $ Ξ» r, rfl
lemma comap_comp {S₁ : Type*} {Sβ‚‚ : Type*} [ring S₁] [ring Sβ‚‚] (f : S₁ β†’+* Sβ‚‚) (g : Sβ‚‚ β†’+* R) :
v.comap (g.comp f) = (v.comap g).comap f :=
ext $ Ξ» r, rfl
/-- A `≀`-preserving group homomorphism `Ξ“β‚€ β†’ Ξ“'β‚€` induces a map `valuation R Ξ“β‚€ β†’ valuation R Ξ“'β‚€`.
-/
def map (f : Ξ“β‚€ β†’*β‚€ Ξ“'β‚€) (hf : monotone f) (v : valuation R Ξ“β‚€) :
valuation R Ξ“'β‚€ :=
{ to_fun := f ∘ v,
map_add_le_max' := Ξ» r s,
calc f (v (r + s)) ≀ f (max (v r) (v s)) : hf (v.map_add r s)
... = max (f (v r)) (f (v s)) : hf.map_max,
.. monoid_with_zero_hom.comp f v.to_monoid_with_zero_hom }
/-- Two valuations on `R` are defined to be equivalent if they induce the same preorder on `R`. -/
def is_equiv (v₁ : valuation R Ξ“β‚€) (vβ‚‚ : valuation R Ξ“'β‚€) : Prop :=
βˆ€ r s, v₁ r ≀ v₁ s ↔ vβ‚‚ r ≀ vβ‚‚ s
end monoid
section group
variables [linear_ordered_comm_group_with_zero Ξ“β‚€] {R} {Ξ“β‚€} (v : valuation R Ξ“β‚€) {x y z : R}
@[simp] lemma map_inv (v : valuation K Ξ“β‚€) {x : K} :
v x⁻¹ = (v x)⁻¹ :=
v.to_monoid_with_zero_hom.map_inv x
@[simp] lemma map_zpow (v : valuation K Ξ“β‚€) {x : K} {n : β„€} :
v (x^n) = (v x)^n :=
v.to_monoid_with_zero_hom.map_zpow x n
lemma map_units_inv (x : Rˣ) : v (x⁻¹ : Rˣ) = (v x)⁻¹ :=
v.to_monoid_with_zero_hom.to_monoid_hom.map_units_inv x
@[simp] lemma map_neg (x : R) : v (-x) = v x :=
v.to_monoid_with_zero_hom.to_monoid_hom.map_neg x
lemma map_sub_swap (x y : R) : v (x - y) = v (y - x) :=
v.to_monoid_with_zero_hom.to_monoid_hom.map_sub_swap x y
lemma map_sub (x y : R) : v (x - y) ≀ max (v x) (v y) :=
calc v (x - y) = v (x + -y) : by rw [sub_eq_add_neg]
... ≀ max (v x) (v $ -y) : v.map_add _ _
... = max (v x) (v y) : by rw map_neg
lemma map_sub_le {x y g} (hx : v x ≀ g) (hy : v y ≀ g) : v (x - y) ≀ g :=
begin
rw sub_eq_add_neg,
exact v.map_add_le hx (le_trans (le_of_eq (v.map_neg y)) hy)
end
lemma map_add_of_distinct_val (h : v x β‰  v y) : v (x + y) = max (v x) (v y) :=
begin
suffices : Β¬v (x + y) < max (v x) (v y),
from or_iff_not_imp_right.1 (le_iff_eq_or_lt.1 (v.map_add x y)) this,
intro h',
wlog vyx : v y < v x using x y,
{ apply lt_or_gt_of_ne h.symm },
{ rw max_eq_left_of_lt vyx at h',
apply lt_irrefl (v x),
calc v x = v ((x+y) - y) : by simp
... ≀ max (v $ x + y) (v y) : map_sub _ _ _
... < v x : max_lt h' vyx },
{ apply this h.symm,
rwa [add_comm, max_comm] at h' }
end
lemma map_add_eq_of_lt_right (h : v x < v y) : v (x + y) = v y :=
begin
convert v.map_add_of_distinct_val _,
{ symmetry, rw max_eq_right_iff, exact le_of_lt h },
{ exact ne_of_lt h }
end
lemma map_add_eq_of_lt_left (h : v y < v x) : v (x + y) = v x :=
begin
rw add_comm, exact map_add_eq_of_lt_right _ h,
end
lemma map_eq_of_sub_lt (h : v (y - x) < v x) : v y = v x :=
begin
have := valuation.map_add_of_distinct_val v (ne_of_gt h).symm,
rw max_eq_right (le_of_lt h) at this,
simpa using this
end
lemma map_one_add_of_lt (h : v x < 1) : v (1 + x) = 1 :=
begin
rw ← v.map_one at h,
simpa only [v.map_one] using v.map_add_eq_of_lt_left h
end
lemma map_one_sub_of_lt (h : v x < 1) : v (1 - x) = 1 :=
begin
rw [← v.map_one, ← v.map_neg] at h,
rw sub_eq_add_neg 1 x,
simpa only [v.map_one, v.map_neg] using v.map_add_eq_of_lt_left h
end
lemma one_lt_val_iff (v : valuation K Ξ“β‚€) {x : K} (h : x β‰  0) :
1 < v x ↔ v x⁻¹ < 1 :=
by simpa using (inv_lt_invβ‚€ (v.ne_zero_iff.2 h) one_ne_zero).symm
/-- The subgroup of elements whose valuation is less than a certain unit.-/
def lt_add_subgroup (v : valuation R Ξ“β‚€) (Ξ³ : Ξ“β‚€Λ£) : add_subgroup R :=
{ carrier := {x | v x < Ξ³},
zero_mem' := by { have h := units.ne_zero Ξ³, contrapose! h, simpa using h },
add_mem' := Ξ» x y x_in y_in, lt_of_le_of_lt (v.map_add x y) (max_lt x_in y_in),
neg_mem' := Ξ» x x_in, by rwa [set.mem_set_of_eq, map_neg] }
end group
end basic -- end of section
namespace is_equiv
variables [ring R]
variables [linear_ordered_comm_monoid_with_zero Ξ“β‚€] [linear_ordered_comm_monoid_with_zero Ξ“'β‚€]
variables {v : valuation R Ξ“β‚€}
variables {v₁ : valuation R Ξ“β‚€} {vβ‚‚ : valuation R Ξ“'β‚€} {v₃ : valuation R Ξ“''β‚€}
@[refl] lemma refl : v.is_equiv v :=
Ξ» _ _, iff.refl _
@[symm] lemma symm (h : v₁.is_equiv vβ‚‚) : vβ‚‚.is_equiv v₁ :=
Ξ» _ _, iff.symm (h _ _)
@[trans] lemma trans (h₁₂ : v₁.is_equiv vβ‚‚) (h₂₃ : vβ‚‚.is_equiv v₃) : v₁.is_equiv v₃ :=
Ξ» _ _, iff.trans (h₁₂ _ _) (h₂₃ _ _)
lemma of_eq {v' : valuation R Ξ“β‚€} (h : v = v') : v.is_equiv v' :=
by { subst h }
lemma map {v' : valuation R Ξ“β‚€} (f : Ξ“β‚€ β†’*β‚€ Ξ“'β‚€) (hf : monotone f)
(inf : injective f) (h : v.is_equiv v') :
(v.map f hf).is_equiv (v'.map f hf) :=
let H : strict_mono f := hf.strict_mono_of_injective inf in
Ξ» r s,
calc f (v r) ≀ f (v s) ↔ v r ≀ v s : by rw H.le_iff_le
... ↔ v' r ≀ v' s : h r s
... ↔ f (v' r) ≀ f (v' s) : by rw H.le_iff_le
/-- `comap` preserves equivalence. -/
lemma comap {S : Type*} [ring S] (f : S β†’+* R) (h : v₁.is_equiv vβ‚‚) :
(v₁.comap f).is_equiv (vβ‚‚.comap f) :=
Ξ» r s, h (f r) (f s)
lemma val_eq (h : v₁.is_equiv vβ‚‚) {r s : R} :
v₁ r = v₁ s ↔ vβ‚‚ r = vβ‚‚ s :=
by simpa only [le_antisymm_iff] using and_congr (h r s) (h s r)
lemma ne_zero (h : v₁.is_equiv vβ‚‚) {r : R} :
v₁ r β‰  0 ↔ vβ‚‚ r β‰  0 :=
begin
have : v₁ r β‰  v₁ 0 ↔ vβ‚‚ r β‰  vβ‚‚ 0 := not_iff_not_of_iff h.val_eq,
rwa [v₁.map_zero, vβ‚‚.map_zero] at this,
end
end is_equiv -- end of namespace
section
lemma is_equiv_of_map_strict_mono [linear_ordered_comm_monoid_with_zero Ξ“β‚€]
[linear_ordered_comm_monoid_with_zero Ξ“'β‚€] [ring R] {v : valuation R Ξ“β‚€} (f : Ξ“β‚€ β†’*β‚€ Ξ“'β‚€)
(H : strict_mono f) :
is_equiv (v.map f (H.monotone)) v :=
λ x y, ⟨H.le_iff_le.mp, λ h, H.monotone h⟩
lemma is_equiv_of_val_le_one [linear_ordered_comm_group_with_zero Ξ“β‚€]
[linear_ordered_comm_group_with_zero Ξ“'β‚€]
(v : valuation K Ξ“β‚€) (v' : valuation K Ξ“'β‚€) (h : βˆ€ {x:K}, v x ≀ 1 ↔ v' x ≀ 1) :
v.is_equiv v' :=
begin
intros x y,
by_cases hy : y = 0, { simp [hy, zero_iff], },
rw show y = 1 * y, by rw one_mul,
rw [← (inv_mul_cancel_rightβ‚€ hy x)],
iterate 2 {rw [v.map_mul _ y, v'.map_mul _ y]},
rw [v.map_one, v'.map_one],
split; intro H,
{ apply mul_le_mul_right',
replace hy := v.ne_zero_iff.mpr hy,
replace H := le_of_le_mul_right hy H,
rwa h at H, },
{ apply mul_le_mul_right',
replace hy := v'.ne_zero_iff.mpr hy,
replace H := le_of_le_mul_right hy H,
rwa h, },
end
lemma is_equiv_iff_val_le_one
[linear_ordered_comm_group_with_zero Ξ“β‚€]
[linear_ordered_comm_group_with_zero Ξ“'β‚€]
(v : valuation K Ξ“β‚€) (v' : valuation K Ξ“'β‚€) :
v.is_equiv v' ↔ βˆ€ {x : K}, v x ≀ 1 ↔ v' x ≀ 1 :=
⟨λ h x, by simpa using h x 1, is_equiv_of_val_le_one _ _⟩
lemma is_equiv_iff_val_eq_one
[linear_ordered_comm_group_with_zero Ξ“β‚€]
[linear_ordered_comm_group_with_zero Ξ“'β‚€]
(v : valuation K Ξ“β‚€) (v' : valuation K Ξ“'β‚€) :
v.is_equiv v' ↔ βˆ€ {x : K}, v x = 1 ↔ v' x = 1 :=
begin
split,
{ intros h x,
simpa using @is_equiv.val_eq _ _ _ _ _ _ v v' h x 1 },
{ intros h, apply is_equiv_of_val_le_one, intros x,
split,
{ intros hx,
cases lt_or_eq_of_le hx with hx' hx',
{ have : v (1 + x) = 1,
{ rw ← v.map_one, apply map_add_eq_of_lt_left, simpa },
rw h at this,
rw (show x = (-1) + (1 + x), by simp),
refine le_trans (v'.map_add _ _) _,
simp [this] },
{ rw h at hx', exact le_of_eq hx' } },
{ intros hx,
cases lt_or_eq_of_le hx with hx' hx',
{ have : v' (1 + x) = 1,
{ rw ← v'.map_one, apply map_add_eq_of_lt_left, simpa },
rw ← h at this,
rw (show x = (-1) + (1 + x), by simp),
refine le_trans (v.map_add _ _) _,
simp [this] },
{ rw ← h at hx', exact le_of_eq hx' } } }
end
lemma is_equiv_iff_val_lt_one
[linear_ordered_comm_group_with_zero Ξ“β‚€]
[linear_ordered_comm_group_with_zero Ξ“'β‚€]
(v : valuation K Ξ“β‚€) (v' : valuation K Ξ“'β‚€) :
v.is_equiv v' ↔ βˆ€ {x : K}, v x < 1 ↔ v' x < 1 :=
begin
split,
{ intros h x,
simp only [lt_iff_le_and_ne, and_congr ((is_equiv_iff_val_le_one _ _).1 h)
((is_equiv_iff_val_eq_one _ _).1 h).not] },
{ rw is_equiv_iff_val_eq_one,
intros h x,
by_cases hx : x = 0, { simp only [(zero_iff _).2 hx, zero_ne_one] },
split,
{ intro hh,
by_contra h_1,
cases ne_iff_lt_or_gt.1 h_1,
{ simpa [hh, lt_self_iff_false] using h.2 h_2 },
{ rw [← inv_one, eq_inv_iff_eq_inv, ← map_inv] at hh,
exact hh.le.not_lt (h.2 ((one_lt_val_iff v' hx).1 h_2)) } },
{ intro hh,
by_contra h_1,
cases ne_iff_lt_or_gt.1 h_1,
{ simpa [hh, lt_self_iff_false] using h.1 h_2 },
{ rw [← inv_one, eq_inv_iff_eq_inv, ← map_inv] at hh,
exact hh.le.not_lt (h.1 ((one_lt_val_iff v hx).1 h_2)) } } }
end
lemma is_equiv_iff_val_sub_one_lt_one
[linear_ordered_comm_group_with_zero Ξ“β‚€]
[linear_ordered_comm_group_with_zero Ξ“'β‚€]
(v : valuation K Ξ“β‚€) (v' : valuation K Ξ“'β‚€) :
v.is_equiv v' ↔ βˆ€ {x : K}, v (x - 1) < 1 ↔ v' (x - 1) < 1 :=
begin
rw is_equiv_iff_val_lt_one,
exact (equiv.sub_right 1).surjective.forall
end
lemma is_equiv_tfae
[linear_ordered_comm_group_with_zero Ξ“β‚€]
[linear_ordered_comm_group_with_zero Ξ“'β‚€]
(v : valuation K Ξ“β‚€) (v' : valuation K Ξ“'β‚€) :
[v.is_equiv v',
βˆ€ {x}, v x ≀ 1 ↔ v' x ≀ 1,
βˆ€ {x}, v x = 1 ↔ v' x = 1,
βˆ€ {x}, v x < 1 ↔ v' x < 1,
βˆ€ {x}, v (x-1) < 1 ↔ v' (x-1) < 1].tfae :=
begin
tfae_have : 1 ↔ 2, { apply is_equiv_iff_val_le_one },
tfae_have : 1 ↔ 3, { apply is_equiv_iff_val_eq_one },
tfae_have : 1 ↔ 4, { apply is_equiv_iff_val_lt_one },
tfae_have : 1 ↔ 5, { apply is_equiv_iff_val_sub_one_lt_one },
tfae_finish
end
end
section supp
variables [comm_ring R]
variables [linear_ordered_comm_monoid_with_zero Ξ“β‚€] [linear_ordered_comm_monoid_with_zero Ξ“'β‚€]
variables (v : valuation R Ξ“β‚€)
/-- The support of a valuation `v : R β†’ Ξ“β‚€` is the ideal of `R` where `v` vanishes. -/
def supp : ideal R :=
{ carrier := {x | v x = 0},
zero_mem' := map_zero v,
add_mem' := Ξ» x y hx hy, le_zero_iff.mp $
calc v (x + y) ≀ max (v x) (v y) : v.map_add x y
... ≀ 0 : max_le (le_zero_iff.mpr hx) (le_zero_iff.mpr hy),
smul_mem' := Ξ» c x hx, calc v (c * x)
= v c * v x : map_mul v c x
... = v c * 0 : congr_arg _ hx
... = 0 : mul_zero _ }
@[simp] lemma mem_supp_iff (x : R) : x ∈ supp v ↔ v x = 0 := iff.rfl
-- @[simp] lemma mem_supp_iff' (x : R) : x ∈ (supp v : set R) ↔ v x = 0 := iff.rfl
/-- The support of a valuation is a prime ideal. -/
instance [nontrivial Ξ“β‚€] [no_zero_divisors Ξ“β‚€] : ideal.is_prime (supp v) :=
⟨λ (h : v.supp = ⊀), one_ne_zero $ show (1 : Ξ“β‚€) = 0,
from calc 1 = v 1 : v.map_one.symm
... = 0 : show (1:R) ∈ supp v, by { rw h, trivial },
Ξ» x y hxy, begin
show v x = 0 ∨ v y = 0,
change v (x * y) = 0 at hxy,
rw [v.map_mul x y] at hxy,
exact eq_zero_or_eq_zero_of_mul_eq_zero hxy
end⟩
lemma map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a :=
begin
have aux : βˆ€ a s, v s = 0 β†’ v (a + s) ≀ v a,
{ intros a' s' h', refine le_trans (v.map_add a' s') (max_le le_rfl _), simp [h'], },
apply le_antisymm (aux a s h),
calc v a = v (a + s + -s) : by simp
... ≀ v (a + s) : aux (a + s) (-s) (by rwa ←ideal.neg_mem_iff at h)
end
/-- If `hJ : J βŠ† supp v` then `on_quot_val hJ` is the induced function on R/J as a function.
Note: it's just the function; the valuation is `on_quot hJ`. -/
def on_quot_val {J : ideal R} (hJ : J ≀ supp v) :
R β§Έ J β†’ Ξ“β‚€ :=
Ξ» q, quotient.lift_on' q v $ Ξ» a b h,
calc v a = v (b + -(-a + b)) : by simp
... = v b :
v.map_add_supp b $ (ideal.neg_mem_iff _).2 $ hJ $ quotient_add_group.left_rel_apply.mp h
/-- The extension of valuation v on R to valuation on R/J if J βŠ† supp v -/
def on_quot {J : ideal R} (hJ : J ≀ supp v) :
valuation (R β§Έ J) Ξ“β‚€ :=
{ to_fun := v.on_quot_val hJ,
map_zero' := v.map_zero,
map_one' := v.map_one,
map_mul' := Ξ» xbar ybar, quotient.indβ‚‚' v.map_mul xbar ybar,
map_add_le_max' := Ξ» xbar ybar, quotient.indβ‚‚' v.map_add xbar ybar }
@[simp] lemma on_quot_comap_eq {J : ideal R} (hJ : J ≀ supp v) :
(v.on_quot hJ).comap (ideal.quotient.mk J) = v :=
ext $ Ξ» r, rfl
lemma comap_supp {S : Type*} [comm_ring S] (f : S β†’+* R) :
supp (v.comap f) = ideal.comap f v.supp :=
ideal.ext $ Ξ» x,
begin
rw [mem_supp_iff, ideal.mem_comap, mem_supp_iff],
refl,
end
lemma self_le_supp_comap (J : ideal R) (v : valuation (R β§Έ J) Ξ“β‚€) :
J ≀ (v.comap (ideal.quotient.mk J)).supp :=
by { rw [comap_supp, ← ideal.map_le_iff_le_comap], simp }
@[simp] lemma comap_on_quot_eq (J : ideal R) (v : valuation (R β§Έ J) Ξ“β‚€) :
(v.comap (ideal.quotient.mk J)).on_quot (v.self_le_supp_comap J) = v :=
ext $ by { rintro ⟨x⟩, refl }
/-- The quotient valuation on R/J has support supp(v)/J if J βŠ† supp v. -/
lemma supp_quot {J : ideal R} (hJ : J ≀ supp v) :
supp (v.on_quot hJ) = (supp v).map (ideal.quotient.mk J) :=
begin
apply le_antisymm,
{ rintro ⟨x⟩ hx,
apply ideal.subset_span,
exact ⟨x, hx, rfl⟩ },
{ rw ideal.map_le_iff_le_comap,
intros x hx, exact hx }
end
lemma supp_quot_supp : supp (v.on_quot le_rfl) = 0 :=
by { rw supp_quot, exact ideal.map_quotient_self _ }
end supp -- end of section
end valuation
section add_monoid
variables (R) [ring R] (Ξ“β‚€ : Type*) [linear_ordered_add_comm_monoid_with_top Ξ“β‚€]
/-- The type of `Ξ“β‚€`-valued additive valuations on `R`. -/
@[nolint has_inhabited_instance]
def add_valuation := valuation R (multiplicative Ξ“β‚€α΅’α΅ˆ)
end add_monoid
namespace add_valuation
variables {Ξ“β‚€ : Type*} {Ξ“'β‚€ : Type*}
section basic
section monoid
variables [linear_ordered_add_comm_monoid_with_top Ξ“β‚€] [linear_ordered_add_comm_monoid_with_top Ξ“'β‚€]
variables (R) (Ξ“β‚€) [ring R]
/-- A valuation is coerced to the underlying function `R β†’ Ξ“β‚€`. -/
instance : has_coe_to_fun (add_valuation R Ξ“β‚€) (Ξ» _, R β†’ Ξ“β‚€) :=
{ coe := Ξ» v, v.to_monoid_with_zero_hom.to_fun }
variables {R} {Ξ“β‚€} (v : add_valuation R Ξ“β‚€) {x y z : R}
section
variables (f : R β†’ Ξ“β‚€) (h0 : f 0 = ⊀) (h1 : f 1 = 0)
variables (hadd : βˆ€ x y, min (f x) (f y) ≀ f (x + y)) (hmul : βˆ€ x y, f (x * y) = f x + f y)
/-- An alternate constructor of `add_valuation`, that doesn't reference `multiplicative Ξ“β‚€α΅’α΅ˆ` -/
def of : add_valuation R Ξ“β‚€ :=
{ to_fun := f,
map_one' := h1,
map_zero' := h0,
map_add_le_max' := hadd,
map_mul' := hmul }
variables {h0} {h1} {hadd} {hmul} {r : R}
@[simp]
theorem of_apply : (of f h0 h1 hadd hmul) r = f r := rfl
/-- The `valuation` associated to an `add_valuation` (useful if the latter is constructed using
`add_valuation.of`). -/
def valuation : valuation R (multiplicative Ξ“β‚€α΅’α΅ˆ) := v
@[simp] lemma valuation_apply (r : R) :
v.valuation r = multiplicative.of_add (order_dual.to_dual (v r)) := rfl
end
@[simp] lemma map_zero : v 0 = ⊀ := v.map_zero
@[simp] lemma map_one : v 1 = 0 := v.map_one
@[simp] lemma map_mul : βˆ€ x y, v (x * y) = v x + v y := v.map_mul
@[simp] lemma map_add : βˆ€ x y, min (v x) (v y) ≀ v (x + y) := v.map_add
lemma map_le_add {x y g} (hx : g ≀ v x) (hy : g ≀ v y) : g ≀ v (x + y) := v.map_add_le hx hy
lemma map_lt_add {x y g} (hx : g < v x) (hy : g < v y) : g < v (x + y) := v.map_add_lt hx hy
lemma map_le_sum {ΞΉ : Type*} {s : finset ΞΉ} {f : ΞΉ β†’ R} {g : Ξ“β‚€} (hf : βˆ€ i ∈ s, g ≀ v (f i)) :
g ≀ v (βˆ‘ i in s, f i) := v.map_sum_le hf
lemma map_lt_sum {ΞΉ : Type*} {s : finset ΞΉ} {f : ΞΉ β†’ R} {g : Ξ“β‚€} (hg : g β‰  ⊀)
(hf : βˆ€ i ∈ s, g < v (f i)) : g < v (βˆ‘ i in s, f i) := v.map_sum_lt hg hf
lemma map_lt_sum' {ΞΉ : Type*} {s : finset ΞΉ} {f : ΞΉ β†’ R} {g : Ξ“β‚€} (hg : g < ⊀)
(hf : βˆ€ i ∈ s, g < v (f i)) : g < v (βˆ‘ i in s, f i) := v.map_sum_lt' hg hf
@[simp] lemma map_pow : βˆ€ x (n:β„•), v (x^n) = n β€’ (v x) := v.map_pow
@[ext] lemma ext {v₁ vβ‚‚ : add_valuation R Ξ“β‚€} (h : βˆ€ r, v₁ r = vβ‚‚ r) : v₁ = vβ‚‚ :=
valuation.ext h
lemma ext_iff {v₁ vβ‚‚ : add_valuation R Ξ“β‚€} : v₁ = vβ‚‚ ↔ βˆ€ r, v₁ r = vβ‚‚ r :=
valuation.ext_iff
-- The following definition is not an instance, because we have more than one `v` on a given `R`.
-- In addition, type class inference would not be able to infer `v`.
/-- A valuation gives a preorder on the underlying ring. -/
def to_preorder : preorder R := preorder.lift v
/-- If `v` is an additive valuation on a division ring then `v(x) = ⊀` iff `x = 0`. -/
@[simp] lemma top_iff [nontrivial Ξ“β‚€] (v : add_valuation K Ξ“β‚€) {x : K} :
v x = ⊀ ↔ x = 0 :=
v.zero_iff
lemma ne_top_iff [nontrivial Ξ“β‚€] (v : add_valuation K Ξ“β‚€) {x : K} :
v x β‰  ⊀ ↔ x β‰  0 :=
v.ne_zero_iff
/-- A ring homomorphism `S β†’ R` induces a map `add_valuation R Ξ“β‚€ β†’ add_valuation S Ξ“β‚€`. -/
def comap {S : Type*} [ring S] (f : S β†’+* R) (v : add_valuation R Ξ“β‚€) :
add_valuation S Ξ“β‚€ :=
v.comap f
@[simp] lemma comap_id : v.comap (ring_hom.id R) = v := v.comap_id
lemma comap_comp {S₁ : Type*} {Sβ‚‚ : Type*} [ring S₁] [ring Sβ‚‚] (f : S₁ β†’+* Sβ‚‚) (g : Sβ‚‚ β†’+* R) :
v.comap (g.comp f) = (v.comap g).comap f :=
v.comap_comp f g
/-- A `≀`-preserving, `⊀`-preserving group homomorphism `Ξ“β‚€ β†’ Ξ“'β‚€` induces a map
`add_valuation R Ξ“β‚€ β†’ add_valuation R Ξ“'β‚€`.
-/
def map (f : Ξ“β‚€ β†’+ Ξ“'β‚€) (ht : f ⊀ = ⊀) (hf : monotone f) (v : add_valuation R Ξ“β‚€) :
add_valuation R Ξ“'β‚€ :=
v.map
{ to_fun := f,
map_mul' := f.map_add,
map_one' := f.map_zero,
map_zero' := ht } (Ξ» x y h, hf h)
/-- Two additive valuations on `R` are defined to be equivalent if they induce the same
preorder on `R`. -/
def is_equiv (v₁ : add_valuation R Ξ“β‚€) (vβ‚‚ : add_valuation R Ξ“'β‚€) : Prop :=
v₁.is_equiv vβ‚‚
end monoid
section group
variables [linear_ordered_add_comm_group_with_top Ξ“β‚€] [ring R] (v : add_valuation R Ξ“β‚€) {x y z : R}
@[simp] lemma map_inv (v : add_valuation K Ξ“β‚€) {x : K} :
v x⁻¹ = - (v x) :=
v.map_inv
lemma map_units_inv (x : Rˣ) : v (x⁻¹ : Rˣ) = - (v x) :=
v.map_units_inv x
@[simp] lemma map_neg (x : R) : v (-x) = v x :=
v.map_neg x
lemma map_sub_swap (x y : R) : v (x - y) = v (y - x) :=
v.map_sub_swap x y
lemma map_sub (x y : R) : min (v x) (v y) ≀ v (x - y) :=
v.map_sub x y
lemma map_le_sub {x y g} (hx : g ≀ v x) (hy : g ≀ v y) : g ≀ v (x - y) := v.map_sub_le hx hy
lemma map_add_of_distinct_val (h : v x β‰  v y) : v (x + y) = min (v x) (v y) :=
v.map_add_of_distinct_val h
lemma map_eq_of_lt_sub (h : v x < v (y - x)) : v y = v x :=
v.map_eq_of_sub_lt h
end group
end basic
namespace is_equiv
variables [linear_ordered_add_comm_monoid_with_top Ξ“β‚€] [linear_ordered_add_comm_monoid_with_top Ξ“'β‚€]
variables [ring R]
variables {Ξ“''β‚€ : Type*} [linear_ordered_add_comm_monoid_with_top Ξ“''β‚€]
variables {v : add_valuation R Ξ“β‚€}
variables {v₁ : add_valuation R Ξ“β‚€} {vβ‚‚ : add_valuation R Ξ“'β‚€} {v₃ : add_valuation R Ξ“''β‚€}
@[refl] lemma refl : v.is_equiv v := valuation.is_equiv.refl
@[symm] lemma symm (h : v₁.is_equiv vβ‚‚) : vβ‚‚.is_equiv v₁ := h.symm
@[trans] lemma trans (h₁₂ : v₁.is_equiv vβ‚‚) (h₂₃ : vβ‚‚.is_equiv v₃) : v₁.is_equiv v₃ :=
h₁₂.trans h₂₃
lemma of_eq {v' : add_valuation R Ξ“β‚€} (h : v = v') : v.is_equiv v' :=
valuation.is_equiv.of_eq h
lemma map {v' : add_valuation R Ξ“β‚€} (f : Ξ“β‚€ β†’+ Ξ“'β‚€) (ht : f ⊀ = ⊀) (hf : monotone f)
(inf : injective f) (h : v.is_equiv v') :
(v.map f ht hf).is_equiv (v'.map f ht hf) :=
h.map
{ to_fun := f,
map_mul' := f.map_add,
map_one' := f.map_zero,
map_zero' := ht } (Ξ» x y h, hf h) inf
/-- `comap` preserves equivalence. -/
lemma comap {S : Type*} [ring S] (f : S β†’+* R) (h : v₁.is_equiv vβ‚‚) :
(v₁.comap f).is_equiv (vβ‚‚.comap f) :=
h.comap f
lemma val_eq (h : v₁.is_equiv vβ‚‚) {r s : R} :
v₁ r = v₁ s ↔ vβ‚‚ r = vβ‚‚ s :=
h.val_eq
lemma ne_top (h : v₁.is_equiv vβ‚‚) {r : R} :
v₁ r β‰  ⊀ ↔ vβ‚‚ r β‰  ⊀ :=
h.ne_zero
end is_equiv
section supp
variables [linear_ordered_add_comm_monoid_with_top Ξ“β‚€] [linear_ordered_add_comm_monoid_with_top Ξ“'β‚€]
variables [comm_ring R]
variables (v : add_valuation R Ξ“β‚€)
/-- The support of an additive valuation `v : R β†’ Ξ“β‚€` is the ideal of `R` where `v x = ⊀` -/
def supp : ideal R := v.supp
@[simp] lemma mem_supp_iff (x : R) : x ∈ supp v ↔ v x = ⊀ := v.mem_supp_iff x
lemma map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a :=
v.map_add_supp a h
/-- If `hJ : J βŠ† supp v` then `on_quot_val hJ` is the induced function on R/J as a function.
Note: it's just the function; the valuation is `on_quot hJ`. -/
def on_quot_val {J : ideal R} (hJ : J ≀ supp v) : (R β§Έ J) β†’ Ξ“β‚€ := v.on_quot_val hJ
/-- The extension of valuation v on R to valuation on R/J if J βŠ† supp v -/
def on_quot {J : ideal R} (hJ : J ≀ supp v) :
add_valuation (R β§Έ J) Ξ“β‚€ :=
v.on_quot hJ
@[simp] lemma on_quot_comap_eq {J : ideal R} (hJ : J ≀ supp v) :
(v.on_quot hJ).comap (ideal.quotient.mk J) = v :=
v.on_quot_comap_eq hJ
lemma comap_supp {S : Type*} [comm_ring S] (f : S β†’+* R) :
supp (v.comap f) = ideal.comap f v.supp :=
v.comap_supp f
lemma self_le_supp_comap (J : ideal R) (v : add_valuation (R β§Έ J) Ξ“β‚€) :
J ≀ (v.comap (ideal.quotient.mk J)).supp :=
v.self_le_supp_comap J
@[simp] lemma comap_on_quot_eq (J : ideal R) (v : add_valuation (R β§Έ J) Ξ“β‚€) :
(v.comap (ideal.quotient.mk J)).on_quot (v.self_le_supp_comap J) = v :=
v.comap_on_quot_eq J
/-- The quotient valuation on R/J has support supp(v)/J if J βŠ† supp v. -/
lemma supp_quot {J : ideal R} (hJ : J ≀ supp v) :
supp (v.on_quot hJ) = (supp v).map (ideal.quotient.mk J) :=
v.supp_quot hJ
lemma supp_quot_supp : supp (v.on_quot le_rfl) = 0 :=
v.supp_quot_supp
end supp -- end of section
attribute [irreducible] add_valuation
end add_valuation
section valuation_notation
localized "notation `β„•β‚˜β‚€` := with_zero (multiplicative β„•)" in discrete_valuation
localized "notation `β„€β‚˜β‚€` := with_zero (multiplicative β„€)" in discrete_valuation
end valuation_notation