data.list.primeMathlib.Data.List.Prime

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -46,7 +46,7 @@ theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.Prod 
 #print Prime.not_dvd_prod /-
 theorem Prime.not_dvd_prod {p : M} {L : List M} (pp : Prime p) (hL : ∀ a ∈ L, ¬p ∣ a) :
     ¬p ∣ L.Prod :=
-  mt (Prime.dvd_prod_iff pp).mp <| not_bex.mpr hL
+  mt (Prime.dvd_prod_iff pp).mp <| not_exists_mem.mpr hL
 #align prime.not_dvd_prod Prime.not_dvd_prod
 -/
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Jens Wagemaker, Anne Baanen
 -/
 import Algebra.Associated
-import Data.List.BigOperators.Lemmas
+import Algebra.BigOperators.List.Lemmas
 import Data.List.Perm
 
 #align_import data.list.prime from "leanprover-community/mathlib"@"f2f413b9d4be3a02840d0663dace76e8fe3da053"
Diff
@@ -33,8 +33,8 @@ theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.Prod 
   constructor
   · intro h
     induction' L with L_hd L_tl L_ih
-    · rw [prod_nil] at h ; exact absurd h pp.not_dvd_one
-    · rw [prod_cons] at h 
+    · rw [prod_nil] at h; exact absurd h pp.not_dvd_one
+    · rw [prod_cons] at h
       cases' pp.dvd_or_dvd h with hd hd
       · exact ⟨L_hd, mem_cons_self L_hd L_tl, hd⟩
       · obtain ⟨x, hx1, hx2⟩ := L_ih hd
Diff
@@ -75,7 +75,18 @@ theorem perm_of_prod_eq_prod :
   | a :: l, [], h₁, h₂, h₃ =>
     have ha : a ∣ 1 := @prod_nil M _ ▸ h₁ ▸ (@prod_cons _ _ l a).symm ▸ dvd_mul_right _ _
     absurd ha (Prime.not_dvd_one (h₂ a (mem_cons_self _ _)))
-  | a :: l₁, b :: l₂, h, hl₁, hl₂ => by classical
+  | a :: l₁, b :: l₂, h, hl₁, hl₂ => by
+    classical
+    have hl₁' : ∀ p ∈ l₁, Prime p := fun p hp => hl₁ p (mem_cons_of_mem _ hp)
+    have hl₂' : ∀ p ∈ (b :: l₂).eraseₓ a, Prime p := fun p hp => hl₂ p (mem_of_mem_erase hp)
+    have ha : a ∈ b :: l₂ :=
+      mem_list_primes_of_dvd_prod (hl₁ a (mem_cons_self _ _)) hl₂
+        (h ▸ by rw [prod_cons] <;> exact dvd_mul_right _ _)
+    have hb : b :: l₂ ~ a :: (b :: l₂).eraseₓ a := perm_cons_erase ha
+    have hl : Prod l₁ = Prod ((b :: l₂).eraseₓ a) :=
+      (mul_right_inj' (hl₁ a (mem_cons_self _ _)).NeZero).1 <| by
+        rwa [← prod_cons, ← prod_cons, ← hb.prod_eq]
+    exact perm.trans ((perm_of_prod_eq_prod hl hl₁' hl₂').cons _) hb.symm
 #align perm_of_prod_eq_prod perm_of_prod_eq_prod
 -/
 
Diff
@@ -75,18 +75,7 @@ theorem perm_of_prod_eq_prod :
   | a :: l, [], h₁, h₂, h₃ =>
     have ha : a ∣ 1 := @prod_nil M _ ▸ h₁ ▸ (@prod_cons _ _ l a).symm ▸ dvd_mul_right _ _
     absurd ha (Prime.not_dvd_one (h₂ a (mem_cons_self _ _)))
-  | a :: l₁, b :: l₂, h, hl₁, hl₂ => by
-    classical
-    have hl₁' : ∀ p ∈ l₁, Prime p := fun p hp => hl₁ p (mem_cons_of_mem _ hp)
-    have hl₂' : ∀ p ∈ (b :: l₂).eraseₓ a, Prime p := fun p hp => hl₂ p (mem_of_mem_erase hp)
-    have ha : a ∈ b :: l₂ :=
-      mem_list_primes_of_dvd_prod (hl₁ a (mem_cons_self _ _)) hl₂
-        (h ▸ by rw [prod_cons] <;> exact dvd_mul_right _ _)
-    have hb : b :: l₂ ~ a :: (b :: l₂).eraseₓ a := perm_cons_erase ha
-    have hl : Prod l₁ = Prod ((b :: l₂).eraseₓ a) :=
-      (mul_right_inj' (hl₁ a (mem_cons_self _ _)).NeZero).1 <| by
-        rwa [← prod_cons, ← prod_cons, ← hb.prod_eq]
-    exact perm.trans ((perm_of_prod_eq_prod hl hl₁' hl₂').cons _) hb.symm
+  | a :: l₁, b :: l₂, h, hl₁, hl₂ => by classical
 #align perm_of_prod_eq_prod perm_of_prod_eq_prod
 -/
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Jens Wagemaker, Anne Baanen
 -/
-import Mathbin.Algebra.Associated
-import Mathbin.Data.List.BigOperators.Lemmas
-import Mathbin.Data.List.Perm
+import Algebra.Associated
+import Data.List.BigOperators.Lemmas
+import Data.List.Perm
 
 #align_import data.list.prime from "leanprover-community/mathlib"@"f2f413b9d4be3a02840d0663dace76e8fe3da053"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2018 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Jens Wagemaker, Anne Baanen
-
-! This file was ported from Lean 3 source module data.list.prime
-! leanprover-community/mathlib commit f2f413b9d4be3a02840d0663dace76e8fe3da053
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Associated
 import Mathbin.Data.List.BigOperators.Lemmas
 import Mathbin.Data.List.Perm
 
+#align_import data.list.prime from "leanprover-community/mathlib"@"f2f413b9d4be3a02840d0663dace76e8fe3da053"
+
 /-!
 # Products of lists of prime elements.
 
Diff
@@ -29,6 +29,7 @@ section CommMonoidWithZero
 
 variable {M : Type _} [CommMonoidWithZero M]
 
+#print Prime.dvd_prod_iff /-
 /-- Prime `p` divides the product of a list `L` iff it divides some `a ∈ L` -/
 theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.Prod ↔ ∃ a ∈ L, p ∣ a :=
   by
@@ -43,11 +44,14 @@ theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.Prod 
         exact ⟨x, mem_cons_of_mem L_hd hx1, hx2⟩
   · exact fun ⟨a, ha1, ha2⟩ => dvd_trans ha2 (dvd_prod ha1)
 #align prime.dvd_prod_iff Prime.dvd_prod_iff
+-/
 
+#print Prime.not_dvd_prod /-
 theorem Prime.not_dvd_prod {p : M} {L : List M} (pp : Prime p) (hL : ∀ a ∈ L, ¬p ∣ a) :
     ¬p ∣ L.Prod :=
   mt (Prime.dvd_prod_iff pp).mp <| not_bex.mpr hL
 #align prime.not_dvd_prod Prime.not_dvd_prod
+-/
 
 end CommMonoidWithZero
 
@@ -55,13 +59,16 @@ section CancelCommMonoidWithZero
 
 variable {M : Type _} [CancelCommMonoidWithZero M] [Unique (Units M)]
 
+#print mem_list_primes_of_dvd_prod /-
 theorem mem_list_primes_of_dvd_prod {p : M} (hp : Prime p) {L : List M} (hL : ∀ q ∈ L, Prime q)
     (hpL : p ∣ L.Prod) : p ∈ L :=
   by
   obtain ⟨x, hx1, hx2⟩ := hp.dvd_prod_iff.mp hpL
   rwa [(prime_dvd_prime_iff_eq hp (hL x hx1)).mp hx2]
 #align mem_list_primes_of_dvd_prod mem_list_primes_of_dvd_prod
+-/
 
+#print perm_of_prod_eq_prod /-
 theorem perm_of_prod_eq_prod :
     ∀ {l₁ l₂ : List M}, l₁.Prod = l₂.Prod → (∀ p ∈ l₁, Prime p) → (∀ p ∈ l₂, Prime p) → Perm l₁ l₂
   | [], [], _, _, _ => Perm.nil
@@ -84,6 +91,7 @@ theorem perm_of_prod_eq_prod :
         rwa [← prod_cons, ← prod_cons, ← hb.prod_eq]
     exact perm.trans ((perm_of_prod_eq_prod hl hl₁' hl₂').cons _) hb.symm
 #align perm_of_prod_eq_prod perm_of_prod_eq_prod
+-/
 
 end CancelCommMonoidWithZero
 
Diff
@@ -73,16 +73,16 @@ theorem perm_of_prod_eq_prod :
     absurd ha (Prime.not_dvd_one (h₂ a (mem_cons_self _ _)))
   | a :: l₁, b :: l₂, h, hl₁, hl₂ => by
     classical
-      have hl₁' : ∀ p ∈ l₁, Prime p := fun p hp => hl₁ p (mem_cons_of_mem _ hp)
-      have hl₂' : ∀ p ∈ (b :: l₂).eraseₓ a, Prime p := fun p hp => hl₂ p (mem_of_mem_erase hp)
-      have ha : a ∈ b :: l₂ :=
-        mem_list_primes_of_dvd_prod (hl₁ a (mem_cons_self _ _)) hl₂
-          (h ▸ by rw [prod_cons] <;> exact dvd_mul_right _ _)
-      have hb : b :: l₂ ~ a :: (b :: l₂).eraseₓ a := perm_cons_erase ha
-      have hl : Prod l₁ = Prod ((b :: l₂).eraseₓ a) :=
-        (mul_right_inj' (hl₁ a (mem_cons_self _ _)).NeZero).1 <| by
-          rwa [← prod_cons, ← prod_cons, ← hb.prod_eq]
-      exact perm.trans ((perm_of_prod_eq_prod hl hl₁' hl₂').cons _) hb.symm
+    have hl₁' : ∀ p ∈ l₁, Prime p := fun p hp => hl₁ p (mem_cons_of_mem _ hp)
+    have hl₂' : ∀ p ∈ (b :: l₂).eraseₓ a, Prime p := fun p hp => hl₂ p (mem_of_mem_erase hp)
+    have ha : a ∈ b :: l₂ :=
+      mem_list_primes_of_dvd_prod (hl₁ a (mem_cons_self _ _)) hl₂
+        (h ▸ by rw [prod_cons] <;> exact dvd_mul_right _ _)
+    have hb : b :: l₂ ~ a :: (b :: l₂).eraseₓ a := perm_cons_erase ha
+    have hl : Prod l₁ = Prod ((b :: l₂).eraseₓ a) :=
+      (mul_right_inj' (hl₁ a (mem_cons_self _ _)).NeZero).1 <| by
+        rwa [← prod_cons, ← prod_cons, ← hb.prod_eq]
+    exact perm.trans ((perm_of_prod_eq_prod hl hl₁' hl₂').cons _) hb.symm
 #align perm_of_prod_eq_prod perm_of_prod_eq_prod
 
 end CancelCommMonoidWithZero
Diff
@@ -35,8 +35,8 @@ theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.Prod 
   constructor
   · intro h
     induction' L with L_hd L_tl L_ih
-    · rw [prod_nil] at h; exact absurd h pp.not_dvd_one
-    · rw [prod_cons] at h
+    · rw [prod_nil] at h ; exact absurd h pp.not_dvd_one
+    · rw [prod_cons] at h 
       cases' pp.dvd_or_dvd h with hd hd
       · exact ⟨L_hd, mem_cons_self L_hd L_tl, hd⟩
       · obtain ⟨x, hx1, hx2⟩ := L_ih hd
Diff
@@ -29,12 +29,6 @@ section CommMonoidWithZero
 
 variable {M : Type _} [CommMonoidWithZero M]
 
-/- warning: prime.dvd_prod_iff -> Prime.dvd_prod_iff is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : CommMonoidWithZero.{u1} M] {p : M} {L : List.{u1} M}, (Prime.{u1} M _inst_1 p) -> (Iff (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) p (List.prod.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) (MulOneClass.toHasOne.{u1} M (MulZeroOneClass.toMulOneClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) L)) (Exists.{succ u1} M (fun (a : M) => Exists.{0} (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) a L) (fun (H : Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) a L) => Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) p a))))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : CommMonoidWithZero.{u1} M] {p : M} {L : List.{u1} M}, (Prime.{u1} M _inst_1 p) -> (Iff (Dvd.dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) p (List.prod.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) (Monoid.toOne.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))) L)) (Exists.{succ u1} M (fun (a : M) => And (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) a L) (Dvd.dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) p a))))
-Case conversion may be inaccurate. Consider using '#align prime.dvd_prod_iff Prime.dvd_prod_iffₓ'. -/
 /-- Prime `p` divides the product of a list `L` iff it divides some `a ∈ L` -/
 theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.Prod ↔ ∃ a ∈ L, p ∣ a :=
   by
@@ -50,12 +44,6 @@ theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.Prod 
   · exact fun ⟨a, ha1, ha2⟩ => dvd_trans ha2 (dvd_prod ha1)
 #align prime.dvd_prod_iff Prime.dvd_prod_iff
 
-/- warning: prime.not_dvd_prod -> Prime.not_dvd_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : CommMonoidWithZero.{u1} M] {p : M} {L : List.{u1} M}, (Prime.{u1} M _inst_1 p) -> (forall (a : M), (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) a L) -> (Not (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) p a))) -> (Not (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) p (List.prod.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) (MulOneClass.toHasOne.{u1} M (MulZeroOneClass.toMulOneClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) L)))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : CommMonoidWithZero.{u1} M] {p : M} {L : List.{u1} M}, (Prime.{u1} M _inst_1 p) -> (forall (a : M), (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) a L) -> (Not (Dvd.dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) p a))) -> (Not (Dvd.dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) p (List.prod.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))) (Monoid.toOne.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))) L)))
-Case conversion may be inaccurate. Consider using '#align prime.not_dvd_prod Prime.not_dvd_prodₓ'. -/
 theorem Prime.not_dvd_prod {p : M} {L : List M} (pp : Prime p) (hL : ∀ a ∈ L, ¬p ∣ a) :
     ¬p ∣ L.Prod :=
   mt (Prime.dvd_prod_iff pp).mp <| not_bex.mpr hL
@@ -67,12 +55,6 @@ section CancelCommMonoidWithZero
 
 variable {M : Type _} [CancelCommMonoidWithZero M] [Unique (Units M)]
 
-/- warning: mem_list_primes_of_dvd_prod -> mem_list_primes_of_dvd_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : CancelCommMonoidWithZero.{u1} M] [_inst_2 : Unique.{succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))] {p : M}, (Prime.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1) p) -> (forall {L : List.{u1} M}, (forall (q : M), (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) q L) -> (Prime.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1) q)) -> (Dvd.Dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) p (List.prod.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) (MulOneClass.toHasOne.{u1} M (MulZeroOneClass.toMulOneClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) L)) -> (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) p L))
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : CancelCommMonoidWithZero.{u1} M] [_inst_2 : Unique.{succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))] {p : M}, (Prime.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1) p) -> (forall {L : List.{u1} M}, (forall (q : M), (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) q L) -> (Prime.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1) q)) -> (Dvd.dvd.{u1} M (semigroupDvd.{u1} M (SemigroupWithZero.toSemigroup.{u1} M (MonoidWithZero.toSemigroupWithZero.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) p (List.prod.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) (Monoid.toOne.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1)))) L)) -> (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) p L))
-Case conversion may be inaccurate. Consider using '#align mem_list_primes_of_dvd_prod mem_list_primes_of_dvd_prodₓ'. -/
 theorem mem_list_primes_of_dvd_prod {p : M} (hp : Prime p) {L : List M} (hL : ∀ q ∈ L, Prime q)
     (hpL : p ∣ L.Prod) : p ∈ L :=
   by
@@ -80,12 +62,6 @@ theorem mem_list_primes_of_dvd_prod {p : M} (hp : Prime p) {L : List M} (hL : 
   rwa [(prime_dvd_prime_iff_eq hp (hL x hx1)).mp hx2]
 #align mem_list_primes_of_dvd_prod mem_list_primes_of_dvd_prod
 
-/- warning: perm_of_prod_eq_prod -> perm_of_prod_eq_prod is a dubious translation:
-lean 3 declaration is
-  forall {M : Type.{u1}} [_inst_1 : CancelCommMonoidWithZero.{u1} M] [_inst_2 : Unique.{succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))] {l₁ : List.{u1} M} {l₂ : List.{u1} M}, (Eq.{succ u1} M (List.prod.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) (MulOneClass.toHasOne.{u1} M (MulZeroOneClass.toMulOneClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) l₁) (List.prod.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) (MulOneClass.toHasOne.{u1} M (MulZeroOneClass.toMulOneClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) l₂)) -> (forall (p : M), (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) p l₁) -> (Prime.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1) p)) -> (forall (p : M), (Membership.Mem.{u1, u1} M (List.{u1} M) (List.hasMem.{u1} M) p l₂) -> (Prime.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1) p)) -> (List.Perm.{u1} M l₁ l₂)
-but is expected to have type
-  forall {M : Type.{u1}} [_inst_1 : CancelCommMonoidWithZero.{u1} M] [_inst_2 : Unique.{succ u1} (Units.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))] {l₁ : List.{u1} M} {l₂ : List.{u1} M}, (Eq.{succ u1} M (List.prod.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) (Monoid.toOne.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1)))) l₁) (List.prod.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1))))) (Monoid.toOne.{u1} M (MonoidWithZero.toMonoid.{u1} M (CommMonoidWithZero.toMonoidWithZero.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1)))) l₂)) -> (forall (p : M), (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) p l₁) -> (Prime.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1) p)) -> (forall (p : M), (Membership.mem.{u1, u1} M (List.{u1} M) (List.instMembershipList.{u1} M) p l₂) -> (Prime.{u1} M (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} M _inst_1) p)) -> (List.Perm.{u1} M l₁ l₂)
-Case conversion may be inaccurate. Consider using '#align perm_of_prod_eq_prod perm_of_prod_eq_prodₓ'. -/
 theorem perm_of_prod_eq_prod :
     ∀ {l₁ l₂ : List M}, l₁.Prod = l₂.Prod → (∀ p ∈ l₁, Prime p) → (∀ p ∈ l₂, Prime p) → Perm l₁ l₂
   | [], [], _, _, _ => Perm.nil
Diff
@@ -41,8 +41,7 @@ theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.Prod 
   constructor
   · intro h
     induction' L with L_hd L_tl L_ih
-    · rw [prod_nil] at h
-      exact absurd h pp.not_dvd_one
+    · rw [prod_nil] at h; exact absurd h pp.not_dvd_one
     · rw [prod_cons] at h
       cases' pp.dvd_or_dvd h with hd hd
       · exact ⟨L_hd, mem_cons_self L_hd L_tl, hd⟩

Changes in mathlib4

mathlib3
mathlib4
move(Data/List/BigOperators): Move to Algebra.BigOperators.List (#11729)

This is algebra and should be foldered as such.

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Jens Wagemaker, Anne Baanen
 -/
 import Mathlib.Algebra.Associated
-import Mathlib.Data.List.BigOperators.Lemmas
+import Mathlib.Algebra.BigOperators.List.Lemmas
 import Mathlib.Data.List.Perm
 
 #align_import data.list.prime from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6"
chore(*): drop $/<| before fun (#9361)

Subset of #9319

Diff
@@ -40,7 +40,7 @@ theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.prod 
 
 theorem Prime.not_dvd_prod {p : M} {L : List M} (pp : Prime p) (hL : ∀ a ∈ L, ¬p ∣ a) :
     ¬p ∣ L.prod :=
-  mt (Prime.dvd_prod_iff pp).1 <| not_exists.2 <| fun a => not_and.2 (hL a)
+  mt (Prime.dvd_prod_iff pp).1 <| not_exists.2 fun a => not_and.2 (hL a)
 #align prime.not_dvd_prod Prime.not_dvd_prod
 
 end CommMonoidWithZero
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
@@ -21,7 +21,7 @@ open List
 
 section CommMonoidWithZero
 
-variable {M : Type _} [CommMonoidWithZero M]
+variable {M : Type*} [CommMonoidWithZero M]
 
 /-- Prime `p` divides the product of a list `L` iff it divides some `a ∈ L` -/
 theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.prod ↔ ∃ a ∈ L, p ∣ a := by
@@ -47,7 +47,7 @@ end CommMonoidWithZero
 
 section CancelCommMonoidWithZero
 
-variable {M : Type _} [CancelCommMonoidWithZero M] [Unique (Units M)]
+variable {M : Type*} [CancelCommMonoidWithZero M] [Unique (Units M)]
 
 theorem mem_list_primes_of_dvd_prod {p : M} (hp : Prime p) {L : List M} (hL : ∀ q ∈ L, Prime q)
     (hpL : p ∣ L.prod) : p ∈ L := by
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,16 +2,13 @@
 Copyright (c) 2018 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Jens Wagemaker, Anne Baanen
-
-! This file was ported from Lean 3 source module data.list.prime
-! leanprover-community/mathlib commit ccad6d5093bd2f5c6ca621fc74674cce51355af6
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Associated
 import Mathlib.Data.List.BigOperators.Lemmas
 import Mathlib.Data.List.Perm
 
+#align_import data.list.prime from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6"
+
 /-!
 # Products of lists of prime elements.
 
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
@@ -73,7 +73,7 @@ theorem perm_of_prod_eq_prod :
       have hl₂' : ∀ p ∈ (b :: l₂).erase a, Prime p := fun p hp => hl₂ p (mem_of_mem_erase hp)
       have ha : a ∈ b :: l₂ :=
         mem_list_primes_of_dvd_prod (hl₁ a (mem_cons_self _ _)) hl₂
-          (h ▸ by rw [prod_cons] ; exact dvd_mul_right _ _)
+          (h ▸ by rw [prod_cons]; exact dvd_mul_right _ _)
       have hb : b :: l₂ ~ a :: (b :: l₂).erase a := perm_cons_erase ha
       have hl : prod l₁ = prod ((b :: l₂).erase a) :=
         (mul_right_inj' (hl₁ a (mem_cons_self _ _)).ne_zero).1 <| by
feat : Port Data.List.Prime (#1492)

Added Data.List.Prime

Dependencies 3 + 152

153 files ported (98.1%)
65122 lines ported (98.4%)
Show graph

The unported dependencies are