Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
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 | |