data.sym.sym2Mathlib.Data.Sym.Sym2

This file has been ported!

Changes since the initial port

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

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -171,13 +171,13 @@ theorem mk_prod_swap_eq {p : α × α} : ⟦p.symm⟧ = ⟦p⟧ := by cases p; e
 
 #print Sym2.congr_right /-
 theorem congr_right {a b c : α} : ⟦(a, b)⟧ = ⟦(a, c)⟧ ↔ b = c := by constructor <;> intro h;
-  · rw [Quotient.eq'] at h ; cases h <;> rfl; rw [h]
+  · rw [Quotient.eq'] at h; cases h <;> rfl; rw [h]
 #align sym2.congr_right Sym2.congr_right
 -/
 
 #print Sym2.congr_left /-
 theorem congr_left {a b c : α} : ⟦(b, a)⟧ = ⟦(c, a)⟧ ↔ b = c := by constructor <;> intro h;
-  · rw [Quotient.eq'] at h ; cases h <;> rfl; rw [h]
+  · rw [Quotient.eq'] at h; cases h <;> rfl; rw [h]
 #align sym2.congr_left Sym2.congr_left
 -/
 
@@ -321,7 +321,7 @@ protected def Mem (x : α) (z : Sym2 α) : Prop :=
 
 #print Sym2.mem_iff' /-
 theorem mem_iff' {a b c : α} : Sym2.Mem a ⟦(b, c)⟧ ↔ a = b ∨ a = c :=
-  { mp := by rintro ⟨_, h⟩; rw [eq_iff] at h ; tidy
+  { mp := by rintro ⟨_, h⟩; rw [eq_iff] at h; tidy
     mpr := by rintro (rfl | rfl); · exact ⟨_, rfl⟩; rw [eq_swap]; exact ⟨_, rfl⟩ }
 #align sym2.mem_iff' Sym2.mem_iff'
 -/
@@ -329,12 +329,12 @@ theorem mem_iff' {a b c : α} : Sym2.Mem a ⟦(b, c)⟧ ↔ a = b ∨ a = c :=
 instance : SetLike (Sym2 α) α where
   coe z := {x | z.Mem x}
   coe_injective' z z' h := by
-    simp only [Set.ext_iff, Set.mem_setOf_eq] at h 
+    simp only [Set.ext_iff, Set.mem_setOf_eq] at h
     induction' z using Sym2.ind with x y
     induction' z' using Sym2.ind with x' y'
     have hx := h x; have hy := h y; have hx' := h x'; have hy' := h y'
     simp only [mem_iff', eq_self_iff_true, or_true_iff, iff_true_iff, true_or_iff, true_iff_iff] at
-      hx hy hx' hy' 
+      hx hy hx' hy'
     cases hx <;> cases hy <;> cases hx' <;> cases hy' <;> subst_vars
     rw [Sym2.eq_swap]
 
@@ -552,7 +552,7 @@ theorem other_ne {a : α} {z : Sym2 α} (hd : ¬IsDiag z) (h : a ∈ z) : h.othe
   by
   contrapose! hd
   have h' := Sym2.other_spec h
-  rw [hd] at h' 
+  rw [hd] at h'
   rw [← h']
   simp
 #align sym2.other_ne Sym2.other_ne
@@ -690,10 +690,10 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
         rintro ⟨x, hx⟩ ⟨y, hy⟩ h
         cases' x with _ x; · simpa using hx
         cases' x with _ x; · simpa using hx
-        cases' x with _ x; swap; · exfalso; simp at hx ; linarith [hx]
+        cases' x with _ x; swap; · exfalso; simp at hx; linarith [hx]
         cases' y with _ y; · simpa using hy
         cases' y with _ y; · simpa using hy
-        cases' y with _ y; swap; · exfalso; simp at hy ; linarith [hy]
+        cases' y with _ y; swap; · exfalso; simp at hy; linarith [hy]
         rcases perm_card_two_iff.mp h with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩); · rfl
         apply Sym2.Rel.swap)
   left_inv := by tidy
@@ -702,7 +702,7 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
     · cases' x with x hx
       cases' x with _ x; · simpa using hx
       cases' x with _ x; · simpa using hx
-      cases' x with _ x; swap; · exfalso; simp at hx ; linarith [hx]
+      cases' x with _ x; swap; · exfalso; simp at hx; linarith [hx]
       rfl
 #align sym2.sym2_equiv_sym' Sym2.sym2EquivSym'
 -/
@@ -778,8 +778,8 @@ def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
         apply h'
       have h' := (rel_bool_spec x y).mpr h
       cases' x with x₁ x₂; cases' y with y₁ y₂
-      cases' mem_iff.mp hy with hy' <;> subst a <;> dsimp [rel_bool] at h'  <;> split_ifs at h'  <;>
-          try rw [Bool.of_decide_iff] at h' ; subst x₁; subst x₂ <;>
+      cases' mem_iff.mp hy with hy' <;> subst a <;> dsimp [rel_bool] at h' <;> split_ifs at h' <;>
+          try rw [Bool.of_decide_iff] at h'; subst x₁; subst x₂ <;>
         dsimp [pair_other]
       simp only [Ne.symm h_1, if_true, eq_self_iff_true, if_false]
       exfalso; exact Bool.not_false' h'
@@ -820,8 +820,8 @@ theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : h.oth
 theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : ha.other' ∈ z) :
     hb.other' = a := by
   induction z; cases' z with x y
-  dsimp [mem.other', Quot.rec, pair_other] at hb 
-  split_ifs at hb  <;> dsimp [mem.other', Quot.rec, pair_other]
+  dsimp [mem.other', Quot.rec, pair_other] at hb
+  split_ifs at hb <;> dsimp [mem.other', Quot.rec, pair_other]
   simp only [h, if_true, eq_self_iff_true]
   split_ifs; assumption; rfl
   simp only [h, if_false, eq_self_iff_true]
@@ -850,7 +850,7 @@ theorem filter_image_mk_isDiag [DecidableEq α] (s : Finset α) :
   simp only [mem_image, mem_diag, exists_prop, mem_filter, Prod.exists, mem_product]
   constructor
   · rintro ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
-    rw [← h, Sym2.mk_isDiag_iff] at hab 
+    rw [← h, Sym2.mk_isDiag_iff] at hab
     exact ⟨a, b, ⟨ha, hab⟩, h⟩
   · rintro ⟨a, b, ⟨ha, rfl⟩, h⟩
     rw [← h]
@@ -870,10 +870,10 @@ theorem filter_image_mk_not_isDiag [DecidableEq α] (s : Finset α) :
   simp only [mem_image, mem_off_diag, mem_filter, Prod.exists, mem_product]
   constructor
   · rintro ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
-    rw [← h, Sym2.mk_isDiag_iff] at hab 
+    rw [← h, Sym2.mk_isDiag_iff] at hab
     exact ⟨a, b, ⟨ha, hb, hab⟩, h⟩
   · rintro ⟨a, b, ⟨ha, hb, hab⟩, h⟩
-    rw [Ne.def, ← Sym2.mk_isDiag_iff, h] at hab 
+    rw [Ne.def, ← Sym2.mk_isDiag_iff, h] at hab
     exact ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
 #align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_mk_not_isDiag
 -/
Diff
@@ -833,6 +833,9 @@ theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb
 #print Sym2.other_invol /-
 theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : ha.other ∈ z) : hb.other = a := by
   classical
+  rw [other_eq_other'] at hb ⊢
+  convert other_invol' ha hb
+  rw [other_eq_other']
 #align sym2.other_invol Sym2.other_invol
 -/
 
Diff
@@ -833,9 +833,6 @@ theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb
 #print Sym2.other_invol /-
 theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : ha.other ∈ z) : hb.other = a := by
   classical
-  rw [other_eq_other'] at hb ⊢
-  convert other_invol' ha hb
-  rw [other_eq_other']
 #align sym2.other_invol Sym2.other_invol
 -/
 
Diff
@@ -163,10 +163,10 @@ theorem eq_swap {a b : α} : ⟦(a, b)⟧ = ⟦(b, a)⟧ := by rw [Quotient.eq']
 #align sym2.eq_swap Sym2.eq_swap
 -/
 
-#print Sym2.mk''_prod_swap_eq /-
+#print Sym2.mk_prod_swap_eq /-
 @[simp]
-theorem mk''_prod_swap_eq {p : α × α} : ⟦p.symm⟧ = ⟦p⟧ := by cases p; exact eq_swap
-#align sym2.mk_prod_swap_eq Sym2.mk''_prod_swap_eq
+theorem mk_prod_swap_eq {p : α × α} : ⟦p.symm⟧ = ⟦p⟧ := by cases p; exact eq_swap
+#align sym2.mk_prod_swap_eq Sym2.mk_prod_swap_eq
 -/
 
 #print Sym2.congr_right /-
@@ -186,10 +186,10 @@ theorem eq_iff {x y z w : α} : ⟦(x, y)⟧ = ⟦(z, w)⟧ ↔ x = z ∧ y = w
 #align sym2.eq_iff Sym2.eq_iff
 -/
 
-#print Sym2.mk''_eq_mk''_iff /-
-theorem mk''_eq_mk''_iff {p q : α × α} : ⟦p⟧ = ⟦q⟧ ↔ p = q ∨ p = q.symm := by cases p; cases q;
+#print Sym2.mk_eq_mk_iff /-
+theorem mk_eq_mk_iff {p q : α × α} : ⟦p⟧ = ⟦q⟧ ↔ p = q ∨ p = q.symm := by cases p; cases q;
   simp only [eq_iff, Prod.mk.inj_iff, Prod.swap_prod_mk]
-#align sym2.mk_eq_mk_iff Sym2.mk''_eq_mk''_iff
+#align sym2.mk_eq_mk_iff Sym2.mk_eq_mk_iff
 -/
 
 #print Sym2.lift /-
@@ -205,12 +205,12 @@ def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }
 #align sym2.lift Sym2.lift
 -/
 
-#print Sym2.lift_mk'' /-
+#print Sym2.lift_mk /-
 @[simp]
-theorem lift_mk'' (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
+theorem lift_mk (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
     lift f ⟦(a₁, a₂)⟧ = (f : α → α → β) a₁ a₂ :=
   rfl
-#align sym2.lift_mk Sym2.lift_mk''
+#align sym2.lift_mk Sym2.lift_mk
 -/
 
 #print Sym2.coe_lift_symm_apply /-
@@ -241,15 +241,15 @@ def lift₂ :
 #align sym2.lift₂ Sym2.lift₂
 -/
 
-#print Sym2.lift₂_mk'' /-
+#print Sym2.lift₂_mk /-
 @[simp]
-theorem lift₂_mk''
+theorem lift₂_mk
     (f :
       { f : α → α → β → β → γ //
         ∀ a₁ a₂ b₁ b₂, f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ })
     (a₁ a₂ : α) (b₁ b₂ : β) : lift₂ f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧ = (f : α → α → β → β → γ) a₁ a₂ b₁ b₂ :=
   rfl
-#align sym2.lift₂_mk Sym2.lift₂_mk''
+#align sym2.lift₂_mk Sym2.lift₂_mk
 -/
 
 #print Sym2.coe_lift₂_symm_apply /-
@@ -358,16 +358,16 @@ theorem ext {p q : Sym2 α} (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q :=
 #align sym2.ext Sym2.ext
 -/
 
-#print Sym2.mem_mk''_left /-
-theorem mem_mk''_left (x y : α) : x ∈ ⟦(x, y)⟧ :=
+#print Sym2.mem_mk_left /-
+theorem mem_mk_left (x y : α) : x ∈ ⟦(x, y)⟧ :=
   ⟨y, rfl⟩
-#align sym2.mem_mk_left Sym2.mem_mk''_left
+#align sym2.mem_mk_left Sym2.mem_mk_left
 -/
 
-#print Sym2.mem_mk''_right /-
-theorem mem_mk''_right (x y : α) : y ∈ ⟦(x, y)⟧ :=
-  eq_swap.subst <| mem_mk''_left y x
-#align sym2.mem_mk_right Sym2.mem_mk''_right
+#print Sym2.mem_mk_right /-
+theorem mem_mk_right (x y : α) : y ∈ ⟦(x, y)⟧ :=
+  eq_swap.subst <| mem_mk_left y x
+#align sym2.mem_mk_right Sym2.mem_mk_right
 -/
 
 #print Sym2.mem_iff /-
@@ -505,16 +505,16 @@ def IsDiag : Sym2 α → Prop :=
 #align sym2.is_diag Sym2.IsDiag
 -/
 
-#print Sym2.mk''_isDiag_iff /-
-theorem mk''_isDiag_iff {x y : α} : IsDiag ⟦(x, y)⟧ ↔ x = y :=
+#print Sym2.mk_isDiag_iff /-
+theorem mk_isDiag_iff {x y : α} : IsDiag ⟦(x, y)⟧ ↔ x = y :=
   Iff.rfl
-#align sym2.mk_is_diag_iff Sym2.mk''_isDiag_iff
+#align sym2.mk_is_diag_iff Sym2.mk_isDiag_iff
 -/
 
 #print Sym2.isDiag_iff_proj_eq /-
 @[simp]
 theorem isDiag_iff_proj_eq (z : α × α) : IsDiag ⟦z⟧ ↔ z.1 = z.2 :=
-  Prod.recOn z fun _ _ => mk''_isDiag_iff
+  Prod.recOn z fun _ _ => mk_isDiag_iff
 #align sym2.is_diag_iff_proj_eq Sym2.isDiag_iff_proj_eq
 -/
 
@@ -840,8 +840,8 @@ theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : ha.other ∈ z)
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Sym2.filter_image_quotient_mk''_isDiag /-
-theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
+#print Sym2.filter_image_mk_isDiag /-
+theorem filter_image_mk_isDiag [DecidableEq α] (s : Finset α) :
     ((s ×ˢ s).image Quotient.mk').filterₓ IsDiag = s.diag.image Quotient.mk' :=
   by
   ext z
@@ -850,17 +850,17 @@ theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
   simp only [mem_image, mem_diag, exists_prop, mem_filter, Prod.exists, mem_product]
   constructor
   · rintro ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
-    rw [← h, Sym2.mk''_isDiag_iff] at hab 
+    rw [← h, Sym2.mk_isDiag_iff] at hab 
     exact ⟨a, b, ⟨ha, hab⟩, h⟩
   · rintro ⟨a, b, ⟨ha, rfl⟩, h⟩
     rw [← h]
     exact ⟨⟨a, a, ⟨ha, ha⟩, rfl⟩, rfl⟩
-#align sym2.filter_image_quotient_mk_is_diag Sym2.filter_image_quotient_mk''_isDiag
+#align sym2.filter_image_quotient_mk_is_diag Sym2.filter_image_mk_isDiag
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Sym2.filter_image_quotient_mk''_not_isDiag /-
-theorem filter_image_quotient_mk''_not_isDiag [DecidableEq α] (s : Finset α) :
+#print Sym2.filter_image_mk_not_isDiag /-
+theorem filter_image_mk_not_isDiag [DecidableEq α] (s : Finset α) :
     (((s ×ˢ s).image Quotient.mk').filterₓ fun a : Sym2 α => ¬a.IsDiag) =
       s.offDiag.image Quotient.mk' :=
   by
@@ -870,12 +870,12 @@ theorem filter_image_quotient_mk''_not_isDiag [DecidableEq α] (s : Finset α) :
   simp only [mem_image, mem_off_diag, mem_filter, Prod.exists, mem_product]
   constructor
   · rintro ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
-    rw [← h, Sym2.mk''_isDiag_iff] at hab 
+    rw [← h, Sym2.mk_isDiag_iff] at hab 
     exact ⟨a, b, ⟨ha, hb, hab⟩, h⟩
   · rintro ⟨a, b, ⟨ha, hb, hab⟩, h⟩
-    rw [Ne.def, ← Sym2.mk''_isDiag_iff, h] at hab 
+    rw [Ne.def, ← Sym2.mk_isDiag_iff, h] at hab 
     exact ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
-#align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_quotient_mk''_not_isDiag
+#align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_mk_not_isDiag
 -/
 
 end Decidable
Diff
@@ -729,15 +729,12 @@ end SymEquiv
 
 section Decidable
 
-#print Sym2.relBool /-
 /-- An algorithm for computing `sym2.rel`.
 -/
 def relBool [DecidableEq α] (x y : α × α) : Bool :=
   if x.1 = y.1 then x.2 = y.2 else if x.1 = y.2 then x.2 = y.1 else false
 #align sym2.rel_bool Sym2.relBool
--/
 
-#print Sym2.relBool_spec /-
 theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Rel α x y :=
   by
   cases' x with x₁ x₂; cases' y with y₁ y₂
@@ -748,7 +745,6 @@ theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Re
     · subst h1 <;> apply Sym2.Rel.swap
     · cases h1 <;> cc
 #align sym2.rel_bool_spec Sym2.relBool_spec
--/
 
 /-- Given `[decidable_eq α]` and `[fintype α]`, the following instance gives `fintype (sym2 α)`.
 -/
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2020 Kyle Miller All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kyle Miller
 -/
-import Mathbin.Data.Finset.Prod
-import Mathbin.Data.Sym.Basic
-import Mathbin.Data.SetLike.Basic
+import Data.Finset.Prod
+import Data.Sym.Basic
+import Data.SetLike.Basic
 import Mathbin.Tactic.Linarith.Default
 
 #align_import data.sym.sym2 from "leanprover-community/mathlib"@"fac369018417f980cec5fcdafc766a69f88d8cfe"
Diff
@@ -147,14 +147,14 @@ protected theorem inductionOn₂ {f : Sym2 α → Sym2 β → Prop} (i : Sym2 α
 #print Sym2.exists /-
 protected theorem exists {α : Sort _} {f : Sym2 α → Prop} :
     (∃ x : Sym2 α, f x) ↔ ∃ x y, f ⟦(x, y)⟧ :=
-  (surjective_quotient_mk _).exists.trans Prod.exists
+  (surjective_quotient_mk' _).exists.trans Prod.exists
 #align sym2.exists Sym2.exists
 -/
 
 #print Sym2.forall /-
 protected theorem forall {α : Sort _} {f : Sym2 α → Prop} :
     (∀ x : Sym2 α, f x) ↔ ∀ x y, f ⟦(x, y)⟧ :=
-  (surjective_quotient_mk _).forall.trans Prod.forall
+  (surjective_quotient_mk' _).forall.trans Prod.forall
 #align sym2.forall Sym2.forall
 -/
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2020 Kyle Miller All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kyle Miller
-
-! This file was ported from Lean 3 source module data.sym.sym2
-! leanprover-community/mathlib commit fac369018417f980cec5fcdafc766a69f88d8cfe
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Finset.Prod
 import Mathbin.Data.Sym.Basic
 import Mathbin.Data.SetLike.Basic
 import Mathbin.Tactic.Linarith.Default
 
+#align_import data.sym.sym2 from "leanprover-community/mathlib"@"fac369018417f980cec5fcdafc766a69f88d8cfe"
+
 /-!
 # The symmetric square
 
Diff
@@ -139,11 +139,13 @@ protected theorem inductionOn {f : Sym2 α → Prop} (i : Sym2 α) (hf : ∀ x y
 #align sym2.induction_on Sym2.inductionOn
 -/
 
+#print Sym2.inductionOn₂ /-
 @[elab_as_elim]
 protected theorem inductionOn₂ {f : Sym2 α → Sym2 β → Prop} (i : Sym2 α) (j : Sym2 β)
     (hf : ∀ a₁ a₂ b₁ b₂, f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧) : f i j :=
   Quotient.induction_on₂ i j <| by rintro ⟨a₁, a₂⟩ ⟨b₁, b₂⟩; exact hf _ _ _ _
 #align sym2.induction_on₂ Sym2.inductionOn₂
+-/
 
 #print Sym2.exists /-
 protected theorem exists {α : Sort _} {f : Sym2 α → Prop} :
@@ -206,17 +208,21 @@ def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }
 #align sym2.lift Sym2.lift
 -/
 
+#print Sym2.lift_mk'' /-
 @[simp]
 theorem lift_mk'' (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
     lift f ⟦(a₁, a₂)⟧ = (f : α → α → β) a₁ a₂ :=
   rfl
 #align sym2.lift_mk Sym2.lift_mk''
+-/
 
+#print Sym2.coe_lift_symm_apply /-
 @[simp]
 theorem coe_lift_symm_apply (F : Sym2 α → β) (a₁ a₂ : α) :
     (lift.symm F : α → α → β) a₁ a₂ = F ⟦(a₁, a₂)⟧ :=
   rfl
 #align sym2.coe_lift_symm_apply Sym2.coe_lift_symm_apply
+-/
 
 #print Sym2.lift₂ /-
 /-- A two-argument version of `sym2.lift`. -/
@@ -238,6 +244,7 @@ def lift₂ :
 #align sym2.lift₂ Sym2.lift₂
 -/
 
+#print Sym2.lift₂_mk'' /-
 @[simp]
 theorem lift₂_mk''
     (f :
@@ -246,12 +253,15 @@ theorem lift₂_mk''
     (a₁ a₂ : α) (b₁ b₂ : β) : lift₂ f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧ = (f : α → α → β → β → γ) a₁ a₂ b₁ b₂ :=
   rfl
 #align sym2.lift₂_mk Sym2.lift₂_mk''
+-/
 
+#print Sym2.coe_lift₂_symm_apply /-
 @[simp]
 theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α) (b₁ b₂ : β) :
     (lift₂.symm F : α → α → β → β → γ) a₁ a₂ b₁ b₂ = F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧ :=
   rfl
 #align sym2.coe_lift₂_symm_apply Sym2.coe_lift₂_symm_apply
+-/
 
 #print Sym2.map /-
 /-- The functor `sym2` is functorial, and this function constructs the induced maps.
@@ -267,12 +277,16 @@ theorem map_id : map (@id α) = id := by ext ⟨⟨x, y⟩⟩; rfl
 #align sym2.map_id Sym2.map_id
 -/
 
+#print Sym2.map_comp /-
 theorem map_comp {g : β → γ} {f : α → β} : Sym2.map (g ∘ f) = Sym2.map g ∘ Sym2.map f := by
   ext ⟨⟨x, y⟩⟩; rfl
 #align sym2.map_comp Sym2.map_comp
+-/
 
+#print Sym2.map_map /-
 theorem map_map {g : β → γ} {f : α → β} (x : Sym2 α) : map g (map f x) = map (g ∘ f) x := by tidy
 #align sym2.map_map Sym2.map_map
+-/
 
 #print Sym2.map_pair_eq /-
 @[simp]
@@ -281,6 +295,7 @@ theorem map_pair_eq (f : α → β) (x y : α) : map f ⟦(x, y)⟧ = ⟦(f x, f
 #align sym2.map_pair_eq Sym2.map_pair_eq
 -/
 
+#print Sym2.map.injective /-
 theorem map.injective {f : α → β} (hinj : Injective f) : Injective (map f) :=
   by
   intro z z'
@@ -290,6 +305,7 @@ theorem map.injective {f : α → β} (hinj : Injective f) : Injective (map f) :
   repeat' rw [map_pair_eq, eq_iff]
   rintro (h | h) <;> simp [hinj h.1, hinj h.2]
 #align sym2.map.injective Sym2.map.injective
+-/
 
 section Membership
 
@@ -434,6 +450,7 @@ instance Mem.decidable [DecidableEq α] (x : α) (z : Sym2 α) : Decidable (x 
 
 end Membership
 
+#print Sym2.mem_map /-
 @[simp]
 theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔ ∃ a, a ∈ z ∧ f a = b :=
   by
@@ -445,7 +462,9 @@ theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔
     · exact ⟨y, by simp⟩
   · rintro ⟨w, rfl | rfl, rfl⟩ <;> simp
 #align sym2.mem_map Sym2.mem_map
+-/
 
+#print Sym2.map_congr /-
 @[congr]
 theorem map_congr {f g : α → β} {s : Sym2 α} (h : ∀ x ∈ s, f x = g x) : map f s = map g s :=
   by
@@ -453,6 +472,7 @@ theorem map_congr {f g : α → β} {s : Sym2 α} (h : ∀ x ∈ s, f x = g x) :
   simp only [mem_map]
   constructor <;> · rintro ⟨w, hw, rfl⟩; exact ⟨w, hw, by simp [hw, h]⟩
 #align sym2.map_congr Sym2.map_congr
+-/
 
 #print Sym2.map_id' /-
 /-- Note: `sym2.map_id` will not simplify `sym2.map id z` due to `sym2.map_congr`. -/
@@ -571,19 +591,23 @@ theorem fromRel_prop {sym : Symmetric r} {a b : α} : ⟦(a, b)⟧ ∈ fromRel S
 #align sym2.from_rel_prop Sym2.fromRel_prop
 -/
 
+#print Sym2.fromRel_bot /-
 theorem fromRel_bot : fromRel (fun (x y : α) z => z : Symmetric ⊥) = ∅ :=
   by
   apply Set.eq_empty_of_forall_not_mem fun e => _
   refine' e.ind _
   simp [-Set.bot_eq_empty, Prop.bot_eq_false]
 #align sym2.from_rel_bot Sym2.fromRel_bot
+-/
 
+#print Sym2.fromRel_top /-
 theorem fromRel_top : fromRel (fun (x y : α) z => z : Symmetric ⊤) = Set.univ :=
   by
   apply Set.eq_univ_of_forall fun e => _
   refine' e.ind _
   simp [-Set.top_eq_univ, Prop.top_eq_true]
 #align sym2.from_rel_top Sym2.fromRel_top
+-/
 
 #print Sym2.fromRel_irreflexive /-
 theorem fromRel_irreflexive {sym : Symmetric r} :
@@ -694,6 +718,7 @@ def equivSym (α : Type _) : Sym2 α ≃ Sym α 2 :=
 #align sym2.equiv_sym Sym2.equivSym
 -/
 
+#print Sym2.equivMultiset /-
 /-- The symmetric square is equivalent to multisets of cardinality
 two. (This is currently a synonym for `equiv_sym`, but it's provided
 in case the definition for `sym` changes.)
@@ -701,6 +726,7 @@ in case the definition for `sym` changes.)
 def equivMultiset (α : Type _) : Sym2 α ≃ { s : Multiset α // s.card = 2 } :=
   equivSym α
 #align sym2.equiv_multiset Sym2.equivMultiset
+-/
 
 end SymEquiv
 
Diff
@@ -314,7 +314,7 @@ theorem mem_iff' {a b c : α} : Sym2.Mem a ⟦(b, c)⟧ ↔ a = b ∨ a = c :=
 -/
 
 instance : SetLike (Sym2 α) α where
-  coe z := { x | z.Mem x }
+  coe z := {x | z.Mem x}
   coe_injective' z z' h := by
     simp only [Set.ext_iff, Set.mem_setOf_eq] at h 
     induction' z using Sym2.ind with x y
@@ -759,8 +759,7 @@ def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
         apply h'
       have h' := (rel_bool_spec x y).mpr h
       cases' x with x₁ x₂; cases' y with y₁ y₂
-      cases' mem_iff.mp hy with hy' <;> subst a <;> dsimp [rel_bool] at h'  <;>
-            split_ifs  at h'  <;>
+      cases' mem_iff.mp hy with hy' <;> subst a <;> dsimp [rel_bool] at h'  <;> split_ifs at h'  <;>
           try rw [Bool.of_decide_iff] at h' ; subst x₁; subst x₂ <;>
         dsimp [pair_other]
       simp only [Ne.symm h_1, if_true, eq_self_iff_true, if_false]
@@ -803,7 +802,7 @@ theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb
     hb.other' = a := by
   induction z; cases' z with x y
   dsimp [mem.other', Quot.rec, pair_other] at hb 
-  split_ifs  at hb  <;> dsimp [mem.other', Quot.rec, pair_other]
+  split_ifs at hb  <;> dsimp [mem.other', Quot.rec, pair_other]
   simp only [h, if_true, eq_self_iff_true]
   split_ifs; assumption; rfl
   simp only [h, if_false, eq_self_iff_true]
@@ -815,9 +814,9 @@ theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb
 #print Sym2.other_invol /-
 theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : ha.other ∈ z) : hb.other = a := by
   classical
-    rw [other_eq_other'] at hb ⊢
-    convert other_invol' ha hb
-    rw [other_eq_other']
+  rw [other_eq_other'] at hb ⊢
+  convert other_invol' ha hb
+  rw [other_eq_other']
 #align sym2.other_invol Sym2.other_invol
 -/
 
Diff
@@ -80,7 +80,10 @@ theorem Rel.symm {x y : α × α} : Rel α x y → Rel α y x := by rintro ⟨_,
 #print Sym2.Rel.trans /-
 @[trans]
 theorem Rel.trans {x y z : α × α} (a : Rel α x y) (b : Rel α y z) : Rel α x z := by
-  casesm*Rel _ _ _ <;> first |apply rel.refl|apply rel.swap
+  casesm*Rel _ _ _ <;>
+    first
+    | apply rel.refl
+    | apply rel.swap
 #align sym2.rel.trans Sym2.Rel.trans
 -/
 
@@ -169,13 +172,13 @@ theorem mk''_prod_swap_eq {p : α × α} : ⟦p.symm⟧ = ⟦p⟧ := by cases p;
 
 #print Sym2.congr_right /-
 theorem congr_right {a b c : α} : ⟦(a, b)⟧ = ⟦(a, c)⟧ ↔ b = c := by constructor <;> intro h;
-  · rw [Quotient.eq'] at h; cases h <;> rfl; rw [h]
+  · rw [Quotient.eq'] at h ; cases h <;> rfl; rw [h]
 #align sym2.congr_right Sym2.congr_right
 -/
 
 #print Sym2.congr_left /-
 theorem congr_left {a b c : α} : ⟦(b, a)⟧ = ⟦(c, a)⟧ ↔ b = c := by constructor <;> intro h;
-  · rw [Quotient.eq'] at h; cases h <;> rfl; rw [h]
+  · rw [Quotient.eq'] at h ; cases h <;> rfl; rw [h]
 #align sym2.congr_left Sym2.congr_left
 -/
 
@@ -196,7 +199,7 @@ functions from `sym2`. Note that when `β` is `Prop`, it can sometimes be more c
 `sym2.from_rel` instead. -/
 def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ } ≃ (Sym2 α → β)
     where
-  toFun f := Quotient.lift (uncurry ↑f) <| by rintro _ _ ⟨⟩; exacts[rfl, f.prop _ _]
+  toFun f := Quotient.lift (uncurry ↑f) <| by rintro _ _ ⟨⟩; exacts [rfl, f.prop _ _]
   invFun F := ⟨curry (F ∘ Quotient.mk'), fun a₁ a₂ => congr_arg F eq_swap⟩
   left_inv f := Subtype.ext rfl
   right_inv F := funext <| Sym2.ind fun x y => rfl
@@ -226,10 +229,10 @@ def lift₂ :
     Quotient.lift₂ (fun (a : α × α) (b : β × β) => f.1 a.1 a.2 b.1 b.2)
       (by
         rintro _ _ _ _ ⟨⟩ ⟨⟩
-        exacts[rfl, (f.2 _ _ _ _).2, (f.2 _ _ _ _).1, (f.2 _ _ _ _).1.trans (f.2 _ _ _ _).2])
+        exacts [rfl, (f.2 _ _ _ _).2, (f.2 _ _ _ _).1, (f.2 _ _ _ _).1.trans (f.2 _ _ _ _).2])
   invFun F :=
     ⟨fun a₁ a₂ b₁ b₂ => F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧, fun a₁ a₂ b₁ b₂ => by constructor;
-      exacts[congr_arg₂ F eq_swap rfl, congr_arg₂ F rfl eq_swap]⟩
+      exacts [congr_arg₂ F eq_swap rfl, congr_arg₂ F rfl eq_swap]⟩
   left_inv f := Subtype.ext rfl
   right_inv F := funext₂ fun a b => Sym2.inductionOn₂ a b fun _ _ _ _ => rfl
 #align sym2.lift₂ Sym2.lift₂
@@ -305,7 +308,7 @@ protected def Mem (x : α) (z : Sym2 α) : Prop :=
 
 #print Sym2.mem_iff' /-
 theorem mem_iff' {a b c : α} : Sym2.Mem a ⟦(b, c)⟧ ↔ a = b ∨ a = c :=
-  { mp := by rintro ⟨_, h⟩; rw [eq_iff] at h; tidy
+  { mp := by rintro ⟨_, h⟩; rw [eq_iff] at h ; tidy
     mpr := by rintro (rfl | rfl); · exact ⟨_, rfl⟩; rw [eq_swap]; exact ⟨_, rfl⟩ }
 #align sym2.mem_iff' Sym2.mem_iff'
 -/
@@ -313,12 +316,12 @@ theorem mem_iff' {a b c : α} : Sym2.Mem a ⟦(b, c)⟧ ↔ a = b ∨ a = c :=
 instance : SetLike (Sym2 α) α where
   coe z := { x | z.Mem x }
   coe_injective' z z' h := by
-    simp only [Set.ext_iff, Set.mem_setOf_eq] at h
+    simp only [Set.ext_iff, Set.mem_setOf_eq] at h 
     induction' z using Sym2.ind with x y
     induction' z' using Sym2.ind with x' y'
     have hx := h x; have hy := h y; have hx' := h x'; have hy' := h y'
     simp only [mem_iff', eq_self_iff_true, or_true_iff, iff_true_iff, true_or_iff, true_iff_iff] at
-      hx hy hx' hy'
+      hx hy hx' hy' 
     cases hx <;> cases hy <;> cases hx' <;> cases hy' <;> subst_vars
     rw [Sym2.eq_swap]
 
@@ -532,7 +535,7 @@ theorem other_ne {a : α} {z : Sym2 α} (hd : ¬IsDiag z) (h : a ∈ z) : h.othe
   by
   contrapose! hd
   have h' := Sym2.other_spec h
-  rw [hd] at h'
+  rw [hd] at h' 
   rw [← h']
   simp
 #align sym2.other_ne Sym2.other_ne
@@ -666,10 +669,10 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
         rintro ⟨x, hx⟩ ⟨y, hy⟩ h
         cases' x with _ x; · simpa using hx
         cases' x with _ x; · simpa using hx
-        cases' x with _ x; swap; · exfalso; simp at hx; linarith [hx]
+        cases' x with _ x; swap; · exfalso; simp at hx ; linarith [hx]
         cases' y with _ y; · simpa using hy
         cases' y with _ y; · simpa using hy
-        cases' y with _ y; swap; · exfalso; simp at hy; linarith [hy]
+        cases' y with _ y; swap; · exfalso; simp at hy ; linarith [hy]
         rcases perm_card_two_iff.mp h with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩); · rfl
         apply Sym2.Rel.swap)
   left_inv := by tidy
@@ -678,7 +681,7 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
     · cases' x with x hx
       cases' x with _ x; · simpa using hx
       cases' x with _ x; · simpa using hx
-      cases' x with _ x; swap; · exfalso; simp at hx; linarith [hx]
+      cases' x with _ x; swap; · exfalso; simp at hx ; linarith [hx]
       rfl
 #align sym2.sym2_equiv_sym' Sym2.sym2EquivSym'
 -/
@@ -756,8 +759,9 @@ def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
         apply h'
       have h' := (rel_bool_spec x y).mpr h
       cases' x with x₁ x₂; cases' y with y₁ y₂
-      cases' mem_iff.mp hy with hy' <;> subst a <;> dsimp [rel_bool] at h' <;> split_ifs  at h' <;>
-          try rw [Bool.of_decide_iff] at h'; subst x₁; subst x₂ <;>
+      cases' mem_iff.mp hy with hy' <;> subst a <;> dsimp [rel_bool] at h'  <;>
+            split_ifs  at h'  <;>
+          try rw [Bool.of_decide_iff] at h' ; subst x₁; subst x₂ <;>
         dsimp [pair_other]
       simp only [Ne.symm h_1, if_true, eq_self_iff_true, if_false]
       exfalso; exact Bool.not_false' h'
@@ -798,8 +802,8 @@ theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : h.oth
 theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : ha.other' ∈ z) :
     hb.other' = a := by
   induction z; cases' z with x y
-  dsimp [mem.other', Quot.rec, pair_other] at hb
-  split_ifs  at hb <;> dsimp [mem.other', Quot.rec, pair_other]
+  dsimp [mem.other', Quot.rec, pair_other] at hb 
+  split_ifs  at hb  <;> dsimp [mem.other', Quot.rec, pair_other]
   simp only [h, if_true, eq_self_iff_true]
   split_ifs; assumption; rfl
   simp only [h, if_false, eq_self_iff_true]
@@ -811,7 +815,7 @@ theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb
 #print Sym2.other_invol /-
 theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : ha.other ∈ z) : hb.other = a := by
   classical
-    rw [other_eq_other'] at hb⊢
+    rw [other_eq_other'] at hb ⊢
     convert other_invol' ha hb
     rw [other_eq_other']
 #align sym2.other_invol Sym2.other_invol
@@ -828,7 +832,7 @@ theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
   simp only [mem_image, mem_diag, exists_prop, mem_filter, Prod.exists, mem_product]
   constructor
   · rintro ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
-    rw [← h, Sym2.mk''_isDiag_iff] at hab
+    rw [← h, Sym2.mk''_isDiag_iff] at hab 
     exact ⟨a, b, ⟨ha, hab⟩, h⟩
   · rintro ⟨a, b, ⟨ha, rfl⟩, h⟩
     rw [← h]
@@ -848,10 +852,10 @@ theorem filter_image_quotient_mk''_not_isDiag [DecidableEq α] (s : Finset α) :
   simp only [mem_image, mem_off_diag, mem_filter, Prod.exists, mem_product]
   constructor
   · rintro ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
-    rw [← h, Sym2.mk''_isDiag_iff] at hab
+    rw [← h, Sym2.mk''_isDiag_iff] at hab 
     exact ⟨a, b, ⟨ha, hb, hab⟩, h⟩
   · rintro ⟨a, b, ⟨ha, hb, hab⟩, h⟩
-    rw [Ne.def, ← Sym2.mk''_isDiag_iff, h] at hab
+    rw [Ne.def, ← Sym2.mk''_isDiag_iff, h] at hab 
     exact ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
 #align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_quotient_mk''_not_isDiag
 -/
Diff
@@ -136,12 +136,6 @@ protected theorem inductionOn {f : Sym2 α → Prop} (i : Sym2 α) (hf : ∀ x y
 #align sym2.induction_on Sym2.inductionOn
 -/
 
-/- warning: sym2.induction_on₂ -> Sym2.inductionOn₂ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : (Sym2.{u1} α) -> (Sym2.{u2} β) -> Prop} (i : Sym2.{u1} α) (j : Sym2.{u2} β), (forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), f (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)) (Quotient.mk'.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) -> (f i j)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : (Sym2.{u2} α) -> (Sym2.{u1} β) -> Prop} (i : Sym2.{u2} α) (j : Sym2.{u1} β), (forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), f (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂)) (Quotient.mk.{succ u1} (Prod.{u1, u1} β β) (Sym2.Rel.setoid.{u1} β) (Prod.mk.{u1, u1} β β b₁ b₂))) -> (f i j)
-Case conversion may be inaccurate. Consider using '#align sym2.induction_on₂ Sym2.inductionOn₂ₓ'. -/
 @[elab_as_elim]
 protected theorem inductionOn₂ {f : Sym2 α → Sym2 β → Prop} (i : Sym2 α) (j : Sym2 β)
     (hf : ∀ a₁ a₂ b₁ b₂, f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧) : f i j :=
@@ -209,24 +203,12 @@ def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }
 #align sym2.lift Sym2.lift
 -/
 
-/- warning: sym2.lift_mk -> Sym2.lift_mk'' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (a₁ : α) (a₂ : α), Eq.{succ u2} β (coeFn.{max 1 (succ u1) (succ u2), max 1 (succ u1) (succ u2)} (Equiv.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) (fun (_x : Equiv.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) => (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) -> (Sym2.{u1} α) -> β) (Equiv.hasCoeToFun.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) (Sym2.lift.{u1, u2} α β) f (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂))) ((fun (a : Sort.{max 1 (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (HasLiftT.mk.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeBase.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeSubtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))))) f a₁ a₂)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (a₁ : α) (a₂ : α), Eq.{succ u1} β (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max 1 (succ u2) (succ u1), max (succ u2) (succ u1)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (fun (_x : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (Sym2.{u2} α) -> β) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Sym2.lift.{u2, u1} α β) f (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂))) (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) f a₁ a₂)
-Case conversion may be inaccurate. Consider using '#align sym2.lift_mk Sym2.lift_mk''ₓ'. -/
 @[simp]
 theorem lift_mk'' (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
     lift f ⟦(a₁, a₂)⟧ = (f : α → α → β) a₁ a₂ :=
   rfl
 #align sym2.lift_mk Sym2.lift_mk''
 
-/- warning: sym2.coe_lift_symm_apply -> Sym2.coe_lift_symm_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (F : (Sym2.{u1} α) -> β) (a₁ : α) (a₂ : α), Eq.{succ u2} β ((fun (a : Sort.{max 1 (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (HasLiftT.mk.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeBase.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeSubtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))))) (coeFn.{max 1 (succ u1) (succ u2), max 1 (succ u1) (succ u2)} (Equiv.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (fun (_x : Equiv.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) => ((Sym2.{u1} α) -> β) -> (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.hasCoeToFun.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.symm.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β) (Sym2.lift.{u1, u2} α β)) F) a₁ a₂) (F (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (F : (Sym2.{u2} α) -> β) (a₁ : α) (a₂ : α), Eq.{succ u1} β (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) ((Sym2.{u2} α) -> β) (fun (_x : (Sym2.{u2} α) -> β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : (Sym2.{u2} α) -> β) => Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.symm.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β) (Sym2.lift.{u2, u1} α β)) F) a₁ a₂) (F (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂)))
-Case conversion may be inaccurate. Consider using '#align sym2.coe_lift_symm_apply Sym2.coe_lift_symm_applyₓ'. -/
 @[simp]
 theorem coe_lift_symm_apply (F : Sym2 α → β) (a₁ a₂ : α) :
     (lift.symm F : α → α → β) a₁ a₂ = F ⟦(a₁, a₂)⟧ :=
@@ -253,9 +235,6 @@ def lift₂ :
 #align sym2.lift₂ Sym2.lift₂
 -/
 
-/- warning: sym2.lift₂_mk -> Sym2.lift₂_mk'' is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align sym2.lift₂_mk Sym2.lift₂_mk''ₓ'. -/
 @[simp]
 theorem lift₂_mk''
     (f :
@@ -265,9 +244,6 @@ theorem lift₂_mk''
   rfl
 #align sym2.lift₂_mk Sym2.lift₂_mk''
 
-/- warning: sym2.coe_lift₂_symm_apply -> Sym2.coe_lift₂_symm_apply is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align sym2.coe_lift₂_symm_apply Sym2.coe_lift₂_symm_applyₓ'. -/
 @[simp]
 theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α) (b₁ b₂ : β) :
     (lift₂.symm F : α → α → β → β → γ) a₁ a₂ b₁ b₂ = F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧ :=
@@ -288,22 +264,10 @@ theorem map_id : map (@id α) = id := by ext ⟨⟨x, y⟩⟩; rfl
 #align sym2.map_id Sym2.map_id
 -/
 
-/- warning: sym2.map_comp -> Sym2.map_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {g : β -> γ} {f : α -> β}, Eq.{max (succ u1) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u3} γ)) (Sym2.map.{u1, u3} α γ (Function.comp.{succ u1, succ u2, succ u3} α β γ g f)) (Function.comp.{succ u1, succ u2, succ u3} (Sym2.{u1} α) (Sym2.{u2} β) (Sym2.{u3} γ) (Sym2.map.{u2, u3} β γ g) (Sym2.map.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} {g : β -> γ} {f : α -> β}, Eq.{max (succ u3) (succ u2)} ((Sym2.{u3} α) -> (Sym2.{u2} γ)) (Sym2.map.{u3, u2} α γ (Function.comp.{succ u3, succ u1, succ u2} α β γ g f)) (Function.comp.{succ u3, succ u1, succ u2} (Sym2.{u3} α) (Sym2.{u1} β) (Sym2.{u2} γ) (Sym2.map.{u1, u2} β γ g) (Sym2.map.{u3, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align sym2.map_comp Sym2.map_compₓ'. -/
 theorem map_comp {g : β → γ} {f : α → β} : Sym2.map (g ∘ f) = Sym2.map g ∘ Sym2.map f := by
   ext ⟨⟨x, y⟩⟩; rfl
 #align sym2.map_comp Sym2.map_comp
 
-/- warning: sym2.map_map -> Sym2.map_map is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {g : β -> γ} {f : α -> β} (x : Sym2.{u1} α), Eq.{succ u3} (Sym2.{u3} γ) (Sym2.map.{u2, u3} β γ g (Sym2.map.{u1, u2} α β f x)) (Sym2.map.{u1, u3} α γ (Function.comp.{succ u1, succ u2, succ u3} α β γ g f) x)
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} {g : β -> γ} {f : α -> β} (x : Sym2.{u3} α), Eq.{succ u2} (Sym2.{u2} γ) (Sym2.map.{u1, u2} β γ g (Sym2.map.{u3, u1} α β f x)) (Sym2.map.{u3, u2} α γ (Function.comp.{succ u3, succ u1, succ u2} α β γ g f) x)
-Case conversion may be inaccurate. Consider using '#align sym2.map_map Sym2.map_mapₓ'. -/
 theorem map_map {g : β → γ} {f : α → β} (x : Sym2 α) : map g (map f x) = map (g ∘ f) x := by tidy
 #align sym2.map_map Sym2.map_map
 
@@ -314,12 +278,6 @@ theorem map_pair_eq (f : α → β) (x y : α) : map f ⟦(x, y)⟧ = ⟦(f x, f
 #align sym2.map_pair_eq Sym2.map_pair_eq
 -/
 
-/- warning: sym2.map.injective -> Sym2.map.injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β}, (Function.Injective.{succ u1, succ u2} α β f) -> (Function.Injective.{succ u1, succ u2} (Sym2.{u1} α) (Sym2.{u2} β) (Sym2.map.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β}, (Function.Injective.{succ u2, succ u1} α β f) -> (Function.Injective.{succ u2, succ u1} (Sym2.{u2} α) (Sym2.{u1} β) (Sym2.map.{u2, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align sym2.map.injective Sym2.map.injectiveₓ'. -/
 theorem map.injective {f : α → β} (hinj : Injective f) : Injective (map f) :=
   by
   intro z z'
@@ -473,12 +431,6 @@ instance Mem.decidable [DecidableEq α] (x : α) (z : Sym2 α) : Decidable (x 
 
 end Membership
 
-/- warning: sym2.mem_map -> Sym2.mem_map is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {b : β} {z : Sym2.{u1} α}, Iff (Membership.Mem.{u2, u2} β (Sym2.{u2} β) (SetLike.hasMem.{u2, u2} (Sym2.{u2} β) β (Sym2.setLike.{u2} β)) b (Sym2.map.{u1, u2} α β f z)) (Exists.{succ u1} α (fun (a : α) => And (Membership.Mem.{u1, u1} α (Sym2.{u1} α) (SetLike.hasMem.{u1, u1} (Sym2.{u1} α) α (Sym2.setLike.{u1} α)) a z) (Eq.{succ u2} β (f a) b)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {b : β} {z : Sym2.{u2} α}, Iff (Membership.mem.{u1, u1} β (Sym2.{u1} β) (SetLike.instMembership.{u1, u1} (Sym2.{u1} β) β (Sym2.instSetLikeSym2.{u1} β)) b (Sym2.map.{u2, u1} α β f z)) (Exists.{succ u2} α (fun (a : α) => And (Membership.mem.{u2, u2} α (Sym2.{u2} α) (SetLike.instMembership.{u2, u2} (Sym2.{u2} α) α (Sym2.instSetLikeSym2.{u2} α)) a z) (Eq.{succ u1} β (f a) b)))
-Case conversion may be inaccurate. Consider using '#align sym2.mem_map Sym2.mem_mapₓ'. -/
 @[simp]
 theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔ ∃ a, a ∈ z ∧ f a = b :=
   by
@@ -491,12 +443,6 @@ theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔
   · rintro ⟨w, rfl | rfl, rfl⟩ <;> simp
 #align sym2.mem_map Sym2.mem_map
 
-/- warning: sym2.map_congr -> Sym2.map_congr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {g : α -> β} {s : Sym2.{u1} α}, (forall (x : α), (Membership.Mem.{u1, u1} α (Sym2.{u1} α) (SetLike.hasMem.{u1, u1} (Sym2.{u1} α) α (Sym2.setLike.{u1} α)) x s) -> (Eq.{succ u2} β (f x) (g x))) -> (Eq.{succ u2} (Sym2.{u2} β) (Sym2.map.{u1, u2} α β f s) (Sym2.map.{u1, u2} α β g s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {g : α -> β} {s : Sym2.{u2} α}, (forall (x : α), (Membership.mem.{u2, u2} α (Sym2.{u2} α) (SetLike.instMembership.{u2, u2} (Sym2.{u2} α) α (Sym2.instSetLikeSym2.{u2} α)) x s) -> (Eq.{succ u1} β (f x) (g x))) -> (Eq.{succ u1} (Sym2.{u1} β) (Sym2.map.{u2, u1} α β f s) (Sym2.map.{u2, u1} α β g s))
-Case conversion may be inaccurate. Consider using '#align sym2.map_congr Sym2.map_congrₓ'. -/
 @[congr]
 theorem map_congr {f g : α → β} {s : Sym2 α} (h : ∀ x ∈ s, f x = g x) : map f s = map g s :=
   by
@@ -622,12 +568,6 @@ theorem fromRel_prop {sym : Symmetric r} {a b : α} : ⟦(a, b)⟧ ∈ fromRel S
 #align sym2.from_rel_prop Sym2.fromRel_prop
 -/
 
-/- warning: sym2.from_rel_bot -> Sym2.fromRel_bot is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}}, Eq.{succ u1} (Set.{u1} (Sym2.{u1} α)) (Sym2.fromRel.{u1} α (fun (x : α) (y : α) => Bot.bot.{u1} (α -> α -> Prop) (Pi.hasBot.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasBot.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toHasBot.{0} Prop Prop.completeLattice))) x y) (fun (x : α) (y : α) (z : Bot.bot.{u1} (α -> α -> Prop) (Pi.hasBot.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasBot.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toHasBot.{0} Prop Prop.completeLattice))) x y) => z)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Sym2.{u1} α)) (Set.hasEmptyc.{u1} (Sym2.{u1} α)))
-but is expected to have type
-  forall {α : Type.{u1}}, Eq.{succ u1} (Set.{u1} (Sym2.{u1} α)) (Sym2.fromRel.{u1} α (fun (x : α) (y : α) => Bot.bot.{u1} (α -> α -> Prop) (Pi.instBotForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instBotForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toBot.{0} Prop Prop.completeLattice))) x y) (fun (x : α) (y : α) (z : Bot.bot.{u1} (α -> α -> Prop) (Pi.instBotForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instBotForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toBot.{0} Prop Prop.completeLattice))) x y) => z)) (EmptyCollection.emptyCollection.{u1} (Set.{u1} (Sym2.{u1} α)) (Set.instEmptyCollectionSet.{u1} (Sym2.{u1} α)))
-Case conversion may be inaccurate. Consider using '#align sym2.from_rel_bot Sym2.fromRel_botₓ'. -/
 theorem fromRel_bot : fromRel (fun (x y : α) z => z : Symmetric ⊥) = ∅ :=
   by
   apply Set.eq_empty_of_forall_not_mem fun e => _
@@ -635,12 +575,6 @@ theorem fromRel_bot : fromRel (fun (x y : α) z => z : Symmetric ⊥) = ∅ :=
   simp [-Set.bot_eq_empty, Prop.bot_eq_false]
 #align sym2.from_rel_bot Sym2.fromRel_bot
 
-/- warning: sym2.from_rel_top -> Sym2.fromRel_top is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}}, Eq.{succ u1} (Set.{u1} (Sym2.{u1} α)) (Sym2.fromRel.{u1} α (fun (x : α) (y : α) => Top.top.{u1} (α -> α -> Prop) (Pi.hasTop.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasTop.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toHasTop.{0} Prop Prop.completeLattice))) x y) (fun (x : α) (y : α) (z : Top.top.{u1} (α -> α -> Prop) (Pi.hasTop.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasTop.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toHasTop.{0} Prop Prop.completeLattice))) x y) => z)) (Set.univ.{u1} (Sym2.{u1} α))
-but is expected to have type
-  forall {α : Type.{u1}}, Eq.{succ u1} (Set.{u1} (Sym2.{u1} α)) (Sym2.fromRel.{u1} α (fun (x : α) (y : α) => Top.top.{u1} (α -> α -> Prop) (Pi.instTopForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instTopForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toTop.{0} Prop Prop.completeLattice))) x y) (fun (x : α) (y : α) (z : Top.top.{u1} (α -> α -> Prop) (Pi.instTopForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instTopForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toTop.{0} Prop Prop.completeLattice))) x y) => z)) (Set.univ.{u1} (Sym2.{u1} α))
-Case conversion may be inaccurate. Consider using '#align sym2.from_rel_top Sym2.fromRel_topₓ'. -/
 theorem fromRel_top : fromRel (fun (x y : α) z => z : Symmetric ⊤) = Set.univ :=
   by
   apply Set.eq_univ_of_forall fun e => _
@@ -757,12 +691,6 @@ def equivSym (α : Type _) : Sym2 α ≃ Sym α 2 :=
 #align sym2.equiv_sym Sym2.equivSym
 -/
 
-/- warning: sym2.equiv_multiset -> Sym2.equivMultiset is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}), Equiv.{succ u1, succ u1} (Sym2.{u1} α) (Subtype.{succ u1} (Multiset.{u1} α) (fun (s : Multiset.{u1} α) => Eq.{1} Nat (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{u1} α) -> Nat) (AddMonoidHom.hasCoeToFun.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{u1} α) s) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))))
-but is expected to have type
-  forall (α : Type.{u1}), Equiv.{succ u1, succ u1} (Sym2.{u1} α) (Subtype.{succ u1} (Multiset.{u1} α) (fun (s : Multiset.{u1} α) => Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) s) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} α) s) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) s) 2 (instOfNatNat 2))))
-Case conversion may be inaccurate. Consider using '#align sym2.equiv_multiset Sym2.equivMultisetₓ'. -/
 /-- The symmetric square is equivalent to multisets of cardinality
 two. (This is currently a synonym for `equiv_sym`, but it's provided
 in case the definition for `sym` changes.)
Diff
@@ -101,8 +101,7 @@ theorem rel_iff {x y z w : α} : (x, y) ≈ (z, w) ↔ x = z ∧ y = w ∨ x = w
   by
   constructor <;> intro h
   · cases h <;> simp
-  · cases h <;> rw [h.1, h.2]
-    constructor
+  · cases h <;> rw [h.1, h.2]; constructor
 #align sym2.rel_iff Sym2.rel_iff
 -/
 
@@ -146,9 +145,7 @@ Case conversion may be inaccurate. Consider using '#align sym2.induction_on₂ S
 @[elab_as_elim]
 protected theorem inductionOn₂ {f : Sym2 α → Sym2 β → Prop} (i : Sym2 α) (j : Sym2 β)
     (hf : ∀ a₁ a₂ b₁ b₂, f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧) : f i j :=
-  Quotient.induction_on₂ i j <| by
-    rintro ⟨a₁, a₂⟩ ⟨b₁, b₂⟩
-    exact hf _ _ _ _
+  Quotient.induction_on₂ i j <| by rintro ⟨a₁, a₂⟩ ⟨b₁, b₂⟩; exact hf _ _ _ _
 #align sym2.induction_on₂ Sym2.inductionOn₂
 
 #print Sym2.exists /-
@@ -166,39 +163,25 @@ protected theorem forall {α : Sort _} {f : Sym2 α → Prop} :
 -/
 
 #print Sym2.eq_swap /-
-theorem eq_swap {a b : α} : ⟦(a, b)⟧ = ⟦(b, a)⟧ :=
-  by
-  rw [Quotient.eq']
-  apply rel.swap
+theorem eq_swap {a b : α} : ⟦(a, b)⟧ = ⟦(b, a)⟧ := by rw [Quotient.eq']; apply rel.swap
 #align sym2.eq_swap Sym2.eq_swap
 -/
 
 #print Sym2.mk''_prod_swap_eq /-
 @[simp]
-theorem mk''_prod_swap_eq {p : α × α} : ⟦p.symm⟧ = ⟦p⟧ :=
-  by
-  cases p
-  exact eq_swap
+theorem mk''_prod_swap_eq {p : α × α} : ⟦p.symm⟧ = ⟦p⟧ := by cases p; exact eq_swap
 #align sym2.mk_prod_swap_eq Sym2.mk''_prod_swap_eq
 -/
 
 #print Sym2.congr_right /-
-theorem congr_right {a b c : α} : ⟦(a, b)⟧ = ⟦(a, c)⟧ ↔ b = c :=
-  by
-  constructor <;> intro h
-  · rw [Quotient.eq'] at h
-    cases h <;> rfl
-  rw [h]
+theorem congr_right {a b c : α} : ⟦(a, b)⟧ = ⟦(a, c)⟧ ↔ b = c := by constructor <;> intro h;
+  · rw [Quotient.eq'] at h; cases h <;> rfl; rw [h]
 #align sym2.congr_right Sym2.congr_right
 -/
 
 #print Sym2.congr_left /-
-theorem congr_left {a b c : α} : ⟦(b, a)⟧ = ⟦(c, a)⟧ ↔ b = c :=
-  by
-  constructor <;> intro h
-  · rw [Quotient.eq'] at h
-    cases h <;> rfl
-  rw [h]
+theorem congr_left {a b c : α} : ⟦(b, a)⟧ = ⟦(c, a)⟧ ↔ b = c := by constructor <;> intro h;
+  · rw [Quotient.eq'] at h; cases h <;> rfl; rw [h]
 #align sym2.congr_left Sym2.congr_left
 -/
 
@@ -208,10 +191,7 @@ theorem eq_iff {x y z w : α} : ⟦(x, y)⟧ = ⟦(z, w)⟧ ↔ x = z ∧ y = w
 -/
 
 #print Sym2.mk''_eq_mk''_iff /-
-theorem mk''_eq_mk''_iff {p q : α × α} : ⟦p⟧ = ⟦q⟧ ↔ p = q ∨ p = q.symm :=
-  by
-  cases p
-  cases q
+theorem mk''_eq_mk''_iff {p q : α × α} : ⟦p⟧ = ⟦q⟧ ↔ p = q ∨ p = q.symm := by cases p; cases q;
   simp only [eq_iff, Prod.mk.inj_iff, Prod.swap_prod_mk]
 #align sym2.mk_eq_mk_iff Sym2.mk''_eq_mk''_iff
 -/
@@ -222,10 +202,7 @@ functions from `sym2`. Note that when `β` is `Prop`, it can sometimes be more c
 `sym2.from_rel` instead. -/
 def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ } ≃ (Sym2 α → β)
     where
-  toFun f :=
-    Quotient.lift (uncurry ↑f) <| by
-      rintro _ _ ⟨⟩
-      exacts[rfl, f.prop _ _]
+  toFun f := Quotient.lift (uncurry ↑f) <| by rintro _ _ ⟨⟩; exacts[rfl, f.prop _ _]
   invFun F := ⟨curry (F ∘ Quotient.mk'), fun a₁ a₂ => congr_arg F eq_swap⟩
   left_inv f := Subtype.ext rfl
   right_inv F := funext <| Sym2.ind fun x y => rfl
@@ -269,9 +246,7 @@ def lift₂ :
         rintro _ _ _ _ ⟨⟩ ⟨⟩
         exacts[rfl, (f.2 _ _ _ _).2, (f.2 _ _ _ _).1, (f.2 _ _ _ _).1.trans (f.2 _ _ _ _).2])
   invFun F :=
-    ⟨fun a₁ a₂ b₁ b₂ => F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧, fun a₁ a₂ b₁ b₂ =>
-      by
-      constructor
+    ⟨fun a₁ a₂ b₁ b₂ => F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧, fun a₁ a₂ b₁ b₂ => by constructor;
       exacts[congr_arg₂ F eq_swap rfl, congr_arg₂ F rfl eq_swap]⟩
   left_inv f := Subtype.ext rfl
   right_inv F := funext₂ fun a b => Sym2.inductionOn₂ a b fun _ _ _ _ => rfl
@@ -303,20 +278,13 @@ theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α)
 /-- The functor `sym2` is functorial, and this function constructs the induced maps.
 -/
 def map (f : α → β) : Sym2 α → Sym2 β :=
-  Quotient.map (Prod.map f f)
-    (by
-      rintro _ _ h
-      cases h
-      · rfl
-      apply rel.swap)
+  Quotient.map (Prod.map f f) (by rintro _ _ h; cases h; · rfl; apply rel.swap)
 #align sym2.map Sym2.map
 -/
 
 #print Sym2.map_id /-
 @[simp]
-theorem map_id : map (@id α) = id := by
-  ext ⟨⟨x, y⟩⟩
-  rfl
+theorem map_id : map (@id α) = id := by ext ⟨⟨x, y⟩⟩; rfl
 #align sym2.map_id Sym2.map_id
 -/
 
@@ -326,10 +294,8 @@ lean 3 declaration is
 but is expected to have type
   forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} {g : β -> γ} {f : α -> β}, Eq.{max (succ u3) (succ u2)} ((Sym2.{u3} α) -> (Sym2.{u2} γ)) (Sym2.map.{u3, u2} α γ (Function.comp.{succ u3, succ u1, succ u2} α β γ g f)) (Function.comp.{succ u3, succ u1, succ u2} (Sym2.{u3} α) (Sym2.{u1} β) (Sym2.{u2} γ) (Sym2.map.{u1, u2} β γ g) (Sym2.map.{u3, u1} α β f))
 Case conversion may be inaccurate. Consider using '#align sym2.map_comp Sym2.map_compₓ'. -/
-theorem map_comp {g : β → γ} {f : α → β} : Sym2.map (g ∘ f) = Sym2.map g ∘ Sym2.map f :=
-  by
-  ext ⟨⟨x, y⟩⟩
-  rfl
+theorem map_comp {g : β → γ} {f : α → β} : Sym2.map (g ∘ f) = Sym2.map g ∘ Sym2.map f := by
+  ext ⟨⟨x, y⟩⟩; rfl
 #align sym2.map_comp Sym2.map_comp
 
 /- warning: sym2.map_map -> Sym2.map_map is a dubious translation:
@@ -381,15 +347,8 @@ protected def Mem (x : α) (z : Sym2 α) : Prop :=
 
 #print Sym2.mem_iff' /-
 theorem mem_iff' {a b c : α} : Sym2.Mem a ⟦(b, c)⟧ ↔ a = b ∨ a = c :=
-  { mp := by
-      rintro ⟨_, h⟩
-      rw [eq_iff] at h
-      tidy
-    mpr := by
-      rintro (rfl | rfl)
-      · exact ⟨_, rfl⟩
-      rw [eq_swap]
-      exact ⟨_, rfl⟩ }
+  { mp := by rintro ⟨_, h⟩; rw [eq_iff] at h; tidy
+    mpr := by rintro (rfl | rfl); · exact ⟨_, rfl⟩; rw [eq_swap]; exact ⟨_, rfl⟩ }
 #align sym2.mem_iff' Sym2.mem_iff'
 -/
 
@@ -483,10 +442,8 @@ theorem other_spec {a : α} {z : Sym2 α} (h : a ∈ z) : ⟦(a, h.other)⟧ = z
 -/
 
 #print Sym2.other_mem /-
-theorem other_mem {a : α} {z : Sym2 α} (h : a ∈ z) : h.other ∈ z :=
-  by
-  convert mem_mk_right a h.other
-  rw [other_spec h]
+theorem other_mem {a : α} {z : Sym2 α} (h : a ∈ z) : h.other ∈ z := by
+  convert mem_mk_right a h.other; rw [other_spec h]
 #align sym2.other_mem Sym2.other_mem
 -/
 
@@ -497,8 +454,7 @@ theorem mem_and_mem_iff {x y : α} {z : Sym2 α} (hne : x ≠ y) : x ∈ z ∧ y
   · induction' z using Sym2.ind with x' y'
     rw [mem_iff, mem_iff]
     rintro ⟨rfl | rfl, rfl | rfl⟩ <;> try trivial <;> simp only [Sym2.eq_swap]
-  · rintro rfl
-    simp
+  · rintro rfl; simp
 #align sym2.mem_and_mem_iff Sym2.mem_and_mem_iff
 -/
 
@@ -546,9 +502,7 @@ theorem map_congr {f g : α → β} {s : Sym2 α} (h : ∀ x ∈ s, f x = g x) :
   by
   ext y
   simp only [mem_map]
-  constructor <;>
-    · rintro ⟨w, hw, rfl⟩
-      exact ⟨w, hw, by simp [hw, h]⟩
+  constructor <;> · rintro ⟨w, hw, rfl⟩; exact ⟨w, hw, by simp [hw, h]⟩
 #align sym2.map_congr Sym2.map_congr
 
 #print Sym2.map_id' /-
@@ -621,10 +575,8 @@ theorem isDiag_iff_mem_range_diag (z : Sym2 α) : IsDiag z ↔ z ∈ Set.range (
 -/
 
 #print Sym2.IsDiag.decidablePred /-
-instance IsDiag.decidablePred (α : Type u) [DecidableEq α] : DecidablePred (@IsDiag α) :=
-  by
-  refine' fun z => Quotient.recOnSubsingleton z fun a => _
-  erw [is_diag_iff_proj_eq]
+instance IsDiag.decidablePred (α : Type u) [DecidableEq α] : DecidablePred (@IsDiag α) := by
+  refine' fun z => Quotient.recOnSubsingleton z fun a => _; erw [is_diag_iff_proj_eq];
   infer_instance
 #align sym2.is_diag.decidable_pred Sym2.IsDiag.decidablePred
 -/
@@ -699,10 +651,7 @@ theorem fromRel_top : fromRel (fun (x y : α) z => z : Symmetric ⊤) = Set.univ
 #print Sym2.fromRel_irreflexive /-
 theorem fromRel_irreflexive {sym : Symmetric r} :
     Irreflexive r ↔ ∀ {z}, z ∈ fromRel Sym → ¬IsDiag z :=
-  { mp := fun h =>
-      Sym2.ind <| by
-        rintro a b hr (rfl : a = b)
-        exact h _ hr
+  { mp := fun h => Sym2.ind <| by rintro a b hr (rfl : a = b); exact h _ hr
     mpr := fun h x hr => h (fromRel_prop.mpr hr) rfl }
 #align sym2.from_rel_irreflexive Sym2.fromRel_irreflexive
 -/
@@ -766,14 +715,8 @@ private def from_vector : Vector α 2 → α × α
 
 private theorem perm_card_two_iff {a₁ b₁ a₂ b₂ : α} :
     [a₁, b₁].Perm [a₂, b₂] ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂ :=
-  { mp := by
-      simp [← Multiset.coe_eq_coe, ← Multiset.cons_coe, Multiset.cons_eq_cons]
-      tidy
-    mpr := by
-      intro h
-      cases h <;> rw [h.1, h.2]
-      apply List.Perm.swap'
-      rfl }
+  { mp := by simp [← Multiset.coe_eq_coe, ← Multiset.cons_coe, Multiset.cons_eq_cons]; tidy
+    mpr := by intro h; cases h <;> rw [h.1, h.2]; apply List.Perm.swap'; rfl }
 
 #print Sym2.sym2EquivSym' /-
 /-- The symmetric square is equivalent to length-2 vectors up to permutations.
@@ -782,42 +725,26 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
     where
   toFun :=
     Quotient.map (fun x : α × α => ⟨[x.1, x.2], rfl⟩)
-      (by
-        rintro _ _ ⟨_⟩
-        · rfl
-        apply List.Perm.swap'
-        rfl)
+      (by rintro _ _ ⟨_⟩; · rfl; apply List.Perm.swap'; rfl)
   invFun :=
     Quotient.map fromVector
       (by
         rintro ⟨x, hx⟩ ⟨y, hy⟩ h
         cases' x with _ x; · simpa using hx
         cases' x with _ x; · simpa using hx
-        cases' x with _ x; swap;
-        · exfalso
-          simp at hx
-          linarith [hx]
+        cases' x with _ x; swap; · exfalso; simp at hx; linarith [hx]
         cases' y with _ y; · simpa using hy
         cases' y with _ y; · simpa using hy
-        cases' y with _ y; swap;
-        · exfalso
-          simp at hy
-          linarith [hy]
+        cases' y with _ y; swap; · exfalso; simp at hy; linarith [hy]
         rcases perm_card_two_iff.mp h with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩); · rfl
         apply Sym2.Rel.swap)
   left_inv := by tidy
   right_inv x := by
     refine' Quotient.recOnSubsingleton x fun x => _
     · cases' x with x hx
-      cases' x with _ x
-      · simpa using hx
-      cases' x with _ x
-      · simpa using hx
-      cases' x with _ x
-      swap
-      · exfalso
-        simp at hx
-        linarith [hx]
+      cases' x with _ x; · simpa using hx
+      cases' x with _ x; · simpa using hx
+      cases' x with _ x; swap; · exfalso; simp at hx; linarith [hx]
       rfl
 #align sym2.sym2_equiv_sym' Sym2.sym2EquivSym'
 -/
@@ -861,9 +788,7 @@ theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Re
   by
   cases' x with x₁ x₂; cases' y with y₁ y₂
   dsimp [rel_bool]; split_ifs <;> simp only [false_iff_iff, Bool.coeSort_false, Bool.of_decide_iff]
-  rotate_left 2;
-  · contrapose! h
-    cases h <;> cc
+  rotate_left 2; · contrapose! h; cases h <;> cc
   all_goals
     subst x₁; constructor <;> intro h1
     · subst h1 <;> apply Sym2.Rel.swap
@@ -899,9 +824,7 @@ def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
       · have h' :
           ∀ {c e h},
             @Eq.ndrec _ ⟦x⟧ (fun s => a ∈ s → α) (fun _ => pair_other a x) c e h = pair_other a x :=
-          by
-          intro _ e _
-          subst e
+          by intro _ e _; subst e
         apply h'
       have h' := (rel_bool_spec x y).mpr h
       cases' x with x₁ x₂; cases' y with y₁ y₂
@@ -924,13 +847,8 @@ theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : ⟦(
   have h' := mem_iff.mp h
   dsimp [mem.other', Quot.rec, pair_other]
   cases h' <;> subst a
-  · simp only [eq_self_iff_true]
-    rfl
-  · split_ifs
-    subst h_1
-    rfl
-    rw [eq_swap]
-    rfl
+  · simp only [eq_self_iff_true]; rfl
+  · split_ifs; subst h_1; rfl; rw [eq_swap]; rfl
   rfl
 #align sym2.other_spec' Sym2.other_spec'
 -/
@@ -943,10 +861,8 @@ theorem other_eq_other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) :
 -/
 
 #print Sym2.other_mem' /-
-theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : h.other' ∈ z :=
-  by
-  rw [← other_eq_other']
-  exact other_mem h
+theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : h.other' ∈ z := by
+  rw [← other_eq_other']; exact other_mem h
 #align sym2.other_mem' Sym2.other_mem'
 -/
 
Diff
@@ -279,10 +279,7 @@ def lift₂ :
 -/
 
 /- warning: sym2.lift₂_mk -> Sym2.lift₂_mk'' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u3} γ (coeFn.{max 1 (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} (Equiv.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) (fun (_x : Equiv.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) => (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) -> (Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Equiv.hasCoeToFun.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) (Sym2.lift₂.{u1, u2, u3} α β γ) f (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)) (Quotient.mk'.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) ((fun (a : Sort.{max 1 (succ u1) (succ u2) (succ u3)}) (b : Sort.{max (succ u1) (succ u2) (succ u3)}) [self : HasLiftT.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} a b] => self.0) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (HasLiftT.mk.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeBase.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeSubtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))))) f a₁ a₂ b₁ b₂)
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max 1 (max (succ u3) (succ u2)) (succ u1), max (max (succ u3) (succ u2)) (succ u1)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (fun (_x : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Sym2.lift₂.{u3, u2, u1} α β γ) f (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) f a₁ a₂ b₁ b₂)
+<too large>
 Case conversion may be inaccurate. Consider using '#align sym2.lift₂_mk Sym2.lift₂_mk''ₓ'. -/
 @[simp]
 theorem lift₂_mk''
@@ -294,10 +291,7 @@ theorem lift₂_mk''
 #align sym2.lift₂_mk Sym2.lift₂_mk''
 
 /- warning: sym2.coe_lift₂_symm_apply -> Sym2.coe_lift₂_symm_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (F : (Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u3} γ ((fun (a : Sort.{max 1 (succ u1) (succ u2) (succ u3)}) (b : Sort.{max (succ u1) (succ u2) (succ u3)}) [self : HasLiftT.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} a b] => self.0) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (HasLiftT.mk.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeBase.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeSubtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))))) (coeFn.{max 1 (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} (Equiv.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (fun (_x : Equiv.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) => ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) -> (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.hasCoeToFun.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.symm.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Sym2.lift₂.{u1, u2, u3} α β γ)) F) a₁ a₂ b₁ b₂) (F (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)) (Quotient.mk'.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂)))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (F : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (fun (_x : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.symm.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Sym2.lift₂.{u3, u2, u1} α β γ)) F) a₁ a₂ b₁ b₂) (F (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂)))
+<too large>
 Case conversion may be inaccurate. Consider using '#align sym2.coe_lift₂_symm_apply Sym2.coe_lift₂_symm_applyₓ'. -/
 @[simp]
 theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α) (b₁ b₂ : β) :
@@ -769,7 +763,6 @@ attribute [local instance] Vector.Perm.isSetoid
 
 private def from_vector : Vector α 2 → α × α
   | ⟨[a, b], h⟩ => (a, b)
-#align sym2.from_vector sym2.from_vector
 
 private theorem perm_card_two_iff {a₁ b₁ a₂ b₂ : α} :
     [a₁, b₁].Perm [a₂, b₂] ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂ :=
@@ -781,7 +774,6 @@ private theorem perm_card_two_iff {a₁ b₁ a₂ b₂ : α} :
       cases h <;> rw [h.1, h.2]
       apply List.Perm.swap'
       rfl }
-#align sym2.perm_card_two_iff sym2.perm_card_two_iff
 
 #print Sym2.sym2EquivSym' /-
 /-- The symmetric square is equivalent to length-2 vectors up to permutations.
@@ -892,7 +884,6 @@ A function that gives the other element of a pair given one of the elements.  Us
 -/
 private def pair_other [DecidableEq α] (a : α) (z : α × α) : α :=
   if a = z.1 then z.2 else z.1
-#align sym2.pair_other sym2.pair_other
 
 #print Sym2.Mem.other' /-
 /-- Get the other element of the unordered pair using the decidable equality.
Diff
@@ -236,7 +236,7 @@ def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} (f : Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (a₁ : α) (a₂ : α), Eq.{succ u2} β (coeFn.{max 1 (succ u1) (succ u2), max 1 (succ u1) (succ u2)} (Equiv.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) (fun (_x : Equiv.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) => (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) -> (Sym2.{u1} α) -> β) (Equiv.hasCoeToFun.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) (Sym2.lift.{u1, u2} α β) f (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂))) ((fun (a : Sort.{max 1 (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (HasLiftT.mk.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeBase.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeSubtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))))) f a₁ a₂)
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (a₁ : α) (a₂ : α), Eq.{succ u1} β (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max 1 (succ u2) (succ u1), max (succ u2) (succ u1)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (fun (_x : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (Sym2.{u2} α) -> β) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Sym2.lift.{u2, u1} α β) f (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂))) (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) f a₁ a₂)
+  forall {α : Type.{u2}} {β : Type.{u1}} (f : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (a₁ : α) (a₂ : α), Eq.{succ u1} β (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max 1 (succ u2) (succ u1), max (succ u2) (succ u1)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (fun (_x : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (Sym2.{u2} α) -> β) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Sym2.lift.{u2, u1} α β) f (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂))) (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) f a₁ a₂)
 Case conversion may be inaccurate. Consider using '#align sym2.lift_mk Sym2.lift_mk''ₓ'. -/
 @[simp]
 theorem lift_mk'' (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
@@ -248,7 +248,7 @@ theorem lift_mk'' (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} (F : (Sym2.{u1} α) -> β) (a₁ : α) (a₂ : α), Eq.{succ u2} β ((fun (a : Sort.{max 1 (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (HasLiftT.mk.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeBase.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeSubtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))))) (coeFn.{max 1 (succ u1) (succ u2), max 1 (succ u1) (succ u2)} (Equiv.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (fun (_x : Equiv.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) => ((Sym2.{u1} α) -> β) -> (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.hasCoeToFun.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.symm.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β) (Sym2.lift.{u1, u2} α β)) F) a₁ a₂) (F (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (F : (Sym2.{u2} α) -> β) (a₁ : α) (a₂ : α), Eq.{succ u1} β (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) ((Sym2.{u2} α) -> β) (fun (_x : (Sym2.{u2} α) -> β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : (Sym2.{u2} α) -> β) => Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.symm.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β) (Sym2.lift.{u2, u1} α β)) F) a₁ a₂) (F (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂)))
+  forall {α : Type.{u2}} {β : Type.{u1}} (F : (Sym2.{u2} α) -> β) (a₁ : α) (a₂ : α), Eq.{succ u1} β (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) ((Sym2.{u2} α) -> β) (fun (_x : (Sym2.{u2} α) -> β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : (Sym2.{u2} α) -> β) => Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.symm.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β) (Sym2.lift.{u2, u1} α β)) F) a₁ a₂) (F (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂)))
 Case conversion may be inaccurate. Consider using '#align sym2.coe_lift_symm_apply Sym2.coe_lift_symm_applyₓ'. -/
 @[simp]
 theorem coe_lift_symm_apply (F : Sym2 α → β) (a₁ a₂ : α) :
@@ -282,7 +282,7 @@ def lift₂ :
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u3} γ (coeFn.{max 1 (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} (Equiv.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) (fun (_x : Equiv.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) => (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) -> (Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Equiv.hasCoeToFun.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) (Sym2.lift₂.{u1, u2, u3} α β γ) f (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)) (Quotient.mk'.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) ((fun (a : Sort.{max 1 (succ u1) (succ u2) (succ u3)}) (b : Sort.{max (succ u1) (succ u2) (succ u3)}) [self : HasLiftT.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} a b] => self.0) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (HasLiftT.mk.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeBase.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeSubtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))))) f a₁ a₂ b₁ b₂)
 but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max 1 (max (succ u3) (succ u2)) (succ u1), max (max (succ u3) (succ u2)) (succ u1)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (fun (_x : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Sym2.lift₂.{u3, u2, u1} α β γ) f (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) f a₁ a₂ b₁ b₂)
+  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max 1 (max (succ u3) (succ u2)) (succ u1), max (max (succ u3) (succ u2)) (succ u1)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (fun (_x : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Sym2.lift₂.{u3, u2, u1} α β γ) f (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) f a₁ a₂ b₁ b₂)
 Case conversion may be inaccurate. Consider using '#align sym2.lift₂_mk Sym2.lift₂_mk''ₓ'. -/
 @[simp]
 theorem lift₂_mk''
@@ -297,7 +297,7 @@ theorem lift₂_mk''
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (F : (Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u3} γ ((fun (a : Sort.{max 1 (succ u1) (succ u2) (succ u3)}) (b : Sort.{max (succ u1) (succ u2) (succ u3)}) [self : HasLiftT.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} a b] => self.0) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (HasLiftT.mk.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeBase.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeSubtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))))) (coeFn.{max 1 (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} (Equiv.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (fun (_x : Equiv.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) => ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) -> (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.hasCoeToFun.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.symm.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Sym2.lift₂.{u1, u2, u3} α β γ)) F) a₁ a₂ b₁ b₂) (F (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)) (Quotient.mk'.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂)))
 but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (F : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (fun (_x : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.symm.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Sym2.lift₂.{u3, u2, u1} α β γ)) F) a₁ a₂ b₁ b₂) (F (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂)))
+  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (F : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (fun (_x : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.symm.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Sym2.lift₂.{u3, u2, u1} α β γ)) F) a₁ a₂ b₁ b₂) (F (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂)))
 Case conversion may be inaccurate. Consider using '#align sym2.coe_lift₂_symm_apply Sym2.coe_lift₂_symm_applyₓ'. -/
 @[simp]
 theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α) (b₁ b₂ : β) :
Diff
@@ -982,13 +982,8 @@ theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : ha.other ∈ z)
 #align sym2.other_invol Sym2.other_invol
 -/
 
-/- warning: sym2.filter_image_quotient_mk_is_diag -> Sym2.filter_image_quotient_mk''_isDiag is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α))) (Finset.filter.{u1} (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Sym2.IsDiag.{u1} α) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Sym2.IsDiag.decidablePred.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a) (Finset.image.{u1, u1} (Prod.{u1, u1} α α) (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (b : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Quotient.decidableEq.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (fun (a : Prod.{u1, u1} α α) (b : Prod.{u1, u1} α α) => Sym2.Rel.decidableRel.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) a b) (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Finset.product.{u1, u1} α α s s))) (Finset.image.{u1, u1} (Prod.{u1, u1} α α) (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (b : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Quotient.decidableEq.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (fun (a : Prod.{u1, u1} α α) (b : Prod.{u1, u1} α α) => Sym2.Rel.decidableRel.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) a b) (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Finset.diag.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Sym2.{u1} α)) (Finset.filter.{u1} (Sym2.{u1} α) (Sym2.IsDiag.{u1} α) (fun (a : Sym2.{u1} α) => Sym2.IsDiag.decidablePred.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a) (Finset.image.{u1, u1} (Prod.{u1, u1} α α) (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (b : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Sym2.instDecidableEqSym2.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) (Quotient.mk''.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Finset.product.{u1, u1} α α s s))) (Finset.image.{u1, u1} (Prod.{u1, u1} α α) (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (b : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Sym2.instDecidableEqSym2.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) (Quotient.mk''.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Finset.diag.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s))
-Case conversion may be inaccurate. Consider using '#align sym2.filter_image_quotient_mk_is_diag Sym2.filter_image_quotient_mk''_isDiagₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Sym2.filter_image_quotient_mk''_isDiag /-
 theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
     ((s ×ˢ s).image Quotient.mk').filterₓ IsDiag = s.diag.image Quotient.mk' :=
   by
@@ -1004,14 +999,10 @@ theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
     rw [← h]
     exact ⟨⟨a, a, ⟨ha, ha⟩, rfl⟩, rfl⟩
 #align sym2.filter_image_quotient_mk_is_diag Sym2.filter_image_quotient_mk''_isDiag
+-/
 
-/- warning: sym2.filter_image_quotient_mk_not_is_diag -> Sym2.filter_image_quotient_mk''_not_isDiag is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α))) (Finset.filter.{u1} (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Sym2.{u1} α) => Not (Sym2.IsDiag.{u1} α a)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Not.decidable (Sym2.IsDiag.{u1} α a) (Sym2.IsDiag.decidablePred.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a)) (Finset.image.{u1, u1} (Prod.{u1, u1} α α) (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (b : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Quotient.decidableEq.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (fun (a : Prod.{u1, u1} α α) (b : Prod.{u1, u1} α α) => Sym2.Rel.decidableRel.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) a b) (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Finset.product.{u1, u1} α α s s))) (Finset.image.{u1, u1} (Prod.{u1, u1} α α) (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (b : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Quotient.decidableEq.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (fun (a : Prod.{u1, u1} α α) (b : Prod.{u1, u1} α α) => Sym2.Rel.decidableRel.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) a b) (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Finset.offDiag.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), Eq.{succ u1} (Finset.{u1} (Sym2.{u1} α)) (Finset.filter.{u1} (Sym2.{u1} α) (fun (a : Sym2.{u1} α) => Not (Sym2.IsDiag.{u1} α a)) (fun (a : Sym2.{u1} α) => instDecidableNot (Sym2.IsDiag.{u1} α a) (Sym2.IsDiag.decidablePred.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a)) (Finset.image.{u1, u1} (Prod.{u1, u1} α α) (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (b : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Sym2.instDecidableEqSym2.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) (Quotient.mk''.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Finset.product.{u1, u1} α α s s))) (Finset.image.{u1, u1} (Prod.{u1, u1} α α) (Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (fun (a : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (b : Quotient.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) => Sym2.instDecidableEqSym2.{u1} α (fun (a : α) (b : α) => _inst_1 a b) a b) (Quotient.mk''.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α)) (Finset.offDiag.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s))
-Case conversion may be inaccurate. Consider using '#align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_quotient_mk''_not_isDiagₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Sym2.filter_image_quotient_mk''_not_isDiag /-
 theorem filter_image_quotient_mk''_not_isDiag [DecidableEq α] (s : Finset α) :
     (((s ×ˢ s).image Quotient.mk').filterₓ fun a : Sym2 α => ¬a.IsDiag) =
       s.offDiag.image Quotient.mk' :=
@@ -1028,6 +1019,7 @@ theorem filter_image_quotient_mk''_not_isDiag [DecidableEq α] (s : Finset α) :
     rw [Ne.def, ← Sym2.mk''_isDiag_iff, h] at hab
     exact ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
 #align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_quotient_mk''_not_isDiag
+-/
 
 end Decidable
 
Diff
@@ -236,7 +236,7 @@ def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} (f : Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (a₁ : α) (a₂ : α), Eq.{succ u2} β (coeFn.{max 1 (succ u1) (succ u2), max 1 (succ u1) (succ u2)} (Equiv.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) (fun (_x : Equiv.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) => (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) -> (Sym2.{u1} α) -> β) (Equiv.hasCoeToFun.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β)) (Sym2.lift.{u1, u2} α β) f (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂))) ((fun (a : Sort.{max 1 (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (HasLiftT.mk.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeBase.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeSubtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))))) f a₁ a₂)
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (a₁ : α) (a₂ : α), Eq.{succ u1} β (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max 1 (succ u2) (succ u1), max (succ u2) (succ u1)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (fun (_x : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (Sym2.{u2} α) -> β) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Sym2.lift.{u2, u1} α β) f (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂))) (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) f a₁ a₂)
+  forall {α : Type.{u2}} {β : Type.{u1}} (f : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (a₁ : α) (a₂ : α), Eq.{succ u1} β (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max 1 (succ u2) (succ u1), max (succ u2) (succ u1)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) (fun (_x : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) => (Sym2.{u2} α) -> β) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β)) (Sym2.lift.{u2, u1} α β) f (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂))) (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) f a₁ a₂)
 Case conversion may be inaccurate. Consider using '#align sym2.lift_mk Sym2.lift_mk''ₓ'. -/
 @[simp]
 theorem lift_mk'' (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
@@ -248,7 +248,7 @@ theorem lift_mk'' (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} (F : (Sym2.{u1} α) -> β) (a₁ : α) (a₂ : α), Eq.{succ u2} β ((fun (a : Sort.{max 1 (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (HasLiftT.mk.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeBase.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) (α -> α -> β) (coeSubtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))))) (coeFn.{max 1 (succ u1) (succ u2), max 1 (succ u1) (succ u2)} (Equiv.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (fun (_x : Equiv.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) => ((Sym2.{u1} α) -> β) -> (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.hasCoeToFun.{max (succ u1) (succ u2), max 1 (succ u1) (succ u2)} ((Sym2.{u1} α) -> β) (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.symm.{max 1 (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u1) (succ u2)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u2} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u1} α) -> β) (Sym2.lift.{u1, u2} α β)) F) a₁ a₂) (F (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (F : (Sym2.{u2} α) -> β) (a₁ : α) (a₂ : α), Eq.{succ u1} β (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) ((Sym2.{u2} α) -> β) (fun (_x : (Sym2.{u2} α) -> β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : (Sym2.{u2} α) -> β) => Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.symm.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β) (Sym2.lift.{u2, u1} α β)) F) a₁ a₂) (F (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂)))
+  forall {α : Type.{u2}} {β : Type.{u1}} (F : (Sym2.{u2} α) -> β) (a₁ : α) (a₂ : α), Eq.{succ u1} β (Subtype.val.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)) (FunLike.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} (Equiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) ((Sym2.{u2} α) -> β) (fun (_x : (Sym2.{u2} α) -> β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : (Sym2.{u2} α) -> β) => Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) _x) (Equiv.instFunLikeEquiv.{max (succ u1) (succ u2), max (succ u1) (succ u2)} ((Sym2.{u2} α) -> β) (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁)))) (Equiv.symm.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (Subtype.{max (succ u2) (succ u1)} (α -> α -> β) (fun (f : α -> α -> β) => forall (a₁ : α) (a₂ : α), Eq.{succ u1} β (f a₁ a₂) (f a₂ a₁))) ((Sym2.{u2} α) -> β) (Sym2.lift.{u2, u1} α β)) F) a₁ a₂) (F (Quotient.mk.{succ u2} (Prod.{u2, u2} α α) (Sym2.Rel.setoid.{u2} α) (Prod.mk.{u2, u2} α α a₁ a₂)))
 Case conversion may be inaccurate. Consider using '#align sym2.coe_lift_symm_apply Sym2.coe_lift_symm_applyₓ'. -/
 @[simp]
 theorem coe_lift_symm_apply (F : Sym2 α → β) (a₁ a₂ : α) :
@@ -282,7 +282,7 @@ def lift₂ :
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u3} γ (coeFn.{max 1 (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} (Equiv.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) (fun (_x : Equiv.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) => (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) -> (Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Equiv.hasCoeToFun.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ)) (Sym2.lift₂.{u1, u2, u3} α β γ) f (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)) (Quotient.mk'.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) ((fun (a : Sort.{max 1 (succ u1) (succ u2) (succ u3)}) (b : Sort.{max (succ u1) (succ u2) (succ u3)}) [self : HasLiftT.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} a b] => self.0) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (HasLiftT.mk.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeBase.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeSubtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))))) f a₁ a₂ b₁ b₂)
 but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max 1 (max (succ u3) (succ u2)) (succ u1), max (max (succ u3) (succ u2)) (succ u1)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (fun (_x : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Sym2.lift₂.{u3, u2, u1} α β γ) f (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) f a₁ a₂ b₁ b₂)
+  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max 1 (max (succ u3) (succ u2)) (succ u1), max (max (succ u3) (succ u2)) (succ u1)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (fun (_x : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) => (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ)) (Sym2.lift₂.{u3, u2, u1} α β γ) f (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂))) (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) f a₁ a₂ b₁ b₂)
 Case conversion may be inaccurate. Consider using '#align sym2.lift₂_mk Sym2.lift₂_mk''ₓ'. -/
 @[simp]
 theorem lift₂_mk''
@@ -297,7 +297,7 @@ theorem lift₂_mk''
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (F : (Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u3} γ ((fun (a : Sort.{max 1 (succ u1) (succ u2) (succ u3)}) (b : Sort.{max (succ u1) (succ u2) (succ u3)}) [self : HasLiftT.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} a b] => self.0) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (HasLiftT.mk.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (CoeTCₓ.coe.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeBase.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) (α -> α -> β -> β -> γ) (coeSubtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))))) (coeFn.{max 1 (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} (Equiv.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (fun (_x : Equiv.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) => ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) -> (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.hasCoeToFun.{max (succ u1) (succ u2) (succ u3), max 1 (succ u1) (succ u2) (succ u3)} ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.symm.{max 1 (succ u1) (succ u2) (succ u3), max (succ u1) (succ u2) (succ u3)} (Subtype.{max (succ u1) (succ u2) (succ u3)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u3} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u1} α) -> (Sym2.{u2} β) -> γ) (Sym2.lift₂.{u1, u2, u3} α β γ)) F) a₁ a₂ b₁ b₂) (F (Quotient.mk'.{succ u1} (Prod.{u1, u1} α α) (Sym2.Rel.setoid.{u1} α) (Prod.mk.{u1, u1} α α a₁ a₂)) (Quotient.mk'.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂)))
 but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (F : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (fun (_x : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.symm.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Sym2.lift₂.{u3, u2, u1} α β γ)) F) a₁ a₂ b₁ b₂) (F (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂)))
+  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (F : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), Eq.{succ u1} γ (Subtype.val.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (fun (_x : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : (Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) => Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) _x) (Equiv.instFunLikeEquiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁))))) (Equiv.symm.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u1) (succ u2)) (succ u3)} (Subtype.{max (max (succ u3) (succ u2)) (succ u1)} (α -> α -> β -> β -> γ) (fun (f : α -> α -> β -> β -> γ) => forall (a₁ : α) (a₂ : α) (b₁ : β) (b₂ : β), And (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₂ a₁ b₁ b₂)) (Eq.{succ u1} γ (f a₁ a₂ b₁ b₂) (f a₁ a₂ b₂ b₁)))) ((Sym2.{u3} α) -> (Sym2.{u2} β) -> γ) (Sym2.lift₂.{u3, u2, u1} α β γ)) F) a₁ a₂ b₁ b₂) (F (Quotient.mk.{succ u3} (Prod.{u3, u3} α α) (Sym2.Rel.setoid.{u3} α) (Prod.mk.{u3, u3} α α a₁ a₂)) (Quotient.mk.{succ u2} (Prod.{u2, u2} β β) (Sym2.Rel.setoid.{u2} β) (Prod.mk.{u2, u2} β β b₁ b₂)))
 Case conversion may be inaccurate. Consider using '#align sym2.coe_lift₂_symm_apply Sym2.coe_lift₂_symm_applyₓ'. -/
 @[simp]
 theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α) (b₁ b₂ : β) :
@@ -842,7 +842,7 @@ def equivSym (α : Type _) : Sym2 α ≃ Sym α 2 :=
 lean 3 declaration is
   forall (α : Type.{u1}), Equiv.{succ u1, succ u1} (Sym2.{u1} α) (Subtype.{succ u1} (Multiset.{u1} α) (fun (s : Multiset.{u1} α) => Eq.{1} Nat (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{u1} α) -> Nat) (AddMonoidHom.hasCoeToFun.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.orderedCancelAddCommMonoid.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{u1} α) s) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne))))))
 but is expected to have type
-  forall (α : Type.{u1}), Equiv.{succ u1, succ u1} (Sym2.{u1} α) (Subtype.{succ u1} (Multiset.{u1} α) (fun (s : Multiset.{u1} α) => Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Nat) s) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} α) s) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.398 : Multiset.{u1} α) => Nat) s) 2 (instOfNatNat 2))))
+  forall (α : Type.{u1}), Equiv.{succ u1, succ u1} (Sym2.{u1} α) (Subtype.{succ u1} (Multiset.{u1} α) (fun (s : Multiset.{u1} α) => Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) s) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) (fun (_x : Multiset.{u1} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) _x) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} α) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} α) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} α) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} α) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} α) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} α) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} α) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} α)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} α) s) (OfNat.ofNat.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} α) => Nat) s) 2 (instOfNatNat 2))))
 Case conversion may be inaccurate. Consider using '#align sym2.equiv_multiset Sym2.equivMultisetₓ'. -/
 /-- The symmetric square is equivalent to multisets of cardinality
 two. (This is currently a synonym for `equiv_sym`, but it's provided

Changes in mathlib4

mathlib3
mathlib4
chore: remove unnecessary cdots (#12417)

These · are scoping when there is a single active goal.

These were found using a modification of the linter at #12339.

Diff
@@ -617,16 +617,16 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
   left_inv := by apply Sym2.ind; aesop (add norm unfold [Sym2.fromVector])
   right_inv x := by
     refine' x.recOnSubsingleton fun x => _
-    · cases' x with x hx
-      cases' x with _ x
-      · simp at hx
-      cases' x with _ x
-      · simp at hx
-      cases' x with _ x
-      swap
-      · exfalso
-        simp at hx
-      rfl
+    cases' x with x hx
+    cases' x with _ x
+    · simp at hx
+    cases' x with _ x
+    · simp at hx
+    cases' x with _ x
+    swap
+    · exfalso
+      simp at hx
+    rfl
 #align sym2.sym2_equiv_sym' Sym2.sym2EquivSym'
 
 /-- The symmetric square is equivalent to the second symmetric power. -/
chore: Split Data.{Nat,Int}{.Order}.Basic in group vs ring instances (#11924)

Scatter the content of Data.Nat.Basic across:

  • Data.Nat.Defs for the lemmas having no dependencies
  • Algebra.Group.Nat for the monoid instances and the few miscellaneous lemmas needing them.
  • Algebra.Ring.Nat for the semiring instance and the few miscellaneous lemmas following it.

Similarly, scatter

  • Data.Int.Basic across Data.Int.Defs, Algebra.Group.Int, Algebra.Ring.Int
  • Data.Nat.Order.Basic across Data.Nat.Defs, Algebra.Order.Group.Nat, Algebra.Order.Ring.Nat
  • Data.Int.Order.Basic across Data.Int.Defs, Algebra.Order.Group.Int, Algebra.Order.Ring.Int

Also move a few lemmas from Data.Nat.Order.Lemmas to Data.Nat.Defs.

Before pre_11924

After post_11924

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2020 Kyle Miller All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kyle Miller
 -/
+import Mathlib.Algebra.Order.Ring.CharZero
 import Mathlib.Data.Finset.Prod
 import Mathlib.Data.Sym.Basic
 import Mathlib.Data.Sym.Sym2.Init
chore: avoid Ne.def (adaptation for nightly-2024-03-27) (#11801)
Diff
@@ -747,7 +747,7 @@ theorem filter_image_mk_not_isDiag [DecidableEq α] (s : Finset α) :
     rw [← h, Sym2.mk_isDiag_iff] at hab
     exact ⟨a, b, ⟨ha, hb, hab⟩, h⟩
   · rintro ⟨a, b, ⟨ha, hb, hab⟩, h⟩
-    rw [Ne.def, ← Sym2.mk_isDiag_iff, h] at hab
+    rw [Ne, ← Sym2.mk_isDiag_iff, h] at hab
     exact ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
 #align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_mk_not_isDiag
 
chore: bump aesop; update syntax (#10955)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -53,7 +53,7 @@ variable {α β γ : Type*}
 namespace Sym2
 
 /-- This is the relation capturing the notion of pairs equivalent up to permutations. -/
-@[aesop (rule_sets [Sym2]) [safe [constructors, cases], norm]]
+@[aesop (rule_sets := [Sym2]) [safe [constructors, cases], norm]]
 inductive Rel (α : Type u) : α × α → α × α → Prop
   | refl (x y : α) : Rel _ (x, y) (x, y)
   | swap (x y : α) : Rel _ (x, y) (y, x)
@@ -64,12 +64,12 @@ inductive Rel (α : Type u) : α × α → α × α → Prop
 attribute [refl] Rel.refl
 
 @[symm]
-theorem Rel.symm {x y : α × α} : Rel α x y → Rel α y x := by aesop (rule_sets [Sym2])
+theorem Rel.symm {x y : α × α} : Rel α x y → Rel α y x := by aesop (rule_sets := [Sym2])
 #align sym2.rel.symm Sym2.Rel.symm
 
 @[trans]
 theorem Rel.trans {x y z : α × α} (a : Rel α x y) (b : Rel α y z) : Rel α x z := by
-  aesop (rule_sets [Sym2])
+  aesop (rule_sets := [Sym2])
 #align sym2.rel.trans Sym2.Rel.trans
 
 theorem Rel.is_equivalence : Equivalence (Rel α) :=
@@ -84,7 +84,7 @@ def Rel.setoid (α : Type u) : Setoid (α × α) :=
 
 @[simp]
 theorem rel_iff' {p q : α × α} : Rel α p q ↔ p = q ∨ p = q.swap := by
-  aesop (rule_sets [Sym2])
+  aesop (rule_sets := [Sym2])
 
 theorem rel_iff {x y z w : α} : Rel α (x, y) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z := by
   simp
@@ -301,7 +301,7 @@ protected def Mem (x : α) (z : Sym2 α) : Prop :=
   ∃ y : α, z = s(x, y)
 #align sym2.mem Sym2.Mem
 
-@[aesop norm (rule_sets [Sym2])]
+@[aesop norm (rule_sets := [Sym2])]
 theorem mem_iff' {a b c : α} : Sym2.Mem a s(b, c) ↔ a = b ∨ a = c :=
   { mp := by
       rintro ⟨_, h⟩
@@ -347,7 +347,7 @@ theorem mem_mk_right (x y : α) : y ∈ s(x, y) :=
   eq_swap.subst <| mem_mk_left y x
 #align sym2.mem_mk_right Sym2.mem_mk_right
 
-@[simp, aesop norm (rule_sets [Sym2])]
+@[simp, aesop norm (rule_sets := [Sym2])]
 theorem mem_iff {a b c : α} : a ∈ s(b, c) ↔ a = b ∨ a = c :=
   mem_iff'
 #align sym2.mem_iff Sym2.mem_iff
@@ -669,14 +669,14 @@ instance [DecidableEq α] : DecidableEq (Sym2 α) :=
 /--
 A function that gives the other element of a pair given one of the elements.  Used in `Mem.other'`.
 -/
-@[aesop norm unfold (rule_sets [Sym2])]
+@[aesop norm unfold (rule_sets := [Sym2])]
 private def pairOther [DecidableEq α] (a : α) (z : α × α) : α :=
   if a = z.1 then z.2 else z.1
 
 
 /-- Get the other element of the unordered pair using the decidable equality.
 This is the computable version of `Mem.other`. -/
-@[aesop norm unfold (rule_sets [Sym2])]
+@[aesop norm unfold (rule_sets := [Sym2])]
 def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
   Sym2.rec (fun s _ => pairOther a s) (by
     clear h z
@@ -696,7 +696,7 @@ def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
 theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : s(a, Mem.other' h) = z := by
   induction z using Sym2.ind
   have h' := mem_iff.mp h
-  aesop (add norm unfold [Sym2.rec, Quot.rec]) (rule_sets [Sym2])
+  aesop (add norm unfold [Sym2.rec, Quot.rec]) (rule_sets := [Sym2])
 #align sym2.other_spec' Sym2.other_spec'
 
 @[simp]
@@ -712,7 +712,7 @@ theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.o
 theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other' ha ∈ z) :
     Mem.other' hb = a := by
   induction z using Sym2.ind
-  aesop (rule_sets [Sym2]) (add norm unfold [Sym2.rec, Quot.rec])
+  aesop (rule_sets := [Sym2]) (add norm unfold [Sym2.rec, Quot.rec])
 #align sym2.other_invol' Sym2.other_invol'
 
 theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈ z) : Mem.other hb = a :=
refactor: remove Sym2's global Prod setoid instance, use s(x, y) notation for unordered pairs (#8729)

The Sym2 type used a global setoid instance on α × α so that ⟦(x, y)⟧ could stand for an unordered pair using standard Quotient syntax. This commit refactors Sym2 to not use Quotient and instead use its own s(x, y) notation. One benefit to this is that this notation produces a term with type Sym2 rather than Quotient.

The Fintype instance for Sym2 is in Mathlib.Data.Finset.Sym. We switch from using the one for Quotient because it does not require DecidableEq.

Diff
@@ -37,19 +37,13 @@ constructed by `Sym2.fromRel` which is a special case of `Sym2.lift`.
 
 ## Notation
 
-The symmetric square has a setoid instance, so `⟦(a, b)⟧` denotes a
-term of the symmetric square.
+The element `Sym2.mk (a, b)` can be written as `s(a, b)` for short.
 
 ## Tags
 
 symmetric square, unordered pairs, symmetric powers
 -/
 
-
--- porting note: using `aesop` in place of `tidy` to simplify proofs
--- porting note: remove import `Tactic.Linarith.Default`
--- porting note: adding the above porting note here to avoid module docs linter error
-
 open Finset Function Sym
 
 universe u
@@ -58,15 +52,15 @@ variable {α β γ : Type*}
 
 namespace Sym2
 
-/-- This is the relation capturing the notion of pairs equivalent up to permutations.
--/
+/-- This is the relation capturing the notion of pairs equivalent up to permutations. -/
 @[aesop (rule_sets [Sym2]) [safe [constructors, cases], norm]]
 inductive Rel (α : Type u) : α × α → α × α → Prop
   | refl (x y : α) : Rel _ (x, y) (x, y)
   | swap (x y : α) : Rel _ (x, y) (y, x)
 #align sym2.rel Sym2.Rel
+#align sym2.rel.refl Sym2.Rel.refl
+#align sym2.rel.swap Sym2.Rel.swap
 
--- porting note: somehow the name was not aligned
 attribute [refl] Rel.refl
 
 @[symm]
@@ -79,16 +73,21 @@ theorem Rel.trans {x y z : α × α} (a : Rel α x y) (b : Rel α y z) : Rel α
 #align sym2.rel.trans Sym2.Rel.trans
 
 theorem Rel.is_equivalence : Equivalence (Rel α) :=
-  { refl := fun (x, y)↦Rel.refl x y, symm := Rel.symm, trans := Rel.trans }
+  { refl := fun (x, y) ↦ Rel.refl x y, symm := Rel.symm, trans := Rel.trans }
 #align sym2.rel.is_equivalence Sym2.Rel.is_equivalence
 
-instance Rel.setoid (α : Type u) : Setoid (α × α) :=
+/-- One can use `attribute [local instance] Sym2.Rel.setoid` to temporarily
+make `Quotient` functionality work for `α × α`. -/
+def Rel.setoid (α : Type u) : Setoid (α × α) :=
   ⟨Rel α, Rel.is_equivalence⟩
 #align sym2.rel.setoid Sym2.Rel.setoid
 
 @[simp]
-theorem rel_iff {x y z w : α} : (x, y) ≈ (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z :=
-  show Rel _ _ _ ↔ _ by aesop (rule_sets [Sym2])
+theorem rel_iff' {p q : α × α} : Rel α p q ↔ p = q ∨ p = q.swap := by
+  aesop (rule_sets [Sym2])
+
+theorem rel_iff {x y z w : α} : Rel α (x, y) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z := by
+  simp
 #align sym2.rel_iff Sym2.rel_iff
 
 end Sym2
@@ -100,77 +99,100 @@ It is equivalent in a natural way to multisets of cardinality 2 (see
 `Sym2.equivMultiset`).
 -/
 @[reducible]
-def Sym2 (α : Type u) :=
-  Quotient (Sym2.Rel.setoid α)
+def Sym2 (α : Type u) := Quot (Sym2.Rel α)
 #align sym2 Sym2
 
+/-- Constructor for `Sym2`. This is the quotient map `α × α → Sym2 α`. -/
+protected abbrev Sym2.mk {α : Type*} (p : α × α) : Sym2 α := Quot.mk (Sym2.Rel α) p
+
+/-- `s(x, y)` is an unordered pair,
+which is to say a pair modulo the action of the symmetric group.
+
+It is equal to `Sym2.mk (x, y)`. -/
+notation3 "s(" x ", " y ")" => Sym2.mk (x, y)
+
 namespace Sym2
 
+protected theorem sound {p p' : α × α} (h : Sym2.Rel α p p') : Sym2.mk p = Sym2.mk p' :=
+  Quot.sound h
+
+protected theorem exact {p p' : α × α} (h : Sym2.mk p = Sym2.mk p') : Sym2.Rel α p p' :=
+  Quotient.exact (s := Sym2.Rel.setoid α) h
+
+@[simp]
+protected theorem eq {p p' : α × α} : Sym2.mk p = Sym2.mk p' ↔ Sym2.Rel α p p' :=
+  Quotient.eq' (s₁ := Sym2.Rel.setoid α)
+
 @[elab_as_elim]
-protected theorem ind {f : Sym2 α → Prop} (h : ∀ x y, f ⟦(x, y)⟧) : ∀ i, f i :=
-  Quotient.ind <| Prod.rec <| h
+protected theorem ind {f : Sym2 α → Prop} (h : ∀ x y, f s(x, y)) : ∀ i, f i :=
+  Quot.ind <| Prod.rec <| h
 #align sym2.ind Sym2.ind
 
 @[elab_as_elim]
-protected theorem inductionOn {f : Sym2 α → Prop} (i : Sym2 α) (hf : ∀ x y, f ⟦(x, y)⟧) : f i :=
+protected theorem inductionOn {f : Sym2 α → Prop} (i : Sym2 α) (hf : ∀ x y, f s(x, y)) : f i :=
   i.ind hf
 #align sym2.induction_on Sym2.inductionOn
 
 @[elab_as_elim]
 protected theorem inductionOn₂ {f : Sym2 α → Sym2 β → Prop} (i : Sym2 α) (j : Sym2 β)
-    (hf : ∀ a₁ a₂ b₁ b₂, f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧) : f i j :=
-  Quotient.inductionOn₂ i j <| by
+    (hf : ∀ a₁ a₂ b₁ b₂, f s(a₁, a₂) s(b₁, b₂)) : f i j :=
+  Quot.induction_on₂ i j <| by
     intro ⟨a₁, a₂⟩ ⟨b₁, b₂⟩
     exact hf _ _ _ _
 #align sym2.induction_on₂ Sym2.inductionOn₂
 
--- porting note: `exists` seems to be an invalid identifier
+/-- Dependent recursion principal for `Sym2`. See `Quot.rec`. -/
+@[elab_as_elim]
+protected def rec {motive : Sym2 α → Sort*}
+    (f : (p : α × α) → motive (Sym2.mk p))
+    (h : (p q : α × α) → (h : Sym2.Rel α p q) → Eq.ndrec (f p) (Sym2.sound h) = f q)
+    (z : Sym2 α) : motive z :=
+  Quot.rec f h z
+
+/-- Dependent recursion principal for `Sym2` when the target is a `Subsingleton` type.
+See `Quot.recOnSubsingleton`. -/
+@[elab_as_elim]
+protected abbrev recOnSubsingleton {motive : Sym2 α → Sort*}
+    [(p : α × α) → Subsingleton (motive (Sym2.mk p))]
+    (z : Sym2 α) (f : (p : α × α) → motive (Sym2.mk p)) : motive z :=
+  Quot.recOnSubsingleton z f
+
 protected theorem «exists» {α : Sort _} {f : Sym2 α → Prop} :
-    (∃ x : Sym2 α, f x) ↔ ∃ x y, f ⟦(x, y)⟧ :=
-  (surjective_quotient_mk' _).exists.trans Prod.exists
+    (∃ x : Sym2 α, f x) ↔ ∃ x y, f s(x, y) :=
+  (surjective_quot_mk _).exists.trans Prod.exists
 #align sym2.exists Sym2.exists
 
--- porting note: `forall` seems to be an invalid identifier
 protected theorem «forall» {α : Sort _} {f : Sym2 α → Prop} :
-    (∀ x : Sym2 α, f x) ↔ ∀ x y, f ⟦(x, y)⟧ :=
-  (surjective_quotient_mk' _).forall.trans Prod.forall
+    (∀ x : Sym2 α, f x) ↔ ∀ x y, f s(x, y) :=
+  (surjective_quot_mk _).forall.trans Prod.forall
 #align sym2.forall Sym2.forall
 
--- porting note: The `⟦⟧` notation does not infer the setoid structure automatically
-theorem eq_swap {a b : α} : Eq (α := Sym2 α) ⟦(a, b)⟧ ⟦(b, a)⟧ := by
-  rw [Quotient.eq]
-  apply Rel.swap
+theorem eq_swap {a b : α} : s(a, b) = s(b, a) := Quot.sound (Rel.swap _ _)
 #align sym2.eq_swap Sym2.eq_swap
 
 @[simp]
-theorem mk''_prod_swap_eq {p : α × α} : Eq (α := Sym2 α) ⟦p.swap⟧ ⟦p⟧ := by
+theorem mk_prod_swap_eq {p : α × α} : Sym2.mk p.swap = Sym2.mk p := by
   cases p
   exact eq_swap
-#align sym2.mk_prod_swap_eq Sym2.mk''_prod_swap_eq
+#align sym2.mk_prod_swap_eq Sym2.mk_prod_swap_eq
 
-theorem congr_right {a b c : α} : Eq (α := Sym2 α) ⟦(a, b)⟧ ⟦(a, c)⟧ ↔ b = c := by
-  constructor <;> intro h
-  · rw [Quotient.eq] at h
-    cases h <;> rfl
-  rw [h]
+theorem congr_right {a b c : α} : s(a, b) = s(a, c) ↔ b = c := by
+  simp (config := {contextual := true})
 #align sym2.congr_right Sym2.congr_right
 
-theorem congr_left {a b c : α} : Eq (α := Sym2 α) ⟦(b, a)⟧ ⟦(c, a)⟧ ↔ b = c := by
-  constructor <;> intro h
-  · rw [Quotient.eq] at h
-    cases h <;> rfl
-  rw [h]
+theorem congr_left {a b c : α} : s(b, a) = s(c, a) ↔ b = c := by
+  simp (config := {contextual := true})
 #align sym2.congr_left Sym2.congr_left
 
-theorem eq_iff {x y z w : α} : Eq (α := Sym2 α) ⟦(x, y)⟧ ⟦(z, w)⟧ ↔ x = z ∧ y = w ∨ x = w ∧ y = z :=
+theorem eq_iff {x y z w : α} : s(x, y) = s(z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z :=
   by simp
 #align sym2.eq_iff Sym2.eq_iff
 
-theorem mk''_eq_mk''_iff {p q : α × α} : Eq (α := Sym2 α) ⟦p⟧ ⟦q⟧ ↔ p = q ∨ p = q.swap := by
+theorem mk_eq_mk_iff {p q : α × α} : Sym2.mk p = Sym2.mk q ↔ p = q ∨ p = q.swap := by
   cases p
   cases q
   simp only [eq_iff, Prod.mk.inj_iff, Prod.swap_prod_mk]
-#align sym2.mk_eq_mk_iff Sym2.mk''_eq_mk''_iff
+#align sym2.mk_eq_mk_iff Sym2.mk_eq_mk_iff
 
 /-- The universal property of `Sym2`; symmetric functions of two arguments are equivalent to
 functions from `Sym2`. Note that when `β` is `Prop`, it can sometimes be more convenient to use
@@ -178,23 +200,23 @@ functions from `Sym2`. Note that when `β` is `Prop`, it can sometimes be more c
 def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ } ≃ (Sym2 α → β)
     where
   toFun f :=
-    Quotient.lift (uncurry ↑f) <| by
+    Quot.lift (uncurry ↑f) <| by
       rintro _ _ ⟨⟩
       exacts [rfl, f.prop _ _]
-  invFun F := ⟨curry (F ∘ Quotient.mk''), fun a₁ a₂ => congr_arg F eq_swap⟩
+  invFun F := ⟨curry (F ∘ Sym2.mk), fun a₁ a₂ => congr_arg F eq_swap⟩
   left_inv f := Subtype.ext rfl
   right_inv F := funext <| Sym2.ind fun x y => rfl
 #align sym2.lift Sym2.lift
 
 @[simp]
-theorem lift_mk'' (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
-    lift f ⟦(a₁, a₂)⟧ = (f : α → α → β) a₁ a₂ :=
+theorem lift_mk (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
+    lift f s(a₁, a₂) = (f : α → α → β) a₁ a₂ :=
   rfl
-#align sym2.lift_mk Sym2.lift_mk''
+#align sym2.lift_mk Sym2.lift_mk
 
 @[simp]
 theorem coe_lift_symm_apply (F : Sym2 α → β) (a₁ a₂ : α) :
-    (lift.symm F : α → α → β) a₁ a₂ = F ⟦(a₁, a₂)⟧ :=
+    (lift.symm F : α → α → β) a₁ a₂ = F s(a₁, a₂) :=
   rfl
 #align sym2.coe_lift_symm_apply Sym2.coe_lift_symm_apply
 
@@ -205,12 +227,13 @@ def lift₂ :
       (Sym2 α → Sym2 β → γ)
     where
   toFun f :=
-    Quotient.lift₂ (fun (a : α × α) (b : β × β) => f.1 a.1 a.2 b.1 b.2)
+    Quotient.lift₂ (s₁ := Sym2.Rel.setoid α) (s₂ := Sym2.Rel.setoid β)
+      (fun (a : α × α) (b : β × β) => f.1 a.1 a.2 b.1 b.2)
       (by
         rintro _ _ _ _ ⟨⟩ ⟨⟩
         exacts [rfl, (f.2 _ _ _ _).2, (f.2 _ _ _ _).1, (f.2 _ _ _ _).1.trans (f.2 _ _ _ _).2])
   invFun F :=
-    ⟨fun a₁ a₂ b₁ b₂ => F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧, fun a₁ a₂ b₁ b₂ => by
+    ⟨fun a₁ a₂ b₁ b₂ => F s(a₁, a₂) s(b₁, b₂), fun a₁ a₂ b₁ b₂ => by
       constructor
       exacts [congr_arg₂ F eq_swap rfl, congr_arg₂ F rfl eq_swap]⟩
   left_inv f := Subtype.ext rfl
@@ -218,29 +241,25 @@ def lift₂ :
 #align sym2.lift₂ Sym2.lift₂
 
 @[simp]
-theorem lift₂_mk''
+theorem lift₂_mk
     (f :
     { f : α → α → β → β → γ //
       ∀ a₁ a₂ b₁ b₂, f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ })
-    (a₁ a₂ : α) (b₁ b₂ : β) : lift₂ f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧ = (f : α → α → β → β → γ) a₁ a₂ b₁ b₂ :=
+    (a₁ a₂ : α) (b₁ b₂ : β) : lift₂ f s(a₁, a₂) s(b₁, b₂) = (f : α → α → β → β → γ) a₁ a₂ b₁ b₂ :=
   rfl
-#align sym2.lift₂_mk Sym2.lift₂_mk''
+#align sym2.lift₂_mk Sym2.lift₂_mk
 
 @[simp]
 theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α) (b₁ b₂ : β) :
-    (lift₂.symm F : α → α → β → β → γ) a₁ a₂ b₁ b₂ = F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧ :=
+    (lift₂.symm F : α → α → β → β → γ) a₁ a₂ b₁ b₂ = F s(a₁, a₂) s(b₁, b₂) :=
   rfl
 #align sym2.coe_lift₂_symm_apply Sym2.coe_lift₂_symm_apply
 
 /-- The functor `Sym2` is functorial, and this function constructs the induced maps.
 -/
 def map (f : α → β) : Sym2 α → Sym2 β :=
-  Quotient.map (Prod.map f f)
-    (by
-      intro _ _ h
-      cases h
-      · constructor
-      apply Rel.swap)
+  Quot.map (Prod.map f f)
+    (by intro _ _ h; cases h <;> constructor)
 #align sym2.map Sym2.map
 
 @[simp]
@@ -259,17 +278,14 @@ theorem map_map {g : β → γ} {f : α → β} (x : Sym2 α) : map g (map f x)
 #align sym2.map_map Sym2.map_map
 
 @[simp]
-theorem map_pair_eq (f : α → β) (x y : α) : map f ⟦(x, y)⟧ = ⟦(f x, f y)⟧ :=
+theorem map_pair_eq (f : α → β) (x y : α) : map f s(x, y) = s(f x, f y) :=
   rfl
 #align sym2.map_pair_eq Sym2.map_pair_eq
 
 theorem map.injective {f : α → β} (hinj : Injective f) : Injective (map f) := by
   intro z z'
-  refine' Quotient.ind₂ (fun z z' => _) z z'
-  cases' z with x y
-  cases' z' with x' y'
-  repeat' rw [map_pair_eq, eq_iff]
-  rintro (h | h) <;> simp [hinj h.1, hinj h.2]
+  refine Sym2.inductionOn₂ z z' (fun x y x' y' => ?_)
+  simp [hinj.eq_iff]
 #align sym2.map.injective Sym2.map.injective
 
 section Membership
@@ -282,11 +298,11 @@ symmetric square.  From this point of view, the symmetric square is the subtype
 cardinality-two multisets on `α`.
 -/
 protected def Mem (x : α) (z : Sym2 α) : Prop :=
-  ∃ y : α, z = ⟦(x, y)⟧
+  ∃ y : α, z = s(x, y)
 #align sym2.mem Sym2.Mem
 
 @[aesop norm (rule_sets [Sym2])]
-theorem mem_iff' {a b c : α} : Sym2.Mem a ⟦(b, c)⟧ ↔ a = b ∨ a = c :=
+theorem mem_iff' {a b c : α} : Sym2.Mem a s(b, c) ↔ a = b ∨ a = c :=
   { mp := by
       rintro ⟨_, h⟩
       rw [eq_iff] at h
@@ -314,7 +330,7 @@ theorem mem_iff_mem {x : α} {z : Sym2 α} : Sym2.Mem x z ↔ x ∈ z :=
   Iff.rfl
 #align sym2.mem_iff_mem Sym2.mem_iff_mem
 
-theorem mem_iff_exists {x : α} {z : Sym2 α} : x ∈ z ↔ ∃ y : α, z = ⟦(x, y)⟧ :=
+theorem mem_iff_exists {x : α} {z : Sym2 α} : x ∈ z ↔ ∃ y : α, z = s(x, y) :=
   Iff.rfl
 #align sym2.mem_iff_exists Sym2.mem_iff_exists
 
@@ -323,29 +339,29 @@ theorem ext {p q : Sym2 α} (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q :=
   SetLike.ext h
 #align sym2.ext Sym2.ext
 
-theorem mem_mk''_left (x y : α) : x ∈ (⟦(x, y)⟧ : Sym2 α) :=
+theorem mem_mk_left (x y : α) : x ∈ s(x, y) :=
   ⟨y, rfl⟩
-#align sym2.mem_mk_left Sym2.mem_mk''_left
+#align sym2.mem_mk_left Sym2.mem_mk_left
 
-theorem mem_mk''_right (x y : α) : y ∈ (⟦(x, y)⟧ : Sym2 α) :=
-  eq_swap.subst <| mem_mk''_left y x
-#align sym2.mem_mk_right Sym2.mem_mk''_right
+theorem mem_mk_right (x y : α) : y ∈ s(x, y) :=
+  eq_swap.subst <| mem_mk_left y x
+#align sym2.mem_mk_right Sym2.mem_mk_right
 
 @[simp, aesop norm (rule_sets [Sym2])]
-theorem mem_iff {a b c : α} : a ∈ (⟦(b, c)⟧ : Sym2 α) ↔ a = b ∨ a = c :=
+theorem mem_iff {a b c : α} : a ∈ s(b, c) ↔ a = b ∨ a = c :=
   mem_iff'
 #align sym2.mem_iff Sym2.mem_iff
 
 theorem out_fst_mem (e : Sym2 α) : e.out.1 ∈ e :=
-  ⟨e.out.2, by rw [e.out_eq]⟩
+  ⟨e.out.2, by rw [Sym2.mk, e.out_eq]⟩
 #align sym2.out_fst_mem Sym2.out_fst_mem
 
 theorem out_snd_mem (e : Sym2 α) : e.out.2 ∈ e :=
-  ⟨e.out.1, by rw [eq_swap, e.out_eq]⟩
+  ⟨e.out.1, by rw [eq_swap, Sym2.mk, e.out_eq]⟩
 #align sym2.out_snd_mem Sym2.out_snd_mem
 
-theorem ball {p : α → Prop} {a b : α} : (∀ c ∈ (⟦(a, b)⟧ : Sym2 α), p c) ↔ p a ∧ p b := by
-  refine' ⟨fun h => ⟨h _ <| mem_mk''_left _ _, h _ <| mem_mk''_right _ _⟩, fun h c hc => _⟩
+theorem ball {p : α → Prop} {a b : α} : (∀ c ∈ s(a, b), p c) ↔ p a ∧ p b := by
+  refine' ⟨fun h => ⟨h _ <| mem_mk_left _ _, h _ <| mem_mk_right _ _⟩, fun h c hc => _⟩
   obtain rfl | rfl := Sym2.mem_iff.1 hc
   · exact h.1
   · exact h.2
@@ -359,16 +375,16 @@ noncomputable def Mem.other {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
 #align sym2.mem.other Sym2.Mem.other
 
 @[simp]
-theorem other_spec {a : α} {z : Sym2 α} (h : a ∈ z) : ⟦(a, Mem.other h)⟧ = z := by
+theorem other_spec {a : α} {z : Sym2 α} (h : a ∈ z) : s(a, Mem.other h) = z := by
   erw [← Classical.choose_spec h]
 #align sym2.other_spec Sym2.other_spec
 
 theorem other_mem {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other h ∈ z := by
-  convert mem_mk''_right a <| Mem.other h
+  convert mem_mk_right a <| Mem.other h
   rw [other_spec h]
 #align sym2.other_mem Sym2.other_mem
 
-theorem mem_and_mem_iff {x y : α} {z : Sym2 α} (hne : x ≠ y) : x ∈ z ∧ y ∈ z ↔ z = ⟦(x, y)⟧ := by
+theorem mem_and_mem_iff {x y : α} {z : Sym2 α} (hne : x ≠ y) : x ∈ z ∧ y ∈ z ↔ z = s(x, y) := by
   constructor
   · induction' z using Sym2.ind with x' y'
     rw [mem_iff, mem_iff]
@@ -383,7 +399,7 @@ theorem eq_of_ne_mem {x y : α} {z z' : Sym2 α} (h : x ≠ y) (h1 : x ∈ z) (h
 #align sym2.eq_of_ne_mem Sym2.eq_of_ne_mem
 
 instance Mem.decidable [DecidableEq α] (x : α) (z : Sym2 α) : Decidable (x ∈ z) :=
-  Quotient.recOnSubsingleton z fun ⟨_, _⟩ => decidable_of_iff' _ mem_iff
+  z.recOnSubsingleton fun ⟨_, _⟩ => decidable_of_iff' _ mem_iff
 #align sym2.mem.decidable Sym2.Mem.decidable
 
 end Membership
@@ -391,12 +407,8 @@ end Membership
 @[simp]
 theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔ ∃ a, a ∈ z ∧ f a = b := by
   induction' z using Sym2.ind with x y
-  simp only [map, Quotient.map_mk, Prod.map_mk, mem_iff]
-  constructor
-  · rintro (rfl | rfl)
-    · exact ⟨x, by simp⟩
-    · exact ⟨y, by simp⟩
-  · rintro ⟨w, rfl | rfl, rfl⟩ <;> simp
+  simp only [map_pair_eq, mem_iff, exists_eq_or_imp, exists_eq_left]
+  aesop
 #align sym2.mem_map Sym2.mem_map
 
 @[congr]
@@ -421,12 +433,11 @@ variable {e : Sym2 α} {f : α → β}
 /-- A type `α` is naturally included in the diagonal of `α × α`, and this function gives the image
 of this diagonal in `Sym2 α`.
 -/
-def diag (x : α) : Sym2 α :=
-  ⟦(x, x)⟧
+def diag (x : α) : Sym2 α := s(x, x)
 #align sym2.diag Sym2.diag
 
 theorem diag_injective : Function.Injective (Sym2.diag : α → Sym2 α) := fun x y h => by
-  cases Quotient.exact h <;> rfl
+  cases Sym2.exact h <;> rfl
 #align sym2.diag_injective Sym2.diag_injective
 
 /-- A predicate for testing whether an element of `Sym2 α` is on the diagonal.
@@ -435,13 +446,13 @@ def IsDiag : Sym2 α → Prop :=
   lift ⟨Eq, fun _ _ => propext eq_comm⟩
 #align sym2.is_diag Sym2.IsDiag
 
-theorem mk''_isDiag_iff {x y : α} : IsDiag ⟦(x, y)⟧ ↔ x = y :=
+theorem mk_isDiag_iff {x y : α} : IsDiag s(x, y) ↔ x = y :=
   Iff.rfl
-#align sym2.mk_is_diag_iff Sym2.mk''_isDiag_iff
+#align sym2.mk_is_diag_iff Sym2.mk_isDiag_iff
 
 @[simp]
-theorem isDiag_iff_proj_eq (z : α × α) : IsDiag ⟦z⟧ ↔ z.1 = z.2 :=
-  Prod.recOn z fun _ _ => mk''_isDiag_iff
+theorem isDiag_iff_proj_eq (z : α × α) : IsDiag (Sym2.mk z) ↔ z.1 = z.2 :=
+  Prod.recOn z fun _ _ => mk_isDiag_iff
 #align sym2.is_diag_iff_proj_eq Sym2.isDiag_iff_proj_eq
 
 protected lemma IsDiag.map : e.IsDiag → (e.map f).IsDiag := Sym2.ind (fun _ _ ↦ congr_arg f) e
@@ -464,10 +475,8 @@ theorem isDiag_iff_mem_range_diag (z : Sym2 α) : IsDiag z ↔ z ∈ Set.range (
   ⟨IsDiag.mem_range_diag, fun ⟨i, hi⟩ => hi ▸ diag_isDiag i⟩
 #align sym2.is_diag_iff_mem_range_diag Sym2.isDiag_iff_mem_range_diag
 
-instance IsDiag.decidablePred (α : Type u) [DecidableEq α] : DecidablePred (@IsDiag α) := by
-  refine' fun z => Quotient.recOnSubsingleton z fun a => _
-  erw [isDiag_iff_proj_eq]
-  infer_instance
+instance IsDiag.decidablePred (α : Type u) [DecidableEq α] : DecidablePred (@IsDiag α) :=
+  fun z => z.recOnSubsingleton fun a => decidable_of_iff' _ (isDiag_iff_proj_eq a)
 #align sym2.is_diag.decidable_pred Sym2.IsDiag.decidablePred
 
 theorem other_ne {a : α} {z : Sym2 α} (hd : ¬IsDiag z) (h : a ∈ z) : Mem.other h ≠ a := by
@@ -493,13 +502,11 @@ def fromRel (sym : Symmetric r) : Set (Sym2 α) :=
 #align sym2.from_rel Sym2.fromRel
 
 @[simp]
-theorem fromRel_proj_prop {sym : Symmetric r} {z : α × α} : ⟦z⟧ ∈ fromRel sym ↔ r z.1 z.2 :=
+theorem fromRel_proj_prop {sym : Symmetric r} {z : α × α} : Sym2.mk z ∈ fromRel sym ↔ r z.1 z.2 :=
   Iff.rfl
 #align sym2.from_rel_proj_prop Sym2.fromRel_proj_prop
 
--- porting note: commenting out `simp`, `simp` can prove it
--- @[simp]
-theorem fromRel_prop {sym : Symmetric r} {a b : α} : ⟦(a, b)⟧ ∈ fromRel sym ↔ r a b :=
+theorem fromRel_prop {sym : Symmetric r} {a b : α} : s(a, b) ∈ fromRel sym ↔ r a b :=
   Iff.rfl
 #align sym2.from_rel_prop Sym2.fromRel_prop
 
@@ -530,17 +537,17 @@ theorem mem_fromRel_irrefl_other_ne {sym : Symmetric r} (irrefl : Irreflexive r)
 #align sym2.mem_from_rel_irrefl_other_ne Sym2.mem_fromRel_irrefl_other_ne
 
 instance fromRel.decidablePred (sym : Symmetric r) [h : DecidableRel r] :
-    DecidablePred (· ∈ Sym2.fromRel sym) := fun z => Quotient.recOnSubsingleton z fun _ => h _ _
+    DecidablePred (· ∈ Sym2.fromRel sym) := fun z => z.recOnSubsingleton fun _ => h _ _
 #align sym2.from_rel.decidable_pred Sym2.fromRel.decidablePred
 
 /-- The inverse to `Sym2.fromRel`. Given a set on `Sym2 α`, give a symmetric relation on `α`
 (see `Sym2.toRel_symmetric`). -/
 def ToRel (s : Set (Sym2 α)) (x y : α) : Prop :=
-  ⟦(x, y)⟧ ∈ s
+  s(x, y) ∈ s
 #align sym2.to_rel Sym2.ToRel
 
 @[simp]
-theorem toRel_prop (s : Set (Sym2 α)) (x y : α) : ToRel s x y ↔ ⟦(x, y)⟧ ∈ s :=
+theorem toRel_prop (s : Set (Sym2 α)) (x y : α) : ToRel s x y ↔ s(x, y) ∈ s :=
   Iff.rfl
 #align sym2.to_rel_prop Sym2.toRel_prop
 
@@ -566,7 +573,6 @@ attribute [local instance] Vector.Perm.isSetoid
 
 private def fromVector : Vector α 2 → α × α
   | ⟨[a, b], _⟩ => (a, b)
--- porting note: remove alignment for private definition
 
 private theorem perm_card_two_iff {a₁ b₁ a₂ b₂ : α} :
     [a₁, b₁].Perm [a₂, b₂] ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂ :=
@@ -579,21 +585,19 @@ private theorem perm_card_two_iff {a₁ b₁ a₂ b₂ : α} :
         | .inl ⟨h₁, h₂⟩ | .inr ⟨h₁, h₂⟩ => by
           rw [h₁, h₂]
           first | done | apply List.Perm.swap'; rfl }
--- porting note: remove alignment for private theorem
 
-/-- The symmetric square is equivalent to length-2 vectors up to permutations.
--/
+/-- The symmetric square is equivalent to length-2 vectors up to permutations. -/
 def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
     where
   toFun :=
-    Quotient.map (fun x : α × α => ⟨[x.1, x.2], rfl⟩)
+    Quot.map (fun x : α × α => ⟨[x.1, x.2], rfl⟩)
       (by
         rintro _ _ ⟨_⟩
         · constructor; apply List.Perm.refl
         apply List.Perm.swap'
         rfl)
   invFun :=
-    Quotient.map fromVector
+    Quot.map fromVector
       (by
         rintro ⟨x, hx⟩ ⟨y, hy⟩ h
         cases' x with _ x; · simp at hx
@@ -611,7 +615,7 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
         apply Sym2.Rel.swap)
   left_inv := by apply Sym2.ind; aesop (add norm unfold [Sym2.fromVector])
   right_inv x := by
-    refine' Quotient.recOnSubsingleton x fun x => _
+    refine' x.recOnSubsingleton fun x => _
     · cases' x with x hx
       cases' x with _ x
       · simp at hx
@@ -624,16 +628,14 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
       rfl
 #align sym2.sym2_equiv_sym' Sym2.sym2EquivSym'
 
-/-- The symmetric square is equivalent to the second symmetric power.
--/
+/-- The symmetric square is equivalent to the second symmetric power. -/
 def equivSym (α : Type*) : Sym2 α ≃ Sym α 2 :=
   Equiv.trans sym2EquivSym' symEquivSym'.symm
 #align sym2.equiv_sym Sym2.equivSym
 
 /-- The symmetric square is equivalent to multisets of cardinality
 two. (This is currently a synonym for `equivSym`, but it's provided
-in case the definition for `Sym` changes.)
--/
+in case the definition for `Sym` changes.) -/
 def equivMultiset (α : Type*) : Sym2 α ≃ { s : Multiset α // Multiset.card s = 2 } :=
   equivSym α
 #align sym2.equiv_multiset Sym2.equivMultiset
@@ -650,11 +652,16 @@ section Decidable
 instance instDecidableRel [DecidableEq α] : DecidableRel (Rel α) :=
   fun _ _ => decidable_of_iff' _ rel_iff
 
+section
+attribute [local instance] Sym2.Rel.setoid
+
 instance instDecidableRel' [DecidableEq α] : DecidableRel (HasEquiv.Equiv (α := α × α)) :=
   instDecidableRel
 
--- the `Equiv` version above is needed for this
-example [DecidableEq α] : DecidableEq (Sym2 α) := inferInstance
+end
+
+instance [DecidableEq α] : DecidableEq (Sym2 α) :=
+  inferInstanceAs <| DecidableEq (Quotient (Sym2.Rel.setoid α))
 
 /-! ### The other element of an element of the symmetric square -/
 
@@ -665,19 +672,18 @@ A function that gives the other element of a pair given one of the elements.  Us
 @[aesop norm unfold (rule_sets [Sym2])]
 private def pairOther [DecidableEq α] (a : α) (z : α × α) : α :=
   if a = z.1 then z.2 else z.1
--- porting note: remove align for private def
+
 
 /-- Get the other element of the unordered pair using the decidable equality.
-This is the computable version of `Mem.other`.
--/
+This is the computable version of `Mem.other`. -/
 @[aesop norm unfold (rule_sets [Sym2])]
 def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
-  Quotient.rec (fun s _ => pairOther a s) (by
+  Sym2.rec (fun s _ => pairOther a s) (by
     clear h z
     intro x y h
     ext hy
     convert_to Sym2.pairOther a x = _
-    · have : ∀ {c e h}, @Eq.ndrec (Quotient (Rel.setoid α)) (Quotient.mk (Rel.setoid α) x)
+    · have : ∀ {c e h}, @Eq.ndrec (Sym2 α) (Sym2.mk x)
           (fun x => a ∈ x → α) (fun _ => Sym2.pairOther a x) c e h = Sym2.pairOther a x := by
           intro _ e _; subst e; rfl
       apply this
@@ -687,10 +693,10 @@ def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
 #align sym2.mem.other' Sym2.Mem.other'
 
 @[simp]
-theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : ⟦(a, Mem.other' h)⟧ = z := by
+theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : s(a, Mem.other' h) = z := by
   induction z using Sym2.ind
   have h' := mem_iff.mp h
-  aesop (add norm unfold [Quotient.rec, Quot.rec]) (rule_sets [Sym2])
+  aesop (add norm unfold [Sym2.rec, Quot.rec]) (rule_sets [Sym2])
 #align sym2.other_spec' Sym2.other_spec'
 
 @[simp]
@@ -706,7 +712,7 @@ theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.o
 theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other' ha ∈ z) :
     Mem.other' hb = a := by
   induction z using Sym2.ind
-  aesop (rule_sets [Sym2]) (add norm unfold [Quotient.rec, Quot.rec])
+  aesop (rule_sets [Sym2]) (add norm unfold [Sym2.rec, Quot.rec])
 #align sym2.other_invol' Sym2.other_invol'
 
 theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈ z) : Mem.other hb = a :=
@@ -716,34 +722,34 @@ theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈
     apply other_eq_other'
 #align sym2.other_invol Sym2.other_invol
 
-theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
-    ((s ×ˢ s).image Quotient.mk'').filter IsDiag = s.diag.image Quotient.mk'' := by
+theorem filter_image_mk_isDiag [DecidableEq α] (s : Finset α) :
+    ((s ×ˢ s).image Sym2.mk).filter IsDiag = s.diag.image Sym2.mk := by
   ext z
   induction' z using Sym2.inductionOn
   simp only [mem_image, mem_diag, exists_prop, mem_filter, Prod.exists, mem_product]
   constructor
-  · rintro ⟨⟨a, b, ⟨ha, hb⟩, (h : Quotient.mk _ _ = _)⟩, hab⟩
-    rw [← h, Sym2.mk''_isDiag_iff] at hab
+  · rintro ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
+    rw [← h, Sym2.mk_isDiag_iff] at hab
     exact ⟨a, b, ⟨ha, hab⟩, h⟩
   · rintro ⟨a, b, ⟨ha, rfl⟩, h⟩
     rw [← h]
     exact ⟨⟨a, a, ⟨ha, ha⟩, rfl⟩, rfl⟩
-#align sym2.filter_image_quotient_mk_is_diag Sym2.filter_image_quotient_mk''_isDiag
+#align sym2.filter_image_quotient_mk_is_diag Sym2.filter_image_mk_isDiag
 
-theorem filter_image_quotient_mk''_not_isDiag [DecidableEq α] (s : Finset α) :
-    (((s ×ˢ s).image Quotient.mk'').filter fun a : Sym2 α => ¬a.IsDiag) =
-      s.offDiag.image Quotient.mk'' := by
+theorem filter_image_mk_not_isDiag [DecidableEq α] (s : Finset α) :
+    (((s ×ˢ s).image Sym2.mk).filter fun a : Sym2 α => ¬a.IsDiag) =
+      s.offDiag.image Sym2.mk := by
   ext z
   induction z using Sym2.inductionOn
   simp only [mem_image, mem_offDiag, mem_filter, Prod.exists, mem_product]
   constructor
-  · rintro ⟨⟨a, b, ⟨ha, hb⟩, (h : Quotient.mk _ _ = _)⟩, hab⟩
-    rw [← h, Sym2.mk''_isDiag_iff] at hab
+  · rintro ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
+    rw [← h, Sym2.mk_isDiag_iff] at hab
     exact ⟨a, b, ⟨ha, hb, hab⟩, h⟩
-  · rintro ⟨a, b, ⟨ha, hb, hab⟩, (h : Quotient.mk _ _ = _)⟩
-    rw [Ne.def, ← Sym2.mk''_isDiag_iff, h] at hab
+  · rintro ⟨a, b, ⟨ha, hb, hab⟩, h⟩
+    rw [Ne.def, ← Sym2.mk_isDiag_iff, h] at hab
     exact ⟨⟨a, b, ⟨ha, hb⟩, h⟩, hab⟩
-#align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_quotient_mk''_not_isDiag
+#align sym2.filter_image_quotient_mk_not_is_diag Sym2.filter_image_mk_not_isDiag
 
 end Decidable
 
chore: space after (#8178)

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

Diff
@@ -571,7 +571,7 @@ private def fromVector : Vector α 2 → α × α
 private theorem perm_card_two_iff {a₁ b₁ a₂ b₂ : α} :
     [a₁, b₁].Perm [a₂, b₂] ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂ :=
   { mp := by
-      simp only [←Multiset.coe_eq_coe, ←Multiset.cons_coe, Multiset.coe_nil, Multiset.cons_zero,
+      simp only [← Multiset.coe_eq_coe, ← Multiset.cons_coe, Multiset.coe_nil, Multiset.cons_zero,
         Multiset.cons_eq_cons, Multiset.singleton_inj, ne_eq, Multiset.singleton_eq_cons_iff,
         exists_eq_right_right, and_true]
       tauto
feat: number of edges in a complete graph (#8631)
Diff
@@ -515,6 +515,9 @@ theorem fromRel_top : fromRel (fun (x y : α) z => z : Symmetric ⊤) = Set.univ
   simp [-Set.top_eq_univ, Prop.top_eq_true]
 #align sym2.from_rel_top Sym2.fromRel_top
 
+theorem fromRel_ne : fromRel (fun (x y : α) z => z.symm : Symmetric Ne) = {z | ¬IsDiag z} := by
+  ext z; exact z.ind (by simp)
+
 theorem fromRel_irreflexive {sym : Symmetric r} :
     Irreflexive r ↔ ∀ {z}, z ∈ fromRel sym → ¬IsDiag z :=
   { mp := by intro h; apply Sym2.ind; aesop
feat: Diagonality of Sym2.map (#8183)
Diff
@@ -416,6 +416,7 @@ theorem map_id' : (map fun x : α => x) = id :=
 
 /-! ### Diagonal -/
 
+variable {e : Sym2 α} {f : α → β}
 
 /-- A type `α` is naturally included in the diagonal of `α × α`, and this function gives the image
 of this diagonal in `Sym2 α`.
@@ -443,6 +444,11 @@ theorem isDiag_iff_proj_eq (z : α × α) : IsDiag ⟦z⟧ ↔ z.1 = z.2 :=
   Prod.recOn z fun _ _ => mk''_isDiag_iff
 #align sym2.is_diag_iff_proj_eq Sym2.isDiag_iff_proj_eq
 
+protected lemma IsDiag.map : e.IsDiag → (e.map f).IsDiag := Sym2.ind (fun _ _ ↦ congr_arg f) e
+
+lemma isDiag_map (hf : Injective f) : (e.map f).IsDiag ↔ e.IsDiag :=
+  Sym2.ind (fun _ _ ↦ hf.eq_iff) e
+
 @[simp]
 theorem diag_isDiag (a : α) : IsDiag (diag a) :=
   Eq.refl a
refactor(Data/Sym/Sym2): simplify decidability instances (#8020)

There shouldn't be any need for a custom boolean algorithm here, typeclass search can find it.

Removes a porting comment from #1805 about boolEq, which isn't needed after all.

Diff
@@ -633,39 +633,19 @@ end SymEquiv
 
 section Decidable
 
-/-- An algorithm for computing `Sym2.Rel`.
--/
-@[aesop norm unfold (rule_sets [Sym2])]
-def relBool [DecidableEq α] (x y : α × α) : Bool :=
-  if x.1 = y.1 then x.2 = y.2 else if x.1 = y.2 then x.2 = y.1 else false
-#align sym2.rel_bool Sym2.relBool
-
-@[aesop norm (rule_sets [Sym2])]
-theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Rel α x y := by
-  cases' x with x₁ x₂; cases' y with y₁ y₂
-  aesop (rule_sets [Sym2]) (add norm unfold [relBool])
-#align sym2.rel_bool_spec Sym2.relBool_spec
+#noalign sym2.rel_bool
+#noalign sym2.rel_bool_spec
 
 /-- Given `[DecidableEq α]` and `[Fintype α]`, the following instance gives `Fintype (Sym2 α)`.
 -/
-instance instRelDecidable (α : Type*) [DecidableEq α] : DecidableRel (Sym2.Rel α) := fun x y =>
-  decidable_of_bool (relBool x y) (relBool_spec x y)
--- Porting note: add this other version needed for Data.Finset.Sym
-instance instRelDecidable' (α : Type*) [DecidableEq α] :
-  DecidableRel (· ≈ · : α × α → α × α → Prop) := instRelDecidable _
-
--- porting note: extra definitions and lemmas for proving decidable equality in `Sym2`
-/-- An algorithm for deciding equality in `Sym2 α`. -/
-@[aesop norm unfold (rule_sets [Sym2])]
-def eqBool [DecidableEq α] : Sym2 α → Sym2 α → Bool :=
-  Sym2.lift₂.toFun
-    ⟨fun x₁ x₂ y₁ y₂ => relBool (x₁, x₂) (y₁, y₂), by aesop (add norm unfold [relBool])⟩
-
-@[aesop norm (rule_sets [Sym2])]
-theorem eqBool_spec [DecidableEq α] (a b : Sym2 α) : (eqBool a b) ↔ (a = b) :=
-  Sym2.inductionOn₂ a b <| by aesop (rule_sets [Sym2])
+instance instDecidableRel [DecidableEq α] : DecidableRel (Rel α) :=
+  fun _ _ => decidable_of_iff' _ rel_iff
 
+instance instDecidableRel' [DecidableEq α] : DecidableRel (HasEquiv.Equiv (α := α × α)) :=
+  instDecidableRel
 
+-- the `Equiv` version above is needed for this
+example [DecidableEq α] : DecidableEq (Sym2 α) := inferInstance
 
 /-! ### The other element of an element of the symmetric square -/
 
@@ -693,8 +673,7 @@ def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
           intro _ e _; subst e; rfl
       apply this
     · rw [mem_iff] at hy
-      have : relBool x y := (relBool_spec x y).mpr h
-      aesop (add norm unfold [pairOther, relBool]))
+      aesop (add norm unfold [pairOther]))
     z h
 #align sym2.mem.other' Sym2.Mem.other'
 
chore: bump aesop (#8011)

This requires removing some rules that aesop rejects. They aren't needed, and in fact I think were never doing anything?

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -60,7 +60,7 @@ namespace Sym2
 
 /-- This is the relation capturing the notion of pairs equivalent up to permutations.
 -/
-@[aesop (rule_sets [Sym2]) [safe [constructors, cases], norm unfold]]
+@[aesop (rule_sets [Sym2]) [safe [constructors, cases], norm]]
 inductive Rel (α : Type u) : α × α → α × α → Prop
   | refl (x y : α) : Rel _ (x, y) (x, y)
   | swap (x y : α) : Rel _ (x, y) (y, x)
@@ -640,7 +640,7 @@ def relBool [DecidableEq α] (x y : α × α) : Bool :=
   if x.1 = y.1 then x.2 = y.2 else if x.1 = y.2 then x.2 = y.1 else false
 #align sym2.rel_bool Sym2.relBool
 
-@[aesop norm unfold (rule_sets [Sym2])]
+@[aesop norm (rule_sets [Sym2])]
 theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Rel α x y := by
   cases' x with x₁ x₂; cases' y with y₁ y₂
   aesop (rule_sets [Sym2]) (add norm unfold [relBool])
@@ -661,7 +661,7 @@ def eqBool [DecidableEq α] : Sym2 α → Sym2 α → Bool :=
   Sym2.lift₂.toFun
     ⟨fun x₁ x₂ y₁ y₂ => relBool (x₁, x₂) (y₁, y₂), by aesop (add norm unfold [relBool])⟩
 
-@[aesop norm unfold (rule_sets [Sym2])]
+@[aesop norm (rule_sets [Sym2])]
 theorem eqBool_spec [DecidableEq α] (a b : Sym2 α) : (eqBool a b) ↔ (a = b) :=
   Sym2.inductionOn₂ a b <| by aesop (rule_sets [Sym2])
 
chore: remove nonterminal simp (#7580)

Removes nonterminal simps on lines looking like simp [...]

Diff
@@ -562,8 +562,10 @@ private def fromVector : Vector α 2 → α × α
 private theorem perm_card_two_iff {a₁ b₁ a₂ b₂ : α} :
     [a₁, b₁].Perm [a₂, b₂] ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂ :=
   { mp := by
-      simp [← Multiset.coe_eq_coe, ← Multiset.cons_coe, Multiset.cons_eq_cons]
-      aesop
+      simp only [←Multiset.coe_eq_coe, ←Multiset.cons_coe, Multiset.coe_nil, Multiset.cons_zero,
+        Multiset.cons_eq_cons, Multiset.singleton_inj, ne_eq, Multiset.singleton_eq_cons_iff,
+        exists_eq_right_right, and_true]
+      tauto
     mpr := fun
         | .inl ⟨h₁, h₂⟩ | .inr ⟨h₁, h₂⟩ => by
           rw [h₁, h₂]
chore: exactly 4 spaces in theorems (#7328)

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

Diff
@@ -219,10 +219,10 @@ def lift₂ :
 
 @[simp]
 theorem lift₂_mk''
-  (f :
+    (f :
     { f : α → α → β → β → γ //
       ∀ a₁ a₂ b₁ b₂, f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ })
-  (a₁ a₂ : α) (b₁ b₂ : β) : lift₂ f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧ = (f : α → α → β → β → γ) a₁ a₂ b₁ b₂ :=
+    (a₁ a₂ : α) (b₁ b₂ : β) : lift₂ f ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧ = (f : α → α → β → β → γ) a₁ a₂ b₁ b₂ :=
   rfl
 #align sym2.lift₂_mk Sym2.lift₂_mk''
 
chore: only four spaces for subsequent lines (#7286)

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

Diff
@@ -705,7 +705,7 @@ theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : ⟦(
 
 @[simp]
 theorem other_eq_other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) :
-  Mem.other h = Mem.other' h := by rw [← congr_right, other_spec' h, other_spec]
+    Mem.other h = Mem.other' h := by rw [← congr_right, other_spec' h, other_spec]
 #align sym2.other_eq_other' Sym2.other_eq_other'
 
 theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other' h ∈ z := by
chore: fix port of surjective_quotient_mk (#7096)

The mathlib3 lemma is about quotient.mk, which takes an instance argument and is translated into mathlib4 as Quotient.mk'.

Diff
@@ -127,13 +127,13 @@ protected theorem inductionOn₂ {f : Sym2 α → Sym2 β → Prop} (i : Sym2 α
 -- porting note: `exists` seems to be an invalid identifier
 protected theorem «exists» {α : Sort _} {f : Sym2 α → Prop} :
     (∃ x : Sym2 α, f x) ↔ ∃ x y, f ⟦(x, y)⟧ :=
-  (surjective_quotient_mk _).exists.trans Prod.exists
+  (surjective_quotient_mk' _).exists.trans Prod.exists
 #align sym2.exists Sym2.exists
 
 -- porting note: `forall` seems to be an invalid identifier
 protected theorem «forall» {α : Sort _} {f : Sym2 α → Prop} :
     (∀ x : Sym2 α, f x) ↔ ∀ x y, f ⟦(x, y)⟧ :=
-  (surjective_quotient_mk _).forall.trans Prod.forall
+  (surjective_quotient_mk' _).forall.trans Prod.forall
 #align sym2.forall Sym2.forall
 
 -- porting note: The `⟦⟧` notation does not infer the setoid structure automatically
chore: cleanup Mathlib.Init.Data.Prod (#6972)

Removing from Mathlib.Init.Data.Prod from the early parts of the import hierarchy.

While at it, remove unnecessary uses of Prod.mk.eta across the library.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -337,11 +337,11 @@ theorem mem_iff {a b c : α} : a ∈ (⟦(b, c)⟧ : Sym2 α) ↔ a = b ∨ a =
 #align sym2.mem_iff Sym2.mem_iff
 
 theorem out_fst_mem (e : Sym2 α) : e.out.1 ∈ e :=
-  ⟨e.out.2, by rw [Prod.mk.eta, e.out_eq]⟩
+  ⟨e.out.2, by rw [e.out_eq]⟩
 #align sym2.out_fst_mem Sym2.out_fst_mem
 
 theorem out_snd_mem (e : Sym2 α) : e.out.2 ∈ e :=
-  ⟨e.out.1, by rw [eq_swap, Prod.mk.eta, e.out_eq]⟩
+  ⟨e.out.1, by rw [eq_swap, e.out_eq]⟩
 #align sym2.out_snd_mem Sym2.out_snd_mem
 
 theorem ball {p : α → Prop} {a b : α} : (∀ c ∈ (⟦(a, b)⟧ : Sym2 α), p c) ↔ p a ∧ p b := by
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
@@ -54,7 +54,7 @@ open Finset Function Sym
 
 universe u
 
-variable {α β γ : Type _}
+variable {α β γ : Type*}
 
 namespace Sym2
 
@@ -615,7 +615,7 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
 
 /-- The symmetric square is equivalent to the second symmetric power.
 -/
-def equivSym (α : Type _) : Sym2 α ≃ Sym α 2 :=
+def equivSym (α : Type*) : Sym2 α ≃ Sym α 2 :=
   Equiv.trans sym2EquivSym' symEquivSym'.symm
 #align sym2.equiv_sym Sym2.equivSym
 
@@ -623,7 +623,7 @@ def equivSym (α : Type _) : Sym2 α ≃ Sym α 2 :=
 two. (This is currently a synonym for `equivSym`, but it's provided
 in case the definition for `Sym` changes.)
 -/
-def equivMultiset (α : Type _) : Sym2 α ≃ { s : Multiset α // Multiset.card s = 2 } :=
+def equivMultiset (α : Type*) : Sym2 α ≃ { s : Multiset α // Multiset.card s = 2 } :=
   equivSym α
 #align sym2.equiv_multiset Sym2.equivMultiset
 
@@ -646,10 +646,10 @@ theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Re
 
 /-- Given `[DecidableEq α]` and `[Fintype α]`, the following instance gives `Fintype (Sym2 α)`.
 -/
-instance instRelDecidable (α : Type _) [DecidableEq α] : DecidableRel (Sym2.Rel α) := fun x y =>
+instance instRelDecidable (α : Type*) [DecidableEq α] : DecidableRel (Sym2.Rel α) := fun x y =>
   decidable_of_bool (relBool x y) (relBool_spec x y)
 -- Porting note: add this other version needed for Data.Finset.Sym
-instance instRelDecidable' (α : Type _) [DecidableEq α] :
+instance instRelDecidable' (α : Type*) [DecidableEq α] :
   DecidableRel (· ≈ · : α × α → α × α → Prop) := instRelDecidable _
 
 -- porting note: extra definitions and lemmas for proving decidable equality in `Sym2`
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,17 +2,14 @@
 Copyright (c) 2020 Kyle Miller All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kyle Miller
-
-! This file was ported from Lean 3 source module data.sym.sym2
-! leanprover-community/mathlib commit 8631e2d5ea77f6c13054d9151d82b83069680cb1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Finset.Prod
 import Mathlib.Data.Sym.Basic
 import Mathlib.Data.Sym.Sym2.Init
 import Mathlib.Data.SetLike.Basic
 
+#align_import data.sym.sym2 from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
+
 /-!
 # The symmetric square
 
chore: remove a few superfluous semicolons (#5880)

Alongside any necessary spacing/flow changes to accommodate their removal.

Diff
@@ -240,7 +240,7 @@ theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α)
 def map (f : α → β) : Sym2 α → Sym2 β :=
   Quotient.map (Prod.map f f)
     (by
-      intro _ _ h;
+      intro _ _ h
       cases h
       · constructor
       apply Rel.swap)
@@ -590,12 +590,12 @@ def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2)
         rintro ⟨x, hx⟩ ⟨y, hy⟩ h
         cases' x with _ x; · simp at hx
         cases' x with _ x; · simp at hx
-        cases' x with _ x; swap;
+        cases' x with _ x; swap
         · exfalso
           simp at hx
         cases' y with _ y; · simp at hy
         cases' y with _ y; · simp at hy
-        cases' y with _ y; swap;
+        cases' y with _ y; swap
         · exfalso
           simp at hy
         rcases perm_card_two_iff.mp h with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -724,7 +724,7 @@ theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb
 
 theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈ z) : Mem.other hb = a :=
   by classical
-    rw [other_eq_other'] at hb⊢
+    rw [other_eq_other'] at hb ⊢
     convert other_invol' ha hb using 2
     apply other_eq_other'
 #align sym2.other_invol Sym2.other_invol
chore: add space after exacts (#4945)

Too often tempted to change these during other PRs, so doing a mass edit here.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -183,7 +183,7 @@ def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }
   toFun f :=
     Quotient.lift (uncurry ↑f) <| by
       rintro _ _ ⟨⟩
-      exacts[rfl, f.prop _ _]
+      exacts [rfl, f.prop _ _]
   invFun F := ⟨curry (F ∘ Quotient.mk''), fun a₁ a₂ => congr_arg F eq_swap⟩
   left_inv f := Subtype.ext rfl
   right_inv F := funext <| Sym2.ind fun x y => rfl
@@ -211,11 +211,11 @@ def lift₂ :
     Quotient.lift₂ (fun (a : α × α) (b : β × β) => f.1 a.1 a.2 b.1 b.2)
       (by
         rintro _ _ _ _ ⟨⟩ ⟨⟩
-        exacts[rfl, (f.2 _ _ _ _).2, (f.2 _ _ _ _).1, (f.2 _ _ _ _).1.trans (f.2 _ _ _ _).2])
+        exacts [rfl, (f.2 _ _ _ _).2, (f.2 _ _ _ _).1, (f.2 _ _ _ _).1.trans (f.2 _ _ _ _).2])
   invFun F :=
     ⟨fun a₁ a₂ b₁ b₂ => F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧, fun a₁ a₂ b₁ b₂ => by
       constructor
-      exacts[congr_arg₂ F eq_swap rfl, congr_arg₂ F rfl eq_swap]⟩
+      exacts [congr_arg₂ F eq_swap rfl, congr_arg₂ F rfl eq_swap]⟩
   left_inv f := Subtype.ext rfl
   right_inv F := funext₂ fun a b => Sym2.inductionOn₂ a b fun _ _ _ _ => rfl
 #align sym2.lift₂ Sym2.lift₂
refactor: use the typeclass SProd to implement overloaded notation · ×ˢ · (#4200)

Currently, the following notations are changed from · ×ˢ · because Lean 4 can't deal with ambiguous notations. | Definition | Notation | | :

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Chris Hughes <chrishughes24@gmail.com>

Diff
@@ -729,9 +729,8 @@ theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈
     apply other_eq_other'
 #align sym2.other_invol Sym2.other_invol
 
--- porting note: updating `×ˢ` to the new notation `×ᶠ`
 theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
-    ((s ×ᶠ s).image Quotient.mk'').filter IsDiag = s.diag.image Quotient.mk'' := by
+    ((s ×ˢ s).image Quotient.mk'').filter IsDiag = s.diag.image Quotient.mk'' := by
   ext z
   induction' z using Sym2.inductionOn
   simp only [mem_image, mem_diag, exists_prop, mem_filter, Prod.exists, mem_product]
@@ -744,9 +743,8 @@ theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
     exact ⟨⟨a, a, ⟨ha, ha⟩, rfl⟩, rfl⟩
 #align sym2.filter_image_quotient_mk_is_diag Sym2.filter_image_quotient_mk''_isDiag
 
--- porting note: updating `×ˢ` to the new notation `×ᶠ`
 theorem filter_image_quotient_mk''_not_isDiag [DecidableEq α] (s : Finset α) :
-    (((s ×ᶠ s).image Quotient.mk'').filter fun a : Sym2 α => ¬a.IsDiag) =
+    (((s ×ˢ s).image Quotient.mk'').filter fun a : Sym2 α => ¬a.IsDiag) =
       s.offDiag.image Quotient.mk'' := by
   ext z
   induction z using Sym2.inductionOn
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -140,29 +140,25 @@ protected theorem «forall» {α : Sort _} {f : Sym2 α → Prop} :
 #align sym2.forall Sym2.forall
 
 -- porting note: The `⟦⟧` notation does not infer the setoid structure automatically
-theorem eq_swap {a b : α} : Eq (α := Sym2 α) ⟦(a, b)⟧ ⟦(b, a)⟧ :=
-  by
+theorem eq_swap {a b : α} : Eq (α := Sym2 α) ⟦(a, b)⟧ ⟦(b, a)⟧ := by
   rw [Quotient.eq]
   apply Rel.swap
 #align sym2.eq_swap Sym2.eq_swap
 
 @[simp]
-theorem mk''_prod_swap_eq {p : α × α} : Eq (α := Sym2 α) ⟦p.swap⟧ ⟦p⟧ :=
-  by
+theorem mk''_prod_swap_eq {p : α × α} : Eq (α := Sym2 α) ⟦p.swap⟧ ⟦p⟧ := by
   cases p
   exact eq_swap
 #align sym2.mk_prod_swap_eq Sym2.mk''_prod_swap_eq
 
-theorem congr_right {a b c : α} : Eq (α := Sym2 α) ⟦(a, b)⟧ ⟦(a, c)⟧ ↔ b = c :=
-  by
+theorem congr_right {a b c : α} : Eq (α := Sym2 α) ⟦(a, b)⟧ ⟦(a, c)⟧ ↔ b = c := by
   constructor <;> intro h
   · rw [Quotient.eq] at h
     cases h <;> rfl
   rw [h]
 #align sym2.congr_right Sym2.congr_right
 
-theorem congr_left {a b c : α} : Eq (α := Sym2 α) ⟦(b, a)⟧ ⟦(c, a)⟧ ↔ b = c :=
-  by
+theorem congr_left {a b c : α} : Eq (α := Sym2 α) ⟦(b, a)⟧ ⟦(c, a)⟧ ↔ b = c := by
   constructor <;> intro h
   · rw [Quotient.eq] at h
     cases h <;> rfl
@@ -173,8 +169,7 @@ theorem eq_iff {x y z w : α} : Eq (α := Sym2 α) ⟦(x, y)⟧ ⟦(z, w)⟧ ↔
   by simp
 #align sym2.eq_iff Sym2.eq_iff
 
-theorem mk''_eq_mk''_iff {p q : α × α} : Eq (α := Sym2 α) ⟦p⟧ ⟦q⟧ ↔ p = q ∨ p = q.swap :=
-  by
+theorem mk''_eq_mk''_iff {p q : α × α} : Eq (α := Sym2 α) ⟦p⟧ ⟦q⟧ ↔ p = q ∨ p = q.swap := by
   cases p
   cases q
   simp only [eq_iff, Prod.mk.inj_iff, Prod.swap_prod_mk]
@@ -218,8 +213,7 @@ def lift₂ :
         rintro _ _ _ _ ⟨⟩ ⟨⟩
         exacts[rfl, (f.2 _ _ _ _).2, (f.2 _ _ _ _).1, (f.2 _ _ _ _).1.trans (f.2 _ _ _ _).2])
   invFun F :=
-    ⟨fun a₁ a₂ b₁ b₂ => F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧, fun a₁ a₂ b₁ b₂ =>
-      by
+    ⟨fun a₁ a₂ b₁ b₂ => F ⟦(a₁, a₂)⟧ ⟦(b₁, b₂)⟧, fun a₁ a₂ b₁ b₂ => by
       constructor
       exacts[congr_arg₂ F eq_swap rfl, congr_arg₂ F rfl eq_swap]⟩
   left_inv f := Subtype.ext rfl
@@ -258,8 +252,7 @@ theorem map_id : map (@id α) = id := by
   rfl
 #align sym2.map_id Sym2.map_id
 
-theorem map_comp {g : β → γ} {f : α → β} : Sym2.map (g ∘ f) = Sym2.map g ∘ Sym2.map f :=
-  by
+theorem map_comp {g : β → γ} {f : α → β} : Sym2.map (g ∘ f) = Sym2.map g ∘ Sym2.map f := by
   ext ⟨⟨x, y⟩⟩
   rfl
 #align sym2.map_comp Sym2.map_comp
@@ -273,8 +266,7 @@ theorem map_pair_eq (f : α → β) (x y : α) : map f ⟦(x, y)⟧ = ⟦(f x, f
   rfl
 #align sym2.map_pair_eq Sym2.map_pair_eq
 
-theorem map.injective {f : α → β} (hinj : Injective f) : Injective (map f) :=
-  by
+theorem map.injective {f : α → β} (hinj : Injective f) : Injective (map f) := by
   intro z z'
   refine' Quotient.ind₂ (fun z z' => _) z z'
   cases' z with x y
@@ -355,8 +347,7 @@ theorem out_snd_mem (e : Sym2 α) : e.out.2 ∈ e :=
   ⟨e.out.1, by rw [eq_swap, Prod.mk.eta, e.out_eq]⟩
 #align sym2.out_snd_mem Sym2.out_snd_mem
 
-theorem ball {p : α → Prop} {a b : α} : (∀ c ∈ (⟦(a, b)⟧ : Sym2 α), p c) ↔ p a ∧ p b :=
-  by
+theorem ball {p : α → Prop} {a b : α} : (∀ c ∈ (⟦(a, b)⟧ : Sym2 α), p c) ↔ p a ∧ p b := by
   refine' ⟨fun h => ⟨h _ <| mem_mk''_left _ _, h _ <| mem_mk''_right _ _⟩, fun h c hc => _⟩
   obtain rfl | rfl := Sym2.mem_iff.1 hc
   · exact h.1
@@ -375,14 +366,12 @@ theorem other_spec {a : α} {z : Sym2 α} (h : a ∈ z) : ⟦(a, Mem.other h)⟧
   erw [← Classical.choose_spec h]
 #align sym2.other_spec Sym2.other_spec
 
-theorem other_mem {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other h ∈ z :=
-  by
+theorem other_mem {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other h ∈ z := by
   convert mem_mk''_right a <| Mem.other h
   rw [other_spec h]
 #align sym2.other_mem Sym2.other_mem
 
-theorem mem_and_mem_iff {x y : α} {z : Sym2 α} (hne : x ≠ y) : x ∈ z ∧ y ∈ z ↔ z = ⟦(x, y)⟧ :=
-  by
+theorem mem_and_mem_iff {x y : α} {z : Sym2 α} (hne : x ≠ y) : x ∈ z ∧ y ∈ z ↔ z = ⟦(x, y)⟧ := by
   constructor
   · induction' z using Sym2.ind with x' y'
     rw [mem_iff, mem_iff]
@@ -403,8 +392,7 @@ instance Mem.decidable [DecidableEq α] (x : α) (z : Sym2 α) : Decidable (x 
 end Membership
 
 @[simp]
-theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔ ∃ a, a ∈ z ∧ f a = b :=
-  by
+theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔ ∃ a, a ∈ z ∧ f a = b := by
   induction' z using Sym2.ind with x y
   simp only [map, Quotient.map_mk, Prod.map_mk, mem_iff]
   constructor
@@ -415,8 +403,7 @@ theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔
 #align sym2.mem_map Sym2.mem_map
 
 @[congr]
-theorem map_congr {f g : α → β} {s : Sym2 α} (h : ∀ x ∈ s, f x = g x) : map f s = map g s :=
-  by
+theorem map_congr {f g : α → β} {s : Sym2 α} (h : ∀ x ∈ s, f x = g x) : map f s = map g s := by
   ext y
   simp only [mem_map]
   constructor <;>
@@ -464,8 +451,7 @@ theorem diag_isDiag (a : α) : IsDiag (diag a) :=
   Eq.refl a
 #align sym2.diag_is_diag Sym2.diag_isDiag
 
-theorem IsDiag.mem_range_diag {z : Sym2 α} : IsDiag z → z ∈ Set.range (@diag α) :=
-  by
+theorem IsDiag.mem_range_diag {z : Sym2 α} : IsDiag z → z ∈ Set.range (@diag α) := by
   induction' z using Sym2.ind with x y
   rintro (rfl : x = y)
   exact ⟨_, rfl⟩
@@ -475,15 +461,13 @@ theorem isDiag_iff_mem_range_diag (z : Sym2 α) : IsDiag z ↔ z ∈ Set.range (
   ⟨IsDiag.mem_range_diag, fun ⟨i, hi⟩ => hi ▸ diag_isDiag i⟩
 #align sym2.is_diag_iff_mem_range_diag Sym2.isDiag_iff_mem_range_diag
 
-instance IsDiag.decidablePred (α : Type u) [DecidableEq α] : DecidablePred (@IsDiag α) :=
-  by
+instance IsDiag.decidablePred (α : Type u) [DecidableEq α] : DecidablePred (@IsDiag α) := by
   refine' fun z => Quotient.recOnSubsingleton z fun a => _
   erw [isDiag_iff_proj_eq]
   infer_instance
 #align sym2.is_diag.decidable_pred Sym2.IsDiag.decidablePred
 
-theorem other_ne {a : α} {z : Sym2 α} (hd : ¬IsDiag z) (h : a ∈ z) : Mem.other h ≠ a :=
-  by
+theorem other_ne {a : α} {z : Sym2 α} (hd : ¬IsDiag z) (h : a ∈ z) : Mem.other h ≠ a := by
   contrapose! hd
   have h' := Sym2.other_spec h
   rw [hd] at h'
@@ -516,15 +500,13 @@ theorem fromRel_prop {sym : Symmetric r} {a b : α} : ⟦(a, b)⟧ ∈ fromRel s
   Iff.rfl
 #align sym2.from_rel_prop Sym2.fromRel_prop
 
-theorem fromRel_bot : fromRel (fun (x y : α) z => z : Symmetric ⊥) = ∅ :=
-  by
+theorem fromRel_bot : fromRel (fun (x y : α) z => z : Symmetric ⊥) = ∅ := by
   apply Set.eq_empty_of_forall_not_mem fun e => _
   apply Sym2.ind
   simp [-Set.bot_eq_empty, Prop.bot_eq_false]
 #align sym2.from_rel_bot Sym2.fromRel_bot
 
-theorem fromRel_top : fromRel (fun (x y : α) z => z : Symmetric ⊤) = Set.univ :=
-  by
+theorem fromRel_top : fromRel (fun (x y : α) z => z : Symmetric ⊤) = Set.univ := by
   apply Set.eq_univ_of_forall fun e => _
   apply Sym2.ind
   simp [-Set.top_eq_univ, Prop.top_eq_true]
@@ -660,8 +642,7 @@ def relBool [DecidableEq α] (x y : α × α) : Bool :=
 #align sym2.rel_bool Sym2.relBool
 
 @[aesop norm unfold (rule_sets [Sym2])]
-theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Rel α x y :=
-  by
+theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Rel α x y := by
   cases' x with x₁ x₂; cases' y with y₁ y₂
   aesop (rule_sets [Sym2]) (add norm unfold [relBool])
 #align sym2.rel_bool_spec Sym2.relBool_spec
@@ -719,8 +700,7 @@ def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α :=
 #align sym2.mem.other' Sym2.Mem.other'
 
 @[simp]
-theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : ⟦(a, Mem.other' h)⟧ = z :=
-  by
+theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : ⟦(a, Mem.other' h)⟧ = z := by
   induction z using Sym2.ind
   have h' := mem_iff.mp h
   aesop (add norm unfold [Quotient.rec, Quot.rec]) (rule_sets [Sym2])
@@ -731,8 +711,7 @@ theorem other_eq_other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) :
   Mem.other h = Mem.other' h := by rw [← congr_right, other_spec' h, other_spec]
 #align sym2.other_eq_other' Sym2.other_eq_other'
 
-theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other' h ∈ z :=
-  by
+theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other' h ∈ z := by
   rw [← other_eq_other']
   exact other_mem h
 #align sym2.other_mem' Sym2.other_mem'
@@ -752,8 +731,7 @@ theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈
 
 -- porting note: updating `×ˢ` to the new notation `×ᶠ`
 theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
-    ((s ×ᶠ s).image Quotient.mk'').filter IsDiag = s.diag.image Quotient.mk'' :=
-  by
+    ((s ×ᶠ s).image Quotient.mk'').filter IsDiag = s.diag.image Quotient.mk'' := by
   ext z
   induction' z using Sym2.inductionOn
   simp only [mem_image, mem_diag, exists_prop, mem_filter, Prod.exists, mem_product]
@@ -769,8 +747,7 @@ theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
 -- porting note: updating `×ˢ` to the new notation `×ᶠ`
 theorem filter_image_quotient_mk''_not_isDiag [DecidableEq α] (s : Finset α) :
     (((s ×ᶠ s).image Quotient.mk'').filter fun a : Sym2 α => ¬a.IsDiag) =
-      s.offDiag.image Quotient.mk'' :=
-  by
+      s.offDiag.image Quotient.mk'' := by
   ext z
   induction z using Sym2.inductionOn
   simp only [mem_image, mem_offDiag, mem_filter, Prod.exists, mem_product]
Refactor uses to rename_i that have easy fixes (#2429)
Diff
@@ -755,8 +755,7 @@ theorem filter_image_quotient_mk''_isDiag [DecidableEq α] (s : Finset α) :
     ((s ×ᶠ s).image Quotient.mk'').filter IsDiag = s.diag.image Quotient.mk'' :=
   by
   ext z
-  induction z using Sym2.inductionOn
-  rename_i x y
+  induction' z using Sym2.inductionOn
   simp only [mem_image, mem_diag, exists_prop, mem_filter, Prod.exists, mem_product]
   constructor
   · rintro ⟨⟨a, b, ⟨ha, hb⟩, (h : Quotient.mk _ _ = _)⟩, hab⟩
feat: port Data.Finset.Sym (#2168)

Some instances that were not synthezised automatically are added to the files Data.Sym.Basic and Data.Sym.Sym2

See https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Classical

Diff
@@ -668,8 +668,11 @@ theorem relBool_spec [DecidableEq α] (x y : α × α) : ↥(relBool x y) ↔ Re
 
 /-- Given `[DecidableEq α]` and `[Fintype α]`, the following instance gives `Fintype (Sym2 α)`.
 -/
-instance (α : Type _) [DecidableEq α] : DecidableRel (Sym2.Rel α) := fun x y =>
+instance instRelDecidable (α : Type _) [DecidableEq α] : DecidableRel (Sym2.Rel α) := fun x y =>
   decidable_of_bool (relBool x y) (relBool_spec x y)
+-- Porting note: add this other version needed for Data.Finset.Sym
+instance instRelDecidable' (α : Type _) [DecidableEq α] :
+  DecidableRel (· ≈ · : α × α → α × α → Prop) := instRelDecidable _
 
 -- porting note: extra definitions and lemmas for proving decidable equality in `Sym2`
 /-- An algorithm for deciding equality in `Sym2 α`. -/
@@ -682,10 +685,6 @@ def eqBool [DecidableEq α] : Sym2 α → Sym2 α → Bool :=
 theorem eqBool_spec [DecidableEq α] (a b : Sym2 α) : (eqBool a b) ↔ (a = b) :=
   Sym2.inductionOn₂ a b <| by aesop (rule_sets [Sym2])
 
--- porting note: `filter_image_quotient_mk''_isDiag` needs this instance
-instance (α : Type _) [DecidableEq α] : DecidableEq (Sym2 α) :=
-  fun a b => decidable_of_bool (eqBool a b) (eqBool_spec a b)
-
 
 
 /-! ### The other element of an element of the symmetric square -/
feat: improvements to congr! and convert (#2606)
  • There is now configuration for congr!, convert, and convert_to to control parts of the congruence algorithm, in particular transparency settings when applying congruence lemmas.
  • congr! now applies congruence lemmas with reducible transparency by default. This prevents it from unfolding definitions when applying congruence lemmas. It also now tries both the LHS-biased and RHS-biased simp congruence lemmas, with a configuration option to set which it should try first.
  • There is now a new HEq congruence lemma generator that gives each hypothesis access to the proofs of previous hypotheses. This means that if you have an equality ⊢ ⟨a, x⟩ = ⟨b, y⟩ of sigma types, congr! turns this into goals ⊢ a = b and ⊢ a = b → HEq x y (note that congr! will also auto-introduce a = b for you in the second goal). This congruence lemma generator applies to more cases than the simp congruence lemma generator does.
  • congr! (and hence convert) are more careful about applying lemmas that don't force definitions to unfold. There were a number of cases in mathlib where the implementation of congr was being abused to unfold definitions.
  • With set_option trace.congr! true you can see what congr! sees when it is deciding on congruence lemmas.
  • There is also a bug fix in convert_to to do using 1 when there is no using clause, to match its documentation.

Note that congr! is more capable than congr at finding a way to equate left-hand sides and right-hand sides, so you will frequently need to limit its depth with a using clause. However, there is also a new heuristic to prevent considering unlikely-to-be-provable type equalities (controlled by the typeEqs option), which can help limit the depth automatically.

There is also a predefined configuration that you can invoke with, for example, convert (config := .unfoldSameFun) h, that causes it to behave more like congr, including using default transparency when unfolding.

Diff
@@ -747,8 +747,8 @@ theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb
 theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈ z) : Mem.other hb = a :=
   by classical
     rw [other_eq_other'] at hb⊢
-    convert other_invol' ha hb
-    rw [other_eq_other']
+    convert other_invol' ha hb using 2
+    apply other_eq_other'
 #align sym2.other_invol Sym2.other_invol
 
 -- porting note: updating `×ˢ` to the new notation `×ᶠ`
chore: bump lean, std4, quote4, aesop (#2709)
Diff
@@ -91,7 +91,7 @@ instance Rel.setoid (α : Type u) : Setoid (α × α) :=
 
 @[simp]
 theorem rel_iff {x y z w : α} : (x, y) ≈ (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z :=
-  by aesop (rule_sets [Sym2]) (add norm unfold [HasEquiv.Equiv, Setoid.r])
+  show Rel _ _ _ ↔ _ by aesop (rule_sets [Sym2])
 #align sym2.rel_iff Sym2.rel_iff
 
 end Sym2
bump: update Aesop to 2022-02-24 (#2484)

This version of Aesop supports local and scoped rules.

Diff
@@ -10,6 +10,7 @@ Authors: Kyle Miller
 -/
 import Mathlib.Data.Finset.Prod
 import Mathlib.Data.Sym.Basic
+import Mathlib.Data.Sym.Sym2.Init
 import Mathlib.Data.SetLike.Basic
 
 /-!
@@ -48,6 +49,7 @@ symmetric square, unordered pairs, symmetric powers
 -/
 
 
+-- porting note: using `aesop` in place of `tidy` to simplify proofs
 -- porting note: remove import `Tactic.Linarith.Default`
 -- porting note: adding the above porting note here to avoid module docs linter error
 
@@ -57,9 +59,6 @@ universe u
 
 variable {α β γ : Type _}
 
--- porting note: using `aesop` in place of `tidy` to simplify proofs
-declare_aesop_rule_sets [Sym2]
-
 namespace Sym2
 
 /-- This is the relation capturing the notion of pairs equivalent up to permutations.
feat: Port Data.Sym.Sym2 (#1805)

Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com>

Dependencies 6 + 175

176 files ported (96.7%)
80745 lines ported (97.4%)
Show graph

The unported dependencies are