data.finsupp.antidiagonalMathlib.Data.Finsupp.Antidiagonal

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -38,15 +38,12 @@ def antidiagonal' (f : α →₀ ℕ) : (α →₀ ℕ) × (α →₀ ℕ) →
 #align finsupp.antidiagonal' Finsupp.antidiagonal'
 -/
 
-#print Finsupp.antidiagonal /-
 /-- The antidiagonal of `s : α →₀ ℕ` is the finset of all pairs `(t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)`
 such that `t₁ + t₂ = s`. -/
 def antidiagonal (f : α →₀ ℕ) : Finset ((α →₀ ℕ) × (α →₀ ℕ)) :=
   f.antidiagonal'.support
 #align finsupp.antidiagonal Finsupp.antidiagonal
--/
 
-#print Finsupp.mem_antidiagonal /-
 @[simp]
 theorem mem_antidiagonal {f : α →₀ ℕ} {p : (α →₀ ℕ) × (α →₀ ℕ)} :
     p ∈ antidiagonal f ↔ p.1 + p.2 = f :=
@@ -54,17 +51,16 @@ theorem mem_antidiagonal {f : α →₀ ℕ} {p : (α →₀ ℕ) × (α →₀
   rcases p with ⟨p₁, p₂⟩
   simp [antidiagonal, antidiagonal', ← and_assoc, ← finsupp.to_multiset.apply_eq_iff_eq]
 #align finsupp.mem_antidiagonal Finsupp.mem_antidiagonal
--/
 
-#print Finsupp.swap_mem_antidiagonal /-
 theorem swap_mem_antidiagonal {n : α →₀ ℕ} {f : (α →₀ ℕ) × (α →₀ ℕ)} :
     f.symm ∈ antidiagonal n ↔ f ∈ antidiagonal n := by
   simp only [mem_antidiagonal, add_comm, Prod.swap]
 #align finsupp.swap_mem_antidiagonal Finsupp.swap_mem_antidiagonal
--/
 
-#print Finsupp.antidiagonal_filter_fst_eq /-
-theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
+/- warning: finsupp.antidiagonal_filter_fst_eq clashes with finset.nat.filter_fst_eq_antidiagonal -> Finset.filter_fst_eq_antidiagonal
+Case conversion may be inaccurate. Consider using '#align finsupp.antidiagonal_filter_fst_eq Finset.filter_fst_eq_antidiagonalₓ'. -/
+#print Finset.filter_fst_eq_antidiagonal /-
+theorem filter_fst_eq_antidiagonal (f g : α →₀ ℕ)
     [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.1 = g)] :
     ((antidiagonal f).filterₓ fun p => p.1 = g) = if g ≤ f then {(g, f - g)} else ∅ :=
   by
@@ -74,11 +70,13 @@ theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
   rintro rfl; constructor
   · rintro rfl; exact ⟨le_add_right le_rfl, (add_tsub_cancel_left _ _).symm⟩
   · rintro ⟨h, rfl⟩; exact add_tsub_cancel_of_le h
-#align finsupp.antidiagonal_filter_fst_eq Finsupp.antidiagonal_filter_fst_eq
+#align finsupp.antidiagonal_filter_fst_eq Finset.filter_fst_eq_antidiagonal
 -/
 
-#print Finsupp.antidiagonal_filter_snd_eq /-
-theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
+/- warning: finsupp.antidiagonal_filter_snd_eq clashes with finset.nat.filter_snd_eq_antidiagonal -> Finset.filter_snd_eq_antidiagonal
+Case conversion may be inaccurate. Consider using '#align finsupp.antidiagonal_filter_snd_eq Finset.filter_snd_eq_antidiagonalₓ'. -/
+#print Finset.filter_snd_eq_antidiagonal /-
+theorem filter_snd_eq_antidiagonal (f g : α →₀ ℕ)
     [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.2 = g)] :
     ((antidiagonal f).filterₓ fun p => p.2 = g) = if g ≤ f then {(f - g, g)} else ∅ :=
   by
@@ -88,7 +86,7 @@ theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
   rintro rfl; constructor
   · rintro rfl; exact ⟨le_add_left le_rfl, (add_tsub_cancel_right _ _).symm⟩
   · rintro ⟨h, rfl⟩; exact tsub_add_cancel_of_le h
-#align finsupp.antidiagonal_filter_snd_eq Finsupp.antidiagonal_filter_snd_eq
+#align finsupp.antidiagonal_filter_snd_eq Finset.filter_snd_eq_antidiagonal
 -/
 
 #print Finsupp.antidiagonal_zero /-
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Yury Kudryashov
 -/
-import Mathbin.Data.Finsupp.Multiset
-import Mathbin.Data.Multiset.Antidiagonal
+import Data.Finsupp.Multiset
+import Data.Multiset.Antidiagonal
 
 #align_import data.finsupp.antidiagonal from "leanprover-community/mathlib"@"3e32bc908f617039c74c06ea9a897e30c30803c2"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Yury Kudryashov
-
-! This file was ported from Lean 3 source module data.finsupp.antidiagonal
-! leanprover-community/mathlib commit 3e32bc908f617039c74c06ea9a897e30c30803c2
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Finsupp.Multiset
 import Mathbin.Data.Multiset.Antidiagonal
 
+#align_import data.finsupp.antidiagonal from "leanprover-community/mathlib"@"3e32bc908f617039c74c06ea9a897e30c30803c2"
+
 /-!
 # The `finsupp` counterpart of `multiset.antidiagonal`.
 
Diff
@@ -66,6 +66,7 @@ theorem swap_mem_antidiagonal {n : α →₀ ℕ} {f : (α →₀ ℕ) × (α 
 #align finsupp.swap_mem_antidiagonal Finsupp.swap_mem_antidiagonal
 -/
 
+#print Finsupp.antidiagonal_filter_fst_eq /-
 theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
     [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.1 = g)] :
     ((antidiagonal f).filterₓ fun p => p.1 = g) = if g ≤ f then {(g, f - g)} else ∅ :=
@@ -77,7 +78,9 @@ theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
   · rintro rfl; exact ⟨le_add_right le_rfl, (add_tsub_cancel_left _ _).symm⟩
   · rintro ⟨h, rfl⟩; exact add_tsub_cancel_of_le h
 #align finsupp.antidiagonal_filter_fst_eq Finsupp.antidiagonal_filter_fst_eq
+-/
 
+#print Finsupp.antidiagonal_filter_snd_eq /-
 theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
     [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.2 = g)] :
     ((antidiagonal f).filterₓ fun p => p.2 = g) = if g ≤ f then {(f - g, g)} else ∅ :=
@@ -89,6 +92,7 @@ theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
   · rintro rfl; exact ⟨le_add_left le_rfl, (add_tsub_cancel_right _ _).symm⟩
   · rintro ⟨h, rfl⟩; exact tsub_add_cancel_of_le h
 #align finsupp.antidiagonal_filter_snd_eq Finsupp.antidiagonal_filter_snd_eq
+-/
 
 #print Finsupp.antidiagonal_zero /-
 @[simp]
@@ -97,6 +101,7 @@ theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0)
 #align finsupp.antidiagonal_zero Finsupp.antidiagonal_zero
 -/
 
+#print Finsupp.prod_antidiagonal_swap /-
 @[to_additive]
 theorem prod_antidiagonal_swap {M : Type _} [CommMonoid M] (n : α →₀ ℕ)
     (f : (α →₀ ℕ) → (α →₀ ℕ) → M) :
@@ -106,6 +111,7 @@ theorem prod_antidiagonal_swap {M : Type _} [CommMonoid M] (n : α →₀ ℕ)
     ⟨p.symm, swap_mem_antidiagonal.2 hp, p.swap_swap.symm⟩
 #align finsupp.prod_antidiagonal_swap Finsupp.prod_antidiagonal_swap
 #align finsupp.sum_antidiagonal_swap Finsupp.sum_antidiagonal_swap
+-/
 
 end Finsupp
 
Diff
@@ -100,7 +100,7 @@ theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0)
 @[to_additive]
 theorem prod_antidiagonal_swap {M : Type _} [CommMonoid M] (n : α →₀ ℕ)
     (f : (α →₀ ℕ) → (α →₀ ℕ) → M) :
-    (∏ p in antidiagonal n, f p.1 p.2) = ∏ p in antidiagonal n, f p.2 p.1 :=
+    ∏ p in antidiagonal n, f p.1 p.2 = ∏ p in antidiagonal n, f p.2 p.1 :=
   Finset.prod_bij (fun p hp => p.symm) (fun p => swap_mem_antidiagonal.2) (fun p hp => rfl)
     (fun p₁ p₂ _ _ h => Prod.swap_injective h) fun p hp =>
     ⟨p.symm, swap_mem_antidiagonal.2 hp, p.swap_swap.symm⟩
Diff
@@ -24,7 +24,7 @@ all pairs `(t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)` such that `t₁ +
 
 noncomputable section
 
-open Classical BigOperators
+open scoped Classical BigOperators
 
 namespace Finsupp
 
Diff
@@ -66,12 +66,6 @@ theorem swap_mem_antidiagonal {n : α →₀ ℕ} {f : (α →₀ ℕ) × (α 
 #align finsupp.swap_mem_antidiagonal Finsupp.swap_mem_antidiagonal
 -/
 
-/- warning: finsupp.antidiagonal_filter_fst_eq -> Finsupp.antidiagonal_filter_fst_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.orderedSub)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
-but is expected to have type
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (g : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.instLEFinsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) instLENat) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instSingletonFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHSub.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) instSubNat Nat.instOrderedSubNatInstLENatInstAddNatInstSubNat)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instEmptyCollectionFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))))))
-Case conversion may be inaccurate. Consider using '#align finsupp.antidiagonal_filter_fst_eq Finsupp.antidiagonal_filter_fst_eqₓ'. -/
 theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
     [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.1 = g)] :
     ((antidiagonal f).filterₓ fun p => p.1 = g) = if g ≤ f then {(g, f - g)} else ∅ :=
@@ -84,12 +78,6 @@ theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
   · rintro ⟨h, rfl⟩; exact add_tsub_cancel_of_le h
 #align finsupp.antidiagonal_filter_fst_eq Finsupp.antidiagonal_filter_fst_eq
 
-/- warning: finsupp.antidiagonal_filter_snd_eq -> Finsupp.antidiagonal_filter_snd_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.orderedSub)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
-but is expected to have type
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (g : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.instLEFinsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) instLENat) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instSingletonFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHSub.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) instSubNat Nat.instOrderedSubNatInstLENatInstAddNatInstSubNat)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instEmptyCollectionFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))))))
-Case conversion may be inaccurate. Consider using '#align finsupp.antidiagonal_filter_snd_eq Finsupp.antidiagonal_filter_snd_eqₓ'. -/
 theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
     [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.2 = g)] :
     ((antidiagonal f).filterₓ fun p => p.2 = g) = if g ≤ f then {(f - g, g)} else ∅ :=
@@ -109,12 +97,6 @@ theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0)
 #align finsupp.antidiagonal_zero Finsupp.antidiagonal_zero
 -/
 
-/- warning: finsupp.prod_antidiagonal_swap -> Finsupp.prod_antidiagonal_swap is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {M : Type.{u2}} [_inst_1 : CommMonoid.{u2} M] (n : Finsupp.{u1, 0} α Nat Nat.hasZero) (f : (Finsupp.{u1, 0} α Nat Nat.hasZero) -> (Finsupp.{u1, 0} α Nat Nat.hasZero) -> M), Eq.{succ u2} M (Finset.prod.{u2, u1} M (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) _inst_1 (Finsupp.antidiagonal.{u1} α n) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => f (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p))) (Finset.prod.{u2, u1} M (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) _inst_1 (Finsupp.antidiagonal.{u1} α n) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => f (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p)))
-but is expected to have type
-  forall {α : Type.{u2}} {M : Type.{u1}} [_inst_1 : CommMonoid.{u1} M] (n : Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (f : (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) -> (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) -> M), Eq.{succ u1} M (Finset.prod.{u1, u2} M (Prod.{u2, u2} (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) _inst_1 (Finsupp.antidiagonal.{u2} α n) (fun (p : Prod.{u2, u2} (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => f (Prod.fst.{u2, u2} (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) (Prod.snd.{u2, u2} (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p))) (Finset.prod.{u1, u2} M (Prod.{u2, u2} (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) _inst_1 (Finsupp.antidiagonal.{u2} α n) (fun (p : Prod.{u2, u2} (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => f (Prod.snd.{u2, u2} (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) (Prod.fst.{u2, u2} (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u2, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p)))
-Case conversion may be inaccurate. Consider using '#align finsupp.prod_antidiagonal_swap Finsupp.prod_antidiagonal_swapₓ'. -/
 @[to_additive]
 theorem prod_antidiagonal_swap {M : Type _} [CommMonoid M] (n : α →₀ ℕ)
     (f : (α →₀ ℕ) → (α →₀ ℕ) → M) :
Diff
@@ -79,12 +79,9 @@ theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
   ext ⟨a, b⟩
   suffices a = g → (a + b = f ↔ g ≤ f ∧ b = f - g) by
     simpa [apply_ite ((· ∈ ·) (a, b)), ← and_assoc, @and_right_comm _ (a = _), and_congr_left_iff]
-  rintro rfl
-  constructor
-  · rintro rfl
-    exact ⟨le_add_right le_rfl, (add_tsub_cancel_left _ _).symm⟩
-  · rintro ⟨h, rfl⟩
-    exact add_tsub_cancel_of_le h
+  rintro rfl; constructor
+  · rintro rfl; exact ⟨le_add_right le_rfl, (add_tsub_cancel_left _ _).symm⟩
+  · rintro ⟨h, rfl⟩; exact add_tsub_cancel_of_le h
 #align finsupp.antidiagonal_filter_fst_eq Finsupp.antidiagonal_filter_fst_eq
 
 /- warning: finsupp.antidiagonal_filter_snd_eq -> Finsupp.antidiagonal_filter_snd_eq is a dubious translation:
@@ -100,12 +97,9 @@ theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
   ext ⟨a, b⟩
   suffices b = g → (a + b = f ↔ g ≤ f ∧ a = f - g) by
     simpa [apply_ite ((· ∈ ·) (a, b)), ← and_assoc, and_congr_left_iff]
-  rintro rfl
-  constructor
-  · rintro rfl
-    exact ⟨le_add_left le_rfl, (add_tsub_cancel_right _ _).symm⟩
-  · rintro ⟨h, rfl⟩
-    exact tsub_add_cancel_of_le h
+  rintro rfl; constructor
+  · rintro rfl; exact ⟨le_add_left le_rfl, (add_tsub_cancel_right _ _).symm⟩
+  · rintro ⟨h, rfl⟩; exact tsub_add_cancel_of_le h
 #align finsupp.antidiagonal_filter_snd_eq Finsupp.antidiagonal_filter_snd_eq
 
 #print Finsupp.antidiagonal_zero /-
Diff
@@ -68,7 +68,7 @@ theorem swap_mem_antidiagonal {n : α →₀ ℕ} {f : (α →₀ ℕ) × (α 
 
 /- warning: finsupp.antidiagonal_filter_fst_eq -> Finsupp.antidiagonal_filter_fst_eq is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.hasOrderedSub)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
+  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.orderedSub)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
 but is expected to have type
   forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (g : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.instLEFinsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) instLENat) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instSingletonFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHSub.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) instSubNat Nat.instOrderedSubNatInstLENatInstAddNatInstSubNat)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instEmptyCollectionFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))))))
 Case conversion may be inaccurate. Consider using '#align finsupp.antidiagonal_filter_fst_eq Finsupp.antidiagonal_filter_fst_eqₓ'. -/
@@ -89,7 +89,7 @@ theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
 
 /- warning: finsupp.antidiagonal_filter_snd_eq -> Finsupp.antidiagonal_filter_snd_eq is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.hasOrderedSub)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
+  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.orderedSub)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
 but is expected to have type
   forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (g : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.instLEFinsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) instLENat) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instSingletonFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHSub.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) instSubNat Nat.instOrderedSubNatInstLENatInstAddNatInstSubNat)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instEmptyCollectionFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))))))
 Case conversion may be inaccurate. Consider using '#align finsupp.antidiagonal_filter_snd_eq Finsupp.antidiagonal_filter_snd_eqₓ'. -/
Diff
@@ -49,12 +49,7 @@ def antidiagonal (f : α →₀ ℕ) : Finset ((α →₀ ℕ) × (α →₀ ℕ
 #align finsupp.antidiagonal Finsupp.antidiagonal
 -/
 
-/- warning: finsupp.mem_antidiagonal -> Finsupp.mem_antidiagonal is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {f : Finsupp.{u1, 0} α Nat Nat.hasZero} {p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)}, Iff (Membership.Mem.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasMem.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) p (Finsupp.antidiagonal.{u1} α f)) (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (HAdd.hAdd.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHAdd.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasAdd.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p)) f)
-but is expected to have type
-  forall {α : Type.{u1}} {f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)} {p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))}, Iff (Membership.mem.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instMembershipFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) p (Finsupp.antidiagonal.{u1} α f)) (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (HAdd.hAdd.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHAdd.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.add.{u1, 0} α Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid))) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p)) f)
-Case conversion may be inaccurate. Consider using '#align finsupp.mem_antidiagonal Finsupp.mem_antidiagonalₓ'. -/
+#print Finsupp.mem_antidiagonal /-
 @[simp]
 theorem mem_antidiagonal {f : α →₀ ℕ} {p : (α →₀ ℕ) × (α →₀ ℕ)} :
     p ∈ antidiagonal f ↔ p.1 + p.2 = f :=
@@ -62,6 +57,7 @@ theorem mem_antidiagonal {f : α →₀ ℕ} {p : (α →₀ ℕ) × (α →₀
   rcases p with ⟨p₁, p₂⟩
   simp [antidiagonal, antidiagonal', ← and_assoc, ← finsupp.to_multiset.apply_eq_iff_eq]
 #align finsupp.mem_antidiagonal Finsupp.mem_antidiagonal
+-/
 
 #print Finsupp.swap_mem_antidiagonal /-
 theorem swap_mem_antidiagonal {n : α →₀ ℕ} {f : (α →₀ ℕ) × (α →₀ ℕ)} :
Diff
@@ -72,9 +72,9 @@ theorem swap_mem_antidiagonal {n : α →₀ ℕ} {f : (α →₀ ℕ) × (α 
 
 /- warning: finsupp.antidiagonal_filter_fst_eq -> Finsupp.antidiagonal_filter_fst_eq is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLe.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.hasOrderedSub)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
+  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.hasOrderedSub)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
 but is expected to have type
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (g : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.instLEFinsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) instLENat) g f) (Finsupp.decidableLe.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instSingletonFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHSub.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) instSubNat Nat.instOrderedSubNatInstLENatInstAddNatInstSubNat)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instEmptyCollectionFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))))))
+  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (g : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.fst.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.instLEFinsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) instLENat) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instSingletonFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) g (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHSub.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) instSubNat Nat.instOrderedSubNatInstLENatInstAddNatInstSubNat)) f g))) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instEmptyCollectionFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))))))
 Case conversion may be inaccurate. Consider using '#align finsupp.antidiagonal_filter_fst_eq Finsupp.antidiagonal_filter_fst_eqₓ'. -/
 theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
     [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.1 = g)] :
@@ -93,9 +93,9 @@ theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
 
 /- warning: finsupp.antidiagonal_filter_snd_eq -> Finsupp.antidiagonal_filter_snd_eq is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLe.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.hasOrderedSub)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
+  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat Nat.hasZero) (g : Finsupp.{u1, 0} α Nat Nat.hasZero) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.hasLe.{u1, 0} α Nat Nat.hasZero Nat.hasLe) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decidableLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasSingleton.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero) (instHSub.{u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) Nat.hasSub Nat.hasOrderedSub)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero))) (Finset.hasEmptyc.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat Nat.hasZero) (Finsupp.{u1, 0} α Nat Nat.hasZero)))))
 but is expected to have type
-  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (g : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.instLEFinsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) instLENat) g f) (Finsupp.decidableLe.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instSingletonFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHSub.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) instSubNat Nat.instOrderedSubNatInstLENatInstAddNatInstSubNat)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instEmptyCollectionFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))))))
+  forall {α : Type.{u1}} (f : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (g : Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) [D : forall (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))), Decidable (Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g)], Eq.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.filter.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (fun (p : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => Eq.{succ u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Prod.snd.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) p) g) (fun (a : Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) => D a) (Finsupp.antidiagonal.{u1} α f)) (ite.{succ u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (LE.le.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.instLEFinsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero) instLENat) g f) (Finsupp.decidableLE.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) (fun (a : Nat) (b : Nat) => Nat.decLe a b) g f) (Singleton.singleton.{u1, u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))) (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instSingletonFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Prod.mk.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (HSub.hSub.{u1, u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (instHSub.{u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.tsub.{u1, 0} α Nat (CanonicallyOrderedCommSemiring.toCanonicallyOrderedAddMonoid.{0} Nat Nat.canonicallyOrderedCommSemiring) instSubNat Nat.instOrderedSubNatInstLENatInstAddNatInstSubNat)) f g) g)) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)))) (Finset.instEmptyCollectionFinset.{u1} (Prod.{u1, u1} (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero)) (Finsupp.{u1, 0} α Nat (LinearOrderedCommMonoidWithZero.toZero.{0} Nat Nat.linearOrderedCommMonoidWithZero))))))
 Case conversion may be inaccurate. Consider using '#align finsupp.antidiagonal_filter_snd_eq Finsupp.antidiagonal_filter_snd_eqₓ'. -/
 theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
     [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.2 = g)] :

Changes in mathlib4

mathlib3
mathlib4
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -6,7 +6,6 @@ Authors: Johannes Hölzl, Yury Kudryashov
 import Mathlib.Data.Finset.NatAntidiagonal
 import Mathlib.Data.Finsupp.Multiset
 import Mathlib.Data.Multiset.Antidiagonal
-import Mathlib.Init.IteSimp
 
 #align_import data.finsupp.antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
 
chore(*): rename FunLike to DFunLike (#9785)

This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.

This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:

sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean     
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean

Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -69,10 +69,10 @@ theorem antidiagonal_single (a : α) (n : ℕ) :
     Function.Embedding.coeFn_mk, Prod_map, Prod.mk.injEq, Prod.exists]
   constructor
   · intro h
-    refine ⟨x a, y a, FunLike.congr_fun h a |>.trans single_eq_same, ?_⟩
-    simp_rw [FunLike.ext_iff, ← forall_and]
+    refine ⟨x a, y a, DFunLike.congr_fun h a |>.trans single_eq_same, ?_⟩
+    simp_rw [DFunLike.ext_iff, ← forall_and]
     intro i
-    replace h := FunLike.congr_fun h i
+    replace h := DFunLike.congr_fun h i
     simp_rw [single_apply, Finsupp.add_apply] at h ⊢
     obtain rfl | hai := Decidable.eq_or_ne a i
     · exact ⟨if_pos rfl, if_pos rfl⟩
feat: Better lemmas for transferring finite sums along equivalences (#9237)

Lemmas around this were a mess, throth in terms of names, statement and location. This PR standardises everything to be in Algebra.BigOperators.Basic and changes the lemmas to take in InjOn and SurjOn assumptions where possible (and where impossible make sure the hypotheses are taken in the correct order) and moves the equality of functions hypothesis last.

Also add a few lemmas that help fix downstream uses by golfing.

From LeanAPAP and LeanCamCombi

Diff
@@ -56,9 +56,7 @@ theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0)
 theorem prod_antidiagonal_swap {M : Type*} [CommMonoid M] (n : α →₀ ℕ)
     (f : (α →₀ ℕ) → (α →₀ ℕ) → M) :
     ∏ p in antidiagonal n, f p.1 p.2 = ∏ p in antidiagonal n, f p.2 p.1 :=
-  Finset.prod_bij (fun p _hp ↦ p.swap) (fun _p ↦ swap_mem_antidiagonal.2) (fun _p _hp ↦ rfl)
-    (fun _p₁ _p₂ _ _ h ↦ Prod.swap_injective h) fun p hp ↦
-    ⟨p.swap, swap_mem_antidiagonal.2 hp, p.swap_swap.symm⟩
+  prod_equiv (Equiv.prodComm _ _) (by simp [add_comm]) (by simp)
 #align finsupp.prod_antidiagonal_swap Finsupp.prod_antidiagonal_swap
 #align finsupp.sum_antidiagonal_swap Finsupp.sum_antidiagonal_swap
 
chore: space after (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -72,7 +72,7 @@ theorem antidiagonal_single (a : α) (n : ℕ) :
   constructor
   · intro h
     refine ⟨x a, y a, FunLike.congr_fun h a |>.trans single_eq_same, ?_⟩
-    simp_rw [FunLike.ext_iff, ←forall_and]
+    simp_rw [FunLike.ext_iff, ← forall_and]
     intro i
     replace h := FunLike.congr_fun h i
     simp_rw [single_apply, Finsupp.add_apply] at h ⊢
feat(Data.Finset.Antidiagonal): generalize Finset.Nat.antidiagonal (#7486)

We define a type class Finset.HasAntidiagonal A which contains a function antidiagonal : A → Finset (A × A) such that antidiagonal n is the Finset of all pairs adding to n, as witnessed by mem_antidiagonal.

When A is a canonically ordered add monoid with locally finite order this typeclass can be instantiated with Finset.antidiagonalOfLocallyFinite. This applies in particular when A is , more generally or σ →₀ ℕ, or even ι →₀ A under the additional assumption OrderedSub A that make it a canonically ordered add monoid. (In fact, we would just need an AddMonoid with a compatible order, finite Iic, such that if a + b = n, then a, b ≤ n, and any finiteness condition would be OK.)

For computational reasons it is better to manually provide instances for and σ →₀ ℕ, to avoid quadratic runtime performance. These instances are provided as Finset.Nat.instHasAntidiagonal and Finsupp.instHasAntidiagonal. This is why Finset.antidiagonalOfLocallyFinite is an abbrev and not an instance.

This definition does not exactly match with that of Multiset.antidiagonal defined in Mathlib.Data.Multiset.Antidiagonal, because of the multiplicities. Indeed, by counting multiplicities, Multiset α is equivalent to α →₀ ℕ, but Finset.antidiagonal and Multiset.antidiagonal will return different objects. For example, for s : Multiset ℕ := {0,0,0}, Multiset.antidiagonal s has 8 elements but Finset.antidiagonal s has only 4.

def s : Multiset ℕ := {0, 0, 0}
#eval (Finset.antidiagonal s).card -- 4
#eval Multiset.card (Multiset.antidiagonal s) -- 8

TODO

  • Define HasMulAntidiagonal (for monoids). For PNat, we will recover the set of divisors of a strictly positive integer.

This closes #7917

Co-authored by: María Inés de Frutos-Fernández <mariaines.dff@gmail.com> and Eric Wieser <efw27@cam.ac.uk>

Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr> Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -17,8 +17,6 @@ The antidiagonal of `s : α →₀ ℕ` consists of
 all pairs `(t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)` such that `t₁ + t₂ = s`.
 -/
 
-
-
 open BigOperators
 
 namespace Finsupp
@@ -39,53 +37,18 @@ def antidiagonal' (f : α →₀ ℕ) : (α →₀ ℕ) × (α →₀ ℕ) →
 
 /-- The antidiagonal of `s : α →₀ ℕ` is the finset of all pairs `(t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)`
 such that `t₁ + t₂ = s`. -/
-def antidiagonal (f : α →₀ ℕ) : Finset ((α →₀ ℕ) × (α →₀ ℕ)) := f.antidiagonal'.support
-#align finsupp.antidiagonal Finsupp.antidiagonal
-
-@[simp]
-theorem mem_antidiagonal {f : α →₀ ℕ} {p : (α →₀ ℕ) × (α →₀ ℕ)} :
-    p ∈ antidiagonal f ↔ p.1 + p.2 = f := by
-  rcases p with ⟨p₁, p₂⟩
-  simp [antidiagonal, antidiagonal', ← and_assoc, Multiset.toFinsupp_eq_iff,
+instance instHasAntidiagonal : HasAntidiagonal (α →₀ ℕ) where
+  antidiagonal f := f.antidiagonal'.support
+  mem_antidiagonal {f} {p} := by
+    rcases p with ⟨p₁, p₂⟩
+    simp [antidiagonal', ← and_assoc, Multiset.toFinsupp_eq_iff,
     ← Multiset.toFinsupp_eq_iff (f := f)]
-#align finsupp.mem_antidiagonal Finsupp.mem_antidiagonal
 
-theorem swap_mem_antidiagonal {n : α →₀ ℕ} {f : (α →₀ ℕ) × (α →₀ ℕ)} :
-    f.swap ∈ antidiagonal n ↔ f ∈ antidiagonal n := by
-  simp only [mem_antidiagonal, add_comm, Prod.swap]
-#align finsupp.swap_mem_antidiagonal Finsupp.swap_mem_antidiagonal
+#align finsupp.antidiagonal_filter_fst_eq Finset.filter_fst_eq_antidiagonal
+#align finsupp.antidiagonal_filter_snd_eq Finset.filter_snd_eq_antidiagonal
 
-theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
-    [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.1 = g)] :
-    ((antidiagonal f).filter fun p ↦ p.1 = g) = if g ≤ f then {(g, f - g)} else ∅ := by
-  ext ⟨a, b⟩
-  suffices a = g → (a + b = f ↔ g ≤ f ∧ b = f - g) by
-    simpa [apply_ite (fun f ↦ (a, b) ∈ f), mem_filter, mem_antidiagonal, mem_singleton,
-      Prod.mk.inj_iff, ← and_assoc, @and_right_comm _ (a = _), and_congr_left_iff]
-  rintro rfl
-  constructor
-  · rintro rfl
-    exact ⟨le_add_right le_rfl, (add_tsub_cancel_left _ _).symm⟩
-  · rintro ⟨h, rfl⟩
-    exact add_tsub_cancel_of_le h
-#align finsupp.antidiagonal_filter_fst_eq Finsupp.antidiagonal_filter_fst_eq
-
-theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
-    [D : ∀ p : (α →₀ ℕ) × (α →₀ ℕ), Decidable (p.2 = g)] :
-    ((antidiagonal f).filter fun p ↦ p.2 = g) = if g ≤ f then {(f - g, g)} else ∅ := by
-  ext ⟨a, b⟩
-  suffices b = g → (a + b = f ↔ g ≤ f ∧ a = f - g) by
-    simpa [apply_ite (fun f ↦ (a, b) ∈ f), mem_filter, mem_antidiagonal, mem_singleton,
-      Prod.mk.inj_iff, ← and_assoc, and_congr_left_iff]
-  rintro rfl
-  constructor
-  · rintro rfl
-    exact ⟨le_add_left le_rfl, (add_tsub_cancel_right _ _).symm⟩
-  · rintro ⟨h, rfl⟩
-    exact tsub_add_cancel_of_le h
-#align finsupp.antidiagonal_filter_snd_eq Finsupp.antidiagonal_filter_snd_eq
-
-@[simp]
+-- nolint as this is for dsimp
+@[simp, nolint simpNF]
 theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0) := rfl
 #align finsupp.antidiagonal_zero Finsupp.antidiagonal_zero
 
@@ -101,10 +64,10 @@ theorem prod_antidiagonal_swap {M : Type*} [CommMonoid M] (n : α →₀ ℕ)
 
 @[simp]
 theorem antidiagonal_single (a : α) (n : ℕ) :
-    antidiagonal (single a n) = (Finset.Nat.antidiagonal n).map
+    antidiagonal (single a n) = (antidiagonal n).map
       (Function.Embedding.prodMap ⟨_, single_injective a⟩ ⟨_, single_injective a⟩) := by
   ext ⟨x, y⟩
-  simp only [mem_antidiagonal, mem_map, Nat.mem_antidiagonal, Function.Embedding.coe_prodMap,
+  simp only [mem_antidiagonal, mem_map, mem_antidiagonal, Function.Embedding.coe_prodMap,
     Function.Embedding.coeFn_mk, Prod_map, Prod.mk.injEq, Prod.exists]
   constructor
   · intro h
chore: banish Type _ and Sort _ (#6499)

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

This has nice performance benefits.

Diff
@@ -90,7 +90,7 @@ theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0)
 #align finsupp.antidiagonal_zero Finsupp.antidiagonal_zero
 
 @[to_additive]
-theorem prod_antidiagonal_swap {M : Type _} [CommMonoid M] (n : α →₀ ℕ)
+theorem prod_antidiagonal_swap {M : Type*} [CommMonoid M] (n : α →₀ ℕ)
     (f : (α →₀ ℕ) → (α →₀ ℕ) → M) :
     ∏ p in antidiagonal n, f p.1 p.2 = ∏ p in antidiagonal n, f p.2 p.1 :=
   Finset.prod_bij (fun p _hp ↦ p.swap) (fun _p ↦ swap_mem_antidiagonal.2) (fun _p _hp ↦ rfl)
feat(Data/Finsupp/Antidiagonal): add antidiagonal_single (#6421)
Diff
@@ -3,6 +3,7 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Yury Kudryashov
 -/
+import Mathlib.Data.Finset.NatAntidiagonal
 import Mathlib.Data.Finsupp.Multiset
 import Mathlib.Data.Multiset.Antidiagonal
 import Mathlib.Init.IteSimp
@@ -98,4 +99,25 @@ theorem prod_antidiagonal_swap {M : Type _} [CommMonoid M] (n : α →₀ ℕ)
 #align finsupp.prod_antidiagonal_swap Finsupp.prod_antidiagonal_swap
 #align finsupp.sum_antidiagonal_swap Finsupp.sum_antidiagonal_swap
 
+@[simp]
+theorem antidiagonal_single (a : α) (n : ℕ) :
+    antidiagonal (single a n) = (Finset.Nat.antidiagonal n).map
+      (Function.Embedding.prodMap ⟨_, single_injective a⟩ ⟨_, single_injective a⟩) := by
+  ext ⟨x, y⟩
+  simp only [mem_antidiagonal, mem_map, Nat.mem_antidiagonal, Function.Embedding.coe_prodMap,
+    Function.Embedding.coeFn_mk, Prod_map, Prod.mk.injEq, Prod.exists]
+  constructor
+  · intro h
+    refine ⟨x a, y a, FunLike.congr_fun h a |>.trans single_eq_same, ?_⟩
+    simp_rw [FunLike.ext_iff, ←forall_and]
+    intro i
+    replace h := FunLike.congr_fun h i
+    simp_rw [single_apply, Finsupp.add_apply] at h ⊢
+    obtain rfl | hai := Decidable.eq_or_ne a i
+    · exact ⟨if_pos rfl, if_pos rfl⟩
+    · simp_rw [if_neg hai, _root_.add_eq_zero_iff] at h ⊢
+      exact h.imp Eq.symm Eq.symm
+  · rintro ⟨a, b, rfl, rfl, rfl⟩
+    exact (single_add _ _ _).symm
+
 end Finsupp
feat(Data/Finsupp): make toMultiset and antidiagonal computable (#6331)

In Lean 3, the computability of Finsupp.toMultiset was poisoned by the AddMonoid (α →₀ ℕ) instance, even though this was not used in computation. This is no longer the case in Lean 4, so we can make this computable by adding a DecidableEq α argument.

We loosely follow the pattern used with DFinsupp, where we split the declaration in two, as only one direction needs DecidableEq α. As a result, Finsupp.toMultiset is now only an AddMonoidHom, though Multiset.toFinset remains an equiv.

We're missing some of the formatting infrastructure for this to be pretty, but this now works:

#eval ((Finsupp.mk Finset.univ ![1, 2, 3] sorry).antidiagonal).image
  fun x : _ × _ => (x.1.toFun, x.2.toFun)
Diff
@@ -17,9 +17,8 @@ all pairs `(t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)` such that `t₁ +
 -/
 
 
-noncomputable section
 
-open Classical BigOperators
+open BigOperators
 
 namespace Finsupp
 
@@ -27,7 +26,7 @@ open Finset
 
 universe u
 
-variable {α : Type u}
+variable {α : Type u} [DecidableEq α]
 
 /-- The `Finsupp` counterpart of `Multiset.antidiagonal`: the antidiagonal of
 `s : α →₀ ℕ` consists of all pairs `(t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)` such that `t₁ + t₂ = s`.
@@ -46,7 +45,8 @@ def antidiagonal (f : α →₀ ℕ) : Finset ((α →₀ ℕ) × (α →₀ ℕ
 theorem mem_antidiagonal {f : α →₀ ℕ} {p : (α →₀ ℕ) × (α →₀ ℕ)} :
     p ∈ antidiagonal f ↔ p.1 + p.2 = f := by
   rcases p with ⟨p₁, p₂⟩
-  simp [antidiagonal, antidiagonal', ← and_assoc, ← Finsupp.toMultiset.apply_eq_iff_eq]
+  simp [antidiagonal, antidiagonal', ← and_assoc, Multiset.toFinsupp_eq_iff,
+    ← Multiset.toFinsupp_eq_iff (f := f)]
 #align finsupp.mem_antidiagonal Finsupp.mem_antidiagonal
 
 theorem swap_mem_antidiagonal {n : α →₀ ℕ} {f : (α →₀ ℕ) × (α →₀ ℕ)} :
@@ -85,8 +85,7 @@ theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
 #align finsupp.antidiagonal_filter_snd_eq Finsupp.antidiagonal_filter_snd_eq
 
 @[simp]
-theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0) := by
-  rw [antidiagonal, antidiagonal', Multiset.toFinsupp_support]; rfl
+theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0) := rfl
 #align finsupp.antidiagonal_zero Finsupp.antidiagonal_zero
 
 @[to_additive]
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2017 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Yury Kudryashov
-
-! This file was ported from Lean 3 source module data.finsupp.antidiagonal
-! leanprover-community/mathlib commit 0a0ec35061ed9960bf0e7ffb0335f44447b58977
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Finsupp.Multiset
 import Mathlib.Data.Multiset.Antidiagonal
 import Mathlib.Init.IteSimp
 
+#align_import data.finsupp.antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
+
 /-!
 # The `Finsupp` counterpart of `Multiset.antidiagonal`.
 
fix: ∑' precedence (#5615)
  • Also remove most superfluous parentheses around big operators (, and variants).
  • roughly the used regex: ([^a-zA-Zα-ωΑ-Ω'𝓝ℳ₀𝕂ₛ)]) \(([∑∏][^()∑∏]*,[^()∑∏:]*)\) ([⊂⊆=<≤]) replaced by $1 $2 $3
Diff
@@ -95,7 +95,7 @@ theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0)
 @[to_additive]
 theorem prod_antidiagonal_swap {M : Type _} [CommMonoid M] (n : α →₀ ℕ)
     (f : (α →₀ ℕ) → (α →₀ ℕ) → M) :
-    (∏ p in antidiagonal n, f p.1 p.2) = ∏ p in antidiagonal n, f p.2 p.1 :=
+    ∏ p in antidiagonal n, f p.1 p.2 = ∏ p in antidiagonal n, f p.2 p.1 :=
   Finset.prod_bij (fun p _hp ↦ p.swap) (fun _p ↦ swap_mem_antidiagonal.2) (fun _p _hp ↦ rfl)
     (fun _p₁ _p₂ _ _ h ↦ Prod.swap_injective h) fun p hp ↦
     ⟨p.swap, swap_mem_antidiagonal.2 hp, p.swap_swap.symm⟩
feat: port Init.IteSimp (#3368)

Co-authored-by: samaritan <shreyasss94@gmail.com>

Diff
@@ -10,6 +10,7 @@ Authors: Johannes Hölzl, Yury Kudryashov
 -/
 import Mathlib.Data.Finsupp.Multiset
 import Mathlib.Data.Multiset.Antidiagonal
+import Mathlib.Init.IteSimp
 
 /-!
 # The `Finsupp` counterpart of `Multiset.antidiagonal`.
@@ -61,10 +62,8 @@ theorem antidiagonal_filter_fst_eq (f g : α →₀ ℕ)
     ((antidiagonal f).filter fun p ↦ p.1 = g) = if g ≤ f then {(g, f - g)} else ∅ := by
   ext ⟨a, b⟩
   suffices a = g → (a + b = f ↔ g ≤ f ∧ b = f - g) by
-    have h₁ : (if g ≤ f then a = g ∧ b = f - g else False) ↔ g ≤ f ∧ a = g ∧ b = f - g := by
-      by_cases h : g ≤ f <;> simp [h]
     simpa [apply_ite (fun f ↦ (a, b) ∈ f), mem_filter, mem_antidiagonal, mem_singleton,
-      Prod.mk.inj_iff, h₁, ← and_assoc, @and_right_comm _ (a = _), and_congr_left_iff]
+      Prod.mk.inj_iff, ← and_assoc, @and_right_comm _ (a = _), and_congr_left_iff]
   rintro rfl
   constructor
   · rintro rfl
@@ -78,10 +77,8 @@ theorem antidiagonal_filter_snd_eq (f g : α →₀ ℕ)
     ((antidiagonal f).filter fun p ↦ p.2 = g) = if g ≤ f then {(f - g, g)} else ∅ := by
   ext ⟨a, b⟩
   suffices b = g → (a + b = f ↔ g ≤ f ∧ a = f - g) by
-    have h₁ : (if g ≤ f then a = f - g ∧ b = g else False) ↔ g ≤ f ∧ a = f - g ∧ b = g := by
-      by_cases h : g ≤ f <;> simp [h]
     simpa [apply_ite (fun f ↦ (a, b) ∈ f), mem_filter, mem_antidiagonal, mem_singleton,
-      Prod.mk.inj_iff, h₁, ← and_assoc, and_congr_left_iff]
+      Prod.mk.inj_iff, ← and_assoc, and_congr_left_iff]
   rintro rfl
   constructor
   · rintro rfl
feat: port Data.Finsupp.Antidiagonal (#2142)

Dependencies 8 + 290

291 files ported (97.3%)
120921 lines ported (97.5%)
Show graph

The unported dependencies are