ring_theory.witt_vector.discrete_valuation_ring
β·
Mathlib.RingTheory.WittVector.DiscreteValuationRing
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -119,16 +119,16 @@ theorem irreducible : Irreducible (p : π k) :=
simpa only [constant_coeff_apply, coeff_p_zero, not_isUnit_zero] using
(constant_coeff : WittVector p k β+* _).isUnit_map hp
refine' β¨hp, fun a b hab => _β©
- obtain β¨ha0, hb0β© : a β 0 β§ b β 0 := by rw [β mul_ne_zero_iff]; intro h; rw [h] at hab ;
+ obtain β¨ha0, hb0β© : a β 0 β§ b β 0 := by rw [β mul_ne_zero_iff]; intro h; rw [h] at hab;
exact p_nonzero p k hab
obtain β¨m, a, ha, rflβ© := verschiebung_nonzero ha0
obtain β¨n, b, hb, rflβ© := verschiebung_nonzero hb0
cases m; Β· exact Or.inl (is_unit_of_coeff_zero_ne_zero a ha)
cases n; Β· exact Or.inr (is_unit_of_coeff_zero_ne_zero b hb)
- rw [iterate_verschiebung_mul] at hab
- apply_fun fun x => coeff x 1 at hab
+ rw [iterate_verschiebung_mul] at hab
+ apply_fun fun x => coeff x 1 at hab
simp only [coeff_p_one, Nat.add_succ, add_comm _ n, Function.iterate_succ', Function.comp_apply,
- verschiebung_coeff_add_one, verschiebung_coeff_zero] at hab
+ verschiebung_coeff_add_one, verschiebung_coeff_zero] at hab
exact (one_ne_zero hab).elim
#align witt_vector.irreducible WittVector.irreducible
-/
@@ -145,10 +145,10 @@ theorem exists_eq_pow_p_mul (a : π k) (ha : a β 0) :
by
obtain β¨m, c, hc, hcmβ© := WittVector.verschiebung_nonzero ha
obtain β¨b, rflβ© := (frobenius_bijective p k).Surjective.iterate m c
- rw [WittVector.iterate_frobenius_coeff] at hc
+ rw [WittVector.iterate_frobenius_coeff] at hc
have := congr_fun (witt_vector.verschiebung_frobenius_comm.comp_iterate m) b
- simp only [Function.comp_apply] at this
- rw [β this] at hcm
+ simp only [Function.comp_apply] at this
+ rw [β this] at hcm
refine' β¨m, b, _, _β©
Β· contrapose! hc
have : 0 < p ^ m := pow_pos (Nat.Prime.pos (Fact.out _)) _
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2022 Robert Y. Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis, Heather Macbeth, Johan Commelin
-/
-import Mathbin.RingTheory.WittVector.Domain
-import Mathbin.RingTheory.WittVector.MulCoeff
-import Mathbin.RingTheory.DiscreteValuationRing.Basic
-import Mathbin.Tactic.LinearCombination
+import RingTheory.WittVector.Domain
+import RingTheory.WittVector.MulCoeff
+import RingTheory.DiscreteValuationRing.Basic
+import Tactic.LinearCombination
#align_import ring_theory.witt_vector.discrete_valuation_ring from "leanprover-community/mathlib"@"9240e8be927a0955b9a82c6c85ef499ee3a626b8"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2022 Robert Y. Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis, Heather Macbeth, Johan Commelin
-
-! This file was ported from Lean 3 source module ring_theory.witt_vector.discrete_valuation_ring
-! leanprover-community/mathlib commit 9240e8be927a0955b9a82c6c85ef499ee3a626b8
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.RingTheory.WittVector.Domain
import Mathbin.RingTheory.WittVector.MulCoeff
import Mathbin.RingTheory.DiscreteValuationRing.Basic
import Mathbin.Tactic.LinearCombination
+#align_import ring_theory.witt_vector.discrete_valuation_ring from "leanprover-community/mathlib"@"9240e8be927a0955b9a82c6c85ef499ee3a626b8"
+
/-!
# Witt vectors over a perfect ring
mathlib commit https://github.com/leanprover-community/mathlib/commit/9240e8be927a0955b9a82c6c85ef499ee3a626b8
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis, Heather Macbeth, Johan Commelin
! This file was ported from Lean 3 source module ring_theory.witt_vector.discrete_valuation_ring
-! leanprover-community/mathlib commit c163ec99dfc664628ca15d215fce0a5b9c265b68
+! leanprover-community/mathlib commit 9240e8be927a0955b9a82c6c85ef499ee3a626b8
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -17,6 +17,9 @@ import Mathbin.Tactic.LinearCombination
# Witt vectors over a perfect ring
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file establishes that Witt vectors over a perfect field are a discrete valuation ring.
When `k` is a perfect ring, a nonzero `a : π k` can be written as `p^m * b` for some `m : β` and
`b : π k` with nonzero 0th coefficient.
mathlib commit https://github.com/leanprover-community/mathlib/commit/8b981918a93bc45a8600de608cde7944a80d92b9
@@ -44,12 +44,15 @@ section CommRing
variable {k : Type _} [CommRing k] [CharP k p]
+#print WittVector.succNthValUnits /-
/-- This is the `n+1`st coefficient of our inverse. -/
def succNthValUnits (n : β) (a : Units k) (A : π k) (bs : Fin (n + 1) β k) : k :=
-β(aβ»ΒΉ ^ p ^ (n + 1)) *
(A.coeff (n + 1) * β(aβ»ΒΉ ^ p ^ (n + 1)) + nthRemainder p n (truncateFun (n + 1) A) bs)
#align witt_vector.succ_nth_val_units WittVector.succNthValUnits
+-/
+#print WittVector.inverseCoeff /-
/--
Recursively defines the sequence of coefficients for the inverse to a Witt vector whose first entry
is a unit.
@@ -59,7 +62,9 @@ noncomputable def inverseCoeff (a : Units k) (A : π k) : β β k
| n + 1 => succNthValUnits n a A fun i => inverse_coeff i.val
decreasing_by apply Fin.is_lt
#align witt_vector.inverse_coeff WittVector.inverseCoeff
+-/
+#print WittVector.mkUnit /-
/--
Upgrade a Witt vector `A` whose first entry `A.coeff 0` is a unit to be, itself, a unit in `π k`.
-/
@@ -80,11 +85,14 @@ def mkUnit {a : Units k} {A : π k} (hA : A.coeff 0 = a) : Units (π k) :=
one_coeff_eq_of_pos, Nat.succ_pos', H_coeff, ha_inv, ha, inv_pow]
ring!)
#align witt_vector.mk_unit WittVector.mkUnit
+-/
+#print WittVector.coe_mkUnit /-
@[simp]
theorem coe_mkUnit {a : Units k} {A : π k} (hA : A.coeff 0 = a) : (mkUnit hA : π k) = A :=
rfl
#align witt_vector.coe_mk_unit WittVector.coe_mkUnit
+-/
end CommRing
@@ -92,15 +100,18 @@ section Field
variable {k : Type _} [Field k] [CharP k p]
+#print WittVector.isUnit_of_coeff_zero_ne_zero /-
theorem isUnit_of_coeff_zero_ne_zero (x : π k) (hx : x.coeff 0 β 0) : IsUnit x :=
by
let y : kΛ£ := Units.mk0 (x.coeff 0) hx
have hy : x.coeff 0 = y := rfl
exact (mk_unit hy).IsUnit
#align witt_vector.is_unit_of_coeff_zero_ne_zero WittVector.isUnit_of_coeff_zero_ne_zero
+-/
variable (p)
+#print WittVector.irreducible /-
theorem irreducible : Irreducible (p : π k) :=
by
have hp : Β¬IsUnit (p : π k) := by
@@ -120,6 +131,7 @@ theorem irreducible : Irreducible (p : π k) :=
verschiebung_coeff_add_one, verschiebung_coeff_zero] at hab
exact (one_ne_zero hab).elim
#align witt_vector.irreducible WittVector.irreducible
+-/
end Field
@@ -127,6 +139,7 @@ section PerfectRing
variable {k : Type _} [CommRing k] [CharP k p] [PerfectRing k p]
+#print WittVector.exists_eq_pow_p_mul /-
theorem exists_eq_pow_p_mul (a : π k) (ha : a β 0) :
β (m : β) (b : π k), b.coeff 0 β 0 β§ a = p ^ m * b :=
by
@@ -145,6 +158,7 @@ theorem exists_eq_pow_p_mul (a : π k) (ha : a β 0) :
ext1 x
rw [mul_comm, β WittVector.verschiebung_frobenius x]
#align witt_vector.exists_eq_pow_p_mul WittVector.exists_eq_pow_p_mul
+-/
end PerfectRing
@@ -152,6 +166,7 @@ section PerfectField
variable {k : Type _} [Field k] [CharP k p] [PerfectRing k p]
+#print WittVector.exists_eq_pow_p_mul' /-
theorem exists_eq_pow_p_mul' (a : π k) (ha : a β 0) : β (m : β) (b : Units (π k)), a = p ^ m * b :=
by
obtain β¨m, b, hβ, hββ© := exists_eq_pow_p_mul a ha
@@ -159,7 +174,9 @@ theorem exists_eq_pow_p_mul' (a : π k) (ha : a β 0) : β (m : β) (b : Un
have hbβ : b.coeff 0 = bβ := rfl
exact β¨m, mk_unit hbβ, hββ©
#align witt_vector.exists_eq_pow_p_mul' WittVector.exists_eq_pow_p_mul'
+-/
+#print WittVector.discreteValuationRing /-
/-
Note: The following lemma should be an instance, but it seems to cause some
exponential blowups in certain typeclass resolution problems.
@@ -175,6 +192,7 @@ theorem discreteValuationRing : DiscreteValuationRing (π k) :=
obtain β¨n, b, hbβ© := exists_eq_pow_p_mul' x hx
exact β¨n, b, hb.symmβ©)
#align witt_vector.discrete_valuation_ring WittVector.discreteValuationRing
+-/
end PerfectField
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -38,9 +38,6 @@ namespace WittVector
variable {p : β} [hp : Fact p.Prime]
-include hp
-
--- mathport name: exprπ
local notation "π" => WittVector p
section CommRing
mathlib commit https://github.com/leanprover-community/mathlib/commit/13361559d66b84f80b6d5a1c4a26aa5054766725
@@ -67,7 +67,7 @@ decreasing_by apply Fin.is_lt
Upgrade a Witt vector `A` whose first entry `A.coeff 0` is a unit to be, itself, a unit in `π k`.
-/
def mkUnit {a : Units k} {A : π k} (hA : A.coeff 0 = a) : Units (π k) :=
- Units.mkOfMulEqOne A (WittVector.mk p (inverseCoeff a A))
+ Units.mkOfMulEqOne A (WittVector.mk' p (inverseCoeff a A))
(by
ext n
induction' n with n ih
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -118,7 +118,7 @@ theorem irreducible : Irreducible (p : π k) :=
cases m; Β· exact Or.inl (is_unit_of_coeff_zero_ne_zero a ha)
cases n; Β· exact Or.inr (is_unit_of_coeff_zero_ne_zero b hb)
rw [iterate_verschiebung_mul] at hab
- apply_fun fun x => coeff x 1 at hab
+ apply_fun fun x => coeff x 1 at hab
simp only [coeff_p_one, Nat.add_succ, add_comm _ n, Function.iterate_succ', Function.comp_apply,
verschiebung_coeff_add_one, verschiebung_coeff_zero] at hab
exact (one_ne_zero hab).elim
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -59,7 +59,8 @@ is a unit.
-/
noncomputable def inverseCoeff (a : Units k) (A : π k) : β β k
| 0 => βaβ»ΒΉ
- | n + 1 => succNthValUnits n a A fun i => inverse_coeff i.val decreasing_by apply Fin.is_lt
+ | n + 1 => succNthValUnits n a A fun i => inverse_coeff i.val
+decreasing_by apply Fin.is_lt
#align witt_vector.inverse_coeff WittVector.inverseCoeff
/--
@@ -110,16 +111,16 @@ theorem irreducible : Irreducible (p : π k) :=
simpa only [constant_coeff_apply, coeff_p_zero, not_isUnit_zero] using
(constant_coeff : WittVector p k β+* _).isUnit_map hp
refine' β¨hp, fun a b hab => _β©
- obtain β¨ha0, hb0β© : a β 0 β§ b β 0 := by rw [β mul_ne_zero_iff]; intro h; rw [h] at hab;
+ obtain β¨ha0, hb0β© : a β 0 β§ b β 0 := by rw [β mul_ne_zero_iff]; intro h; rw [h] at hab ;
exact p_nonzero p k hab
obtain β¨m, a, ha, rflβ© := verschiebung_nonzero ha0
obtain β¨n, b, hb, rflβ© := verschiebung_nonzero hb0
cases m; Β· exact Or.inl (is_unit_of_coeff_zero_ne_zero a ha)
cases n; Β· exact Or.inr (is_unit_of_coeff_zero_ne_zero b hb)
- rw [iterate_verschiebung_mul] at hab
- apply_fun fun x => coeff x 1 at hab
+ rw [iterate_verschiebung_mul] at hab
+ apply_fun fun x => coeff x 1 at hab
simp only [coeff_p_one, Nat.add_succ, add_comm _ n, Function.iterate_succ', Function.comp_apply,
- verschiebung_coeff_add_one, verschiebung_coeff_zero] at hab
+ verschiebung_coeff_add_one, verschiebung_coeff_zero] at hab
exact (one_ne_zero hab).elim
#align witt_vector.irreducible WittVector.irreducible
@@ -130,14 +131,14 @@ section PerfectRing
variable {k : Type _} [CommRing k] [CharP k p] [PerfectRing k p]
theorem exists_eq_pow_p_mul (a : π k) (ha : a β 0) :
- β (m : β)(b : π k), b.coeff 0 β 0 β§ a = p ^ m * b :=
+ β (m : β) (b : π k), b.coeff 0 β 0 β§ a = p ^ m * b :=
by
obtain β¨m, c, hc, hcmβ© := WittVector.verschiebung_nonzero ha
obtain β¨b, rflβ© := (frobenius_bijective p k).Surjective.iterate m c
- rw [WittVector.iterate_frobenius_coeff] at hc
+ rw [WittVector.iterate_frobenius_coeff] at hc
have := congr_fun (witt_vector.verschiebung_frobenius_comm.comp_iterate m) b
- simp only [Function.comp_apply] at this
- rw [β this] at hcm
+ simp only [Function.comp_apply] at this
+ rw [β this] at hcm
refine' β¨m, b, _, _β©
Β· contrapose! hc
have : 0 < p ^ m := pow_pos (Nat.Prime.pos (Fact.out _)) _
@@ -154,7 +155,7 @@ section PerfectField
variable {k : Type _} [Field k] [CharP k p] [PerfectRing k p]
-theorem exists_eq_pow_p_mul' (a : π k) (ha : a β 0) : β (m : β)(b : Units (π k)), a = p ^ m * b :=
+theorem exists_eq_pow_p_mul' (a : π k) (ha : a β 0) : β (m : β) (b : Units (π k)), a = p ^ m * b :=
by
obtain β¨m, b, hβ, hββ© := exists_eq_pow_p_mul a ha
let bβ := Units.mk0 (b.coeff 0) hβ
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -78,7 +78,7 @@ def mkUnit {a : Units k} {A : π k} (hA : A.coeff 0 = a) : Units (π k) :=
linear_combination (norm := skip) -H_coeff * H
have ha : (a : k) ^ p ^ (n + 1) = β(a ^ p ^ (n + 1)) := by norm_cast
have ha_inv : (βaβ»ΒΉ : k) ^ p ^ (n + 1) = β(a ^ p ^ (n + 1))β»ΒΉ := by exact_mod_cast inv_pow _ _
- simp only [nth_remainder_spec, inverse_coeff, succ_nth_val_units, hA, [anonymous],
+ simp only [nth_remainder_spec, inverse_coeff, succ_nth_val_units, hA, Fin.val_eq_coe,
one_coeff_eq_of_pos, Nat.succ_pos', H_coeff, ha_inv, ha, inv_pow]
ring!)
#align witt_vector.mk_unit WittVector.mkUnit
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -110,17 +110,12 @@ theorem irreducible : Irreducible (p : π k) :=
simpa only [constant_coeff_apply, coeff_p_zero, not_isUnit_zero] using
(constant_coeff : WittVector p k β+* _).isUnit_map hp
refine' β¨hp, fun a b hab => _β©
- obtain β¨ha0, hb0β© : a β 0 β§ b β 0 := by
- rw [β mul_ne_zero_iff]
- intro h
- rw [h] at hab
+ obtain β¨ha0, hb0β© : a β 0 β§ b β 0 := by rw [β mul_ne_zero_iff]; intro h; rw [h] at hab;
exact p_nonzero p k hab
obtain β¨m, a, ha, rflβ© := verschiebung_nonzero ha0
obtain β¨n, b, hb, rflβ© := verschiebung_nonzero hb0
- cases m
- Β· exact Or.inl (is_unit_of_coeff_zero_ne_zero a ha)
- cases n
- Β· exact Or.inr (is_unit_of_coeff_zero_ne_zero b hb)
+ cases m; Β· exact Or.inl (is_unit_of_coeff_zero_ne_zero a ha)
+ cases n; Β· exact Or.inr (is_unit_of_coeff_zero_ne_zero b hb)
rw [iterate_verschiebung_mul] at hab
apply_fun fun x => coeff x 1 at hab
simp only [coeff_p_one, Nat.add_succ, add_comm _ n, Function.iterate_succ', Function.comp_apply,
mathlib commit https://github.com/leanprover-community/mathlib/commit/75e7fca56381d056096ce5d05e938f63a6567828
@@ -176,7 +176,7 @@ https://github.com/leanprover/lean4/issues/1102
/-- The ring of Witt Vectors of a perfect field of positive characteristic is a DVR.
-/
theorem discreteValuationRing : DiscreteValuationRing (π k) :=
- DiscreteValuationRing.of_hasUnitMulPowIrreducibleFactorization
+ DiscreteValuationRing.ofHasUnitMulPowIrreducibleFactorization
(by
refine' β¨p, Irreducible p, fun x hx => _β©
obtain β¨n, b, hbβ© := exists_eq_pow_p_mul' x hx
mathlib commit https://github.com/leanprover-community/mathlib/commit/92c69b77c5a7dc0f7eeddb552508633305157caa
@@ -4,13 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis, Heather Macbeth, Johan Commelin
! This file was ported from Lean 3 source module ring_theory.witt_vector.discrete_valuation_ring
-! leanprover-community/mathlib commit 4e1eeebe63ac6d44585297e89c6e7ee5cbda487a
+! leanprover-community/mathlib commit c163ec99dfc664628ca15d215fce0a5b9c265b68
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.RingTheory.WittVector.Domain
import Mathbin.RingTheory.WittVector.MulCoeff
-import Mathbin.RingTheory.DiscreteValuationRing
+import Mathbin.RingTheory.DiscreteValuationRing.Basic
import Mathbin.Tactic.LinearCombination
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
f ^ n
(#9617)
This involves moving lemmas from Algebra.GroupPower.Ring
to Algebra.GroupWithZero.Basic
and changing some 0 < n
assumptions to n β 0
.
From LeanAPAP
@@ -128,8 +128,7 @@ theorem exists_eq_pow_p_mul (a : π k) (ha : a β 0) :
rw [β this] at hcm
refine' β¨m, b, _, _β©
Β· contrapose! hc
- have : 0 < p ^ m := pow_pos (Nat.Prime.pos Fact.out) _
- simp [hc, zero_pow this]
+ simp [hc, zero_pow $ pow_ne_zero _ hp.out.ne_zero]
Β· simp_rw [β mul_left_iterate (p : π k) m]
convert hcm using 2
ext1 x
@@ -68,7 +68,7 @@ def mkUnit {a : Units k} {A : π k} (hA : A.coeff 0 = a) : Units (π k) :=
have H := Units.mul_inv (a ^ p ^ (n + 1))
linear_combination (norm := skip) -H_coeff * H
have ha : (a : k) ^ p ^ (n + 1) = β(a ^ p ^ (n + 1)) := by norm_cast
- have ha_inv : (βaβ»ΒΉ : k) ^ p ^ (n + 1) = β(a ^ p ^ (n + 1))β»ΒΉ := by norm_cast; norm_num
+ have ha_inv : (βaβ»ΒΉ : k) ^ p ^ (n + 1) = β(a ^ p ^ (n + 1))β»ΒΉ := by norm_cast
simp only [nthRemainder_spec, inverseCoeff, succNthValUnits, hA,
one_coeff_eq_of_pos, Nat.succ_pos', ha_inv, ha, inv_pow]
ring!)
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master
is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0
branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp
to (config := {decide := false})
. This makes simp
(and consequentially norm_num
) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp
or norm_num
to decide
or rfl
, or adding (config := {decide := true})
.
This changed the behaviour of simp
so that simp [f]
will only unfold "fully applied" occurrences of f
. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true })
. We may in future add a syntax for this, e.g. simp [!f]
; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true })
in some places, to recover the old behaviour@[eqns]
to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp
and Function.flip
.This change in Lean may require further changes down the line (e.g. adding the !f
syntax, and/or upstreaming the special treatment for Function.comp
and Function.flip
, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -30,8 +30,6 @@ When `k` is also a field, this `b` can be chosen to be a unit of `π k`.
noncomputable section
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
namespace WittVector
variable {p : β} [hp : Fact p.Prime]
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -40,7 +40,7 @@ local notation "π" => WittVector p
section CommRing
-variable {k : Type _} [CommRing k] [CharP k p]
+variable {k : Type*} [CommRing k] [CharP k p]
/-- This is the `n+1`st coefficient of our inverse. -/
def succNthValUnits (n : β) (a : Units k) (A : π k) (bs : Fin (n + 1) β k) : k :=
@@ -85,7 +85,7 @@ end CommRing
section Field
-variable {k : Type _} [Field k] [CharP k p]
+variable {k : Type*} [Field k] [CharP k p]
theorem isUnit_of_coeff_zero_ne_zero (x : π k) (hx : x.coeff 0 β 0) : IsUnit x := by
let y : kΛ£ := Units.mk0 (x.coeff 0) hx
@@ -118,7 +118,7 @@ end Field
section PerfectRing
-variable {k : Type _} [CommRing k] [CharP k p] [PerfectRing k p]
+variable {k : Type*} [CommRing k] [CharP k p] [PerfectRing k p]
theorem exists_eq_pow_p_mul (a : π k) (ha : a β 0) :
β (m : β) (b : π k), b.coeff 0 β 0 β§ a = (p : π k) ^ m * b := by
@@ -142,7 +142,7 @@ end PerfectRing
section PerfectField
-variable {k : Type _} [Field k] [CharP k p] [PerfectRing k p]
+variable {k : Type*} [Field k] [CharP k p] [PerfectRing k p]
theorem exists_eq_pow_p_mul' (a : π k) (ha : a β 0) :
β (m : β) (b : Units (π k)), a = (p : π k) ^ m * b := by
@@ -30,7 +30,7 @@ When `k` is also a field, this `b` can be chosen to be a unit of `π k`.
noncomputable section
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue #2220
+local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
namespace WittVector
@@ -2,17 +2,14 @@
Copyright (c) 2022 Robert Y. Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis, Heather Macbeth, Johan Commelin
-
-! This file was ported from Lean 3 source module ring_theory.witt_vector.discrete_valuation_ring
-! leanprover-community/mathlib commit c163ec99dfc664628ca15d215fce0a5b9c265b68
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.RingTheory.WittVector.Domain
import Mathlib.RingTheory.WittVector.MulCoeff
import Mathlib.RingTheory.DiscreteValuationRing.Basic
import Mathlib.Tactic.LinearCombination
+#align_import ring_theory.witt_vector.discrete_valuation_ring from "leanprover-community/mathlib"@"c163ec99dfc664628ca15d215fce0a5b9c265b68"
+
/-!
# Witt vectors over a perfect ring
The unported dependencies are