@@ -504,6 +504,7 @@ variable (v) in
504504 preuniformizer.-/
505505@[ext]
506506structure Preuniformizer where
507+ /-- The integer underlying a `Preuniformizer` -/
507508 val : v.integer
508509 valuation_gt_one : v.IsPreuniformizer val
509510
@@ -575,6 +576,7 @@ variable (vR) in
575576 uniformizer.-/
576577@[ext]
577578structure Uniformizer where
579+ /-- The integer underlying a `Preuniformizer` -/
578580 val : vR.integer
579581 valuation_eq_gen : IsUniformizer vR val
580582
@@ -641,7 +643,6 @@ local notation "K₀" => v.valuationSubring
641643
642644section IsNontrivial
643645
644-
645646theorem exists_isPreuniformizer_of_isNontrivial [v.IsNontrivial] [IsCyclic Γˣ] :
646647 ∃ π : K₀, IsPreuniformizer v (π : K) := by
647648 simp only [isPreuniformizer_iff, Subtype.exists, mem_valuationSubring_iff, exists_prop]
@@ -710,7 +711,7 @@ theorem IsUniformizer.isPreuniformizer {π : K} (hπ : IsUniformizer v π) :
710711 exact (unitsMapRange_eq_top v).symm
711712
712713/-- A constructor for preuniformizers. -/
713- def Uniformizer.to_preuniformizer (π : Uniformizer v) : Preuniformizer v where
714+ def Uniformizer.toPreuniformizer (π : Uniformizer v) : Preuniformizer v where
714715 val := π.val
715716 valuation_gt_one := IsUniformizer.isPreuniformizer π.2
716717
@@ -720,26 +721,26 @@ section IsDiscrete
720721
721722variable {v} [IsDiscrete v]
722723--**FAE** : In the following, shuold we assume `[Nontrivial Γˣ] [IsCyclic Γˣ]` instead of `IsDiscrete`?
723-
724724/- In the following theorem, we don't single out the assumption `IsPreuniformizer v π` to be able to
725725add the two `haveI` assumptions. -/
726726theorem IsPreuniformizer.isUniformizer {π : K} :
727727 haveI := IsDiscrete.nontrivial_value_group v
728728 haveI := IsDiscrete.cyclic_value_group v
729729 IsPreuniformizer v π → IsUniformizer v π := by
730730 intro hπ
731- have := IsDiscrete.nontrivial_value_group v
732- have := IsDiscrete.cyclic_value_group v
731+ haveI := IsDiscrete.nontrivial_value_group v
732+ haveI := IsDiscrete.cyclic_value_group v
733733 rw [isUniformizer_iff, isPreuniformizer_iff.mp hπ, genLTOne_eq_of_top]
734734 congr
735735 exact unitsMapRange_eq_top v
736736
737+
737738theorem isUniformizer_iff_isPreuniformizer {π : K} :
738739 haveI := IsDiscrete.nontrivial_value_group v
739740 haveI := IsDiscrete.cyclic_value_group v
740741 IsUniformizer v π ↔ IsPreuniformizer v π :=
741- have := IsDiscrete.cyclic_value_group v
742- have := IsDiscrete.nontrivial_value_group v
742+ haveI := IsDiscrete.cyclic_value_group v
743+ haveI := IsDiscrete.nontrivial_value_group v
743744 ⟨fun hπ ↦ IsUniformizer.isPreuniformizer hπ, fun hπ ↦ IsPreuniformizer.isUniformizer hπ⟩
744745
745746/-- A constructor for uniformizers. -/
@@ -748,8 +749,8 @@ def Preuniformizer.to_uniformizer :
748749 haveI := IsDiscrete.cyclic_value_group v
749750 Preuniformizer v → Uniformizer v := by
750751 intro π
751- have := IsDiscrete.nontrivial_value_group v
752- have := IsDiscrete.cyclic_value_group v
752+ haveI := IsDiscrete.nontrivial_value_group v
753+ haveI := IsDiscrete.cyclic_value_group v
753754 apply Uniformizer.mk
754755 exact IsPreuniformizer.isUniformizer π.2
755756
@@ -785,7 +786,6 @@ theorem associated_of_isPreuniformizer (π₁ π₂ : Preuniformizer v) : Associ
785786
786787theorem pow_preuniformizer {r : K₀} (hr : r ≠ 0 ) (π : Preuniformizer v) :
787788 ∃ n : ℕ, ∃ u : K₀ˣ, r = (π.1 ^ n).1 * u.1 := by
788- have hπ := isPreuniformizer_val_generates_unitsMapRange π.2
789789 have hr₀ : v r ≠ 0 := by rw [ne_eq, zero_iff, Subring.coe_eq_zero_iff]; exact hr
790790 set vr := unitsMap v (Units.mk0 r.1 (by norm_cast)) with hvr_def
791791 have hvr : vr ∈ v.unitsMapRange := by
@@ -867,20 +867,20 @@ variable [Nontrivial Γˣ] [IsCyclic Γˣ]
867867
868868theorem associated_of_uniformizer (π₁ π₂ : Uniformizer v) : Associated π₁.1 π₂.1 :=
869869 have : IsDiscrete v := isDiscrete_of_exists_isUniformizer π₁.2
870- associated_of_isPreuniformizer (Uniformizer.to_preuniformizer π₁)
871- (Uniformizer.to_preuniformizer π₂)
870+ associated_of_isPreuniformizer (Uniformizer.toPreuniformizer π₁)
871+ (Uniformizer.toPreuniformizer π₂)
872872
873873theorem pow_uniformizer {r : K₀} (hr : r ≠ 0 ) (π : Uniformizer v) :
874874 ∃ n : ℕ, ∃ u : K₀ˣ, r = (π.1 ^ n).1 * u.1 :=
875875 have : IsDiscrete v := isDiscrete_of_exists_isUniformizer π.2
876- pow_preuniformizer hr (Uniformizer.to_preuniformizer π)
876+ pow_preuniformizer hr (Uniformizer.toPreuniformizer π)
877877
878878/-- This lemma does not assume the valuation to be discrete, although the fact
879879 that a uniformizer exists forces the condition. -/
880880theorem uniformizer_is_generator (π : Uniformizer v) :
881881 maximalIdeal v.valuationSubring = Ideal.span {π.1 } :=
882882 have : IsDiscrete v := isDiscrete_of_exists_isUniformizer π.2
883- preuniformizer_is_generator (Uniformizer.to_preuniformizer π)
883+ preuniformizer_is_generator (Uniformizer.toPreuniformizer π)
884884
885885end Uniformizer
886886
@@ -893,18 +893,18 @@ theorem isUniformizer_is_generator [Nontrivial Γˣ] [IsCyclic Γˣ] {π : v.val
893893theorem pow_uniformizer_is_pow_generator [Nontrivial Γˣ] [IsCyclic Γˣ] (π : Uniformizer v)
894894 (n : ℕ) : maximalIdeal v.valuationSubring ^ n = Ideal.span {π.1 ^ n} := by
895895 have : IsDiscrete v := isDiscrete_of_exists_isUniformizer π.2
896- exact pow_preuniformizer_is_pow_generator (Uniformizer.to_preuniformizer π) n
896+ exact pow_preuniformizer_is_pow_generator (Uniformizer.toPreuniformizer π) n
897897
898898instance [IsDiscrete v] :
899899 haveI := IsDiscrete.cyclic_value_group v
900900 haveI := IsDiscrete.nontrivial_value_group v
901901 Nonempty (Uniformizer v) :=
902- have := IsDiscrete.cyclic_value_group v
903- have := IsDiscrete.nontrivial_value_group v
902+ haveI := IsDiscrete.cyclic_value_group v
903+ haveI := IsDiscrete.nontrivial_value_group v
904904 ⟨⟨(exists_isUniformizer_of_isDiscrete v).choose,
905905 (exists_isUniformizer_of_isDiscrete v).choose_spec⟩⟩
906906
907- theorem not_isField [IsNontrivial v] [Nontrivial Γˣ] [ IsCyclic Γˣ] : ¬ IsField K₀ := by
907+ theorem not_isField [IsNontrivial v] [IsCyclic Γˣ] : ¬ IsField K₀ := by
908908 obtain ⟨π, hπ⟩ := exists_isPreuniformizer_of_isNontrivial v
909909 rintro ⟨-, -, h⟩
910910 have := isPreuniformizer_ne_zero hπ
@@ -913,7 +913,8 @@ theorem not_isField [IsNontrivial v] [Nontrivial Γˣ] [IsCyclic Γˣ] : ¬ IsFi
913913 rw [← isUnit_iff_exists_inv] at h
914914 exact isPreuniformizer_not_isUnit hπ h
915915
916- theorem _root_.Valuation.isPreuniformizer_of_generator [IsNontrivial v] [Nontrivial Γˣ] [IsCyclic Γˣ]
916+
917+ theorem _root_.Valuation.isPreuniformizer_of_generator [IsNontrivial v] [IsCyclic Γˣ]
917918 {r : K₀} (hr : maximalIdeal v.valuationSubring = Ideal.span {r}) :
918919 IsPreuniformizer v r := by
919920 have hr₀ : r ≠ 0 := by
@@ -933,7 +934,6 @@ theorem isUniformizer_of_generator [IsDiscrete v] {r : K₀}
933934 IsUniformizer v r := by
934935 rw [isUniformizer_iff_isPreuniformizer]
935936 have := IsDiscrete.cyclic_value_group v
936- have := IsDiscrete.nontrivial_value_group v
937937 exact isPreuniformizer_of_generator v hr
938938
939939/- **TODO** : reinstate if needed -/
@@ -981,18 +981,28 @@ section RankOne
981981
982982open Valuation
983983
984- variable [v.IsNontrivial]
984+ variable [v.IsDiscrete]
985+ -- variable [ v.IsNontrivial ] **FAE** This was the old assumption, do you prefer that one?
985986
987+ open Classical in
986988noncomputable instance _root_.DiscreteValuation.rankOne : RankOne v where
987- hom := sorry --WithZeroMulInt.toNNReal (base_ne_zero K v)
988- strictMono' := sorry --WithZeroMulInt.toNNReal_strictMono (one_lt_base K v)
989+ hom := by
990+ let φ := choice <| IsDiscrete.nonempty_mulOrderIso_multiplicative_int v
991+ use (WithZeroMulInt.toNNReal (base_ne_zero K v)).comp (φ : Γ →*₀ ℤₘ₀) <;> simp
992+ strictMono' := by
993+ have := WithZeroMulInt.toNNReal_strictMono (one_lt_base K v)
994+ simp
995+ exact StrictMono.comp this <| OrderMonoidIso.strictMono ..
989996 nontrivial' := by
990- sorry
991- -- obtain ⟨π, hπ⟩ := exists_isPreuniformizer_of_isNontrivial v
992- -- exact
993- -- ⟨π, ne_of_gt (isPreuniformizer_val_pos hπ), ne_of_lt (isPreuniformizer_val_lt_one hπ)⟩
997+ have := IsDiscrete.nontrivial_value_group v
998+ have := IsDiscrete.cyclic_value_group v
999+ use (exists_isUniformizer_of_isDiscrete (v := v)).choose
1000+ rw [(exists_isUniformizer_of_isDiscrete _).choose_spec]
1001+ exact ⟨Units.ne_zero _, ne_of_lt <| (⊤ : Subgroup Γˣ).genLTOne_lt_one⟩
1002+
9941003
995- /- **TODO** : reinstate after fixing the above instance (with updated RHS). -/
1004+ /- **TODO** : reinstate after fixing the above instance (with updated RHS).
1005+ **FAE** It does not look very nice...-/
9961006--theorem rankOne_hom_def : RankOne.hom v = WithZeroMulInt.toNNReal (base_ne_zero K v) := rfl
9971007
9981008end RankOne
@@ -1021,7 +1031,7 @@ theorem integer_isPrincipalIdealRing [v.IsNontrivial] [IsCyclic Γˣ] : IsPrinci
10211031 ⟨fun I ↦ ideal_isPrincipal v I⟩
10221032
10231033/-- This is Chapter I, Section 1, Proposition 1 in Serre's Local Fields -/
1024- instance dvr_of_isDiscrete [v.IsNontrivial] [IsCyclic Γˣ] [Nontrivial Γˣ] :
1034+ instance dvr_of_isDiscrete [v.IsNontrivial] [IsCyclic Γˣ] :
10251035 IsDiscreteValuationRing K₀ where
10261036 toIsPrincipalIdealRing := integer_isPrincipalIdealRing v
10271037 toIsLocalRing := inferInstance
@@ -1078,18 +1088,13 @@ theorem exists_of_le_one {x : FractionRing A} (H : Valued.v x ≤ (1 : ℤₘ₀
10781088 have π_lt_one :=
10791089 (intValuation_lt_one_iff_dvd (maximalIdeal A) π).mpr
10801090 (dvd_of_eq ((irreducible_iff_uniformizer _).mp hπ))
1081- rw [← intValuation_apply] at π_lt_one
10821091 have : (IsDiscreteValuationRing.maximalIdeal A).intValuation π ≠ 0 :=
10831092 intValuation_ne_zero _ _ hπ.ne_zero
10841093 zify
1085- rw [← sub_nonneg]
1086- sorry
1087- /- rw [← coe_unitsMap this, ← WithZero.coe_one] at H π_lt_one
1088- rw [div_eq_mul_inv, ← WithZero.coe_pow, ← WithZero.coe_pow, ← WithZero.coe_inv,
1089- ← zpow_natCast, ← zpow_natCast, ← WithZero.coe_mul, WithZero.coe_le_coe, ← zpow_sub,
1090- ← ofAdd_zero, ← ofAdd_toAdd (unitsMap _ ^ ((n : ℤ) - (m))), ofAdd_le, Int.toAdd_zpow] at H
1091- apply nonneg_of_mul_nonpos_right H
1092- rwa [← toAdd_one, toAdd_lt, ← WithZero.coe_lt_coe] -/
1094+ rw [← WithZero.coe_one, div_eq_mul_inv, ← zpow_natCast, ← zpow_natCast, ← ofAdd_zero, ← zpow_neg, ← zpow_add₀,
1095+ ← sub_eq_add_neg] at H
1096+ rw [← sub_nonneg, ← zpow_le_one_iff_right_of_lt_one₀ _ π_lt_one]
1097+ exacts [H, zero_lt_iff.mpr this, this]
10931098 use u * π ^ (n - m) * w.2
10941099 simp only [← h_frac, Units.inv_eq_val_inv, _root_.map_mul, _root_.map_pow, map_units_inv,
10951100 mul_assoc, mul_div_assoc ((algebraMap A _) ↑u) _ _]
@@ -1102,13 +1107,15 @@ theorem exists_of_le_one {x : FractionRing A} (H : Valued.v x ≤ (1 : ℤₘ₀
11021107 rw [mem_nonZeroDivisors_iff_ne_zero]
11031108 exacts [hπ.ne_zero, valuation_le_one (maximalIdeal A), valuation_le_one (maximalIdeal A)]
11041109
1110+ variable {A}
1111+
11051112theorem _root_.Valuation.algebraMap_eq_integers :
11061113 Subring.map (algebraMap A (FractionRing A)) ⊤ = Valued.v.valuationSubring.toSubring := by
11071114 ext
11081115 refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
11091116 · obtain ⟨_, _, rfl⟩ := Subring.mem_map.mp h
11101117 apply valuation_le_one
1111- · obtain ⟨y, rfl⟩ := exists_of_le_one h
1118+ · obtain ⟨y, rfl⟩ := exists_of_le_one _ h
11121119 rw [Subring.mem_map]
11131120 exact ⟨y, mem_top _, rfl⟩
11141121
@@ -1119,7 +1126,7 @@ noncomputable def dvrEquivUnitBall :
11191126 (topEquiv.symm.trans (equivMapOfInjective ⊤ (algebraMap A (FractionRing A))
11201127 (IsFractionRing.injective A _))).trans (RingEquiv.subringCongr algebraMap_eq_integers)
11211128
1122- end Field
1129+ -- end Field
11231130
11241131end Valuation
11251132
@@ -1146,7 +1153,7 @@ def IsUniformizer := Valuation.IsUniformizer hv.v
11461153def Uniformizer := Valuation.Uniformizer hv.v
11471154
11481155instance [hv : Valued K ℤₘ₀] [IsDiscrete hv.v] : Nonempty (Uniformizer K) :=
1149- sorry /- ⟨⟨(exists_isUniformizer_of_isDiscrete hv.v).choose,
1150- (exists_isUniformizer_of_isDiscrete hv.v).choose_spec⟩⟩ -/
1156+ ⟨⟨(exists_isUniformizer_of_isDiscrete hv.v).choose,
1157+ (exists_isUniformizer_of_isDiscrete hv.v).choose_spec⟩⟩
11511158
11521159end DiscretelyValued
0 commit comments