data.multiset.antidiagonal
⟷
Mathlib.Data.Multiset.Antidiagonal
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -115,7 +115,7 @@ theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
#print Multiset.card_antidiagonal /-
@[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s := by
- have := card_powerset s <;> rwa [← antidiagonal_map_fst, card_map] at this
+ have := card_powerset s <;> rwa [← antidiagonal_map_fst, card_map] at this
#align multiset.card_antidiagonal Multiset.card_antidiagonal
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
-import Mathbin.Data.Multiset.Powerset
+import Data.Multiset.Powerset
#align_import data.multiset.antidiagonal from "leanprover-community/mathlib"@"e04043d6bf7264a3c84bc69711dc354958ca4516"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-
-! This file was ported from Lean 3 source module data.multiset.antidiagonal
-! leanprover-community/mathlib commit e04043d6bf7264a3c84bc69711dc354958ca4516
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Multiset.Powerset
+#align_import data.multiset.antidiagonal from "leanprover-community/mathlib"@"e04043d6bf7264a3c84bc69711dc354958ca4516"
+
/-!
# The antidiagonal on a multiset.
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -115,11 +115,14 @@ theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
#align multiset.antidiagonal_eq_map_powerset Multiset.antidiagonal_eq_map_powerset
-/
+#print Multiset.card_antidiagonal /-
@[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s := by
have := card_powerset s <;> rwa [← antidiagonal_map_fst, card_map] at this
#align multiset.card_antidiagonal Multiset.card_antidiagonal
+-/
+#print Multiset.prod_map_add /-
theorem prod_map_add [CommSemiring β] {s : Multiset α} {f g : α → β} :
prod (s.map fun a => f a + g a) =
sum ((antidiagonal s).map fun p => (p.1.map f).Prod * (p.2.map g).Prod) :=
@@ -132,6 +135,7 @@ theorem prod_map_add [CommSemiring β] {s : Multiset α} {f g : α → β} :
sum_map_mul_left.symm]
cc
#align multiset.prod_map_add Multiset.prod_map_add
+-/
end Multiset
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -117,7 +117,7 @@ theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
@[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s := by
- have := card_powerset s <;> rwa [← antidiagonal_map_fst, card_map] at this
+ have := card_powerset s <;> rwa [← antidiagonal_map_fst, card_map] at this
#align multiset.card_antidiagonal Multiset.card_antidiagonal
theorem prod_map_add [CommSemiring β] {s : Multiset α} {f g : α → β} :
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -115,20 +115,11 @@ theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
#align multiset.antidiagonal_eq_map_powerset Multiset.antidiagonal_eq_map_powerset
-/
-/- warning: multiset.card_antidiagonal -> Multiset.card_antidiagonal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align multiset.card_antidiagonal Multiset.card_antidiagonalₓ'. -/
@[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s := by
have := card_powerset s <;> rwa [← antidiagonal_map_fst, card_map] at this
#align multiset.card_antidiagonal Multiset.card_antidiagonal
-/- warning: multiset.prod_map_add -> Multiset.prod_map_add is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommSemiring.{u2} β] {s : Multiset.{u1} α} {f : α -> β} {g : α -> β}, Eq.{succ u2} β (Multiset.prod.{u2} β (CommSemiring.toCommMonoid.{u2} β _inst_1) (Multiset.map.{u1, u2} α β (fun (a : α) => HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β (Distrib.toHasAdd.{u2} β (NonUnitalNonAssocSemiring.toDistrib.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (CommSemiring.toSemiring.{u2} β _inst_1)))))) (f a) (g a)) s)) (Multiset.sum.{u2} β (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (CommSemiring.toSemiring.{u2} β _inst_1)))) (Multiset.map.{u1, u2} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)) β (fun (p : Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)) => HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β (Distrib.toHasMul.{u2} β (NonUnitalNonAssocSemiring.toDistrib.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (CommSemiring.toSemiring.{u2} β _inst_1)))))) (Multiset.prod.{u2} β (CommSemiring.toCommMonoid.{u2} β _inst_1) (Multiset.map.{u1, u2} α β f (Prod.fst.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) p))) (Multiset.prod.{u2} β (CommSemiring.toCommMonoid.{u2} β _inst_1) (Multiset.map.{u1, u2} α β g (Prod.snd.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) p)))) (Multiset.antidiagonal.{u1} α s)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommSemiring.{u2} β] {s : Multiset.{u1} α} {f : α -> β} {g : α -> β}, Eq.{succ u2} β (Multiset.prod.{u2} β (CommSemiring.toCommMonoid.{u2} β _inst_1) (Multiset.map.{u1, u2} α β (fun (a : α) => HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β (Distrib.toAdd.{u2} β (NonUnitalNonAssocSemiring.toDistrib.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (CommSemiring.toSemiring.{u2} β _inst_1)))))) (f a) (g a)) s)) (Multiset.sum.{u2} β (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (CommSemiring.toSemiring.{u2} β _inst_1)))) (Multiset.map.{u1, u2} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)) β (fun (p : Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)) => HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (CommSemiring.toSemiring.{u2} β _inst_1))))) (Multiset.prod.{u2} β (CommSemiring.toCommMonoid.{u2} β _inst_1) (Multiset.map.{u1, u2} α β f (Prod.fst.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) p))) (Multiset.prod.{u2} β (CommSemiring.toCommMonoid.{u2} β _inst_1) (Multiset.map.{u1, u2} α β g (Prod.snd.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α) p)))) (Multiset.antidiagonal.{u1} α s)))
-Case conversion may be inaccurate. Consider using '#align multiset.prod_map_add Multiset.prod_map_addₓ'. -/
theorem prod_map_add [CommSemiring β] {s : Multiset α} {f g : α → β} :
prod (s.map fun a => f a + g a) =
sum ((antidiagonal s).map fun p => (p.1.map f).Prod * (p.2.map g).Prod) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -116,10 +116,7 @@ theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
-/
/- warning: multiset.card_antidiagonal -> Multiset.card_antidiagonal is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} (s : Multiset.{u1} α), Eq.{1} Nat (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.orderedCancelAddCommMonoid.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.orderedCancelAddCommMonoid.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) -> Nat) (AddMonoidHom.hasCoeToFun.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.orderedCancelAddCommMonoid.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.antidiagonal.{u1} α s)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{u1} α) -> Nat) (AddMonoidHom.hasCoeToFun.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{u1} α) s))
-but is expected to have type
- forall {α : Type.{u1}} (s : Multiset.{u1} α), Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (fun (_x : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.antidiagonal.{u1} α s)) (HPow.hPow.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) s) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) (instHPow.{0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) s) instPowNat) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) 2 (instOfNatNat 2)) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} α) s))
+<too large>
Case conversion may be inaccurate. Consider using '#align multiset.card_antidiagonal Multiset.card_antidiagonalₓ'. -/
@[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -119,7 +119,7 @@ theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
lean 3 declaration is
forall {α : Type.{u1}} (s : Multiset.{u1} α), Eq.{1} Nat (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.orderedCancelAddCommMonoid.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.orderedCancelAddCommMonoid.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) -> Nat) (AddMonoidHom.hasCoeToFun.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.orderedCancelAddCommMonoid.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.antidiagonal.{u1} α s)) (HPow.hPow.{0, 0, 0} Nat Nat Nat (instHPow.{0, 0} Nat Nat (Monoid.Pow.{0} Nat Nat.monoid)) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{u1} α) -> Nat) (AddMonoidHom.hasCoeToFun.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{u1} α) s))
but is expected to have type
- forall {α : Type.{u1}} (s : Multiset.{u1} α), Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (fun (_x : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.antidiagonal.{u1} α s)) (HPow.hPow.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Nat) s) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) (instHPow.{0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Nat) s) instPowNat) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) 2 (instOfNatNat 2)) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} α) s))
+ forall {α : Type.{u1}} (s : Multiset.{u1} α), Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (fun (_x : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α)))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) (Multiset.antidiagonal.{u1} α s)) (HPow.hPow.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) s) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) (instHPow.{0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) s) instPowNat) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} (Prod.{u1, u1} (Multiset.{u1} α) (Multiset.{u1} α))) => Nat) (Multiset.antidiagonal.{u1} α s)) 2 (instOfNatNat 2)) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} α) s))
Case conversion may be inaccurate. Consider using '#align multiset.card_antidiagonal Multiset.card_antidiagonalₓ'. -/
@[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -78,7 +78,10 @@ theorem antidiagonal_cons (a : α) (s) :
simp only [revzip, reverse_append, quot_mk_to_coe, coe_eq_coe, powersetAux'_cons, cons_coe,
map_coe, antidiagonal_coe', coe_add]
rw [← zip_map, ← zip_map, zip_append, (_ : _ ++ _ = _)]
- · congr; simp only [List.map_id]; rw [map_reverse]; simp
+ · congr
+ · simp only [List.map_id]
+ · rw [map_reverse]
+ · simp
· simp
#align multiset.antidiagonal_cons Multiset.antidiagonal_cons
@@ -87,7 +87,7 @@ theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
induction' s using Multiset.induction_on with a s hs
· simp only [antidiagonal_zero, powerset_zero, zero_tsub, map_singleton]
· simp_rw [antidiagonal_cons, powerset_cons, map_add, hs, map_map, Function.comp, Prod.map_mk,
- id.def, sub_cons, erase_cons_head]
+ id, sub_cons, erase_cons_head]
rw [add_comm]
congr 1
refine' Multiset.map_congr rfl fun x hx ↦ _
@@ -78,7 +78,7 @@ theorem antidiagonal_cons (a : α) (s) :
simp only [revzip, reverse_append, quot_mk_to_coe, coe_eq_coe, powersetAux'_cons, cons_coe,
map_coe, antidiagonal_coe', coe_add]
rw [← zip_map, ← zip_map, zip_append, (_ : _ ++ _ = _)]
- · congr; simp; rw [map_reverse]; simp
+ · congr; simp only [List.map_id]; rw [map_reverse]; simp
· simp
#align multiset.antidiagonal_cons Multiset.antidiagonal_cons
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
@@ -76,7 +76,7 @@ theorem antidiagonal_cons (a : α) (s) :
map (Prod.map id (cons a)) (antidiagonal s) + map (Prod.map (cons a) id) (antidiagonal s) :=
Quotient.inductionOn s fun l ↦ by
simp only [revzip, reverse_append, quot_mk_to_coe, coe_eq_coe, powersetAux'_cons, cons_coe,
- coe_map, antidiagonal_coe', coe_add]
+ map_coe, antidiagonal_coe', coe_add]
rw [← zip_map, ← zip_map, zip_append, (_ : _ ++ _ = _)]
· congr; simp; rw [map_reverse]; simp
· simp
@@ -45,7 +45,7 @@ in what used to be `simp [antidiagonal_coe]`. -/
@[simp]
theorem mem_antidiagonal {s : Multiset α} {x : Multiset α × Multiset α} :
x ∈ antidiagonal s ↔ x.1 + x.2 = s :=
- Quotient.inductionOn s <| fun l ↦ by
+ Quotient.inductionOn s fun l ↦ by
dsimp only [quot_mk_to_coe, antidiagonal_coe]
refine' ⟨fun h => revzip_powersetAux h, fun h ↦ _⟩
haveI := Classical.decEq α
@@ -57,12 +57,12 @@ theorem mem_antidiagonal {s : Multiset α} {x : Multiset α × Multiset α} :
@[simp]
theorem antidiagonal_map_fst (s : Multiset α) : (antidiagonal s).map Prod.fst = powerset s :=
- Quotient.inductionOn s <| fun l ↦ by simp [powersetAux'];
+ Quotient.inductionOn s fun l ↦ by simp [powersetAux'];
#align multiset.antidiagonal_map_fst Multiset.antidiagonal_map_fst
@[simp]
theorem antidiagonal_map_snd (s : Multiset α) : (antidiagonal s).map Prod.snd = powerset s :=
- Quotient.inductionOn s <| fun l ↦ by simp [powersetAux']
+ Quotient.inductionOn s fun l ↦ by simp [powersetAux']
#align multiset.antidiagonal_map_snd Multiset.antidiagonal_map_snd
@[simp]
@@ -74,7 +74,7 @@ theorem antidiagonal_zero : @antidiagonal α 0 = {(0, 0)} :=
theorem antidiagonal_cons (a : α) (s) :
antidiagonal (a ::ₘ s) =
map (Prod.map id (cons a)) (antidiagonal s) + map (Prod.map (cons a) id) (antidiagonal s) :=
- Quotient.inductionOn s <| fun l ↦ by
+ Quotient.inductionOn s fun l ↦ by
simp only [revzip, reverse_append, quot_mk_to_coe, coe_eq_coe, powersetAux'_cons, cons_coe,
coe_map, antidiagonal_coe', coe_add]
rw [← zip_map, ← zip_map, zip_append, (_ : _ ++ _ = _)]
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -20,7 +20,7 @@ namespace Multiset
open List
-variable {α β : Type _}
+variable {α β : Type*}
/-- The antidiagonal of a multiset `s` consists of all pairs `(t₁, t₂)`
such that `t₁ + t₂ = s`. These pairs are counted with multiplicities. -/
@@ -65,11 +65,8 @@ theorem antidiagonal_map_snd (s : Multiset α) : (antidiagonal s).map Prod.snd =
Quotient.inductionOn s <| fun l ↦ by simp [powersetAux']
#align multiset.antidiagonal_map_snd Multiset.antidiagonal_map_snd
-/- Porting note: I changed `@antidiagonal` to `@antidiagonal.{u}` because otherwise I got
-`Multiset.antidiagonal_zero.{u_2, u_1} {α : Type (max u_1 u_2)} : ...`, which gave me issues
-and triggered the linter. -/
@[simp]
-theorem antidiagonal_zero : @antidiagonal.{u} α 0 = {(0, 0)} :=
+theorem antidiagonal_zero : @antidiagonal α 0 = {(0, 0)} :=
rfl
#align multiset.antidiagonal_zero Multiset.antidiagonal_zero
@@ -2,14 +2,11 @@
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-
-! This file was ported from Lean 3 source module data.multiset.antidiagonal
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Multiset.Powerset
+#align_import data.multiset.antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
+
/-!
# The antidiagonal on a multiset.
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.
@@ -84,7 +84,7 @@ theorem antidiagonal_cons (a : α) (s) :
simp only [revzip, reverse_append, quot_mk_to_coe, coe_eq_coe, powersetAux'_cons, cons_coe,
coe_map, antidiagonal_coe', coe_add]
rw [← zip_map, ← zip_map, zip_append, (_ : _ ++ _ = _)]
- · congr ; simp ; rw [map_reverse] ; simp
+ · congr; simp; rw [map_reverse]; simp
· simp
#align multiset.antidiagonal_cons Multiset.antidiagonal_cons
Notably incorporates https://github.com/leanprover/std4/pull/98 and https://github.com/leanprover/std4/pull/109.
https://github.com/leanprover/std4/pull/98 moves a number of lemmas from Mathlib to Std, so the bump requires deleting them in Mathlib. I did check on each lemma whether its attributes were kept in the move (and gave attribute markings in Mathlib if they were not present in Std), but a reviewer may wish to re-check.
List.mem_map
changed statement from b ∈ l.map f ↔ ∃ a, a ∈ l ∧ b = f a
to b ∈ l.map f ↔ ∃ a, a ∈ l ∧ f a = b
. Similarly for List.exists_of_mem_map
. This was a deliberate change, so I have simply adjusted proofs (many become simpler, which supports the change). I also deleted List.mem_map'
, List.exists_of_mem_map'
, which were temporary versions in Mathlib while waiting for this change (replacing their uses with the unprimed versions).
Also, the lemma sublist_nil_iff_eq_nil
seems to have been renamed to sublist_nil
during the move, so I added an alias for the old name.
(another issue fixed during review by @digama0) List.Sublist.filter
had an argument change from explicit to implicit. This appears to have been an oversight (cc @JamesGallicchio). I have temporarily introduced List.Sublist.filter'
with the argument explicit, and replaced Mathlib uses of Sublist.filter
with Sublist.filter'
. Later we can fix the argument in Std, and then delete List.Sublist.filter'
.
@@ -52,8 +52,8 @@ theorem mem_antidiagonal {s : Multiset α} {x : Multiset α × Multiset α} :
dsimp only [quot_mk_to_coe, antidiagonal_coe]
refine' ⟨fun h => revzip_powersetAux h, fun h ↦ _⟩
haveI := Classical.decEq α
- simp only [revzip_powersetAux_lemma l revzip_powersetAux, h.symm, ge_iff_le, mem_coe, mem_map',
- mem_powersetAux]
+ simp only [revzip_powersetAux_lemma l revzip_powersetAux, h.symm, ge_iff_le, mem_coe,
+ List.mem_map, mem_powersetAux]
cases' x with x₁ x₂
exact ⟨x₁, le_add_right _ _, by rw [add_tsub_cancel_left x₁ x₂]⟩
#align multiset.mem_antidiagonal Multiset.mem_antidiagonal
@@ -53,7 +53,7 @@ theorem mem_antidiagonal {s : Multiset α} {x : Multiset α × Multiset α} :
refine' ⟨fun h => revzip_powersetAux h, fun h ↦ _⟩
haveI := Classical.decEq α
simp only [revzip_powersetAux_lemma l revzip_powersetAux, h.symm, ge_iff_le, mem_coe, mem_map',
- mem_powersetAux]
+ mem_powersetAux]
cases' x with x₁ x₂
exact ⟨x₁, le_add_right _ _, by rw [add_tsub_cancel_left x₁ x₂]⟩
#align multiset.mem_antidiagonal Multiset.mem_antidiagonal
@@ -80,8 +80,7 @@ theorem antidiagonal_zero : @antidiagonal.{u} α 0 = {(0, 0)} :=
theorem antidiagonal_cons (a : α) (s) :
antidiagonal (a ::ₘ s) =
map (Prod.map id (cons a)) (antidiagonal s) + map (Prod.map (cons a) id) (antidiagonal s) :=
- Quotient.inductionOn s <| fun l ↦
- by
+ Quotient.inductionOn s <| fun l ↦ by
simp only [revzip, reverse_append, quot_mk_to_coe, coe_eq_coe, powersetAux'_cons, cons_coe,
coe_map, antidiagonal_coe', coe_add]
rw [← zip_map, ← zip_map, zip_append, (_ : _ ++ _ = _)]
@@ -90,8 +89,7 @@ theorem antidiagonal_cons (a : α) (s) :
#align multiset.antidiagonal_cons Multiset.antidiagonal_cons
theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
- s.antidiagonal = s.powerset.map fun t ↦ (s - t, t) :=
- by
+ s.antidiagonal = s.powerset.map fun t ↦ (s - t, t) := by
induction' s using Multiset.induction_on with a s hs
· simp only [antidiagonal_zero, powerset_zero, zero_tsub, map_singleton]
· simp_rw [antidiagonal_cons, powerset_cons, map_add, hs, map_map, Function.comp, Prod.map_mk,
@@ -104,13 +102,13 @@ theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
@[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s := by
- have := card_powerset s ; rwa [← antidiagonal_map_fst, card_map] at this
+ have := card_powerset s
+ rwa [← antidiagonal_map_fst, card_map] at this
#align multiset.card_antidiagonal Multiset.card_antidiagonal
theorem prod_map_add [CommSemiring β] {s : Multiset α} {f g : α → β} :
prod (s.map fun a ↦ f a + g a) =
- sum ((antidiagonal s).map fun p ↦ (p.1.map f).prod * (p.2.map g).prod) :=
- by
+ sum ((antidiagonal s).map fun p ↦ (p.1.map f).prod * (p.2.map g).prod) := by
refine' s.induction_on _ _
· simp only [map_zero, prod_zero, antidiagonal_zero, map_singleton, mul_one, sum_singleton]
· intro a s ih
The unported dependencies are