order.heightMathlib.Order.Height

This file has been ported!

Changes since the initial port

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

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import Data.Enat.Lattice
+import Data.ENat.Lattice
 import Order.OrderIsoNat
 import Tactic.Tfae
 
Diff
@@ -115,13 +115,13 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     ∃ l ∈ s.subchain, length l = n :=
   by
   cases' (le_top : s.chain_height ≤ ⊤).eq_or_lt with ha ha <;>
-    rw [chain_height_eq_supr_subtype] at ha 
+    rw [chain_height_eq_supr_subtype] at ha
   · obtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ :=
       not_bdd_above_iff'.mp ((WithTop.iSup_coe_eq_top _).mp ha) n
     exact
       ⟨l.take n, ⟨h₁.take _, fun x h => h₂ _ <| take_subset _ _ h⟩,
         (l.length_take n).trans <| min_eq_left <| le_of_not_ge h₃⟩
-  · rw [WithTop.iSup_coe_lt_top] at ha 
+  · rw [WithTop.iSup_coe_lt_top] at ha
     obtain ⟨⟨l, h₁, h₂⟩, e : l.length = _⟩ := Nat.sSup_mem (Set.range_nonempty _) ha
     refine'
       ⟨l.take n, ⟨h₁.take _, fun x h => h₂ _ <| take_subset _ _ h⟩,
@@ -281,7 +281,7 @@ theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y)
     induction' l with x xs hx
     · exact fun _ => ⟨nil, ⟨trivial, fun _ h => h.elim⟩, rfl⟩
     · intro h
-      rw [cons_mem_subchain_iff] at h 
+      rw [cons_mem_subchain_iff] at h
       obtain ⟨⟨x, hx', rfl⟩, h₁, h₂⟩ := h
       obtain ⟨l', h₃, rfl⟩ := hx h₁
       refine' ⟨x::l', set.cons_mem_subchain_iff.mpr ⟨hx', h₃, _⟩, rfl⟩
@@ -386,7 +386,7 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
     exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
   refine' le_trans _ (add_le_add hl₁ hl₂)
   simp_rw [← WithTop.coe_add, WithTop.coe_le_coe, ← Multiset.coe_card, ← Multiset.card_add, ←
-    Multiset.coe_filter]
+    Multiset.filter_coe]
   rw [Multiset.filter_add_filter, multiset.filter_eq_self.mpr, Multiset.card_add]
   exacts [le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
@@ -408,7 +408,7 @@ theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b
   obtain ⟨l', hl', rfl⟩ := exists_chain_of_le_chain_height t h.symm.le
   refine' ⟨l ++ l', ⟨chain'.append hl.1 hl'.1 fun x hx y hy => _, fun i hi => _⟩, by simp⟩
   · exact H x (hl.2 _ <| mem_of_mem_last' hx) y (hl'.2 _ <| mem_of_mem_head' hy)
-  · rw [mem_append] at hi ; cases hi; exacts [Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]
+  · rw [mem_append] at hi; cases hi; exacts [Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]
 #align set.chain_height_union_eq Set.chainHeight_union_eq
 -/
 
Diff
@@ -371,7 +371,24 @@ theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
 -/
 
 #print Set.chainHeight_union_le /-
-theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by classical
+theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
+  classical
+  refine' iSup₂_le fun l hl => _
+  let l₁ := l.filter (· ∈ s)
+  let l₂ := l.filter (· ∈ t)
+  have hl₁ : ↑l₁.length ≤ s.chain_height :=
+    by
+    apply Set.length_le_chainHeight_of_mem_subchain
+    exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
+  have hl₂ : ↑l₂.length ≤ t.chain_height :=
+    by
+    apply Set.length_le_chainHeight_of_mem_subchain
+    exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
+  refine' le_trans _ (add_le_add hl₁ hl₂)
+  simp_rw [← WithTop.coe_add, WithTop.coe_le_coe, ← Multiset.coe_card, ← Multiset.card_add, ←
+    Multiset.coe_filter]
+  rw [Multiset.filter_add_filter, multiset.filter_eq_self.mpr, Multiset.card_add]
+  exacts [le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
 -/
 
Diff
@@ -371,24 +371,7 @@ theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
 -/
 
 #print Set.chainHeight_union_le /-
-theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
-  classical
-  refine' iSup₂_le fun l hl => _
-  let l₁ := l.filter (· ∈ s)
-  let l₂ := l.filter (· ∈ t)
-  have hl₁ : ↑l₁.length ≤ s.chain_height :=
-    by
-    apply Set.length_le_chainHeight_of_mem_subchain
-    exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
-  have hl₂ : ↑l₂.length ≤ t.chain_height :=
-    by
-    apply Set.length_le_chainHeight_of_mem_subchain
-    exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
-  refine' le_trans _ (add_le_add hl₁ hl₂)
-  simp_rw [← WithTop.coe_add, WithTop.coe_le_coe, ← Multiset.coe_card, ← Multiset.card_add, ←
-    Multiset.coe_filter]
-  rw [Multiset.filter_add_filter, multiset.filter_eq_self.mpr, Multiset.card_add]
-  exacts [le_add_right rfl.le, hl.2]
+theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by classical
 #align set.chain_height_union_le Set.chainHeight_union_le
 -/
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import Mathbin.Data.Enat.Lattice
-import Mathbin.Order.OrderIsoNat
-import Mathbin.Tactic.Tfae
+import Data.Enat.Lattice
+import Order.OrderIsoNat
+import Tactic.Tfae
 
 #align_import order.height from "leanprover-community/mathlib"@"25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module order.height
-! leanprover-community/mathlib commit 25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Enat.Lattice
 import Mathbin.Order.OrderIsoNat
 import Mathbin.Tactic.Tfae
 
+#align_import order.height from "leanprover-community/mathlib"@"25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e"
+
 /-!
 
 # Maximal length of chains
Diff
@@ -107,10 +107,13 @@ noncomputable def chainHeight : ℕ∞ :=
 #align set.chain_height Set.chainHeight
 -/
 
+#print Set.chainHeight_eq_iSup_subtype /-
 theorem chainHeight_eq_iSup_subtype : s.chainHeight = ⨆ l : s.subchain, l.1.length :=
   iSup_subtype'
 #align set.chain_height_eq_supr_subtype Set.chainHeight_eq_iSup_subtype
+-/
 
+#print Set.exists_chain_of_le_chainHeight /-
 theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     ∃ l ∈ s.subchain, length l = n :=
   by
@@ -128,7 +131,9 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
         (l.length_take n).trans <| min_eq_left <| _⟩
     rwa [e, ← WithTop.coe_le_coe, sSup_range, WithTop.coe_iSup _ ha, ← chain_height_eq_supr_subtype]
 #align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeight
+-/
 
+#print Set.le_chainHeight_TFAE /-
 theorem le_chainHeight_TFAE (n : ℕ) :
     TFAE [↑n ≤ s.chainHeight, ∃ l ∈ s.subchain, length l = n, ∃ l ∈ s.subchain, n ≤ length l] :=
   by
@@ -137,17 +142,23 @@ theorem le_chainHeight_TFAE (n : ℕ) :
   tfae_have 3 → 1; · rintro ⟨l, hs, hn⟩; exact le_iSup₂_of_le l hs (WithTop.coe_le_coe.2 hn)
   tfae_finish
 #align set.le_chain_height_tfae Set.le_chainHeight_TFAE
+-/
 
 variable {s t}
 
+#print Set.le_chainHeight_iff /-
 theorem le_chainHeight_iff {n : ℕ} : ↑n ≤ s.chainHeight ↔ ∃ l ∈ s.subchain, length l = n :=
   (le_chainHeight_TFAE s n).out 0 1
 #align set.le_chain_height_iff Set.le_chainHeight_iff
+-/
 
+#print Set.length_le_chainHeight_of_mem_subchain /-
 theorem length_le_chainHeight_of_mem_subchain (hl : l ∈ s.subchain) : ↑l.length ≤ s.chainHeight :=
   le_chainHeight_iff.mpr ⟨l, hl, rfl⟩
 #align set.length_le_chain_height_of_mem_subchain Set.length_le_chainHeight_of_mem_subchain
+-/
 
+#print Set.chainHeight_eq_top_iff /-
 theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subchain, length l = n :=
   by
   refine' ⟨fun h n => le_chain_height_iff.1 (le_top.trans_eq h.symm), fun h => _⟩
@@ -157,7 +168,9 @@ theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subc
       (Nat.lt_succ_iff.2 <|
           WithTop.coe_le_coe.1 <| (length_le_chain_height_of_mem_subchain hs).trans_eq hn.symm).Ne⟩
 #align set.chain_height_eq_top_iff Set.chainHeight_eq_top_iff
+-/
 
+#print Set.one_le_chainHeight_iff /-
 @[simp]
 theorem one_le_chainHeight_iff : 1 ≤ s.chainHeight ↔ s.Nonempty :=
   by
@@ -170,6 +183,7 @@ theorem one_le_chainHeight_iff : 1 ≤ s.chainHeight ↔ s.Nonempty :=
   · rintro ⟨x, hx⟩
     exact ⟨[x], ⟨chain.nil, fun y h => (list.mem_singleton.mp h).symm ▸ hx⟩, rfl⟩
 #align set.one_le_chain_height_iff Set.one_le_chainHeight_iff
+-/
 
 #print Set.chainHeight_eq_zero_iff /-
 @[simp]
@@ -193,11 +207,14 @@ theorem chainHeight_of_isEmpty [IsEmpty α] : s.chainHeight = 0 :=
 #align set.chain_height_of_is_empty Set.chainHeight_of_isEmpty
 -/
 
+#print Set.le_chainHeight_add_nat_iff /-
 theorem le_chainHeight_add_nat_iff {n m : ℕ} :
     ↑n ≤ s.chainHeight + m ↔ ∃ l ∈ s.subchain, n ≤ length l + m := by
   simp_rw [← tsub_le_iff_right, ← WithTop.coe_sub, (le_chain_height_tfae s (n - m)).out 0 2]
 #align set.le_chain_height_add_nat_iff Set.le_chainHeight_add_nat_iff
+-/
 
+#print Set.chainHeight_add_le_chainHeight_add /-
 theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ) :
     s.chainHeight + n ≤ t.chainHeight + m ↔
       ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l + n ≤ length l' + m :=
@@ -219,7 +236,9 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
     rw [← hk, ← hl]
     exact le_chain_height_add_nat_iff.2 (H l hs)
 #align set.chain_height_add_le_chain_height_add Set.chainHeight_add_le_chainHeight_add
+-/
 
+#print Set.chainHeight_le_chainHeight_TFAE /-
 theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
     TFAE
       [s.chainHeight ≤ t.chainHeight, ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l',
@@ -231,22 +250,30 @@ theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
     simp_rw [← (le_chain_height_tfae t l.length).out 1 2, eq_comm]
   tfae_finish
 #align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_TFAE
+-/
 
+#print Set.chainHeight_le_chainHeight_iff /-
 theorem chainHeight_le_chainHeight_iff {t : Set β} :
     s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l' :=
   (chainHeight_le_chainHeight_TFAE s t).out 0 1
 #align set.chain_height_le_chain_height_iff Set.chainHeight_le_chainHeight_iff
+-/
 
+#print Set.chainHeight_le_chainHeight_iff_le /-
 theorem chainHeight_le_chainHeight_iff_le {t : Set β} :
     s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l' :=
   (chainHeight_le_chainHeight_TFAE s t).out 0 2
 #align set.chain_height_le_chain_height_iff_le Set.chainHeight_le_chainHeight_iff_le
+-/
 
+#print Set.chainHeight_mono /-
 theorem chainHeight_mono (h : s ⊆ t) : s.chainHeight ≤ t.chainHeight :=
   chainHeight_le_chainHeight_iff.2 fun l hl => ⟨l, ⟨hl.1, fun i hi => h <| hl.2 i hi⟩, rfl⟩
 #align set.chain_height_mono Set.chainHeight_mono
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Set.chainHeight_image /-
 theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y) (s : Set α) :
     (f '' s).chainHeight = s.chainHeight :=
   by
@@ -268,6 +295,7 @@ theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y)
     · intro _ e; obtain ⟨a, ha, rfl⟩ := mem_map.mp e; exact Set.mem_image_of_mem _ (hl.2 _ ha)
     · rw [length_map]
 #align set.chain_height_image Set.chainHeight_image
+-/
 
 variable (s)
 
@@ -289,6 +317,7 @@ section Preorder
 
 variable (s t : Set α) [Preorder α]
 
+#print Set.chainHeight_eq_iSup_Ici /-
 theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i).chainHeight :=
   by
   apply le_antisymm
@@ -303,14 +332,18 @@ theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i)
       exact (h' _ hi).le
   · exact iSup₂_le fun i hi => chain_height_mono <| Set.inter_subset_left _ _
 #align set.chain_height_eq_supr_Ici Set.chainHeight_eq_iSup_Ici
+-/
 
+#print Set.chainHeight_eq_iSup_Iic /-
 theorem chainHeight_eq_iSup_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight := by
   simp_rw [← chain_height_dual (_ ∩ _)]; rw [← chain_height_dual, chain_height_eq_supr_Ici]; rfl
 #align set.chain_height_eq_supr_Iic Set.chainHeight_eq_iSup_Iic
+-/
 
 variable {s t}
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Set.chainHeight_insert_of_forall_gt /-
 theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
     (insert a s).chainHeight = s.chainHeight + 1 :=
   by
@@ -331,12 +364,16 @@ theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
     · rw [chain'_cons']; exact ⟨fun y hy => hx _ (hl.2 _ (mem_of_mem_head' hy)), hl.1⟩
     · rintro x (rfl | hx); exacts [Or.inl (Set.mem_singleton x), Or.inr (hl.2 x hx)]
 #align set.chain_height_insert_of_forall_gt Set.chainHeight_insert_of_forall_gt
+-/
 
+#print Set.chainHeight_insert_of_forall_lt /-
 theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
     (insert a s).chainHeight = s.chainHeight + 1 := by
   rw [← chain_height_dual, ← chain_height_dual s]; exact chain_height_insert_of_forall_gt _ ha
 #align set.chain_height_insert_of_forall_lt Set.chainHeight_insert_of_forall_lt
+-/
 
+#print Set.chainHeight_union_le /-
 theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
   classical
   refine' iSup₂_le fun l hl => _
@@ -356,7 +393,9 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
   rw [Multiset.filter_add_filter, multiset.filter_eq_self.mpr, Multiset.card_add]
   exacts [le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
+-/
 
+#print Set.chainHeight_union_eq /-
 theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b) :
     (s ∪ t).chainHeight = s.chainHeight + t.chainHeight :=
   by
@@ -374,6 +413,7 @@ theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b
   · exact H x (hl.2 _ <| mem_of_mem_last' hx) y (hl'.2 _ <| mem_of_mem_head' hy)
   · rw [mem_append] at hi ; cases hi; exacts [Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]
 #align set.chain_height_union_eq Set.chainHeight_union_eq
+-/
 
 #print Set.wellFoundedGT_of_chainHeight_ne_top /-
 theorem wellFoundedGT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠ ⊤) :
Diff
@@ -64,7 +64,7 @@ variable [LT α] [LT β] (s t : Set α)
 #print Set.subchain /-
 /-- The set of strictly ascending lists of `α` contained in a `set α`. -/
 def subchain : Set (List α) :=
-  { l | l.Chain' (· < ·) ∧ ∀ i ∈ l, i ∈ s }
+  {l | l.Chain' (· < ·) ∧ ∀ i ∈ l, i ∈ s}
 #align set.subchain Set.subchain
 -/
 
@@ -225,7 +225,7 @@ theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
       [s.chainHeight ≤ t.chainHeight, ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l',
         ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l'] :=
   by
-  tfae_have 1 ↔ 3; · convert← chain_height_add_le_chain_height_add s t 0 0 <;> apply add_zero
+  tfae_have 1 ↔ 3; · convert ← chain_height_add_le_chain_height_add s t 0 0 <;> apply add_zero
   tfae_have 2 ↔ 3;
   · refine' forall₂_congr fun l hl => _
     simp_rw [← (le_chain_height_tfae t l.length).out 1 2, eq_comm]
@@ -339,22 +339,22 @@ theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
 
 theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
   classical
-    refine' iSup₂_le fun l hl => _
-    let l₁ := l.filter (· ∈ s)
-    let l₂ := l.filter (· ∈ t)
-    have hl₁ : ↑l₁.length ≤ s.chain_height :=
-      by
-      apply Set.length_le_chainHeight_of_mem_subchain
-      exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
-    have hl₂ : ↑l₂.length ≤ t.chain_height :=
-      by
-      apply Set.length_le_chainHeight_of_mem_subchain
-      exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
-    refine' le_trans _ (add_le_add hl₁ hl₂)
-    simp_rw [← WithTop.coe_add, WithTop.coe_le_coe, ← Multiset.coe_card, ← Multiset.card_add, ←
-      Multiset.coe_filter]
-    rw [Multiset.filter_add_filter, multiset.filter_eq_self.mpr, Multiset.card_add]
-    exacts [le_add_right rfl.le, hl.2]
+  refine' iSup₂_le fun l hl => _
+  let l₁ := l.filter (· ∈ s)
+  let l₂ := l.filter (· ∈ t)
+  have hl₁ : ↑l₁.length ≤ s.chain_height :=
+    by
+    apply Set.length_le_chainHeight_of_mem_subchain
+    exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
+  have hl₂ : ↑l₂.length ≤ t.chain_height :=
+    by
+    apply Set.length_le_chainHeight_of_mem_subchain
+    exact ⟨hl.1.Sublist (filter_sublist _), fun i h => (of_mem_filter h : _)⟩
+  refine' le_trans _ (add_le_add hl₁ hl₂)
+  simp_rw [← WithTop.coe_add, WithTop.coe_le_coe, ← Multiset.coe_card, ← Multiset.card_add, ←
+    Multiset.coe_filter]
+  rw [Multiset.filter_add_filter, multiset.filter_eq_self.mpr, Multiset.card_add]
+  exacts [le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
 
 theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b) :
Diff
@@ -91,7 +91,7 @@ theorem cons_mem_subchain_iff :
   · rw [chain'_cons']
     exact ⟨h₃, h₂.1⟩
   · rintro i (rfl | hi)
-    exacts[h₁, h₂.2 _ hi]
+    exacts [h₁, h₂.2 _ hi]
 #align set.cons_mem_subchain_iff Set.cons_mem_subchain_iff
 -/
 
@@ -115,13 +115,13 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     ∃ l ∈ s.subchain, length l = n :=
   by
   cases' (le_top : s.chain_height ≤ ⊤).eq_or_lt with ha ha <;>
-    rw [chain_height_eq_supr_subtype] at ha
+    rw [chain_height_eq_supr_subtype] at ha 
   · obtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ :=
       not_bdd_above_iff'.mp ((WithTop.iSup_coe_eq_top _).mp ha) n
     exact
       ⟨l.take n, ⟨h₁.take _, fun x h => h₂ _ <| take_subset _ _ h⟩,
         (l.length_take n).trans <| min_eq_left <| le_of_not_ge h₃⟩
-  · rw [WithTop.iSup_coe_lt_top] at ha
+  · rw [WithTop.iSup_coe_lt_top] at ha 
     obtain ⟨⟨l, h₁, h₂⟩, e : l.length = _⟩ := Nat.sSup_mem (Set.range_nonempty _) ha
     refine'
       ⟨l.take n, ⟨h₁.take _, fun x h => h₂ _ <| take_subset _ _ h⟩,
@@ -209,7 +209,7 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
       fun H => _⟩
   by_cases s.chain_height = ⊤
   · suffices t.chain_height = ⊤ by rw [this, top_add]; exact le_top
-    rw [chain_height_eq_top_iff] at h⊢
+    rw [chain_height_eq_top_iff] at h ⊢
     intro k; rw [(le_chain_height_tfae t k).out 1 2]
     obtain ⟨l, hs, hl⟩ := h (k + m)
     obtain ⟨l', ht, hl'⟩ := H l hs
@@ -257,7 +257,7 @@ theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y)
     induction' l with x xs hx
     · exact fun _ => ⟨nil, ⟨trivial, fun _ h => h.elim⟩, rfl⟩
     · intro h
-      rw [cons_mem_subchain_iff] at h
+      rw [cons_mem_subchain_iff] at h 
       obtain ⟨⟨x, hx', rfl⟩, h₁, h₂⟩ := h
       obtain ⟨l', h₃, rfl⟩ := hx h₁
       refine' ⟨x::l', set.cons_mem_subchain_iff.mpr ⟨hx', h₃, _⟩, rfl⟩
@@ -325,11 +325,11 @@ theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
       rintro rfl
       cases' chain'_iff_pairwise.mp h.1 with _ _ hy
       cases' h'.1 with h' h'
-      exacts[(hy _ hi).Ne h', not_le_of_gt (hy _ hi) (hx _ h').le]
+      exacts [(hy _ hi).Ne h', not_le_of_gt (hy _ hi) (hx _ h').le]
   · intro l hl
     refine' ⟨a::l, ⟨_, _⟩, by simp⟩
     · rw [chain'_cons']; exact ⟨fun y hy => hx _ (hl.2 _ (mem_of_mem_head' hy)), hl.1⟩
-    · rintro x (rfl | hx); exacts[Or.inl (Set.mem_singleton x), Or.inr (hl.2 x hx)]
+    · rintro x (rfl | hx); exacts [Or.inl (Set.mem_singleton x), Or.inr (hl.2 x hx)]
 #align set.chain_height_insert_of_forall_gt Set.chainHeight_insert_of_forall_gt
 
 theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
@@ -354,7 +354,7 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
     simp_rw [← WithTop.coe_add, WithTop.coe_le_coe, ← Multiset.coe_card, ← Multiset.card_add, ←
       Multiset.coe_filter]
     rw [Multiset.filter_add_filter, multiset.filter_eq_self.mpr, Multiset.card_add]
-    exacts[le_add_right rfl.le, hl.2]
+    exacts [le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
 
 theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b) :
@@ -372,7 +372,7 @@ theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b
   obtain ⟨l', hl', rfl⟩ := exists_chain_of_le_chain_height t h.symm.le
   refine' ⟨l ++ l', ⟨chain'.append hl.1 hl'.1 fun x hx y hy => _, fun i hi => _⟩, by simp⟩
   · exact H x (hl.2 _ <| mem_of_mem_last' hx) y (hl'.2 _ <| mem_of_mem_head' hy)
-  · rw [mem_append] at hi; cases hi; exacts[Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]
+  · rw [mem_append] at hi ; cases hi; exacts [Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]
 #align set.chain_height_union_eq Set.chainHeight_union_eq
 
 #print Set.wellFoundedGT_of_chainHeight_ne_top /-
Diff
@@ -289,7 +289,6 @@ section Preorder
 
 variable (s t : Set α) [Preorder α]
 
-#print Set.chainHeight_eq_iSup_Ici /-
 theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i).chainHeight :=
   by
   apply le_antisymm
@@ -304,13 +303,10 @@ theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i)
       exact (h' _ hi).le
   · exact iSup₂_le fun i hi => chain_height_mono <| Set.inter_subset_left _ _
 #align set.chain_height_eq_supr_Ici Set.chainHeight_eq_iSup_Ici
--/
 
-#print Set.chainHeight_eq_iSup_Iic /-
 theorem chainHeight_eq_iSup_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight := by
   simp_rw [← chain_height_dual (_ ∩ _)]; rw [← chain_height_dual, chain_height_eq_supr_Ici]; rfl
 #align set.chain_height_eq_supr_Iic Set.chainHeight_eq_iSup_Iic
--/
 
 variable {s t}
 
Diff
@@ -107,22 +107,10 @@ noncomputable def chainHeight : ℕ∞ :=
 #align set.chain_height Set.chainHeight
 -/
 
-/- warning: set.chain_height_eq_supr_subtype -> Set.chainHeight_eq_iSup_subtype is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} (List.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (List.{u1} α)) (Set.subchain.{u1} α _inst_1 s)) (fun (l : coeSort.{succ u1, succ (succ u1)} (Set.{u1} (List.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (List.{u1} α)) (Set.subchain.{u1} α _inst_1 s)) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α (Subtype.val.{succ u1} (List.{u1} α) (fun (x : List.{u1} α) => Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) x (Set.subchain.{u1} α _inst_1 s)) l))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Set.Elem.{u1} (List.{u1} α) (Set.subchain.{u1} α _inst_1 s)) (fun (l : Set.Elem.{u1} (List.{u1} α) (Set.subchain.{u1} α _inst_1 s)) => Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α (Subtype.val.{succ u1} (List.{u1} α) (fun (x : List.{u1} α) => Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) x (Set.subchain.{u1} α _inst_1 s)) l))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_subtype Set.chainHeight_eq_iSup_subtypeₓ'. -/
 theorem chainHeight_eq_iSup_subtype : s.chainHeight = ⨆ l : s.subchain, l.1.length :=
   iSup_subtype'
 #align set.chain_height_eq_supr_subtype Set.chainHeight_eq_iSup_subtype
 
-/- warning: set.exists_chain_of_le_chain_height -> Set.exists_chain_of_le_chainHeight is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
-Case conversion may be inaccurate. Consider using '#align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeightₓ'. -/
 theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     ∃ l ∈ s.subchain, length l = n :=
   by
@@ -141,12 +129,6 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     rwa [e, ← WithTop.coe_le_coe, sSup_range, WithTop.coe_iSup _ ha, ← chain_height_eq_supr_subtype]
 #align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeight
 
-/- warning: set.le_chain_height_tfae -> Set.le_chainHeight_TFAE is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
-Case conversion may be inaccurate. Consider using '#align set.le_chain_height_tfae Set.le_chainHeight_TFAEₓ'. -/
 theorem le_chainHeight_TFAE (n : ℕ) :
     TFAE [↑n ≤ s.chainHeight, ∃ l ∈ s.subchain, length l = n, ∃ l ∈ s.subchain, n ≤ length l] :=
   by
@@ -158,32 +140,14 @@ theorem le_chainHeight_TFAE (n : ℕ) :
 
 variable {s t}
 
-/- warning: set.le_chain_height_iff -> Set.le_chainHeight_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
-Case conversion may be inaccurate. Consider using '#align set.le_chain_height_iff Set.le_chainHeight_iffₓ'. -/
 theorem le_chainHeight_iff {n : ℕ} : ↑n ≤ s.chainHeight ↔ ∃ l ∈ s.subchain, length l = n :=
   (le_chainHeight_TFAE s n).out 0 1
 #align set.le_chain_height_iff Set.le_chainHeight_iff
 
-/- warning: set.length_le_chain_height_of_mem_subchain -> Set.length_le_chainHeight_of_mem_subchain is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
-Case conversion may be inaccurate. Consider using '#align set.length_le_chain_height_of_mem_subchain Set.length_le_chainHeight_of_mem_subchainₓ'. -/
 theorem length_le_chainHeight_of_mem_subchain (hl : l ∈ s.subchain) : ↑l.length ≤ s.chainHeight :=
   le_chainHeight_iff.mpr ⟨l, hl, rfl⟩
 #align set.length_le_chain_height_of_mem_subchain Set.length_le_chainHeight_of_mem_subchain
 
-/- warning: set.chain_height_eq_top_iff -> Set.chainHeight_eq_top_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (Top.top.{0} ENat ENat.hasTop)) (forall (n : Nat), Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (Top.top.{0} ENat instENatTop)) (forall (n : Nat), Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_top_iff Set.chainHeight_eq_top_iffₓ'. -/
 theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subchain, length l = n :=
   by
   refine' ⟨fun h n => le_chain_height_iff.1 (le_top.trans_eq h.symm), fun h => _⟩
@@ -194,12 +158,6 @@ theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subc
           WithTop.coe_le_coe.1 <| (length_le_chain_height_of_mem_subchain hs).trans_eq hn.symm).Ne⟩
 #align set.chain_height_eq_top_iff Set.chainHeight_eq_top_iff
 
-/- warning: set.one_le_chain_height_iff -> Set.one_le_chainHeight_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne))))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
-Case conversion may be inaccurate. Consider using '#align set.one_le_chain_height_iff Set.one_le_chainHeight_iffₓ'. -/
 @[simp]
 theorem one_le_chainHeight_iff : 1 ≤ s.chainHeight ↔ s.Nonempty :=
   by
@@ -235,23 +193,11 @@ theorem chainHeight_of_isEmpty [IsEmpty α] : s.chainHeight = 0 :=
 #align set.chain_height_of_is_empty Set.chainHeight_of_isEmpty
 -/
 
-/- warning: set.le_chain_height_add_nat_iff -> Set.le_chainHeight_add_nat_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) m))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} α l) m))))
-Case conversion may be inaccurate. Consider using '#align set.le_chain_height_add_nat_iff Set.le_chainHeight_add_nat_iffₓ'. -/
 theorem le_chainHeight_add_nat_iff {n m : ℕ} :
     ↑n ≤ s.chainHeight + m ↔ ∃ l ∈ s.subchain, n ≤ length l + m := by
   simp_rw [← tsub_le_iff_right, ← WithTop.coe_sub, (le_chain_height_tfae s (n - m)).out 0 2]
 #align set.le_chain_height_add_nat_iff Set.le_chainHeight_add_nat_iff
 
-/- warning: set.chain_height_add_le_chain_height_add -> Set.chainHeight_add_le_chainHeight_add is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} β _inst_2 t) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u2} β l') m)))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} β _inst_2 t) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u2} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} β l') m)))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_add_le_chain_height_add Set.chainHeight_add_le_chainHeight_addₓ'. -/
 theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ) :
     s.chainHeight + n ≤ t.chainHeight + m ↔
       ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l + n ≤ length l' + m :=
@@ -274,12 +220,6 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
     exact le_chain_height_add_nat_iff.2 (H l hs)
 #align set.chain_height_add_le_chain_height_add Set.chainHeight_add_le_chainHeight_add
 
-/- warning: set.chain_height_le_chain_height_tfae -> Set.chainHeight_le_chainHeight_TFAE is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.nil.{0} Prop))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u2} α _inst_1 s) (Set.chainHeight.{u1} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (Eq.{1} Nat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.nil.{0} Prop))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_TFAEₓ'. -/
 theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
     TFAE
       [s.chainHeight ≤ t.chainHeight, ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l',
@@ -292,44 +232,20 @@ theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
   tfae_finish
 #align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_TFAE
 
-/- warning: set.chain_height_le_chain_height_iff -> Set.chainHeight_le_chainHeight_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff Set.chainHeight_le_chainHeight_iffₓ'. -/
 theorem chainHeight_le_chainHeight_iff {t : Set β} :
     s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l' :=
   (chainHeight_le_chainHeight_TFAE s t).out 0 1
 #align set.chain_height_le_chain_height_iff Set.chainHeight_le_chainHeight_iff
 
-/- warning: set.chain_height_le_chain_height_iff_le -> Set.chainHeight_le_chainHeight_iff_le is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l')))))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u1} α l) (List.length.{u2} β l')))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff_le Set.chainHeight_le_chainHeight_iff_leₓ'. -/
 theorem chainHeight_le_chainHeight_iff_le {t : Set β} :
     s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l' :=
   (chainHeight_le_chainHeight_TFAE s t).out 0 2
 #align set.chain_height_le_chain_height_iff_le Set.chainHeight_le_chainHeight_iff_le
 
-/- warning: set.chain_height_mono -> Set.chainHeight_mono is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_mono Set.chainHeight_monoₓ'. -/
 theorem chainHeight_mono (h : s ⊆ t) : s.chainHeight ≤ t.chainHeight :=
   chainHeight_le_chainHeight_iff.2 fun l hl => ⟨l, ⟨hl.1, fun i hi => h <| hl.2 i hi⟩, rfl⟩
 #align set.chain_height_mono Set.chainHeight_mono
 
-/- warning: set.chain_height_image -> Set.chainHeight_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (f : α -> β), (forall {x : α} {y : α}, Iff (LT.lt.{u1} α _inst_1 x y) (LT.lt.{u2} β _inst_2 (f x) (f y))) -> (forall (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (Set.chainHeight.{u1} α _inst_1 s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (f : α -> β), (forall {x : α} {y : α}, Iff (LT.lt.{u2} α _inst_1 x y) (LT.lt.{u1} β _inst_2 (f x) (f y))) -> (forall (s : Set.{u2} α), Eq.{1} ENat (Set.chainHeight.{u1} β _inst_2 (Set.image.{u2, u1} α β f s)) (Set.chainHeight.{u2} α _inst_1 s))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_image Set.chainHeight_imageₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y) (s : Set α) :
     (f '' s).chainHeight = s.chainHeight :=
@@ -398,12 +314,6 @@ theorem chainHeight_eq_iSup_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i)
 
 variable {s t}
 
-/- warning: set.chain_height_insert_of_forall_gt -> Set.chainHeight_insert_of_forall_gt is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne)))))))
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring)))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_insert_of_forall_gt Set.chainHeight_insert_of_forall_gtₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
     (insert a s).chainHeight = s.chainHeight + 1 :=
@@ -426,23 +336,11 @@ theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
     · rintro x (rfl | hx); exacts[Or.inl (Set.mem_singleton x), Or.inr (hl.2 x hx)]
 #align set.chain_height_insert_of_forall_gt Set.chainHeight_insert_of_forall_gt
 
-/- warning: set.chain_height_insert_of_forall_lt -> Set.chainHeight_insert_of_forall_lt is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne)))))))
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring)))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_insert_of_forall_lt Set.chainHeight_insert_of_forall_ltₓ'. -/
 theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
     (insert a s).chainHeight = s.chainHeight + 1 := by
   rw [← chain_height_dual, ← chain_height_dual s]; exact chain_height_insert_of_forall_gt _ ha
 #align set.chain_height_insert_of_forall_lt Set.chainHeight_insert_of_forall_lt
 
-/- warning: set.chain_height_union_le -> Set.chainHeight_union_le is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) t))
-but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_union_le Set.chainHeight_union_leₓ'. -/
 theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
   classical
     refine' iSup₂_le fun l hl => _
@@ -463,12 +361,6 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
     exacts[le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
 
-/- warning: set.chain_height_union_eq -> Set.chainHeight_union_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α), (forall (a : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) -> (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b t) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b))) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) t)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α), (forall (a : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a s) -> (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b t) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b))) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t)))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_union_eq Set.chainHeight_union_eqₓ'. -/
 theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b) :
     (s ∪ t).chainHeight = s.chainHeight + t.chainHeight :=
   by
Diff
@@ -151,12 +151,8 @@ theorem le_chainHeight_TFAE (n : ℕ) :
     TFAE [↑n ≤ s.chainHeight, ∃ l ∈ s.subchain, length l = n, ∃ l ∈ s.subchain, n ≤ length l] :=
   by
   tfae_have 1 → 2; · exact s.exists_chain_of_le_chain_height
-  tfae_have 2 → 3;
-  · rintro ⟨l, hls, he⟩
-    exact ⟨l, hls, he.ge⟩
-  tfae_have 3 → 1;
-  · rintro ⟨l, hs, hn⟩
-    exact le_iSup₂_of_le l hs (WithTop.coe_le_coe.2 hn)
+  tfae_have 2 → 3; · rintro ⟨l, hls, he⟩; exact ⟨l, hls, he.ge⟩
+  tfae_have 3 → 1; · rintro ⟨l, hs, hn⟩; exact le_iSup₂_of_le l hs (WithTop.coe_le_coe.2 hn)
   tfae_finish
 #align set.le_chain_height_tfae Set.le_chainHeight_TFAE
 
@@ -266,12 +262,9 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
         ((add_le_add_right (length_le_chain_height_of_mem_subchain h) _).trans e),
       fun H => _⟩
   by_cases s.chain_height = ⊤
-  · suffices t.chain_height = ⊤ by
-      rw [this, top_add]
-      exact le_top
+  · suffices t.chain_height = ⊤ by rw [this, top_add]; exact le_top
     rw [chain_height_eq_top_iff] at h⊢
-    intro k
-    rw [(le_chain_height_tfae t k).out 1 2]
+    intro k; rw [(le_chain_height_tfae t k).out 1 2]
     obtain ⟨l, hs, hl⟩ := h (k + m)
     obtain ⟨l', ht, hl'⟩ := H l hs
     exact ⟨l', ht, (add_le_add_iff_right m).1 <| trans (hl.symm.trans_le le_self_add) hl'⟩
@@ -342,11 +335,8 @@ theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y)
     (f '' s).chainHeight = s.chainHeight :=
   by
   apply le_antisymm <;> rw [chain_height_le_chain_height_iff]
-  · suffices ∀ l ∈ (f '' s).subchain, ∃ l' ∈ s.subchain, map f l' = l
-      by
-      intro l hl
-      obtain ⟨l', h₁, rfl⟩ := this l hl
-      exact ⟨l', h₁, length_map _ _⟩
+  · suffices ∀ l ∈ (f '' s).subchain, ∃ l' ∈ s.subchain, map f l' = l by intro l hl;
+      obtain ⟨l', h₁, rfl⟩ := this l hl; exact ⟨l', h₁, length_map _ _⟩
     intro l
     induction' l with x xs hx
     · exact fun _ => ⟨nil, ⟨trivial, fun _ h => h.elim⟩, rfl⟩
@@ -355,16 +345,11 @@ theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y)
       obtain ⟨⟨x, hx', rfl⟩, h₁, h₂⟩ := h
       obtain ⟨l', h₃, rfl⟩ := hx h₁
       refine' ⟨x::l', set.cons_mem_subchain_iff.mpr ⟨hx', h₃, _⟩, rfl⟩
-      cases l'
-      · simp
-      · simpa [← hf] using h₂
+      cases l'; · simp; · simpa [← hf] using h₂
   · intro l hl
     refine' ⟨l.map f, ⟨_, _⟩, _⟩
-    · simp_rw [chain'_map, ← hf]
-      exact hl.1
-    · intro _ e
-      obtain ⟨a, ha, rfl⟩ := mem_map.mp e
-      exact Set.mem_image_of_mem _ (hl.2 _ ha)
+    · simp_rw [chain'_map, ← hf]; exact hl.1
+    · intro _ e; obtain ⟨a, ha, rfl⟩ := mem_map.mp e; exact Set.mem_image_of_mem _ (hl.2 _ ha)
     · rw [length_map]
 #align set.chain_height_image Set.chainHeight_image
 
@@ -398,8 +383,7 @@ theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i)
     · apply le_trans _ (le_iSup₂ x (cons_mem_subchain_iff.mp h).1)
       apply length_le_chain_height_of_mem_subchain
       refine' ⟨h.1, fun i hi => ⟨h.2 i hi, _⟩⟩
-      cases hi
-      · exact hi.symm.le
+      cases hi; · exact hi.symm.le
       cases' chain'_iff_pairwise.mp h.1 with _ _ h'
       exact (h' _ hi).le
   · exact iSup₂_le fun i hi => chain_height_mono <| Set.inter_subset_left _ _
@@ -407,11 +391,8 @@ theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i)
 -/
 
 #print Set.chainHeight_eq_iSup_Iic /-
-theorem chainHeight_eq_iSup_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight :=
-  by
-  simp_rw [← chain_height_dual (_ ∩ _)]
-  rw [← chain_height_dual, chain_height_eq_supr_Ici]
-  rfl
+theorem chainHeight_eq_iSup_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight := by
+  simp_rw [← chain_height_dual (_ ∩ _)]; rw [← chain_height_dual, chain_height_eq_supr_Ici]; rfl
 #align set.chain_height_eq_supr_Iic Set.chainHeight_eq_iSup_Iic
 -/
 
@@ -441,10 +422,8 @@ theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
       exacts[(hy _ hi).Ne h', not_le_of_gt (hy _ hi) (hx _ h').le]
   · intro l hl
     refine' ⟨a::l, ⟨_, _⟩, by simp⟩
-    · rw [chain'_cons']
-      exact ⟨fun y hy => hx _ (hl.2 _ (mem_of_mem_head' hy)), hl.1⟩
-    · rintro x (rfl | hx)
-      exacts[Or.inl (Set.mem_singleton x), Or.inr (hl.2 x hx)]
+    · rw [chain'_cons']; exact ⟨fun y hy => hx _ (hl.2 _ (mem_of_mem_head' hy)), hl.1⟩
+    · rintro x (rfl | hx); exacts[Or.inl (Set.mem_singleton x), Or.inr (hl.2 x hx)]
 #align set.chain_height_insert_of_forall_gt Set.chainHeight_insert_of_forall_gt
 
 /- warning: set.chain_height_insert_of_forall_lt -> Set.chainHeight_insert_of_forall_lt is a dubious translation:
@@ -454,10 +433,8 @@ but is expected to have type
   forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring)))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_insert_of_forall_lt Set.chainHeight_insert_of_forall_ltₓ'. -/
 theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
-    (insert a s).chainHeight = s.chainHeight + 1 :=
-  by
-  rw [← chain_height_dual, ← chain_height_dual s]
-  exact chain_height_insert_of_forall_gt _ ha
+    (insert a s).chainHeight = s.chainHeight + 1 := by
+  rw [← chain_height_dual, ← chain_height_dual s]; exact chain_height_insert_of_forall_gt _ ha
 #align set.chain_height_insert_of_forall_lt Set.chainHeight_insert_of_forall_lt
 
 /- warning: set.chain_height_union_le -> Set.chainHeight_union_le is a dubious translation:
@@ -507,9 +484,7 @@ theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b
   obtain ⟨l', hl', rfl⟩ := exists_chain_of_le_chain_height t h.symm.le
   refine' ⟨l ++ l', ⟨chain'.append hl.1 hl'.1 fun x hx y hy => _, fun i hi => _⟩, by simp⟩
   · exact H x (hl.2 _ <| mem_of_mem_last' hx) y (hl'.2 _ <| mem_of_mem_head' hy)
-  · rw [mem_append] at hi
-    cases hi
-    exacts[Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]
+  · rw [mem_append] at hi; cases hi; exacts[Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]
 #align set.chain_height_union_eq Set.chainHeight_union_eq
 
 #print Set.wellFoundedGT_of_chainHeight_ne_top /-
@@ -525,10 +500,8 @@ theorem wellFoundedGT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠
         fun i h => _⟩
       _
   · exact n.succ
-  · obtain ⟨a, ha, rfl⟩ := mem_map.1 h
-    exact a.prop
-  · rw [length_map, length_of_fn]
-    exact le_rfl
+  · obtain ⟨a, ha, rfl⟩ := mem_map.1 h; exact a.prop
+  · rw [length_map, length_of_fn]; exact le_rfl
 #align set.well_founded_gt_of_chain_height_ne_top Set.wellFoundedGT_of_chainHeight_ne_top
 -/
 
Diff
@@ -119,7 +119,7 @@ theorem chainHeight_eq_iSup_subtype : s.chainHeight = ⨆ l : s.subchain, l.1.le
 
 /- warning: set.exists_chain_of_le_chain_height -> Set.exists_chain_of_le_chainHeight is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
 Case conversion may be inaccurate. Consider using '#align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeightₓ'. -/
@@ -143,7 +143,7 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
 
 /- warning: set.le_chain_height_tfae -> Set.le_chainHeight_TFAE is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_tfae Set.le_chainHeight_TFAEₓ'. -/
@@ -164,7 +164,7 @@ variable {s t}
 
 /- warning: set.le_chain_height_iff -> Set.le_chainHeight_iff is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_iff Set.le_chainHeight_iffₓ'. -/
@@ -174,7 +174,7 @@ theorem le_chainHeight_iff {n : ℕ} : ↑n ≤ s.chainHeight ↔ ∃ l ∈ s.su
 
 /- warning: set.length_le_chain_height_of_mem_subchain -> Set.length_le_chainHeight_of_mem_subchain is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
 Case conversion may be inaccurate. Consider using '#align set.length_le_chain_height_of_mem_subchain Set.length_le_chainHeight_of_mem_subchainₓ'. -/
@@ -200,7 +200,7 @@ theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subc
 
 /- warning: set.one_le_chain_height_iff -> Set.one_le_chainHeight_iff is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne))))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne))))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
 Case conversion may be inaccurate. Consider using '#align set.one_le_chain_height_iff Set.one_le_chainHeight_iffₓ'. -/
@@ -241,7 +241,7 @@ theorem chainHeight_of_isEmpty [IsEmpty α] : s.chainHeight = 0 :=
 
 /- warning: set.le_chain_height_add_nat_iff -> Set.le_chainHeight_add_nat_iff is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) m))))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) m))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} α l) m))))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_add_nat_iff Set.le_chainHeight_add_nat_iffₓ'. -/
@@ -252,7 +252,7 @@ theorem le_chainHeight_add_nat_iff {n m : ℕ} :
 
 /- warning: set.chain_height_add_le_chain_height_add -> Set.chainHeight_add_le_chainHeight_add is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} β _inst_2 t) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u2} β l') m)))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} β _inst_2 t) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u2} β l') m)))))
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} β _inst_2 t) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u2} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} β l') m)))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_add_le_chain_height_add Set.chainHeight_add_le_chainHeight_addₓ'. -/
@@ -283,7 +283,7 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
 
 /- warning: set.chain_height_le_chain_height_tfae -> Set.chainHeight_le_chainHeight_TFAE is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.nil.{0} Prop))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.nil.{0} Prop))))
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u2} α _inst_1 s) (Set.chainHeight.{u1} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (Eq.{1} Nat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.nil.{0} Prop))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_TFAEₓ'. -/
@@ -301,7 +301,7 @@ theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
 
 /- warning: set.chain_height_le_chain_height_iff -> Set.chainHeight_le_chainHeight_iff is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff Set.chainHeight_le_chainHeight_iffₓ'. -/
@@ -312,7 +312,7 @@ theorem chainHeight_le_chainHeight_iff {t : Set β} :
 
 /- warning: set.chain_height_le_chain_height_iff_le -> Set.chainHeight_le_chainHeight_iff_le is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l')))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l')))))
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u1} α l) (List.length.{u2} β l')))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff_le Set.chainHeight_le_chainHeight_iff_leₓ'. -/
@@ -323,7 +323,7 @@ theorem chainHeight_le_chainHeight_iff_le {t : Set β} :
 
 /- warning: set.chain_height_mono -> Set.chainHeight_mono is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_mono Set.chainHeight_monoₓ'. -/
@@ -388,12 +388,7 @@ section Preorder
 
 variable (s t : Set α) [Preorder α]
 
-/- warning: set.chain_height_eq_supr_Ici -> Set.chainHeight_eq_iSup_Ici is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) α (fun (i : α) => iSup.{0, 0} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.Ici.{u1} α _inst_1 i)))))
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) α (fun (i : α) => iSup.{0, 0} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) (fun (H : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Set.Ici.{u1} α _inst_1 i)))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_Ici Set.chainHeight_eq_iSup_Iciₓ'. -/
+#print Set.chainHeight_eq_iSup_Ici /-
 theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i).chainHeight :=
   by
   apply le_antisymm
@@ -409,25 +404,22 @@ theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i)
       exact (h' _ hi).le
   · exact iSup₂_le fun i hi => chain_height_mono <| Set.inter_subset_left _ _
 #align set.chain_height_eq_supr_Ici Set.chainHeight_eq_iSup_Ici
+-/
 
-/- warning: set.chain_height_eq_supr_Iic -> Set.chainHeight_eq_iSup_Iic is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) α (fun (i : α) => iSup.{0, 0} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.Iic.{u1} α _inst_1 i)))))
-but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) α (fun (i : α) => iSup.{0, 0} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) (fun (H : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Set.Iic.{u1} α _inst_1 i)))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_Iic Set.chainHeight_eq_iSup_Iicₓ'. -/
+#print Set.chainHeight_eq_iSup_Iic /-
 theorem chainHeight_eq_iSup_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight :=
   by
   simp_rw [← chain_height_dual (_ ∩ _)]
   rw [← chain_height_dual, chain_height_eq_supr_Ici]
   rfl
 #align set.chain_height_eq_supr_Iic Set.chainHeight_eq_iSup_Iic
+-/
 
 variable {s t}
 
 /- warning: set.chain_height_insert_of_forall_gt -> Set.chainHeight_insert_of_forall_gt is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne)))))))
+  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne)))))))
 but is expected to have type
   forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring)))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_insert_of_forall_gt Set.chainHeight_insert_of_forall_gtₓ'. -/
@@ -457,7 +449,7 @@ theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
 
 /- warning: set.chain_height_insert_of_forall_lt -> Set.chainHeight_insert_of_forall_lt is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne)))))))
+  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) b a)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne)))))))
 but is expected to have type
   forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring)))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_insert_of_forall_lt Set.chainHeight_insert_of_forall_ltₓ'. -/
@@ -470,7 +462,7 @@ theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
 
 /- warning: set.chain_height_union_le -> Set.chainHeight_union_le is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toHasLe.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) t))
 but is expected to have type
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_union_le Set.chainHeight_union_leₓ'. -/
@@ -496,7 +488,7 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
 
 /- warning: set.chain_height_union_eq -> Set.chainHeight_union_eq is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α), (forall (a : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) -> (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b t) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b))) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t)))
+  forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α), (forall (a : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) -> (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b t) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b))) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toHasLt.{u1} α _inst_1) t)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α), (forall (a : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a s) -> (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b t) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b))) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t)))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_union_eq Set.chainHeight_union_eqₓ'. -/
Diff
@@ -107,15 +107,15 @@ noncomputable def chainHeight : ℕ∞ :=
 #align set.chain_height Set.chainHeight
 -/
 
-/- warning: set.chain_height_eq_supr_subtype -> Set.chainHeight_eq_supᵢ_subtype is a dubious translation:
+/- warning: set.chain_height_eq_supr_subtype -> Set.chainHeight_eq_iSup_subtype is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} (List.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (List.{u1} α)) (Set.subchain.{u1} α _inst_1 s)) (fun (l : coeSort.{succ u1, succ (succ u1)} (Set.{u1} (List.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (List.{u1} α)) (Set.subchain.{u1} α _inst_1 s)) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α (Subtype.val.{succ u1} (List.{u1} α) (fun (x : List.{u1} α) => Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) x (Set.subchain.{u1} α _inst_1 s)) l))))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} (List.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (List.{u1} α)) (Set.subchain.{u1} α _inst_1 s)) (fun (l : coeSort.{succ u1, succ (succ u1)} (Set.{u1} (List.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (List.{u1} α)) (Set.subchain.{u1} α _inst_1 s)) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α (Subtype.val.{succ u1} (List.{u1} α) (fun (x : List.{u1} α) => Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) x (Set.subchain.{u1} α _inst_1 s)) l))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Set.Elem.{u1} (List.{u1} α) (Set.subchain.{u1} α _inst_1 s)) (fun (l : Set.Elem.{u1} (List.{u1} α) (Set.subchain.{u1} α _inst_1 s)) => Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α (Subtype.val.{succ u1} (List.{u1} α) (fun (x : List.{u1} α) => Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) x (Set.subchain.{u1} α _inst_1 s)) l))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_subtype Set.chainHeight_eq_supᵢ_subtypeₓ'. -/
-theorem chainHeight_eq_supᵢ_subtype : s.chainHeight = ⨆ l : s.subchain, l.1.length :=
-  supᵢ_subtype'
-#align set.chain_height_eq_supr_subtype Set.chainHeight_eq_supᵢ_subtype
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Set.Elem.{u1} (List.{u1} α) (Set.subchain.{u1} α _inst_1 s)) (fun (l : Set.Elem.{u1} (List.{u1} α) (Set.subchain.{u1} α _inst_1 s)) => Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α (Subtype.val.{succ u1} (List.{u1} α) (fun (x : List.{u1} α) => Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) x (Set.subchain.{u1} α _inst_1 s)) l))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_subtype Set.chainHeight_eq_iSup_subtypeₓ'. -/
+theorem chainHeight_eq_iSup_subtype : s.chainHeight = ⨆ l : s.subchain, l.1.length :=
+  iSup_subtype'
+#align set.chain_height_eq_supr_subtype Set.chainHeight_eq_iSup_subtype
 
 /- warning: set.exists_chain_of_le_chain_height -> Set.exists_chain_of_le_chainHeight is a dubious translation:
 lean 3 declaration is
@@ -129,16 +129,16 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
   cases' (le_top : s.chain_height ≤ ⊤).eq_or_lt with ha ha <;>
     rw [chain_height_eq_supr_subtype] at ha
   · obtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ :=
-      not_bdd_above_iff'.mp ((WithTop.supᵢ_coe_eq_top _).mp ha) n
+      not_bdd_above_iff'.mp ((WithTop.iSup_coe_eq_top _).mp ha) n
     exact
       ⟨l.take n, ⟨h₁.take _, fun x h => h₂ _ <| take_subset _ _ h⟩,
         (l.length_take n).trans <| min_eq_left <| le_of_not_ge h₃⟩
-  · rw [WithTop.supᵢ_coe_lt_top] at ha
-    obtain ⟨⟨l, h₁, h₂⟩, e : l.length = _⟩ := Nat.supₛ_mem (Set.range_nonempty _) ha
+  · rw [WithTop.iSup_coe_lt_top] at ha
+    obtain ⟨⟨l, h₁, h₂⟩, e : l.length = _⟩ := Nat.sSup_mem (Set.range_nonempty _) ha
     refine'
       ⟨l.take n, ⟨h₁.take _, fun x h => h₂ _ <| take_subset _ _ h⟩,
         (l.length_take n).trans <| min_eq_left <| _⟩
-    rwa [e, ← WithTop.coe_le_coe, supₛ_range, WithTop.coe_supᵢ _ ha, ← chain_height_eq_supr_subtype]
+    rwa [e, ← WithTop.coe_le_coe, sSup_range, WithTop.coe_iSup _ ha, ← chain_height_eq_supr_subtype]
 #align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeight
 
 /- warning: set.le_chain_height_tfae -> Set.le_chainHeight_TFAE is a dubious translation:
@@ -156,7 +156,7 @@ theorem le_chainHeight_TFAE (n : ℕ) :
     exact ⟨l, hls, he.ge⟩
   tfae_have 3 → 1;
   · rintro ⟨l, hs, hn⟩
-    exact le_supᵢ₂_of_le l hs (WithTop.coe_le_coe.2 hn)
+    exact le_iSup₂_of_le l hs (WithTop.coe_le_coe.2 hn)
   tfae_finish
 #align set.le_chain_height_tfae Set.le_chainHeight_TFAE
 
@@ -388,40 +388,40 @@ section Preorder
 
 variable (s t : Set α) [Preorder α]
 
-/- warning: set.chain_height_eq_supr_Ici -> Set.chainHeight_eq_supᵢ_Ici is a dubious translation:
+/- warning: set.chain_height_eq_supr_Ici -> Set.chainHeight_eq_iSup_Ici is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) α (fun (i : α) => supᵢ.{0, 0} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.Ici.{u1} α _inst_1 i)))))
+  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) α (fun (i : α) => iSup.{0, 0} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.Ici.{u1} α _inst_1 i)))))
 but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) α (fun (i : α) => supᵢ.{0, 0} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) (fun (H : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Set.Ici.{u1} α _inst_1 i)))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_Ici Set.chainHeight_eq_supᵢ_Iciₓ'. -/
-theorem chainHeight_eq_supᵢ_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i).chainHeight :=
+  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) α (fun (i : α) => iSup.{0, 0} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) (fun (H : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Set.Ici.{u1} α _inst_1 i)))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_Ici Set.chainHeight_eq_iSup_Iciₓ'. -/
+theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i).chainHeight :=
   by
   apply le_antisymm
-  · refine' supᵢ₂_le _
+  · refine' iSup₂_le _
     rintro (_ | ⟨x, xs⟩) h
     · exact zero_le _
-    · apply le_trans _ (le_supᵢ₂ x (cons_mem_subchain_iff.mp h).1)
+    · apply le_trans _ (le_iSup₂ x (cons_mem_subchain_iff.mp h).1)
       apply length_le_chain_height_of_mem_subchain
       refine' ⟨h.1, fun i hi => ⟨h.2 i hi, _⟩⟩
       cases hi
       · exact hi.symm.le
       cases' chain'_iff_pairwise.mp h.1 with _ _ h'
       exact (h' _ hi).le
-  · exact supᵢ₂_le fun i hi => chain_height_mono <| Set.inter_subset_left _ _
-#align set.chain_height_eq_supr_Ici Set.chainHeight_eq_supᵢ_Ici
+  · exact iSup₂_le fun i hi => chain_height_mono <| Set.inter_subset_left _ _
+#align set.chain_height_eq_supr_Ici Set.chainHeight_eq_iSup_Ici
 
-/- warning: set.chain_height_eq_supr_Iic -> Set.chainHeight_eq_supᵢ_Iic is a dubious translation:
+/- warning: set.chain_height_eq_supr_Iic -> Set.chainHeight_eq_iSup_Iic is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) α (fun (i : α) => supᵢ.{0, 0} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.Iic.{u1} α _inst_1 i)))))
+  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) α (fun (i : α) => iSup.{0, 0} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.Iic.{u1} α _inst_1 i)))))
 but is expected to have type
-  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) α (fun (i : α) => supᵢ.{0, 0} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) (fun (H : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Set.Iic.{u1} α _inst_1 i)))))
-Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_Iic Set.chainHeight_eq_supᵢ_Iicₓ'. -/
-theorem chainHeight_eq_supᵢ_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight :=
+  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (iSup.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) α (fun (i : α) => iSup.{0, 0} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) (fun (H : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Set.Iic.{u1} α _inst_1 i)))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_Iic Set.chainHeight_eq_iSup_Iicₓ'. -/
+theorem chainHeight_eq_iSup_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight :=
   by
   simp_rw [← chain_height_dual (_ ∩ _)]
   rw [← chain_height_dual, chain_height_eq_supr_Ici]
   rfl
-#align set.chain_height_eq_supr_Iic Set.chainHeight_eq_supᵢ_Iic
+#align set.chain_height_eq_supr_Iic Set.chainHeight_eq_iSup_Iic
 
 variable {s t}
 
@@ -476,7 +476,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align set.chain_height_union_le Set.chainHeight_union_leₓ'. -/
 theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
   classical
-    refine' supᵢ₂_le fun l hl => _
+    refine' iSup₂_le fun l hl => _
     let l₁ := l.filter (· ∈ s)
     let l₂ := l.filter (· ∈ t)
     have hl₁ : ↑l₁.length ≤ s.chain_height :=
@@ -527,7 +527,7 @@ theorem wellFoundedGT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠
   refine' ⟨RelEmbedding.wellFounded_iff_no_descending_seq.2 ⟨fun f => _⟩⟩
   refine' n.lt_succ_self.not_le (WithTop.coe_le_coe.1 <| hn.symm ▸ _)
   refine'
-    le_supᵢ₂_of_le _
+    le_iSup₂_of_le _
       ⟨chain'_map_of_chain' coe (fun _ _ => id)
           (chain'_iff_pairwise.2 <| pairwise_of_fn.2 fun i j => f.map_rel_iff.2),
         fun i h => _⟩
Diff
@@ -129,11 +129,11 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
   cases' (le_top : s.chain_height ≤ ⊤).eq_or_lt with ha ha <;>
     rw [chain_height_eq_supr_subtype] at ha
   · obtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ :=
-      not_bdd_above_iff'.mp ((WithTop.supr_coe_eq_top _).mp ha) n
+      not_bdd_above_iff'.mp ((WithTop.supᵢ_coe_eq_top _).mp ha) n
     exact
       ⟨l.take n, ⟨h₁.take _, fun x h => h₂ _ <| take_subset _ _ h⟩,
         (l.length_take n).trans <| min_eq_left <| le_of_not_ge h₃⟩
-  · rw [WithTop.supr_coe_lt_top] at ha
+  · rw [WithTop.supᵢ_coe_lt_top] at ha
     obtain ⟨⟨l, h₁, h₂⟩, e : l.length = _⟩ := Nat.supₛ_mem (Set.range_nonempty _) ha
     refine'
       ⟨l.take n, ⟨h₁.take _, fun x h => h₂ _ <| take_subset _ _ h⟩,
Diff
@@ -121,7 +121,7 @@ theorem chainHeight_eq_supᵢ_subtype : s.chainHeight = ⨆ l : s.subchain, l.1.
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
 Case conversion may be inaccurate. Consider using '#align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeightₓ'. -/
 theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     ∃ l ∈ s.subchain, length l = n :=
@@ -145,7 +145,7 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_tfae Set.le_chainHeight_TFAEₓ'. -/
 theorem le_chainHeight_TFAE (n : ℕ) :
     TFAE [↑n ≤ s.chainHeight, ∃ l ∈ s.subchain, length l = n, ∃ l ∈ s.subchain, n ≤ length l] :=
@@ -166,7 +166,7 @@ variable {s t}
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_iff Set.le_chainHeight_iffₓ'. -/
 theorem le_chainHeight_iff {n : ℕ} : ↑n ≤ s.chainHeight ↔ ∃ l ∈ s.subchain, length l = n :=
   (le_chainHeight_TFAE s n).out 0 1
@@ -176,7 +176,7 @@ theorem le_chainHeight_iff {n : ℕ} : ↑n ≤ s.chainHeight ↔ ∃ l ∈ s.su
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
 Case conversion may be inaccurate. Consider using '#align set.length_le_chain_height_of_mem_subchain Set.length_le_chainHeight_of_mem_subchainₓ'. -/
 theorem length_le_chainHeight_of_mem_subchain (hl : l ∈ s.subchain) : ↑l.length ≤ s.chainHeight :=
   le_chainHeight_iff.mpr ⟨l, hl, rfl⟩
@@ -202,7 +202,7 @@ theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subc
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne))))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
 Case conversion may be inaccurate. Consider using '#align set.one_le_chain_height_iff Set.one_le_chainHeight_iffₓ'. -/
 @[simp]
 theorem one_le_chainHeight_iff : 1 ≤ s.chainHeight ↔ s.Nonempty :=
@@ -243,7 +243,7 @@ theorem chainHeight_of_isEmpty [IsEmpty α] : s.chainHeight = 0 :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) m))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} α l) m))))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} α l) m))))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_add_nat_iff Set.le_chainHeight_add_nat_iffₓ'. -/
 theorem le_chainHeight_add_nat_iff {n m : ℕ} :
     ↑n ≤ s.chainHeight + m ↔ ∃ l ∈ s.subchain, n ≤ length l + m := by
@@ -254,7 +254,7 @@ theorem le_chainHeight_add_nat_iff {n m : ℕ} :
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} β _inst_2 t) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u2} β l') m)))))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} β _inst_2 t) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u2} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} β l') m)))))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} β _inst_2 t) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u2} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} β l') m)))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_add_le_chain_height_add Set.chainHeight_add_le_chainHeight_addₓ'. -/
 theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ) :
     s.chainHeight + n ≤ t.chainHeight + m ↔
@@ -285,7 +285,7 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.nil.{0} Prop))))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u2} α _inst_1 s) (Set.chainHeight.{u1} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (Eq.{1} Nat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.nil.{0} Prop))))
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u2} α _inst_1 s) (Set.chainHeight.{u1} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (Eq.{1} Nat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.nil.{0} Prop))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_TFAEₓ'. -/
 theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
     TFAE
@@ -303,7 +303,7 @@ theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff Set.chainHeight_le_chainHeight_iffₓ'. -/
 theorem chainHeight_le_chainHeight_iff {t : Set β} :
     s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l' :=
@@ -314,7 +314,7 @@ theorem chainHeight_le_chainHeight_iff {t : Set β} :
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l')))))
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u1} α l) (List.length.{u2} β l')))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u1} α l) (List.length.{u2} β l')))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff_le Set.chainHeight_le_chainHeight_iff_leₓ'. -/
 theorem chainHeight_le_chainHeight_iff_le {t : Set β} :
     s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l' :=
@@ -325,7 +325,7 @@ theorem chainHeight_le_chainHeight_iff_le {t : Set β} :
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_mono Set.chainHeight_monoₓ'. -/
 theorem chainHeight_mono (h : s ⊆ t) : s.chainHeight ≤ t.chainHeight :=
   chainHeight_le_chainHeight_iff.2 fun l hl => ⟨l, ⟨hl.1, fun i hi => h <| hl.2 i hi⟩, rfl⟩
@@ -472,7 +472,7 @@ theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
 lean 3 declaration is
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
 but is expected to have type
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat instCompleteLinearOrderENat))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_union_le Set.chainHeight_union_leₓ'. -/
 theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
   classical
Diff
@@ -119,7 +119,7 @@ theorem chainHeight_eq_supᵢ_subtype : s.chainHeight = ⨆ l : s.subchain, l.1.
 
 /- warning: set.exists_chain_of_le_chain_height -> Set.exists_chain_of_le_chainHeight is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
 Case conversion may be inaccurate. Consider using '#align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeightₓ'. -/
@@ -143,7 +143,7 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
 
 /- warning: set.le_chain_height_tfae -> Set.le_chainHeight_TFAE is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_tfae Set.le_chainHeight_TFAEₓ'. -/
@@ -164,7 +164,7 @@ variable {s t}
 
 /- warning: set.le_chain_height_iff -> Set.le_chainHeight_iff is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_iff Set.le_chainHeight_iffₓ'. -/
@@ -174,7 +174,7 @@ theorem le_chainHeight_iff {n : ℕ} : ↑n ≤ s.chainHeight ↔ ∃ l ∈ s.su
 
 /- warning: set.length_le_chain_height_of_mem_subchain -> Set.length_le_chainHeight_of_mem_subchain is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
 Case conversion may be inaccurate. Consider using '#align set.length_le_chain_height_of_mem_subchain Set.length_le_chainHeight_of_mem_subchainₓ'. -/
@@ -200,7 +200,7 @@ theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subc
 
 /- warning: set.one_le_chain_height_iff -> Set.one_le_chainHeight_iff is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne))))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne))))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
 Case conversion may be inaccurate. Consider using '#align set.one_le_chain_height_iff Set.one_le_chainHeight_iffₓ'. -/
@@ -241,7 +241,7 @@ theorem chainHeight_of_isEmpty [IsEmpty α] : s.chainHeight = 0 :=
 
 /- warning: set.le_chain_height_add_nat_iff -> Set.le_chainHeight_add_nat_iff is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) m))))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) m))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} α l) m))))
 Case conversion may be inaccurate. Consider using '#align set.le_chain_height_add_nat_iff Set.le_chainHeight_add_nat_iffₓ'. -/
@@ -252,7 +252,7 @@ theorem le_chainHeight_add_nat_iff {n m : ℕ} :
 
 /- warning: set.chain_height_add_le_chain_height_add -> Set.chainHeight_add_le_chainHeight_add is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} β _inst_2 t) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u2} β l') m)))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} β _inst_2 t) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u2} β l') m)))))
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} β _inst_2 t) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u2} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} β l') m)))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_add_le_chain_height_add Set.chainHeight_add_le_chainHeight_addₓ'. -/
@@ -283,7 +283,7 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
 
 /- warning: set.chain_height_le_chain_height_tfae -> Set.chainHeight_le_chainHeight_TFAE is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.nil.{0} Prop))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.nil.{0} Prop))))
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u2} α _inst_1 s) (Set.chainHeight.{u1} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (Eq.{1} Nat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.nil.{0} Prop))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_TFAEₓ'. -/
@@ -301,7 +301,7 @@ theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
 
 /- warning: set.chain_height_le_chain_height_iff -> Set.chainHeight_le_chainHeight_iff is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff Set.chainHeight_le_chainHeight_iffₓ'. -/
@@ -312,7 +312,7 @@ theorem chainHeight_le_chainHeight_iff {t : Set β} :
 
 /- warning: set.chain_height_le_chain_height_iff_le -> Set.chainHeight_le_chainHeight_iff_le is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l')))))
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l')))))
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u1} α l) (List.length.{u2} β l')))))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff_le Set.chainHeight_le_chainHeight_iff_leₓ'. -/
@@ -323,7 +323,7 @@ theorem chainHeight_le_chainHeight_iff_le {t : Set β} :
 
 /- warning: set.chain_height_mono -> Set.chainHeight_mono is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_mono Set.chainHeight_monoₓ'. -/
@@ -470,7 +470,7 @@ theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
 
 /- warning: set.chain_height_union_le -> Set.chainHeight_union_le is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (CompleteSemilatticeInf.toPartialOrder.{0} ENat (CompleteLattice.toCompleteSemilatticeInf.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
 but is expected to have type
   forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
 Case conversion may be inaccurate. Consider using '#align set.chain_height_union_le Set.chainHeight_union_leₓ'. -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 
 ! This file was ported from Lean 3 source module order.height
-! leanprover-community/mathlib commit bf27744463e9620ca4e4ebe951fe83530ae6949b
+! leanprover-community/mathlib commit 25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,9 @@ import Mathbin.Tactic.Tfae
 
 # Maximal length of chains
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file contains lemmas to work with the maximal length of strictly descending finite
 sequences (chains) in a partial order.
 
Diff
@@ -58,18 +58,23 @@ section LT
 
 variable [LT α] [LT β] (s t : Set α)
 
+#print Set.subchain /-
 /-- The set of strictly ascending lists of `α` contained in a `set α`. -/
 def subchain : Set (List α) :=
   { l | l.Chain' (· < ·) ∧ ∀ i ∈ l, i ∈ s }
 #align set.subchain Set.subchain
+-/
 
+#print Set.nil_mem_subchain /-
 theorem nil_mem_subchain : [] ∈ s.subchain :=
   ⟨trivial, fun x hx => hx.elim⟩
 #align set.nil_mem_subchain Set.nil_mem_subchain
+-/
 
 variable {s} {l : List α} {a : α}
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Set.cons_mem_subchain_iff /-
 theorem cons_mem_subchain_iff :
     (a::l) ∈ s.subchain ↔ a ∈ s ∧ l ∈ s.subchain ∧ ∀ b ∈ l.head?, a < b :=
   by
@@ -85,21 +90,36 @@ theorem cons_mem_subchain_iff :
   · rintro i (rfl | hi)
     exacts[h₁, h₂.2 _ hi]
 #align set.cons_mem_subchain_iff Set.cons_mem_subchain_iff
+-/
 
 instance : Nonempty s.subchain :=
   ⟨⟨[], s.nil_mem_subchain⟩⟩
 
 variable (s)
 
+#print Set.chainHeight /-
 /-- The maximal length of a strictly ascending sequence in a partial order. -/
 noncomputable def chainHeight : ℕ∞ :=
   ⨆ l ∈ s.subchain, length l
 #align set.chain_height Set.chainHeight
+-/
 
+/- warning: set.chain_height_eq_supr_subtype -> Set.chainHeight_eq_supᵢ_subtype is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} (List.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (List.{u1} α)) (Set.subchain.{u1} α _inst_1 s)) (fun (l : coeSort.{succ u1, succ (succ u1)} (Set.{u1} (List.{u1} α)) Type.{u1} (Set.hasCoeToSort.{u1} (List.{u1} α)) (Set.subchain.{u1} α _inst_1 s)) => (fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α (Subtype.val.{succ u1} (List.{u1} α) (fun (x : List.{u1} α) => Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) x (Set.subchain.{u1} α _inst_1 s)) l))))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Set.Elem.{u1} (List.{u1} α) (Set.subchain.{u1} α _inst_1 s)) (fun (l : Set.Elem.{u1} (List.{u1} α) (Set.subchain.{u1} α _inst_1 s)) => Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α (Subtype.val.{succ u1} (List.{u1} α) (fun (x : List.{u1} α) => Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) x (Set.subchain.{u1} α _inst_1 s)) l))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_subtype Set.chainHeight_eq_supᵢ_subtypeₓ'. -/
 theorem chainHeight_eq_supᵢ_subtype : s.chainHeight = ⨆ l : s.subchain, l.1.length :=
   supᵢ_subtype'
 #align set.chain_height_eq_supr_subtype Set.chainHeight_eq_supᵢ_subtype
 
+/- warning: set.exists_chain_of_le_chain_height -> Set.exists_chain_of_le_chainHeight is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) {n : Nat}, (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
+Case conversion may be inaccurate. Consider using '#align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeightₓ'. -/
 theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     ∃ l ∈ s.subchain, length l = n :=
   by
@@ -118,7 +138,13 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     rwa [e, ← WithTop.coe_le_coe, supₛ_range, WithTop.coe_supᵢ _ ha, ← chain_height_eq_supr_subtype]
 #align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeight
 
-theorem le_chainHeight_tFAE (n : ℕ) :
+/- warning: set.le_chain_height_tfae -> Set.le_chainHeight_TFAE is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] (s : Set.{u1} α) (n : Nat), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n))) (List.cons.{0} Prop (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (List.length.{u1} α l)))) (List.nil.{0} Prop))))
+Case conversion may be inaccurate. Consider using '#align set.le_chain_height_tfae Set.le_chainHeight_TFAEₓ'. -/
+theorem le_chainHeight_TFAE (n : ℕ) :
     TFAE [↑n ≤ s.chainHeight, ∃ l ∈ s.subchain, length l = n, ∃ l ∈ s.subchain, n ≤ length l] :=
   by
   tfae_have 1 → 2; · exact s.exists_chain_of_le_chain_height
@@ -129,18 +155,36 @@ theorem le_chainHeight_tFAE (n : ℕ) :
   · rintro ⟨l, hs, hn⟩
     exact le_supᵢ₂_of_le l hs (WithTop.coe_le_coe.2 hn)
   tfae_finish
-#align set.le_chain_height_tfae Set.le_chainHeight_tFAE
+#align set.le_chain_height_tfae Set.le_chainHeight_TFAE
 
 variable {s t}
 
+/- warning: set.le_chain_height_iff -> Set.le_chainHeight_iff is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (Set.chainHeight.{u1} α _inst_1 s)) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
+Case conversion may be inaccurate. Consider using '#align set.le_chain_height_iff Set.le_chainHeight_iffₓ'. -/
 theorem le_chainHeight_iff {n : ℕ} : ↑n ≤ s.chainHeight ↔ ∃ l ∈ s.subchain, length l = n :=
-  (le_chainHeight_tFAE s n).out 0 1
+  (le_chainHeight_TFAE s n).out 0 1
 #align set.le_chain_height_iff Set.le_chainHeight_iff
 
+/- warning: set.length_le_chain_height_of_mem_subchain -> Set.length_le_chainHeight_of_mem_subchain is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {l : List.{u1} α}, (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) (List.length.{u1} α l)) (Set.chainHeight.{u1} α _inst_1 s))
+Case conversion may be inaccurate. Consider using '#align set.length_le_chain_height_of_mem_subchain Set.length_le_chainHeight_of_mem_subchainₓ'. -/
 theorem length_le_chainHeight_of_mem_subchain (hl : l ∈ s.subchain) : ↑l.length ≤ s.chainHeight :=
   le_chainHeight_iff.mpr ⟨l, hl, rfl⟩
 #align set.length_le_chain_height_of_mem_subchain Set.length_le_chainHeight_of_mem_subchain
 
+/- warning: set.chain_height_eq_top_iff -> Set.chainHeight_eq_top_iff is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (Top.top.{0} ENat ENat.hasTop)) (forall (n : Nat), Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => Eq.{1} Nat (List.length.{u1} α l) n)))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (Eq.{1} ENat (Set.chainHeight.{u1} α _inst_1 s) (Top.top.{0} ENat instENatTop)) (forall (n : Nat), Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (Eq.{1} Nat (List.length.{u1} α l) n)))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_top_iff Set.chainHeight_eq_top_iffₓ'. -/
 theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subchain, length l = n :=
   by
   refine' ⟨fun h n => le_chain_height_iff.1 (le_top.trans_eq h.symm), fun h => _⟩
@@ -151,6 +195,12 @@ theorem chainHeight_eq_top_iff : s.chainHeight = ⊤ ↔ ∀ n, ∃ l ∈ s.subc
           WithTop.coe_le_coe.1 <| (length_le_chain_height_of_mem_subchain hs).trans_eq hn.symm).Ne⟩
 #align set.chain_height_eq_top_iff Set.chainHeight_eq_top_iff
 
+/- warning: set.one_le_chain_height_iff -> Set.one_le_chainHeight_iff is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne))))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring))) (Set.chainHeight.{u1} α _inst_1 s)) (Set.Nonempty.{u1} α s)
+Case conversion may be inaccurate. Consider using '#align set.one_le_chain_height_iff Set.one_le_chainHeight_iffₓ'. -/
 @[simp]
 theorem one_le_chainHeight_iff : 1 ≤ s.chainHeight ↔ s.Nonempty :=
   by
@@ -164,27 +214,45 @@ theorem one_le_chainHeight_iff : 1 ≤ s.chainHeight ↔ s.Nonempty :=
     exact ⟨[x], ⟨chain.nil, fun y h => (list.mem_singleton.mp h).symm ▸ hx⟩, rfl⟩
 #align set.one_le_chain_height_iff Set.one_le_chainHeight_iff
 
+#print Set.chainHeight_eq_zero_iff /-
 @[simp]
 theorem chainHeight_eq_zero_iff : s.chainHeight = 0 ↔ s = ∅ := by
   rw [← not_iff_not, ← Ne.def, ← bot_eq_zero, ← bot_lt_iff_ne_bot, bot_eq_zero, ←
     ENat.one_le_iff_pos, one_le_chain_height_iff, nonempty_iff_ne_empty]
 #align set.chain_height_eq_zero_iff Set.chainHeight_eq_zero_iff
+-/
 
+#print Set.chainHeight_empty /-
 @[simp]
 theorem chainHeight_empty : (∅ : Set α).chainHeight = 0 :=
   chainHeight_eq_zero_iff.2 rfl
 #align set.chain_height_empty Set.chainHeight_empty
+-/
 
+#print Set.chainHeight_of_isEmpty /-
 @[simp]
 theorem chainHeight_of_isEmpty [IsEmpty α] : s.chainHeight = 0 :=
   chainHeight_eq_zero_iff.mpr (Subsingleton.elim _ _)
 #align set.chain_height_of_is_empty Set.chainHeight_of_isEmpty
+-/
 
+/- warning: set.le_chain_height_add_nat_iff -> Set.le_chainHeight_add_nat_iff is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => Exists.{0} (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (fun (H : Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) => LE.le.{0} Nat Nat.hasLe n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) m))))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {n : Nat} {m : Nat}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (Exists.{succ u1} (List.{u1} α) (fun (l : List.{u1} α) => And (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) (LE.le.{0} Nat instLENat n (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} α l) m))))
+Case conversion may be inaccurate. Consider using '#align set.le_chain_height_add_nat_iff Set.le_chainHeight_add_nat_iffₓ'. -/
 theorem le_chainHeight_add_nat_iff {n m : ℕ} :
     ↑n ≤ s.chainHeight + m ↔ ∃ l ∈ s.subchain, n ≤ length l + m := by
   simp_rw [← tsub_le_iff_right, ← WithTop.coe_sub, (le_chain_height_tfae s (n - m)).out 0 2]
 #align set.le_chain_height_add_nat_iff Set.le_chainHeight_add_nat_iff
 
+/- warning: set.chain_height_add_le_chain_height_add -> Set.chainHeight_add_le_chainHeight_add is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α _inst_1 s) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} β _inst_2 t) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat ENat (HasLiftT.mk.{1, 1} Nat ENat (CoeTCₓ.coe.{1, 1} Nat ENat ENat.hasCoeT)) m))) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u1} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (List.length.{u2} β l') m)))))
+but is expected to have type
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β) (n : Nat) (m : Nat), Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u2} α _inst_1 s) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) n)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} β _inst_2 t) (Nat.cast.{0} ENat (CanonicallyOrderedCommSemiring.toNatCast.{0} ENat instENatCanonicallyOrderedCommSemiring) m))) (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u2} α l) n) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (List.length.{u1} β l') m)))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_add_le_chain_height_add Set.chainHeight_add_le_chainHeight_addₓ'. -/
 theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ) :
     s.chainHeight + n ≤ t.chainHeight + m ↔
       ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l + n ≤ length l' + m :=
@@ -210,7 +278,13 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
     exact le_chain_height_add_nat_iff.2 (H l hs)
 #align set.chain_height_add_le_chain_height_add Set.chainHeight_add_le_chainHeight_add
 
-theorem chainHeight_le_chainHeight_tFAE (s : Set α) (t : Set β) :
+/- warning: set.chain_height_le_chain_height_tfae -> Set.chainHeight_le_chainHeight_TFAE is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (s : Set.{u1} α) (t : Set.{u2} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.cons.{0} Prop (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l'))))) (List.nil.{0} Prop))))
+but is expected to have type
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (s : Set.{u2} α) (t : Set.{u1} β), List.TFAE (List.cons.{0} Prop (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u2} α _inst_1 s) (Set.chainHeight.{u1} β _inst_2 t)) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (Eq.{1} Nat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.cons.{0} Prop (forall (l : List.{u2} α), (Membership.mem.{u2, u2} (List.{u2} α) (Set.{u2} (List.{u2} α)) (Set.instMembershipSet.{u2} (List.{u2} α)) l (Set.subchain.{u2} α _inst_1 s)) -> (Exists.{succ u1} (List.{u1} β) (fun (l' : List.{u1} β) => And (Membership.mem.{u1, u1} (List.{u1} β) (Set.{u1} (List.{u1} β)) (Set.instMembershipSet.{u1} (List.{u1} β)) l' (Set.subchain.{u1} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u2} α l) (List.length.{u1} β l'))))) (List.nil.{0} Prop))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_TFAEₓ'. -/
+theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
     TFAE
       [s.chainHeight ≤ t.chainHeight, ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l',
         ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l'] :=
@@ -220,22 +294,46 @@ theorem chainHeight_le_chainHeight_tFAE (s : Set α) (t : Set β) :
   · refine' forall₂_congr fun l hl => _
     simp_rw [← (le_chain_height_tfae t l.length).out 1 2, eq_comm]
   tfae_finish
-#align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_tFAE
-
+#align set.chain_height_le_chain_height_tfae Set.chainHeight_le_chainHeight_TFAE
+
+/- warning: set.chain_height_le_chain_height_iff -> Set.chainHeight_le_chainHeight_iff is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
+but is expected to have type
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (Eq.{1} Nat (List.length.{u1} α l) (List.length.{u2} β l')))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff Set.chainHeight_le_chainHeight_iffₓ'. -/
 theorem chainHeight_le_chainHeight_iff {t : Set β} :
     s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l' :=
-  (chainHeight_le_chainHeight_tFAE s t).out 0 1
+  (chainHeight_le_chainHeight_TFAE s t).out 0 1
 #align set.chain_height_le_chain_height_iff Set.chainHeight_le_chainHeight_iff
 
+/- warning: set.chain_height_le_chain_height_iff_le -> Set.chainHeight_le_chainHeight_iff_le is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.Mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.hasMem.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => Exists.{0} (Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (fun (H : Membership.Mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.hasMem.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) => LE.le.{0} Nat Nat.hasLe (List.length.{u1} α l) (List.length.{u2} β l')))))
+but is expected to have type
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] {s : Set.{u1} α} {t : Set.{u2} β}, Iff (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u2} β _inst_2 t)) (forall (l : List.{u1} α), (Membership.mem.{u1, u1} (List.{u1} α) (Set.{u1} (List.{u1} α)) (Set.instMembershipSet.{u1} (List.{u1} α)) l (Set.subchain.{u1} α _inst_1 s)) -> (Exists.{succ u2} (List.{u2} β) (fun (l' : List.{u2} β) => And (Membership.mem.{u2, u2} (List.{u2} β) (Set.{u2} (List.{u2} β)) (Set.instMembershipSet.{u2} (List.{u2} β)) l' (Set.subchain.{u2} β _inst_2 t)) (LE.le.{0} Nat instLENat (List.length.{u1} α l) (List.length.{u2} β l')))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_le_chain_height_iff_le Set.chainHeight_le_chainHeight_iff_leₓ'. -/
 theorem chainHeight_le_chainHeight_iff_le {t : Set β} :
     s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l' :=
-  (chainHeight_le_chainHeight_tFAE s t).out 0 2
+  (chainHeight_le_chainHeight_TFAE s t).out 0 2
 #align set.chain_height_le_chain_height_iff_le Set.chainHeight_le_chainHeight_iff_le
 
+/- warning: set.chain_height_mono -> Set.chainHeight_mono is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : LT.{u1} α] {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) s t) -> (LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α _inst_1 s) (Set.chainHeight.{u1} α _inst_1 t))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_mono Set.chainHeight_monoₓ'. -/
 theorem chainHeight_mono (h : s ⊆ t) : s.chainHeight ≤ t.chainHeight :=
   chainHeight_le_chainHeight_iff.2 fun l hl => ⟨l, ⟨hl.1, fun i hi => h <| hl.2 i hi⟩, rfl⟩
 #align set.chain_height_mono Set.chainHeight_mono
 
+/- warning: set.chain_height_image -> Set.chainHeight_image is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : LT.{u1} α] [_inst_2 : LT.{u2} β] (f : α -> β), (forall {x : α} {y : α}, Iff (LT.lt.{u1} α _inst_1 x y) (LT.lt.{u2} β _inst_2 (f x) (f y))) -> (forall (s : Set.{u1} α), Eq.{1} ENat (Set.chainHeight.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (Set.chainHeight.{u1} α _inst_1 s))
+but is expected to have type
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : LT.{u2} α] [_inst_2 : LT.{u1} β] (f : α -> β), (forall {x : α} {y : α}, Iff (LT.lt.{u2} α _inst_1 x y) (LT.lt.{u1} β _inst_2 (f x) (f y))) -> (forall (s : Set.{u2} α), Eq.{1} ENat (Set.chainHeight.{u1} β _inst_2 (Set.image.{u2, u1} α β f s)) (Set.chainHeight.{u2} α _inst_1 s))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_image Set.chainHeight_imageₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y) (s : Set α) :
     (f '' s).chainHeight = s.chainHeight :=
@@ -269,6 +367,7 @@ theorem chainHeight_image (f : α → β) (hf : ∀ {x y}, x < y ↔ f x < f y)
 
 variable (s)
 
+#print Set.chainHeight_dual /-
 @[simp]
 theorem chainHeight_dual : (ofDual ⁻¹' s).chainHeight = s.chainHeight := by
   apply le_antisymm <;>
@@ -278,6 +377,7 @@ theorem chainHeight_dual : (ofDual ⁻¹' s).chainHeight = s.chainHeight := by
         ⟨l.reverse, ⟨chain'_reverse.mpr h₁, fun i h => h₂ i (mem_reverse.mp h)⟩,
           (length_reverse _).symm⟩
 #align set.chain_height_dual Set.chainHeight_dual
+-/
 
 end LT
 
@@ -285,6 +385,12 @@ section Preorder
 
 variable (s t : Set α) [Preorder α]
 
+/- warning: set.chain_height_eq_supr_Ici -> Set.chainHeight_eq_supᵢ_Ici is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) α (fun (i : α) => supᵢ.{0, 0} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.Ici.{u1} α _inst_1 i)))))
+but is expected to have type
+  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) α (fun (i : α) => supᵢ.{0, 0} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) (fun (H : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Set.Ici.{u1} α _inst_1 i)))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_Ici Set.chainHeight_eq_supᵢ_Iciₓ'. -/
 theorem chainHeight_eq_supᵢ_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i).chainHeight :=
   by
   apply le_antisymm
@@ -301,6 +407,12 @@ theorem chainHeight_eq_supᵢ_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici
   · exact supᵢ₂_le fun i hi => chain_height_mono <| Set.inter_subset_left _ _
 #align set.chain_height_eq_supr_Ici Set.chainHeight_eq_supᵢ_Ici
 
+/- warning: set.chain_height_eq_supr_Iic -> Set.chainHeight_eq_supᵢ_Iic is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) α (fun (i : α) => supᵢ.{0, 0} ENat (ConditionallyCompleteLattice.toHasSup.{0} ENat (CompleteLattice.toConditionallyCompleteLattice.{0} ENat (CompleteLinearOrder.toCompleteLattice.{0} ENat ENat.completeLinearOrder))) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s (Set.Iic.{u1} α _inst_1 i)))))
+but is expected to have type
+  forall {α : Type.{u1}} (s : Set.{u1} α) [_inst_1 : Preorder.{u1} α], Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (supᵢ.{0, succ u1} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) α (fun (i : α) => supᵢ.{0, 0} ENat (ConditionallyCompleteLattice.toSupSet.{0} ENat (ConditionallyCompleteLinearOrder.toConditionallyCompleteLattice.{0} ENat (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} ENat (CompleteLinearOrder.toConditionallyCompleteLinearOrderBot.{0} ENat instCompleteLinearOrderENat)))) (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) (fun (H : Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) i s) => Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) s (Set.Iic.{u1} α _inst_1 i)))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_eq_supr_Iic Set.chainHeight_eq_supᵢ_Iicₓ'. -/
 theorem chainHeight_eq_supᵢ_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight :=
   by
   simp_rw [← chain_height_dual (_ ∩ _)]
@@ -310,6 +422,12 @@ theorem chainHeight_eq_supᵢ_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic
 
 variable {s t}
 
+/- warning: set.chain_height_insert_of_forall_gt -> Set.chainHeight_insert_of_forall_gt is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne)))))))
+but is expected to have type
+  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring)))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_insert_of_forall_gt Set.chainHeight_insert_of_forall_gtₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
     (insert a s).chainHeight = s.chainHeight + 1 :=
@@ -334,6 +452,12 @@ theorem chainHeight_insert_of_forall_gt (a : α) (hx : ∀ b ∈ s, a < b) :
       exacts[Or.inl (Set.mem_singleton x), Or.inr (hl.2 x hx)]
 #align set.chain_height_insert_of_forall_gt Set.chainHeight_insert_of_forall_gt
 
+/- warning: set.chain_height_insert_of_forall_lt -> Set.chainHeight_insert_of_forall_lt is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.hasInsert.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (OfNat.mk.{0} ENat 1 (One.one.{0} ENat (AddMonoidWithOne.toOne.{0} ENat (AddCommMonoidWithOne.toAddMonoidWithOne.{0} ENat ENat.addCommMonoidWithOne)))))))
+but is expected to have type
+  forall {α : Type.{u1}} {s : Set.{u1} α} [_inst_1 : Preorder.{u1} α] (a : α), (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b s) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) b a)) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Insert.insert.{u1, u1} α (Set.{u1} α) (Set.instInsertSet.{u1} α) a s)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (OfNat.ofNat.{0} ENat 1 (One.toOfNat1.{0} ENat (CanonicallyOrderedCommSemiring.toOne.{0} ENat instENatCanonicallyOrderedCommSemiring)))))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_insert_of_forall_lt Set.chainHeight_insert_of_forall_ltₓ'. -/
 theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
     (insert a s).chainHeight = s.chainHeight + 1 :=
   by
@@ -341,6 +465,12 @@ theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
   exact chain_height_insert_of_forall_gt _ ha
 #align set.chain_height_insert_of_forall_lt Set.chainHeight_insert_of_forall_lt
 
+/- warning: set.chain_height_union_le -> Set.chainHeight_union_le is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedAddCommMonoid.toPartialOrder.{0} ENat (OrderedSemiring.toOrderedAddCommMonoid.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
+but is expected to have type
+  forall {α : Type.{u1}} {s : Set.{u1} α} {t : Set.{u1} α} [_inst_1 : Preorder.{u1} α], LE.le.{0} ENat (Preorder.toLE.{0} ENat (PartialOrder.toPreorder.{0} ENat (OrderedSemiring.toPartialOrder.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_union_le Set.chainHeight_union_leₓ'. -/
 theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
   classical
     refine' supᵢ₂_le fun l hl => _
@@ -361,6 +491,12 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
     exacts[le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
 
+/- warning: set.chain_height_union_eq -> Set.chainHeight_union_eq is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α), (forall (a : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) -> (forall (b : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) b t) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b))) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toHasAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat ENat.canonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t)))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (s : Set.{u1} α) (t : Set.{u1} α), (forall (a : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a s) -> (forall (b : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) b t) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b))) -> (Eq.{1} ENat (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) s t)) (HAdd.hAdd.{0, 0, 0} ENat ENat ENat (instHAdd.{0} ENat (Distrib.toAdd.{0} ENat (NonUnitalNonAssocSemiring.toDistrib.{0} ENat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENat (Semiring.toNonAssocSemiring.{0} ENat (OrderedSemiring.toSemiring.{0} ENat (OrderedCommSemiring.toOrderedSemiring.{0} ENat (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENat instENatCanonicallyOrderedCommSemiring)))))))) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) s) (Set.chainHeight.{u1} α (Preorder.toLT.{u1} α _inst_1) t)))
+Case conversion may be inaccurate. Consider using '#align set.chain_height_union_eq Set.chainHeight_union_eqₓ'. -/
 theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b) :
     (s ∪ t).chainHeight = s.chainHeight + t.chainHeight :=
   by
@@ -381,6 +517,7 @@ theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b
     exacts[Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]
 #align set.chain_height_union_eq Set.chainHeight_union_eq
 
+#print Set.wellFoundedGT_of_chainHeight_ne_top /-
 theorem wellFoundedGT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠ ⊤) :
     WellFoundedGT s := by
   obtain ⟨n, hn⟩ := WithTop.ne_top_iff_exists.1 hs
@@ -398,11 +535,14 @@ theorem wellFoundedGT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠
   · rw [length_map, length_of_fn]
     exact le_rfl
 #align set.well_founded_gt_of_chain_height_ne_top Set.wellFoundedGT_of_chainHeight_ne_top
+-/
 
+#print Set.wellFoundedLT_of_chainHeight_ne_top /-
 theorem wellFoundedLT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠ ⊤) :
     WellFoundedLT s :=
   wellFoundedGT_of_chainHeight_ne_top (ofDual ⁻¹' s) <| by rwa [chain_height_dual]
 #align set.well_founded_lt_of_chain_height_ne_top Set.wellFoundedLT_of_chainHeight_ne_top
+-/
 
 end Preorder
 
Diff
@@ -215,7 +215,7 @@ theorem chainHeight_le_chainHeight_tFAE (s : Set α) (t : Set β) :
       [s.chainHeight ≤ t.chainHeight, ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l',
         ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l'] :=
   by
-  tfae_have 1 ↔ 3; · convert ← chain_height_add_le_chain_height_add s t 0 0 <;> apply add_zero
+  tfae_have 1 ↔ 3; · convert← chain_height_add_le_chain_height_add s t 0 0 <;> apply add_zero
   tfae_have 2 ↔ 3;
   · refine' forall₂_congr fun l hl => _
     simp_rw [← (le_chain_height_tfae t l.length).out 1 2, eq_comm]

Changes in mathlib4

mathlib3
mathlib4
chore: backports from #11997, adaptations for nightly-2024-04-07 (#12176)

These are changes from #11997, the latest adaptation PR for nightly-2024-04-07, which can be made directly on master.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>

Diff
@@ -140,7 +140,7 @@ theorem one_le_chainHeight_iff : 1 ≤ s.chainHeight ↔ s.Nonempty := by
 
 @[simp]
 theorem chainHeight_eq_zero_iff : s.chainHeight = 0 ↔ s = ∅ := by
-  rw [← not_iff_not, ← Ne.def, ← ENat.one_le_iff_ne_zero, one_le_chainHeight_iff,
+  rw [← not_iff_not, ← Ne, ← ENat.one_le_iff_ne_zero, one_le_chainHeight_iff,
     nonempty_iff_ne_empty]
 #align set.chain_height_eq_zero_iff Set.chainHeight_eq_zero_iff
 
chore: classify new lemma porting notes (#11217)

Classifies by adding issue number #10756 to porting notes claiming anything semantically equivalent to:

  • "new lemma"
  • "added lemma"
Diff
@@ -73,7 +73,7 @@ theorem cons_mem_subchain_iff :
     and_assoc]
 #align set.cons_mem_subchain_iff Set.cons_mem_subchain_iff
 
-@[simp] -- Porting note: new lemma + `simp`
+@[simp] -- Porting note (#10756): new lemma + `simp`
 theorem singleton_mem_subchain_iff : [a] ∈ s.subchain ↔ a ∈ s := by simp [cons_mem_subchain_iff]
 
 instance : Nonempty s.subchain :=
chore: move Mathlib to v4.7.0-rc1 (#11162)

This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0 branch as we update to intermediate nightlies.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>

Diff
@@ -61,8 +61,8 @@ def subchain : Set (List α) :=
   { l | l.Chain' (· < ·) ∧ ∀ i ∈ l, i ∈ s }
 #align set.subchain Set.subchain
 
-@[simp] -- Porting note: new `simp`
-theorem nil_mem_subchain : [] ∈ s.subchain := ⟨trivial, fun _ ↦ fun.⟩
+@[simp] -- porting note: new `simp`
+theorem nil_mem_subchain : [] ∈ s.subchain := ⟨trivial, fun _ ↦ nofun⟩
 #align set.nil_mem_subchain Set.nil_mem_subchain
 
 variable {s} {l : List α} {a : α}
@@ -324,7 +324,8 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
       apply Set.length_le_chainHeight_of_mem_subchain
       exact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩
     refine' le_trans _ (add_le_add hl₁ hl₂)
-    simp_rw [← Nat.cast_add, ← Multiset.coe_card, ← Multiset.card_add, ← Multiset.filter_coe]
+    simp_rw [l₁, l₂, ← Nat.cast_add, ← Multiset.coe_card, ← Multiset.card_add,
+      ← Multiset.filter_coe]
     rw [Multiset.filter_add_filter, Multiset.filter_eq_self.mpr, Multiset.card_add, Nat.cast_add]
     exacts [le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
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
@@ -61,7 +61,7 @@ def subchain : Set (List α) :=
   { l | l.Chain' (· < ·) ∧ ∀ i ∈ l, i ∈ s }
 #align set.subchain Set.subchain
 
-@[simp] -- porting note: new `simp`
+@[simp] -- Porting note: new `simp`
 theorem nil_mem_subchain : [] ∈ s.subchain := ⟨trivial, fun _ ↦ fun.⟩
 #align set.nil_mem_subchain Set.nil_mem_subchain
 
@@ -73,7 +73,7 @@ theorem cons_mem_subchain_iff :
     and_assoc]
 #align set.cons_mem_subchain_iff Set.cons_mem_subchain_iff
 
-@[simp] -- porting note: new lemma + `simp`
+@[simp] -- Porting note: new lemma + `simp`
 theorem singleton_mem_subchain_iff : [a] ∈ s.subchain ↔ a ∈ s := by simp [cons_mem_subchain_iff]
 
 instance : Nonempty s.subchain :=
chore: Rename lemmas about the coercion List → Multiset (#11099)

These did not respect the naming convention by having the coe as a prefix instead of a suffix, or vice-versa. Also add a bunch of norm_cast

Diff
@@ -324,7 +324,7 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
       apply Set.length_le_chainHeight_of_mem_subchain
       exact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩
     refine' le_trans _ (add_le_add hl₁ hl₂)
-    simp_rw [← Nat.cast_add, ← Multiset.coe_card, ← Multiset.card_add, ← Multiset.coe_filter]
+    simp_rw [← Nat.cast_add, ← Multiset.coe_card, ← Multiset.card_add, ← Multiset.filter_coe]
     rw [Multiset.filter_add_filter, Multiset.filter_eq_self.mpr, Multiset.card_add, Nat.cast_add]
     exacts [le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -92,7 +92,7 @@ theorem chainHeight_eq_iSup_subtype : s.chainHeight = ⨆ l : s.subchain, ↑l.1
 
 theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     ∃ l ∈ s.subchain, length l = n := by
-  cases' (le_top : s.chainHeight ≤ ⊤).eq_or_lt with ha ha <;>
+  rcases (le_top : s.chainHeight ≤ ⊤).eq_or_lt with ha | ha <;>
     rw [chainHeight_eq_iSup_subtype] at ha
   · obtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ :=
       not_bddAbove_iff'.mp (WithTop.iSup_coe_eq_top.1 ha) n
chore: add missing hypothesis names to by_cases (#8533)

I've also got a change to make this required, but I'd like to land this first.

Diff
@@ -167,7 +167,7 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
       le_chainHeight_add_nat_iff.1
         ((add_le_add_right (length_le_chainHeight_of_mem_subchain h) _).trans e),
       fun H ↦ _⟩
-  by_cases s.chainHeight = ⊤
+  by_cases h : s.chainHeight = ⊤
   · suffices t.chainHeight = ⊤ by
       rw [this, top_add]
       exact le_top
feat: More complete lattice WithTop lemmas (#6947)

and corresponding lemmas for ℕ∞.

Also fix implicitness of iff lemmas.

Diff
@@ -95,7 +95,7 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
   cases' (le_top : s.chainHeight ≤ ⊤).eq_or_lt with ha ha <;>
     rw [chainHeight_eq_iSup_subtype] at ha
   · obtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ :=
-      not_bddAbove_iff'.mp ((WithTop.iSup_coe_eq_top _).mp ha) n
+      not_bddAbove_iff'.mp (WithTop.iSup_coe_eq_top.1 ha) n
     exact ⟨l.take n, ⟨h₁.take _, fun x h ↦ h₂ _ <| take_subset _ _ h⟩,
       (l.length_take n).trans <| min_eq_left <| le_of_not_ge h₃⟩
   · rw [ENat.iSup_coe_lt_top] at ha
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
@@ -48,7 +48,7 @@ open OrderDual
 
 universe u v
 
-variable {α β : Type _}
+variable {α β : Type*}
 
 namespace Set
 
chore: bump to nightly-2023-07-15 (#5992)

Various adaptations to changes when Fin API was moved to Std. One notable change is that many lemmas are now stated in terms of i ≠ 0 (for i : Fin n) rather then i.1 ≠ 0, and as a consequence many Fin.vne_of_ne applications have been added or removed, mostly removed.

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

Diff
@@ -244,7 +244,7 @@ theorem chainHeight_dual : (ofDual ⁻¹' s).chainHeight = s.chainHeight := by
   apply le_antisymm <;>
   · rw [chainHeight_le_chainHeight_iff]
     rintro l ⟨h₁, h₂⟩
-    exact ⟨l.reverse, ⟨chain'_reverse.mpr h₁, fun i h ↦ h₂ i ((mem_reverse i l).mp h)⟩,
+    exact ⟨l.reverse, ⟨chain'_reverse.mpr h₁, fun i h ↦ h₂ i (mem_reverse.mp h)⟩,
       (length_reverse _).symm⟩
 #align set.chain_height_dual Set.chainHeight_dual
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module order.height
-! leanprover-community/mathlib commit bf27744463e9620ca4e4ebe951fe83530ae6949b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.ENat.Lattice
 import Mathlib.Order.OrderIsoNat
 import Mathlib.Tactic.TFAE
 
+#align_import order.height from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
+
 /-!
 
 # Maximal length of chains
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -174,7 +174,7 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
   · suffices t.chainHeight = ⊤ by
       rw [this, top_add]
       exact le_top
-    rw [chainHeight_eq_top_iff] at h⊢
+    rw [chainHeight_eq_top_iff] at h ⊢
     intro k
     have := (le_chainHeight_TFAE t k).out 1 2
     rw [this]
chore: restore tfae proofs (#4493)
Diff
@@ -111,12 +111,10 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
 
 theorem le_chainHeight_TFAE (n : ℕ) :
     TFAE [↑n ≤ s.chainHeight, ∃ l ∈ s.subchain, length l = n, ∃ l ∈ s.subchain, n ≤ length l] := by
-  apply_rules [tfae_of_cycle, Chain.cons, Chain.nil]
-  · exact s.exists_chain_of_le_chainHeight
-  · rintro ⟨l, hls, he⟩
-    exact ⟨l, hls, he.ge⟩
-  · rintro ⟨l, hs, hn⟩
-    exact le_iSup₂_of_le l hs (Nat.cast_le.2 hn)
+  tfae_have 1 → 2; · exact s.exists_chain_of_le_chainHeight
+  tfae_have 2 → 3; · rintro ⟨l, hls, he⟩; exact ⟨l, hls, he.ge⟩
+  tfae_have 3 → 1; · rintro ⟨l, hs, hn⟩; exact le_iSup₂_of_le l hs (WithTop.coe_le_coe.2 hn)
+  tfae_finish
 #align set.le_chain_height_tfae Set.le_chainHeight_TFAE
 
 variable {s t}
@@ -192,8 +190,9 @@ theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ)
 theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
     TFAE [s.chainHeight ≤ t.chainHeight, ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l',
       ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l'] := by
-  tfae_have 1 ↔ 3; · convert ← chainHeight_add_le_chainHeight_add s t 0 0 <;> apply add_zero
-  tfae_have 2 ↔ 3;
+  tfae_have 1 ↔ 3
+  · convert ← chainHeight_add_le_chainHeight_add s t 0 0 <;> apply add_zero
+  tfae_have 2 ↔ 3
   · refine' forall₂_congr fun l hl ↦ _
     simp_rw [← (le_chainHeight_TFAE t l.length).out 1 2, eq_comm]
   tfae_finish
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -89,24 +89,24 @@ noncomputable def chainHeight : ℕ∞ :=
   ⨆ l ∈ s.subchain, length l
 #align set.chain_height Set.chainHeight
 
-theorem chainHeight_eq_supᵢ_subtype : s.chainHeight = ⨆ l : s.subchain, ↑l.1.length :=
-  supᵢ_subtype'
-#align set.chain_height_eq_supr_subtype Set.chainHeight_eq_supᵢ_subtype
+theorem chainHeight_eq_iSup_subtype : s.chainHeight = ⨆ l : s.subchain, ↑l.1.length :=
+  iSup_subtype'
+#align set.chain_height_eq_supr_subtype Set.chainHeight_eq_iSup_subtype
 
 theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
     ∃ l ∈ s.subchain, length l = n := by
   cases' (le_top : s.chainHeight ≤ ⊤).eq_or_lt with ha ha <;>
-    rw [chainHeight_eq_supᵢ_subtype] at ha
+    rw [chainHeight_eq_iSup_subtype] at ha
   · obtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ :=
-      not_bddAbove_iff'.mp ((WithTop.supᵢ_coe_eq_top _).mp ha) n
+      not_bddAbove_iff'.mp ((WithTop.iSup_coe_eq_top _).mp ha) n
     exact ⟨l.take n, ⟨h₁.take _, fun x h ↦ h₂ _ <| take_subset _ _ h⟩,
       (l.length_take n).trans <| min_eq_left <| le_of_not_ge h₃⟩
-  · rw [ENat.supᵢ_coe_lt_top] at ha
-    obtain ⟨⟨l, h₁, h₂⟩, e : l.length = _⟩ := Nat.supₛ_mem (Set.range_nonempty _) ha
+  · rw [ENat.iSup_coe_lt_top] at ha
+    obtain ⟨⟨l, h₁, h₂⟩, e : l.length = _⟩ := Nat.sSup_mem (Set.range_nonempty _) ha
     refine'
       ⟨l.take n, ⟨h₁.take _, fun x h ↦ h₂ _ <| take_subset _ _ h⟩,
         (l.length_take n).trans <| min_eq_left <| _⟩
-    rwa [e, ← Nat.cast_le (α := ℕ∞), supₛ_range, ENat.coe_supᵢ ha, ← chainHeight_eq_supᵢ_subtype]
+    rwa [e, ← Nat.cast_le (α := ℕ∞), sSup_range, ENat.coe_iSup ha, ← chainHeight_eq_iSup_subtype]
 #align set.exists_chain_of_le_chain_height Set.exists_chain_of_le_chainHeight
 
 theorem le_chainHeight_TFAE (n : ℕ) :
@@ -116,7 +116,7 @@ theorem le_chainHeight_TFAE (n : ℕ) :
   · rintro ⟨l, hls, he⟩
     exact ⟨l, hls, he.ge⟩
   · rintro ⟨l, hs, hn⟩
-    exact le_supᵢ₂_of_le l hs (Nat.cast_le.2 hn)
+    exact le_iSup₂_of_le l hs (Nat.cast_le.2 hn)
 #align set.le_chain_height_tfae Set.le_chainHeight_TFAE
 
 variable {s t}
@@ -258,12 +258,12 @@ section Preorder
 
 variable (s t : Set α) [Preorder α]
 
-theorem chainHeight_eq_supᵢ_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i).chainHeight := by
+theorem chainHeight_eq_iSup_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici i).chainHeight := by
   apply le_antisymm
-  · refine' supᵢ₂_le _
+  · refine' iSup₂_le _
     rintro (_ | ⟨x, xs⟩) h
     · exact zero_le _
-    · apply le_trans _ (le_supᵢ₂ x (cons_mem_subchain_iff.mp h).1)
+    · apply le_trans _ (le_iSup₂ x (cons_mem_subchain_iff.mp h).1)
       apply length_le_chainHeight_of_mem_subchain
       refine' ⟨h.1, fun i hi ↦ ⟨h.2 i hi, _⟩⟩
       cases hi
@@ -271,14 +271,14 @@ theorem chainHeight_eq_supᵢ_Ici : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Ici
       rename_i hi
       cases' chain'_iff_pairwise.mp h.1 with _ _ h'
       exact (h' _ hi).le
-  · exact supᵢ₂_le fun i _ ↦ chainHeight_mono <| Set.inter_subset_left _ _
-#align set.chain_height_eq_supr_Ici Set.chainHeight_eq_supᵢ_Ici
+  · exact iSup₂_le fun i _ ↦ chainHeight_mono <| Set.inter_subset_left _ _
+#align set.chain_height_eq_supr_Ici Set.chainHeight_eq_iSup_Ici
 
-theorem chainHeight_eq_supᵢ_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight := by
+theorem chainHeight_eq_iSup_Iic : s.chainHeight = ⨆ i ∈ s, (s ∩ Set.Iic i).chainHeight := by
   simp_rw [← chainHeight_dual (_ ∩ _)]
-  rw [← chainHeight_dual, chainHeight_eq_supᵢ_Ici]
+  rw [← chainHeight_dual, chainHeight_eq_iSup_Ici]
   rfl
-#align set.chain_height_eq_supr_Iic Set.chainHeight_eq_supᵢ_Iic
+#align set.chain_height_eq_supr_Iic Set.chainHeight_eq_iSup_Iic
 
 variable {s t}
 
@@ -318,7 +318,7 @@ theorem chainHeight_insert_of_forall_lt (a : α) (ha : ∀ b ∈ s, b < a) :
 
 theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight := by
   classical
-    refine' supᵢ₂_le fun l hl ↦ _
+    refine' iSup₂_le fun l hl ↦ _
     let l₁ := l.filter (· ∈ s)
     let l₂ := l.filter (· ∈ t)
     have hl₁ : ↑l₁.length ≤ s.chainHeight := by
@@ -361,7 +361,7 @@ theorem wellFoundedGT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠
   refine' ⟨RelEmbedding.wellFounded_iff_no_descending_seq.2 ⟨fun f ↦ _⟩⟩
   refine' n.lt_succ_self.not_le (WithTop.coe_le_coe.1 <| hn.symm ▸ _)
   refine'
-    le_supᵢ₂_of_le _
+    le_iSup₂_of_le _
       ⟨chain'_map_of_chain' ((↑) : {x // x ∈ s} → α) (fun _ _ ↦ id)
           (chain'_iff_pairwise.2 <| pairwise_ofFn.2 fun i j ↦ f.map_rel_iff.2),
         fun i h ↦ _⟩
fix: correct mathlib3-style lattice lemma names (#3957)

Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -98,7 +98,7 @@ theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
   cases' (le_top : s.chainHeight ≤ ⊤).eq_or_lt with ha ha <;>
     rw [chainHeight_eq_supᵢ_subtype] at ha
   · obtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ :=
-      not_bddAbove_iff'.mp ((WithTop.supr_coe_eq_top _).mp ha) n
+      not_bddAbove_iff'.mp ((WithTop.supᵢ_coe_eq_top _).mp ha) n
     exact ⟨l.take n, ⟨h₁.take _, fun x h ↦ h₂ _ <| take_subset _ _ h⟩,
       (l.length_take n).trans <| min_eq_left <| le_of_not_ge h₃⟩
   · rw [ENat.supᵢ_coe_lt_top] at ha
Diff
@@ -328,8 +328,7 @@ theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chain
       apply Set.length_le_chainHeight_of_mem_subchain
       exact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩
     refine' le_trans _ (add_le_add hl₁ hl₂)
-    simp_rw [← WithTop.coe_add, ← Nat.cast_add, WithTop.coe_le_coe, ← Multiset.coe_card,
-      ← Multiset.card_add, ← Multiset.coe_filter]
+    simp_rw [← Nat.cast_add, ← Multiset.coe_card, ← Multiset.card_add, ← Multiset.coe_filter]
     rw [Multiset.filter_add_filter, Multiset.filter_eq_self.mpr, Multiset.card_add, Nat.cast_add]
     exacts [le_add_right rfl.le, hl.2]
 #align set.chain_height_union_le Set.chainHeight_union_le
feat: port Order.Height (#2186)

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: int-y1 <jason_yuen2007@hotmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Dependencies 7 + 265

266 files ported (97.4%)
110742 lines ported (97.3%)
Show graph

The unported dependencies are