ring_theory.dedekind_domain.finite_adele_ringMathlib.RingTheory.DedekindDomain.FiniteAdeleRing

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -182,9 +182,9 @@ theorem add {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     by
     intro v hv
     rw [mem_union, mem_set_of_eq, mem_set_of_eq]
-    rw [mem_set_of_eq] at hv 
+    rw [mem_set_of_eq] at hv
     contrapose! hv
-    rw [mem_adic_completion_integers, mem_adic_completion_integers, ← max_le_iff] at hv 
+    rw [mem_adic_completion_integers, mem_adic_completion_integers, ← max_le_iff] at hv
     rw [mem_adic_completion_integers, Pi.add_apply]
     exact le_trans (valued.v.map_add_le_max' (x v) (y v)) hv
   exact (hx.union hy).Subset h_subset
@@ -200,7 +200,7 @@ theorem zero : (0 : K_hat R K).IsFiniteAdele :=
     {v : height_one_spectrum R | ¬(0 : v.adicCompletion K) ∈ v.adicCompletionIntegers K} = ∅ :=
     by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
-    rw [mem_set_of_eq] at hv ; apply hv; rw [mem_adic_completion_integers]
+    rw [mem_set_of_eq] at hv; apply hv; rw [mem_adic_completion_integers]
     have h_zero : (Valued.v (0 : v.adic_completion K) : WithZero (Multiplicative ℤ)) = 0 :=
       valued.v.map_zero'
     rw [h_zero]; exact zero_le_one' _
@@ -237,9 +237,9 @@ theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     by
     intro v hv
     rw [mem_union, mem_set_of_eq, mem_set_of_eq]
-    rw [mem_set_of_eq] at hv 
+    rw [mem_set_of_eq] at hv
     contrapose! hv
-    rw [mem_adic_completion_integers, mem_adic_completion_integers] at hv 
+    rw [mem_adic_completion_integers, mem_adic_completion_integers] at hv
     have h_mul : Valued.v (x v * y v) = Valued.v (x v) * Valued.v (y v) :=
       Valued.v.map_mul' (x v) (y v)
     rw [mem_adic_completion_integers, Pi.mul_apply, h_mul]
@@ -259,7 +259,7 @@ theorem one : (1 : K_hat R K).IsFiniteAdele :=
     {v : height_one_spectrum R | ¬(1 : v.adicCompletion K) ∈ v.adicCompletionIntegers K} = ∅ :=
     by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
-    rw [mem_set_of_eq] at hv ; apply hv; rw [mem_adic_completion_integers]
+    rw [mem_set_of_eq] at hv; apply hv; rw [mem_adic_completion_integers]
     exact le_of_eq valued.v.map_one'
   simp_rw [Pi.one_apply, h_empty]
   exact finite_empty
Diff
@@ -244,8 +244,8 @@ theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
       Valued.v.map_mul' (x v) (y v)
     rw [mem_adic_completion_integers, Pi.mul_apply, h_mul]
     exact
-      @mul_le_one' (WithZero (Multiplicative ℤ)) _ _ (OrderedCommMonoid.to_covariantClass_left _) _
-        _ hv.left hv.right
+      @mul_le_one' (WithZero (Multiplicative ℤ)) _ _ (OrderedCommMonoid.toCovariantClassLeft _) _ _
+        hv.left hv.right
   exact (hx.union hy).Subset h_subset
 #align dedekind_domain.prod_adic_completions.is_finite_adele.mul DedekindDomain.ProdAdicCompletions.IsFiniteAdele.mul
 -/
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2023 María Inés de Frutos-Fernández. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: María Inés de Frutos-Fernández
 -/
-import Mathbin.RingTheory.DedekindDomain.AdicValuation
+import RingTheory.DedekindDomain.AdicValuation
 
 #align_import ring_theory.dedekind_domain.finite_adele_ring from "leanprover-community/mathlib"@"5d0c76894ada7940957143163d7b921345474cbc"
 
Diff
@@ -280,7 +280,7 @@ of `adic_completion` with respect to `adic_completion_integers`. -/
 noncomputable def finiteAdeleRing : Subring (K_hat R K)
     where
   carrier := {x : K_hat R K | x.IsFiniteAdele}
-  mul_mem' _ _ hx hy := mul hx hy
+  hMul_mem' _ _ hx hy := mul hx hy
   one_mem' := one
   add_mem' _ _ hx hy := add hx hy
   zero_mem' := zero
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2023 María Inés de Frutos-Fernández. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: María Inés de Frutos-Fernández
-
-! This file was ported from Lean 3 source module ring_theory.dedekind_domain.finite_adele_ring
-! leanprover-community/mathlib commit 5d0c76894ada7940957143163d7b921345474cbc
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.RingTheory.DedekindDomain.AdicValuation
 
+#align_import ring_theory.dedekind_domain.finite_adele_ring from "leanprover-community/mathlib"@"5d0c76894ada7940957143163d7b921345474cbc"
+
 /-!
 # The finite adèle ring of a Dedekind domain
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: María Inés de Frutos-Fernández
 
 ! This file was ported from Lean 3 source module ring_theory.dedekind_domain.finite_adele_ring
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! leanprover-community/mathlib commit 5d0c76894ada7940957143163d7b921345474cbc
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -12,6 +12,9 @@ import Mathbin.RingTheory.DedekindDomain.AdicValuation
 
 /-!
 # The finite adèle ring of a Dedekind domain
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
 We define the ring of finite adèles of a Dedekind domain `R`.
 
 ## Main definitions
Diff
@@ -43,19 +43,23 @@ namespace DedekindDomain
 variable (R K : Type _) [CommRing R] [IsDomain R] [IsDedekindDomain R] [Field K] [Algebra R K]
   [IsFractionRing R K] (v : HeightOneSpectrum R)
 
+#print DedekindDomain.FiniteIntegralAdeles /-
 /-- The product of all `adic_completion_integers`, where `v` runs over the maximal ideals of `R`. -/
 def FiniteIntegralAdeles : Type _ :=
   ∀ v : HeightOneSpectrum R, v.adicCompletionIntegers K
 deriving CommRing, TopologicalSpace, Inhabited
 #align dedekind_domain.finite_integral_adeles DedekindDomain.FiniteIntegralAdeles
+-/
 
 local notation "R_hat" => FiniteIntegralAdeles
 
+#print DedekindDomain.ProdAdicCompletions /-
 /-- The product of all `adic_completion`, where `v` runs over the maximal ideals of `R`. -/
 def ProdAdicCompletions :=
   ∀ v : HeightOneSpectrum R, v.adicCompletion K
 deriving NonUnitalNonAssocRing, TopologicalSpace, TopologicalRing, CommRing, Inhabited
 #align dedekind_domain.prod_adic_completions DedekindDomain.ProdAdicCompletions
+-/
 
 local notation "K_hat" => ProdAdicCompletions
 
@@ -63,10 +67,13 @@ namespace FiniteIntegralAdeles
 
 noncomputable instance : Coe (R_hat R K) (K_hat R K) where coe x v := x v
 
+#print DedekindDomain.FiniteIntegralAdeles.coe_apply /-
 theorem coe_apply (x : R_hat R K) (v : HeightOneSpectrum R) : (x : K_hat R K) v = ↑(x v) :=
   rfl
 #align dedekind_domain.finite_integral_adeles.coe_apply DedekindDomain.FiniteIntegralAdeles.coe_apply
+-/
 
+#print DedekindDomain.FiniteIntegralAdeles.Coe.addMonoidHom /-
 /-- The inclusion of `R_hat` in `K_hat` as a homomorphism of additive monoids. -/
 @[simps]
 def Coe.addMonoidHom : AddMonoidHom (R_hat R K) (K_hat R K)
@@ -75,7 +82,9 @@ def Coe.addMonoidHom : AddMonoidHom (R_hat R K) (K_hat R K)
   map_zero' := rfl
   map_add' x y := by ext v; simp only [coe_apply, Pi.add_apply, Subring.coe_add]
 #align dedekind_domain.finite_integral_adeles.coe.add_monoid_hom DedekindDomain.FiniteIntegralAdeles.Coe.addMonoidHom
+-/
 
+#print DedekindDomain.FiniteIntegralAdeles.Coe.ringHom /-
 /-- The inclusion of `R_hat` in `K_hat` as a ring homomorphism. -/
 @[simps]
 def Coe.ringHom : RingHom (R_hat R K) (K_hat R K) :=
@@ -84,6 +93,7 @@ def Coe.ringHom : RingHom (R_hat R K) (K_hat R K) :=
     map_one' := rfl
     map_mul' := fun x y => by ext p; simp only [Pi.mul_apply, Subring.coe_mul]; rfl }
 #align dedekind_domain.finite_integral_adeles.coe.ring_hom DedekindDomain.FiniteIntegralAdeles.Coe.ringHom
+-/
 
 end FiniteIntegralAdeles
 
@@ -92,9 +102,11 @@ section AlgebraInstances
 instance : Algebra K (K_hat R K) :=
   (by infer_instance : Algebra K <| ∀ v : HeightOneSpectrum R, v.adicCompletion K)
 
+#print DedekindDomain.ProdAdicCompletions.algebra' /-
 instance ProdAdicCompletions.algebra' : Algebra R (K_hat R K) :=
   (by infer_instance : Algebra R <| ∀ v : HeightOneSpectrum R, v.adicCompletion K)
 #align dedekind_domain.prod_adic_completions.algebra' DedekindDomain.ProdAdicCompletions.algebra'
+-/
 
 instance : IsScalarTower R K (K_hat R K) :=
   (by infer_instance : IsScalarTower R K <| ∀ v : HeightOneSpectrum R, v.adicCompletion K)
@@ -102,30 +114,38 @@ instance : IsScalarTower R K (K_hat R K) :=
 instance : Algebra R (R_hat R K) :=
   (by infer_instance : Algebra R <| ∀ v : HeightOneSpectrum R, v.adicCompletionIntegers K)
 
+#print DedekindDomain.ProdAdicCompletions.algebraCompletions /-
 instance ProdAdicCompletions.algebraCompletions : Algebra (R_hat R K) (K_hat R K) :=
   (FiniteIntegralAdeles.Coe.ringHom R K).toAlgebra
 #align dedekind_domain.prod_adic_completions.algebra_completions DedekindDomain.ProdAdicCompletions.algebraCompletions
+-/
 
+#print DedekindDomain.ProdAdicCompletions.isScalarTower_completions /-
 instance ProdAdicCompletions.isScalarTower_completions : IsScalarTower R (R_hat R K) (K_hat R K) :=
   (by infer_instance :
     IsScalarTower R (∀ v : HeightOneSpectrum R, v.adicCompletionIntegers K) <|
       ∀ v : HeightOneSpectrum R, v.adicCompletion K)
 #align dedekind_domain.prod_adic_completions.is_scalar_tower_completions DedekindDomain.ProdAdicCompletions.isScalarTower_completions
+-/
 
 end AlgebraInstances
 
 namespace FiniteIntegralAdeles
 
+#print DedekindDomain.FiniteIntegralAdeles.Coe.algHom /-
 /-- The inclusion of `R_hat` in `K_hat` as an algebra homomorphism. -/
 def Coe.algHom : AlgHom R (R_hat R K) (K_hat R K) :=
   { Coe.ringHom R K with
     toFun := coe
     commutes' := fun r => rfl }
 #align dedekind_domain.finite_integral_adeles.coe.alg_hom DedekindDomain.FiniteIntegralAdeles.Coe.algHom
+-/
 
+#print DedekindDomain.FiniteIntegralAdeles.Coe.algHom_apply /-
 theorem Coe.algHom_apply (x : R_hat R K) (v : HeightOneSpectrum R) : (Coe.algHom R K) x v = x v :=
   rfl
 #align dedekind_domain.finite_integral_adeles.coe.alg_hom_apply DedekindDomain.FiniteIntegralAdeles.Coe.algHom_apply
+-/
 
 end FiniteIntegralAdeles
 
@@ -139,14 +159,17 @@ namespace ProdAdicCompletions
 
 variable {R K}
 
+#print DedekindDomain.ProdAdicCompletions.IsFiniteAdele /-
 /-- An element `x : K_hat R K` is a finite adèle if for all but finitely many height one ideals
   `v`, the component `x v` is a `v`-adic integer. -/
 def IsFiniteAdele (x : K_hat R K) :=
   ∀ᶠ v : HeightOneSpectrum R in Filter.cofinite, x v ∈ v.adicCompletionIntegers K
 #align dedekind_domain.prod_adic_completions.is_finite_adele DedekindDomain.ProdAdicCompletions.IsFiniteAdele
+-/
 
 namespace IsFiniteAdele
 
+#print DedekindDomain.ProdAdicCompletions.IsFiniteAdele.add /-
 /-- The sum of two finite adèles is a finite adèle. -/
 theorem add {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     (x + y).IsFiniteAdele :=
@@ -166,7 +189,9 @@ theorem add {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     exact le_trans (valued.v.map_add_le_max' (x v) (y v)) hv
   exact (hx.union hy).Subset h_subset
 #align dedekind_domain.prod_adic_completions.is_finite_adele.add DedekindDomain.ProdAdicCompletions.IsFiniteAdele.add
+-/
 
+#print DedekindDomain.ProdAdicCompletions.IsFiniteAdele.zero /-
 /-- The tuple `(0)_v` is a finite adèle. -/
 theorem zero : (0 : K_hat R K).IsFiniteAdele :=
   by
@@ -182,7 +207,9 @@ theorem zero : (0 : K_hat R K).IsFiniteAdele :=
   simp_rw [Pi.zero_apply, h_empty]
   exact finite_empty
 #align dedekind_domain.prod_adic_completions.is_finite_adele.zero DedekindDomain.ProdAdicCompletions.IsFiniteAdele.zero
+-/
 
+#print DedekindDomain.ProdAdicCompletions.IsFiniteAdele.neg /-
 /-- The negative of a finite adèle is a finite adèle. -/
 theorem neg {x : K_hat R K} (hx : x.IsFiniteAdele) : (-x).IsFiniteAdele :=
   by
@@ -195,7 +222,9 @@ theorem neg {x : K_hat R K} (hx : x.IsFiniteAdele) : (-x).IsFiniteAdele :=
     rw [mem_adic_completion_integers, mem_adic_completion_integers, Valuation.map_neg]
   simpa only [Pi.neg_apply, h] using hx
 #align dedekind_domain.prod_adic_completions.is_finite_adele.neg DedekindDomain.ProdAdicCompletions.IsFiniteAdele.neg
+-/
 
+#print DedekindDomain.ProdAdicCompletions.IsFiniteAdele.mul /-
 /-- The product of two finite adèles is a finite adèle. -/
 theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     (x * y).IsFiniteAdele :=
@@ -219,7 +248,9 @@ theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
         _ hv.left hv.right
   exact (hx.union hy).Subset h_subset
 #align dedekind_domain.prod_adic_completions.is_finite_adele.mul DedekindDomain.ProdAdicCompletions.IsFiniteAdele.mul
+-/
 
+#print DedekindDomain.ProdAdicCompletions.IsFiniteAdele.one /-
 /-- The tuple `(1)_v` is a finite adèle. -/
 theorem one : (1 : K_hat R K).IsFiniteAdele :=
   by
@@ -233,6 +264,7 @@ theorem one : (1 : K_hat R K).IsFiniteAdele :=
   simp_rw [Pi.one_apply, h_empty]
   exact finite_empty
 #align dedekind_domain.prod_adic_completions.is_finite_adele.one DedekindDomain.ProdAdicCompletions.IsFiniteAdele.one
+-/
 
 end IsFiniteAdele
 
@@ -242,6 +274,7 @@ open ProdAdicCompletions.IsFiniteAdele
 
 variable (R K)
 
+#print DedekindDomain.finiteAdeleRing /-
 /-- The finite adèle ring of `R` is the restricted product over all maximal ideals `v` of `R`
 of `adic_completion` with respect to `adic_completion_integers`. -/
 noncomputable def finiteAdeleRing : Subring (K_hat R K)
@@ -253,13 +286,16 @@ noncomputable def finiteAdeleRing : Subring (K_hat R K)
   zero_mem' := zero
   neg_mem' _ hx := neg hx
 #align dedekind_domain.finite_adele_ring DedekindDomain.finiteAdeleRing
+-/
 
 variable {R K}
 
+#print DedekindDomain.mem_finiteAdeleRing_iff /-
 @[simp]
 theorem mem_finiteAdeleRing_iff (x : K_hat R K) : x ∈ finiteAdeleRing R K ↔ x.IsFiniteAdele :=
   Iff.rfl
 #align dedekind_domain.mem_finite_adele_ring_iff DedekindDomain.mem_finiteAdeleRing_iff
+-/
 
 end DedekindDomain
 
Diff
@@ -49,7 +49,6 @@ def FiniteIntegralAdeles : Type _ :=
 deriving CommRing, TopologicalSpace, Inhabited
 #align dedekind_domain.finite_integral_adeles DedekindDomain.FiniteIntegralAdeles
 
--- mathport name: exprR_hat
 local notation "R_hat" => FiniteIntegralAdeles
 
 /-- The product of all `adic_completion`, where `v` runs over the maximal ideals of `R`. -/
@@ -58,7 +57,6 @@ def ProdAdicCompletions :=
 deriving NonUnitalNonAssocRing, TopologicalSpace, TopologicalRing, CommRing, Inhabited
 #align dedekind_domain.prod_adic_completions DedekindDomain.ProdAdicCompletions
 
--- mathport name: exprK_hat
 local notation "K_hat" => ProdAdicCompletions
 
 namespace FiniteIntegralAdeles
Diff
@@ -155,9 +155,9 @@ theorem add {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
   by
   rw [is_finite_adele, Filter.eventually_cofinite] at hx hy ⊢
   have h_subset :
-    { v : height_one_spectrum R | ¬(x + y) v ∈ v.adicCompletionIntegers K } ⊆
-      { v : height_one_spectrum R | ¬x v ∈ v.adicCompletionIntegers K } ∪
-        { v : height_one_spectrum R | ¬y v ∈ v.adicCompletionIntegers K } :=
+    {v : height_one_spectrum R | ¬(x + y) v ∈ v.adicCompletionIntegers K} ⊆
+      {v : height_one_spectrum R | ¬x v ∈ v.adicCompletionIntegers K} ∪
+        {v : height_one_spectrum R | ¬y v ∈ v.adicCompletionIntegers K} :=
     by
     intro v hv
     rw [mem_union, mem_set_of_eq, mem_set_of_eq]
@@ -174,7 +174,7 @@ theorem zero : (0 : K_hat R K).IsFiniteAdele :=
   by
   rw [is_finite_adele, Filter.eventually_cofinite]
   have h_empty :
-    { v : height_one_spectrum R | ¬(0 : v.adicCompletion K) ∈ v.adicCompletionIntegers K } = ∅ :=
+    {v : height_one_spectrum R | ¬(0 : v.adicCompletion K) ∈ v.adicCompletionIntegers K} = ∅ :=
     by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
     rw [mem_set_of_eq] at hv ; apply hv; rw [mem_adic_completion_integers]
@@ -204,9 +204,9 @@ theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
   by
   rw [is_finite_adele, Filter.eventually_cofinite] at hx hy ⊢
   have h_subset :
-    { v : height_one_spectrum R | ¬(x * y) v ∈ v.adicCompletionIntegers K } ⊆
-      { v : height_one_spectrum R | ¬x v ∈ v.adicCompletionIntegers K } ∪
-        { v : height_one_spectrum R | ¬y v ∈ v.adicCompletionIntegers K } :=
+    {v : height_one_spectrum R | ¬(x * y) v ∈ v.adicCompletionIntegers K} ⊆
+      {v : height_one_spectrum R | ¬x v ∈ v.adicCompletionIntegers K} ∪
+        {v : height_one_spectrum R | ¬y v ∈ v.adicCompletionIntegers K} :=
     by
     intro v hv
     rw [mem_union, mem_set_of_eq, mem_set_of_eq]
@@ -227,7 +227,7 @@ theorem one : (1 : K_hat R K).IsFiniteAdele :=
   by
   rw [is_finite_adele, Filter.eventually_cofinite]
   have h_empty :
-    { v : height_one_spectrum R | ¬(1 : v.adicCompletion K) ∈ v.adicCompletionIntegers K } = ∅ :=
+    {v : height_one_spectrum R | ¬(1 : v.adicCompletion K) ∈ v.adicCompletionIntegers K} = ∅ :=
     by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
     rw [mem_set_of_eq] at hv ; apply hv; rw [mem_adic_completion_integers]
@@ -248,7 +248,7 @@ variable (R K)
 of `adic_completion` with respect to `adic_completion_integers`. -/
 noncomputable def finiteAdeleRing : Subring (K_hat R K)
     where
-  carrier := { x : K_hat R K | x.IsFiniteAdele }
+  carrier := {x : K_hat R K | x.IsFiniteAdele}
   mul_mem' _ _ hx hy := mul hx hy
   one_mem' := one
   add_mem' _ _ hx hy := add hx hy
Diff
@@ -45,8 +45,8 @@ variable (R K : Type _) [CommRing R] [IsDomain R] [IsDedekindDomain R] [Field K]
 
 /-- The product of all `adic_completion_integers`, where `v` runs over the maximal ideals of `R`. -/
 def FiniteIntegralAdeles : Type _ :=
-  ∀ v : HeightOneSpectrum R, v.adicCompletionIntegers K deriving CommRing, TopologicalSpace,
-  Inhabited
+  ∀ v : HeightOneSpectrum R, v.adicCompletionIntegers K
+deriving CommRing, TopologicalSpace, Inhabited
 #align dedekind_domain.finite_integral_adeles DedekindDomain.FiniteIntegralAdeles
 
 -- mathport name: exprR_hat
@@ -54,8 +54,8 @@ local notation "R_hat" => FiniteIntegralAdeles
 
 /-- The product of all `adic_completion`, where `v` runs over the maximal ideals of `R`. -/
 def ProdAdicCompletions :=
-  ∀ v : HeightOneSpectrum R, v.adicCompletion K deriving NonUnitalNonAssocRing, TopologicalSpace,
-  TopologicalRing, CommRing, Inhabited
+  ∀ v : HeightOneSpectrum R, v.adicCompletion K
+deriving NonUnitalNonAssocRing, TopologicalSpace, TopologicalRing, CommRing, Inhabited
 #align dedekind_domain.prod_adic_completions DedekindDomain.ProdAdicCompletions
 
 -- mathport name: exprK_hat
@@ -153,7 +153,7 @@ namespace IsFiniteAdele
 theorem add {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     (x + y).IsFiniteAdele :=
   by
-  rw [is_finite_adele, Filter.eventually_cofinite] at hx hy⊢
+  rw [is_finite_adele, Filter.eventually_cofinite] at hx hy ⊢
   have h_subset :
     { v : height_one_spectrum R | ¬(x + y) v ∈ v.adicCompletionIntegers K } ⊆
       { v : height_one_spectrum R | ¬x v ∈ v.adicCompletionIntegers K } ∪
@@ -161,9 +161,9 @@ theorem add {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     by
     intro v hv
     rw [mem_union, mem_set_of_eq, mem_set_of_eq]
-    rw [mem_set_of_eq] at hv
+    rw [mem_set_of_eq] at hv 
     contrapose! hv
-    rw [mem_adic_completion_integers, mem_adic_completion_integers, ← max_le_iff] at hv
+    rw [mem_adic_completion_integers, mem_adic_completion_integers, ← max_le_iff] at hv 
     rw [mem_adic_completion_integers, Pi.add_apply]
     exact le_trans (valued.v.map_add_le_max' (x v) (y v)) hv
   exact (hx.union hy).Subset h_subset
@@ -177,7 +177,7 @@ theorem zero : (0 : K_hat R K).IsFiniteAdele :=
     { v : height_one_spectrum R | ¬(0 : v.adicCompletion K) ∈ v.adicCompletionIntegers K } = ∅ :=
     by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
-    rw [mem_set_of_eq] at hv; apply hv; rw [mem_adic_completion_integers]
+    rw [mem_set_of_eq] at hv ; apply hv; rw [mem_adic_completion_integers]
     have h_zero : (Valued.v (0 : v.adic_completion K) : WithZero (Multiplicative ℤ)) = 0 :=
       valued.v.map_zero'
     rw [h_zero]; exact zero_le_one' _
@@ -188,7 +188,7 @@ theorem zero : (0 : K_hat R K).IsFiniteAdele :=
 /-- The negative of a finite adèle is a finite adèle. -/
 theorem neg {x : K_hat R K} (hx : x.IsFiniteAdele) : (-x).IsFiniteAdele :=
   by
-  rw [is_finite_adele] at hx⊢
+  rw [is_finite_adele] at hx ⊢
   have h :
     ∀ v : height_one_spectrum R,
       -x v ∈ v.adicCompletionIntegers K ↔ x v ∈ v.adicCompletionIntegers K :=
@@ -202,7 +202,7 @@ theorem neg {x : K_hat R K} (hx : x.IsFiniteAdele) : (-x).IsFiniteAdele :=
 theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     (x * y).IsFiniteAdele :=
   by
-  rw [is_finite_adele, Filter.eventually_cofinite] at hx hy⊢
+  rw [is_finite_adele, Filter.eventually_cofinite] at hx hy ⊢
   have h_subset :
     { v : height_one_spectrum R | ¬(x * y) v ∈ v.adicCompletionIntegers K } ⊆
       { v : height_one_spectrum R | ¬x v ∈ v.adicCompletionIntegers K } ∪
@@ -210,9 +210,9 @@ theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     by
     intro v hv
     rw [mem_union, mem_set_of_eq, mem_set_of_eq]
-    rw [mem_set_of_eq] at hv
+    rw [mem_set_of_eq] at hv 
     contrapose! hv
-    rw [mem_adic_completion_integers, mem_adic_completion_integers] at hv
+    rw [mem_adic_completion_integers, mem_adic_completion_integers] at hv 
     have h_mul : Valued.v (x v * y v) = Valued.v (x v) * Valued.v (y v) :=
       Valued.v.map_mul' (x v) (y v)
     rw [mem_adic_completion_integers, Pi.mul_apply, h_mul]
@@ -230,7 +230,7 @@ theorem one : (1 : K_hat R K).IsFiniteAdele :=
     { v : height_one_spectrum R | ¬(1 : v.adicCompletion K) ∈ v.adicCompletionIntegers K } = ∅ :=
     by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
-    rw [mem_set_of_eq] at hv; apply hv; rw [mem_adic_completion_integers]
+    rw [mem_set_of_eq] at hv ; apply hv; rw [mem_adic_completion_integers]
     exact le_of_eq valued.v.map_one'
   simp_rw [Pi.one_apply, h_empty]
   exact finite_empty
Diff
@@ -75,9 +75,7 @@ def Coe.addMonoidHom : AddMonoidHom (R_hat R K) (K_hat R K)
     where
   toFun := coe
   map_zero' := rfl
-  map_add' x y := by
-    ext v
-    simp only [coe_apply, Pi.add_apply, Subring.coe_add]
+  map_add' x y := by ext v; simp only [coe_apply, Pi.add_apply, Subring.coe_add]
 #align dedekind_domain.finite_integral_adeles.coe.add_monoid_hom DedekindDomain.FiniteIntegralAdeles.Coe.addMonoidHom
 
 /-- The inclusion of `R_hat` in `K_hat` as a ring homomorphism. -/
@@ -86,10 +84,7 @@ def Coe.ringHom : RingHom (R_hat R K) (K_hat R K) :=
   { Coe.addMonoidHom R K with
     toFun := coe
     map_one' := rfl
-    map_mul' := fun x y => by
-      ext p
-      simp only [Pi.mul_apply, Subring.coe_mul]
-      rfl }
+    map_mul' := fun x y => by ext p; simp only [Pi.mul_apply, Subring.coe_mul]; rfl }
 #align dedekind_domain.finite_integral_adeles.coe.ring_hom DedekindDomain.FiniteIntegralAdeles.Coe.ringHom
 
 end FiniteIntegralAdeles
@@ -181,16 +176,11 @@ theorem zero : (0 : K_hat R K).IsFiniteAdele :=
   have h_empty :
     { v : height_one_spectrum R | ¬(0 : v.adicCompletion K) ∈ v.adicCompletionIntegers K } = ∅ :=
     by
-    ext v
-    rw [mem_empty_iff_false, iff_false_iff]
-    intro hv
-    rw [mem_set_of_eq] at hv
-    apply hv
-    rw [mem_adic_completion_integers]
+    ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
+    rw [mem_set_of_eq] at hv; apply hv; rw [mem_adic_completion_integers]
     have h_zero : (Valued.v (0 : v.adic_completion K) : WithZero (Multiplicative ℤ)) = 0 :=
       valued.v.map_zero'
-    rw [h_zero]
-    exact zero_le_one' _
+    rw [h_zero]; exact zero_le_one' _
   simp_rw [Pi.zero_apply, h_empty]
   exact finite_empty
 #align dedekind_domain.prod_adic_completions.is_finite_adele.zero DedekindDomain.ProdAdicCompletions.IsFiniteAdele.zero
@@ -239,12 +229,8 @@ theorem one : (1 : K_hat R K).IsFiniteAdele :=
   have h_empty :
     { v : height_one_spectrum R | ¬(1 : v.adicCompletion K) ∈ v.adicCompletionIntegers K } = ∅ :=
     by
-    ext v
-    rw [mem_empty_iff_false, iff_false_iff]
-    intro hv
-    rw [mem_set_of_eq] at hv
-    apply hv
-    rw [mem_adic_completion_integers]
+    ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
+    rw [mem_set_of_eq] at hv; apply hv; rw [mem_adic_completion_integers]
     exact le_of_eq valued.v.map_one'
   simp_rw [Pi.one_apply, h_empty]
   exact finite_empty
Diff
@@ -4,12 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: María Inés de Frutos-Fernández
 
 ! This file was ported from Lean 3 source module ring_theory.dedekind_domain.finite_adele_ring
-! leanprover-community/mathlib commit a8e7ac804fc39df0340c64906075787e0c90fa60
+! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.RingTheory.DedekindDomain.AdicValuation
-import Mathbin.Topology.Algebra.UniformRing
 
 /-!
 # The finite adèle ring of a Dedekind domain

Changes in mathlib4

mathlib3
mathlib4
feat(DedekindDomain.Ideal): remove Domain assumption from DedekindDomain (#11527)

Probably because in mathlib4 the definition IsDedekindDomain extends Domain, and this was not the case in mathlib3, there are unused hypothesis of the form

variable [IsDomain R] [IsDedekindDomain R]

and this PR removes the first one, that can be inferred by the second, both in variable declarations and in theorem/definition assumptions. A regex search has been performed on the library to search for all occurrences and none is left.

Diff
@@ -37,7 +37,7 @@ open Function Set IsDedekindDomain IsDedekindDomain.HeightOneSpectrum
 
 namespace DedekindDomain
 
-variable (R K : Type*) [CommRing R] [IsDomain R] [IsDedekindDomain R] [Field K] [Algebra R K]
+variable (R K : Type*) [CommRing R] [IsDedekindDomain R] [Field K] [Algebra R K]
   [IsFractionRing R K] (v : HeightOneSpectrum R)
 
 /-- The product of all `adicCompletionIntegers`, where `v` runs over the maximal ideals of `R`. -/
chore: Merge back ordered cancellative stuff (#8170)

There really is no reason (mathematically nor import graphically) to have OrderedCancelCommMonoid be defined in a separate file from OrderedCommMonoid.

Also take the opportunity to:

  • make OrderedCancelCommMonoid extend OrderedCommMonoid
  • fix capitalisation in instance names
  • standardise to defining the additive of each structure version first, so that to_additive can be called directly on the multiplicative version
  • inline at no cost a few auxiliary lemmas
Diff
@@ -247,9 +247,7 @@ theorem mul {x y : K_hat R K} (hx : x.IsFiniteAdele) (hy : y.IsFiniteAdele) :
     have h_mul : Valued.v (x v * y v) = Valued.v (x v) * Valued.v (y v) :=
       Valued.v.map_mul' (x v) (y v)
     rw [mem_adicCompletionIntegers, Pi.mul_apply, h_mul]
-    exact
-      @mul_le_one' (WithZero (Multiplicative ℤ)) _ _ (OrderedCommMonoid.to_covariantClass_left _) _
-        _ hv.left hv.right
+    exact mul_le_one' hv.left hv.right
   exact (hx.union hy).subset h_subset
 #align dedekind_domain.prod_adic_completions.is_finite_adele.mul DedekindDomain.ProdAdicCompletions.IsFiniteAdele.mul
 
chore: remove unused simps (#6632)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -214,7 +214,6 @@ theorem zero : (0 : K_hat R K).IsFiniteAdele := by
     have h_zero : (Valued.v (0 : v.adicCompletion K) : WithZero (Multiplicative ℤ)) = 0 :=
       Valued.v.map_zero'
     rw [h_zero]; exact zero_le_one' _
-  simp_rw [Pi.zero_apply, h_empty]
   -- Porting note: was `exact`, but `OfNat` got in the way.
   convert finite_empty
 #align dedekind_domain.prod_adic_completions.is_finite_adele.zero DedekindDomain.ProdAdicCompletions.IsFiniteAdele.zero
@@ -262,7 +261,6 @@ theorem one : (1 : K_hat R K).IsFiniteAdele := by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
     rw [mem_setOf] at hv; apply hv; rw [mem_adicCompletionIntegers]
     exact le_of_eq Valued.v.map_one'
-  simp_rw [Pi.one_apply, h_empty]
   -- Porting note: was `exact`, but `OfNat` got in the way.
   convert finite_empty
 #align dedekind_domain.prod_adic_completions.is_finite_adele.one DedekindDomain.ProdAdicCompletions.IsFiniteAdele.one
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
@@ -37,7 +37,7 @@ open Function Set IsDedekindDomain IsDedekindDomain.HeightOneSpectrum
 
 namespace DedekindDomain
 
-variable (R K : Type _) [CommRing R] [IsDomain R] [IsDedekindDomain R] [Field K] [Algebra R K]
+variable (R K : Type*) [CommRing R] [IsDomain R] [IsDedekindDomain R] [Field K] [Algebra R K]
   [IsFractionRing R K] (v : HeightOneSpectrum R)
 
 /-- The product of all `adicCompletionIntegers`, where `v` runs over the maximal ideals of `R`. -/
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,14 +2,11 @@
 Copyright (c) 2023 María Inés de Frutos-Fernández. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: María Inés de Frutos-Fernández
-
-! This file was ported from Lean 3 source module ring_theory.dedekind_domain.finite_adele_ring
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.RingTheory.DedekindDomain.AdicValuation
 
+#align_import ring_theory.dedekind_domain.finite_adele_ring from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
+
 /-!
 # The finite adèle ring of a Dedekind domain
 We define the ring of finite adèles of a Dedekind domain `R`.
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -213,7 +213,7 @@ theorem zero : (0 : K_hat R K).IsFiniteAdele := by
   have h_empty :
     {v : HeightOneSpectrum R | ¬(0 : v.adicCompletion K) ∈ v.adicCompletionIntegers K} = ∅ := by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
-    rw [mem_setOf] at hv ; apply hv; rw [mem_adicCompletionIntegers]
+    rw [mem_setOf] at hv; apply hv; rw [mem_adicCompletionIntegers]
     have h_zero : (Valued.v (0 : v.adicCompletion K) : WithZero (Multiplicative ℤ)) = 0 :=
       Valued.v.map_zero'
     rw [h_zero]; exact zero_le_one' _
@@ -263,7 +263,7 @@ theorem one : (1 : K_hat R K).IsFiniteAdele := by
   have h_empty :
     {v : HeightOneSpectrum R | ¬(1 : v.adicCompletion K) ∈ v.adicCompletionIntegers K} = ∅ := by
     ext v; rw [mem_empty_iff_false, iff_false_iff]; intro hv
-    rw [mem_setOf] at hv ; apply hv; rw [mem_adicCompletionIntegers]
+    rw [mem_setOf] at hv; apply hv; rw [mem_adicCompletionIntegers]
     exact le_of_eq Valued.v.map_one'
   simp_rw [Pi.one_apply, h_empty]
   -- Porting note: was `exact`, but `OfNat` got in the way.
feat: port RingTheory.DedekindDomain.FiniteAdeleRing (#5402)

Dependencies 11 + 760

761 files ported (98.6%)
325107 lines ported (98.4%)
Show graph

The unported dependencies are