Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
import topology.order | |
import group_theory.quotient_group | |
import valuation.canonical | |
/-! | |
# Valuation Spectrum (Spv) | |
The API for the valuation spectrum of a commutative ring. Normally defined as | |
"the equivalence classes of valuations", there are set-theoretic issues. | |
These issues are easily solved by noting that two valuations are equivalent | |
if and only if they induce the same preorder on R, where the preorder | |
attached to a valuation sends (r,s) to v r β€ v s. | |
## Implementation details | |
Our definition of Spv is currently the predicates which come from a | |
valuation. There is another approach though: | |
In the proof of Prop 2.2 of βContinuous Valuationsβ by R. Huber, | |
the relations that come from a valuations are classified as thoe satisfying some axioms. | |
See also Wedhorn 4.7. | |
-/ | |
universes u uβ uβ uβ uβ | |
local attribute [instance, priority 0] classical.DLO | |
/-- Valuation spectrum of a ring. -/ | |
-- Note that the valuation takes values in a group in the same universe as R. | |
-- This is to avoid "set-theoretic issues". | |
definition Spv (R : Type uβ) [comm_ring R] := | |
{ineq : R β R β Prop // β {Ξβ : Type uβ} [linear_ordered_comm_group_with_zero Ξβ], | |
by exactI β (v : valuation R Ξβ), β r s : R, v r β€ v s β ineq r s} | |
variables {R : Type uβ} [comm_ring R] {v : Spv R} | |
local notation r `β€[`v`]` s := v.1 r s | |
/- Spv R is morally a quotient, so we start by giving it a quotient-like interface -/ | |
namespace Spv | |
open valuation | |
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 Ξ''β] | |
-- The work is embedded here with `canonical_valuation_is_equiv v` etc. | |
-- The canonical valuation attached to v lives in R's universe. | |
/-- The equivalence class of a valuation. -/ | |
definition mk (v : valuation R Ξβ) : Spv R := | |
β¨Ξ» r s, v r β€ v s, | |
β¨value_monoid v, by apply_instance, canonical_valuation v, canonical_valuation_is_equiv vβ©β© | |
@[simp] lemma mk_val (v : valuation R Ξβ) : (mk v).val = Ξ» r s, v r β€ v s := rfl | |
/-- The value group attached to a term of type Spv R -/ | |
definition out_Ξβ (v : Spv R) : Type uβ := classical.some v.2 | |
/-- The value group attached to a term of type Spv R | |
is a linearly ordered commutative group with zero. -/ | |
noncomputable instance (v : Spv R) : linear_ordered_comm_group_with_zero (out_Ξβ v) := | |
classical.some $ classical.some_spec v.2 | |
/-- An explicit representative of an equivalence class of valuations (a term of type Spv R). -/ | |
noncomputable definition out (v : Spv R) : valuation R (out_Ξβ v) := | |
classical.some $ classical.some_spec $ classical.some_spec v.2 | |
@[simp] lemma mk_out {v : Spv R} : mk (out v) = v := | |
begin | |
rcases v with β¨ineq, hvβ©, | |
rw subtype.ext, | |
ext, | |
exact classical.some_spec (classical.some_spec (classical.some_spec hv)) _ _, | |
end | |
/-- The explicit representative of the equivalence class of a valuation v is equivalent to v. -/ | |
lemma out_mk (v : valuation R Ξβ) : (out (mk v)).is_equiv v := | |
classical.some_spec (classical.some_spec (classical.some_spec (mk v).2)) | |
/-- A function defined on all valuations of R descends to Spv R. -/ | |
noncomputable def lift {X} | |
(f : Ξ β¦Ξβ : Type uββ¦ [linear_ordered_comm_group_with_zero Ξβ], valuation R Ξβ β X) (v : Spv R) : X := | |
f (out v) | |
/-- The computation principle for Spv: | |
If a function is constant on equivalence classes of valuations, | |
then it descends to a well-defined function on Spv R.-/ | |
theorem lift_eq {X} | |
(fβ : Ξ β¦Ξβ : Type uββ¦ [linear_ordered_comm_group_with_zero Ξβ], valuation R Ξβ β X) | |
(f : Ξ β¦Ξβ : Type uβ¦ [linear_ordered_comm_group_with_zero Ξβ], valuation R Ξβ β X) | |
(v : valuation R Ξβ) | |
(h : β β¦Ξβ : Type uββ¦ [linear_ordered_comm_group_with_zero Ξβ] (vβ : valuation R Ξβ), | |
vβ.is_equiv v β fβ vβ = f v) : | |
lift fβ (mk v) = f v := | |
h _ (out_mk v) | |
/-- Prop-valued version of the computation principle for Spv: | |
If a predicate is constant on equivalence classes of valuations, | |
then it descends to a well-defined predicate on Spv R.-/ | |
theorem lift_eq' | |
(fβ : Ξ β¦Ξβ : Type uββ¦ [linear_ordered_comm_group_with_zero Ξβ], valuation R Ξβ β Prop) | |
(f : Ξ β¦Ξβ : Type uβ¦ [linear_ordered_comm_group_with_zero Ξβ], valuation R Ξβ β Prop) | |
(v : valuation R Ξβ) | |
(h : β β¦Ξβ : Type uββ¦ [linear_ordered_comm_group_with_zero Ξβ] (vβ : valuation R Ξβ), | |
vβ.is_equiv v β (fβ vβ β f v)) : | |
lift fβ (mk v) β f v := | |
h _ (out_mk v) | |
/-- For every term of Spv R, there exists a valuation representing it.-/ | |
lemma exists_rep (v : Spv R) : | |
β {Ξβ : Type uβ} [linear_ordered_comm_group_with_zero Ξβ], by exactI β (vβ : valuation R Ξβ), | |
mk vβ = v := | |
β¨out_Ξβ v, infer_instance, out v, mk_outβ© | |
/-- The quotient map that sends a valuation to its equivalence class is sound: | |
it sends equivalent valuations to the same class. -/ | |
lemma sound {vβ : valuation R Ξ'β} {vβ : valuation R Ξ''β} (h : vβ.is_equiv vβ) : mk vβ = mk vβ := | |
begin | |
apply subtype.val_injective, | |
ext r s, | |
apply h, | |
end | |
/-- The induction principle for Spv.-/ | |
lemma induction_on (v : Spv R) (P : Spv R β Prop) | |
(h : Ξ β¦Ξβ : Type uββ¦ [linear_ordered_comm_group_with_zero Ξβ] (v : valuation R Ξβ), P (Spv.mk v)) : | |
P v := | |
begin | |
rw β @mk_out _ _ v, | |
apply h | |
end | |
/-- If two valuations are mapped to the same term of Spv R, then they are equivalent. -/ | |
lemma is_equiv_of_eq_mk {vβ : valuation R Ξ'β} {vβ : valuation R Ξ''β} (h : mk vβ = mk vβ) : | |
vβ.is_equiv vβ := | |
begin | |
intros r s, | |
have := congr_arg subtype.val h, | |
replace := congr this (rfl : r = r), | |
replace := congr this (rfl : s = s), | |
simp at this, | |
simp [this], | |
end | |
@[ext] | |
lemma ext (vβ vβ : Spv R) (h : (Spv.out vβ).is_equiv (Spv.out vβ)) : | |
vβ = vβ := | |
by simpa only [Spv.mk_out] using Spv.sound h | |
lemma ext_iff {vβ vβ : Spv R} : | |
vβ = vβ β ((Spv.out vβ).is_equiv (Spv.out vβ)) := | |
β¨Ξ» h, Spv.is_equiv_of_eq_mk (by simpa only [Spv.mk_out] using h), Spv.ext _ _β© | |
/-- A coercion that allows to treat an element of Spv(R) as a function, | |
by picking a random representative of the equivalence class of valuations. -/ | |
noncomputable instance : has_coe_to_fun (Spv R) := | |
{ F := Ξ» v, R β out_Ξβ v, | |
coe := Ξ» v, (out v : R β out_Ξβ v) } | |
section | |
@[simp] lemma map_zero : v 0 = 0 := valuation.map_zero _ | |
@[simp] lemma map_one : v 1 = 1 := valuation.map_one _ | |
@[simp] lemma map_mul : β x y, v (x * y) = v x * v y := valuation.map_mul _ | |
@[simp] lemma map_add : β x y, v (x + y) β€ max (v x) (v y) := valuation.map_add _ | |
end | |
section supp | |
/--The support of an equivalence class of valuations.-/ | |
noncomputable def supp (v : Spv R) := v.out.supp | |
/--The support of an equivalence class of valuations is equal to the | |
support of any of its representatives.-/ | |
@[simp] lemma supp_mk (v : valuation R Ξβ) : (mk v).supp = v.supp := | |
(out_mk v).supp_eq | |
end supp | |
section comap | |
variables {S : Type*} [comm_ring S] {T : Type*} [comm_ring T] | |
/--The pullback of an equivalence class of valuations | |
along a ring homomorphism.-/ | |
noncomputable def comap (f : R β S) [is_ring_hom f] : Spv S β Spv R := | |
lift $ Ξ» Ξβ _ v, by exactI Spv.mk (v.comap f) | |
/--The pullpack of an equivalence class of valuations | |
is the equivalence class of the pullback of any of its representatives.-/ | |
lemma comap_mk (f : R β S) [is_ring_hom f] (v : valuation S Ξβ) : | |
comap f (mk v) = mk (v.comap f) := | |
begin | |
delta comap, rw lift_eq, | |
intros Ξβ _ v h, resetI, | |
apply sound, | |
exact is_equiv.comap f h | |
end | |
/--The pullback along the identity is the identity.-/ | |
lemma comap_id_apply (v : Spv R) : comap (id : R β R) v = v := | |
begin | |
apply induction_on v, clear v, | |
intros Ξβ _ v, resetI, | |
rw [comap_mk, valuation.comap_id], | |
end | |
/--The pullback along the identity is the identity.-/ | |
@[simp] lemma comap_id : comap (id : R β R) = id := | |
funext $ comap_id_apply | |
/--The pullback along a composition is the composition of the pullback maps.-/ | |
@[simp] lemma comap_comp_apply (g : S β T) (f : R β S) [is_ring_hom g] [is_ring_hom f] (v : Spv T): | |
comap (g β f) v = comap f (comap g v) := | |
begin | |
apply induction_on v, clear v, | |
intros Ξβ _ v, resetI, | |
rw [comap_mk, comap_mk, comap_mk, valuation.comap_comp], | |
end | |
/--The pullback along a composition is the composition of the pullback maps.-/ | |
@[simp] lemma comap_comp (g : S β T) (f : R β S) [is_ring_hom g] [is_ring_hom f] : | |
comap (g β f) = comap f β comap g := | |
funext $ comap_comp_apply g f | |
/--The support of the pullback of an equivalence class of valuations | |
is the pullback (as ideal) of the support.-/ | |
lemma supp_comap (f : R β S) [is_ring_hom f] (v : Spv S) : | |
(v.comap f).supp = v.supp.comap f := | |
begin | |
apply induction_on v, clear v, | |
intros Ξβ _ v, resetI, | |
rw [comap_mk, supp_mk, supp_mk, valuation.comap_supp], | |
end | |
/--An element is contained in the support of the pullback of an equivalence | |
class of valuations if and only if its image is contained in the support.-/ | |
lemma mem_supp_comap (f : R β S) [is_ring_hom f] (v : Spv S) (r : R) : | |
r β (v.comap f).supp β f r β v.supp := | |
by { rw supp_comap, exact iff.rfl } | |
end comap | |
/-- The open sets generating the topology of Spv R. See [Wedhorn, Def 4.1].-/ | |
definition basic_open (r s : R) : set (Spv R) := | |
{v | v r β€ v s β§ v s β 0} | |
/-- The topology on the valuation spectrum of a ring. -/ | |
instance : topological_space (Spv R) := | |
topological_space.generate_from {U : set (Spv R) | β r s : R, U = basic_open r s} | |
lemma mk_mem_basic_open {r s : R} (v : valuation R Ξβ) : | |
mk v β basic_open r s β v r β€ v s β§ v s β 0 := | |
begin | |
apply and_congr, | |
{ apply out_mk, }, | |
{ apply (out_mk v).ne_zero, }, | |
end | |
end Spv | |