data.set.semiringMathlib.Data.Set.Semiring

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)

(last sync)

fix(data/set/semiring): fix lemma name (#18545)

This was a typo by me

Diff
@@ -147,7 +147,7 @@ def image_hom [mul_one_class α] [mul_one_class β] (f : α →* β) :
   map_add' := image_union _,
   map_mul' := λ _ _, image_mul f }
 
-lemma down_image_def [mul_one_class α] [mul_one_class β] (f : α →* β) (s : set_semiring α) :
+lemma image_hom_def [mul_one_class α] [mul_one_class β] (f : α →* β) (s : set_semiring α) :
   image_hom f s = (image f s.down).up := rfl
 
 @[simp] lemma down_image_hom [mul_one_class α] [mul_one_class β] (f : α →* β) (s : set_semiring α) :

(no changes)

(no changes)

(no changes)

fix(algebra/algebra/operations): add missing set_semiring.down casts (#18539)

Previously this was abusing the defeq of the types, resulting in lemmas stated in weird ways.

This also fixes a type in #18449, and adds three missing lemmas about image_hom.

Forward port of set_semiring will be included in https://github.com/leanprover-community/mathlib4/pull/2518

Diff
@@ -83,7 +83,7 @@ instance : non_unital_non_assoc_semiring (set_semiring α) :=
 
 lemma mul_def (s t : set_semiring α) : s * t = (s.down * t.down).up := rfl
 
-@[simp] lemma down_mul (s t : set_semiring α) : (s + t).down = s.down ∪ t.down := rfl
+@[simp] lemma down_mul (s t : set_semiring α) : (s * t).down = s.down * t.down := rfl
 
 @[simp] lemma _root_.set.up_mul (s t : set α) : (s * t).up = s.up * t.up := rfl
 
@@ -141,10 +141,19 @@ instance [comm_monoid α] : canonically_ordered_comm_semiring (set_semiring α)
 with respect to the pointwise operations on sets. -/
 def image_hom [mul_one_class α] [mul_one_class β] (f : α →* β) :
   set_semiring α →+* set_semiring β :=
-{ to_fun := image f,
+{ to_fun := λ s, (image f s.down).up,
   map_zero' := image_empty _,
-  map_one' := by rw [image_one, map_one, singleton_one],
+  map_one' := by rw [down_one, image_one, map_one, singleton_one, set.up_one],
   map_add' := image_union _,
   map_mul' := λ _ _, image_mul f }
 
+lemma down_image_def [mul_one_class α] [mul_one_class β] (f : α →* β) (s : set_semiring α) :
+  image_hom f s = (image f s.down).up := rfl
+
+@[simp] lemma down_image_hom [mul_one_class α] [mul_one_class β] (f : α →* β) (s : set_semiring α) :
+  (image_hom f s).down = f '' s.down := rfl
+
+@[simp] lemma _root_.set.up_image [mul_one_class α] [mul_one_class β] (f : α →* β) (s : set α) :
+  (f '' s).up = image_hom f s.up := rfl
+
 end set_semiring

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

chore(data/set/semiring): add an idem_semiring instance (#18449)

This typeclass is reasonably new, so some obvious instances are missing.

Also adds some basic API lemmas that were missing about the casting functions set.up and set_semiring.down.

forward-ported as https://github.com/leanprover-community/mathlib4/pull/2518

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
+import algebra.order.kleene
 import data.set.pointwise.smul
 
 /-!
@@ -51,6 +52,18 @@ instance : add_comm_monoid (set_semiring α) :=
   add_zero := union_empty,
   add_comm := union_comm }
 
+lemma zero_def : (0 : set_semiring α) = set.up ∅ := rfl
+
+@[simp] lemma down_zero : (0 : set_semiring α).down = ∅ := rfl
+
+@[simp] lemma _root_.set.up_empty : (∅ : set α).up = 0 := rfl
+
+lemma add_def (s t : set_semiring α) : s + t = (s.down ∪ t.down).up := rfl
+
+@[simp] lemma down_add (s t : set_semiring α) : (s + t).down = s.down ∪ t.down := rfl
+
+@[simp] lemma _root_.set.up_union (s t : set α) : (s ∪ t).up = s.up + t.up := rfl
+
 /- Since addition on `set_semiring` is commutative (it is set union), there is no need
 to also have the instance `covariant_class (set_semiring α) (set_semiring α) (swap (+)) (≤)`. -/
 instance covariant_class_add : covariant_class (set_semiring α) (set_semiring α) (+) (≤) :=
@@ -60,13 +73,20 @@ section has_mul
 variables [has_mul α]
 
 instance : non_unital_non_assoc_semiring (set_semiring α) :=
-{ mul := λ s t, (image2 (*) s.down t.down).up,
+{ -- reducibility linter complains if we use `(s.down * t.down).up`
+  mul := λ s t, (image2 (*) s.down t.down).up,
   zero_mul := λ s, empty_mul,
   mul_zero := λ s, mul_empty,
   left_distrib := λ _ _ _, mul_union,
   right_distrib := λ _ _ _, union_mul,
   ..set_semiring.add_comm_monoid }
 
+lemma mul_def (s t : set_semiring α) : s * t = (s.down * t.down).up := rfl
+
+@[simp] lemma down_mul (s t : set_semiring α) : (s + t).down = s.down ∪ t.down := rfl
+
+@[simp] lemma _root_.set.up_mul (s t : set α) : (s * t).up = s.up * t.up := rfl
+
 instance : no_zero_divisors (set_semiring α) :=
 ⟨λ a b ab, a.eq_empty_or_nonempty.imp_right $ λ ha, b.eq_empty_or_nonempty.resolve_right $
   λ hb, nonempty.ne_empty ⟨_, mul_mem_mul ha.some_mem hb.some_mem⟩ ab⟩
@@ -80,6 +100,19 @@ instance covariant_class_mul_right :
 
 end has_mul
 
+section has_one
+variables [has_one α]
+
+instance : has_one (set_semiring α) := { one := set.up 1 }
+
+lemma one_def : (1 : set_semiring α) = set.up 1 := rfl
+
+@[simp] lemma down_one : (1 : set_semiring α).down = 1 := rfl
+
+@[simp] lemma _root_.set.up_one : (1 : set α).up = 1 := rfl
+
+end has_one
+
 instance [mul_one_class α] : non_assoc_semiring (set_semiring α) :=
 { one := 1,
   mul := (*),
@@ -88,18 +121,21 @@ instance [mul_one_class α] : non_assoc_semiring (set_semiring α) :=
 instance [semigroup α] : non_unital_semiring (set_semiring α) :=
 { ..set_semiring.non_unital_non_assoc_semiring, ..set.semigroup }
 
-instance [monoid α] : semiring (set_semiring α) :=
-{ ..set_semiring.non_assoc_semiring, ..set_semiring.non_unital_semiring }
+instance [monoid α] : idem_semiring (set_semiring α) :=
+{ ..set_semiring.non_assoc_semiring, ..set_semiring.non_unital_semiring,
+  ..set.complete_boolean_algebra }
 
 instance [comm_semigroup α] : non_unital_comm_semiring (set_semiring α) :=
 { ..set_semiring.non_unital_semiring, ..set.comm_semigroup }
 
+instance [comm_monoid α] : idem_comm_semiring (set_semiring α) :=
+{ ..set_semiring.idem_semiring, ..set.comm_monoid }
+
 instance [comm_monoid α] : canonically_ordered_comm_semiring (set_semiring α) :=
 { add_le_add_left := λ a b, add_le_add_left,
   exists_add_of_le := λ a b ab, ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩,
   le_self_add := subset_union_left,
-  ..set_semiring.semiring, ..set.comm_monoid, ..set_semiring.partial_order _,
-  ..set_semiring.order_bot _, ..set_semiring.no_zero_divisors }
+  ..set_semiring.idem_semiring, ..set.comm_monoid, ..set_semiring.no_zero_divisors }
 
 /-- The image of a set under a multiplicative homomorphism is a ring homomorphism
 with respect to the pointwise operations on sets. -/

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
 import Algebra.Order.Kleene
-import Data.Set.Pointwise.Smul
+import Data.Set.Pointwise.SMul
 
 #align_import data.set.semiring from "leanprover-community/mathlib"@"62e8311c791f02c47451bf14aa2501048e7c2f33"
 
Diff
@@ -253,7 +253,7 @@ instance [CommMonoid α] : CanonicallyOrderedCommSemiring (SetSemiring α) :=
   { SetSemiring.idemSemiring, Set.commMonoid,
     SetSemiring.noZeroDivisors with
     add_le_add_left := fun a b => add_le_add_left
-    exists_add_of_le := fun a b ab => ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩
+    exists_add_of_le := fun a b ab => ⟨b, (union_eq_right.2 ab).symm⟩
     le_self_add := subset_union_left }
 
 #print SetSemiring.imageHom /-
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
-import Mathbin.Algebra.Order.Kleene
-import Mathbin.Data.Set.Pointwise.Smul
+import Algebra.Order.Kleene
+import Data.Set.Pointwise.Smul
 
 #align_import data.set.semiring from "leanprover-community/mathlib"@"62e8311c791f02c47451bf14aa2501048e7c2f33"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module data.set.semiring
-! leanprover-community/mathlib commit 62e8311c791f02c47451bf14aa2501048e7c2f33
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Order.Kleene
 import Mathbin.Data.Set.Pointwise.Smul
 
+#align_import data.set.semiring from "leanprover-community/mathlib"@"62e8311c791f02c47451bf14aa2501048e7c2f33"
+
 /-!
 # Sets as a semiring under union
 
Diff
@@ -68,14 +68,18 @@ protected theorem up_down (s : SetSemiring α) : s.down.up = s :=
 #align set_semiring.up_down SetSemiring.up_down
 -/
 
+#print SetSemiring.up_le_up /-
 -- TODO: These lemmas are not tagged `simp` because `set.le_eq_subset` simplifies the LHS
 theorem up_le_up {s t : Set α} : s.up ≤ t.up ↔ s ⊆ t :=
   Iff.rfl
 #align set_semiring.up_le_up SetSemiring.up_le_up
+-/
 
+#print SetSemiring.up_lt_up /-
 theorem up_lt_up {s t : Set α} : s.up < t.up ↔ s ⊂ t :=
   Iff.rfl
 #align set_semiring.up_lt_up SetSemiring.up_lt_up
+-/
 
 #print SetSemiring.down_subset_down /-
 @[simp]
@@ -84,10 +88,12 @@ theorem down_subset_down {s t : SetSemiring α} : s.down ⊆ t.down ↔ s ≤ t
 #align set_semiring.down_subset_down SetSemiring.down_subset_down
 -/
 
+#print SetSemiring.down_ssubset_down /-
 @[simp]
 theorem down_ssubset_down {s t : SetSemiring α} : s.down ⊂ t.down ↔ s < t :=
   Iff.rfl
 #align set_semiring.down_ssubset_down SetSemiring.down_ssubset_down
+-/
 
 instance : AddCommMonoid (SetSemiring α)
     where
@@ -98,9 +104,11 @@ instance : AddCommMonoid (SetSemiring α)
   add_zero := union_empty
   add_comm := union_comm
 
+#print SetSemiring.zero_def /-
 theorem zero_def : (0 : SetSemiring α) = Set.up ∅ :=
   rfl
 #align set_semiring.zero_def SetSemiring.zero_def
+-/
 
 #print SetSemiring.down_zero /-
 @[simp]
@@ -116,9 +124,11 @@ theorem Set.up_empty : (∅ : Set α).up = 0 :=
 #align set.up_empty Set.up_empty
 -/
 
+#print SetSemiring.add_def /-
 theorem add_def (s t : SetSemiring α) : s + t = (s.down ∪ t.down).up :=
   rfl
 #align set_semiring.add_def SetSemiring.add_def
+-/
 
 #print SetSemiring.down_add /-
 @[simp]
@@ -134,11 +144,13 @@ theorem Set.up_union (s t : Set α) : (s ∪ t).up = s.up + t.up :=
 #align set.up_union Set.up_union
 -/
 
+#print SetSemiring.covariantClass_add /-
 /- Since addition on `set_semiring` is commutative (it is set union), there is no need
 to also have the instance `covariant_class (set_semiring α) (set_semiring α) (swap (+)) (≤)`. -/
 instance covariantClass_add : CovariantClass (SetSemiring α) (SetSemiring α) (· + ·) (· ≤ ·) :=
   ⟨fun a b c => union_subset_union_right _⟩
 #align set_semiring.covariant_class_add SetSemiring.covariantClass_add
+-/
 
 section Mul
 
@@ -153,9 +165,11 @@ instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
     left_distrib := fun _ _ _ => mul_union
     right_distrib := fun _ _ _ => union_mul }
 
+#print SetSemiring.mul_def /-
 theorem mul_def (s t : SetSemiring α) : s * t = (s.down * t.down).up :=
   rfl
 #align set_semiring.mul_def SetSemiring.mul_def
+-/
 
 #print SetSemiring.down_mul /-
 @[simp]
@@ -177,14 +191,18 @@ instance : NoZeroDivisors (SetSemiring α) :=
       b.eq_empty_or_nonempty.resolve_right fun hb =>
         Nonempty.ne_empty ⟨_, mul_mem_mul ha.some_mem hb.some_mem⟩ ab⟩
 
+#print SetSemiring.covariantClass_mul_left /-
 instance covariantClass_mul_left : CovariantClass (SetSemiring α) (SetSemiring α) (· * ·) (· ≤ ·) :=
   ⟨fun a b c => mul_subset_mul_left⟩
 #align set_semiring.covariant_class_mul_left SetSemiring.covariantClass_mul_left
+-/
 
+#print SetSemiring.covariantClass_mul_right /-
 instance covariantClass_mul_right :
     CovariantClass (SetSemiring α) (SetSemiring α) (swap (· * ·)) (· ≤ ·) :=
   ⟨fun a b c => mul_subset_mul_right⟩
 #align set_semiring.covariant_class_mul_right SetSemiring.covariantClass_mul_right
+-/
 
 end Mul
 
@@ -194,9 +212,11 @@ variable [One α]
 
 instance : One (SetSemiring α) where one := Set.up 1
 
+#print SetSemiring.one_def /-
 theorem one_def : (1 : SetSemiring α) = Set.up 1 :=
   rfl
 #align set_semiring.one_def SetSemiring.one_def
+-/
 
 #print SetSemiring.down_one /-
 @[simp]
@@ -239,6 +259,7 @@ instance [CommMonoid α] : CanonicallyOrderedCommSemiring (SetSemiring α) :=
     exists_add_of_le := fun a b ab => ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩
     le_self_add := subset_union_left }
 
+#print SetSemiring.imageHom /-
 /-- The image of a set under a multiplicative homomorphism is a ring homomorphism
 with respect to the pointwise operations on sets. -/
 def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α →+* SetSemiring β
@@ -249,23 +270,30 @@ def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α
   map_add' := image_union _
   map_mul' _ _ := image_mul f
 #align set_semiring.image_hom SetSemiring.imageHom
+-/
 
+#print SetSemiring.imageHom_def /-
 theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
     imageHom f s = (image f s.down).up :=
   rfl
 #align set_semiring.image_hom_def SetSemiring.imageHom_def
+-/
 
+#print SetSemiring.down_imageHom /-
 @[simp]
 theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
     (imageHom f s).down = f '' s.down :=
   rfl
 #align set_semiring.down_image_hom SetSemiring.down_imageHom
+-/
 
+#print Set.up_image /-
 @[simp]
 theorem Set.up_image [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set α) :
     (f '' s).up = imageHom f s.up :=
   rfl
 #align set.up_image Set.up_image
+-/
 
 end SetSemiring
 
Diff
@@ -33,7 +33,8 @@ variable {α β : Type _}
 /-- An alias for `set α`, which has a semiring structure given by `∪` as "addition" and pointwise
   multiplication `*` as "multiplication". -/
 def SetSemiring (α : Type _) : Type _ :=
-  Set α deriving Inhabited, PartialOrder, OrderBot
+  Set α
+deriving Inhabited, PartialOrder, OrderBot
 #align set_semiring SetSemiring
 -/
 
Diff
@@ -25,7 +25,7 @@ pointwise `*` as multiplication. If `α` is a (commutative) monoid, `set_semirin
 
 open Function Set
 
-open Pointwise
+open scoped Pointwise
 
 variable {α β : Type _}
 
Diff
@@ -67,23 +67,11 @@ protected theorem up_down (s : SetSemiring α) : s.down.up = s :=
 #align set_semiring.up_down SetSemiring.up_down
 -/
 
-/- warning: set_semiring.up_le_up -> SetSemiring.up_le_up is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t)
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLE.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t)
-Case conversion may be inaccurate. Consider using '#align set_semiring.up_le_up SetSemiring.up_le_upₓ'. -/
 -- TODO: These lemmas are not tagged `simp` because `set.le_eq_subset` simplifies the LHS
 theorem up_le_up {s t : Set α} : s.up ≤ t.up ↔ s ⊆ t :=
   Iff.rfl
 #align set_semiring.up_le_up SetSemiring.up_le_up
 
-/- warning: set_semiring.up_lt_up -> SetSemiring.up_lt_up is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toHasLt.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) s t)
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLT.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.instHasSSubsetSet.{u1} α) s t)
-Case conversion may be inaccurate. Consider using '#align set_semiring.up_lt_up SetSemiring.up_lt_upₓ'. -/
 theorem up_lt_up {s t : Set α} : s.up < t.up ↔ s ⊂ t :=
   Iff.rfl
 #align set_semiring.up_lt_up SetSemiring.up_lt_up
@@ -95,12 +83,6 @@ theorem down_subset_down {s t : SetSemiring α} : s.down ⊆ t.down ↔ s ≤ t
 #align set_semiring.down_subset_down SetSemiring.down_subset_down
 -/
 
-/- warning: set_semiring.down_ssubset_down -> SetSemiring.down_ssubset_down is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toHasLt.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) s t)
-but is expected to have type
-  forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.instHasSSubsetSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) s t)
-Case conversion may be inaccurate. Consider using '#align set_semiring.down_ssubset_down SetSemiring.down_ssubset_downₓ'. -/
 @[simp]
 theorem down_ssubset_down {s t : SetSemiring α} : s.down ⊂ t.down ↔ s < t :=
   Iff.rfl
@@ -115,12 +97,6 @@ instance : AddCommMonoid (SetSemiring α)
   add_zero := union_empty
   add_comm := union_comm
 
-/- warning: set_semiring.zero_def -> SetSemiring.zero_def is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (OfNat.mk.{u1} (SetSemiring.{u1} α) 0 (Zero.zero.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasZero.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α))))))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α)))
-but is expected to have type
-  forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (Zero.toOfNat0.{u1} (SetSemiring.{u1} α) (AddMonoid.toZero.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
-Case conversion may be inaccurate. Consider using '#align set_semiring.zero_def SetSemiring.zero_defₓ'. -/
 theorem zero_def : (0 : SetSemiring α) = Set.up ∅ :=
   rfl
 #align set_semiring.zero_def SetSemiring.zero_def
@@ -139,12 +115,6 @@ theorem Set.up_empty : (∅ : Set α).up = 0 :=
 #align set.up_empty Set.up_empty
 -/
 
-/- warning: set_semiring.add_def -> SetSemiring.add_def is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α))))) s t) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
-but is expected to have type
-  forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
-Case conversion may be inaccurate. Consider using '#align set_semiring.add_def SetSemiring.add_defₓ'. -/
 theorem add_def (s t : SetSemiring α) : s + t = (s.down ∪ t.down).up :=
   rfl
 #align set_semiring.add_def SetSemiring.add_def
@@ -163,12 +133,6 @@ theorem Set.up_union (s t : Set α) : (s ∪ t).up = s.up + t.up :=
 #align set.up_union Set.up_union
 -/
 
-/- warning: set_semiring.covariant_class_add -> SetSemiring.covariantClass_add is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
-but is expected to have type
-  forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.498 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.500 : SetSemiring.{u1} α) => HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) x._@.Mathlib.Data.Set.Semiring._hyg.498 x._@.Mathlib.Data.Set.Semiring._hyg.500) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.513 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.515 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.513 x._@.Mathlib.Data.Set.Semiring._hyg.515)
-Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_add SetSemiring.covariantClass_addₓ'. -/
 /- Since addition on `set_semiring` is commutative (it is set union), there is no need
 to also have the instance `covariant_class (set_semiring α) (set_semiring α) (swap (+)) (≤)`. -/
 instance covariantClass_add : CovariantClass (SetSemiring α) (SetSemiring α) (· + ·) (· ≤ ·) :=
@@ -188,12 +152,6 @@ instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
     left_distrib := fun _ _ _ => mul_union
     right_distrib := fun _ _ _ => union_mul }
 
-/- warning: set_semiring.mul_def -> SetSemiring.mul_def is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))) s t) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} (Set.{u1} α) (Set.{u1} α) (Set.{u1} α) (instHMul.{u1} (Set.{u1} α) (Set.mul.{u1} α _inst_1)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) s) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) t) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) s) (instHMul.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.mul.{u1} α _inst_1)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
-Case conversion may be inaccurate. Consider using '#align set_semiring.mul_def SetSemiring.mul_defₓ'. -/
 theorem mul_def (s t : SetSemiring α) : s * t = (s.down * t.down).up :=
   rfl
 #align set_semiring.mul_def SetSemiring.mul_def
@@ -218,22 +176,10 @@ instance : NoZeroDivisors (SetSemiring α) :=
       b.eq_empty_or_nonempty.resolve_right fun hb =>
         Nonempty.ne_empty ⟨_, mul_mem_mul ha.some_mem hb.some_mem⟩ ab⟩
 
-/- warning: set_semiring.covariant_class_mul_left -> SetSemiring.covariantClass_mul_left is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.786 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.788 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.786 x._@.Mathlib.Data.Set.Semiring._hyg.788) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.801 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.803 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.801 x._@.Mathlib.Data.Set.Semiring._hyg.803)
-Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_mul_left SetSemiring.covariantClass_mul_leftₓ'. -/
 instance covariantClass_mul_left : CovariantClass (SetSemiring α) (SetSemiring α) (· * ·) (· ≤ ·) :=
   ⟨fun a b c => mul_subset_mul_left⟩
 #align set_semiring.covariant_class_mul_left SetSemiring.covariantClass_mul_left
 
-/- warning: set_semiring.covariant_class_mul_right -> SetSemiring.covariantClass_mul_right is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.846 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.848 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.846 x._@.Mathlib.Data.Set.Semiring._hyg.848)) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.861 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.863 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.861 x._@.Mathlib.Data.Set.Semiring._hyg.863)
-Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_mul_right SetSemiring.covariantClass_mul_rightₓ'. -/
 instance covariantClass_mul_right :
     CovariantClass (SetSemiring α) (SetSemiring α) (swap (· * ·)) (· ≤ ·) :=
   ⟨fun a b c => mul_subset_mul_right⟩
@@ -247,12 +193,6 @@ variable [One α]
 
 instance : One (SetSemiring α) where one := Set.up 1
 
-/- warning: set_semiring.one_def -> SetSemiring.one_def is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (OfNat.mk.{u1} (SetSemiring.{u1} α) 1 (One.one.{u1} (SetSemiring.{u1} α) (SetSemiring.hasOne.{u1} α _inst_1)))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (OfNat.mk.{u1} (Set.{u1} α) 1 (One.one.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1)))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (One.toOfNat1.{u1} (SetSemiring.{u1} α) (SetSemiring.instOneSetSemiring.{u1} α _inst_1))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (One.toOfNat1.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1))))
-Case conversion may be inaccurate. Consider using '#align set_semiring.one_def SetSemiring.one_defₓ'. -/
 theorem one_def : (1 : SetSemiring α) = Set.up 1 :=
   rfl
 #align set_semiring.one_def SetSemiring.one_def
@@ -298,12 +238,6 @@ instance [CommMonoid α] : CanonicallyOrderedCommSemiring (SetSemiring α) :=
     exists_add_of_le := fun a b ab => ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩
     le_self_add := subset_union_left }
 
-/- warning: set_semiring.image_hom -> SetSemiring.imageHom is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β], (MonoidHom.{u1, u2} α β _inst_1 _inst_2) -> (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β], (MonoidHom.{u1, u2} α β _inst_1 _inst_2) -> (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} β _inst_2))
-Case conversion may be inaccurate. Consider using '#align set_semiring.image_hom SetSemiring.imageHomₓ'. -/
 /-- The image of a set under a multiplicative homomorphism is a ring homomorphism
 with respect to the pointwise operations on sets. -/
 def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α →+* SetSemiring β
@@ -315,35 +249,17 @@ def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α
   map_mul' _ _ := image_mul f
 #align set_semiring.image_hom SetSemiring.imageHom
 
-/- warning: set_semiring.image_hom_def -> SetSemiring.imageHom_def is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) s) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s)))
-Case conversion may be inaccurate. Consider using '#align set_semiring.image_hom_def SetSemiring.imageHom_defₓ'. -/
 theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
     imageHom f s = (image f s.down).up :=
   rfl
 #align set_semiring.image_hom_def SetSemiring.imageHom_def
 
-/- warning: set_semiring.down_image_hom -> SetSemiring.down_imageHom is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (Set.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) => (SetSemiring.{u2} β) -> (Set.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (SetSemiring.down.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s)) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} β) => Set.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (a : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.{u1} β) (fun (_x : SetSemiring.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} β) => Set.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.down.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s))
-Case conversion may be inaccurate. Consider using '#align set_semiring.down_image_hom SetSemiring.down_imageHomₓ'. -/
 @[simp]
 theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
     (imageHom f s).down = f '' s.down :=
   rfl
 #align set_semiring.down_image_hom SetSemiring.down_imageHom
 
-/- warning: set.up_image -> Set.up_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : Set.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) s)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : Set.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} β) => SetSemiring.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (a : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.{u2} α) (fun (_x : Set.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u2} α) => SetSemiring.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.up.{u2} α) s))
-Case conversion may be inaccurate. Consider using '#align set.up_image Set.up_imageₓ'. -/
 @[simp]
 theorem Set.up_image [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set α) :
     (f '' s).up = imageHom f s.up :=
Diff
@@ -71,7 +71,7 @@ protected theorem up_down (s : SetSemiring α) : s.down.up = s :=
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t)
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLE.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t)
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLE.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.up_le_up SetSemiring.up_le_upₓ'. -/
 -- TODO: These lemmas are not tagged `simp` because `set.le_eq_subset` simplifies the LHS
 theorem up_le_up {s t : Set α} : s.up ≤ t.up ↔ s ⊆ t :=
@@ -82,7 +82,7 @@ theorem up_le_up {s t : Set α} : s.up ≤ t.up ↔ s ⊆ t :=
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toHasLt.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) s t)
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLT.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.instHasSSubsetSet.{u1} α) s t)
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLT.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.instHasSSubsetSet.{u1} α) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.up_lt_up SetSemiring.up_lt_upₓ'. -/
 theorem up_lt_up {s t : Set α} : s.up < t.up ↔ s ⊂ t :=
   Iff.rfl
@@ -99,7 +99,7 @@ theorem down_subset_down {s t : SetSemiring α} : s.down ⊆ t.down ↔ s ≤ t
 lean 3 declaration is
   forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toHasLt.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) s t)
 but is expected to have type
-  forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.instHasSSubsetSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) s t)
+  forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.instHasSSubsetSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.down_ssubset_down SetSemiring.down_ssubset_downₓ'. -/
 @[simp]
 theorem down_ssubset_down {s t : SetSemiring α} : s.down ⊂ t.down ↔ s < t :=
@@ -119,7 +119,7 @@ instance : AddCommMonoid (SetSemiring α)
 lean 3 declaration is
   forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (OfNat.mk.{u1} (SetSemiring.{u1} α) 0 (Zero.zero.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasZero.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α))))))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α)))
 but is expected to have type
-  forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (Zero.toOfNat0.{u1} (SetSemiring.{u1} α) (AddMonoid.toZero.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
+  forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (Zero.toOfNat0.{u1} (SetSemiring.{u1} α) (AddMonoid.toZero.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.zero_def SetSemiring.zero_defₓ'. -/
 theorem zero_def : (0 : SetSemiring α) = Set.up ∅ :=
   rfl
@@ -143,7 +143,7 @@ theorem Set.up_empty : (∅ : Set α).up = 0 :=
 lean 3 declaration is
   forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α))))) s t) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
 but is expected to have type
-  forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
+  forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.add_def SetSemiring.add_defₓ'. -/
 theorem add_def (s t : SetSemiring α) : s + t = (s.down ∪ t.down).up :=
   rfl
@@ -192,7 +192,7 @@ instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))) s t) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} (Set.{u1} α) (Set.{u1} α) (Set.{u1} α) (instHMul.{u1} (Set.{u1} α) (Set.mul.{u1} α _inst_1)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) t) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) (instHMul.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.mul.{u1} α _inst_1)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) s) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) t) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) s) (instHMul.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.mul.{u1} α _inst_1)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.mul_def SetSemiring.mul_defₓ'. -/
 theorem mul_def (s t : SetSemiring α) : s * t = (s.down * t.down).up :=
   rfl
@@ -251,7 +251,7 @@ instance : One (SetSemiring α) where one := Set.up 1
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (OfNat.mk.{u1} (SetSemiring.{u1} α) 1 (One.one.{u1} (SetSemiring.{u1} α) (SetSemiring.hasOne.{u1} α _inst_1)))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (OfNat.mk.{u1} (Set.{u1} α) 1 (One.one.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1)))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (One.toOfNat1.{u1} (SetSemiring.{u1} α) (SetSemiring.instOneSetSemiring.{u1} α _inst_1))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (One.toOfNat1.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1))))
+  forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (One.toOfNat1.{u1} (SetSemiring.{u1} α) (SetSemiring.instOneSetSemiring.{u1} α _inst_1))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (One.toOfNat1.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1))))
 Case conversion may be inaccurate. Consider using '#align set_semiring.one_def SetSemiring.one_defₓ'. -/
 theorem one_def : (1 : SetSemiring α) = Set.up 1 :=
   rfl
@@ -319,7 +319,7 @@ def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) s) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s)))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) s) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.image_hom_def SetSemiring.imageHom_defₓ'. -/
 theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
     imageHom f s = (image f s.down).up :=
@@ -330,7 +330,7 @@ theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (Set.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) => (SetSemiring.{u2} β) -> (Set.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (SetSemiring.down.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s)) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} β) => Set.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (a : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.{u1} β) (fun (_x : SetSemiring.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} β) => Set.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.down.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} β) => Set.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (a : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.{u1} β) (fun (_x : SetSemiring.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u1} β) => Set.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.down.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s))
 Case conversion may be inaccurate. Consider using '#align set_semiring.down_image_hom SetSemiring.down_imageHomₓ'. -/
 @[simp]
 theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
@@ -342,7 +342,7 @@ theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Se
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : Set.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) s)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : Set.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} β) => SetSemiring.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (a : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.{u2} α) (fun (_x : Set.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u2} α) => SetSemiring.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.up.{u2} α) s))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : Set.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} β) => SetSemiring.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (a : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.{u2} α) (fun (_x : Set.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Set.{u2} α) => SetSemiring.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.up.{u2} α) s))
 Case conversion may be inaccurate. Consider using '#align set.up_image Set.up_imageₓ'. -/
 @[simp]
 theorem Set.up_image [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set α) :
Diff
@@ -69,7 +69,7 @@ protected theorem up_down (s : SetSemiring α) : s.down.up = s :=
 
 /- warning: set_semiring.up_le_up -> SetSemiring.up_le_up is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t)
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t)
 but is expected to have type
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLE.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.up_le_up SetSemiring.up_le_upₓ'. -/
@@ -80,7 +80,7 @@ theorem up_le_up {s t : Set α} : s.up ≤ t.up ↔ s ⊆ t :=
 
 /- warning: set_semiring.up_lt_up -> SetSemiring.up_lt_up is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) s t)
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toHasLt.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) s t)
 but is expected to have type
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLT.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.instHasSSubsetSet.{u1} α) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.up_lt_up SetSemiring.up_lt_upₓ'. -/
@@ -97,7 +97,7 @@ theorem down_subset_down {s t : SetSemiring α} : s.down ⊆ t.down ↔ s ≤ t
 
 /- warning: set_semiring.down_ssubset_down -> SetSemiring.down_ssubset_down is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) s t)
+  forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toHasLt.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) s t)
 but is expected to have type
   forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.instHasSSubsetSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.down_ssubset_down SetSemiring.down_ssubset_downₓ'. -/
@@ -165,7 +165,7 @@ theorem Set.up_union (s t : Set α) : (s ∪ t).up = s.up + t.up :=
 
 /- warning: set_semiring.covariant_class_add -> SetSemiring.covariantClass_add is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
+  forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
   forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.498 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.500 : SetSemiring.{u1} α) => HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) x._@.Mathlib.Data.Set.Semiring._hyg.498 x._@.Mathlib.Data.Set.Semiring._hyg.500) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.513 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.515 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.513 x._@.Mathlib.Data.Set.Semiring._hyg.515)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_add SetSemiring.covariantClass_addₓ'. -/
@@ -220,7 +220,7 @@ instance : NoZeroDivisors (SetSemiring α) :=
 
 /- warning: set_semiring.covariant_class_mul_left -> SetSemiring.covariantClass_mul_left is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.786 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.788 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.786 x._@.Mathlib.Data.Set.Semiring._hyg.788) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.801 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.803 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.801 x._@.Mathlib.Data.Set.Semiring._hyg.803)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_mul_left SetSemiring.covariantClass_mul_leftₓ'. -/
@@ -230,7 +230,7 @@ instance covariantClass_mul_left : CovariantClass (SetSemiring α) (SetSemiring
 
 /- warning: set_semiring.covariant_class_mul_right -> SetSemiring.covariantClass_mul_right is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toHasLe.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.846 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.848 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.846 x._@.Mathlib.Data.Set.Semiring._hyg.848)) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.861 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.863 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.861 x._@.Mathlib.Data.Set.Semiring._hyg.863)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_mul_right SetSemiring.covariantClass_mul_rightₓ'. -/
Diff
@@ -71,7 +71,7 @@ protected theorem up_down (s : SetSemiring α) : s.down.up = s :=
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t)
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLE.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t)
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LE.le.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLE.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.up_le_up SetSemiring.up_le_upₓ'. -/
 -- TODO: These lemmas are not tagged `simp` because `set.le_eq_subset` simplifies the LHS
 theorem up_le_up {s t : Set α} : s.up ≤ t.up ↔ s ⊆ t :=
@@ -82,7 +82,7 @@ theorem up_le_up {s t : Set α} : s.up ≤ t.up ↔ s ⊆ t :=
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) s t)
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLT.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.instHasSSubsetSet.{u1} α) s t)
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α}, Iff (LT.lt.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (Preorder.toLT.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (PartialOrder.toPreorder.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) s) (instPartialOrderSetSemiring.{u1} α))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) t)) (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.instHasSSubsetSet.{u1} α) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.up_lt_up SetSemiring.up_lt_upₓ'. -/
 theorem up_lt_up {s t : Set α} : s.up < t.up ↔ s ⊂ t :=
   Iff.rfl
@@ -99,7 +99,7 @@ theorem down_subset_down {s t : SetSemiring α} : s.down ⊆ t.down ↔ s ≤ t
 lean 3 declaration is
   forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} (Set.{u1} α) (Set.hasSsubset.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))) s t)
 but is expected to have type
-  forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.instHasSSubsetSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) s t)
+  forall {α : Type.{u1}} {s : SetSemiring.{u1} α} {t : SetSemiring.{u1} α}, Iff (HasSSubset.SSubset.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.instHasSSubsetSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)) (LT.lt.{u1} (SetSemiring.{u1} α) (Preorder.toLT.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) s t)
 Case conversion may be inaccurate. Consider using '#align set_semiring.down_ssubset_down SetSemiring.down_ssubset_downₓ'. -/
 @[simp]
 theorem down_ssubset_down {s t : SetSemiring α} : s.down ⊂ t.down ↔ s < t :=
@@ -119,7 +119,7 @@ instance : AddCommMonoid (SetSemiring α)
 lean 3 declaration is
   forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (OfNat.mk.{u1} (SetSemiring.{u1} α) 0 (Zero.zero.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasZero.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α))))))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α)))
 but is expected to have type
-  forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (Zero.toOfNat0.{u1} (SetSemiring.{u1} α) (AddMonoid.toZero.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
+  forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (Zero.toOfNat0.{u1} (SetSemiring.{u1} α) (AddMonoid.toZero.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.zero_def SetSemiring.zero_defₓ'. -/
 theorem zero_def : (0 : SetSemiring α) = Set.up ∅ :=
   rfl
@@ -143,7 +143,7 @@ theorem Set.up_empty : (∅ : Set α).up = 0 :=
 lean 3 declaration is
   forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α))))) s t) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
 but is expected to have type
-  forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
+  forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.add_def SetSemiring.add_defₓ'. -/
 theorem add_def (s t : SetSemiring α) : s + t = (s.down ∪ t.down).up :=
   rfl
@@ -167,7 +167,7 @@ theorem Set.up_union (s t : Set α) : (s ∪ t).up = s.up + t.up :=
 lean 3 declaration is
   forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
-  forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.470 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.472 : SetSemiring.{u1} α) => HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) x._@.Mathlib.Data.Set.Semiring._hyg.470 x._@.Mathlib.Data.Set.Semiring._hyg.472) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.485 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.487 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.485 x._@.Mathlib.Data.Set.Semiring._hyg.487)
+  forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.498 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.500 : SetSemiring.{u1} α) => HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) x._@.Mathlib.Data.Set.Semiring._hyg.498 x._@.Mathlib.Data.Set.Semiring._hyg.500) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.513 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.515 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.513 x._@.Mathlib.Data.Set.Semiring._hyg.515)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_add SetSemiring.covariantClass_addₓ'. -/
 /- Since addition on `set_semiring` is commutative (it is set union), there is no need
 to also have the instance `covariant_class (set_semiring α) (set_semiring α) (swap (+)) (≤)`. -/
@@ -192,7 +192,7 @@ instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))) s t) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} (Set.{u1} α) (Set.{u1} α) (Set.{u1} α) (instHMul.{u1} (Set.{u1} α) (Set.mul.{u1} α _inst_1)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) s) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) t) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) s) (instHMul.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.mul.{u1} α _inst_1)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) t) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) (instHMul.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.mul.{u1} α _inst_1)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.mul_def SetSemiring.mul_defₓ'. -/
 theorem mul_def (s t : SetSemiring α) : s * t = (s.down * t.down).up :=
   rfl
@@ -222,7 +222,7 @@ instance : NoZeroDivisors (SetSemiring α) :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.746 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.748 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.746 x._@.Mathlib.Data.Set.Semiring._hyg.748) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.761 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.763 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.761 x._@.Mathlib.Data.Set.Semiring._hyg.763)
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.786 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.788 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.786 x._@.Mathlib.Data.Set.Semiring._hyg.788) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.801 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.803 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.801 x._@.Mathlib.Data.Set.Semiring._hyg.803)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_mul_left SetSemiring.covariantClass_mul_leftₓ'. -/
 instance covariantClass_mul_left : CovariantClass (SetSemiring α) (SetSemiring α) (· * ·) (· ≤ ·) :=
   ⟨fun a b c => mul_subset_mul_left⟩
@@ -232,7 +232,7 @@ instance covariantClass_mul_left : CovariantClass (SetSemiring α) (SetSemiring
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.806 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.808 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.806 x._@.Mathlib.Data.Set.Semiring._hyg.808)) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.821 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.823 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.821 x._@.Mathlib.Data.Set.Semiring._hyg.823)
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.846 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.848 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.846 x._@.Mathlib.Data.Set.Semiring._hyg.848)) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.861 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.863 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.861 x._@.Mathlib.Data.Set.Semiring._hyg.863)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_mul_right SetSemiring.covariantClass_mul_rightₓ'. -/
 instance covariantClass_mul_right :
     CovariantClass (SetSemiring α) (SetSemiring α) (swap (· * ·)) (· ≤ ·) :=
@@ -251,7 +251,7 @@ instance : One (SetSemiring α) where one := Set.up 1
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (OfNat.mk.{u1} (SetSemiring.{u1} α) 1 (One.one.{u1} (SetSemiring.{u1} α) (SetSemiring.hasOne.{u1} α _inst_1)))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (OfNat.mk.{u1} (Set.{u1} α) 1 (One.one.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1)))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (One.toOfNat1.{u1} (SetSemiring.{u1} α) (SetSemiring.instOneSetSemiring.{u1} α _inst_1))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (One.toOfNat1.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1))))
+  forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (One.toOfNat1.{u1} (SetSemiring.{u1} α) (SetSemiring.instOneSetSemiring.{u1} α _inst_1))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (One.toOfNat1.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1))))
 Case conversion may be inaccurate. Consider using '#align set_semiring.one_def SetSemiring.one_defₓ'. -/
 theorem one_def : (1 : SetSemiring α) = Set.up 1 :=
   rfl
@@ -319,7 +319,7 @@ def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) s) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s)))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) s) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.image_hom_def SetSemiring.imageHom_defₓ'. -/
 theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
     imageHom f s = (image f s.down).up :=
@@ -330,7 +330,7 @@ theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (Set.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) => (SetSemiring.{u2} β) -> (Set.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (SetSemiring.down.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s)) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} β) => Set.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (a : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.{u1} β) (fun (_x : SetSemiring.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} β) => Set.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.down.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} β) => Set.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (a : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.{u1} β) (fun (_x : SetSemiring.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u1} β) => Set.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.down.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s))
 Case conversion may be inaccurate. Consider using '#align set_semiring.down_image_hom SetSemiring.down_imageHomₓ'. -/
 @[simp]
 theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
@@ -342,7 +342,7 @@ theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Se
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : Set.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) s)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : Set.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (a : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.{u2} α) (fun (_x : Set.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u2} α) => SetSemiring.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.up.{u2} α) s))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : Set.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} β) => SetSemiring.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (a : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.{u2} α) (fun (_x : Set.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Set.{u2} α) => SetSemiring.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.up.{u2} α) s))
 Case conversion may be inaccurate. Consider using '#align set.up_image Set.up_imageₓ'. -/
 @[simp]
 theorem Set.up_image [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set α) :
Diff
@@ -319,7 +319,7 @@ def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) s) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s)))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) s) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s)))
 Case conversion may be inaccurate. Consider using '#align set_semiring.image_hom_def SetSemiring.imageHom_defₓ'. -/
 theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
     imageHom f s = (image f s.down).up :=
@@ -330,7 +330,7 @@ theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (Set.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) => (SetSemiring.{u2} β) -> (Set.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (SetSemiring.down.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s)) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} β) => Set.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (a : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.{u1} β) (fun (_x : SetSemiring.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} β) => Set.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.down.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} β) => Set.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (a : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.{u1} β) (fun (_x : SetSemiring.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} β) => Set.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.down.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s))
 Case conversion may be inaccurate. Consider using '#align set_semiring.down_image_hom SetSemiring.down_imageHomₓ'. -/
 @[simp]
 theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
@@ -342,7 +342,7 @@ theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Se
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : Set.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) s)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : Set.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (a : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.{u2} α) (fun (_x : Set.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u2} α) => SetSemiring.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.up.{u2} α) s))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : Set.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (a : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.{u2} α) (fun (_x : Set.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u2} α) => SetSemiring.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.up.{u2} α) s))
 Case conversion may be inaccurate. Consider using '#align set.up_image Set.up_imageₓ'. -/
 @[simp]
 theorem Set.up_image [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set α) :
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module data.set.semiring
-! leanprover-community/mathlib commit a51ce54990930d581a2cb15d5299b906b5e4fb4c
+! leanprover-community/mathlib commit 62e8311c791f02c47451bf14aa2501048e7c2f33
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -200,7 +200,7 @@ theorem mul_def (s t : SetSemiring α) : s * t = (s.down * t.down).up :=
 
 #print SetSemiring.down_mul /-
 @[simp]
-theorem down_mul (s t : SetSemiring α) : (s + t).down = s.down ∪ t.down :=
+theorem down_mul (s t : SetSemiring α) : (s * t).down = s.down * t.down :=
   rfl
 #align set_semiring.down_mul SetSemiring.down_mul
 -/
@@ -308,12 +308,47 @@ Case conversion may be inaccurate. Consider using '#align set_semiring.image_hom
 with respect to the pointwise operations on sets. -/
 def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α →+* SetSemiring β
     where
-  toFun := image f
+  toFun s := (image f s.down).up
   map_zero' := image_empty _
-  map_one' := by rw [image_one, map_one, singleton_one]
+  map_one' := by rw [down_one, image_one, map_one, singleton_one, Set.up_one]
   map_add' := image_union _
   map_mul' _ _ := image_mul f
 #align set_semiring.image_hom SetSemiring.imageHom
 
+/- warning: set_semiring.image_hom_def -> SetSemiring.imageHom_def is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s)))
+but is expected to have type
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) s) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s)))
+Case conversion may be inaccurate. Consider using '#align set_semiring.image_hom_def SetSemiring.imageHom_defₓ'. -/
+theorem imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
+    imageHom f s = (image f s.down).up :=
+  rfl
+#align set_semiring.image_hom_def SetSemiring.imageHom_def
+
+/- warning: set_semiring.down_image_hom -> SetSemiring.down_imageHom is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : SetSemiring.{u1} α), Eq.{succ u2} (Set.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) => (SetSemiring.{u2} β) -> (Set.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (SetSemiring.{u2} β) (Set.{u2} β)) (SetSemiring.down.{u2} β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) s)) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s))
+but is expected to have type
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : SetSemiring.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} β) => Set.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (a : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.{u1} β) (fun (_x : SetSemiring.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} β) => Set.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} β) (Set.{u1} β)) (SetSemiring.down.{u1} β) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) s)) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u2} α) => Set.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (SetSemiring.{u2} α) (Set.{u2} α)) (SetSemiring.down.{u2} α) s))
+Case conversion may be inaccurate. Consider using '#align set_semiring.down_image_hom SetSemiring.down_imageHomₓ'. -/
+@[simp]
+theorem down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
+    (imageHom f s).down = f '' s.down :=
+  rfl
+#align set_semiring.down_image_hom SetSemiring.down_imageHom
+
+/- warning: set.up_image -> Set.up_image is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : MulOneClass.{u1} α] [_inst_2 : MulOneClass.{u2} β] (f : MonoidHom.{u1, u2} α β _inst_1 _inst_2) (s : Set.{u1} α), Eq.{succ u2} (SetSemiring.{u2} β) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (fun (_x : Equiv.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) => (Set.{u2} β) -> (SetSemiring.{u2} β)) (Equiv.hasCoeToFun.{succ u2, succ u2} (Set.{u2} β) (SetSemiring.{u2} β)) (Set.up.{u2} β) (Set.image.{u1, u2} α β (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} α β _inst_1 _inst_2) (fun (_x : MonoidHom.{u1, u2} α β _inst_1 _inst_2) => α -> β) (MonoidHom.hasCoeToFun.{u1, u2} α β _inst_1 _inst_2) f) s)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (fun (_x : RingHom.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) => (SetSemiring.{u1} α) -> (SetSemiring.{u2} β)) (RingHom.hasCoeToFun.{u1, u2} (SetSemiring.{u1} α) (SetSemiring.{u2} β) (SetSemiring.nonAssocSemiring.{u1} α _inst_1) (SetSemiring.nonAssocSemiring.{u2} β _inst_2)) (SetSemiring.imageHom.{u1, u2} α β _inst_1 _inst_2 f) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) s))
+but is expected to have type
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : MulOneClass.{u2} α] [_inst_2 : MulOneClass.{u1} β] (f : MonoidHom.{u2, u1} α β _inst_1 _inst_2) (s : Set.{u2} α), Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (a : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.{u1} β) (fun (_x : Set.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} β) => SetSemiring.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} β) (SetSemiring.{u1} β)) (Set.up.{u1} β) (Set.image.{u2, u1} α β (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β (MulOneClass.toMul.{u2} α _inst_1) (MulOneClass.toMul.{u1} β _inst_2) (MonoidHomClass.toMulHomClass.{max u2 u1, u2, u1} (MonoidHom.{u2, u1} α β _inst_1 _inst_2) α β _inst_1 _inst_2 (MonoidHom.monoidHomClass.{u2, u1} α β _inst_1 _inst_2))) f) s)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (fun (_x : SetSemiring.{u2} α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : SetSemiring.{u2} α) => SetSemiring.{u1} β) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonUnitalNonAssocSemiring.toMul.{u2} (SetSemiring.{u2} α) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (SetSemiring.{u2} α) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2)) (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2) (RingHom.instRingHomClassRingHom.{u2, u1} (SetSemiring.{u2} α) (SetSemiring.{u1} β) (SetSemiring.instNonAssocSemiringSetSemiring.{u2} α _inst_1) (SetSemiring.instNonAssocSemiringSetSemiring.{u1} β _inst_2))))) (SetSemiring.imageHom.{u2, u1} α β _inst_1 _inst_2 f) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.{u2} α) (fun (_x : Set.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u2} α) => SetSemiring.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (Set.{u2} α) (SetSemiring.{u2} α)) (Set.up.{u2} α) s))
+Case conversion may be inaccurate. Consider using '#align set.up_image Set.up_imageₓ'. -/
+@[simp]
+theorem Set.up_image [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set α) :
+    (f '' s).up = imageHom f s.up :=
+  rfl
+#align set.up_image Set.up_image
+
 end SetSemiring
 
Diff
@@ -115,39 +115,59 @@ instance : AddCommMonoid (SetSemiring α)
   add_zero := union_empty
   add_comm := union_comm
 
+/- warning: set_semiring.zero_def -> SetSemiring.zero_def is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (OfNat.mk.{u1} (SetSemiring.{u1} α) 0 (Zero.zero.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasZero.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α))))))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.hasEmptyc.{u1} α)))
+but is expected to have type
+  forall {α : Type.{u1}}, Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 0 (Zero.toOfNat0.{u1} (SetSemiring.{u1} α) (AddMonoid.toZero.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (EmptyCollection.emptyCollection.{u1} (Set.{u1} α) (Set.instEmptyCollectionSet.{u1} α)))
+Case conversion may be inaccurate. Consider using '#align set_semiring.zero_def SetSemiring.zero_defₓ'. -/
 theorem zero_def : (0 : SetSemiring α) = Set.up ∅ :=
   rfl
 #align set_semiring.zero_def SetSemiring.zero_def
 
+#print SetSemiring.down_zero /-
 @[simp]
 theorem down_zero : (0 : SetSemiring α).down = ∅ :=
   rfl
 #align set_semiring.down_zero SetSemiring.down_zero
+-/
 
+#print Set.up_empty /-
 @[simp]
 theorem Set.up_empty : (∅ : Set α).up = 0 :=
   rfl
 #align set.up_empty Set.up_empty
+-/
 
+/- warning: set_semiring.add_def -> SetSemiring.add_def is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α))))) s t) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
+but is expected to have type
+  forall {α : Type.{u1}} (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
+Case conversion may be inaccurate. Consider using '#align set_semiring.add_def SetSemiring.add_defₓ'. -/
 theorem add_def (s t : SetSemiring α) : s + t = (s.down ∪ t.down).up :=
   rfl
 #align set_semiring.add_def SetSemiring.add_def
 
+#print SetSemiring.down_add /-
 @[simp]
 theorem down_add (s t : SetSemiring α) : (s + t).down = s.down ∪ t.down :=
   rfl
 #align set_semiring.down_add SetSemiring.down_add
+-/
 
+#print Set.up_union /-
 @[simp]
 theorem Set.up_union (s t : Set α) : (s ∪ t).up = s.up + t.up :=
   rfl
 #align set.up_union Set.up_union
+-/
 
 /- warning: set_semiring.covariant_class_add -> SetSemiring.covariantClass_add is a dubious translation:
 lean 3 declaration is
   forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
-  forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.341 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.343 : SetSemiring.{u1} α) => HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) x._@.Mathlib.Data.Set.Semiring._hyg.341 x._@.Mathlib.Data.Set.Semiring._hyg.343) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.356 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.358 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.356 x._@.Mathlib.Data.Set.Semiring._hyg.358)
+  forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.470 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.472 : SetSemiring.{u1} α) => HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.instAddCommMonoidSetSemiring.{u1} α))))) x._@.Mathlib.Data.Set.Semiring._hyg.470 x._@.Mathlib.Data.Set.Semiring._hyg.472) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.485 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.487 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.485 x._@.Mathlib.Data.Set.Semiring._hyg.487)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_add SetSemiring.covariantClass_addₓ'. -/
 /- Since addition on `set_semiring` is commutative (it is set union), there is no need
 to also have the instance `covariant_class (set_semiring α) (set_semiring α) (swap (+)) (≤)`. -/
@@ -168,19 +188,29 @@ instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
     left_distrib := fun _ _ _ => mul_union
     right_distrib := fun _ _ _ => union_mul }
 
+/- warning: set_semiring.mul_def -> SetSemiring.mul_def is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))) s t) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} (Set.{u1} α) (Set.{u1} α) (Set.{u1} α) (instHMul.{u1} (Set.{u1} α) (Set.mul.{u1} α _inst_1)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) => (SetSemiring.{u1} α) -> (Set.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] (s : SetSemiring.{u1} α) (t : SetSemiring.{u1} α), Eq.{succ u1} (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) s t) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) s) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) t) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) s) (instHMul.{u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) s) (Set.mul.{u1} α _inst_1)) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) s) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.{u1} α) (fun (_x : SetSemiring.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : SetSemiring.{u1} α) => Set.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (SetSemiring.{u1} α) (Set.{u1} α)) (SetSemiring.down.{u1} α) t)))
+Case conversion may be inaccurate. Consider using '#align set_semiring.mul_def SetSemiring.mul_defₓ'. -/
 theorem mul_def (s t : SetSemiring α) : s * t = (s.down * t.down).up :=
   rfl
 #align set_semiring.mul_def SetSemiring.mul_def
 
+#print SetSemiring.down_mul /-
 @[simp]
 theorem down_mul (s t : SetSemiring α) : (s + t).down = s.down ∪ t.down :=
   rfl
 #align set_semiring.down_mul SetSemiring.down_mul
+-/
 
+#print Set.up_mul /-
 @[simp]
 theorem Set.up_mul (s t : Set α) : (s * t).up = s.up * t.up :=
   rfl
 #align set.up_mul Set.up_mul
+-/
 
 instance : NoZeroDivisors (SetSemiring α) :=
   ⟨fun a b ab =>
@@ -192,7 +222,7 @@ instance : NoZeroDivisors (SetSemiring α) :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.533 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.535 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.533 x._@.Mathlib.Data.Set.Semiring._hyg.535) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.548 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.550 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.548 x._@.Mathlib.Data.Set.Semiring._hyg.550)
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.746 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.748 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.746 x._@.Mathlib.Data.Set.Semiring._hyg.748) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.761 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.763 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.761 x._@.Mathlib.Data.Set.Semiring._hyg.763)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_mul_left SetSemiring.covariantClass_mul_leftₓ'. -/
 instance covariantClass_mul_left : CovariantClass (SetSemiring α) (SetSemiring α) (· * ·) (· ≤ ·) :=
   ⟨fun a b c => mul_subset_mul_left⟩
@@ -202,7 +232,7 @@ instance covariantClass_mul_left : CovariantClass (SetSemiring α) (SetSemiring
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (Distrib.toHasMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toDistrib.{u1} (SetSemiring.{u1} α) (SetSemiring.nonUnitalNonAssocSemiring.{u1} α _inst_1)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.593 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.595 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.593 x._@.Mathlib.Data.Set.Semiring._hyg.595)) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.608 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.610 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.608 x._@.Mathlib.Data.Set.Semiring._hyg.610)
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α], CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (Function.swap.{succ u1, succ u1, succ u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (fun (ᾰ : SetSemiring.{u1} α) (ᾰ : SetSemiring.{u1} α) => SetSemiring.{u1} α) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.806 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.808 : SetSemiring.{u1} α) => HMul.hMul.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHMul.{u1} (SetSemiring.{u1} α) (NonUnitalNonAssocSemiring.toMul.{u1} (SetSemiring.{u1} α) (SetSemiring.instNonUnitalNonAssocSemiringSetSemiring.{u1} α _inst_1))) x._@.Mathlib.Data.Set.Semiring._hyg.806 x._@.Mathlib.Data.Set.Semiring._hyg.808)) (fun (x._@.Mathlib.Data.Set.Semiring._hyg.821 : SetSemiring.{u1} α) (x._@.Mathlib.Data.Set.Semiring._hyg.823 : SetSemiring.{u1} α) => LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (instPartialOrderSetSemiring.{u1} α))) x._@.Mathlib.Data.Set.Semiring._hyg.821 x._@.Mathlib.Data.Set.Semiring._hyg.823)
 Case conversion may be inaccurate. Consider using '#align set_semiring.covariant_class_mul_right SetSemiring.covariantClass_mul_rightₓ'. -/
 instance covariantClass_mul_right :
     CovariantClass (SetSemiring α) (SetSemiring α) (swap (· * ·)) (· ≤ ·) :=
@@ -217,19 +247,29 @@ variable [One α]
 
 instance : One (SetSemiring α) where one := Set.up 1
 
+/- warning: set_semiring.one_def -> SetSemiring.one_def is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (OfNat.mk.{u1} (SetSemiring.{u1} α) 1 (One.one.{u1} (SetSemiring.{u1} α) (SetSemiring.hasOne.{u1} α _inst_1)))) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (fun (_x : Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) => (Set.{u1} α) -> (SetSemiring.{u1} α)) (Equiv.hasCoeToFun.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (OfNat.mk.{u1} (Set.{u1} α) 1 (One.one.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1)))))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : One.{u1} α], Eq.{succ u1} (SetSemiring.{u1} α) (OfNat.ofNat.{u1} (SetSemiring.{u1} α) 1 (One.toOfNat1.{u1} (SetSemiring.{u1} α) (SetSemiring.instOneSetSemiring.{u1} α _inst_1))) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.{u1} α) (fun (_x : Set.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Set.{u1} α) => SetSemiring.{u1} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (Set.{u1} α) (SetSemiring.{u1} α)) (Set.up.{u1} α) (OfNat.ofNat.{u1} (Set.{u1} α) 1 (One.toOfNat1.{u1} (Set.{u1} α) (Set.one.{u1} α _inst_1))))
+Case conversion may be inaccurate. Consider using '#align set_semiring.one_def SetSemiring.one_defₓ'. -/
 theorem one_def : (1 : SetSemiring α) = Set.up 1 :=
   rfl
 #align set_semiring.one_def SetSemiring.one_def
 
+#print SetSemiring.down_one /-
 @[simp]
 theorem down_one : (1 : SetSemiring α).down = 1 :=
   rfl
 #align set_semiring.down_one SetSemiring.down_one
+-/
 
+#print Set.up_one /-
 @[simp]
 theorem Set.up_one : (1 : Set α).up = 1 :=
   rfl
 #align set.up_one Set.up_one
+-/
 
 end One
 
Diff
@@ -4,10 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module data.set.semiring
-! leanprover-community/mathlib commit f2f413b9d4be3a02840d0663dace76e8fe3da053
+! leanprover-community/mathlib commit a51ce54990930d581a2cb15d5299b906b5e4fb4c
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
+import Mathbin.Algebra.Order.Kleene
 import Mathbin.Data.Set.Pointwise.Smul
 
 /-!
@@ -114,6 +115,34 @@ instance : AddCommMonoid (SetSemiring α)
   add_zero := union_empty
   add_comm := union_comm
 
+theorem zero_def : (0 : SetSemiring α) = Set.up ∅ :=
+  rfl
+#align set_semiring.zero_def SetSemiring.zero_def
+
+@[simp]
+theorem down_zero : (0 : SetSemiring α).down = ∅ :=
+  rfl
+#align set_semiring.down_zero SetSemiring.down_zero
+
+@[simp]
+theorem Set.up_empty : (∅ : Set α).up = 0 :=
+  rfl
+#align set.up_empty Set.up_empty
+
+theorem add_def (s t : SetSemiring α) : s + t = (s.down ∪ t.down).up :=
+  rfl
+#align set_semiring.add_def SetSemiring.add_def
+
+@[simp]
+theorem down_add (s t : SetSemiring α) : (s + t).down = s.down ∪ t.down :=
+  rfl
+#align set_semiring.down_add SetSemiring.down_add
+
+@[simp]
+theorem Set.up_union (s t : Set α) : (s ∪ t).up = s.up + t.up :=
+  rfl
+#align set.up_union Set.up_union
+
 /- warning: set_semiring.covariant_class_add -> SetSemiring.covariantClass_add is a dubious translation:
 lean 3 declaration is
   forall {α : Type.{u1}}, CovariantClass.{u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (HAdd.hAdd.{u1, u1, u1} (SetSemiring.{u1} α) (SetSemiring.{u1} α) (SetSemiring.{u1} α) (instHAdd.{u1} (SetSemiring.{u1} α) (AddZeroClass.toHasAdd.{u1} (SetSemiring.{u1} α) (AddMonoid.toAddZeroClass.{u1} (SetSemiring.{u1} α) (AddCommMonoid.toAddMonoid.{u1} (SetSemiring.{u1} α) (SetSemiring.addCommMonoid.{u1} α)))))) (LE.le.{u1} (SetSemiring.{u1} α) (Preorder.toLE.{u1} (SetSemiring.{u1} α) (PartialOrder.toPreorder.{u1} (SetSemiring.{u1} α) (SetSemiring.partialOrder.{u1} α))))
@@ -131,7 +160,7 @@ section Mul
 variable [Mul α]
 
 instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
-  {
+  {-- reducibility linter complains if we use `(s.down * t.down).up`
     SetSemiring.addCommMonoid with
     mul := fun s t => (image2 (· * ·) s.down t.down).up
     zero_mul := fun s => empty_mul
@@ -139,6 +168,20 @@ instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
     left_distrib := fun _ _ _ => mul_union
     right_distrib := fun _ _ _ => union_mul }
 
+theorem mul_def (s t : SetSemiring α) : s * t = (s.down * t.down).up :=
+  rfl
+#align set_semiring.mul_def SetSemiring.mul_def
+
+@[simp]
+theorem down_mul (s t : SetSemiring α) : (s + t).down = s.down ∪ t.down :=
+  rfl
+#align set_semiring.down_mul SetSemiring.down_mul
+
+@[simp]
+theorem Set.up_mul (s t : Set α) : (s * t).up = s.up * t.up :=
+  rfl
+#align set.up_mul Set.up_mul
+
 instance : NoZeroDivisors (SetSemiring α) :=
   ⟨fun a b ab =>
     a.eq_empty_or_nonempty.imp_right fun ha =>
@@ -168,6 +211,28 @@ instance covariantClass_mul_right :
 
 end Mul
 
+section One
+
+variable [One α]
+
+instance : One (SetSemiring α) where one := Set.up 1
+
+theorem one_def : (1 : SetSemiring α) = Set.up 1 :=
+  rfl
+#align set_semiring.one_def SetSemiring.one_def
+
+@[simp]
+theorem down_one : (1 : SetSemiring α).down = 1 :=
+  rfl
+#align set_semiring.down_one SetSemiring.down_one
+
+@[simp]
+theorem Set.up_one : (1 : Set α).up = 1 :=
+  rfl
+#align set.up_one Set.up_one
+
+end One
+
 instance [MulOneClass α] : NonAssocSemiring (SetSemiring α) :=
   { SetSemiring.nonUnitalNonAssocSemiring,
     Set.mulOneClass with
@@ -177,14 +242,17 @@ instance [MulOneClass α] : NonAssocSemiring (SetSemiring α) :=
 instance [Semigroup α] : NonUnitalSemiring (SetSemiring α) :=
   { SetSemiring.nonUnitalNonAssocSemiring, Set.semigroup with }
 
-instance [Monoid α] : Semiring (SetSemiring α) :=
-  { SetSemiring.nonAssocSemiring, SetSemiring.nonUnitalSemiring with }
+instance [Monoid α] : IdemSemiring (SetSemiring α) :=
+  { SetSemiring.nonAssocSemiring, SetSemiring.nonUnitalSemiring, Set.completeBooleanAlgebra with }
 
 instance [CommSemigroup α] : NonUnitalCommSemiring (SetSemiring α) :=
   { SetSemiring.nonUnitalSemiring, Set.commSemigroup with }
 
+instance [CommMonoid α] : IdemCommSemiring (SetSemiring α) :=
+  { SetSemiring.idemSemiring, Set.commMonoid with }
+
 instance [CommMonoid α] : CanonicallyOrderedCommSemiring (SetSemiring α) :=
-  { SetSemiring.semiring, Set.commMonoid, SetSemiring.partialOrder _, SetSemiring.orderBot _,
+  { SetSemiring.idemSemiring, Set.commMonoid,
     SetSemiring.noZeroDivisors with
     add_le_add_left := fun a b => add_le_add_left
     exists_add_of_le := fun a b ab => ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩

Changes in mathlib4

mathlib3
mathlib4
chore: classify broken dot notation porting notes (#11429)

Classifies by adding issue number #11036 to porting notes claiming:

dot notation no longer works

Diff
@@ -55,36 +55,36 @@ protected def down : SetSemiring α ≃ Set α :=
 open SetSemiring (down)
 open Set (up)
 
--- Porting note: dot notation no longer works
+-- Porting note (#11036): dot notation no longer works
 @[simp]
 protected theorem down_up (s : Set α) : SetSemiring.down (Set.up s) = s :=
   rfl
 #align set_semiring.down_up SetSemiring.down_up
 
--- Porting note: dot notation no longer works
+-- Porting note (#11036): dot notation no longer works
 @[simp]
 protected theorem up_down (s : SetSemiring α) : Set.up (SetSemiring.down s) = s :=
   rfl
 #align set_semiring.up_down SetSemiring.up_down
 
 -- TODO: These lemmas are not tagged `simp` because `Set.le_eq_subset` simplifies the LHS
--- Porting note: dot notation no longer works
+-- Porting note (#11036): dot notation no longer works
 theorem up_le_up {s t : Set α} : Set.up s ≤ Set.up t ↔ s ⊆ t :=
   Iff.rfl
 #align set_semiring.up_le_up SetSemiring.up_le_up
 
--- Porting note: dot notation no longer works
+-- Porting note (#11036): dot notation no longer works
 theorem up_lt_up {s t : Set α} : Set.up s < Set.up t ↔ s ⊂ t :=
   Iff.rfl
 #align set_semiring.up_lt_up SetSemiring.up_lt_up
 
--- Porting note: dot notation no longer works
+-- Porting note (#11036): dot notation no longer works
 @[simp]
 theorem down_subset_down {s t : SetSemiring α} : SetSemiring.down s ⊆ SetSemiring.down t ↔ s ≤ t :=
   Iff.rfl
 #align set_semiring.down_subset_down SetSemiring.down_subset_down
 
--- Porting note: dot notation no longer works
+-- Porting note (#11036): dot notation no longer works
 @[simp]
 theorem down_ssubset_down {s t : SetSemiring α} : SetSemiring.down s ⊂ SetSemiring.down t ↔ s < t :=
   Iff.rfl
@@ -94,7 +94,7 @@ instance : Zero (SetSemiring α) where zero := Set.up (∅ : Set α)
 
 instance : Add (SetSemiring α) where add s t := Set.up (SetSemiring.down s ∪ SetSemiring.down t)
 
--- Porting note: dot notation no longer works
+-- Porting note (#11036): dot notation no longer works
 instance : AddCommMonoid (SetSemiring α) where
   add_assoc := union_assoc
   zero_add := empty_union
@@ -140,7 +140,7 @@ section Mul
 
 variable [Mul α]
 
--- Porting note: dot notation no longer works
+-- Porting note (#11036): dot notation no longer works
 instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
   { (inferInstance : AddCommMonoid (SetSemiring α)) with
     mul := fun s t => Set.up (image2 (· * ·) (SetSemiring.down s) (SetSemiring.down t))
refactor: do not allow nsmul and zsmul to default automatically (#6262)

This PR removes the default values for nsmul and zsmul, forcing the user to populate them manually. The previous behavior can be obtained by writing nsmul := nsmulRec and zsmul := zsmulRec, which is now in the docstring for these fields.

The motivation here is to make it more obvious when module diamonds are being introduced, or at least where they might be hiding; you can now simply search for nsmulRec in the source code.

Arguably we should do the same thing for intCast, natCast, pow, and zpow too, but diamonds are less common in those fields, so I'll leave them to a subsequent PR.

Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -90,14 +90,17 @@ theorem down_ssubset_down {s t : SetSemiring α} : SetSemiring.down s ⊂ SetSem
   Iff.rfl
 #align set_semiring.down_ssubset_down SetSemiring.down_ssubset_down
 
+instance : Zero (SetSemiring α) where zero := Set.up (∅ : Set α)
+
+instance : Add (SetSemiring α) where add s t := Set.up (SetSemiring.down s ∪ SetSemiring.down t)
+
 -- Porting note: dot notation no longer works
 instance : AddCommMonoid (SetSemiring α) where
-  add s t := Set.up (SetSemiring.down s ∪ SetSemiring.down t)
-  zero := Set.up (∅ : Set α)
   add_assoc := union_assoc
   zero_add := empty_union
   add_zero := union_empty
   add_comm := union_comm
+  nsmul := nsmulRec
 
 theorem zero_def : (0 : SetSemiring α) = Set.up ∅ :=
   rfl
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -51,46 +51,46 @@ protected def down : SetSemiring α ≃ Set α :=
   Equiv.refl _
 #align set_semiring.down SetSemiring.down
 
---Porting note: new, since dot notation doesn't work
+-- Porting note: new, since dot notation doesn't work
 open SetSemiring (down)
 open Set (up)
 
---Porting note: dot notation no longer works
+-- Porting note: dot notation no longer works
 @[simp]
 protected theorem down_up (s : Set α) : SetSemiring.down (Set.up s) = s :=
   rfl
 #align set_semiring.down_up SetSemiring.down_up
 
---Porting note: dot notation no longer works
+-- Porting note: dot notation no longer works
 @[simp]
 protected theorem up_down (s : SetSemiring α) : Set.up (SetSemiring.down s) = s :=
   rfl
 #align set_semiring.up_down SetSemiring.up_down
 
 -- TODO: These lemmas are not tagged `simp` because `Set.le_eq_subset` simplifies the LHS
---Porting note: dot notation no longer works
+-- Porting note: dot notation no longer works
 theorem up_le_up {s t : Set α} : Set.up s ≤ Set.up t ↔ s ⊆ t :=
   Iff.rfl
 #align set_semiring.up_le_up SetSemiring.up_le_up
 
---Porting note: dot notation no longer works
+-- Porting note: dot notation no longer works
 theorem up_lt_up {s t : Set α} : Set.up s < Set.up t ↔ s ⊂ t :=
   Iff.rfl
 #align set_semiring.up_lt_up SetSemiring.up_lt_up
 
---Porting note: dot notation no longer works
+-- Porting note: dot notation no longer works
 @[simp]
 theorem down_subset_down {s t : SetSemiring α} : SetSemiring.down s ⊆ SetSemiring.down t ↔ s ≤ t :=
   Iff.rfl
 #align set_semiring.down_subset_down SetSemiring.down_subset_down
 
---Porting note: dot notation no longer works
+-- Porting note: dot notation no longer works
 @[simp]
 theorem down_ssubset_down {s t : SetSemiring α} : SetSemiring.down s ⊂ SetSemiring.down t ↔ s < t :=
   Iff.rfl
 #align set_semiring.down_ssubset_down SetSemiring.down_ssubset_down
 
---Porting note: dot notation no longer works
+-- Porting note: dot notation no longer works
 instance : AddCommMonoid (SetSemiring α) where
   add s t := Set.up (SetSemiring.down s ∪ SetSemiring.down t)
   zero := Set.up (∅ : Set α)
@@ -137,7 +137,7 @@ section Mul
 
 variable [Mul α]
 
---Porting note: dot notation no longer works
+-- Porting note: dot notation no longer works
 instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
   { (inferInstance : AddCommMonoid (SetSemiring α)) with
     mul := fun s t => Set.up (image2 (· * ·) (SetSemiring.down s) (SetSemiring.down t))
@@ -239,7 +239,7 @@ def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α
   toFun s := up (image f (down s))
   map_zero' := image_empty _
   map_one' := by
-    dsimp only  -- porting note: structures do not do this automatically any more
+    dsimp only  -- Porting note: structures do not do this automatically any more
     rw [down_one, image_one, map_one, singleton_one, up_one]
   map_add' := image_union _
   map_mul' _ _ := image_mul f
chore: reduce imports (#9830)

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

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

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
 import Mathlib.Algebra.Order.Kleene
-import Mathlib.Data.Set.Pointwise.SMul
+import Mathlib.Data.Set.Pointwise.Basic
 
 #align_import data.set.semiring from "leanprover-community/mathlib"@"62e8311c791f02c47451bf14aa2501048e7c2f33"
 
chore: Make Set/Finset lemmas match lattice lemma names (#7378)

Rename union_eq_left_iff_subset to union_eq_left to match sup_eq_left. Similarly for the right and inter versions.

Diff
@@ -229,7 +229,7 @@ instance [CommMonoid α] : CanonicallyOrderedCommSemiring (SetSemiring α) :=
     (inferInstance : PartialOrder (SetSemiring α)), (inferInstance : OrderBot (SetSemiring α)),
     (inferInstance : NoZeroDivisors (SetSemiring α)) with
     add_le_add_left := fun _ _ => add_le_add_left
-    exists_add_of_le := fun {_ b} ab => ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩
+    exists_add_of_le := fun {_ b} ab => ⟨b, (union_eq_right.2 ab).symm⟩
     le_self_add := subset_union_left }
 
 /-- The image of a set under a multiplicative homomorphism is a ring homomorphism
perf: remove overspecified fields (#6965)

This removes redundant field values of the form add := add for smaller terms and less unfolding during unification.

A list of all files containing a structure instance of the form { a1, ... with x1 := val, ... } where some xi is a field of some aj was generated by modifying the structure instance elaboration algorithm to print such overlaps to stdout in a custom toolchain.

Using that toolchain, I went through each file on the list and attempted to remove algebraic fields that overlapped and were redundant, eg add := add and not toFun (though some other ones did creep in). If things broke (which was the case in a couple of cases), I did not push further and reverted.

It is possible that pushing harder and trying to remove all redundant overlaps will yield further improvements.

Diff
@@ -204,9 +204,7 @@ end One
 
 instance [MulOneClass α] : NonAssocSemiring (SetSemiring α) :=
   { (inferInstance : NonUnitalNonAssocSemiring (SetSemiring α)),
-    Set.mulOneClass with
-    one := 1
-    mul := (· * ·) }
+    Set.mulOneClass with }
 
 instance [Semigroup α] : NonUnitalSemiring (SetSemiring α) :=
   { (inferInstance : NonUnitalNonAssocSemiring (SetSemiring α)), Set.semigroup with }
chore: banish Type _ and Sort _ (#6499)

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

This has nice performance benefits.

Diff
@@ -21,22 +21,22 @@ open Function Set
 
 open Pointwise
 
-variable {α β : Type _}
+variable {α β : Type*}
 
 -- Porting note: mathlib3 uses `deriving Inhabited, PartialOrder, OrderBot`
 /-- An alias for `Set α`, which has a semiring structure given by `∪` as "addition" and pointwise
   multiplication `*` as "multiplication". -/
-def SetSemiring (α : Type _) : Type _ :=
+def SetSemiring (α : Type*) : Type _ :=
   Set α
 #align set_semiring SetSemiring
 
-noncomputable instance (α : Type _) : Inhabited (SetSemiring α) :=
+noncomputable instance (α : Type*) : Inhabited (SetSemiring α) :=
   (inferInstance : Inhabited (Set _))
 
-instance (α : Type _) : PartialOrder (SetSemiring α) :=
+instance (α : Type*) : PartialOrder (SetSemiring α) :=
   (inferInstance : PartialOrder (Set _))
 
-instance (α : Type _) : OrderBot (SetSemiring α) :=
+instance (α : Type*) : OrderBot (SetSemiring α) :=
   (inferInstance : OrderBot (Set _))
 
 /-- The identity function `Set α → SetSemiring α`. -/
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,15 +2,12 @@
 Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module data.set.semiring
-! leanprover-community/mathlib commit 62e8311c791f02c47451bf14aa2501048e7c2f33
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Order.Kleene
 import Mathlib.Data.Set.Pointwise.SMul
 
+#align_import data.set.semiring from "leanprover-community/mathlib"@"62e8311c791f02c47451bf14aa2501048e7c2f33"
+
 /-!
 # Sets as a semiring under union
 
feat: add compile_inductive% and compile_def% commands (#4097)

Add a #compile inductive command to compile the recursors of an inductive type, which works by creating a recursive definition and using @[csimp].

Co-authored-by: Parth Shastri <31370288+cppio@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -187,8 +187,7 @@ section One
 
 variable [One α]
 
--- porting note: noncomputable?
-noncomputable instance : One (SetSemiring α) where one := Set.up (1 : Set α)
+instance : One (SetSemiring α) where one := Set.up (1 : Set α)
 
 theorem one_def : (1 : SetSemiring α) = Set.up 1 :=
   rfl
chore: update SHA (#2912)

This records leanprover-community/mathlib#18539 as already forward-ported; the actual typo fix was included in #2518.

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module data.set.semiring
-! leanprover-community/mathlib commit 27b54c47c3137250a521aa64e9f1db90be5f6a26
+! leanprover-community/mathlib commit 62e8311c791f02c47451bf14aa2501048e7c2f33
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
Diff
@@ -4,10 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module data.set.semiring
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
+! leanprover-community/mathlib commit 27b54c47c3137250a521aa64e9f1db90be5f6a26
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
+import Mathlib.Algebra.Order.Kleene
 import Mathlib.Data.Set.Pointwise.SMul
 
 /-!
@@ -53,6 +54,10 @@ protected def down : SetSemiring α ≃ Set α :=
   Equiv.refl _
 #align set_semiring.down SetSemiring.down
 
+--Porting note: new, since dot notation doesn't work
+open SetSemiring (down)
+open Set (up)
+
 --Porting note: dot notation no longer works
 @[simp]
 protected theorem down_up (s : Set α) : SetSemiring.down (Set.up s) = s :=
@@ -97,6 +102,34 @@ instance : AddCommMonoid (SetSemiring α) where
   add_zero := union_empty
   add_comm := union_comm
 
+theorem zero_def : (0 : SetSemiring α) = Set.up ∅ :=
+  rfl
+#align set_semiring.zero_def SetSemiring.zero_def
+
+@[simp]
+theorem down_zero : down (0 : SetSemiring α) = ∅ :=
+  rfl
+#align set_semiring.down_zero SetSemiring.down_zero
+
+@[simp]
+theorem _root_.Set.up_empty : Set.up (∅ : Set α) = 0 :=
+  rfl
+#align set.up_empty Set.up_empty
+
+theorem add_def (s t : SetSemiring α) : s + t = up (down s ∪ down t) :=
+  rfl
+#align set_semiring.add_def SetSemiring.add_def
+
+@[simp]
+theorem down_add (s t : SetSemiring α) : down (s + t) = down s ∪ down t :=
+  rfl
+#align set_semiring.down_add SetSemiring.down_add
+
+@[simp]
+theorem _root_.Set.up_union (s t : Set α) : up (s ∪ t) = up s + up t :=
+  rfl
+#align set.up_union Set.up_union
+
 /- Since addition on `SetSemiring` is commutative (it is set union), there is no need
 to also have the instance `CovariantClass (SetSemiring α) (SetSemiring α) (swap (+)) (≤)`. -/
 instance covariantClass_add : CovariantClass (SetSemiring α) (SetSemiring α) (· + ·) (· ≤ ·) :=
@@ -116,6 +149,21 @@ instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
     left_distrib := fun _ _ _ => mul_union
     right_distrib := fun _ _ _ => union_mul }
 
+-- TODO: port
+theorem mul_def (s t : SetSemiring α) : s * t = up (down s * down t) :=
+  rfl
+#align set_semiring.mul_def SetSemiring.mul_def
+
+@[simp]
+theorem down_mul (s t : SetSemiring α) : down (s * t) = down s * down t :=
+  rfl
+#align set_semiring.down_mul SetSemiring.down_mul
+
+@[simp]
+theorem _root_.Set.up_mul (s t : Set α) : up (s * t) = up s * up t :=
+  rfl
+#align set.up_mul Set.up_mul
+
 instance : NoZeroDivisors (SetSemiring α) :=
   ⟨fun {a b} ab =>
     a.eq_empty_or_nonempty.imp_right fun ha =>
@@ -134,23 +182,51 @@ instance covariantClass_mul_right :
 
 end Mul
 
--- Porting note: this was `one := 1`
+
+section One
+
+variable [One α]
+
+-- porting note: noncomputable?
+noncomputable instance : One (SetSemiring α) where one := Set.up (1 : Set α)
+
+theorem one_def : (1 : SetSemiring α) = Set.up 1 :=
+  rfl
+#align set_semiring.one_def SetSemiring.one_def
+
+@[simp]
+theorem down_one : down (1 : SetSemiring α) = 1 :=
+  rfl
+#align set_semiring.down_one SetSemiring.down_one
+
+@[simp]
+theorem _root_.Set.up_one : up (1 : Set α) = 1 :=
+  rfl
+#align set.up_one Set.up_one
+
+end One
+
 instance [MulOneClass α] : NonAssocSemiring (SetSemiring α) :=
   { (inferInstance : NonUnitalNonAssocSemiring (SetSemiring α)),
     Set.mulOneClass with
-    one := Set.up ({1} : Set α)
+    one := 1
     mul := (· * ·) }
 
 instance [Semigroup α] : NonUnitalSemiring (SetSemiring α) :=
   { (inferInstance : NonUnitalNonAssocSemiring (SetSemiring α)), Set.semigroup with }
 
-instance [Monoid α] : Semiring (SetSemiring α) :=
+instance [Monoid α] : IdemSemiring (SetSemiring α) :=
   { (inferInstance : NonAssocSemiring (SetSemiring α)),
-    (inferInstance : NonUnitalSemiring (SetSemiring α)) with }
+    (inferInstance : NonUnitalSemiring (SetSemiring α)),
+    (inferInstance : CompleteBooleanAlgebra (Set α)) with }
 
 instance [CommSemigroup α] : NonUnitalCommSemiring (SetSemiring α) :=
   { (inferInstance : NonUnitalSemiring (SetSemiring α)), Set.commSemigroup with }
 
+instance [CommMonoid α] : IdemCommSemiring (SetSemiring α) :=
+  { (inferInstance : IdemSemiring (SetSemiring α)),
+    (inferInstance : CommMonoid (Set α)) with }
+
 instance [CommMonoid α] : CommMonoid (SetSemiring α) :=
   { (inferInstance : Monoid (SetSemiring α)), Set.commSemigroup with }
 
@@ -166,11 +242,30 @@ instance [CommMonoid α] : CanonicallyOrderedCommSemiring (SetSemiring α) :=
 with respect to the pointwise operations on sets. -/
 def imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) : SetSemiring α →+* SetSemiring β
     where
-  toFun := image f
+  toFun s := up (image f (down s))
   map_zero' := image_empty _
-  map_one' := by rw [image_one, map_one, singleton_one]
+  map_one' := by
+    dsimp only  -- porting note: structures do not do this automatically any more
+    rw [down_one, image_one, map_one, singleton_one, up_one]
   map_add' := image_union _
   map_mul' _ _ := image_mul f
 #align set_semiring.image_hom SetSemiring.imageHom
 
+lemma imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
+    imageHom f s = up (image f (down s)) :=
+  rfl
+#align set_semiring.image_hom_def SetSemiring.imageHom_def
+
+@[simp]
+lemma down_imageHom [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
+    down (imageHom f s) = f '' down s :=
+  rfl
+#align set_semiring.down_image_hom SetSemiring.down_imageHom
+
+@[simp]
+lemma _root_.Set.up_image [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set α) :
+    up (f '' s) = imageHom f (up s) :=
+  rfl
+#align set.up_image Set.up_image
+
 end SetSemiring
chore: tidy various files (#2009)
Diff
@@ -159,7 +159,7 @@ instance [CommMonoid α] : CanonicallyOrderedCommSemiring (SetSemiring α) :=
     (inferInstance : PartialOrder (SetSemiring α)), (inferInstance : OrderBot (SetSemiring α)),
     (inferInstance : NoZeroDivisors (SetSemiring α)) with
     add_le_add_left := fun _ _ => add_le_add_left
-    exists_add_of_le := @fun _ b ab => ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩
+    exists_add_of_le := fun {_ b} ab => ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩
     le_self_add := subset_union_left }
 
 /-- The image of a set under a multiplicative homomorphism is a ring homomorphism
chore: make variables implicit (#1545)

Corresponds to [#18167](https://github.com/leanprover-community/mathlib/pull/18167).

Diff
@@ -156,11 +156,11 @@ instance [CommMonoid α] : CommMonoid (SetSemiring α) :=
 
 instance [CommMonoid α] : CanonicallyOrderedCommSemiring (SetSemiring α) :=
   { (inferInstance : Semiring (SetSemiring α)), (inferInstance : CommMonoid (SetSemiring α)),
-    (inferInstance : PartialOrder (SetSemiring α)), (inferInstance : OrderBot (SetSemiring α)) with
+    (inferInstance : PartialOrder (SetSemiring α)), (inferInstance : OrderBot (SetSemiring α)),
+    (inferInstance : NoZeroDivisors (SetSemiring α)) with
     add_le_add_left := fun _ _ => add_le_add_left
     exists_add_of_le := @fun _ b ab => ⟨b, (union_eq_right_iff_subset.2 ab).symm⟩
-    le_self_add := subset_union_left
-    eq_zero_or_eq_zero_of_mul_eq_zero := fun _ _ ab => eq_zero_or_eq_zero_of_smul_eq_zero ab }
+    le_self_add := subset_union_left }
 
 /-- The image of a set under a multiplicative homomorphism is a ring homomorphism
 with respect to the pointwise operations on sets. -/
chore: tidy various files (#1595)
Diff
@@ -89,8 +89,7 @@ theorem down_ssubset_down {s t : SetSemiring α} : SetSemiring.down s ⊂ SetSem
 #align set_semiring.down_ssubset_down SetSemiring.down_ssubset_down
 
 --Porting note: dot notation no longer works
-instance : AddCommMonoid (SetSemiring α)
-    where
+instance : AddCommMonoid (SetSemiring α) where
   add s t := Set.up (SetSemiring.down s ∪ SetSemiring.down t)
   zero := Set.up (∅ : Set α)
   add_assoc := union_assoc
@@ -100,9 +99,9 @@ instance : AddCommMonoid (SetSemiring α)
 
 /- Since addition on `SetSemiring` is commutative (it is set union), there is no need
 to also have the instance `CovariantClass (SetSemiring α) (SetSemiring α) (swap (+)) (≤)`. -/
-instance covariant_class_add : CovariantClass (SetSemiring α) (SetSemiring α) (· + ·) (· ≤ ·) :=
+instance covariantClass_add : CovariantClass (SetSemiring α) (SetSemiring α) (· + ·) (· ≤ ·) :=
   ⟨fun _ _ _ => union_subset_union_right _⟩
-#align set_semiring.covariant_class_add SetSemiring.covariant_class_add
+#align set_semiring.covariant_class_add SetSemiring.covariantClass_add
 
 section Mul
 
@@ -118,20 +117,20 @@ instance : NonUnitalNonAssocSemiring (SetSemiring α) :=
     right_distrib := fun _ _ _ => union_mul }
 
 instance : NoZeroDivisors (SetSemiring α) :=
-  ⟨@fun a b ab =>
+  ⟨fun {a b} ab =>
     a.eq_empty_or_nonempty.imp_right fun ha =>
       b.eq_empty_or_nonempty.resolve_right fun hb =>
         Nonempty.ne_empty ⟨_, mul_mem_mul ha.some_mem hb.some_mem⟩ ab⟩
 
-instance covariant_class_mul_left :
+instance covariantClass_mul_left :
     CovariantClass (SetSemiring α) (SetSemiring α) (· * ·) (· ≤ ·) :=
   ⟨fun _ _ _ => mul_subset_mul_left⟩
-#align set_semiring.covariant_class_mul_left SetSemiring.covariant_class_mul_left
+#align set_semiring.covariant_class_mul_left SetSemiring.covariantClass_mul_left
 
-instance covariant_class_mul_right :
+instance covariantClass_mul_right :
     CovariantClass (SetSemiring α) (SetSemiring α) (swap (· * ·)) (· ≤ ·) :=
   ⟨fun _ _ _ => mul_subset_mul_right⟩
-#align set_semiring.covariant_class_mul_right SetSemiring.covariant_class_mul_right
+#align set_semiring.covariant_class_mul_right SetSemiring.covariantClass_mul_right
 
 end Mul
 
feat: Port Data.Set.Semiring (#1535)

Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>

Dependencies 3 + 166

167 files ported (98.2%)
69092 lines ported (98.5%)
Show graph

The unported dependencies are