ring_theory.witt_vector.discrete_valuation_ring ⟷ Mathlib.RingTheory.WittVector.DiscreteValuationRing

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -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 _)) _
Diff
@@ -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"
 
Diff
@@ -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
Diff
@@ -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.
Diff
@@ -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
 
Diff
@@ -38,9 +38,6 @@ namespace WittVector
 
 variable {p : β„•} [hp : Fact p.Prime]
 
-include hp
-
--- mathport name: exprπ•Ž
 local notation "π•Ž" => WittVector p
 
 section CommRing
Diff
@@ -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
Diff
@@ -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
Diff
@@ -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₁
Diff
@@ -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
Diff
@@ -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,
Diff
@@ -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
Diff
@@ -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
 
 /-!

Changes in mathlib4

mathlib3
mathlib4
feat: The support of 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

Diff
@@ -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
Chore: Move Units lemmas earlier (#9461)

Part of #9411

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Diff
@@ -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!)
chore: bump to v4.3.0-rc2 (#8366)

PR contents

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.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

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).

leanprover/lean4#2722

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}).

leanprover/lean4#2783

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:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[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>

Diff
@@ -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]
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -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
chore: regularize HPow.hPow porting notes (#6465)
Diff
@@ -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
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -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
feat: port RingTheory.WittVector.DiscreteValuationRing (#5557)

Dependencies 10 + 689

690 files ported (98.6%)
282252 lines ported (98.8%)
Show graph

The unported dependencies are