data.pnat.factors
⟷
Mathlib.Data.PNat.Factors
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Neil Strickland
-/
import Algebra.BigOperators.Multiset.Basic
-import Data.Pnat.Prime
+import Data.PNat.Prime
import Data.Nat.Factors
import Data.Multiset.Sort
@@ -293,7 +293,7 @@ theorem prod_add (u v : PrimeMultiset) : (u + v).Prod = u.Prod * v.Prod :=
theorem prod_smul (d : ℕ) (u : PrimeMultiset) : (d • u).Prod = u.Prod ^ d :=
by
induction' d with d ih; rfl
- rw [succ_nsmul, prod_add, ih, Nat.succ_eq_add_one, pow_succ, mul_comm]
+ rw [succ_nsmul', prod_add, ih, Nat.succ_eq_add_one, pow_succ', mul_comm]
#align prime_multiset.prod_smul PrimeMultiset.prod_smul
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -182,9 +182,9 @@ theorem coe_prod (v : PrimeMultiset) : (v.Prod : ℕ) = (v : Multiset ℕ).Prod
by
let h : (v.prod : ℕ) = ((v.map coe).map coe).Prod :=
pnat.coe_monoid_hom.map_multiset_prod v.to_pnat_multiset
- rw [Multiset.map_map] at h
+ rw [Multiset.map_map] at h
have : (coe : ℕ+ → ℕ) ∘ (coe : Nat.Primes → ℕ+) = coe := funext fun p => rfl
- rw [this] at h ; exact h
+ rw [this] at h; exact h
#align prime_multiset.coe_prod PrimeMultiset.coe_prod
-/
@@ -253,7 +253,7 @@ def ofNatList (l : List ℕ) (h : ∀ p : ℕ, p ∈ l → p.Prime) : PrimeMulti
theorem prod_ofNatList (l : List ℕ) (h) : ((ofNatList l h).Prod : ℕ) = l.Prod :=
by
have := prod_of_nat_multiset (l : Multiset ℕ) h
- rw [Multiset.coe_prod] at this ; exact this
+ rw [Multiset.prod_coe] at this; exact this
#align prime_multiset.prod_of_nat_list PrimeMultiset.prod_ofNatList
-/
@@ -269,7 +269,7 @@ def ofPNatList (l : List ℕ+) (h : ∀ p : ℕ+, p ∈ l → p.Prime) : PrimeMu
theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).Prod = l.Prod :=
by
have := prod_of_pnat_multiset (l : Multiset ℕ+) h
- rw [Multiset.coe_prod] at this ; exact this
+ rw [Multiset.prod_coe] at this; exact this
#align prime_multiset.prod_of_pnat_list PrimeMultiset.prod_ofPNatList
-/
@@ -339,7 +339,7 @@ theorem factorMultiset_prod (v : PrimeMultiset) : v.Prod.factorMultiset = v :=
rcases v with ⟨l⟩
unfold_coes
dsimp [PrimeMultiset.toNatMultiset]
- rw [Multiset.coe_prod]
+ rw [Multiset.prod_coe]
let l' := l.map (coe : Nat.Primes → ℕ)
have : ∀ p : ℕ, p ∈ l' → p.Prime := fun p hp =>
by
@@ -428,7 +428,7 @@ theorem factorMultiset_le_iff {m n : ℕ+} : factorMultiset m ≤ factorMultiset
theorem factorMultiset_le_iff' {m : ℕ+} {v : PrimeMultiset} : factorMultiset m ≤ v ↔ m ∣ v.Prod :=
by
let h := @factor_multiset_le_iff m v.prod
- rw [v.factor_multiset_prod] at h ; exact h
+ rw [v.factor_multiset_prod] at h; exact h
#align pnat.factor_multiset_le_iff' PNat.factorMultiset_le_iff'
-/
@@ -440,7 +440,7 @@ namespace PrimeMultiset
theorem prod_dvd_iff {u v : PrimeMultiset} : u.Prod ∣ v.Prod ↔ u ≤ v :=
by
let h := @PNat.factorMultiset_le_iff' u.prod v
- rw [u.factor_multiset_prod] at h ; exact h.symm
+ rw [u.factor_multiset_prod] at h; exact h.symm
#align prime_multiset.prod_dvd_iff PrimeMultiset.prod_dvd_iff
-/
@@ -448,7 +448,7 @@ theorem prod_dvd_iff {u v : PrimeMultiset} : u.Prod ∣ v.Prod ↔ u ≤ v :=
theorem prod_dvd_iff' {u : PrimeMultiset} {n : ℕ+} : u.Prod ∣ n ↔ u ≤ n.factorMultiset :=
by
let h := @prod_dvd_iff u n.factor_multiset
- rw [n.prod_factor_multiset] at h ; exact h
+ rw [n.prod_factor_multiset] at h; exact h
#align prime_multiset.prod_dvd_iff' PrimeMultiset.prod_dvd_iff'
-/
@@ -497,7 +497,7 @@ theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
apply multiset.eq_replicate.mpr
constructor
· rw [Multiset.card_nsmul, PrimeMultiset.card_ofPrime, mul_one]
- · intro q h; rw [PrimeMultiset.ofPrime, Multiset.nsmul_singleton _ k] at h
+ · intro q h; rw [PrimeMultiset.ofPrime, Multiset.nsmul_singleton _ k] at h
exact Multiset.eq_of_mem_replicate h
#align pnat.count_factor_multiset PNat.count_factorMultiset
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -32,7 +32,7 @@ the multiplicity of `p` in this factors multiset being the p-adic valuation of `
below. -/
def PrimeMultiset :=
Multiset Nat.Primes
-deriving Inhabited, CanonicallyOrderedAddMonoid, DistribLattice, SemilatticeSup, OrderBot, Sub,
+deriving Inhabited, CanonicallyOrderedAddCommMonoid, DistribLattice, SemilatticeSup, OrderBot, Sub,
OrderedSub
#align prime_multiset PrimeMultiset
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2019 Neil Strickland. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Neil Strickland
-/
-import Mathbin.Algebra.BigOperators.Multiset.Basic
-import Mathbin.Data.Pnat.Prime
-import Mathbin.Data.Nat.Factors
-import Mathbin.Data.Multiset.Sort
+import Algebra.BigOperators.Multiset.Basic
+import Data.Pnat.Prime
+import Data.Nat.Factors
+import Data.Multiset.Sort
#align_import data.pnat.factors from "leanprover-community/mathlib"@"50832daea47b195a48b5b33b1c8b2162c48c3afc"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2019 Neil Strickland. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Neil Strickland
-
-! This file was ported from Lean 3 source module data.pnat.factors
-! leanprover-community/mathlib commit 50832daea47b195a48b5b33b1c8b2162c48c3afc
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.BigOperators.Multiset.Basic
import Mathbin.Data.Pnat.Prime
import Mathbin.Data.Nat.Factors
import Mathbin.Data.Multiset.Sort
+#align_import data.pnat.factors from "leanprover-community/mathlib"@"50832daea47b195a48b5b33b1c8b2162c48c3afc"
+
/-!
# Prime factors of nonzero naturals
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -52,9 +52,11 @@ def ofPrime (p : Nat.Primes) : PrimeMultiset :=
#align prime_multiset.of_prime PrimeMultiset.ofPrime
-/
+#print PrimeMultiset.card_ofPrime /-
theorem card_ofPrime (p : Nat.Primes) : Multiset.card (ofPrime p) = 1 :=
rfl
#align prime_multiset.card_of_prime PrimeMultiset.card_ofPrime
+-/
#print PrimeMultiset.toNatMultiset /-
/-- We can forget the primality property and regard a multiset
@@ -75,16 +77,20 @@ instance coeNat : Coe PrimeMultiset (Multiset ℕ) :=
#align prime_multiset.coe_nat PrimeMultiset.coeNat
-/
+#print PrimeMultiset.coeNatMonoidHom /-
/-- `prime_multiset.coe`, the coercion from a multiset of primes to a multiset of
naturals, promoted to an `add_monoid_hom`. -/
def coeNatMonoidHom : PrimeMultiset →+ Multiset ℕ :=
{ Multiset.mapAddMonoidHom coe with toFun := coe }
#align prime_multiset.coe_nat_monoid_hom PrimeMultiset.coeNatMonoidHom
+-/
+#print PrimeMultiset.coe_coeNatMonoidHom /-
@[simp]
theorem coe_coeNatMonoidHom : (coeNatMonoidHom : PrimeMultiset → Multiset ℕ) = coe :=
rfl
#align prime_multiset.coe_coe_nat_monoid_hom PrimeMultiset.coe_coeNatMonoidHom
+-/
#print PrimeMultiset.coeNat_injective /-
theorem coeNat_injective : Function.Injective (coe : PrimeMultiset → Multiset ℕ) :=
@@ -118,16 +124,20 @@ instance coePNat : Coe PrimeMultiset (Multiset ℕ+) :=
#align prime_multiset.coe_pnat PrimeMultiset.coePNat
-/
+#print PrimeMultiset.coePNatMonoidHom /-
/-- `coe_pnat`, the coercion from a multiset of primes to a multiset of positive
naturals, regarded as an `add_monoid_hom`. -/
def coePNatMonoidHom : PrimeMultiset →+ Multiset ℕ+ :=
{ Multiset.mapAddMonoidHom coe with toFun := coe }
#align prime_multiset.coe_pnat_monoid_hom PrimeMultiset.coePNatMonoidHom
+-/
+#print PrimeMultiset.coe_coePNatMonoidHom /-
@[simp]
theorem coe_coePNatMonoidHom : (coePNatMonoidHom : PrimeMultiset → Multiset ℕ+) = coe :=
rfl
#align prime_multiset.coe_coe_pnat_monoid_hom PrimeMultiset.coe_coePNatMonoidHom
+-/
#print PrimeMultiset.coePNat_injective /-
theorem coePNat_injective : Function.Injective (coe : PrimeMultiset → Multiset ℕ+) :=
@@ -258,29 +268,37 @@ def ofPNatList (l : List ℕ+) (h : ∀ p : ℕ+, p ∈ l → p.Prime) : PrimeMu
#align prime_multiset.of_pnat_list PrimeMultiset.ofPNatList
-/
+#print PrimeMultiset.prod_ofPNatList /-
theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).Prod = l.Prod :=
by
have := prod_of_pnat_multiset (l : Multiset ℕ+) h
rw [Multiset.coe_prod] at this ; exact this
#align prime_multiset.prod_of_pnat_list PrimeMultiset.prod_ofPNatList
+-/
+#print PrimeMultiset.prod_zero /-
/-- The product map gives a homomorphism from the additive monoid
of multisets to the multiplicative monoid ℕ+. -/
theorem prod_zero : (0 : PrimeMultiset).Prod = 1 := by dsimp [Prod]; exact Multiset.prod_zero
#align prime_multiset.prod_zero PrimeMultiset.prod_zero
+-/
+#print PrimeMultiset.prod_add /-
theorem prod_add (u v : PrimeMultiset) : (u + v).Prod = u.Prod * v.Prod :=
by
change (coe_pnat_monoid_hom (u + v)).Prod = _
rw [coe_pnat_monoid_hom.map_add]
exact Multiset.prod_add _ _
#align prime_multiset.prod_add PrimeMultiset.prod_add
+-/
+#print PrimeMultiset.prod_smul /-
theorem prod_smul (d : ℕ) (u : PrimeMultiset) : (d • u).Prod = u.Prod ^ d :=
by
induction' d with d ih; rfl
rw [succ_nsmul, prod_add, ih, Nat.succ_eq_add_one, pow_succ, mul_comm]
#align prime_multiset.prod_smul PrimeMultiset.prod_smul
+-/
end PrimeMultiset
@@ -349,12 +367,15 @@ def factorMultisetEquiv : ℕ+ ≃ PrimeMultiset
#align pnat.factor_multiset_equiv PNat.factorMultisetEquiv
-/
+#print PNat.factorMultiset_one /-
/-- Factoring gives a homomorphism from the multiplicative
monoid ℕ+ to the additive monoid of multisets. -/
theorem factorMultiset_one : factorMultiset 1 = 0 := by
simp [factor_multiset, PrimeMultiset.ofNatList, PrimeMultiset.ofNatMultiset]
#align pnat.factor_multiset_one PNat.factorMultiset_one
+-/
+#print PNat.factorMultiset_mul /-
theorem factorMultiset_mul (n m : ℕ+) :
factorMultiset (n * m) = factorMultiset n + factorMultiset m :=
by
@@ -365,7 +386,9 @@ theorem factorMultiset_mul (n m : ℕ+) :
rw [← PrimeMultiset.prod_add]
repeat' rw [PrimeMultiset.factorMultiset_prod]
#align pnat.factor_multiset_mul PNat.factorMultiset_mul
+-/
+#print PNat.factorMultiset_pow /-
theorem factorMultiset_pow (n : ℕ+) (m : ℕ) : factorMultiset (n ^ m) = m • factorMultiset n :=
by
let u := factor_multiset n
@@ -373,6 +396,7 @@ theorem factorMultiset_pow (n : ℕ+) (m : ℕ) : factorMultiset (n ^ m) = m •
rw [this, ← PrimeMultiset.prod_smul]
repeat' rw [PrimeMultiset.factorMultiset_prod]
#align pnat.factor_multiset_pow PNat.factorMultiset_pow
+-/
#print PNat.factorMultiset_ofPrime /-
/-- Factoring a prime gives the corresponding one-element multiset. -/
@@ -385,6 +409,7 @@ theorem factorMultiset_ofPrime (p : Nat.Primes) :
#align pnat.factor_multiset_of_prime PNat.factorMultiset_ofPrime
-/
+#print PNat.factorMultiset_le_iff /-
/-- We now have four different results that all encode the
idea that inequality of multisets corresponds to divisibility
of positive integers. -/
@@ -400,33 +425,41 @@ theorem factorMultiset_le_iff {m n : ℕ+} : factorMultiset m ≤ factorMultiset
rw [← mul_div_exact h, factor_multiset_mul]
exact le_self_add
#align pnat.factor_multiset_le_iff PNat.factorMultiset_le_iff
+-/
+#print PNat.factorMultiset_le_iff' /-
theorem factorMultiset_le_iff' {m : ℕ+} {v : PrimeMultiset} : factorMultiset m ≤ v ↔ m ∣ v.Prod :=
by
let h := @factor_multiset_le_iff m v.prod
rw [v.factor_multiset_prod] at h ; exact h
#align pnat.factor_multiset_le_iff' PNat.factorMultiset_le_iff'
+-/
end PNat
namespace PrimeMultiset
+#print PrimeMultiset.prod_dvd_iff /-
theorem prod_dvd_iff {u v : PrimeMultiset} : u.Prod ∣ v.Prod ↔ u ≤ v :=
by
let h := @PNat.factorMultiset_le_iff' u.prod v
rw [u.factor_multiset_prod] at h ; exact h.symm
#align prime_multiset.prod_dvd_iff PrimeMultiset.prod_dvd_iff
+-/
+#print PrimeMultiset.prod_dvd_iff' /-
theorem prod_dvd_iff' {u : PrimeMultiset} {n : ℕ+} : u.Prod ∣ n ↔ u ≤ n.factorMultiset :=
by
let h := @prod_dvd_iff u n.factor_multiset
rw [n.prod_factor_multiset] at h ; exact h
#align prime_multiset.prod_dvd_iff' PrimeMultiset.prod_dvd_iff'
+-/
end PrimeMultiset
namespace PNat
+#print PNat.factorMultiset_gcd /-
/-- The gcd and lcm operations on positive integers correspond
to the inf and sup operations on multisets. -/
theorem factorMultiset_gcd (m n : ℕ+) :
@@ -439,7 +472,9 @@ theorem factorMultiset_gcd (m n : ℕ+) :
apply dvd_gcd <;> rw [PrimeMultiset.prod_dvd_iff']
exact inf_le_left; exact inf_le_right
#align pnat.factor_multiset_gcd PNat.factorMultiset_gcd
+-/
+#print PNat.factorMultiset_lcm /-
theorem factorMultiset_lcm (m n : ℕ+) :
factorMultiset (lcm m n) = factorMultiset m ⊔ factorMultiset n :=
by
@@ -450,7 +485,9 @@ theorem factorMultiset_lcm (m n : ℕ+) :
· apply sup_le_iff.mpr <;> constructor <;> apply factor_multiset_le_iff.mpr
exact dvd_lcm_left m n; exact dvd_lcm_right m n
#align pnat.factor_multiset_lcm PNat.factorMultiset_lcm
+-/
+#print PNat.count_factorMultiset /-
/-- The number of occurrences of p in the factor multiset of m
is the same as the p-adic valuation of m. -/
theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
@@ -466,11 +503,13 @@ theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
· intro q h; rw [PrimeMultiset.ofPrime, Multiset.nsmul_singleton _ k] at h
exact Multiset.eq_of_mem_replicate h
#align pnat.count_factor_multiset PNat.count_factorMultiset
+-/
end PNat
namespace PrimeMultiset
+#print PrimeMultiset.prod_inf /-
theorem prod_inf (u v : PrimeMultiset) : (u ⊓ v).Prod = PNat.gcd u.Prod v.Prod :=
by
let n := u.prod
@@ -480,7 +519,9 @@ theorem prod_inf (u v : PrimeMultiset) : (u ⊓ v).Prod = PNat.gcd u.Prod v.Prod
have : v = m.factor_multiset := v.factor_multiset_prod.symm; rw [this]
rw [← PNat.factorMultiset_gcd n m, PNat.prod_factorMultiset]
#align prime_multiset.prod_inf PrimeMultiset.prod_inf
+-/
+#print PrimeMultiset.prod_sup /-
theorem prod_sup (u v : PrimeMultiset) : (u ⊔ v).Prod = PNat.lcm u.Prod v.Prod :=
by
let n := u.prod
@@ -490,6 +531,7 @@ theorem prod_sup (u v : PrimeMultiset) : (u ⊔ v).Prod = PNat.lcm u.Prod v.Prod
have : v = m.factor_multiset := v.factor_multiset_prod.symm; rw [this]
rw [← PNat.factorMultiset_lcm n m, PNat.prod_factorMultiset]
#align prime_multiset.prod_sup PrimeMultiset.prod_sup
+-/
end PrimeMultiset
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -34,8 +34,9 @@ the multiplicity of `p` in this factors multiset being the p-adic valuation of `
gives an equivalence between this set and ℕ+, as we will formalize
below. -/
def PrimeMultiset :=
- Multiset Nat.Primes deriving Inhabited, CanonicallyOrderedAddMonoid, DistribLattice,
- SemilatticeSup, OrderBot, Sub, OrderedSub
+ Multiset Nat.Primes
+deriving Inhabited, CanonicallyOrderedAddMonoid, DistribLattice, SemilatticeSup, OrderBot, Sub,
+ OrderedSub
#align prime_multiset PrimeMultiset
-/
@@ -174,9 +175,9 @@ theorem coe_prod (v : PrimeMultiset) : (v.Prod : ℕ) = (v : Multiset ℕ).Prod
by
let h : (v.prod : ℕ) = ((v.map coe).map coe).Prod :=
pnat.coe_monoid_hom.map_multiset_prod v.to_pnat_multiset
- rw [Multiset.map_map] at h
+ rw [Multiset.map_map] at h
have : (coe : ℕ+ → ℕ) ∘ (coe : Nat.Primes → ℕ+) = coe := funext fun p => rfl
- rw [this] at h; exact h
+ rw [this] at h ; exact h
#align prime_multiset.coe_prod PrimeMultiset.coe_prod
-/
@@ -245,7 +246,7 @@ def ofNatList (l : List ℕ) (h : ∀ p : ℕ, p ∈ l → p.Prime) : PrimeMulti
theorem prod_ofNatList (l : List ℕ) (h) : ((ofNatList l h).Prod : ℕ) = l.Prod :=
by
have := prod_of_nat_multiset (l : Multiset ℕ) h
- rw [Multiset.coe_prod] at this; exact this
+ rw [Multiset.coe_prod] at this ; exact this
#align prime_multiset.prod_of_nat_list PrimeMultiset.prod_ofNatList
-/
@@ -260,7 +261,7 @@ def ofPNatList (l : List ℕ+) (h : ∀ p : ℕ+, p ∈ l → p.Prime) : PrimeMu
theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).Prod = l.Prod :=
by
have := prod_of_pnat_multiset (l : Multiset ℕ+) h
- rw [Multiset.coe_prod] at this; exact this
+ rw [Multiset.coe_prod] at this ; exact this
#align prime_multiset.prod_of_pnat_list PrimeMultiset.prod_ofPNatList
/-- The product map gives a homomorphism from the additive monoid
@@ -403,7 +404,7 @@ theorem factorMultiset_le_iff {m n : ℕ+} : factorMultiset m ≤ factorMultiset
theorem factorMultiset_le_iff' {m : ℕ+} {v : PrimeMultiset} : factorMultiset m ≤ v ↔ m ∣ v.Prod :=
by
let h := @factor_multiset_le_iff m v.prod
- rw [v.factor_multiset_prod] at h; exact h
+ rw [v.factor_multiset_prod] at h ; exact h
#align pnat.factor_multiset_le_iff' PNat.factorMultiset_le_iff'
end PNat
@@ -413,13 +414,13 @@ namespace PrimeMultiset
theorem prod_dvd_iff {u v : PrimeMultiset} : u.Prod ∣ v.Prod ↔ u ≤ v :=
by
let h := @PNat.factorMultiset_le_iff' u.prod v
- rw [u.factor_multiset_prod] at h; exact h.symm
+ rw [u.factor_multiset_prod] at h ; exact h.symm
#align prime_multiset.prod_dvd_iff PrimeMultiset.prod_dvd_iff
theorem prod_dvd_iff' {u : PrimeMultiset} {n : ℕ+} : u.Prod ∣ n ↔ u ≤ n.factorMultiset :=
by
let h := @prod_dvd_iff u n.factor_multiset
- rw [n.prod_factor_multiset] at h; exact h
+ rw [n.prod_factor_multiset] at h ; exact h
#align prime_multiset.prod_dvd_iff' PrimeMultiset.prod_dvd_iff'
end PrimeMultiset
@@ -462,7 +463,7 @@ theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
apply multiset.eq_replicate.mpr
constructor
· rw [Multiset.card_nsmul, PrimeMultiset.card_ofPrime, mul_one]
- · intro q h; rw [PrimeMultiset.ofPrime, Multiset.nsmul_singleton _ k] at h
+ · intro q h; rw [PrimeMultiset.ofPrime, Multiset.nsmul_singleton _ k] at h
exact Multiset.eq_of_mem_replicate h
#align pnat.count_factor_multiset PNat.count_factorMultiset
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -51,12 +51,6 @@ def ofPrime (p : Nat.Primes) : PrimeMultiset :=
#align prime_multiset.of_prime PrimeMultiset.ofPrime
-/
-/- warning: prime_multiset.card_of_prime -> PrimeMultiset.card_ofPrime is a dubious translation:
-lean 3 declaration is
- forall (p : Nat.Primes), Eq.{1} Nat (coeFn.{1, 1} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.orderedCancelAddCommMonoid.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.orderedCancelAddCommMonoid.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{0} Nat.Primes) -> Nat) (AddMonoidHom.hasCoeToFun.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.orderedCancelAddCommMonoid.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{0} Nat.Primes) (PrimeMultiset.ofPrime p)) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))
-but is expected to have type
- forall (p : Nat.Primes), Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{0} Nat.Primes) => Nat) (PrimeMultiset.ofPrime p)) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) (fun (_x : Multiset.{0} Nat.Primes) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{0} Nat.Primes) => Nat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) Nat (AddZeroClass.toAdd.{0} (Multiset.{0} Nat.Primes) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{0} Nat.Primes) (PrimeMultiset.ofPrime p)) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{0} Nat.Primes) => Nat) (PrimeMultiset.ofPrime p)) 1 (instOfNatNat 1))
-Case conversion may be inaccurate. Consider using '#align prime_multiset.card_of_prime PrimeMultiset.card_ofPrimeₓ'. -/
theorem card_ofPrime (p : Nat.Primes) : Multiset.card (ofPrime p) = 1 :=
rfl
#align prime_multiset.card_of_prime PrimeMultiset.card_ofPrime
@@ -80,24 +74,12 @@ instance coeNat : Coe PrimeMultiset (Multiset ℕ) :=
#align prime_multiset.coe_nat PrimeMultiset.coeNat
-/
-/- warning: prime_multiset.coe_nat_monoid_hom -> PrimeMultiset.coeNatMonoidHom is a dubious translation:
-lean 3 declaration is
- AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))
-but is expected to have type
- AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))
-Case conversion may be inaccurate. Consider using '#align prime_multiset.coe_nat_monoid_hom PrimeMultiset.coeNatMonoidHomₓ'. -/
/-- `prime_multiset.coe`, the coercion from a multiset of primes to a multiset of
naturals, promoted to an `add_monoid_hom`. -/
def coeNatMonoidHom : PrimeMultiset →+ Multiset ℕ :=
{ Multiset.mapAddMonoidHom coe with toFun := coe }
#align prime_multiset.coe_nat_monoid_hom PrimeMultiset.coeNatMonoidHom
-/- warning: prime_multiset.coe_coe_nat_monoid_hom -> PrimeMultiset.coe_coeNatMonoidHom is a dubious translation:
-lean 3 declaration is
- Eq.{1} ((fun (_x : AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))) => PrimeMultiset -> (Multiset.{0} Nat)) PrimeMultiset.coeNatMonoidHom) (coeFn.{1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))) (fun (_x : AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))) => PrimeMultiset -> (Multiset.{0} Nat)) (AddMonoidHom.hasCoeToFun.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))) PrimeMultiset.coeNatMonoidHom) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) PrimeMultiset (Multiset.{0} Nat) (HasLiftT.mk.{1, 1} PrimeMultiset (Multiset.{0} Nat) (CoeTCₓ.coe.{1, 1} PrimeMultiset (Multiset.{0} Nat) (coeBase.{1, 1} PrimeMultiset (Multiset.{0} Nat) PrimeMultiset.coeNat))))
-but is expected to have type
- Eq.{1} (forall (a : PrimeMultiset), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : PrimeMultiset) => Multiset.{0} Nat) a) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (fun (_x : PrimeMultiset) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : PrimeMultiset) => Multiset.{0} Nat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (Multiset.{0} Nat) (AddZeroClass.toAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))) (AddZeroClass.toAdd.{0} (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat)))))) (AddMonoidHom.addMonoidHomClass.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))))) PrimeMultiset.coeNatMonoidHom) (Coe.coe.{1, 1} PrimeMultiset (Multiset.{0} Nat) PrimeMultiset.coeNat)
-Case conversion may be inaccurate. Consider using '#align prime_multiset.coe_coe_nat_monoid_hom PrimeMultiset.coe_coeNatMonoidHomₓ'. -/
@[simp]
theorem coe_coeNatMonoidHom : (coeNatMonoidHom : PrimeMultiset → Multiset ℕ) = coe :=
rfl
@@ -135,24 +117,12 @@ instance coePNat : Coe PrimeMultiset (Multiset ℕ+) :=
#align prime_multiset.coe_pnat PrimeMultiset.coePNat
-/
-/- warning: prime_multiset.coe_pnat_monoid_hom -> PrimeMultiset.coePNatMonoidHom is a dubious translation:
-lean 3 declaration is
- AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))
-but is expected to have type
- AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))
-Case conversion may be inaccurate. Consider using '#align prime_multiset.coe_pnat_monoid_hom PrimeMultiset.coePNatMonoidHomₓ'. -/
/-- `coe_pnat`, the coercion from a multiset of primes to a multiset of positive
naturals, regarded as an `add_monoid_hom`. -/
def coePNatMonoidHom : PrimeMultiset →+ Multiset ℕ+ :=
{ Multiset.mapAddMonoidHom coe with toFun := coe }
#align prime_multiset.coe_pnat_monoid_hom PrimeMultiset.coePNatMonoidHom
-/- warning: prime_multiset.coe_coe_pnat_monoid_hom -> PrimeMultiset.coe_coePNatMonoidHom is a dubious translation:
-lean 3 declaration is
- Eq.{1} ((fun (_x : AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))) => PrimeMultiset -> (Multiset.{0} PNat)) PrimeMultiset.coePNatMonoidHom) (coeFn.{1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))) (fun (_x : AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))) => PrimeMultiset -> (Multiset.{0} PNat)) (AddMonoidHom.hasCoeToFun.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))) PrimeMultiset.coePNatMonoidHom) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) PrimeMultiset (Multiset.{0} PNat) (HasLiftT.mk.{1, 1} PrimeMultiset (Multiset.{0} PNat) (CoeTCₓ.coe.{1, 1} PrimeMultiset (Multiset.{0} PNat) (coeBase.{1, 1} PrimeMultiset (Multiset.{0} PNat) PrimeMultiset.coePNat))))
-but is expected to have type
- Eq.{1} (forall (a : PrimeMultiset), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : PrimeMultiset) => Multiset.{0} PNat) a) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (fun (_x : PrimeMultiset) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : PrimeMultiset) => Multiset.{0} PNat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (Multiset.{0} PNat) (AddZeroClass.toAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))) (AddZeroClass.toAdd.{0} (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat)))))) (AddMonoidHom.addMonoidHomClass.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))))) PrimeMultiset.coePNatMonoidHom) (Coe.coe.{1, 1} PrimeMultiset (Multiset.{0} PNat) PrimeMultiset.coePNat)
-Case conversion may be inaccurate. Consider using '#align prime_multiset.coe_coe_pnat_monoid_hom PrimeMultiset.coe_coePNatMonoidHomₓ'. -/
@[simp]
theorem coe_coePNatMonoidHom : (coePNatMonoidHom : PrimeMultiset → Multiset ℕ+) = coe :=
rfl
@@ -287,35 +257,17 @@ def ofPNatList (l : List ℕ+) (h : ∀ p : ℕ+, p ∈ l → p.Prime) : PrimeMu
#align prime_multiset.of_pnat_list PrimeMultiset.ofPNatList
-/
-/- warning: prime_multiset.prod_of_pnat_list -> PrimeMultiset.prod_ofPNatList is a dubious translation:
-lean 3 declaration is
- forall (l : List.{0} PNat) (h : forall (p : PNat), (Membership.Mem.{0, 0} PNat (List.{0} PNat) (List.hasMem.{0} PNat) p l) -> (PNat.Prime p)), Eq.{1} PNat (PrimeMultiset.prod (PrimeMultiset.ofPNatList l h)) (List.prod.{0} PNat PNat.hasMul PNat.hasOne l)
-but is expected to have type
- forall (l : List.{0} PNat) (h : forall (p : PNat), (Membership.mem.{0, 0} PNat (List.{0} PNat) (List.instMembershipList.{0} PNat) p l) -> (PNat.Prime p)), Eq.{1} PNat (PrimeMultiset.prod (PrimeMultiset.ofPNatList l h)) (List.prod.{0} PNat instPNatMul instOnePNat l)
-Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_of_pnat_list PrimeMultiset.prod_ofPNatListₓ'. -/
theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).Prod = l.Prod :=
by
have := prod_of_pnat_multiset (l : Multiset ℕ+) h
rw [Multiset.coe_prod] at this; exact this
#align prime_multiset.prod_of_pnat_list PrimeMultiset.prod_ofPNatList
-/- warning: prime_multiset.prod_zero -> PrimeMultiset.prod_zero is a dubious translation:
-lean 3 declaration is
- Eq.{1} PNat (PrimeMultiset.prod (OfNat.ofNat.{0} PrimeMultiset 0 (OfNat.mk.{0} PrimeMultiset 0 (Zero.zero.{0} PrimeMultiset (AddZeroClass.toHasZero.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid))))))))) (OfNat.ofNat.{0} PNat 1 (OfNat.mk.{0} PNat 1 (One.one.{0} PNat PNat.hasOne)))
-but is expected to have type
- Eq.{1} PNat (PrimeMultiset.prod (OfNat.ofNat.{0} PrimeMultiset 0 (Zero.toOfNat0.{0} PrimeMultiset (AddMonoid.toZero.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))))) (OfNat.ofNat.{0} PNat 1 (instOfNatPNatHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))
-Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_zero PrimeMultiset.prod_zeroₓ'. -/
/-- The product map gives a homomorphism from the additive monoid
of multisets to the multiplicative monoid ℕ+. -/
theorem prod_zero : (0 : PrimeMultiset).Prod = 1 := by dsimp [Prod]; exact Multiset.prod_zero
#align prime_multiset.prod_zero PrimeMultiset.prod_zero
-/- warning: prime_multiset.prod_add -> PrimeMultiset.prod_add is a dubious translation:
-lean 3 declaration is
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (HAdd.hAdd.{0, 0, 0} PrimeMultiset PrimeMultiset PrimeMultiset (instHAdd.{0} PrimeMultiset (AddZeroClass.toHasAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))))) u v)) (HMul.hMul.{0, 0, 0} PNat PNat PNat (instHMul.{0} PNat PNat.hasMul) (PrimeMultiset.prod u) (PrimeMultiset.prod v))
-but is expected to have type
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (HAdd.hAdd.{0, 0, 0} PrimeMultiset PrimeMultiset PrimeMultiset (instHAdd.{0} PrimeMultiset (AddZeroClass.toAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))))) u v)) (HMul.hMul.{0, 0, 0} PNat PNat PNat (instHMul.{0} PNat instPNatMul) (PrimeMultiset.prod u) (PrimeMultiset.prod v))
-Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_add PrimeMultiset.prod_addₓ'. -/
theorem prod_add (u v : PrimeMultiset) : (u + v).Prod = u.Prod * v.Prod :=
by
change (coe_pnat_monoid_hom (u + v)).Prod = _
@@ -323,12 +275,6 @@ theorem prod_add (u v : PrimeMultiset) : (u + v).Prod = u.Prod * v.Prod :=
exact Multiset.prod_add _ _
#align prime_multiset.prod_add PrimeMultiset.prod_add
-/- warning: prime_multiset.prod_smul -> PrimeMultiset.prod_smul is a dubious translation:
-lean 3 declaration is
- forall (d : Nat) (u : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (SMul.smul.{0, 0} Nat PrimeMultiset (AddMonoid.SMul.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) d u)) (HPow.hPow.{0, 0, 0} PNat Nat PNat (instHPow.{0, 0} PNat Nat (Monoid.Pow.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) d)
-but is expected to have type
- forall (d : Nat) (u : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (HSMul.hSMul.{0, 0, 0} Nat PrimeMultiset PrimeMultiset (instHSMul.{0, 0} Nat PrimeMultiset (AddMonoid.SMul.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))) d u)) (Pow.pow.{0, 0} PNat Nat (Monoid.Pow.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid)))))) (PrimeMultiset.prod u) d)
-Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_smul PrimeMultiset.prod_smulₓ'. -/
theorem prod_smul (d : ℕ) (u : PrimeMultiset) : (d • u).Prod = u.Prod ^ d :=
by
induction' d with d ih; rfl
@@ -402,24 +348,12 @@ def factorMultisetEquiv : ℕ+ ≃ PrimeMultiset
#align pnat.factor_multiset_equiv PNat.factorMultisetEquiv
-/
-/- warning: pnat.factor_multiset_one -> PNat.factorMultiset_one is a dubious translation:
-lean 3 declaration is
- Eq.{1} PrimeMultiset (PNat.factorMultiset (OfNat.ofNat.{0} PNat 1 (OfNat.mk.{0} PNat 1 (One.one.{0} PNat PNat.hasOne)))) (OfNat.ofNat.{0} PrimeMultiset 0 (OfNat.mk.{0} PrimeMultiset 0 (Zero.zero.{0} PrimeMultiset (AddZeroClass.toHasZero.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid))))))))
-but is expected to have type
- Eq.{1} PrimeMultiset (PNat.factorMultiset (OfNat.ofNat.{0} PNat 1 (instOfNatPNatHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))) (OfNat.ofNat.{0} PrimeMultiset 0 (Zero.toOfNat0.{0} PrimeMultiset (AddMonoid.toZero.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))))
-Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_one PNat.factorMultiset_oneₓ'. -/
/-- Factoring gives a homomorphism from the multiplicative
monoid ℕ+ to the additive monoid of multisets. -/
theorem factorMultiset_one : factorMultiset 1 = 0 := by
simp [factor_multiset, PrimeMultiset.ofNatList, PrimeMultiset.ofNatMultiset]
#align pnat.factor_multiset_one PNat.factorMultiset_one
-/- warning: pnat.factor_multiset_mul -> PNat.factorMultiset_mul is a dubious translation:
-lean 3 declaration is
- forall (n : PNat) (m : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (HMul.hMul.{0, 0, 0} PNat PNat PNat (instHMul.{0} PNat PNat.hasMul) n m)) (HAdd.hAdd.{0, 0, 0} PrimeMultiset PrimeMultiset PrimeMultiset (instHAdd.{0} PrimeMultiset (AddZeroClass.toHasAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))))) (PNat.factorMultiset n) (PNat.factorMultiset m))
-but is expected to have type
- forall (n : PNat) (m : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (HMul.hMul.{0, 0, 0} PNat PNat PNat (instHMul.{0} PNat instPNatMul) n m)) (HAdd.hAdd.{0, 0, 0} PrimeMultiset PrimeMultiset PrimeMultiset (instHAdd.{0} PrimeMultiset (AddZeroClass.toAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))))) (PNat.factorMultiset n) (PNat.factorMultiset m))
-Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_mul PNat.factorMultiset_mulₓ'. -/
theorem factorMultiset_mul (n m : ℕ+) :
factorMultiset (n * m) = factorMultiset n + factorMultiset m :=
by
@@ -431,12 +365,6 @@ theorem factorMultiset_mul (n m : ℕ+) :
repeat' rw [PrimeMultiset.factorMultiset_prod]
#align pnat.factor_multiset_mul PNat.factorMultiset_mul
-/- warning: pnat.factor_multiset_pow -> PNat.factorMultiset_pow is a dubious translation:
-lean 3 declaration is
- forall (n : PNat) (m : Nat), Eq.{1} PrimeMultiset (PNat.factorMultiset (HPow.hPow.{0, 0, 0} PNat Nat PNat (instHPow.{0, 0} PNat Nat (Monoid.Pow.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) n m)) (SMul.smul.{0, 0} Nat PrimeMultiset (AddMonoid.SMul.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) m (PNat.factorMultiset n))
-but is expected to have type
- forall (n : PNat) (m : Nat), Eq.{1} PrimeMultiset (PNat.factorMultiset (Pow.pow.{0, 0} PNat Nat (Monoid.Pow.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid)))))) n m)) (HSMul.hSMul.{0, 0, 0} Nat PrimeMultiset PrimeMultiset (instHSMul.{0, 0} Nat PrimeMultiset (AddMonoid.SMul.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))) m (PNat.factorMultiset n))
-Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_pow PNat.factorMultiset_powₓ'. -/
theorem factorMultiset_pow (n : ℕ+) (m : ℕ) : factorMultiset (n ^ m) = m • factorMultiset n :=
by
let u := factor_multiset n
@@ -456,12 +384,6 @@ theorem factorMultiset_ofPrime (p : Nat.Primes) :
#align pnat.factor_multiset_of_prime PNat.factorMultiset_ofPrime
-/
-/- warning: pnat.factor_multiset_le_iff -> PNat.factorMultiset_le_iff is a dubious translation:
-lean 3 declaration is
- forall {m : PNat} {n : PNat}, Iff (LE.le.{0} PrimeMultiset (Preorder.toHasLe.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) (PNat.factorMultiset n)) (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) m n)
-but is expected to have type
- forall {m : PNat} {n : PNat}, Iff (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) (PNat.factorMultiset n)) (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) m n)
-Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_le_iff PNat.factorMultiset_le_iffₓ'. -/
/-- We now have four different results that all encode the
idea that inequality of multisets corresponds to divisibility
of positive integers. -/
@@ -478,12 +400,6 @@ theorem factorMultiset_le_iff {m n : ℕ+} : factorMultiset m ≤ factorMultiset
exact le_self_add
#align pnat.factor_multiset_le_iff PNat.factorMultiset_le_iff
-/- warning: pnat.factor_multiset_le_iff' -> PNat.factorMultiset_le_iff' is a dubious translation:
-lean 3 declaration is
- forall {m : PNat} {v : PrimeMultiset}, Iff (LE.le.{0} PrimeMultiset (Preorder.toHasLe.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) v) (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) m (PrimeMultiset.prod v))
-but is expected to have type
- forall {m : PNat} {v : PrimeMultiset}, Iff (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) v) (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) m (PrimeMultiset.prod v))
-Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_le_iff' PNat.factorMultiset_le_iff'ₓ'. -/
theorem factorMultiset_le_iff' {m : ℕ+} {v : PrimeMultiset} : factorMultiset m ≤ v ↔ m ∣ v.Prod :=
by
let h := @factor_multiset_le_iff m v.prod
@@ -494,24 +410,12 @@ end PNat
namespace PrimeMultiset
-/- warning: prime_multiset.prod_dvd_iff -> PrimeMultiset.prod_dvd_iff is a dubious translation:
-lean 3 declaration is
- forall {u : PrimeMultiset} {v : PrimeMultiset}, Iff (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) (PrimeMultiset.prod v)) (LE.le.{0} PrimeMultiset (Preorder.toHasLe.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) u v)
-but is expected to have type
- forall {u : PrimeMultiset} {v : PrimeMultiset}, Iff (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) (PrimeMultiset.prod v)) (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) u v)
-Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_dvd_iff PrimeMultiset.prod_dvd_iffₓ'. -/
theorem prod_dvd_iff {u v : PrimeMultiset} : u.Prod ∣ v.Prod ↔ u ≤ v :=
by
let h := @PNat.factorMultiset_le_iff' u.prod v
rw [u.factor_multiset_prod] at h; exact h.symm
#align prime_multiset.prod_dvd_iff PrimeMultiset.prod_dvd_iff
-/- warning: prime_multiset.prod_dvd_iff' -> PrimeMultiset.prod_dvd_iff' is a dubious translation:
-lean 3 declaration is
- forall {u : PrimeMultiset} {n : PNat}, Iff (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) n) (LE.le.{0} PrimeMultiset (Preorder.toHasLe.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) u (PNat.factorMultiset n))
-but is expected to have type
- forall {u : PrimeMultiset} {n : PNat}, Iff (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) n) (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) u (PNat.factorMultiset n))
-Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_dvd_iff' PrimeMultiset.prod_dvd_iff'ₓ'. -/
theorem prod_dvd_iff' {u : PrimeMultiset} {n : ℕ+} : u.Prod ∣ n ↔ u ≤ n.factorMultiset :=
by
let h := @prod_dvd_iff u n.factor_multiset
@@ -522,12 +426,6 @@ end PrimeMultiset
namespace PNat
-/- warning: pnat.factor_multiset_gcd -> PNat.factorMultiset_gcd is a dubious translation:
-lean 3 declaration is
- forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.gcd m n)) (Inf.inf.{0} PrimeMultiset (SemilatticeInf.toHasInf.{0} PrimeMultiset (Lattice.toSemilatticeInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset PrimeMultiset.distribLattice))) (PNat.factorMultiset m) (PNat.factorMultiset n))
-but is expected to have type
- forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.gcd m n)) (Inf.inf.{0} PrimeMultiset (Lattice.toInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset instPrimeMultisetDistribLattice)) (PNat.factorMultiset m) (PNat.factorMultiset n))
-Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_gcd PNat.factorMultiset_gcdₓ'. -/
/-- The gcd and lcm operations on positive integers correspond
to the inf and sup operations on multisets. -/
theorem factorMultiset_gcd (m n : ℕ+) :
@@ -541,12 +439,6 @@ theorem factorMultiset_gcd (m n : ℕ+) :
exact inf_le_left; exact inf_le_right
#align pnat.factor_multiset_gcd PNat.factorMultiset_gcd
-/- warning: pnat.factor_multiset_lcm -> PNat.factorMultiset_lcm is a dubious translation:
-lean 3 declaration is
- forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.lcm m n)) (Sup.sup.{0} PrimeMultiset (SemilatticeSup.toHasSup.{0} PrimeMultiset PrimeMultiset.semilatticeSup) (PNat.factorMultiset m) (PNat.factorMultiset n))
-but is expected to have type
- forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.lcm m n)) (Sup.sup.{0} PrimeMultiset (SemilatticeSup.toSup.{0} PrimeMultiset instPrimeMultisetSemilatticeSup) (PNat.factorMultiset m) (PNat.factorMultiset n))
-Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_lcm PNat.factorMultiset_lcmₓ'. -/
theorem factorMultiset_lcm (m n : ℕ+) :
factorMultiset (lcm m n) = factorMultiset m ⊔ factorMultiset n :=
by
@@ -558,12 +450,6 @@ theorem factorMultiset_lcm (m n : ℕ+) :
exact dvd_lcm_left m n; exact dvd_lcm_right m n
#align pnat.factor_multiset_lcm PNat.factorMultiset_lcm
-/- warning: pnat.count_factor_multiset -> PNat.count_factorMultiset is a dubious translation:
-lean 3 declaration is
- forall (m : PNat) (p : Nat.Primes) (k : Nat), Iff (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) (HPow.hPow.{0, 0, 0} PNat Nat PNat (instHPow.{0, 0} PNat Nat (Monoid.Pow.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat.Primes PNat (HasLiftT.mk.{1, 1} Nat.Primes PNat (CoeTCₓ.coe.{1, 1} Nat.Primes PNat (coeBase.{1, 1} Nat.Primes PNat Nat.Primes.coePNat))) p) k) m) (LE.le.{0} Nat Nat.hasLe k (Multiset.count.{0} Nat.Primes (fun (a : Nat.Primes) (b : Nat.Primes) => Subtype.decidableEq.{0} Nat (fun (x : Nat) => Nat.Prime x) (fun (a : Nat) (b : Nat) => Nat.decidableEq a b) a b) p (PNat.factorMultiset m)))
-but is expected to have type
- forall (m : PNat) (p : Nat.Primes) (k : Nat), Iff (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) (Pow.pow.{0, 0} PNat Nat (Monoid.Pow.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid)))))) (Nat.Primes.toPNat p) k) m) (LE.le.{0} Nat instLENat k (Multiset.count.{0} Nat.Primes (fun (a : Nat.Primes) (b : Nat.Primes) => Nat.instPrimesDecidableEq a b) p (PNat.factorMultiset m)))
-Case conversion may be inaccurate. Consider using '#align pnat.count_factor_multiset PNat.count_factorMultisetₓ'. -/
/-- The number of occurrences of p in the factor multiset of m
is the same as the p-adic valuation of m. -/
theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
@@ -584,12 +470,6 @@ end PNat
namespace PrimeMultiset
-/- warning: prime_multiset.prod_inf -> PrimeMultiset.prod_inf is a dubious translation:
-lean 3 declaration is
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (Inf.inf.{0} PrimeMultiset (SemilatticeInf.toHasInf.{0} PrimeMultiset (Lattice.toSemilatticeInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset PrimeMultiset.distribLattice))) u v)) (PNat.gcd (PrimeMultiset.prod u) (PrimeMultiset.prod v))
-but is expected to have type
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (Inf.inf.{0} PrimeMultiset (Lattice.toInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset instPrimeMultisetDistribLattice)) u v)) (PNat.gcd (PrimeMultiset.prod u) (PrimeMultiset.prod v))
-Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_inf PrimeMultiset.prod_infₓ'. -/
theorem prod_inf (u v : PrimeMultiset) : (u ⊓ v).Prod = PNat.gcd u.Prod v.Prod :=
by
let n := u.prod
@@ -600,12 +480,6 @@ theorem prod_inf (u v : PrimeMultiset) : (u ⊓ v).Prod = PNat.gcd u.Prod v.Prod
rw [← PNat.factorMultiset_gcd n m, PNat.prod_factorMultiset]
#align prime_multiset.prod_inf PrimeMultiset.prod_inf
-/- warning: prime_multiset.prod_sup -> PrimeMultiset.prod_sup is a dubious translation:
-lean 3 declaration is
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (Sup.sup.{0} PrimeMultiset (SemilatticeSup.toHasSup.{0} PrimeMultiset PrimeMultiset.semilatticeSup) u v)) (PNat.lcm (PrimeMultiset.prod u) (PrimeMultiset.prod v))
-but is expected to have type
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (Sup.sup.{0} PrimeMultiset (SemilatticeSup.toSup.{0} PrimeMultiset instPrimeMultisetSemilatticeSup) u v)) (PNat.lcm (PrimeMultiset.prod u) (PrimeMultiset.prod v))
-Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_sup PrimeMultiset.prod_supₓ'. -/
theorem prod_sup (u v : PrimeMultiset) : (u ⊔ v).Prod = PNat.lcm u.Prod v.Prod :=
by
let n := u.prod
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -188,8 +188,7 @@ instance coeMultisetPNatNat : Coe (Multiset ℕ+) (Multiset ℕ) :=
theorem coePNat_nat (v : PrimeMultiset) : ((v : Multiset ℕ+) : Multiset ℕ) = (v : Multiset ℕ) :=
by
change (v.map (coe : Nat.Primes → ℕ+)).map Subtype.val = v.map Subtype.val
- rw [Multiset.map_map]
- congr
+ rw [Multiset.map_map]; congr
#align prime_multiset.coe_pnat_nat PrimeMultiset.coePNat_nat
-/
@@ -229,10 +228,8 @@ theorem to_ofNatMultiset (v : Multiset ℕ) (h) : (ofNatMultiset v h : Multiset
by
unfold_coes
dsimp [of_nat_multiset, to_nat_multiset]
- have : (fun (p : ℕ) (h : p.Prime) => ((⟨p, h⟩ : Nat.Primes) : ℕ)) = fun p h => id p :=
- by
- funext p h
- rfl
+ have : (fun (p : ℕ) (h : p.Prime) => ((⟨p, h⟩ : Nat.Primes) : ℕ)) = fun p h => id p := by
+ funext p h; rfl
rw [Multiset.map_pmap, this, Multiset.pmap_eq_map, Multiset.map_id]
#align prime_multiset.to_of_nat_multiset PrimeMultiset.to_ofNatMultiset
-/
@@ -254,20 +251,15 @@ def ofPNatMultiset (v : Multiset ℕ+) (h : ∀ p : ℕ+, p ∈ v → p.Prime) :
theorem to_ofPNatMultiset (v : Multiset ℕ+) (h) : (ofPNatMultiset v h : Multiset ℕ+) = v :=
by
unfold_coes; dsimp [of_pnat_multiset, to_pnat_multiset]
- have : (fun (p : ℕ+) (h : p.Prime) => (coe : Nat.Primes → ℕ+) ⟨p, h⟩) = fun p h => id p :=
- by
- funext p h
- apply Subtype.eq
- rfl
+ have : (fun (p : ℕ+) (h : p.Prime) => (coe : Nat.Primes → ℕ+) ⟨p, h⟩) = fun p h => id p := by
+ funext p h; apply Subtype.eq; rfl
rw [Multiset.map_pmap, this, Multiset.pmap_eq_map, Multiset.map_id]
#align prime_multiset.to_of_pnat_multiset PrimeMultiset.to_ofPNatMultiset
-/
#print PrimeMultiset.prod_ofPNatMultiset /-
-theorem prod_ofPNatMultiset (v : Multiset ℕ+) (h) : ((ofPNatMultiset v h).Prod : ℕ+) = v.Prod :=
- by
- dsimp [Prod]
- rw [to_of_pnat_multiset]
+theorem prod_ofPNatMultiset (v : Multiset ℕ+) (h) : ((ofPNatMultiset v h).Prod : ℕ+) = v.Prod := by
+ dsimp [Prod]; rw [to_of_pnat_multiset]
#align prime_multiset.prod_of_pnat_multiset PrimeMultiset.prod_ofPNatMultiset
-/
@@ -283,8 +275,7 @@ def ofNatList (l : List ℕ) (h : ∀ p : ℕ, p ∈ l → p.Prime) : PrimeMulti
theorem prod_ofNatList (l : List ℕ) (h) : ((ofNatList l h).Prod : ℕ) = l.Prod :=
by
have := prod_of_nat_multiset (l : Multiset ℕ) h
- rw [Multiset.coe_prod] at this
- exact this
+ rw [Multiset.coe_prod] at this; exact this
#align prime_multiset.prod_of_nat_list PrimeMultiset.prod_ofNatList
-/
@@ -305,8 +296,7 @@ Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_of
theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).Prod = l.Prod :=
by
have := prod_of_pnat_multiset (l : Multiset ℕ+) h
- rw [Multiset.coe_prod] at this
- exact this
+ rw [Multiset.coe_prod] at this; exact this
#align prime_multiset.prod_of_pnat_list PrimeMultiset.prod_ofPNatList
/- warning: prime_multiset.prod_zero -> PrimeMultiset.prod_zero is a dubious translation:
@@ -317,10 +307,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_zero PrimeMultiset.prod_zeroₓ'. -/
/-- The product map gives a homomorphism from the additive monoid
of multisets to the multiplicative monoid ℕ+. -/
-theorem prod_zero : (0 : PrimeMultiset).Prod = 1 :=
- by
- dsimp [Prod]
- exact Multiset.prod_zero
+theorem prod_zero : (0 : PrimeMultiset).Prod = 1 := by dsimp [Prod]; exact Multiset.prod_zero
#align prime_multiset.prod_zero PrimeMultiset.prod_zero
/- warning: prime_multiset.prod_add -> PrimeMultiset.prod_add is a dubious translation:
@@ -344,8 +331,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_smul PrimeMultiset.prod_smulₓ'. -/
theorem prod_smul (d : ℕ) (u : PrimeMultiset) : (d • u).Prod = u.Prod ^ d :=
by
- induction' d with d ih
- rfl
+ induction' d with d ih; rfl
rw [succ_nsmul, prod_add, ih, Nat.succ_eq_add_one, pow_succ, mul_comm]
#align prime_multiset.prod_smul PrimeMultiset.prod_smul
@@ -501,8 +487,7 @@ Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_l
theorem factorMultiset_le_iff' {m : ℕ+} {v : PrimeMultiset} : factorMultiset m ≤ v ↔ m ∣ v.Prod :=
by
let h := @factor_multiset_le_iff m v.prod
- rw [v.factor_multiset_prod] at h
- exact h
+ rw [v.factor_multiset_prod] at h; exact h
#align pnat.factor_multiset_le_iff' PNat.factorMultiset_le_iff'
end PNat
@@ -518,8 +503,7 @@ Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_dv
theorem prod_dvd_iff {u v : PrimeMultiset} : u.Prod ∣ v.Prod ↔ u ≤ v :=
by
let h := @PNat.factorMultiset_le_iff' u.prod v
- rw [u.factor_multiset_prod] at h
- exact h.symm
+ rw [u.factor_multiset_prod] at h; exact h.symm
#align prime_multiset.prod_dvd_iff PrimeMultiset.prod_dvd_iff
/- warning: prime_multiset.prod_dvd_iff' -> PrimeMultiset.prod_dvd_iff' is a dubious translation:
@@ -531,8 +515,7 @@ Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_dv
theorem prod_dvd_iff' {u : PrimeMultiset} {n : ℕ+} : u.Prod ∣ n ↔ u ≤ n.factorMultiset :=
by
let h := @prod_dvd_iff u n.factor_multiset
- rw [n.prod_factor_multiset] at h
- exact h
+ rw [n.prod_factor_multiset] at h; exact h
#align prime_multiset.prod_dvd_iff' PrimeMultiset.prod_dvd_iff'
end PrimeMultiset
@@ -552,12 +535,10 @@ theorem factorMultiset_gcd (m n : ℕ+) :
by
apply le_antisymm
· apply le_inf_iff.mpr <;> constructor <;> apply factor_multiset_le_iff.mpr
- exact gcd_dvd_left m n
- exact gcd_dvd_right m n
+ exact gcd_dvd_left m n; exact gcd_dvd_right m n
· rw [← PrimeMultiset.prod_dvd_iff, prod_factor_multiset]
apply dvd_gcd <;> rw [PrimeMultiset.prod_dvd_iff']
- exact inf_le_left
- exact inf_le_right
+ exact inf_le_left; exact inf_le_right
#align pnat.factor_multiset_gcd PNat.factorMultiset_gcd
/- warning: pnat.factor_multiset_lcm -> PNat.factorMultiset_lcm is a dubious translation:
@@ -572,11 +553,9 @@ theorem factorMultiset_lcm (m n : ℕ+) :
apply le_antisymm
· rw [← PrimeMultiset.prod_dvd_iff, prod_factor_multiset]
apply lcm_dvd <;> rw [← factor_multiset_le_iff']
- exact le_sup_left
- exact le_sup_right
+ exact le_sup_left; exact le_sup_right
· apply sup_le_iff.mpr <;> constructor <;> apply factor_multiset_le_iff.mpr
- exact dvd_lcm_left m n
- exact dvd_lcm_right m n
+ exact dvd_lcm_left m n; exact dvd_lcm_right m n
#align pnat.factor_multiset_lcm PNat.factorMultiset_lcm
/- warning: pnat.count_factor_multiset -> PNat.count_factorMultiset is a dubious translation:
@@ -597,8 +576,7 @@ theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
apply multiset.eq_replicate.mpr
constructor
· rw [Multiset.card_nsmul, PrimeMultiset.card_ofPrime, mul_one]
- · intro q h
- rw [PrimeMultiset.ofPrime, Multiset.nsmul_singleton _ k] at h
+ · intro q h; rw [PrimeMultiset.ofPrime, Multiset.nsmul_singleton _ k] at h
exact Multiset.eq_of_mem_replicate h
#align pnat.count_factor_multiset PNat.count_factorMultiset
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -472,7 +472,7 @@ theorem factorMultiset_ofPrime (p : Nat.Primes) :
/- warning: pnat.factor_multiset_le_iff -> PNat.factorMultiset_le_iff is a dubious translation:
lean 3 declaration is
- forall {m : PNat} {n : PNat}, Iff (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) (PNat.factorMultiset n)) (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) m n)
+ forall {m : PNat} {n : PNat}, Iff (LE.le.{0} PrimeMultiset (Preorder.toHasLe.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) (PNat.factorMultiset n)) (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) m n)
but is expected to have type
forall {m : PNat} {n : PNat}, Iff (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) (PNat.factorMultiset n)) (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) m n)
Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_le_iff PNat.factorMultiset_le_iffₓ'. -/
@@ -494,7 +494,7 @@ theorem factorMultiset_le_iff {m n : ℕ+} : factorMultiset m ≤ factorMultiset
/- warning: pnat.factor_multiset_le_iff' -> PNat.factorMultiset_le_iff' is a dubious translation:
lean 3 declaration is
- forall {m : PNat} {v : PrimeMultiset}, Iff (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) v) (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) m (PrimeMultiset.prod v))
+ forall {m : PNat} {v : PrimeMultiset}, Iff (LE.le.{0} PrimeMultiset (Preorder.toHasLe.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) v) (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) m (PrimeMultiset.prod v))
but is expected to have type
forall {m : PNat} {v : PrimeMultiset}, Iff (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (PNat.factorMultiset m) v) (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) m (PrimeMultiset.prod v))
Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_le_iff' PNat.factorMultiset_le_iff'ₓ'. -/
@@ -511,7 +511,7 @@ namespace PrimeMultiset
/- warning: prime_multiset.prod_dvd_iff -> PrimeMultiset.prod_dvd_iff is a dubious translation:
lean 3 declaration is
- forall {u : PrimeMultiset} {v : PrimeMultiset}, Iff (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) (PrimeMultiset.prod v)) (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) u v)
+ forall {u : PrimeMultiset} {v : PrimeMultiset}, Iff (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) (PrimeMultiset.prod v)) (LE.le.{0} PrimeMultiset (Preorder.toHasLe.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) u v)
but is expected to have type
forall {u : PrimeMultiset} {v : PrimeMultiset}, Iff (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) (PrimeMultiset.prod v)) (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) u v)
Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_dvd_iff PrimeMultiset.prod_dvd_iffₓ'. -/
@@ -524,7 +524,7 @@ theorem prod_dvd_iff {u v : PrimeMultiset} : u.Prod ∣ v.Prod ↔ u ≤ v :=
/- warning: prime_multiset.prod_dvd_iff' -> PrimeMultiset.prod_dvd_iff' is a dubious translation:
lean 3 declaration is
- forall {u : PrimeMultiset} {n : PNat}, Iff (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) n) (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) u (PNat.factorMultiset n))
+ forall {u : PrimeMultiset} {n : PNat}, Iff (Dvd.Dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat PNat.linearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) n) (LE.le.{0} PrimeMultiset (Preorder.toHasLe.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) u (PNat.factorMultiset n))
but is expected to have type
forall {u : PrimeMultiset} {n : PNat}, Iff (Dvd.dvd.{0} PNat (semigroupDvd.{0} PNat (Monoid.toSemigroup.{0} PNat (RightCancelMonoid.toMonoid.{0} PNat (CancelMonoid.toRightCancelMonoid.{0} PNat (CancelCommMonoid.toCancelMonoid.{0} PNat (OrderedCancelCommMonoid.toCancelCommMonoid.{0} PNat (LinearOrderedCancelCommMonoid.toOrderedCancelCommMonoid.{0} PNat instPNatLinearOrderedCancelCommMonoid))))))) (PrimeMultiset.prod u) n) (LE.le.{0} PrimeMultiset (Preorder.toLE.{0} PrimeMultiset (PartialOrder.toPreorder.{0} PrimeMultiset (OrderedAddCommMonoid.toPartialOrder.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) u (PNat.factorMultiset n))
Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_dvd_iff' PrimeMultiset.prod_dvd_iff'ₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -55,7 +55,7 @@ def ofPrime (p : Nat.Primes) : PrimeMultiset :=
lean 3 declaration is
forall (p : Nat.Primes), Eq.{1} Nat (coeFn.{1, 1} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.orderedCancelAddCommMonoid.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.orderedCancelAddCommMonoid.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{0} Nat.Primes) -> Nat) (AddMonoidHom.hasCoeToFun.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.orderedCancelAddCommMonoid.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{0} Nat.Primes) (PrimeMultiset.ofPrime p)) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))
but is expected to have type
- forall (p : Nat.Primes), Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{0} Nat.Primes) => Nat) (PrimeMultiset.ofPrime p)) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) (fun (_x : Multiset.{0} Nat.Primes) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{0} Nat.Primes) => Nat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) Nat (AddZeroClass.toAdd.{0} (Multiset.{0} Nat.Primes) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{0} Nat.Primes) (PrimeMultiset.ofPrime p)) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{0} Nat.Primes) => Nat) (PrimeMultiset.ofPrime p)) 1 (instOfNatNat 1))
+ forall (p : Nat.Primes), Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{0} Nat.Primes) => Nat) (PrimeMultiset.ofPrime p)) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) (fun (_x : Multiset.{0} Nat.Primes) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{0} Nat.Primes) => Nat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) Nat (AddZeroClass.toAdd.{0} (Multiset.{0} Nat.Primes) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{0, 0} (Multiset.{0} Nat.Primes) Nat (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat.Primes) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat.Primes) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat.Primes) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat.Primes) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat.Primes)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{0} Nat.Primes) (PrimeMultiset.ofPrime p)) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{0} Nat.Primes) => Nat) (PrimeMultiset.ofPrime p)) 1 (instOfNatNat 1))
Case conversion may be inaccurate. Consider using '#align prime_multiset.card_of_prime PrimeMultiset.card_ofPrimeₓ'. -/
theorem card_ofPrime (p : Nat.Primes) : Multiset.card (ofPrime p) = 1 :=
rfl
@@ -96,7 +96,7 @@ def coeNatMonoidHom : PrimeMultiset →+ Multiset ℕ :=
lean 3 declaration is
Eq.{1} ((fun (_x : AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))) => PrimeMultiset -> (Multiset.{0} Nat)) PrimeMultiset.coeNatMonoidHom) (coeFn.{1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))) (fun (_x : AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))) => PrimeMultiset -> (Multiset.{0} Nat)) (AddMonoidHom.hasCoeToFun.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.orderedCancelAddCommMonoid.{0} Nat))))))) PrimeMultiset.coeNatMonoidHom) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) PrimeMultiset (Multiset.{0} Nat) (HasLiftT.mk.{1, 1} PrimeMultiset (Multiset.{0} Nat) (CoeTCₓ.coe.{1, 1} PrimeMultiset (Multiset.{0} Nat) (coeBase.{1, 1} PrimeMultiset (Multiset.{0} Nat) PrimeMultiset.coeNat))))
but is expected to have type
- Eq.{1} (forall (a : PrimeMultiset), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : PrimeMultiset) => Multiset.{0} Nat) a) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (fun (_x : PrimeMultiset) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : PrimeMultiset) => Multiset.{0} Nat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (Multiset.{0} Nat) (AddZeroClass.toAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))) (AddZeroClass.toAdd.{0} (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat)))))) (AddMonoidHom.addMonoidHomClass.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))))) PrimeMultiset.coeNatMonoidHom) (Coe.coe.{1, 1} PrimeMultiset (Multiset.{0} Nat) PrimeMultiset.coeNat)
+ Eq.{1} (forall (a : PrimeMultiset), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : PrimeMultiset) => Multiset.{0} Nat) a) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (fun (_x : PrimeMultiset) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : PrimeMultiset) => Multiset.{0} Nat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (Multiset.{0} Nat) (AddZeroClass.toAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))) (AddZeroClass.toAdd.{0} (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))) PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat)))))) (AddMonoidHom.addMonoidHomClass.{0, 0} PrimeMultiset (Multiset.{0} Nat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} Nat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} Nat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} Nat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} Nat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} Nat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} Nat))))))))) PrimeMultiset.coeNatMonoidHom) (Coe.coe.{1, 1} PrimeMultiset (Multiset.{0} Nat) PrimeMultiset.coeNat)
Case conversion may be inaccurate. Consider using '#align prime_multiset.coe_coe_nat_monoid_hom PrimeMultiset.coe_coeNatMonoidHomₓ'. -/
@[simp]
theorem coe_coeNatMonoidHom : (coeNatMonoidHom : PrimeMultiset → Multiset ℕ) = coe :=
@@ -151,7 +151,7 @@ def coePNatMonoidHom : PrimeMultiset →+ Multiset ℕ+ :=
lean 3 declaration is
Eq.{1} ((fun (_x : AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))) => PrimeMultiset -> (Multiset.{0} PNat)) PrimeMultiset.coePNatMonoidHom) (coeFn.{1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))) (fun (_x : AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))) => PrimeMultiset -> (Multiset.{0} PNat)) (AddMonoidHom.hasCoeToFun.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset PrimeMultiset.canonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.orderedCancelAddCommMonoid.{0} PNat))))))) PrimeMultiset.coePNatMonoidHom) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) PrimeMultiset (Multiset.{0} PNat) (HasLiftT.mk.{1, 1} PrimeMultiset (Multiset.{0} PNat) (CoeTCₓ.coe.{1, 1} PrimeMultiset (Multiset.{0} PNat) (coeBase.{1, 1} PrimeMultiset (Multiset.{0} PNat) PrimeMultiset.coePNat))))
but is expected to have type
- Eq.{1} (forall (a : PrimeMultiset), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : PrimeMultiset) => Multiset.{0} PNat) a) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (fun (_x : PrimeMultiset) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : PrimeMultiset) => Multiset.{0} PNat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (Multiset.{0} PNat) (AddZeroClass.toAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))) (AddZeroClass.toAdd.{0} (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat)))))) (AddMonoidHom.addMonoidHomClass.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))))) PrimeMultiset.coePNatMonoidHom) (Coe.coe.{1, 1} PrimeMultiset (Multiset.{0} PNat) PrimeMultiset.coePNat)
+ Eq.{1} (forall (a : PrimeMultiset), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : PrimeMultiset) => Multiset.{0} PNat) a) (FunLike.coe.{1, 1, 1} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (fun (_x : PrimeMultiset) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : PrimeMultiset) => Multiset.{0} PNat) _x) (AddHomClass.toFunLike.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (Multiset.{0} PNat) (AddZeroClass.toAdd.{0} PrimeMultiset (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid))))) (AddZeroClass.toAdd.{0} (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) (AddMonoidHomClass.toAddHomClass.{0, 0, 0} (AddMonoidHom.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))) PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat)))))) (AddMonoidHom.addMonoidHomClass.{0, 0} PrimeMultiset (Multiset.{0} PNat) (AddMonoid.toAddZeroClass.{0} PrimeMultiset (AddCommMonoid.toAddMonoid.{0} PrimeMultiset (OrderedAddCommMonoid.toAddCommMonoid.{0} PrimeMultiset (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{0} PrimeMultiset instPrimeMultisetCanonicallyOrderedAddMonoid)))) (AddMonoid.toAddZeroClass.{0} (Multiset.{0} PNat) (AddRightCancelMonoid.toAddMonoid.{0} (Multiset.{0} PNat) (AddCancelMonoid.toAddRightCancelMonoid.{0} (Multiset.{0} PNat) (AddCancelCommMonoid.toAddCancelMonoid.{0} (Multiset.{0} PNat) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{0} (Multiset.{0} PNat) (Multiset.instOrderedCancelAddCommMonoidMultiset.{0} PNat))))))))) PrimeMultiset.coePNatMonoidHom) (Coe.coe.{1, 1} PrimeMultiset (Multiset.{0} PNat) PrimeMultiset.coePNat)
Case conversion may be inaccurate. Consider using '#align prime_multiset.coe_coe_pnat_monoid_hom PrimeMultiset.coe_coePNatMonoidHomₓ'. -/
@[simp]
theorem coe_coePNatMonoidHom : (coePNatMonoidHom : PrimeMultiset → Multiset ℕ+) = coe :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -541,9 +541,9 @@ namespace PNat
/- warning: pnat.factor_multiset_gcd -> PNat.factorMultiset_gcd is a dubious translation:
lean 3 declaration is
- forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.gcd m n)) (HasInf.inf.{0} PrimeMultiset (SemilatticeInf.toHasInf.{0} PrimeMultiset (Lattice.toSemilatticeInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset PrimeMultiset.distribLattice))) (PNat.factorMultiset m) (PNat.factorMultiset n))
+ forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.gcd m n)) (Inf.inf.{0} PrimeMultiset (SemilatticeInf.toHasInf.{0} PrimeMultiset (Lattice.toSemilatticeInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset PrimeMultiset.distribLattice))) (PNat.factorMultiset m) (PNat.factorMultiset n))
but is expected to have type
- forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.gcd m n)) (HasInf.inf.{0} PrimeMultiset (Lattice.toHasInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset instPrimeMultisetDistribLattice)) (PNat.factorMultiset m) (PNat.factorMultiset n))
+ forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.gcd m n)) (Inf.inf.{0} PrimeMultiset (Lattice.toInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset instPrimeMultisetDistribLattice)) (PNat.factorMultiset m) (PNat.factorMultiset n))
Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_gcd PNat.factorMultiset_gcdₓ'. -/
/-- The gcd and lcm operations on positive integers correspond
to the inf and sup operations on multisets. -/
@@ -562,9 +562,9 @@ theorem factorMultiset_gcd (m n : ℕ+) :
/- warning: pnat.factor_multiset_lcm -> PNat.factorMultiset_lcm is a dubious translation:
lean 3 declaration is
- forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.lcm m n)) (HasSup.sup.{0} PrimeMultiset (SemilatticeSup.toHasSup.{0} PrimeMultiset PrimeMultiset.semilatticeSup) (PNat.factorMultiset m) (PNat.factorMultiset n))
+ forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.lcm m n)) (Sup.sup.{0} PrimeMultiset (SemilatticeSup.toHasSup.{0} PrimeMultiset PrimeMultiset.semilatticeSup) (PNat.factorMultiset m) (PNat.factorMultiset n))
but is expected to have type
- forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.lcm m n)) (HasSup.sup.{0} PrimeMultiset (SemilatticeSup.toHasSup.{0} PrimeMultiset instPrimeMultisetSemilatticeSup) (PNat.factorMultiset m) (PNat.factorMultiset n))
+ forall (m : PNat) (n : PNat), Eq.{1} PrimeMultiset (PNat.factorMultiset (PNat.lcm m n)) (Sup.sup.{0} PrimeMultiset (SemilatticeSup.toSup.{0} PrimeMultiset instPrimeMultisetSemilatticeSup) (PNat.factorMultiset m) (PNat.factorMultiset n))
Case conversion may be inaccurate. Consider using '#align pnat.factor_multiset_lcm PNat.factorMultiset_lcmₓ'. -/
theorem factorMultiset_lcm (m n : ℕ+) :
factorMultiset (lcm m n) = factorMultiset m ⊔ factorMultiset n :=
@@ -608,9 +608,9 @@ namespace PrimeMultiset
/- warning: prime_multiset.prod_inf -> PrimeMultiset.prod_inf is a dubious translation:
lean 3 declaration is
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (HasInf.inf.{0} PrimeMultiset (SemilatticeInf.toHasInf.{0} PrimeMultiset (Lattice.toSemilatticeInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset PrimeMultiset.distribLattice))) u v)) (PNat.gcd (PrimeMultiset.prod u) (PrimeMultiset.prod v))
+ forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (Inf.inf.{0} PrimeMultiset (SemilatticeInf.toHasInf.{0} PrimeMultiset (Lattice.toSemilatticeInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset PrimeMultiset.distribLattice))) u v)) (PNat.gcd (PrimeMultiset.prod u) (PrimeMultiset.prod v))
but is expected to have type
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (HasInf.inf.{0} PrimeMultiset (Lattice.toHasInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset instPrimeMultisetDistribLattice)) u v)) (PNat.gcd (PrimeMultiset.prod u) (PrimeMultiset.prod v))
+ forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (Inf.inf.{0} PrimeMultiset (Lattice.toInf.{0} PrimeMultiset (DistribLattice.toLattice.{0} PrimeMultiset instPrimeMultisetDistribLattice)) u v)) (PNat.gcd (PrimeMultiset.prod u) (PrimeMultiset.prod v))
Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_inf PrimeMultiset.prod_infₓ'. -/
theorem prod_inf (u v : PrimeMultiset) : (u ⊓ v).Prod = PNat.gcd u.Prod v.Prod :=
by
@@ -624,9 +624,9 @@ theorem prod_inf (u v : PrimeMultiset) : (u ⊓ v).Prod = PNat.gcd u.Prod v.Prod
/- warning: prime_multiset.prod_sup -> PrimeMultiset.prod_sup is a dubious translation:
lean 3 declaration is
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (HasSup.sup.{0} PrimeMultiset (SemilatticeSup.toHasSup.{0} PrimeMultiset PrimeMultiset.semilatticeSup) u v)) (PNat.lcm (PrimeMultiset.prod u) (PrimeMultiset.prod v))
+ forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (Sup.sup.{0} PrimeMultiset (SemilatticeSup.toHasSup.{0} PrimeMultiset PrimeMultiset.semilatticeSup) u v)) (PNat.lcm (PrimeMultiset.prod u) (PrimeMultiset.prod v))
but is expected to have type
- forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (HasSup.sup.{0} PrimeMultiset (SemilatticeSup.toHasSup.{0} PrimeMultiset instPrimeMultisetSemilatticeSup) u v)) (PNat.lcm (PrimeMultiset.prod u) (PrimeMultiset.prod v))
+ forall (u : PrimeMultiset) (v : PrimeMultiset), Eq.{1} PNat (PrimeMultiset.prod (Sup.sup.{0} PrimeMultiset (SemilatticeSup.toSup.{0} PrimeMultiset instPrimeMultisetSemilatticeSup) u v)) (PNat.lcm (PrimeMultiset.prod u) (PrimeMultiset.prod v))
Case conversion may be inaccurate. Consider using '#align prime_multiset.prod_sup PrimeMultiset.prod_supₓ'. -/
theorem prod_sup (u v : PrimeMultiset) : (u ⊔ v).Prod = PNat.lcm u.Prod v.Prod :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -364,12 +364,12 @@ theorem factorMultiset_gcd (m n : ℕ+) :
factorMultiset (gcd m n) = factorMultiset m ⊓ factorMultiset n := by
apply le_antisymm
· apply le_inf_iff.mpr; constructor <;> apply factorMultiset_le_iff.mpr
- exact gcd_dvd_left m n
- exact gcd_dvd_right m n
+ · exact gcd_dvd_left m n
+ · exact gcd_dvd_right m n
· rw [← PrimeMultiset.prod_dvd_iff, prod_factorMultiset]
apply dvd_gcd <;> rw [PrimeMultiset.prod_dvd_iff']
- exact inf_le_left
- exact inf_le_right
+ · exact inf_le_left
+ · exact inf_le_right
#align pnat.factor_multiset_gcd PNat.factorMultiset_gcd
theorem factorMultiset_lcm (m n : ℕ+) :
@@ -377,11 +377,11 @@ theorem factorMultiset_lcm (m n : ℕ+) :
apply le_antisymm
· rw [← PrimeMultiset.prod_dvd_iff, prod_factorMultiset]
apply lcm_dvd <;> rw [← factorMultiset_le_iff']
- exact le_sup_left
- exact le_sup_right
+ · exact le_sup_left
+ · exact le_sup_right
· apply sup_le_iff.mpr; constructor <;> apply factorMultiset_le_iff.mpr
- exact dvd_lcm_left m n
- exact dvd_lcm_right m n
+ · exact dvd_lcm_left m n
+ · exact dvd_lcm_right m n
#align pnat.factor_multiset_lcm PNat.factorMultiset_lcm
/-- The number of occurrences of p in the factor multiset of m
@@ -388,7 +388,6 @@ theorem factorMultiset_lcm (m n : ℕ+) :
is the same as the p-adic valuation of m. -/
theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
(p : ℕ+) ^ k ∣ m ↔ k ≤ m.factorMultiset.count p := by
- intros
rw [Multiset.le_count_iff_replicate_le, ← factorMultiset_le_iff, factorMultiset_pow,
factorMultiset_ofPrime]
congr! 2
List → Multiset
(#11099)
These did not respect the naming convention by having the coe
as a prefix instead of a suffix, or vice-versa. Also add a bunch of norm_cast
@@ -194,7 +194,7 @@ def ofNatList (l : List ℕ) (h : ∀ p : ℕ, p ∈ l → p.Prime) : PrimeMulti
theorem prod_ofNatList (l : List ℕ) (h) : ((ofNatList l h).prod : ℕ) = l.prod := by
have := prod_ofNatMultiset (l : Multiset ℕ) h
- rw [Multiset.coe_prod] at this
+ rw [Multiset.prod_coe] at this
exact this
#align prime_multiset.prod_of_nat_list PrimeMultiset.prod_ofNatList
@@ -206,7 +206,7 @@ def ofPNatList (l : List ℕ+) (h : ∀ p : ℕ+, p ∈ l → p.Prime) : PrimeMu
theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).prod = l.prod := by
have := prod_ofPNatMultiset (l : Multiset ℕ+) h
- rw [Multiset.coe_prod] at this
+ rw [Multiset.prod_coe] at this
exact this
#align prime_multiset.prod_of_pnat_list PrimeMultiset.prod_ofPNatList
@@ -263,7 +263,7 @@ theorem factorMultiset_prod (v : PrimeMultiset) : v.prod.factorMultiset = v := b
rcases v with ⟨l⟩
--unfold_coes
dsimp [PrimeMultiset.toNatMultiset]
- rw [Multiset.coe_prod]
+ rw [Multiset.prod_coe]
let l' := l.map (Coe.coe : Nat.Primes → ℕ)
have : ∀ p : ℕ, p ∈ l' → p.Prime := fun p hp => by
rcases List.mem_map.mp hp with ⟨⟨_, hp'⟩, ⟨_, h_eq⟩⟩
@@ -225,7 +225,7 @@ theorem prod_add (u v : PrimeMultiset) : (u + v).prod = u.prod * v.prod := by
theorem prod_smul (d : ℕ) (u : PrimeMultiset) : (d • u).prod = u.prod ^ d := by
induction d with
| zero => simp only [Nat.zero_eq, zero_nsmul, pow_zero, prod_zero]
- | succ n ih => rw [succ_nsmul, prod_add, ih, pow_succ, mul_comm]
+ | succ n ih => rw [succ_nsmul, prod_add, ih, pow_succ]
#align prime_multiset.prod_smul PrimeMultiset.prod_smul
end PrimeMultiset
@@ -222,12 +222,10 @@ theorem prod_add (u v : PrimeMultiset) : (u + v).prod = u.prod * v.prod := by
exact Multiset.prod_add _ _
#align prime_multiset.prod_add PrimeMultiset.prod_add
--- Porting note: Need to replace ^ with Pow.pow to get the original mathlib statement
-theorem prod_smul (d : ℕ) (u : PrimeMultiset) : (d • u).prod = Pow.pow u.prod d := by
- induction' d with n ih
- · rfl
- · have : ∀ n' : ℕ, Pow.pow (prod u) n' = Monoid.npow n' (prod u) := fun _ ↦ rfl
- rw [succ_nsmul, prod_add, ih, this, this, Monoid.npow_succ, mul_comm]
+theorem prod_smul (d : ℕ) (u : PrimeMultiset) : (d • u).prod = u.prod ^ d := by
+ induction d with
+ | zero => simp only [Nat.zero_eq, zero_nsmul, pow_zero, prod_zero]
+ | succ n ih => rw [succ_nsmul, prod_add, ih, pow_succ, mul_comm]
#align prime_multiset.prod_smul PrimeMultiset.prod_smul
end PrimeMultiset
@@ -303,7 +301,7 @@ theorem factorMultiset_mul (n m : ℕ+) :
#align pnat.factor_multiset_mul PNat.factorMultiset_mul
theorem factorMultiset_pow (n : ℕ+) (m : ℕ) :
- factorMultiset (Pow.pow n m) = m • factorMultiset n := by
+ factorMultiset (n ^ m) = m • factorMultiset n := by
let u := factorMultiset n
have : n = u.prod := (prod_factorMultiset n).symm
rw [this, ← PrimeMultiset.prod_smul]
@@ -389,7 +387,7 @@ theorem factorMultiset_lcm (m n : ℕ+) :
/-- The number of occurrences of p in the factor multiset of m
is the same as the p-adic valuation of m. -/
theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
- Pow.pow (p : ℕ+) k ∣ m ↔ k ≤ m.factorMultiset.count p := by
+ (p : ℕ+) ^ k ∣ m ↔ k ≤ m.factorMultiset.count p := by
intros
rw [Multiset.le_count_iff_replicate_le, ← factorMultiset_le_iff, factorMultiset_pow,
factorMultiset_ofPrime]
Renames:
CanonicallyOrderedMonoid
->
CanonicallyOrderedCommMonoid
CanonicallyOrderedAddMonoid
->
CanonicallyOrderedAddCommMonoid
CanonicallyLinearOrderedMonoid
->
CanonicallyLinearOrderedCommMonoid
CanonicallyLinearOrderedAddMonoid
->
CanonicallyLinearOrderedAddCommMonoid
@@ -22,13 +22,13 @@ the multiplicity of `p` in this factors multiset being the p-adic valuation of `
* `FactorMultiset n`: Multiset of prime factors of `n`.
-/
--- Porting note: `deriving` contained
--- Inhabited, CanonicallyOrderedAddMonoid, DistribLattice, SemilatticeSup, OrderBot, Sub, OrderedSub
+-- Porting note: `deriving` contained Inhabited, CanonicallyOrderedAddCommMonoid, DistribLattice,
+-- SemilatticeSup, OrderBot, Sub, OrderedSub
/-- The type of multisets of prime numbers. Unique factorization
gives an equivalence between this set and ℕ+, as we will formalize
below. -/
def PrimeMultiset :=
- Multiset Nat.Primes deriving Inhabited, CanonicallyOrderedAddMonoid, DistribLattice,
+ Multiset Nat.Primes deriving Inhabited, CanonicallyOrderedAddCommMonoid, DistribLattice,
SemilatticeSup, Sub
#align prime_multiset PrimeMultiset
@@ -303,7 +303,7 @@ theorem factorMultiset_mul (n m : ℕ+) :
#align pnat.factor_multiset_mul PNat.factorMultiset_mul
theorem factorMultiset_pow (n : ℕ+) (m : ℕ) :
- factorMultiset (Pow.pow n m ) = m • factorMultiset n := by
+ factorMultiset (Pow.pow n m) = m • factorMultiset n := by
let u := factorMultiset n
have : n = u.prod := (prod_factorMultiset n).symm
rw [this, ← PrimeMultiset.prod_smul]
@@ -213,7 +213,6 @@ theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).prod = l.prod :=
/-- The product map gives a homomorphism from the additive monoid
of multisets to the multiplicative monoid ℕ+. -/
theorem prod_zero : (0 : PrimeMultiset).prod = 1 := by
- dsimp [Prod]
exact Multiset.prod_zero
#align prime_multiset.prod_zero PrimeMultiset.prod_zero
@@ -2,17 +2,14 @@
Copyright (c) 2019 Neil Strickland. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Neil Strickland
-
-! This file was ported from Lean 3 source module data.pnat.factors
-! leanprover-community/mathlib commit e3d9ab8faa9dea8f78155c6c27d62a621f4c152d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.BigOperators.Multiset.Basic
import Mathlib.Data.PNat.Prime
import Mathlib.Data.Nat.Factors
import Mathlib.Data.Multiset.Sort
+#align_import data.pnat.factors from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d"
+
/-!
# Prime factors of nonzero naturals
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.
@@ -369,7 +369,7 @@ namespace PNat
theorem factorMultiset_gcd (m n : ℕ+) :
factorMultiset (gcd m n) = factorMultiset m ⊓ factorMultiset n := by
apply le_antisymm
- · apply le_inf_iff.mpr ; constructor <;> apply factorMultiset_le_iff.mpr
+ · apply le_inf_iff.mpr; constructor <;> apply factorMultiset_le_iff.mpr
exact gcd_dvd_left m n
exact gcd_dvd_right m n
· rw [← PrimeMultiset.prod_dvd_iff, prod_factorMultiset]
@@ -385,7 +385,7 @@ theorem factorMultiset_lcm (m n : ℕ+) :
apply lcm_dvd <;> rw [← factorMultiset_le_iff']
exact le_sup_left
exact le_sup_right
- · apply sup_le_iff.mpr ; constructor <;> apply factorMultiset_le_iff.mpr
+ · apply sup_le_iff.mpr; constructor <;> apply factorMultiset_le_iff.mpr
exact dvd_lcm_left m n
exact dvd_lcm_right m n
#align pnat.factor_multiset_lcm PNat.factorMultiset_lcm
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -337,8 +337,8 @@ theorem factorMultiset_le_iff {m n : ℕ+} : factorMultiset m ≤ factorMultiset
exact le_self_add
#align pnat.factor_multiset_le_iff PNat.factorMultiset_le_iff
-theorem factorMultiset_le_iff' {m : ℕ+} {v : PrimeMultiset} : factorMultiset m ≤ v ↔ m ∣ v.prod :=
- by
+theorem factorMultiset_le_iff' {m : ℕ+} {v : PrimeMultiset} :
+ factorMultiset m ≤ v ↔ m ∣ v.prod := by
let h := @factorMultiset_le_iff m v.prod
rw [v.factorMultiset_prod] at h
exact h
congr
(#2595)
Switch to using congr!
instead, which is analogous to mathlib 3's congr'
.
@@ -397,8 +397,7 @@ theorem count_factorMultiset (m : ℕ+) (p : Nat.Primes) (k : ℕ) :
intros
rw [Multiset.le_count_iff_replicate_le, ← factorMultiset_le_iff, factorMultiset_pow,
factorMultiset_ofPrime]
- -- Porting note: replaced `congr 2` with next line
- suffices k • PrimeMultiset.ofPrime p = Multiset.replicate k p by rw [this]
+ congr! 2
apply Multiset.eq_replicate.mpr
constructor
· rw [Multiset.card_nsmul, PrimeMultiset.card_ofPrime, mul_one]
The unported dependencies are