Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
File size: 17,066 Bytes
4365a98 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
import algebra.group_power
import ring_theory.ideal_operations
import ring_theory.subring
import for_mathlib.rings
import for_mathlib.equiv
import valuation.linear_ordered_comm_group_with_zero
/-!
# 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])
The definition of a valuation we use here is Definition 1.22 of [Wedhorn]. `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 [Wedhorn; 1.27] 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) as the definition of equivalence.
The trivial valuation associated to a prime ideal P of R is `trivial P : valuation R Ξβ`.
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`.
-/
local attribute [instance] classical.prop_decidable
noncomputable theory
local attribute [instance, priority 0] classical.DLO
open function ideal linear_ordered_structure
universes u uβ uβ uβ -- v is used for valuations
variables {R : Type uβ} -- This will be a ring, assumed commutative in some sections
variables {Ξβ : Type u} [linear_ordered_comm_group_with_zero Ξβ]
variables {Ξ'β : Type uβ} [linear_ordered_comm_group_with_zero Ξ'β]
variables {Ξ''β : Type uβ} [linear_ordered_comm_group_with_zero Ξ''β]
set_option old_structure_cmd true
section
variables (R) (Ξβ) [ring R]
/-- The type of Ξβ-valued valuations on R. -/
structure valuation extends R β* Ξβ :=
(map_zero' : to_fun 0 = 0)
(map_add' : β x y, to_fun (x + y) β€ max (to_fun x) (to_fun y))
end
namespace valuation
section basic
variables (R) (Ξβ) [ring R]
/-- A valuation is coerced to the underlying function R β Ξβ. -/
instance : has_coe_to_fun (valuation R Ξβ) := { F := Ξ» _, R β Ξβ, coe := valuation.to_fun }
/-- A valuation is coerced to a monoid morphism R β Ξβ. -/
instance : has_coe (valuation R Ξβ) (R β* Ξβ) := β¨valuation.to_monoid_homβ©
variables {R} {Ξβ} (v : valuation R Ξβ) {x y z : R}
@[squash_cast, simp] lemma coe_coe : ((v : R β* Ξβ) : 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'
@[simp] lemma map_pow : β x (n:β), v (x^n) = (v x)^n :=
@is_monoid_hom.map_pow _ _ _ _ v (monoid_hom.is_monoid_hom v.to_monoid_hom)
@[ext] lemma ext {vβ vβ : valuation R Ξβ} (h : β r, vβ r = vβ r) : vβ = vβ :=
by { cases vβ, cases vβ, congr, funext r, exact h r }
lemma ext_iff {vβ vβ : valuation R Ξβ} : vβ = vβ β β r, vβ r = vβ r :=
β¨Ξ» h r, congr_arg _ h, extβ©
-- The following definition is not an instance, because we have more than one v on a given R.
/-- A valuation gives a preorder on the underlying ring. -/
def to_preorder : preorder R := preorder.lift v (by apply_instance)
/-- If v is a valuation on a division ring then v(x) = 0 iff x = 0. -/
lemma zero_iff {K : Type uβ} [division_ring K]
(v : valuation K Ξβ) {x : K} : v x = 0 β x = 0 :=
begin
split ; intro h,
{ contrapose! h,
exact group_with_zero.unit_ne_zero (units.map (v : K β* Ξβ) $ units.mk0 _ h) },
{ exact h.symm βΈ v.map_zero },
end
lemma ne_zero_iff {K : Type uβ} [division_ring K]
(v : valuation K Ξβ) {x : K} : v x β 0 β x β 0 :=
not_iff_not_of_iff v.zero_iff
@[simp] lemma map_inv' {K : Type uβ} [division_ring K]
(v : valuation K Ξβ) {x : K} (h : x β 0) : v xβ»ΒΉ = (v x)β»ΒΉ :=
begin
apply eq_inv_of_mul_right_eq_one',
rw [β v.map_mul, mul_inv_cancel h, v.map_one]
end
@[simp] lemma map_inv {K : Type uβ} [discrete_field K]
(v : valuation K Ξβ) {x : K} : v xβ»ΒΉ = (v x)β»ΒΉ :=
begin
by_cases h : x = 0,
{ rw [h, inv_zero, map_zero, inv_zero'] },
{ exact v.map_inv' h }
end
lemma map_units_inv (x : units R) : v (xβ»ΒΉ : units R) = (v x)β»ΒΉ :=
eq_inv_of_mul_right_eq_one' _ _ $ by rw [β v.map_mul, units.mul_inv, v.map_one]
@[simp] theorem unit_map_eq (u : units R) :
(units.map (v : R β* Ξβ) u : Ξβ) = v u := rfl
@[simp] theorem map_neg_one : v (-1) = 1 :=
begin
show (units.map (v : R β* Ξβ) (-1 : units R) : Ξβ) = (1 : units Ξβ),
rw β units.ext_iff,
apply linear_ordered_structure.eq_one_of_pow_eq_one (nat.succ_ne_zero _) (_ : _ ^ 2 = _),
rw [pow_two, β monoid_hom.map_mul, units.ext_iff],
show v ((-1) * (-1)) = 1,
rw [neg_one_mul, neg_neg, v.map_one]
end
@[simp] lemma map_neg (x : R) : v (-x) = v x :=
calc v (-x) = v (-1 * x) : by simp
... = v (-1) * v x : map_mul _ _ _
... = v x : by simp
lemma map_sub_swap (x y : R) : v (x - y) = v (y - x) :=
calc v (x - y) = v (-(y - x)) : by rw show x - y = -(y-x), by abel
... = _ : map_neg _ _
lemma map_sub_le_max (x y : R) : v (x - y) β€ max (v x) (v y) :=
calc v (x-y) = v (x + -y) : by simp
... β€ max (v x) (v $ -y) : v.map_add _ _
... = max (v x) (v y) : by rw map_neg
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_le_max _ _ _
... < v x : max_lt h' vyx },
{ apply this h.symm,
rwa [add_comm, max_comm] at 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
/-- A ring homomorphism S β R induces a map valuation R Ξβ β valuation S Ξβ -/
def comap {S : Type uβ} [ring S] (f : S β R) [is_ring_hom f] (v : valuation R Ξβ) :
valuation S Ξβ :=
by refine_struct { to_fun := v β f, .. }; intros;
simp [is_ring_hom.map_zero f, is_ring_hom.map_one f, is_ring_hom.map_mul f, is_ring_hom.map_add f]
@[simp] lemma comap_id : v.comap (id : R β R) = v := ext $ Ξ» r, rfl
lemma comap_comp {Sβ : Type uβ} [ring Sβ] {Sβ : Type uβ} [ring Sβ]
(f : Sβ β Sβ) [is_ring_hom f] (g : Sβ β R) [is_ring_hom g] :
v.comap (g β f) = (v.comap g).comap f :=
ext $ Ξ» r, rfl
/-- A β€-preserving group homomorphism Ξβ β Ξ'β induces a map valuation R Ξβ β valuation R Ξ'β. -/
def map (f : Ξβ β* Ξ'β) (hβ : f 0 = 0) (hf : monotone f) (v : valuation R Ξβ) : valuation R Ξ'β :=
{ to_fun := f β v,
map_zero' := show f (v 0) = 0, by rw [v.map_zero, hβ],
map_add' := Ξ» 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_hom.comp f (v : R β* Ξβ) }
/-- 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 basic -- end of section
namespace is_equiv
variables [ring R]
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; refl
lemma map {v' : valuation R Ξβ} (f : Ξβ β* Ξ'β) (hβ : f 0 = 0) (hf : monotone f) (inf : injective f)
(h : v.is_equiv v') :
(v.map f hβ hf).is_equiv (v'.map f hβ hf) :=
Ξ» r s,
calc f (v r) β€ f (v s) β v r β€ v s : by rw linear_order_le_iff_of_monotone_injective inf hf
... β v' r β€ v' s : h r s
... β f (v' r) β€ f (v' s) : by rw linear_order_le_iff_of_monotone_injective inf hf
/-- `comap` preserves equivalence. -/
lemma comap {S : Type uβ} [ring S] (f : S β R) [is_ring_hom f] (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 :=
β¨Ξ» H, le_antisymm ((h _ _).1 (le_of_eq H)) ((h _ _).1 (le_of_eq H.symm)),
Ξ» H, le_antisymm ((h.symm _ _).1 (le_of_eq H)) ((h.symm _ _).1 (le_of_eq H.symm)) β©
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
lemma is_equiv_of_map_strict_mono [ring R] {v : valuation R Ξβ}
(f : Ξβ β* Ξ'β) (hβ : f 0 = 0) (H : strict_mono f) :
is_equiv (v.map f hβ (H.monotone)) v :=
Ξ» x y, β¨H.le_iff_le.mp, Ξ» h, H.monotone hβ©
lemma is_equiv_of_val_le_one {K : Type*} [division_ring K]
(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 show x = (x * yβ»ΒΉ) * y, { rw [mul_assoc, inv_mul_cancel hy, mul_one], },
iterate 2 {rw [v.map_mul _ y, v'.map_mul _ y]},
rw [v.map_one, v'.map_one],
split; intro H,
{ apply actual_ordered_comm_monoid.mul_le_mul_right',
replace hy := v.ne_zero_iff.mpr hy,
replace H := linear_ordered_structure.le_of_le_mul_right hy H,
rwa h at H, },
{ apply actual_ordered_comm_monoid.mul_le_mul_right',
replace hy := v'.ne_zero_iff.mpr hy,
replace H := linear_ordered_structure.le_of_le_mul_right hy H,
rwa h, },
end
/-- A valuation is trivial if it maps everything to 0 or 1.-/
def is_trivial [ring R] (v : valuation R Ξβ) : Prop :=
β r:R, v r = 0 β¨ v r = 1
section trivial -- the trivial valuation
variable [comm_ring R]
variables (I : ideal R) [prime : I.is_prime]
/-- The trivial Ξβ-valued valuation associated to a prime ideal S of R. -/
def trivial : valuation R (with_zero punit) :=
{ to_fun := Ξ» x, if x β I then 0 else 1,
map_zero' := if_pos I.zero_mem,
map_one' := if_neg (assume h, prime.1 (I.eq_top_iff_one.2 h)),
map_mul' := Ξ» x y,
if hx : x β I then by rw [if_pos hx, zero_mul, if_pos (I.mul_mem_right hx)]
else if hy : y β I then by rw [if_pos hy, mul_zero, if_pos (I.mul_mem_left hy)]
else have hxy : x * y β I,
by { assume hxy, replace hxy := prime.mem_or_mem hxy, tauto },
by rw [if_neg hx, if_neg hy, if_neg hxy, mul_one],
map_add' := Ξ» x y, begin
split_ifs with hxy hx hy _ hx hy;
try {simp}; try {exact le_refl _},
{ exact hxy (I.add_mem hx hy) }
end }
lemma trivial_is_trivial (I : ideal R) [hI : I.is_prime] :
(trivial I).is_trivial :=
begin
intro r, generalize : (trivial I) r = x,
cases x; [left, {right, cases x}]; refl
end
lemma is_trivial_iff_val_le_one {K : Type*} [division_ring K] {v : valuation K Ξβ} :
v.is_trivial β β x:K, v x β€ 1 :=
begin
split; intros h x,
{ cases h x; simp *, },
{ contrapose! h, cases h with hβ hβ,
by_cases hx : v x β€ 1,
{ refine β¨xβ»ΒΉ, _β©,
rw [v.map_inv', β linear_ordered_structure.inv_lt_inv _ _,
inv_inv'', inv_one'],
{ exact lt_of_le_of_ne hx hβ },
{ exact inv_ne_zero' _ hβ },
{ exact one_ne_zero },
{ rwa v.ne_zero_iff at hβ, } },
{ push_neg at hx, exact β¨_, hxβ© } }
end
end trivial -- end of section
section supp
variables [comm_ring R]
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 := map_zero v,
add := Ξ» 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 := Ξ» 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 : 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 group_with_zero.mul_eq_zero _ _ hxy
endβ©
/-- v(a)=v(a+s) if s β supp(v). -/
lemma val_add_supp (a 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_refl _) _), 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`. -/
definition on_quot_val {J : ideal R} (hJ : J β€ supp v) :
J.quotient β Ξβ :=
Ξ» q, quotient.lift_on' q v $ Ξ» a b h,
calc v a = v (b + (a - b)) : by simp
... = v b : v.val_add_supp b (a - b) (hJ h)
/-- The extension of valuation v on R to valuation on R/J if J β supp v -/
definition on_quot {J : ideal R} (hJ : J β€ supp v) :
valuation J.quotient Ξβ :=
{ 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' := Ξ» 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,
begin
refine @quotient.lift_on_beta _ _ (J.quotient_rel) v (Ξ» a b h, _) _,
calc v a = v (b + (a - b)) : by simp
... = v b : v.val_add_supp b (a - b) (hJ h)
end
end supp -- end of section
section supp_comm
variable [comm_ring R]
variables (v : valuation R Ξβ)
lemma comap_supp {S : Type uβ} [comm_ring S] (f : S β R) [is_ring_hom f] :
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 (quotient 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 J.quotient Ξβ) :
(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_refl _)) = 0 :=
by rw supp_quot; exact ideal.map_quotient_self _
lemma quot_preorder_comap {J : ideal R} (hJ : J β€ supp v) :
preorder.lift (ideal.quotient.mk J) (v.on_quot hJ).to_preorder = v.to_preorder :=
preorder.ext $ Ξ» x y, iff.rfl
end supp_comm -- end of section
end valuation
|