data.pfunMathlib.Data.PFun

This file has been ported!

Changes since the initial port

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

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -738,7 +738,7 @@ theorem preimage_comp (f : β →. γ) (g : α →. β) (s : Set γ) :
   simp_rw [mem_preimage, comp_apply, Part.mem_bind_iff, exists_prop, ← exists_and_right, ←
     exists_and_left]
   rw [exists_comm]
-  simp_rw [and_assoc', and_comm]
+  simp_rw [and_assoc, and_comm]
 #align pfun.preimage_comp PFun.preimage_comp
 -/
 
@@ -750,7 +750,7 @@ theorem PFun.Part.bind_comp (f : β →. γ) (g : α →. β) (a : Part α) :
   simp_rw [Part.mem_bind_iff, comp_apply, Part.mem_bind_iff, exists_prop, ← exists_and_right, ←
     exists_and_left]
   rw [exists_comm]
-  simp_rw [and_assoc']
+  simp_rw [and_assoc]
 #align part.bind_comp PFun.Part.bind_comp
 -/
 
Diff
@@ -616,7 +616,7 @@ theorem preimage_eq (f : α →. β) (s : Set β) : f.Preimage s = f.core s ∩
 
 #print PFun.core_eq /-
 theorem core_eq (f : α →. β) (s : Set β) : f.core s = f.Preimage s ∪ f.Domᶜ := by
-  rw [preimage_eq, Set.union_distrib_right, Set.union_comm (dom f), Set.compl_union_self,
+  rw [preimage_eq, Set.inter_union_distrib_right, Set.union_comm (dom f), Set.compl_union_self,
     Set.inter_univ, Set.union_eq_self_of_subset_right (f.compl_dom_subset_core s)]
 #align pfun.core_eq PFun.core_eq
 -/
Diff
@@ -331,7 +331,7 @@ def fix (f : α →. Sum β α) : α →. β := fun a =>
 theorem dom_of_mem_fix {f : α →. Sum β α} {a : α} {b : β} (h : b ∈ f.fix a) : (f a).Dom :=
   by
   let ⟨h₁, h₂⟩ := Part.mem_assert_iff.1 h
-  rw [WellFounded.fixF_eq] at h₂  <;> exact h₂.fst.fst
+  rw [WellFounded.fixF_eq] at h₂ <;> exact h₂.fst.fst
 #align pfun.dom_of_mem_fix PFun.dom_of_mem_fix
 -/
 
@@ -340,10 +340,10 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     b ∈ f.fix a ↔ Sum.inl b ∈ f a ∨ ∃ a', Sum.inr a' ∈ f a ∧ b ∈ f.fix a' :=
   ⟨fun h => by
     let ⟨h₁, h₂⟩ := Part.mem_assert_iff.1 h
-    rw [WellFounded.fixF_eq] at h₂ 
-    simp at h₂ 
+    rw [WellFounded.fixF_eq] at h₂
+    simp at h₂
     cases' h₂ with h₂ h₃
-    cases' e : (f a).get h₂ with b' a' <;> simp [e] at h₃ 
+    cases' e : (f a).get h₂ with b' a' <;> simp [e] at h₃
     · subst b'; refine' Or.inl ⟨h₂, e⟩
     · exact Or.inr ⟨a', ⟨_, e⟩, Part.mem_assert _ h₃⟩, fun h =>
     by
@@ -352,7 +352,7 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     · refine' ⟨⟨_, fun y h' => _⟩, _⟩
       · injection Part.mem_unique ⟨h₁, h₂⟩ h'
       · rw [WellFounded.fixF_eq]; simp [h₁, h₂]
-    · simp [fix] at h₃ ; cases' h₃ with h₃ h₄
+    · simp [fix] at h₃; cases' h₃ with h₃ h₄
       refine' ⟨⟨_, fun y h' => _⟩, _⟩
       · injection Part.mem_unique h h' with e
         exact e ▸ h₃
@@ -390,7 +390,7 @@ theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a
 def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') : C a :=
   by
-  have h₂ := (Part.mem_assert_iff.1 h).snd; generalize_proofs h₁ at h₂ ; clear h
+  have h₂ := (Part.mem_assert_iff.1 h).snd; generalize_proofs h₁ at h₂; clear h
   induction' h₁ with a ha IH
   have h : b ∈ f.fix a := Part.mem_assert_iff.2 ⟨⟨a, ha⟩, h₂⟩
   exact H a h fun a' fa' => IH a' fa' (Part.mem_assert_iff.1 (fix_fwd h fa')).snd
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2017 Mario Carneiro. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro, Jeremy Avigad, Simon Hudon
 -/
-import Mathbin.Data.Part
-import Mathbin.Data.Rel
+import Data.Part
+import Data.Rel
 
 #align_import data.pfun from "leanprover-community/mathlib"@"0ebfdb71919ac6ca5d7fbc61a082fa2519556818"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2017 Mario Carneiro. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro, Jeremy Avigad, Simon Hudon
-
-! This file was ported from Lean 3 source module data.pfun
-! leanprover-community/mathlib commit 0ebfdb71919ac6ca5d7fbc61a082fa2519556818
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Part
 import Mathbin.Data.Rel
 
+#align_import data.pfun from "leanprover-community/mathlib"@"0ebfdb71919ac6ca5d7fbc61a082fa2519556818"
+
 /-!
 # Partial functions
 
Diff
@@ -295,7 +295,7 @@ instance : Monad (PFun α) where
 
 instance : LawfulMonad (PFun α)
     where
-  bind_pure_comp_eq_map β γ f x := funext fun a => Part.bind_some_eq_map _ _
+  bind_pure_comp β γ f x := funext fun a => Part.bind_some_eq_map _ _
   id_map β f := by funext a <;> dsimp [Functor.map, PFun.map] <;> cases f a <;> rfl
   pure_bind β γ x f := funext fun a => Part.bind_some.{u_1, u_2} _ (f x)
   bind_assoc β γ δ f g k := funext fun a => (f a).bind_assoc (fun b => g b a) fun b => k b a
Diff
@@ -68,7 +68,6 @@ def PFun (α β : Type _) :=
 #align pfun PFun
 -/
 
--- mathport name: «expr →. »
 infixr:25 " →. " => PFun
 
 namespace PFun
@@ -85,18 +84,24 @@ def Dom (f : α →. β) : Set α :=
 #align pfun.dom PFun.Dom
 -/
 
+#print PFun.mem_dom /-
 @[simp]
 theorem mem_dom (f : α →. β) (x : α) : x ∈ Dom f ↔ ∃ y, y ∈ f x := by simp [dom, Part.dom_iff_mem]
 #align pfun.mem_dom PFun.mem_dom
+-/
 
+#print PFun.dom_mk /-
 @[simp]
 theorem dom_mk (p : α → Prop) (f : ∀ a, p a → β) : (PFun.Dom fun x => ⟨p x, f x⟩) = {x | p x} :=
   rfl
 #align pfun.dom_mk PFun.dom_mk
+-/
 
+#print PFun.dom_eq /-
 theorem dom_eq (f : α →. β) : Dom f = {x | ∃ y, y ∈ f x} :=
   Set.ext (mem_dom f)
 #align pfun.dom_eq PFun.dom_eq
+-/
 
 #print PFun.fn /-
 /-- Evaluate a partial function -/
@@ -105,10 +110,12 @@ def fn (f : α →. β) (a : α) : Dom f a → β :=
 #align pfun.fn PFun.fn
 -/
 
+#print PFun.fn_apply /-
 @[simp]
 theorem fn_apply (f : α →. β) (a : α) : f.fn a = (f a).get :=
   rfl
 #align pfun.fn_apply PFun.fn_apply
+-/
 
 #print PFun.evalOpt /-
 /-- Evaluate a partial function to return an `option` -/
@@ -117,15 +124,19 @@ def evalOpt (f : α →. β) [D : DecidablePred (· ∈ Dom f)] (x : α) : Optio
 #align pfun.eval_opt PFun.evalOpt
 -/
 
+#print PFun.ext' /-
 /-- Partial function extensionality -/
 theorem ext' {f g : α →. β} (H1 : ∀ a, a ∈ Dom f ↔ a ∈ Dom g) (H2 : ∀ a p q, f.fn a p = g.fn a q) :
     f = g :=
   funext fun a => Part.ext' (H1 a) (H2 a)
 #align pfun.ext' PFun.ext'
+-/
 
+#print PFun.ext /-
 theorem ext {f g : α →. β} (H : ∀ a b, b ∈ f a ↔ b ∈ g a) : f = g :=
   funext fun a => Part.ext (H a)
 #align pfun.ext PFun.ext
+-/
 
 #print PFun.asSubtype /-
 /-- Turns a partial function into a function out of its domain. -/
@@ -143,10 +154,12 @@ def equivSubtype : (α →. β) ≃ Σ p : α → Prop, Subtype p → β :=
 #align pfun.equiv_subtype PFun.equivSubtype
 -/
 
+#print PFun.asSubtype_eq_of_mem /-
 theorem asSubtype_eq_of_mem {f : α →. β} {x : α} {y : β} (fxy : y ∈ f x) (domx : x ∈ f.Dom) :
     f.asSubtype ⟨x, domx⟩ = y :=
   Part.mem_unique (Part.get_mem _) fxy
 #align pfun.as_subtype_eq_of_mem PFun.asSubtype_eq_of_mem
+-/
 
 #print PFun.lift /-
 /-- Turn a total function into a partial function. -/
@@ -169,14 +182,18 @@ theorem coe_val (f : α → β) (a : α) : (f : α →. β) a = Part.some (f a)
 #align pfun.coe_val PFun.coe_val
 -/
 
+#print PFun.dom_coe /-
 @[simp]
 theorem dom_coe (f : α → β) : (f : α →. β).Dom = Set.univ :=
   rfl
 #align pfun.dom_coe PFun.dom_coe
+-/
 
+#print PFun.lift_injective /-
 theorem lift_injective : Injective (coe : (α → β) → α →. β) := fun f g h =>
   funext fun a => Part.some_injective <| congr_fun h a
 #align pfun.coe_injective PFun.lift_injective
+-/
 
 #print PFun.graph /-
 /-- Graph of a partial function `f` as the set of pairs `(x, f x)` where `x` is in the domain of
@@ -208,10 +225,12 @@ def restrict (f : α →. β) {p : Set α} (H : p ⊆ f.Dom) : α →. β := fun
 #align pfun.restrict PFun.restrict
 -/
 
+#print PFun.mem_restrict /-
 @[simp]
 theorem mem_restrict {f : α →. β} {s : Set α} (h : s ⊆ f.Dom) (a : α) (b : β) :
     b ∈ f.restrict h a ↔ a ∈ s ∧ b ∈ f a := by simp [restrict]
 #align pfun.mem_restrict PFun.mem_restrict
+-/
 
 #print PFun.res /-
 /-- Turns a function into a partial function with a prescribed domain. -/
@@ -220,17 +239,23 @@ def res (f : α → β) (s : Set α) : α →. β :=
 #align pfun.res PFun.res
 -/
 
+#print PFun.mem_res /-
 theorem mem_res (f : α → β) (s : Set α) (a : α) (b : β) : b ∈ res f s a ↔ a ∈ s ∧ f a = b := by
   simp [res, @eq_comm _ b]
 #align pfun.mem_res PFun.mem_res
+-/
 
+#print PFun.res_univ /-
 theorem res_univ (f : α → β) : PFun.res f Set.univ = f :=
   rfl
 #align pfun.res_univ PFun.res_univ
+-/
 
+#print PFun.dom_iff_graph /-
 theorem dom_iff_graph (f : α →. β) (x : α) : x ∈ f.Dom ↔ ∃ y, (x, y) ∈ f.graph :=
   Part.dom_iff_mem
 #align pfun.dom_iff_graph PFun.dom_iff_graph
+-/
 
 #print PFun.lift_graph /-
 theorem lift_graph {f : α → β} {a b} : (a, b) ∈ (f : α →. β).graph ↔ f a = b :=
@@ -250,10 +275,12 @@ def bind (f : α →. β) (g : β → α →. γ) : α →. γ := fun a => (f a)
 #align pfun.bind PFun.bind
 -/
 
+#print PFun.bind_apply /-
 @[simp]
 theorem bind_apply (f : α →. β) (g : β → α →. γ) (a : α) : f.bind g a = (f a).bind fun b => g b a :=
   rfl
 #align pfun.bind_apply PFun.bind_apply
+-/
 
 #print PFun.map /-
 /-- The monad `map` function, pointwise `part.map` -/
@@ -273,14 +300,18 @@ instance : LawfulMonad (PFun α)
   pure_bind β γ x f := funext fun a => Part.bind_some.{u_1, u_2} _ (f x)
   bind_assoc β γ δ f g k := funext fun a => (f a).bind_assoc (fun b => g b a) fun b => k b a
 
+#print PFun.pure_defined /-
 theorem pure_defined (p : Set α) (x : β) : p ⊆ (@PFun.pure α _ x).Dom :=
   p.subset_univ
 #align pfun.pure_defined PFun.pure_defined
+-/
 
+#print PFun.bind_defined /-
 theorem bind_defined {α β γ} (p : Set α) {f : α →. β} {g : β → α →. γ} (H1 : p ⊆ f.Dom)
     (H2 : ∀ x, p ⊆ (g x).Dom) : p ⊆ (f >>= g).Dom := fun a ha =>
   (⟨H1 ha, H2 _ ha⟩ : (f >>= g).Dom a)
 #align pfun.bind_defined PFun.bind_defined
+-/
 
 #print PFun.fix /-
 /-- First return map. Transforms a partial function `f : α →. β ⊕ α` into the partial function
@@ -299,12 +330,15 @@ def fix (f : α →. Sum β α) : α →. β := fun a =>
 #align pfun.fix PFun.fix
 -/
 
+#print PFun.dom_of_mem_fix /-
 theorem dom_of_mem_fix {f : α →. Sum β α} {a : α} {b : β} (h : b ∈ f.fix a) : (f a).Dom :=
   by
   let ⟨h₁, h₂⟩ := Part.mem_assert_iff.1 h
   rw [WellFounded.fixF_eq] at h₂  <;> exact h₂.fst.fst
 #align pfun.dom_of_mem_fix PFun.dom_of_mem_fix
+-/
 
+#print PFun.mem_fix_iff /-
 theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     b ∈ f.fix a ↔ Sum.inl b ∈ f a ∨ ∃ a', Sum.inr a' ∈ f a ∧ b ∈ f.fix a' :=
   ⟨fun h => by
@@ -328,12 +362,16 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
       · cases' h with h₁ h₂
         rw [WellFounded.fixF_eq]; simp [h₁, h₂, h₄]⟩
 #align pfun.mem_fix_iff PFun.mem_fix_iff
+-/
 
+#print PFun.fix_stop /-
 /-- If advancing one step from `a` leads to `b : β`, then `f.fix a = b` -/
 theorem fix_stop {f : α →. Sum β α} {b : β} {a : α} (hb : Sum.inl b ∈ f a) : b ∈ f.fix a := by
   rw [PFun.mem_fix_iff]; exact Or.inl hb
 #align pfun.fix_stop PFun.fix_stop
+-/
 
+#print PFun.fix_fwd_eq /-
 /-- If advancing one step from `a` on `f` leads to `a' : α`, then `f.fix a = f.fix a'` -/
 theorem fix_fwd_eq {f : α →. Sum β α} {a a' : α} (ha' : Sum.inr a' ∈ f a) : f.fix a = f.fix a' :=
   by
@@ -341,10 +379,13 @@ theorem fix_fwd_eq {f : α →. Sum β α} {a a' : α} (ha' : Sum.inr a' ∈ f a
   · intro h; obtain h' | ⟨a, h', e'⟩ := mem_fix_iff.1 h <;> cases Part.mem_unique ha' h'; exact e'
   · intro h; rw [PFun.mem_fix_iff]; right; use a'; exact ⟨ha', h⟩
 #align pfun.fix_fwd_eq PFun.fix_fwd_eq
+-/
 
+#print PFun.fix_fwd /-
 theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a) (ha' : Sum.inr a' ∈ f a) :
     b ∈ f.fix a' := by rwa [← fix_fwd_eq ha']
 #align pfun.fix_fwd PFun.fix_fwd
+-/
 
 #print PFun.fixInduction /-
 /-- A recursion principle for `pfun.fix`. -/
@@ -359,11 +400,13 @@ def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (
 #align pfun.fix_induction PFun.fixInduction
 -/
 
+#print PFun.fixInduction_spec /-
 theorem fixInduction_spec {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') :
     @fixInduction _ _ C _ _ _ h H = H a h fun a' h' => fixInduction (fix_fwd h h') H := by
   unfold fix_induction; generalize_proofs ha; induction ha; rfl
 #align pfun.fix_induction_spec PFun.fixInduction_spec
+-/
 
 #print PFun.fixInduction' /-
 /-- Another induction lemma for `b ∈ f.fix a` which allows one to prove a predicate `P` holds for
@@ -381,13 +424,16 @@ def fixInduction' {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α}
 #align pfun.fix_induction' PFun.fixInduction'
 -/
 
+#print PFun.fixInduction'_stop /-
 theorem fixInduction'_stop {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (fa : Sum.inl b ∈ f a) (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
     (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) :
     @fixInduction' _ _ C _ _ _ h hbase hind = hbase a fa := by unfold fix_induction';
   rw [fix_induction_spec]; simp [Part.get_eq_of_mem fa]
 #align pfun.fix_induction'_stop PFun.fixInduction'_stop
+-/
 
+#print PFun.fixInduction'_fwd /-
 theorem fixInduction'_fwd {C : α → Sort _} {f : α →. Sum β α} {b : β} {a a' : α} (h : b ∈ f.fix a)
     (h' : b ∈ f.fix a') (fa : Sum.inr a' ∈ f a)
     (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
@@ -395,6 +441,7 @@ theorem fixInduction'_fwd {C : α → Sort _} {f : α →. Sum β α} {b : β} {
     @fixInduction' _ _ C _ _ _ h hbase hind = hind a a' h' fa (fixInduction' h' hbase hind) := by
   unfold fix_induction'; rw [fix_induction_spec]; simpa [Part.get_eq_of_mem fa]
 #align pfun.fix_induction'_fwd PFun.fixInduction'_fwd
+-/
 
 variable (f : α →. β)
 
@@ -405,25 +452,35 @@ def image (s : Set α) : Set β :=
 #align pfun.image PFun.image
 -/
 
+#print PFun.image_def /-
 theorem image_def (s : Set α) : f.image s = {y | ∃ x ∈ s, y ∈ f x} :=
   rfl
 #align pfun.image_def PFun.image_def
+-/
 
+#print PFun.mem_image /-
 theorem mem_image (y : β) (s : Set α) : y ∈ f.image s ↔ ∃ x ∈ s, y ∈ f x :=
   Iff.rfl
 #align pfun.mem_image PFun.mem_image
+-/
 
+#print PFun.image_mono /-
 theorem image_mono {s t : Set α} (h : s ⊆ t) : f.image s ⊆ f.image t :=
   Rel.image_mono _ h
 #align pfun.image_mono PFun.image_mono
+-/
 
+#print PFun.image_inter /-
 theorem image_inter (s t : Set α) : f.image (s ∩ t) ⊆ f.image s ∩ f.image t :=
   Rel.image_inter _ s t
 #align pfun.image_inter PFun.image_inter
+-/
 
+#print PFun.image_union /-
 theorem image_union (s t : Set α) : f.image (s ∪ t) = f.image s ∪ f.image t :=
   Rel.image_union _ s t
 #align pfun.image_union PFun.image_union
+-/
 
 #print PFun.preimage /-
 /-- Preimage of a set under a partial function. -/
@@ -432,14 +489,18 @@ def preimage (s : Set β) : Set α :=
 #align pfun.preimage PFun.preimage
 -/
 
+#print PFun.Preimage_def /-
 theorem Preimage_def (s : Set β) : f.Preimage s = {x | ∃ y ∈ s, y ∈ f x} :=
   rfl
 #align pfun.preimage_def PFun.Preimage_def
+-/
 
+#print PFun.mem_preimage /-
 @[simp]
 theorem mem_preimage (s : Set β) (x : α) : x ∈ f.Preimage s ↔ ∃ y ∈ s, y ∈ f x :=
   Iff.rfl
 #align pfun.mem_preimage PFun.mem_preimage
+-/
 
 #print PFun.preimage_subset_dom /-
 theorem preimage_subset_dom (s : Set β) : f.Preimage s ⊆ f.Dom := fun x ⟨y, ys, fxy⟩ =>
@@ -453,16 +514,22 @@ theorem preimage_mono {s t : Set β} (h : s ⊆ t) : f.Preimage s ⊆ f.Preimage
 #align pfun.preimage_mono PFun.preimage_mono
 -/
 
+#print PFun.preimage_inter /-
 theorem preimage_inter (s t : Set β) : f.Preimage (s ∩ t) ⊆ f.Preimage s ∩ f.Preimage t :=
   Rel.preimage_inter _ s t
 #align pfun.preimage_inter PFun.preimage_inter
+-/
 
+#print PFun.preimage_union /-
 theorem preimage_union (s t : Set β) : f.Preimage (s ∪ t) = f.Preimage s ∪ f.Preimage t :=
   Rel.preimage_union _ s t
 #align pfun.preimage_union PFun.preimage_union
+-/
 
+#print PFun.preimage_univ /-
 theorem preimage_univ : f.Preimage Set.univ = f.Dom := by ext <;> simp [mem_preimage, mem_dom]
 #align pfun.preimage_univ PFun.preimage_univ
+-/
 
 #print PFun.coe_preimage /-
 theorem coe_preimage (f : α → β) (s : Set β) : (f : α →. β).Preimage s = f ⁻¹' s := by ext <;> simp
@@ -490,9 +557,11 @@ theorem mem_core (x : α) (s : Set β) : x ∈ f.core s ↔ ∀ y, y ∈ f x →
 #align pfun.mem_core PFun.mem_core
 -/
 
+#print PFun.compl_dom_subset_core /-
 theorem compl_dom_subset_core (s : Set β) : f.Domᶜ ⊆ f.core s := fun x hx y fxy =>
   absurd ((mem_dom f x).mpr ⟨y, fxy⟩) hx
 #align pfun.compl_dom_subset_core PFun.compl_dom_subset_core
+-/
 
 #print PFun.core_mono /-
 theorem core_mono {s t : Set β} (h : s ⊆ t) : f.core s ⊆ f.core t :=
@@ -500,21 +569,27 @@ theorem core_mono {s t : Set β} (h : s ⊆ t) : f.core s ⊆ f.core t :=
 #align pfun.core_mono PFun.core_mono
 -/
 
+#print PFun.core_inter /-
 theorem core_inter (s t : Set β) : f.core (s ∩ t) = f.core s ∩ f.core t :=
   Rel.core_inter _ s t
 #align pfun.core_inter PFun.core_inter
+-/
 
+#print PFun.mem_core_res /-
 theorem mem_core_res (f : α → β) (s : Set α) (t : Set β) (x : α) :
     x ∈ (res f s).core t ↔ x ∈ s → f x ∈ t := by simp [mem_core, mem_res]
 #align pfun.mem_core_res PFun.mem_core_res
+-/
 
 section
 
 open scoped Classical
 
+#print PFun.core_res /-
 theorem core_res (f : α → β) (s : Set α) (t : Set β) : (res f s).core t = sᶜ ∪ f ⁻¹' t := by ext;
   rw [mem_core_res]; by_cases h : x ∈ s <;> simp [h]
 #align pfun.core_res PFun.core_res
+-/
 
 end
 
@@ -524,12 +599,15 @@ theorem core_restrict (f : α → β) (s : Set β) : (f : α →. β).core s = s
 #align pfun.core_restrict PFun.core_restrict
 -/
 
+#print PFun.preimage_subset_core /-
 theorem preimage_subset_core (f : α →. β) (s : Set β) : f.Preimage s ⊆ f.core s :=
   fun x ⟨y, ys, fxy⟩ y' fxy' =>
   have : y = y' := Part.mem_unique fxy fxy'
   this ▸ ys
 #align pfun.preimage_subset_core PFun.preimage_subset_core
+-/
 
+#print PFun.preimage_eq /-
 theorem preimage_eq (f : α →. β) (s : Set β) : f.Preimage s = f.core s ∩ f.Dom :=
   Set.eq_of_subset_of_subset (Set.subset_inter (f.preimage_subset_core s) (f.preimage_subset_dom s))
     fun x ⟨xcore, xdom⟩ =>
@@ -537,12 +615,16 @@ theorem preimage_eq (f : α →. β) (s : Set β) : f.Preimage s = f.core s ∩
     have ys : y ∈ s := xcore _ (Part.get_mem _)
     show x ∈ f.Preimage s from ⟨(f x).get xdom, ys, Part.get_mem _⟩
 #align pfun.preimage_eq PFun.preimage_eq
+-/
 
+#print PFun.core_eq /-
 theorem core_eq (f : α →. β) (s : Set β) : f.core s = f.Preimage s ∪ f.Domᶜ := by
   rw [preimage_eq, Set.union_distrib_right, Set.union_comm (dom f), Set.compl_union_self,
     Set.inter_univ, Set.union_eq_self_of_subset_right (f.compl_dom_subset_core s)]
 #align pfun.core_eq PFun.core_eq
+-/
 
+#print PFun.preimage_asSubtype /-
 theorem preimage_asSubtype (f : α →. β) (s : Set β) :
     f.asSubtype ⁻¹' s = Subtype.val ⁻¹' f.Preimage s :=
   by
@@ -554,6 +636,7 @@ theorem preimage_asSubtype (f : α →. β) (s : Set β) :
       have : f.fn x.val x.property ∈ f x.val := Part.get_mem _
       Part.mem_unique fxy this ▸ ys
 #align pfun.preimage_as_subtype PFun.preimage_asSubtype
+-/
 
 #print PFun.toSubtype /-
 /-- Turns a function into a partial function to a subtype. -/
@@ -561,10 +644,12 @@ def toSubtype (p : β → Prop) (f : α → β) : α →. Subtype p := fun a =>
 #align pfun.to_subtype PFun.toSubtype
 -/
 
+#print PFun.dom_toSubtype /-
 @[simp]
 theorem dom_toSubtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = {a | p (f a)} :=
   rfl
 #align pfun.dom_to_subtype PFun.dom_toSubtype
+-/
 
 #print PFun.toSubtype_apply /-
 @[simp]
@@ -615,21 +700,28 @@ def comp (f : β →. γ) (g : α →. β) : α →. γ := fun a => (g a).bind f
 #align pfun.comp PFun.comp
 -/
 
+#print PFun.comp_apply /-
 @[simp]
 theorem comp_apply (f : β →. γ) (g : α →. β) (a : α) : f.comp g a = (g a).bind f :=
   rfl
 #align pfun.comp_apply PFun.comp_apply
+-/
 
+#print PFun.id_comp /-
 @[simp]
 theorem id_comp (f : α →. β) : (PFun.id β).comp f = f :=
   ext fun _ _ => by simp
 #align pfun.id_comp PFun.id_comp
+-/
 
+#print PFun.comp_id /-
 @[simp]
 theorem comp_id (f : α →. β) : f.comp (PFun.id α) = f :=
   ext fun _ _ => by simp
 #align pfun.comp_id PFun.comp_id
+-/
 
+#print PFun.dom_comp /-
 @[simp]
 theorem dom_comp (f : β →. γ) (g : α →. β) : (f.comp g).Dom = g.Preimage f.Dom :=
   by
@@ -638,7 +730,9 @@ theorem dom_comp (f : β →. γ) (g : α →. β) : (f.comp g).Dom = g.Preimage
   rw [exists_comm]
   simp_rw [and_comm]
 #align pfun.dom_comp PFun.dom_comp
+-/
 
+#print PFun.preimage_comp /-
 @[simp]
 theorem preimage_comp (f : β →. γ) (g : α →. β) (s : Set γ) :
     (f.comp g).Preimage s = g.Preimage (f.Preimage s) :=
@@ -649,7 +743,9 @@ theorem preimage_comp (f : β →. γ) (g : α →. β) (s : Set γ) :
   rw [exists_comm]
   simp_rw [and_assoc', and_comm]
 #align pfun.preimage_comp PFun.preimage_comp
+-/
 
+#print PFun.Part.bind_comp /-
 @[simp]
 theorem PFun.Part.bind_comp (f : β →. γ) (g : α →. β) (a : Part α) :
     a.bind (f.comp g) = (a.bind g).bind f := by
@@ -659,16 +755,21 @@ theorem PFun.Part.bind_comp (f : β →. γ) (g : α →. β) (a : Part α) :
   rw [exists_comm]
   simp_rw [and_assoc']
 #align part.bind_comp PFun.Part.bind_comp
+-/
 
+#print PFun.comp_assoc /-
 @[simp]
 theorem comp_assoc (f : γ →. δ) (g : β →. γ) (h : α →. β) : (f.comp g).comp h = f.comp (g.comp h) :=
   ext fun _ _ => by simp only [comp_apply, PFun.Part.bind_comp]
 #align pfun.comp_assoc PFun.comp_assoc
+-/
 
+#print PFun.coe_comp /-
 -- This can't be `simp`
 theorem coe_comp (g : β → γ) (f : α → β) : ((g ∘ f : α → γ) : α →. γ) = (g : β →. γ).comp f :=
   ext fun _ _ => by simp only [coe_val, comp_apply, Part.bind_some]
 #align pfun.coe_comp PFun.coe_comp
+-/
 
 #print PFun.prodLift /-
 /-- Product of partial functions. -/
@@ -677,22 +778,29 @@ def prodLift (f : α →. β) (g : α →. γ) : α →. β × γ := fun x =>
 #align pfun.prod_lift PFun.prodLift
 -/
 
+#print PFun.dom_prodLift /-
 @[simp]
 theorem dom_prodLift (f : α →. β) (g : α →. γ) : (f.prodLift g).Dom = {x | (f x).Dom ∧ (g x).Dom} :=
   rfl
 #align pfun.dom_prod_lift PFun.dom_prodLift
+-/
 
+#print PFun.get_prodLift /-
 theorem get_prodLift (f : α →. β) (g : α →. γ) (x : α) (h) :
     (f.prodLift g x).get h = ((f x).get h.1, (g x).get h.2) :=
   rfl
 #align pfun.get_prod_lift PFun.get_prodLift
+-/
 
+#print PFun.prodLift_apply /-
 @[simp]
 theorem prodLift_apply (f : α →. β) (g : α →. γ) (x : α) :
     f.prodLift g x = ⟨(f x).Dom ∧ (g x).Dom, fun h => ((f x).get h.1, (g x).get h.2)⟩ :=
   rfl
 #align pfun.prod_lift_apply PFun.prodLift_apply
+-/
 
+#print PFun.mem_prodLift /-
 theorem mem_prodLift {f : α →. β} {g : α →. γ} {x : α} {y : β × γ} :
     y ∈ f.prodLift g x ↔ y.1 ∈ f x ∧ y.2 ∈ g x :=
   by
@@ -700,6 +808,7 @@ theorem mem_prodLift {f : α →. β} {g : α →. γ} {x : α} {y : β × γ} :
   · simp only [prod_lift, Part.mem_mk_iff, And.exists, Prod.ext_iff]
   · simpa only [exists_and_left, exists_and_right]
 #align pfun.mem_prod_lift PFun.mem_prodLift
+-/
 
 #print PFun.prodMap /-
 /-- Product of partial functions. -/
@@ -708,23 +817,30 @@ def prodMap (f : α →. γ) (g : β →. δ) : α × β →. γ × δ := fun x
 #align pfun.prod_map PFun.prodMap
 -/
 
+#print PFun.dom_prodMap /-
 @[simp]
 theorem dom_prodMap (f : α →. γ) (g : β →. δ) :
     (f.Prod_map g).Dom = {x | (f x.1).Dom ∧ (g x.2).Dom} :=
   rfl
 #align pfun.dom_prod_map PFun.dom_prodMap
+-/
 
+#print PFun.get_prodMap /-
 theorem get_prodMap (f : α →. γ) (g : β →. δ) (x : α × β) (h) :
     (f.Prod_map g x).get h = ((f x.1).get h.1, (g x.2).get h.2) :=
   rfl
 #align pfun.get_prod_map PFun.get_prodMap
+-/
 
+#print PFun.prodMap_apply /-
 @[simp]
 theorem prodMap_apply (f : α →. γ) (g : β →. δ) (x : α × β) :
     f.Prod_map g x = ⟨(f x.1).Dom ∧ (g x.2).Dom, fun h => ((f x.1).get h.1, (g x.2).get h.2)⟩ :=
   rfl
 #align pfun.prod_map_apply PFun.prodMap_apply
+-/
 
+#print PFun.mem_prodMap /-
 theorem mem_prodMap {f : α →. γ} {g : β →. δ} {x : α × β} {y : γ × δ} :
     y ∈ f.Prod_map g x ↔ y.1 ∈ f x.1 ∧ y.2 ∈ g x.2 :=
   by
@@ -732,7 +848,9 @@ theorem mem_prodMap {f : α →. γ} {g : β →. δ} {x : α × β} {y : γ ×
   · simp only [Prod_map, Part.mem_mk_iff, And.exists, Prod.ext_iff]
   · simpa only [exists_and_left, exists_and_right]
 #align pfun.mem_prod_map PFun.mem_prodMap
+-/
 
+#print PFun.prodLift_fst_comp_snd_comp /-
 @[simp]
 theorem prodLift_fst_comp_snd_comp (f : α →. γ) (g : β →. δ) :
     prodLift (f.comp ((Prod.fst : α × β → α) : α × β →. α))
@@ -740,17 +858,22 @@ theorem prodLift_fst_comp_snd_comp (f : α →. γ) (g : β →. δ) :
       prodMap f g :=
   ext fun a => by simp
 #align pfun.prod_lift_fst_comp_snd_comp PFun.prodLift_fst_comp_snd_comp
+-/
 
+#print PFun.prodMap_id_id /-
 @[simp]
 theorem prodMap_id_id : (PFun.id α).Prod_map (PFun.id β) = PFun.id _ :=
   ext fun _ _ => by simp [eq_comm]
 #align pfun.prod_map_id_id PFun.prodMap_id_id
+-/
 
+#print PFun.prodMap_comp_comp /-
 @[simp]
 theorem prodMap_comp_comp (f₁ : α →. β) (f₂ : β →. γ) (g₁ : δ →. ε) (g₂ : ε →. ι) :
     (f₂.comp f₁).Prod_map (g₂.comp g₁) = (f₂.Prod_map g₂).comp (f₁.Prod_map g₁) :=
   ext fun _ _ => by tidy
 #align pfun.prod_map_comp_comp PFun.prodMap_comp_comp
+-/
 
 end PFun
 
Diff
@@ -81,7 +81,7 @@ instance : Inhabited (α →. β) :=
 #print PFun.Dom /-
 /-- The domain of a partial function -/
 def Dom (f : α →. β) : Set α :=
-  { a | (f a).Dom }
+  {a | (f a).Dom}
 #align pfun.dom PFun.Dom
 -/
 
@@ -90,11 +90,11 @@ theorem mem_dom (f : α →. β) (x : α) : x ∈ Dom f ↔ ∃ y, y ∈ f x :=
 #align pfun.mem_dom PFun.mem_dom
 
 @[simp]
-theorem dom_mk (p : α → Prop) (f : ∀ a, p a → β) : (PFun.Dom fun x => ⟨p x, f x⟩) = { x | p x } :=
+theorem dom_mk (p : α → Prop) (f : ∀ a, p a → β) : (PFun.Dom fun x => ⟨p x, f x⟩) = {x | p x} :=
   rfl
 #align pfun.dom_mk PFun.dom_mk
 
-theorem dom_eq (f : α →. β) : Dom f = { x | ∃ y, y ∈ f x } :=
+theorem dom_eq (f : α →. β) : Dom f = {x | ∃ y, y ∈ f x} :=
   Set.ext (mem_dom f)
 #align pfun.dom_eq PFun.dom_eq
 
@@ -182,7 +182,7 @@ theorem lift_injective : Injective (coe : (α → β) → α →. β) := fun f g
 /-- Graph of a partial function `f` as the set of pairs `(x, f x)` where `x` is in the domain of
 `f`. -/
 def graph (f : α →. β) : Set (α × β) :=
-  { p | p.2 ∈ f p.1 }
+  {p | p.2 ∈ f p.1}
 #align pfun.graph PFun.graph
 -/
 
@@ -197,7 +197,7 @@ def graph' (f : α →. β) : Rel α β := fun x y => y ∈ f x
 /-- The range of a partial function is the set of values
   `f x` where `x` is in the domain of `f`. -/
 def ran (f : α →. β) : Set β :=
-  { b | ∃ a, b ∈ f a }
+  {b | ∃ a, b ∈ f a}
 #align pfun.ran PFun.ran
 -/
 
@@ -352,7 +352,7 @@ theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a
 def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') : C a :=
   by
-  have h₂ := (Part.mem_assert_iff.1 h).snd; generalize_proofs h₁  at h₂ ; clear h
+  have h₂ := (Part.mem_assert_iff.1 h).snd; generalize_proofs h₁ at h₂ ; clear h
   induction' h₁ with a ha IH
   have h : b ∈ f.fix a := Part.mem_assert_iff.2 ⟨⟨a, ha⟩, h₂⟩
   exact H a h fun a' fa' => IH a' fa' (Part.mem_assert_iff.1 (fix_fwd h fa')).snd
@@ -405,7 +405,7 @@ def image (s : Set α) : Set β :=
 #align pfun.image PFun.image
 -/
 
-theorem image_def (s : Set α) : f.image s = { y | ∃ x ∈ s, y ∈ f x } :=
+theorem image_def (s : Set α) : f.image s = {y | ∃ x ∈ s, y ∈ f x} :=
   rfl
 #align pfun.image_def PFun.image_def
 
@@ -432,7 +432,7 @@ def preimage (s : Set β) : Set α :=
 #align pfun.preimage PFun.preimage
 -/
 
-theorem Preimage_def (s : Set β) : f.Preimage s = { x | ∃ y ∈ s, y ∈ f x } :=
+theorem Preimage_def (s : Set β) : f.Preimage s = {x | ∃ y ∈ s, y ∈ f x} :=
   rfl
 #align pfun.preimage_def PFun.Preimage_def
 
@@ -478,7 +478,7 @@ def core (s : Set β) : Set α :=
 -/
 
 #print PFun.core_def /-
-theorem core_def (s : Set β) : f.core s = { x | ∀ y, y ∈ f x → y ∈ s } :=
+theorem core_def (s : Set β) : f.core s = {x | ∀ y, y ∈ f x → y ∈ s} :=
   rfl
 #align pfun.core_def PFun.core_def
 -/
@@ -562,7 +562,7 @@ def toSubtype (p : β → Prop) (f : α → β) : α →. Subtype p := fun a =>
 -/
 
 @[simp]
-theorem dom_toSubtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = { a | p (f a) } :=
+theorem dom_toSubtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = {a | p (f a)} :=
   rfl
 #align pfun.dom_to_subtype PFun.dom_toSubtype
 
@@ -678,8 +678,7 @@ def prodLift (f : α →. β) (g : α →. γ) : α →. β × γ := fun x =>
 -/
 
 @[simp]
-theorem dom_prodLift (f : α →. β) (g : α →. γ) :
-    (f.prodLift g).Dom = { x | (f x).Dom ∧ (g x).Dom } :=
+theorem dom_prodLift (f : α →. β) (g : α →. γ) : (f.prodLift g).Dom = {x | (f x).Dom ∧ (g x).Dom} :=
   rfl
 #align pfun.dom_prod_lift PFun.dom_prodLift
 
@@ -711,7 +710,7 @@ def prodMap (f : α →. γ) (g : β →. δ) : α × β →. γ × δ := fun x
 
 @[simp]
 theorem dom_prodMap (f : α →. γ) (g : β →. δ) :
-    (f.Prod_map g).Dom = { x | (f x.1).Dom ∧ (g x.2).Dom } :=
+    (f.Prod_map g).Dom = {x | (f x.1).Dom ∧ (g x.2).Dom} :=
   rfl
 #align pfun.dom_prod_map PFun.dom_prodMap
 
Diff
@@ -137,7 +137,7 @@ def asSubtype (f : α →. β) (s : f.Dom) : β :=
 #print PFun.equivSubtype /-
 /-- The type of partial functions `α →. β` is equivalent to
 the type of pairs `(p : α → Prop, f : subtype p → β)`. -/
-def equivSubtype : (α →. β) ≃ Σp : α → Prop, Subtype p → β :=
+def equivSubtype : (α →. β) ≃ Σ p : α → Prop, Subtype p → β :=
   ⟨fun f => ⟨fun a => (f a).Dom, asSubtype f⟩, fun f x => ⟨f.1 x, fun h => f.2 ⟨x, h⟩⟩, fun f =>
     funext fun a => Part.eta _, fun ⟨p, f⟩ => by dsimp <;> congr <;> funext a <;> cases a <;> rfl⟩
 #align pfun.equiv_subtype PFun.equivSubtype
@@ -294,7 +294,7 @@ def fix (f : α →. Sum β α) : α →. β := fun a =>
     @WellFounded.fixF _ (fun x y => Sum.inr x ∈ f y) _
       (fun a IH =>
         Part.assert (f a).Dom fun hf => by
-          cases' e : (f a).get hf with b a' <;> [exact Part.some b;exact IH _ ⟨hf, e⟩])
+          cases' e : (f a).get hf with b a' <;> [exact Part.some b; exact IH _ ⟨hf, e⟩])
       a h
 #align pfun.fix PFun.fix
 -/
@@ -302,17 +302,17 @@ def fix (f : α →. Sum β α) : α →. β := fun a =>
 theorem dom_of_mem_fix {f : α →. Sum β α} {a : α} {b : β} (h : b ∈ f.fix a) : (f a).Dom :=
   by
   let ⟨h₁, h₂⟩ := Part.mem_assert_iff.1 h
-  rw [WellFounded.fixF_eq] at h₂ <;> exact h₂.fst.fst
+  rw [WellFounded.fixF_eq] at h₂  <;> exact h₂.fst.fst
 #align pfun.dom_of_mem_fix PFun.dom_of_mem_fix
 
 theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     b ∈ f.fix a ↔ Sum.inl b ∈ f a ∨ ∃ a', Sum.inr a' ∈ f a ∧ b ∈ f.fix a' :=
   ⟨fun h => by
     let ⟨h₁, h₂⟩ := Part.mem_assert_iff.1 h
-    rw [WellFounded.fixF_eq] at h₂
-    simp at h₂
+    rw [WellFounded.fixF_eq] at h₂ 
+    simp at h₂ 
     cases' h₂ with h₂ h₃
-    cases' e : (f a).get h₂ with b' a' <;> simp [e] at h₃
+    cases' e : (f a).get h₂ with b' a' <;> simp [e] at h₃ 
     · subst b'; refine' Or.inl ⟨h₂, e⟩
     · exact Or.inr ⟨a', ⟨_, e⟩, Part.mem_assert _ h₃⟩, fun h =>
     by
@@ -321,7 +321,7 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     · refine' ⟨⟨_, fun y h' => _⟩, _⟩
       · injection Part.mem_unique ⟨h₁, h₂⟩ h'
       · rw [WellFounded.fixF_eq]; simp [h₁, h₂]
-    · simp [fix] at h₃; cases' h₃ with h₃ h₄
+    · simp [fix] at h₃ ; cases' h₃ with h₃ h₄
       refine' ⟨⟨_, fun y h' => _⟩, _⟩
       · injection Part.mem_unique h h' with e
         exact e ▸ h₃
@@ -352,7 +352,7 @@ theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a
 def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') : C a :=
   by
-  have h₂ := (Part.mem_assert_iff.1 h).snd; generalize_proofs h₁  at h₂; clear h
+  have h₂ := (Part.mem_assert_iff.1 h).snd; generalize_proofs h₁  at h₂ ; clear h
   induction' h₁ with a ha IH
   have h : b ∈ f.fix a := Part.mem_assert_iff.2 ⟨⟨a, ha⟩, h₂⟩
   exact H a h fun a' fa' => IH a' fa' (Part.mem_assert_iff.1 (fix_fwd h fa')).snd
Diff
@@ -510,7 +510,7 @@ theorem mem_core_res (f : α → β) (s : Set α) (t : Set β) (x : α) :
 
 section
 
-open Classical
+open scoped Classical
 
 theorem core_res (f : α → β) (s : Set α) (t : Set β) : (res f s).core t = sᶜ ∪ f ⁻¹' t := by ext;
   rw [mem_core_res]; by_cases h : x ∈ s <;> simp [h]
Diff
@@ -85,33 +85,15 @@ def Dom (f : α →. β) : Set α :=
 #align pfun.dom PFun.Dom
 -/
 
-/- warning: pfun.mem_dom -> PFun.mem_dom is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (x : α), Iff (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (PFun.Dom.{u1, u2} α β f)) (Exists.{succ u2} β (fun (y : β) => Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) y (f x)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (x : α), Iff (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.Dom.{u2, u1} α β f)) (Exists.{succ u1} β (fun (y : β) => Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) y (f x)))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_dom PFun.mem_domₓ'. -/
 @[simp]
 theorem mem_dom (f : α →. β) (x : α) : x ∈ Dom f ↔ ∃ y, y ∈ f x := by simp [dom, Part.dom_iff_mem]
 #align pfun.mem_dom PFun.mem_dom
 
-/- warning: pfun.dom_mk -> PFun.dom_mk is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (p : α -> Prop) (f : forall (a : α), (p a) -> β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u2} α β (fun (x : α) => Part.mk.{u2} β (p x) (f x))) (setOf.{u1} α (fun (x : α) => p x))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (p : α -> Prop) (f : forall (a : α), (p a) -> β), Eq.{succ u2} (Set.{u2} α) (PFun.Dom.{u2, u1} α β (fun (x : α) => Part.mk.{u1} β (p x) (f x))) (setOf.{u2} α (fun (x : α) => p x))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_mk PFun.dom_mkₓ'. -/
 @[simp]
 theorem dom_mk (p : α → Prop) (f : ∀ a, p a → β) : (PFun.Dom fun x => ⟨p x, f x⟩) = { x | p x } :=
   rfl
 #align pfun.dom_mk PFun.dom_mk
 
-/- warning: pfun.dom_eq -> PFun.dom_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u2} α β f) (setOf.{u1} α (fun (x : α) => Exists.{succ u2} β (fun (y : β) => Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) y (f x))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β), Eq.{succ u2} (Set.{u2} α) (PFun.Dom.{u2, u1} α β f) (setOf.{u2} α (fun (x : α) => Exists.{succ u1} β (fun (y : β) => Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) y (f x))))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_eq PFun.dom_eqₓ'. -/
 theorem dom_eq (f : α →. β) : Dom f = { x | ∃ y, y ∈ f x } :=
   Set.ext (mem_dom f)
 #align pfun.dom_eq PFun.dom_eq
@@ -123,12 +105,6 @@ def fn (f : α →. β) (a : α) : Dom f a → β :=
 #align pfun.fn PFun.fn
 -/
 
-/- warning: pfun.fn_apply -> PFun.fn_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (a : α), Eq.{succ u2} ((PFun.Dom.{u1, u2} α β f a) -> β) (PFun.fn.{u1, u2} α β f a) (Part.get.{u2} β (f a))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (a : α), Eq.{succ u1} ((PFun.Dom.{u2, u1} α β f a) -> β) (PFun.fn.{u2, u1} α β f a) (Part.get.{u1} β (f a))
-Case conversion may be inaccurate. Consider using '#align pfun.fn_apply PFun.fn_applyₓ'. -/
 @[simp]
 theorem fn_apply (f : α →. β) (a : α) : f.fn a = (f a).get :=
   rfl
@@ -141,24 +117,12 @@ def evalOpt (f : α →. β) [D : DecidablePred (· ∈ Dom f)] (x : α) : Optio
 #align pfun.eval_opt PFun.evalOpt
 -/
 
-/- warning: pfun.ext' -> PFun.ext' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, u2} α β} {g : PFun.{u1, u2} α β}, (forall (a : α), Iff (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a (PFun.Dom.{u1, u2} α β f)) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a (PFun.Dom.{u1, u2} α β g))) -> (forall (a : α) (p : PFun.Dom.{u1, u2} α β f a) (q : PFun.Dom.{u1, u2} α β g a), Eq.{succ u2} β (PFun.fn.{u1, u2} α β f a p) (PFun.fn.{u1, u2} α β g a q)) -> (Eq.{max (succ u1) (succ u2)} (PFun.{u1, u2} α β) f g)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, u1} α β} {g : PFun.{u2, u1} α β}, (forall (a : α), Iff (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a (PFun.Dom.{u2, u1} α β f)) (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a (PFun.Dom.{u2, u1} α β g))) -> (forall (a : α) (p : PFun.Dom.{u2, u1} α β f a) (q : PFun.Dom.{u2, u1} α β g a), Eq.{succ u1} β (PFun.fn.{u2, u1} α β f a p) (PFun.fn.{u2, u1} α β g a q)) -> (Eq.{max (succ u2) (succ u1)} (PFun.{u2, u1} α β) f g)
-Case conversion may be inaccurate. Consider using '#align pfun.ext' PFun.ext'ₓ'. -/
 /-- Partial function extensionality -/
 theorem ext' {f g : α →. β} (H1 : ∀ a, a ∈ Dom f ↔ a ∈ Dom g) (H2 : ∀ a p q, f.fn a p = g.fn a q) :
     f = g :=
   funext fun a => Part.ext' (H1 a) (H2 a)
 #align pfun.ext' PFun.ext'
 
-/- warning: pfun.ext -> PFun.ext is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, u2} α β} {g : PFun.{u1, u2} α β}, (forall (a : α) (b : β), Iff (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (f a)) (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (g a))) -> (Eq.{max (succ u1) (succ u2)} (PFun.{u1, u2} α β) f g)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, u1} α β} {g : PFun.{u2, u1} α β}, (forall (a : α) (b : β), Iff (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (f a)) (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (g a))) -> (Eq.{max (succ u2) (succ u1)} (PFun.{u2, u1} α β) f g)
-Case conversion may be inaccurate. Consider using '#align pfun.ext PFun.extₓ'. -/
 theorem ext {f g : α →. β} (H : ∀ a b, b ∈ f a ↔ b ∈ g a) : f = g :=
   funext fun a => Part.ext (H a)
 #align pfun.ext PFun.ext
@@ -179,12 +143,6 @@ def equivSubtype : (α →. β) ≃ Σp : α → Prop, Subtype p → β :=
 #align pfun.equiv_subtype PFun.equivSubtype
 -/
 
-/- warning: pfun.as_subtype_eq_of_mem -> PFun.asSubtype_eq_of_mem is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, u2} α β} {x : α} {y : β}, (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) y (f x)) -> (forall (domx : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (PFun.Dom.{u1, u2} α β f)), Eq.{succ u2} β (PFun.asSubtype.{u1, u2} α β f (Subtype.mk.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (PFun.Dom.{u1, u2} α β f)) x domx)) y)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, u1} α β} {x : α} {y : β}, (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) y (f x)) -> (forall (domx : Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.Dom.{u2, u1} α β f)), Eq.{succ u1} β (PFun.asSubtype.{u2, u1} α β f (Subtype.mk.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.Dom.{u2, u1} α β f)) x domx)) y)
-Case conversion may be inaccurate. Consider using '#align pfun.as_subtype_eq_of_mem PFun.asSubtype_eq_of_memₓ'. -/
 theorem asSubtype_eq_of_mem {f : α →. β} {x : α} {y : β} (fxy : y ∈ f x) (domx : x ∈ f.Dom) :
     f.asSubtype ⟨x, domx⟩ = y :=
   Part.mem_unique (Part.get_mem _) fxy
@@ -211,23 +169,11 @@ theorem coe_val (f : α → β) (a : α) : (f : α →. β) a = Part.some (f a)
 #align pfun.coe_val PFun.coe_val
 -/
 
-/- warning: pfun.dom_coe -> PFun.dom_coe is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u2} α β ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.coe.{u1, u2} α β)))) f)) (Set.univ.{u1} α)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β), Eq.{succ u2} (Set.{u2} α) (PFun.Dom.{u2, u1} α β (PFun.lift.{u2, u1} α β f)) (Set.univ.{u2} α)
-Case conversion may be inaccurate. Consider using '#align pfun.dom_coe PFun.dom_coeₓ'. -/
 @[simp]
 theorem dom_coe (f : α → β) : (f : α →. β).Dom = Set.univ :=
   rfl
 #align pfun.dom_coe PFun.dom_coe
 
-/- warning: pfun.coe_injective -> PFun.lift_injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Function.Injective.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.coe.{u1, u2} α β)))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Function.Injective.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (α -> β) (PFun.{u2, u1} α β) (PFun.lift.{u2, u1} α β)
-Case conversion may be inaccurate. Consider using '#align pfun.coe_injective PFun.lift_injectiveₓ'. -/
 theorem lift_injective : Injective (coe : (α → β) → α →. β) := fun f g h =>
   funext fun a => Part.some_injective <| congr_fun h a
 #align pfun.coe_injective PFun.lift_injective
@@ -262,12 +208,6 @@ def restrict (f : α →. β) {p : Set α} (H : p ⊆ f.Dom) : α →. β := fun
 #align pfun.restrict PFun.restrict
 -/
 
-/- warning: pfun.mem_restrict -> PFun.mem_restrict is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, u2} α β} {s : Set.{u1} α} (h : HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s (PFun.Dom.{u1, u2} α β f)) (a : α) (b : β), Iff (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.restrict.{u1, u2} α β f s h a)) (And (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (f a)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, u1} α β} {s : Set.{u2} α} (h : HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s (PFun.Dom.{u2, u1} α β f)) (a : α) (b : β), Iff (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.restrict.{u2, u1} α β f s h a)) (And (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a s) (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (f a)))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_restrict PFun.mem_restrictₓ'. -/
 @[simp]
 theorem mem_restrict {f : α →. β} {s : Set α} (h : s ⊆ f.Dom) (a : α) (b : β) :
     b ∈ f.restrict h a ↔ a ∈ s ∧ b ∈ f a := by simp [restrict]
@@ -280,32 +220,14 @@ def res (f : α → β) (s : Set α) : α →. β :=
 #align pfun.res PFun.res
 -/
 
-/- warning: pfun.mem_res -> PFun.mem_res is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (a : α) (b : β), Iff (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.res.{u1, u2} α β f s a)) (And (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) (Eq.{succ u2} β (f a) b))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (a : α) (b : β), Iff (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.res.{u2, u1} α β f s a)) (And (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) a s) (Eq.{succ u1} β (f a) b))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_res PFun.mem_resₓ'. -/
 theorem mem_res (f : α → β) (s : Set α) (a : α) (b : β) : b ∈ res f s a ↔ a ∈ s ∧ f a = b := by
   simp [res, @eq_comm _ b]
 #align pfun.mem_res PFun.mem_res
 
-/- warning: pfun.res_univ -> PFun.res_univ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Eq.{max (succ u1) (succ u2)} (PFun.{u1, u2} α β) (PFun.res.{u1, u2} α β f (Set.univ.{u1} α)) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.coe.{u1, u2} α β)))) f)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β), Eq.{max (succ u2) (succ u1)} (PFun.{u2, u1} α β) (PFun.res.{u2, u1} α β f (Set.univ.{u2} α)) (PFun.lift.{u2, u1} α β f)
-Case conversion may be inaccurate. Consider using '#align pfun.res_univ PFun.res_univₓ'. -/
 theorem res_univ (f : α → β) : PFun.res f Set.univ = f :=
   rfl
 #align pfun.res_univ PFun.res_univ
 
-/- warning: pfun.dom_iff_graph -> PFun.dom_iff_graph is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (x : α), Iff (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (PFun.Dom.{u1, u2} α β f)) (Exists.{succ u2} β (fun (y : β) => Membership.Mem.{max u1 u2, max u1 u2} (Prod.{u1, u2} α β) (Set.{max u1 u2} (Prod.{u1, u2} α β)) (Set.hasMem.{max u1 u2} (Prod.{u1, u2} α β)) (Prod.mk.{u1, u2} α β x y) (PFun.graph.{u1, u2} α β f)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (x : α), Iff (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.Dom.{u2, u1} α β f)) (Exists.{succ u1} β (fun (y : β) => Membership.mem.{max u1 u2, max u2 u1} (Prod.{u2, u1} α β) (Set.{max u1 u2} (Prod.{u2, u1} α β)) (Set.instMembershipSet.{max u2 u1} (Prod.{u2, u1} α β)) (Prod.mk.{u2, u1} α β x y) (PFun.graph.{u2, u1} α β f)))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_iff_graph PFun.dom_iff_graphₓ'. -/
 theorem dom_iff_graph (f : α →. β) (x : α) : x ∈ f.Dom ↔ ∃ y, (x, y) ∈ f.graph :=
   Part.dom_iff_mem
 #align pfun.dom_iff_graph PFun.dom_iff_graph
@@ -328,12 +250,6 @@ def bind (f : α →. β) (g : β → α →. γ) : α →. γ := fun a => (f a)
 #align pfun.bind PFun.bind
 -/
 
-/- warning: pfun.bind_apply -> PFun.bind_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : PFun.{u1, u2} α β) (g : β -> (PFun.{u1, u3} α γ)) (a : α), Eq.{succ u3} (Part.{u3} γ) (PFun.bind.{u1, u2, u3} α β γ f g a) (Part.bind.{u2, u3} β γ (f a) (fun (b : β) => g b a))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : PFun.{u3, u2} α β) (g : β -> (PFun.{u3, u1} α γ)) (a : α), Eq.{succ u1} (Part.{u1} γ) (PFun.bind.{u3, u2, u1} α β γ f g a) (Part.bind.{u2, u1} β γ (f a) (fun (b : β) => g b a))
-Case conversion may be inaccurate. Consider using '#align pfun.bind_apply PFun.bind_applyₓ'. -/
 @[simp]
 theorem bind_apply (f : α →. β) (g : β → α →. γ) (a : α) : f.bind g a = (f a).bind fun b => g b a :=
   rfl
@@ -357,22 +273,10 @@ instance : LawfulMonad (PFun α)
   pure_bind β γ x f := funext fun a => Part.bind_some.{u_1, u_2} _ (f x)
   bind_assoc β γ δ f g k := funext fun a => (f a).bind_assoc (fun b => g b a) fun b => k b a
 
-/- warning: pfun.pure_defined -> PFun.pure_defined is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (p : Set.{u1} α) (x : β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) p (PFun.Dom.{u1, u2} α β (PFun.pure.{u1, u2} α β x))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (p : Set.{u2} α) (x : β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α β (PFun.pure.{u2, u1} α β x))
-Case conversion may be inaccurate. Consider using '#align pfun.pure_defined PFun.pure_definedₓ'. -/
 theorem pure_defined (p : Set α) (x : β) : p ⊆ (@PFun.pure α _ x).Dom :=
   p.subset_univ
 #align pfun.pure_defined PFun.pure_defined
 
-/- warning: pfun.bind_defined -> PFun.bind_defined is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u2}} (p : Set.{u1} α) {f : PFun.{u1, u2} α β} {g : β -> (PFun.{u1, u2} α γ)}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) p (PFun.Dom.{u1, u2} α β f)) -> (forall (x : β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) p (PFun.Dom.{u1, u2} α γ (g x))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) p (PFun.Dom.{u1, u2} α γ (Bind.bind.{u2, max u1 u2} (PFun.{u1, u2} α) (Monad.toHasBind.{u2, max u1 u2} (PFun.{u1, u2} α) (PFun.monad.{u1, u2} α)) β γ f g)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u1}} (p : Set.{u2} α) {f : PFun.{u2, u1} α β} {g : β -> (PFun.{u2, u1} α γ)}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α β f)) -> (forall (x : β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α γ (g x))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α γ (Bind.bind.{u1, max u2 u1} (PFun.{u2, u1} α) (Monad.toBind.{u1, max u2 u1} (PFun.{u2, u1} α) (PFun.monad.{u2, u1} α)) β γ f g)))
-Case conversion may be inaccurate. Consider using '#align pfun.bind_defined PFun.bind_definedₓ'. -/
 theorem bind_defined {α β γ} (p : Set α) {f : α →. β} {g : β → α →. γ} (H1 : p ⊆ f.Dom)
     (H2 : ∀ x, p ⊆ (g x).Dom) : p ⊆ (f >>= g).Dom := fun a ha =>
   (⟨H1 ha, H2 _ ha⟩ : (f >>= g).Dom a)
@@ -395,24 +299,12 @@ def fix (f : α →. Sum β α) : α →. β := fun a =>
 #align pfun.fix PFun.fix
 -/
 
-/- warning: pfun.dom_of_mem_fix -> PFun.dom_of_mem_fix is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, max u2 u1} α (Sum.{u2, u1} β α)} {a : α} {b : β}, (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a)) -> (Part.Dom.{max u2 u1} (Sum.{u2, u1} β α) (f a))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {a : α} {b : β}, (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a)) -> (Part.Dom.{max u2 u1} (Sum.{u1, u2} β α) (f a))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_of_mem_fix PFun.dom_of_mem_fixₓ'. -/
 theorem dom_of_mem_fix {f : α →. Sum β α} {a : α} {b : β} (h : b ∈ f.fix a) : (f a).Dom :=
   by
   let ⟨h₁, h₂⟩ := Part.mem_assert_iff.1 h
   rw [WellFounded.fixF_eq] at h₂ <;> exact h₂.fst.fst
 #align pfun.dom_of_mem_fix PFun.dom_of_mem_fix
 
-/- warning: pfun.mem_fix_iff -> PFun.mem_fix_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, max u2 u1} α (Sum.{u2, u1} β α)} {a : α} {b : β}, Iff (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a)) (Or (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inl.{u2, u1} β α b) (f a)) (Exists.{succ u1} α (fun (a' : α) => And (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inr.{u2, u1} β α a') (f a)) (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a')))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {a : α} {b : β}, Iff (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a)) (Or (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u1 u2} (Sum.{u1, u2} β α)) (Sum.inl.{u1, u2} β α b) (f a)) (Exists.{succ u2} α (fun (a' : α) => And (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u2 u1} (Sum.{u1, u2} β α)) (Sum.inr.{u1, u2} β α a') (f a)) (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a')))))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_fix_iff PFun.mem_fix_iffₓ'. -/
 theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     b ∈ f.fix a ↔ Sum.inl b ∈ f a ∨ ∃ a', Sum.inr a' ∈ f a ∧ b ∈ f.fix a' :=
   ⟨fun h => by
@@ -437,23 +329,11 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
         rw [WellFounded.fixF_eq]; simp [h₁, h₂, h₄]⟩
 #align pfun.mem_fix_iff PFun.mem_fix_iff
 
-/- warning: pfun.fix_stop -> PFun.fix_stop is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, max u2 u1} α (Sum.{u2, u1} β α)} {b : β} {a : α}, (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inl.{u2, u1} β α b) (f a)) -> (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {b : β} {a : α}, (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u1 u2} (Sum.{u1, u2} β α)) (Sum.inl.{u1, u2} β α b) (f a)) -> (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a))
-Case conversion may be inaccurate. Consider using '#align pfun.fix_stop PFun.fix_stopₓ'. -/
 /-- If advancing one step from `a` leads to `b : β`, then `f.fix a = b` -/
 theorem fix_stop {f : α →. Sum β α} {b : β} {a : α} (hb : Sum.inl b ∈ f a) : b ∈ f.fix a := by
   rw [PFun.mem_fix_iff]; exact Or.inl hb
 #align pfun.fix_stop PFun.fix_stop
 
-/- warning: pfun.fix_fwd_eq -> PFun.fix_fwd_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, max u2 u1} α (Sum.{u2, u1} β α)} {a : α} {a' : α}, (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inr.{u2, u1} β α a') (f a)) -> (Eq.{succ u2} (Part.{u2} β) (PFun.fix.{u1, u2} α β f a) (PFun.fix.{u1, u2} α β f a'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {a : α} {a' : α}, (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u2 u1} (Sum.{u1, u2} β α)) (Sum.inr.{u1, u2} β α a') (f a)) -> (Eq.{succ u1} (Part.{u1} β) (PFun.fix.{u2, u1} α β f a) (PFun.fix.{u2, u1} α β f a'))
-Case conversion may be inaccurate. Consider using '#align pfun.fix_fwd_eq PFun.fix_fwd_eqₓ'. -/
 /-- If advancing one step from `a` on `f` leads to `a' : α`, then `f.fix a = f.fix a'` -/
 theorem fix_fwd_eq {f : α →. Sum β α} {a a' : α} (ha' : Sum.inr a' ∈ f a) : f.fix a = f.fix a' :=
   by
@@ -462,12 +342,6 @@ theorem fix_fwd_eq {f : α →. Sum β α} {a a' : α} (ha' : Sum.inr a' ∈ f a
   · intro h; rw [PFun.mem_fix_iff]; right; use a'; exact ⟨ha', h⟩
 #align pfun.fix_fwd_eq PFun.fix_fwd_eq
 
-/- warning: pfun.fix_fwd -> PFun.fix_fwd is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {f : PFun.{u1, max u2 u1} α (Sum.{u2, u1} β α)} {b : β} {a : α} {a' : α}, (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a)) -> (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inr.{u2, u1} β α a') (f a)) -> (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a'))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {b : β} {a : α} {a' : α}, (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a)) -> (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u2 u1} (Sum.{u1, u2} β α)) (Sum.inr.{u1, u2} β α a') (f a)) -> (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a'))
-Case conversion may be inaccurate. Consider using '#align pfun.fix_fwd PFun.fix_fwdₓ'. -/
 theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a) (ha' : Sum.inr a' ∈ f a) :
     b ∈ f.fix a' := by rwa [← fix_fwd_eq ha']
 #align pfun.fix_fwd PFun.fix_fwd
@@ -485,12 +359,6 @@ def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (
 #align pfun.fix_induction PFun.fixInduction
 -/
 
-/- warning: pfun.fix_induction_spec -> PFun.fixInduction_spec is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {C : α -> Sort.{u3}} {f : PFun.{u1, max u2 u1} α (Sum.{u2, u1} β α)} {b : β} {a : α} (h : Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a)) (H : forall (a' : α), (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a')) -> (forall (a'' : α), (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inr.{u2, u1} β α a'') (f a')) -> (C a'')) -> (C a')), Eq.{u3} (C a) (PFun.fixInduction.{u1, u2, u3} α β C f b a h H) (H a h (fun (a' : α) (h' : Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inr.{u2, u1} β α a') (f a)) => PFun.fixInduction.{u1, u2, u3} α β (fun (_x : α) => C _x) f b a' (PFun.fix_fwd.{u1, u2} α β f b a a' h h') H))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {C : α -> Sort.{u3}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {b : β} {a : α} (h : Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a)) (H : forall (a' : α), (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a')) -> (forall (a'' : α), (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u2 u1} (Sum.{u1, u2} β α)) (Sum.inr.{u1, u2} β α a'') (f a')) -> (C a'')) -> (C a')), Eq.{u3} (C a) (PFun.fixInduction.{u2, u1, u3} α β C f b a h H) (H a h (fun (a' : α) (h' : Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u2 u1} (Sum.{u1, u2} β α)) (Sum.inr.{u1, u2} β α a') (f a)) => PFun.fixInduction.{u2, u1, u3} α β (fun (_x : α) => C _x) f b a' (PFun.fix_fwd.{u1, u2} α β f b a a' h h') H))
-Case conversion may be inaccurate. Consider using '#align pfun.fix_induction_spec PFun.fixInduction_specₓ'. -/
 theorem fixInduction_spec {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') :
     @fixInduction _ _ C _ _ _ h H = H a h fun a' h' => fixInduction (fix_fwd h h') H := by
@@ -513,12 +381,6 @@ def fixInduction' {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α}
 #align pfun.fix_induction' PFun.fixInduction'
 -/
 
-/- warning: pfun.fix_induction'_stop -> PFun.fixInduction'_stop is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {C : α -> Sort.{u3}} {f : PFun.{u1, max u2 u1} α (Sum.{u2, u1} β α)} {b : β} {a : α} (h : Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a)) (fa : Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inl.{u2, u1} β α b) (f a)) (hbase : forall (a_final : α), (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inl.{u2, u1} β α b) (f a_final)) -> (C a_final)) (hind : forall (a₀ : α) (a₁ : α), (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a₁)) -> (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inr.{u2, u1} β α a₁) (f a₀)) -> (C a₁) -> (C a₀)), Eq.{u3} (C a) (PFun.fixInduction'.{u1, u2, u3} α β C f b a h hbase hind) (hbase a fa)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {C : α -> Sort.{u3}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {b : β} {a : α} (h : Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a)) (fa : Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u1 u2} (Sum.{u1, u2} β α)) (Sum.inl.{u1, u2} β α b) (f a)) (hbase : forall (a_final : α), (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u1 u2} (Sum.{u1, u2} β α)) (Sum.inl.{u1, u2} β α b) (f a_final)) -> (C a_final)) (hind : forall (a₀ : α) (a₁ : α), (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a₁)) -> (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u2 u1} (Sum.{u1, u2} β α)) (Sum.inr.{u1, u2} β α a₁) (f a₀)) -> (C a₁) -> (C a₀)), Eq.{u3} (C a) (PFun.fixInduction'.{u2, u1, u3} α β C f b a h hbase hind) (hbase a fa)
-Case conversion may be inaccurate. Consider using '#align pfun.fix_induction'_stop PFun.fixInduction'_stopₓ'. -/
 theorem fixInduction'_stop {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (fa : Sum.inl b ∈ f a) (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
     (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) :
@@ -526,12 +388,6 @@ theorem fixInduction'_stop {C : α → Sort _} {f : α →. Sum β α} {b : β}
   rw [fix_induction_spec]; simp [Part.get_eq_of_mem fa]
 #align pfun.fix_induction'_stop PFun.fixInduction'_stop
 
-/- warning: pfun.fix_induction'_fwd -> PFun.fixInduction'_fwd is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {C : α -> Sort.{u3}} {f : PFun.{u1, max u2 u1} α (Sum.{u2, u1} β α)} {b : β} {a : α} {a' : α} (h : Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a)) (h' : Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a')) (fa : Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inr.{u2, u1} β α a') (f a)) (hbase : forall (a_final : α), (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inl.{u2, u1} β α b) (f a_final)) -> (C a_final)) (hind : forall (a₀ : α) (a₁ : α), (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) b (PFun.fix.{u1, u2} α β f a₁)) -> (Membership.Mem.{max u2 u1, max u2 u1} (Sum.{u2, u1} β α) (Part.{max u2 u1} (Sum.{u2, u1} β α)) (Part.hasMem.{max u2 u1} (Sum.{u2, u1} β α)) (Sum.inr.{u2, u1} β α a₁) (f a₀)) -> (C a₁) -> (C a₀)), Eq.{u3} (C a) (PFun.fixInduction'.{u1, u2, u3} α β C f b a h hbase hind) (hind a a' h' fa (PFun.fixInduction'.{u1, u2, u3} α β (fun (_x : α) => C _x) f b a' h' hbase hind))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {C : α -> Sort.{u3}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {b : β} {a : α} {a' : α} (h : Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a)) (h' : Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a')) (fa : Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u2 u1} (Sum.{u1, u2} β α)) (Sum.inr.{u1, u2} β α a') (f a)) (hbase : forall (a_final : α), (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u1 u2} (Sum.{u1, u2} β α)) (Sum.inl.{u1, u2} β α b) (f a_final)) -> (C a_final)) (hind : forall (a₀ : α) (a₁ : α), (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a₁)) -> (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u2 u1} (Sum.{u1, u2} β α)) (Sum.inr.{u1, u2} β α a₁) (f a₀)) -> (C a₁) -> (C a₀)), Eq.{u3} (C a) (PFun.fixInduction'.{u2, u1, u3} α β C f b a h hbase hind) (hind a a' h' fa (PFun.fixInduction'.{u2, u1, u3} α β (fun (_x : α) => C _x) f b a' h' hbase hind))
-Case conversion may be inaccurate. Consider using '#align pfun.fix_induction'_fwd PFun.fixInduction'_fwdₓ'. -/
 theorem fixInduction'_fwd {C : α → Sort _} {f : α →. Sum β α} {b : β} {a a' : α} (h : b ∈ f.fix a)
     (h' : b ∈ f.fix a') (fa : Sum.inr a' ∈ f a)
     (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
@@ -549,52 +405,22 @@ def image (s : Set α) : Set β :=
 #align pfun.image PFun.image
 -/
 
-/- warning: pfun.image_def -> PFun.image_def is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (PFun.image.{u1, u2} α β f s) (setOf.{u2} β (fun (y : β) => Exists.{succ u1} α (fun (x : α) => Exists.{0} (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) => Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) y (f x)))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (s : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (PFun.image.{u2, u1} α β f s) (setOf.{u1} β (fun (y : β) => Exists.{succ u2} α (fun (x : α) => And (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) y (f x)))))
-Case conversion may be inaccurate. Consider using '#align pfun.image_def PFun.image_defₓ'. -/
 theorem image_def (s : Set α) : f.image s = { y | ∃ x ∈ s, y ∈ f x } :=
   rfl
 #align pfun.image_def PFun.image_def
 
-/- warning: pfun.mem_image -> PFun.mem_image is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (y : β) (s : Set.{u1} α), Iff (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y (PFun.image.{u1, u2} α β f s)) (Exists.{succ u1} α (fun (x : α) => Exists.{0} (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) (fun (H : Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) => Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) y (f x))))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (y : β) (s : Set.{u2} α), Iff (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) y (PFun.image.{u2, u1} α β f s)) (Exists.{succ u2} α (fun (x : α) => And (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) y (f x))))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_image PFun.mem_imageₓ'. -/
 theorem mem_image (y : β) (s : Set α) : y ∈ f.image s ↔ ∃ x ∈ s, y ∈ f x :=
   Iff.rfl
 #align pfun.mem_image PFun.mem_image
 
-/- warning: pfun.image_mono -> PFun.image_mono is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) {s : Set.{u1} α} {t : Set.{u1} α}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) s t) -> (HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (PFun.image.{u1, u2} α β f s) (PFun.image.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) {s : Set.{u2} α} {t : Set.{u2} α}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) s t) -> (HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (PFun.image.{u2, u1} α β f s) (PFun.image.{u2, u1} α β f t))
-Case conversion may be inaccurate. Consider using '#align pfun.image_mono PFun.image_monoₓ'. -/
 theorem image_mono {s t : Set α} (h : s ⊆ t) : f.image s ⊆ f.image t :=
   Rel.image_mono _ h
 #align pfun.image_mono PFun.image_mono
 
-/- warning: pfun.image_inter -> PFun.image_inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u1} α) (t : Set.{u1} α), HasSubset.Subset.{u2} (Set.{u2} β) (Set.hasSubset.{u2} β) (PFun.image.{u1, u2} α β f (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) s t)) (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) (PFun.image.{u1, u2} α β f s) (PFun.image.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (s : Set.{u2} α) (t : Set.{u2} α), HasSubset.Subset.{u1} (Set.{u1} β) (Set.instHasSubsetSet.{u1} β) (PFun.image.{u2, u1} α β f (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) s t)) (Inter.inter.{u1} (Set.{u1} β) (Set.instInterSet.{u1} β) (PFun.image.{u2, u1} α β f s) (PFun.image.{u2, u1} α β f t))
-Case conversion may be inaccurate. Consider using '#align pfun.image_inter PFun.image_interₓ'. -/
 theorem image_inter (s t : Set α) : f.image (s ∩ t) ⊆ f.image s ∩ f.image t :=
   Rel.image_inter _ s t
 #align pfun.image_inter PFun.image_inter
 
-/- warning: pfun.image_union -> PFun.image_union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u1} α) (t : Set.{u1} α), Eq.{succ u2} (Set.{u2} β) (PFun.image.{u1, u2} α β f (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) s t)) (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) (PFun.image.{u1, u2} α β f s) (PFun.image.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (s : Set.{u2} α) (t : Set.{u2} α), Eq.{succ u1} (Set.{u1} β) (PFun.image.{u2, u1} α β f (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) s t)) (Union.union.{u1} (Set.{u1} β) (Set.instUnionSet.{u1} β) (PFun.image.{u2, u1} α β f s) (PFun.image.{u2, u1} α β f t))
-Case conversion may be inaccurate. Consider using '#align pfun.image_union PFun.image_unionₓ'. -/
 theorem image_union (s t : Set α) : f.image (s ∪ t) = f.image s ∪ f.image t :=
   Rel.image_union _ s t
 #align pfun.image_union PFun.image_union
@@ -606,22 +432,10 @@ def preimage (s : Set β) : Set α :=
 #align pfun.preimage PFun.preimage
 -/
 
-/- warning: pfun.preimage_def -> PFun.Preimage_def is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.preimage.{u1, u2} α β f s) (setOf.{u1} α (fun (x : α) => Exists.{succ u2} β (fun (y : β) => Exists.{0} (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y s) (fun (H : Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y s) => Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) y (f x)))))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.preimage.{u1, u2} α β f s) (setOf.{u1} α (fun (x : α) => Exists.{succ u2} β (fun (y : β) => And (Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) y s) (Membership.mem.{u2, u2} β (Part.{u2} β) (Part.instMembershipPart.{u2} β) y (f x)))))
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_def PFun.Preimage_defₓ'. -/
 theorem Preimage_def (s : Set β) : f.Preimage s = { x | ∃ y ∈ s, y ∈ f x } :=
   rfl
 #align pfun.preimage_def PFun.Preimage_def
 
-/- warning: pfun.mem_preimage -> PFun.mem_preimage is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β) (x : α), Iff (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (PFun.preimage.{u1, u2} α β f s)) (Exists.{succ u2} β (fun (y : β) => Exists.{0} (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y s) (fun (H : Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) y s) => Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) y (f x))))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β) (x : α), Iff (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x (PFun.preimage.{u1, u2} α β f s)) (Exists.{succ u2} β (fun (y : β) => And (Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) y s) (Membership.mem.{u2, u2} β (Part.{u2} β) (Part.instMembershipPart.{u2} β) y (f x))))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_preimage PFun.mem_preimageₓ'. -/
 @[simp]
 theorem mem_preimage (s : Set β) (x : α) : x ∈ f.Preimage s ↔ ∃ y ∈ s, y ∈ f x :=
   Iff.rfl
@@ -639,32 +453,14 @@ theorem preimage_mono {s t : Set β} (h : s ⊆ t) : f.Preimage s ⊆ f.Preimage
 #align pfun.preimage_mono PFun.preimage_mono
 -/
 
-/- warning: pfun.preimage_inter -> PFun.preimage_inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β) (t : Set.{u2} β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (PFun.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) s t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (PFun.preimage.{u1, u2} α β f s) (PFun.preimage.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β) (t : Set.{u2} β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (PFun.preimage.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) s t)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (PFun.preimage.{u1, u2} α β f s) (PFun.preimage.{u1, u2} α β f t))
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_inter PFun.preimage_interₓ'. -/
 theorem preimage_inter (s t : Set β) : f.Preimage (s ∩ t) ⊆ f.Preimage s ∩ f.Preimage t :=
   Rel.preimage_inter _ s t
 #align pfun.preimage_inter PFun.preimage_inter
 
-/- warning: pfun.preimage_union -> PFun.preimage_union is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β) (t : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.preimage.{u1, u2} α β f (Union.union.{u2} (Set.{u2} β) (Set.hasUnion.{u2} β) s t)) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) (PFun.preimage.{u1, u2} α β f s) (PFun.preimage.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β) (t : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.preimage.{u1, u2} α β f (Union.union.{u2} (Set.{u2} β) (Set.instUnionSet.{u2} β) s t)) (Union.union.{u1} (Set.{u1} α) (Set.instUnionSet.{u1} α) (PFun.preimage.{u1, u2} α β f s) (PFun.preimage.{u1, u2} α β f t))
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_union PFun.preimage_unionₓ'. -/
 theorem preimage_union (s t : Set β) : f.Preimage (s ∪ t) = f.Preimage s ∪ f.Preimage t :=
   Rel.preimage_union _ s t
 #align pfun.preimage_union PFun.preimage_union
 
-/- warning: pfun.preimage_univ -> PFun.preimage_univ is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β), Eq.{succ u1} (Set.{u1} α) (PFun.preimage.{u1, u2} α β f (Set.univ.{u2} β)) (PFun.Dom.{u1, u2} α β f)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β), Eq.{succ u2} (Set.{u2} α) (PFun.preimage.{u2, u1} α β f (Set.univ.{u1} β)) (PFun.Dom.{u2, u1} α β f)
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_univ PFun.preimage_univₓ'. -/
 theorem preimage_univ : f.Preimage Set.univ = f.Dom := by ext <;> simp [mem_preimage, mem_dom]
 #align pfun.preimage_univ PFun.preimage_univ
 
@@ -694,12 +490,6 @@ theorem mem_core (x : α) (s : Set β) : x ∈ f.core s ↔ ∀ y, y ∈ f x →
 #align pfun.mem_core PFun.mem_core
 -/
 
-/- warning: pfun.compl_dom_subset_core -> PFun.compl_dom_subset_core is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) (PFun.Dom.{u1, u2} α β f)) (PFun.core.{u1, u2} α β f s)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.instHasSubsetSet.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) (PFun.Dom.{u1, u2} α β f)) (PFun.core.{u1, u2} α β f s)
-Case conversion may be inaccurate. Consider using '#align pfun.compl_dom_subset_core PFun.compl_dom_subset_coreₓ'. -/
 theorem compl_dom_subset_core (s : Set β) : f.Domᶜ ⊆ f.core s := fun x hx y fxy =>
   absurd ((mem_dom f x).mpr ⟨y, fxy⟩) hx
 #align pfun.compl_dom_subset_core PFun.compl_dom_subset_core
@@ -710,22 +500,10 @@ theorem core_mono {s t : Set β} (h : s ⊆ t) : f.core s ⊆ f.core t :=
 #align pfun.core_mono PFun.core_mono
 -/
 
-/- warning: pfun.core_inter -> PFun.core_inter is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β) (t : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.core.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.hasInter.{u2} β) s t)) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (PFun.core.{u1, u2} α β f s) (PFun.core.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β) (t : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.core.{u1, u2} α β f (Inter.inter.{u2} (Set.{u2} β) (Set.instInterSet.{u2} β) s t)) (Inter.inter.{u1} (Set.{u1} α) (Set.instInterSet.{u1} α) (PFun.core.{u1, u2} α β f s) (PFun.core.{u1, u2} α β f t))
-Case conversion may be inaccurate. Consider using '#align pfun.core_inter PFun.core_interₓ'. -/
 theorem core_inter (s t : Set β) : f.core (s ∩ t) = f.core s ∩ f.core t :=
   Rel.core_inter _ s t
 #align pfun.core_inter PFun.core_inter
 
-/- warning: pfun.mem_core_res -> PFun.mem_core_res is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (t : Set.{u2} β) (x : α), Iff (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (PFun.core.{u1, u2} α β (PFun.res.{u1, u2} α β f s) t)) ((Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) (f x) t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u1} β) (x : α), Iff (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.core.{u2, u1} α β (PFun.res.{u2, u1} α β f s) t)) ((Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x s) -> (Membership.mem.{u1, u1} β (Set.{u1} β) (Set.instMembershipSet.{u1} β) (f x) t))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_core_res PFun.mem_core_resₓ'. -/
 theorem mem_core_res (f : α → β) (s : Set α) (t : Set β) (x : α) :
     x ∈ (res f s).core t ↔ x ∈ s → f x ∈ t := by simp [mem_core, mem_res]
 #align pfun.mem_core_res PFun.mem_core_res
@@ -734,12 +512,6 @@ section
 
 open Classical
 
-/- warning: pfun.core_res -> PFun.core_res is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β) (s : Set.{u1} α) (t : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.core.{u1, u2} α β (PFun.res.{u1, u2} α β f s) t) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s) (Set.preimage.{u1, u2} α β f t))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u1} β), Eq.{succ u2} (Set.{u2} α) (PFun.core.{u2, u1} α β (PFun.res.{u2, u1} α β f s) t) (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) (HasCompl.compl.{u2} (Set.{u2} α) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α)) s) (Set.preimage.{u2, u1} α β f t))
-Case conversion may be inaccurate. Consider using '#align pfun.core_res PFun.core_resₓ'. -/
 theorem core_res (f : α → β) (s : Set α) (t : Set β) : (res f s).core t = sᶜ ∪ f ⁻¹' t := by ext;
   rw [mem_core_res]; by_cases h : x ∈ s <;> simp [h]
 #align pfun.core_res PFun.core_res
@@ -752,24 +524,12 @@ theorem core_restrict (f : α → β) (s : Set β) : (f : α →. β).core s = s
 #align pfun.core_restrict PFun.core_restrict
 -/
 
-/- warning: pfun.preimage_subset_core -> PFun.preimage_subset_core is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) (PFun.preimage.{u1, u2} α β f s) (PFun.core.{u1, u2} α β f s)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (s : Set.{u1} β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) (PFun.preimage.{u2, u1} α β f s) (PFun.core.{u2, u1} α β f s)
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_subset_core PFun.preimage_subset_coreₓ'. -/
 theorem preimage_subset_core (f : α →. β) (s : Set β) : f.Preimage s ⊆ f.core s :=
   fun x ⟨y, ys, fxy⟩ y' fxy' =>
   have : y = y' := Part.mem_unique fxy fxy'
   this ▸ ys
 #align pfun.preimage_subset_core PFun.preimage_subset_core
 
-/- warning: pfun.preimage_eq -> PFun.preimage_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.preimage.{u1, u2} α β f s) (Inter.inter.{u1} (Set.{u1} α) (Set.hasInter.{u1} α) (PFun.core.{u1, u2} α β f s) (PFun.Dom.{u1, u2} α β f))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (s : Set.{u1} β), Eq.{succ u2} (Set.{u2} α) (PFun.preimage.{u2, u1} α β f s) (Inter.inter.{u2} (Set.{u2} α) (Set.instInterSet.{u2} α) (PFun.core.{u2, u1} α β f s) (PFun.Dom.{u2, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_eq PFun.preimage_eqₓ'. -/
 theorem preimage_eq (f : α →. β) (s : Set β) : f.Preimage s = f.core s ∩ f.Dom :=
   Set.eq_of_subset_of_subset (Set.subset_inter (f.preimage_subset_core s) (f.preimage_subset_dom s))
     fun x ⟨xcore, xdom⟩ =>
@@ -778,23 +538,11 @@ theorem preimage_eq (f : α →. β) (s : Set β) : f.Preimage s = f.core s ∩
     show x ∈ f.Preimage s from ⟨(f x).get xdom, ys, Part.get_mem _⟩
 #align pfun.preimage_eq PFun.preimage_eq
 
-/- warning: pfun.core_eq -> PFun.core_eq is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} α) (PFun.core.{u1, u2} α β f s) (Union.union.{u1} (Set.{u1} α) (Set.hasUnion.{u1} α) (PFun.preimage.{u1, u2} α β f s) (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) (PFun.Dom.{u1, u2} α β f)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (s : Set.{u1} β), Eq.{succ u2} (Set.{u2} α) (PFun.core.{u2, u1} α β f s) (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) (PFun.preimage.{u2, u1} α β f s) (HasCompl.compl.{u2} (Set.{u2} α) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α)) (PFun.Dom.{u2, u1} α β f)))
-Case conversion may be inaccurate. Consider using '#align pfun.core_eq PFun.core_eqₓ'. -/
 theorem core_eq (f : α →. β) (s : Set β) : f.core s = f.Preimage s ∪ f.Domᶜ := by
   rw [preimage_eq, Set.union_distrib_right, Set.union_comm (dom f), Set.compl_union_self,
     Set.inter_univ, Set.union_eq_self_of_subset_right (f.compl_dom_subset_core s)]
 #align pfun.core_eq PFun.core_eq
 
-/- warning: pfun.preimage_as_subtype -> PFun.preimage_asSubtype is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (PFun.Dom.{u1, u2} α β f))) (Set.preimage.{u1, u2} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (PFun.Dom.{u1, u2} α β f)) β (PFun.asSubtype.{u1, u2} α β f) s) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (PFun.Dom.{u1, u2} α β f)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (PFun.Dom.{u1, u2} α β f))) (PFun.preimage.{u1, u2} α β f s))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (s : Set.{u1} β), Eq.{succ u2} (Set.{u2} (Set.Elem.{u2} α (PFun.Dom.{u2, u1} α β f))) (Set.preimage.{u2, u1} (Set.Elem.{u2} α (PFun.Dom.{u2, u1} α β f)) β (PFun.asSubtype.{u2, u1} α β f) s) (Set.preimage.{u2, u2} (Subtype.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.Dom.{u2, u1} α β f))) α (Subtype.val.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.Dom.{u2, u1} α β f))) (PFun.preimage.{u2, u1} α β f s))
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_as_subtype PFun.preimage_asSubtypeₓ'. -/
 theorem preimage_asSubtype (f : α →. β) (s : Set β) :
     f.asSubtype ⁻¹' s = Subtype.val ⁻¹' f.Preimage s :=
   by
@@ -813,12 +561,6 @@ def toSubtype (p : β → Prop) (f : α → β) : α →. Subtype p := fun a =>
 #align pfun.to_subtype PFun.toSubtype
 -/
 
-/- warning: pfun.dom_to_subtype -> PFun.dom_toSubtype is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (p : β -> Prop) (f : α -> β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u2} α (Subtype.{succ u2} β p) (PFun.toSubtype.{u1, u2} α β p f)) (setOf.{u1} α (fun (a : α) => p (f a)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (p : β -> Prop) (f : α -> β), Eq.{succ u2} (Set.{u2} α) (PFun.Dom.{u2, u1} α (Subtype.{succ u1} β p) (PFun.toSubtype.{u2, u1} α β p f)) (setOf.{u2} α (fun (a : α) => p (f a)))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_to_subtype PFun.dom_toSubtypeₓ'. -/
 @[simp]
 theorem dom_toSubtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = { a | p (f a) } :=
   rfl
@@ -873,45 +615,21 @@ def comp (f : β →. γ) (g : α →. β) : α →. γ := fun a => (g a).bind f
 #align pfun.comp PFun.comp
 -/
 
-/- warning: pfun.comp_apply -> PFun.comp_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : PFun.{u2, u3} β γ) (g : PFun.{u1, u2} α β) (a : α), Eq.{succ u3} (Part.{u3} γ) (PFun.comp.{u1, u2, u3} α β γ f g a) (Part.bind.{u2, u3} β γ (g a) f)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u3}} {γ : Type.{u2}} (f : PFun.{u3, u2} β γ) (g : PFun.{u1, u3} α β) (a : α), Eq.{succ u2} (Part.{u2} γ) (PFun.comp.{u1, u3, u2} α β γ f g a) (Part.bind.{u3, u2} β γ (g a) f)
-Case conversion may be inaccurate. Consider using '#align pfun.comp_apply PFun.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (f : β →. γ) (g : α →. β) (a : α) : f.comp g a = (g a).bind f :=
   rfl
 #align pfun.comp_apply PFun.comp_apply
 
-/- warning: pfun.id_comp -> PFun.id_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β), Eq.{max (succ u1) (succ u2)} (PFun.{u1, u2} α β) (PFun.comp.{u1, u2, u2} α β β (PFun.id.{u2} β) f) f
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β), Eq.{max (succ u2) (succ u1)} (PFun.{u2, u1} α β) (PFun.comp.{u2, u1, u1} α β β (PFun.id.{u1} β) f) f
-Case conversion may be inaccurate. Consider using '#align pfun.id_comp PFun.id_compₓ'. -/
 @[simp]
 theorem id_comp (f : α →. β) : (PFun.id β).comp f = f :=
   ext fun _ _ => by simp
 #align pfun.id_comp PFun.id_comp
 
-/- warning: pfun.comp_id -> PFun.comp_id is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β), Eq.{max (succ u1) (succ u2)} (PFun.{u1, u2} α β) (PFun.comp.{u1, u1, u2} α α β f (PFun.id.{u1} α)) f
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β), Eq.{max (succ u2) (succ u1)} (PFun.{u2, u1} α β) (PFun.comp.{u2, u2, u1} α α β f (PFun.id.{u2} α)) f
-Case conversion may be inaccurate. Consider using '#align pfun.comp_id PFun.comp_idₓ'. -/
 @[simp]
 theorem comp_id (f : α →. β) : f.comp (PFun.id α) = f :=
   ext fun _ _ => by simp
 #align pfun.comp_id PFun.comp_id
 
-/- warning: pfun.dom_comp -> PFun.dom_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : PFun.{u2, u3} β γ) (g : PFun.{u1, u2} α β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u3} α γ (PFun.comp.{u1, u2, u3} α β γ f g)) (PFun.preimage.{u1, u2} α β g (PFun.Dom.{u2, u3} β γ f))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u3}} {γ : Type.{u2}} (f : PFun.{u3, u2} β γ) (g : PFun.{u1, u3} α β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u2} α γ (PFun.comp.{u1, u3, u2} α β γ f g)) (PFun.preimage.{u1, u3} α β g (PFun.Dom.{u3, u2} β γ f))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_comp PFun.dom_compₓ'. -/
 @[simp]
 theorem dom_comp (f : β →. γ) (g : α →. β) : (f.comp g).Dom = g.Preimage f.Dom :=
   by
@@ -921,12 +639,6 @@ theorem dom_comp (f : β →. γ) (g : α →. β) : (f.comp g).Dom = g.Preimage
   simp_rw [and_comm]
 #align pfun.dom_comp PFun.dom_comp
 
-/- warning: pfun.preimage_comp -> PFun.preimage_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : PFun.{u2, u3} β γ) (g : PFun.{u1, u2} α β) (s : Set.{u3} γ), Eq.{succ u1} (Set.{u1} α) (PFun.preimage.{u1, u3} α γ (PFun.comp.{u1, u2, u3} α β γ f g) s) (PFun.preimage.{u1, u2} α β g (PFun.preimage.{u2, u3} β γ f s))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u3}} {γ : Type.{u2}} (f : PFun.{u3, u2} β γ) (g : PFun.{u1, u3} α β) (s : Set.{u2} γ), Eq.{succ u1} (Set.{u1} α) (PFun.preimage.{u1, u2} α γ (PFun.comp.{u1, u3, u2} α β γ f g) s) (PFun.preimage.{u1, u3} α β g (PFun.preimage.{u3, u2} β γ f s))
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_comp PFun.preimage_compₓ'. -/
 @[simp]
 theorem preimage_comp (f : β →. γ) (g : α →. β) (s : Set γ) :
     (f.comp g).Preimage s = g.Preimage (f.Preimage s) :=
@@ -938,12 +650,6 @@ theorem preimage_comp (f : β →. γ) (g : α →. β) (s : Set γ) :
   simp_rw [and_assoc', and_comm]
 #align pfun.preimage_comp PFun.preimage_comp
 
-/- warning: part.bind_comp -> PFun.Part.bind_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : PFun.{u2, u3} β γ) (g : PFun.{u1, u2} α β) (a : Part.{u1} α), Eq.{succ u3} (Part.{u3} γ) (Part.bind.{u1, u3} α γ a (PFun.comp.{u1, u2, u3} α β γ f g)) (Part.bind.{u2, u3} β γ (Part.bind.{u1, u2} α β a g) f)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u3}} {γ : Type.{u2}} (f : PFun.{u3, u2} β γ) (g : PFun.{u1, u3} α β) (a : Part.{u1} α), Eq.{succ u2} (Part.{u2} γ) (Part.bind.{u1, u2} α γ a (PFun.comp.{u1, u3, u2} α β γ f g)) (Part.bind.{u3, u2} β γ (Part.bind.{u1, u3} α β a g) f)
-Case conversion may be inaccurate. Consider using '#align part.bind_comp PFun.Part.bind_compₓ'. -/
 @[simp]
 theorem PFun.Part.bind_comp (f : β →. γ) (g : α →. β) (a : Part α) :
     a.bind (f.comp g) = (a.bind g).bind f := by
@@ -954,23 +660,11 @@ theorem PFun.Part.bind_comp (f : β →. γ) (g : α →. β) (a : Part α) :
   simp_rw [and_assoc']
 #align part.bind_comp PFun.Part.bind_comp
 
-/- warning: pfun.comp_assoc -> PFun.comp_assoc is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (f : PFun.{u3, u4} γ δ) (g : PFun.{u2, u3} β γ) (h : PFun.{u1, u2} α β), Eq.{max (succ u1) (succ u4)} (PFun.{u1, u4} α δ) (PFun.comp.{u1, u2, u4} α β δ (PFun.comp.{u2, u3, u4} β γ δ f g) h) (PFun.comp.{u1, u3, u4} α γ δ f (PFun.comp.{u1, u2, u3} α β γ g h))
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u4}} {δ : Type.{u3}} (f : PFun.{u4, u3} γ δ) (g : PFun.{u2, u4} β γ) (h : PFun.{u1, u2} α β), Eq.{max (succ u1) (succ u3)} (PFun.{u1, u3} α δ) (PFun.comp.{u1, u2, u3} α β δ (PFun.comp.{u2, u4, u3} β γ δ f g) h) (PFun.comp.{u1, u4, u3} α γ δ f (PFun.comp.{u1, u2, u4} α β γ g h))
-Case conversion may be inaccurate. Consider using '#align pfun.comp_assoc PFun.comp_assocₓ'. -/
 @[simp]
 theorem comp_assoc (f : γ →. δ) (g : β →. γ) (h : α →. β) : (f.comp g).comp h = f.comp (g.comp h) :=
   ext fun _ _ => by simp only [comp_apply, PFun.Part.bind_comp]
 #align pfun.comp_assoc PFun.comp_assoc
 
-/- warning: pfun.coe_comp -> PFun.coe_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (g : β -> γ) (f : α -> β), Eq.{max (succ u1) (succ u3)} (PFun.{u1, u3} α γ) ((fun (a : Sort.{max (succ u1) (succ u3)}) (b : Sort.{max (succ u1) (succ u3)}) [self : HasLiftT.{max (succ u1) (succ u3), max (succ u1) (succ u3)} a b] => self.0) (α -> γ) (PFun.{u1, u3} α γ) (HasLiftT.mk.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (CoeTCₓ.coe.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (coeBase.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (PFun.coe.{u1, u3} α γ)))) (Function.comp.{succ u1, succ u2, succ u3} α β γ g f)) (PFun.comp.{u1, u2, u3} α β γ ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u2) (succ u3)} a b] => self.0) (β -> γ) (PFun.{u2, u3} β γ) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (coeBase.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (PFun.coe.{u2, u3} β γ)))) g) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.coe.{u1, u2} α β)))) f))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (g : β -> γ) (f : α -> β), Eq.{max (succ u3) (succ u2)} (PFun.{u3, u2} α γ) (PFun.lift.{u3, u2} α γ (Function.comp.{succ u3, succ u1, succ u2} α β γ g f)) (PFun.comp.{u3, u1, u2} α β γ (PFun.lift.{u1, u2} β γ g) (PFun.lift.{u3, u1} α β f))
-Case conversion may be inaccurate. Consider using '#align pfun.coe_comp PFun.coe_compₓ'. -/
 -- This can't be `simp`
 theorem coe_comp (g : β → γ) (f : α → β) : ((g ∘ f : α → γ) : α →. γ) = (g : β →. γ).comp f :=
   ext fun _ _ => by simp only [coe_val, comp_apply, Part.bind_some]
@@ -983,47 +677,23 @@ def prodLift (f : α →. β) (g : α →. γ) : α →. β × γ := fun x =>
 #align pfun.prod_lift PFun.prodLift
 -/
 
-/- warning: pfun.dom_prod_lift -> PFun.dom_prodLift is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : PFun.{u1, u2} α β) (g : PFun.{u1, u3} α γ), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, max u2 u3} α (Prod.{u2, u3} β γ) (PFun.prodLift.{u1, u2, u3} α β γ f g)) (setOf.{u1} α (fun (x : α) => And (Part.Dom.{u2} β (f x)) (Part.Dom.{u3} γ (g x))))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : PFun.{u3, u2} α β) (g : PFun.{u3, u1} α γ), Eq.{succ u3} (Set.{u3} α) (PFun.Dom.{u3, max u2 u1} α (Prod.{u2, u1} β γ) (PFun.prodLift.{u3, u2, u1} α β γ f g)) (setOf.{u3} α (fun (x : α) => And (Part.Dom.{u2} β (f x)) (Part.Dom.{u1} γ (g x))))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_prod_lift PFun.dom_prodLiftₓ'. -/
 @[simp]
 theorem dom_prodLift (f : α →. β) (g : α →. γ) :
     (f.prodLift g).Dom = { x | (f x).Dom ∧ (g x).Dom } :=
   rfl
 #align pfun.dom_prod_lift PFun.dom_prodLift
 
-/- warning: pfun.get_prod_lift -> PFun.get_prodLift is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : PFun.{u1, u2} α β) (g : PFun.{u1, u3} α γ) (x : α) (h : Part.Dom.{max u2 u3} (Prod.{u2, u3} β γ) (PFun.prodLift.{u1, u2, u3} α β γ f g x)), Eq.{max (succ u2) (succ u3)} (Prod.{u2, u3} β γ) (Part.get.{max u2 u3} (Prod.{u2, u3} β γ) (PFun.prodLift.{u1, u2, u3} α β γ f g x) h) (Prod.mk.{u2, u3} β γ (Part.get.{u2} β (f x) (And.left (Part.Dom.{u2} β (f x)) (Part.Dom.{u3} γ (g x)) h)) (Part.get.{u3} γ (g x) (And.right (Part.Dom.{u2} β (f x)) (Part.Dom.{u3} γ (g x)) h)))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : PFun.{u3, u2} α β) (g : PFun.{u3, u1} α γ) (x : α) (h : Part.Dom.{max u2 u1} (Prod.{u2, u1} β γ) (PFun.prodLift.{u3, u2, u1} α β γ f g x)), Eq.{max (succ u2) (succ u1)} (Prod.{u2, u1} β γ) (Part.get.{max u2 u1} (Prod.{u2, u1} β γ) (PFun.prodLift.{u3, u2, u1} α β γ f g x) h) (Prod.mk.{u2, u1} β γ (Part.get.{u2} β (f x) (And.left (Part.Dom.{u2} β (f x)) (Part.Dom.{u1} γ (g x)) h)) (Part.get.{u1} γ (g x) (And.right (Part.Dom.{u2} β (f x)) (Part.Dom.{u1} γ (g x)) h)))
-Case conversion may be inaccurate. Consider using '#align pfun.get_prod_lift PFun.get_prodLiftₓ'. -/
 theorem get_prodLift (f : α →. β) (g : α →. γ) (x : α) (h) :
     (f.prodLift g x).get h = ((f x).get h.1, (g x).get h.2) :=
   rfl
 #align pfun.get_prod_lift PFun.get_prodLift
 
-/- warning: pfun.prod_lift_apply -> PFun.prodLift_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (f : PFun.{u1, u2} α β) (g : PFun.{u1, u3} α γ) (x : α), Eq.{succ (max u2 u3)} (Part.{max u2 u3} (Prod.{u2, u3} β γ)) (PFun.prodLift.{u1, u2, u3} α β γ f g x) (Part.mk.{max u2 u3} (Prod.{u2, u3} β γ) (And (Part.Dom.{u2} β (f x)) (Part.Dom.{u3} γ (g x))) (fun (h : And (Part.Dom.{u2} β (f x)) (Part.Dom.{u3} γ (g x))) => Prod.mk.{u2, u3} β γ (Part.get.{u2} β (f x) (And.left (Part.Dom.{u2} β (f x)) (Part.Dom.{u3} γ (g x)) h)) (Part.get.{u3} γ (g x) (And.right (Part.Dom.{u2} β (f x)) (Part.Dom.{u3} γ (g x)) h))))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (f : PFun.{u3, u2} α β) (g : PFun.{u3, u1} α γ) (x : α), Eq.{max (succ u2) (succ u1)} (Part.{max u1 u2} (Prod.{u2, u1} β γ)) (PFun.prodLift.{u3, u2, u1} α β γ f g x) (Part.mk.{max u2 u1} (Prod.{u2, u1} β γ) (And (Part.Dom.{u2} β (f x)) (Part.Dom.{u1} γ (g x))) (fun (h : And (Part.Dom.{u2} β (f x)) (Part.Dom.{u1} γ (g x))) => Prod.mk.{u2, u1} β γ (Part.get.{u2} β (f x) (And.left (Part.Dom.{u2} β (f x)) (Part.Dom.{u1} γ (g x)) h)) (Part.get.{u1} γ (g x) (And.right (Part.Dom.{u2} β (f x)) (Part.Dom.{u1} γ (g x)) h))))
-Case conversion may be inaccurate. Consider using '#align pfun.prod_lift_apply PFun.prodLift_applyₓ'. -/
 @[simp]
 theorem prodLift_apply (f : α →. β) (g : α →. γ) (x : α) :
     f.prodLift g x = ⟨(f x).Dom ∧ (g x).Dom, fun h => ((f x).get h.1, (g x).get h.2)⟩ :=
   rfl
 #align pfun.prod_lift_apply PFun.prodLift_apply
 
-/- warning: pfun.mem_prod_lift -> PFun.mem_prodLift is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {f : PFun.{u1, u2} α β} {g : PFun.{u1, u3} α γ} {x : α} {y : Prod.{u2, u3} β γ}, Iff (Membership.Mem.{max u2 u3, max u2 u3} (Prod.{u2, u3} β γ) (Part.{max u2 u3} (Prod.{u2, u3} β γ)) (Part.hasMem.{max u2 u3} (Prod.{u2, u3} β γ)) y (PFun.prodLift.{u1, u2, u3} α β γ f g x)) (And (Membership.Mem.{u2, u2} β (Part.{u2} β) (Part.hasMem.{u2} β) (Prod.fst.{u2, u3} β γ y) (f x)) (Membership.Mem.{u3, u3} γ (Part.{u3} γ) (Part.hasMem.{u3} γ) (Prod.snd.{u2, u3} β γ y) (g x)))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} {f : PFun.{u3, u2} α β} {g : PFun.{u3, u1} α γ} {x : α} {y : Prod.{u2, u1} β γ}, Iff (Membership.mem.{max u2 u1, max u2 u1} (Prod.{u2, u1} β γ) (Part.{max u1 u2} (Prod.{u2, u1} β γ)) (Part.instMembershipPart.{max u2 u1} (Prod.{u2, u1} β γ)) y (PFun.prodLift.{u3, u2, u1} α β γ f g x)) (And (Membership.mem.{u2, u2} β (Part.{u2} β) (Part.instMembershipPart.{u2} β) (Prod.fst.{u2, u1} β γ y) (f x)) (Membership.mem.{u1, u1} γ (Part.{u1} γ) (Part.instMembershipPart.{u1} γ) (Prod.snd.{u2, u1} β γ y) (g x)))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_prod_lift PFun.mem_prodLiftₓ'. -/
 theorem mem_prodLift {f : α →. β} {g : α →. γ} {x : α} {y : β × γ} :
     y ∈ f.prodLift g x ↔ y.1 ∈ f x ∧ y.2 ∈ g x :=
   by
@@ -1039,47 +709,23 @@ def prodMap (f : α →. γ) (g : β →. δ) : α × β →. γ × δ := fun x
 #align pfun.prod_map PFun.prodMap
 -/
 
-/- warning: pfun.dom_prod_map -> PFun.dom_prodMap is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (f : PFun.{u1, u3} α γ) (g : PFun.{u2, u4} β δ), Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Prod.{u1, u2} α β)) (PFun.Dom.{max u1 u2, max u3 u4} (Prod.{u1, u2} α β) (Prod.{u3, u4} γ δ) (PFun.prodMap.{u1, u2, u3, u4} α β γ δ f g)) (setOf.{max u1 u2} (Prod.{u1, u2} α β) (fun (x : Prod.{u1, u2} α β) => And (Part.Dom.{u3} γ (f (Prod.fst.{u1, u2} α β x))) (Part.Dom.{u4} δ (g (Prod.snd.{u1, u2} α β x)))))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} (f : PFun.{u4, u3} α γ) (g : PFun.{u2, u1} β δ), Eq.{max (succ u4) (succ u2)} (Set.{max u4 u2} (Prod.{u4, u2} α β)) (PFun.Dom.{max u4 u2, max u3 u1} (Prod.{u4, u2} α β) (Prod.{u3, u1} γ δ) (PFun.prodMap.{u4, u2, u3, u1} α β γ δ f g)) (setOf.{max u4 u2} (Prod.{u4, u2} α β) (fun (x : Prod.{u4, u2} α β) => And (Part.Dom.{u3} γ (f (Prod.fst.{u4, u2} α β x))) (Part.Dom.{u1} δ (g (Prod.snd.{u4, u2} α β x)))))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_prod_map PFun.dom_prodMapₓ'. -/
 @[simp]
 theorem dom_prodMap (f : α →. γ) (g : β →. δ) :
     (f.Prod_map g).Dom = { x | (f x.1).Dom ∧ (g x.2).Dom } :=
   rfl
 #align pfun.dom_prod_map PFun.dom_prodMap
 
-/- warning: pfun.get_prod_map -> PFun.get_prodMap is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (f : PFun.{u1, u3} α γ) (g : PFun.{u2, u4} β δ) (x : Prod.{u1, u2} α β) (h : Part.Dom.{max u3 u4} (Prod.{u3, u4} γ δ) (PFun.prodMap.{u1, u2, u3, u4} α β γ δ f g x)), Eq.{max (succ u3) (succ u4)} (Prod.{u3, u4} γ δ) (Part.get.{max u3 u4} (Prod.{u3, u4} γ δ) (PFun.prodMap.{u1, u2, u3, u4} α β γ δ f g x) h) (Prod.mk.{u3, u4} γ δ (Part.get.{u3} γ (f (Prod.fst.{u1, u2} α β x)) (And.left (Part.Dom.{u3} γ (f (Prod.fst.{u1, u2} α β x))) (Part.Dom.{u4} δ (g (Prod.snd.{u1, u2} α β x))) h)) (Part.get.{u4} δ (g (Prod.snd.{u1, u2} α β x)) (And.right (Part.Dom.{u3} γ (f (Prod.fst.{u1, u2} α β x))) (Part.Dom.{u4} δ (g (Prod.snd.{u1, u2} α β x))) h)))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} (f : PFun.{u4, u3} α γ) (g : PFun.{u2, u1} β δ) (x : Prod.{u4, u2} α β) (h : Part.Dom.{max u3 u1} (Prod.{u3, u1} γ δ) (PFun.prodMap.{u4, u2, u3, u1} α β γ δ f g x)), Eq.{max (succ u3) (succ u1)} (Prod.{u3, u1} γ δ) (Part.get.{max u3 u1} (Prod.{u3, u1} γ δ) (PFun.prodMap.{u4, u2, u3, u1} α β γ δ f g x) h) (Prod.mk.{u3, u1} γ δ (Part.get.{u3} γ (f (Prod.fst.{u4, u2} α β x)) (And.left (Part.Dom.{u3} γ (f (Prod.fst.{u4, u2} α β x))) (Part.Dom.{u1} δ (g (Prod.snd.{u4, u2} α β x))) h)) (Part.get.{u1} δ (g (Prod.snd.{u4, u2} α β x)) (And.right (Part.Dom.{u3} γ (f (Prod.fst.{u4, u2} α β x))) (Part.Dom.{u1} δ (g (Prod.snd.{u4, u2} α β x))) h)))
-Case conversion may be inaccurate. Consider using '#align pfun.get_prod_map PFun.get_prodMapₓ'. -/
 theorem get_prodMap (f : α →. γ) (g : β →. δ) (x : α × β) (h) :
     (f.Prod_map g x).get h = ((f x.1).get h.1, (g x.2).get h.2) :=
   rfl
 #align pfun.get_prod_map PFun.get_prodMap
 
-/- warning: pfun.prod_map_apply -> PFun.prodMap_apply is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (f : PFun.{u1, u3} α γ) (g : PFun.{u2, u4} β δ) (x : Prod.{u1, u2} α β), Eq.{succ (max u3 u4)} (Part.{max u3 u4} (Prod.{u3, u4} γ δ)) (PFun.prodMap.{u1, u2, u3, u4} α β γ δ f g x) (Part.mk.{max u3 u4} (Prod.{u3, u4} γ δ) (And (Part.Dom.{u3} γ (f (Prod.fst.{u1, u2} α β x))) (Part.Dom.{u4} δ (g (Prod.snd.{u1, u2} α β x)))) (fun (h : And (Part.Dom.{u3} γ (f (Prod.fst.{u1, u2} α β x))) (Part.Dom.{u4} δ (g (Prod.snd.{u1, u2} α β x)))) => Prod.mk.{u3, u4} γ δ (Part.get.{u3} γ (f (Prod.fst.{u1, u2} α β x)) (And.left (Part.Dom.{u3} γ (f (Prod.fst.{u1, u2} α β x))) (Part.Dom.{u4} δ (g (Prod.snd.{u1, u2} α β x))) h)) (Part.get.{u4} δ (g (Prod.snd.{u1, u2} α β x)) (And.right (Part.Dom.{u3} γ (f (Prod.fst.{u1, u2} α β x))) (Part.Dom.{u4} δ (g (Prod.snd.{u1, u2} α β x))) h))))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} (f : PFun.{u4, u3} α γ) (g : PFun.{u2, u1} β δ) (x : Prod.{u4, u2} α β), Eq.{max (succ u3) (succ u1)} (Part.{max u1 u3} (Prod.{u3, u1} γ δ)) (PFun.prodMap.{u4, u2, u3, u1} α β γ δ f g x) (Part.mk.{max u3 u1} (Prod.{u3, u1} γ δ) (And (Part.Dom.{u3} γ (f (Prod.fst.{u4, u2} α β x))) (Part.Dom.{u1} δ (g (Prod.snd.{u4, u2} α β x)))) (fun (h : And (Part.Dom.{u3} γ (f (Prod.fst.{u4, u2} α β x))) (Part.Dom.{u1} δ (g (Prod.snd.{u4, u2} α β x)))) => Prod.mk.{u3, u1} γ δ (Part.get.{u3} γ (f (Prod.fst.{u4, u2} α β x)) (And.left (Part.Dom.{u3} γ (f (Prod.fst.{u4, u2} α β x))) (Part.Dom.{u1} δ (g (Prod.snd.{u4, u2} α β x))) h)) (Part.get.{u1} δ (g (Prod.snd.{u4, u2} α β x)) (And.right (Part.Dom.{u3} γ (f (Prod.fst.{u4, u2} α β x))) (Part.Dom.{u1} δ (g (Prod.snd.{u4, u2} α β x))) h))))
-Case conversion may be inaccurate. Consider using '#align pfun.prod_map_apply PFun.prodMap_applyₓ'. -/
 @[simp]
 theorem prodMap_apply (f : α →. γ) (g : β →. δ) (x : α × β) :
     f.Prod_map g x = ⟨(f x.1).Dom ∧ (g x.2).Dom, fun h => ((f x.1).get h.1, (g x.2).get h.2)⟩ :=
   rfl
 #align pfun.prod_map_apply PFun.prodMap_apply
 
-/- warning: pfun.mem_prod_map -> PFun.mem_prodMap is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} {f : PFun.{u1, u3} α γ} {g : PFun.{u2, u4} β δ} {x : Prod.{u1, u2} α β} {y : Prod.{u3, u4} γ δ}, Iff (Membership.Mem.{max u3 u4, max u3 u4} (Prod.{u3, u4} γ δ) (Part.{max u3 u4} (Prod.{u3, u4} γ δ)) (Part.hasMem.{max u3 u4} (Prod.{u3, u4} γ δ)) y (PFun.prodMap.{u1, u2, u3, u4} α β γ δ f g x)) (And (Membership.Mem.{u3, u3} γ (Part.{u3} γ) (Part.hasMem.{u3} γ) (Prod.fst.{u3, u4} γ δ y) (f (Prod.fst.{u1, u2} α β x))) (Membership.Mem.{u4, u4} δ (Part.{u4} δ) (Part.hasMem.{u4} δ) (Prod.snd.{u3, u4} γ δ y) (g (Prod.snd.{u1, u2} α β x))))
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} {f : PFun.{u4, u3} α γ} {g : PFun.{u2, u1} β δ} {x : Prod.{u4, u2} α β} {y : Prod.{u3, u1} γ δ}, Iff (Membership.mem.{max u3 u1, max u3 u1} (Prod.{u3, u1} γ δ) (Part.{max u1 u3} (Prod.{u3, u1} γ δ)) (Part.instMembershipPart.{max u3 u1} (Prod.{u3, u1} γ δ)) y (PFun.prodMap.{u4, u2, u3, u1} α β γ δ f g x)) (And (Membership.mem.{u3, u3} γ (Part.{u3} γ) (Part.instMembershipPart.{u3} γ) (Prod.fst.{u3, u1} γ δ y) (f (Prod.fst.{u4, u2} α β x))) (Membership.mem.{u1, u1} δ (Part.{u1} δ) (Part.instMembershipPart.{u1} δ) (Prod.snd.{u3, u1} γ δ y) (g (Prod.snd.{u4, u2} α β x))))
-Case conversion may be inaccurate. Consider using '#align pfun.mem_prod_map PFun.mem_prodMapₓ'. -/
 theorem mem_prodMap {f : α →. γ} {g : β →. δ} {x : α × β} {y : γ × δ} :
     y ∈ f.Prod_map g x ↔ y.1 ∈ f x.1 ∧ y.2 ∈ g x.2 :=
   by
@@ -1088,12 +734,6 @@ theorem mem_prodMap {f : α →. γ} {g : β →. δ} {x : α × β} {y : γ ×
   · simpa only [exists_and_left, exists_and_right]
 #align pfun.mem_prod_map PFun.mem_prodMap
 
-/- warning: pfun.prod_lift_fst_comp_snd_comp -> PFun.prodLift_fst_comp_snd_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (f : PFun.{u1, u3} α γ) (g : PFun.{u2, u4} β δ), Eq.{max (succ (max u1 u2)) (succ (max u3 u4))} (PFun.{max u1 u2, max u3 u4} (Prod.{u1, u2} α β) (Prod.{u3, u4} γ δ)) (PFun.prodLift.{max u1 u2, u3, u4} (Prod.{u1, u2} α β) γ δ (PFun.comp.{max u1 u2, u1, u3} (Prod.{u1, u2} α β) α γ f ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ (max u1 u2)) (succ u1)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} a b] => self.0) ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (coeBase.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (PFun.coe.{max u1 u2, u1} (Prod.{u1, u2} α β) α)))) (Prod.fst.{u1, u2} α β))) (PFun.comp.{max u1 u2, u2, u4} (Prod.{u1, u2} α β) β δ g ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ (max u1 u2)) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} a b] => self.0) ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (coeBase.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (PFun.coe.{max u1 u2, u2} (Prod.{u1, u2} α β) β)))) (Prod.snd.{u1, u2} α β)))) (PFun.prodMap.{u1, u2, u3, u4} α β γ δ f g)
-but is expected to have type
-  forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} (f : PFun.{u4, u3} α γ) (g : PFun.{u2, u1} β δ), Eq.{max (max (max (succ u4) (succ u2)) (succ u3)) (succ u1)} (PFun.{max u4 u2, max u1 u3} (Prod.{u4, u2} α β) (Prod.{u3, u1} γ δ)) (PFun.prodLift.{max u4 u2, u3, u1} (Prod.{u4, u2} α β) γ δ (PFun.comp.{max u4 u2, u4, u3} (Prod.{u4, u2} α β) α γ f (PFun.lift.{max u4 u2, u4} (Prod.{u4, u2} α β) α (Prod.fst.{u4, u2} α β))) (PFun.comp.{max u4 u2, u2, u1} (Prod.{u4, u2} α β) β δ g (PFun.lift.{max u4 u2, u2} (Prod.{u4, u2} α β) β (Prod.snd.{u4, u2} α β)))) (PFun.prodMap.{u4, u2, u3, u1} α β γ δ f g)
-Case conversion may be inaccurate. Consider using '#align pfun.prod_lift_fst_comp_snd_comp PFun.prodLift_fst_comp_snd_compₓ'. -/
 @[simp]
 theorem prodLift_fst_comp_snd_comp (f : α →. γ) (g : β →. δ) :
     prodLift (f.comp ((Prod.fst : α × β → α) : α × β →. α))
@@ -1102,23 +742,11 @@ theorem prodLift_fst_comp_snd_comp (f : α →. γ) (g : β →. δ) :
   ext fun a => by simp
 #align pfun.prod_lift_fst_comp_snd_comp PFun.prodLift_fst_comp_snd_comp
 
-/- warning: pfun.prod_map_id_id -> PFun.prodMap_id_id is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Eq.{succ (max u1 u2)} (PFun.{max u1 u2, max u1 u2} (Prod.{u1, u2} α β) (Prod.{u1, u2} α β)) (PFun.prodMap.{u1, u2, u1, u2} α β α β (PFun.id.{u1} α) (PFun.id.{u2} β)) (PFun.id.{max u1 u2} (Prod.{u1, u2} α β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}}, Eq.{max (succ u2) (succ u1)} (PFun.{max u1 u2, max u1 u2} (Prod.{u2, u1} α β) (Prod.{u2, u1} α β)) (PFun.prodMap.{u2, u1, u2, u1} α β α β (PFun.id.{u2} α) (PFun.id.{u1} β)) (PFun.id.{max u2 u1} (Prod.{u2, u1} α β))
-Case conversion may be inaccurate. Consider using '#align pfun.prod_map_id_id PFun.prodMap_id_idₓ'. -/
 @[simp]
 theorem prodMap_id_id : (PFun.id α).Prod_map (PFun.id β) = PFun.id _ :=
   ext fun _ _ => by simp [eq_comm]
 #align pfun.prod_map_id_id PFun.prodMap_id_id
 
-/- warning: pfun.prod_map_comp_comp -> PFun.prodMap_comp_comp is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} {ε : Type.{u5}} {ι : Type.{u6}} (f₁ : PFun.{u1, u2} α β) (f₂ : PFun.{u2, u3} β γ) (g₁ : PFun.{u4, u5} δ ε) (g₂ : PFun.{u5, u6} ε ι), Eq.{max (succ (max u1 u4)) (succ (max u3 u6))} (PFun.{max u1 u4, max u3 u6} (Prod.{u1, u4} α δ) (Prod.{u3, u6} γ ι)) (PFun.prodMap.{u1, u4, u3, u6} α δ γ ι (PFun.comp.{u1, u2, u3} α β γ f₂ f₁) (PFun.comp.{u4, u5, u6} δ ε ι g₂ g₁)) (PFun.comp.{max u1 u4, max u2 u5, max u3 u6} (Prod.{u1, u4} α δ) (Prod.{u2, u5} β ε) (Prod.{u3, u6} γ ι) (PFun.prodMap.{u2, u5, u3, u6} β ε γ ι f₂ g₂) (PFun.prodMap.{u1, u4, u2, u5} α δ β ε f₁ g₁))
-but is expected to have type
-  forall {α : Type.{u6}} {β : Type.{u5}} {γ : Type.{u4}} {δ : Type.{u3}} {ε : Type.{u2}} {ι : Type.{u1}} (f₁ : PFun.{u6, u5} α β) (f₂ : PFun.{u5, u4} β γ) (g₁ : PFun.{u3, u2} δ ε) (g₂ : PFun.{u2, u1} ε ι), Eq.{max (max (max (succ u6) (succ u4)) (succ u3)) (succ u1)} (PFun.{max u3 u6, max u1 u4} (Prod.{u6, u3} α δ) (Prod.{u4, u1} γ ι)) (PFun.prodMap.{u6, u3, u4, u1} α δ γ ι (PFun.comp.{u6, u5, u4} α β γ f₂ f₁) (PFun.comp.{u3, u2, u1} δ ε ι g₂ g₁)) (PFun.comp.{max u6 u3, max u5 u2, max u4 u1} (Prod.{u6, u3} α δ) (Prod.{u5, u2} β ε) (Prod.{u4, u1} γ ι) (PFun.prodMap.{u5, u2, u4, u1} β ε γ ι f₂ g₂) (PFun.prodMap.{u6, u3, u5, u2} α δ β ε f₁ g₁))
-Case conversion may be inaccurate. Consider using '#align pfun.prod_map_comp_comp PFun.prodMap_comp_compₓ'. -/
 @[simp]
 theorem prodMap_comp_comp (f₁ : α →. β) (f₂ : β →. γ) (g₁ : δ →. ε) (g₂ : ε →. ι) :
     (f₂.comp f₁).Prod_map (g₂.comp g₁) = (f₂.Prod_map g₂).comp (f₁.Prod_map g₁) :=
Diff
@@ -421,24 +421,20 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     simp at h₂
     cases' h₂ with h₂ h₃
     cases' e : (f a).get h₂ with b' a' <;> simp [e] at h₃
-    · subst b'
-      refine' Or.inl ⟨h₂, e⟩
+    · subst b'; refine' Or.inl ⟨h₂, e⟩
     · exact Or.inr ⟨a', ⟨_, e⟩, Part.mem_assert _ h₃⟩, fun h =>
     by
     simp [fix]
     rcases h with (⟨h₁, h₂⟩ | ⟨a', h, h₃⟩)
     · refine' ⟨⟨_, fun y h' => _⟩, _⟩
       · injection Part.mem_unique ⟨h₁, h₂⟩ h'
-      · rw [WellFounded.fixF_eq]
-        simp [h₁, h₂]
-    · simp [fix] at h₃
-      cases' h₃ with h₃ h₄
+      · rw [WellFounded.fixF_eq]; simp [h₁, h₂]
+    · simp [fix] at h₃; cases' h₃ with h₃ h₄
       refine' ⟨⟨_, fun y h' => _⟩, _⟩
       · injection Part.mem_unique h h' with e
         exact e ▸ h₃
       · cases' h with h₁ h₂
-        rw [WellFounded.fixF_eq]
-        simp [h₁, h₂, h₄]⟩
+        rw [WellFounded.fixF_eq]; simp [h₁, h₂, h₄]⟩
 #align pfun.mem_fix_iff PFun.mem_fix_iff
 
 /- warning: pfun.fix_stop -> PFun.fix_stop is a dubious translation:
@@ -448,10 +444,8 @@ but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} {f : PFun.{u2, max u2 u1} α (Sum.{u1, u2} β α)} {b : β} {a : α}, (Membership.mem.{max u2 u1, max u2 u1} (Sum.{u1, u2} β α) (Part.{max u2 u1} (Sum.{u1, u2} β α)) (Part.instMembershipPart.{max u1 u2} (Sum.{u1, u2} β α)) (Sum.inl.{u1, u2} β α b) (f a)) -> (Membership.mem.{u1, u1} β (Part.{u1} β) (Part.instMembershipPart.{u1} β) b (PFun.fix.{u2, u1} α β f a))
 Case conversion may be inaccurate. Consider using '#align pfun.fix_stop PFun.fix_stopₓ'. -/
 /-- If advancing one step from `a` leads to `b : β`, then `f.fix a = b` -/
-theorem fix_stop {f : α →. Sum β α} {b : β} {a : α} (hb : Sum.inl b ∈ f a) : b ∈ f.fix a :=
-  by
-  rw [PFun.mem_fix_iff]
-  exact Or.inl hb
+theorem fix_stop {f : α →. Sum β α} {b : β} {a : α} (hb : Sum.inl b ∈ f a) : b ∈ f.fix a := by
+  rw [PFun.mem_fix_iff]; exact Or.inl hb
 #align pfun.fix_stop PFun.fix_stop
 
 /- warning: pfun.fix_fwd_eq -> PFun.fix_fwd_eq is a dubious translation:
@@ -464,14 +458,8 @@ Case conversion may be inaccurate. Consider using '#align pfun.fix_fwd_eq PFun.f
 theorem fix_fwd_eq {f : α →. Sum β α} {a a' : α} (ha' : Sum.inr a' ∈ f a) : f.fix a = f.fix a' :=
   by
   ext b; constructor
-  · intro h
-    obtain h' | ⟨a, h', e'⟩ := mem_fix_iff.1 h <;> cases Part.mem_unique ha' h'
-    exact e'
-  · intro h
-    rw [PFun.mem_fix_iff]
-    right
-    use a'
-    exact ⟨ha', h⟩
+  · intro h; obtain h' | ⟨a, h', e'⟩ := mem_fix_iff.1 h <;> cases Part.mem_unique ha' h'; exact e'
+  · intro h; rw [PFun.mem_fix_iff]; right; use a'; exact ⟨ha', h⟩
 #align pfun.fix_fwd_eq PFun.fix_fwd_eq
 
 /- warning: pfun.fix_fwd -> PFun.fix_fwd is a dubious translation:
@@ -505,12 +493,8 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align pfun.fix_induction_spec PFun.fixInduction_specₓ'. -/
 theorem fixInduction_spec {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') :
-    @fixInduction _ _ C _ _ _ h H = H a h fun a' h' => fixInduction (fix_fwd h h') H :=
-  by
-  unfold fix_induction
-  generalize_proofs ha
-  induction ha
-  rfl
+    @fixInduction _ _ C _ _ _ h H = H a h fun a' h' => fixInduction (fix_fwd h h') H := by
+  unfold fix_induction; generalize_proofs ha; induction ha; rfl
 #align pfun.fix_induction_spec PFun.fixInduction_spec
 
 #print PFun.fixInduction' /-
@@ -524,9 +508,7 @@ def fixInduction' {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α}
   by
   refine' fix_induction h fun a' h ih => _
   cases' e : (f a').get (dom_of_mem_fix h) with b' a'' <;> replace e : _ ∈ f a' := ⟨_, e⟩
-  · apply hbase
-    convert e
-    exact Part.mem_unique h (fix_stop e)
+  · apply hbase; convert e; exact Part.mem_unique h (fix_stop e)
   · exact hind _ _ (fix_fwd h e) e (ih _ e)
 #align pfun.fix_induction' PFun.fixInduction'
 -/
@@ -540,11 +522,8 @@ Case conversion may be inaccurate. Consider using '#align pfun.fix_induction'_st
 theorem fixInduction'_stop {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (fa : Sum.inl b ∈ f a) (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
     (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) :
-    @fixInduction' _ _ C _ _ _ h hbase hind = hbase a fa :=
-  by
-  unfold fix_induction'
-  rw [fix_induction_spec]
-  simp [Part.get_eq_of_mem fa]
+    @fixInduction' _ _ C _ _ _ h hbase hind = hbase a fa := by unfold fix_induction';
+  rw [fix_induction_spec]; simp [Part.get_eq_of_mem fa]
 #align pfun.fix_induction'_stop PFun.fixInduction'_stop
 
 /- warning: pfun.fix_induction'_fwd -> PFun.fixInduction'_fwd is a dubious translation:
@@ -557,11 +536,8 @@ theorem fixInduction'_fwd {C : α → Sort _} {f : α →. Sum β α} {b : β} {
     (h' : b ∈ f.fix a') (fa : Sum.inr a' ∈ f a)
     (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
     (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) :
-    @fixInduction' _ _ C _ _ _ h hbase hind = hind a a' h' fa (fixInduction' h' hbase hind) :=
-  by
-  unfold fix_induction'
-  rw [fix_induction_spec]
-  simpa [Part.get_eq_of_mem fa]
+    @fixInduction' _ _ C _ _ _ h hbase hind = hind a a' h' fa (fixInduction' h' hbase hind) := by
+  unfold fix_induction'; rw [fix_induction_spec]; simpa [Part.get_eq_of_mem fa]
 #align pfun.fix_induction'_fwd PFun.fixInduction'_fwd
 
 variable (f : α →. β)
@@ -764,11 +740,8 @@ lean 3 declaration is
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β) (s : Set.{u2} α) (t : Set.{u1} β), Eq.{succ u2} (Set.{u2} α) (PFun.core.{u2, u1} α β (PFun.res.{u2, u1} α β f s) t) (Union.union.{u2} (Set.{u2} α) (Set.instUnionSet.{u2} α) (HasCompl.compl.{u2} (Set.{u2} α) (BooleanAlgebra.toHasCompl.{u2} (Set.{u2} α) (Set.instBooleanAlgebraSet.{u2} α)) s) (Set.preimage.{u2, u1} α β f t))
 Case conversion may be inaccurate. Consider using '#align pfun.core_res PFun.core_resₓ'. -/
-theorem core_res (f : α → β) (s : Set α) (t : Set β) : (res f s).core t = sᶜ ∪ f ⁻¹' t :=
-  by
-  ext
-  rw [mem_core_res]
-  by_cases h : x ∈ s <;> simp [h]
+theorem core_res (f : α → β) (s : Set α) (t : Set β) : (res f s).core t = sᶜ ∪ f ⁻¹' t := by ext;
+  rw [mem_core_res]; by_cases h : x ∈ s <;> simp [h]
 #align pfun.core_res PFun.core_res
 
 end
Diff
@@ -390,7 +390,7 @@ def fix (f : α →. Sum β α) : α →. β := fun a =>
     @WellFounded.fixF _ (fun x y => Sum.inr x ∈ f y) _
       (fun a IH =>
         Part.assert (f a).Dom fun hf => by
-          cases' e : (f a).get hf with b a' <;> [exact Part.some b, exact IH _ ⟨hf, e⟩])
+          cases' e : (f a).get hf with b a' <;> [exact Part.some b;exact IH _ ⟨hf, e⟩])
       a h
 #align pfun.fix PFun.fix
 -/
Diff
@@ -213,7 +213,7 @@ theorem coe_val (f : α → β) (a : α) : (f : α →. β) a = Part.some (f a)
 
 /- warning: pfun.dom_coe -> PFun.dom_coe is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u2} α β ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.hasCoe.{u1, u2} α β)))) f)) (Set.univ.{u1} α)
+  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u2} α β ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.coe.{u1, u2} α β)))) f)) (Set.univ.{u1} α)
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β), Eq.{succ u2} (Set.{u2} α) (PFun.Dom.{u2, u1} α β (PFun.lift.{u2, u1} α β f)) (Set.univ.{u2} α)
 Case conversion may be inaccurate. Consider using '#align pfun.dom_coe PFun.dom_coeₓ'. -/
@@ -224,7 +224,7 @@ theorem dom_coe (f : α → β) : (f : α →. β).Dom = Set.univ :=
 
 /- warning: pfun.coe_injective -> PFun.lift_injective is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Function.Injective.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.hasCoe.{u1, u2} α β)))))
+  forall {α : Type.{u1}} {β : Type.{u2}}, Function.Injective.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.coe.{u1, u2} α β)))))
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}}, Function.Injective.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (α -> β) (PFun.{u2, u1} α β) (PFun.lift.{u2, u1} α β)
 Case conversion may be inaccurate. Consider using '#align pfun.coe_injective PFun.lift_injectiveₓ'. -/
@@ -292,7 +292,7 @@ theorem mem_res (f : α → β) (s : Set α) (a : α) (b : β) : b ∈ res f s a
 
 /- warning: pfun.res_univ -> PFun.res_univ is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Eq.{max (succ u1) (succ u2)} (PFun.{u1, u2} α β) (PFun.res.{u1, u2} α β f (Set.univ.{u1} α)) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.hasCoe.{u1, u2} α β)))) f)
+  forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Eq.{max (succ u1) (succ u2)} (PFun.{u1, u2} α β) (PFun.res.{u1, u2} α β f (Set.univ.{u1} α)) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.coe.{u1, u2} α β)))) f)
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β), Eq.{max (succ u2) (succ u1)} (PFun.{u2, u1} α β) (PFun.res.{u2, u1} α β f (Set.univ.{u2} α)) (PFun.lift.{u2, u1} α β f)
 Case conversion may be inaccurate. Consider using '#align pfun.res_univ PFun.res_univₓ'. -/
@@ -371,7 +371,7 @@ theorem pure_defined (p : Set α) (x : β) : p ⊆ (@PFun.pure α _ x).Dom :=
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u2}} (p : Set.{u1} α) {f : PFun.{u1, u2} α β} {g : β -> (PFun.{u1, u2} α γ)}, (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) p (PFun.Dom.{u1, u2} α β f)) -> (forall (x : β), HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) p (PFun.Dom.{u1, u2} α γ (g x))) -> (HasSubset.Subset.{u1} (Set.{u1} α) (Set.hasSubset.{u1} α) p (PFun.Dom.{u1, u2} α γ (Bind.bind.{u2, max u1 u2} (PFun.{u1, u2} α) (Monad.toHasBind.{u2, max u1 u2} (PFun.{u1, u2} α) (PFun.monad.{u1, u2} α)) β γ f g)))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u1}} (p : Set.{u2} α) {f : PFun.{u2, u1} α β} {g : β -> (PFun.{u2, u1} α γ)}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α β f)) -> (forall (x : β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α γ (g x))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α γ (Bind.bind.{u1, max u2 u1} (PFun.{u2, u1} α) (Monad.toBind.{u1, max u2 u1} (PFun.{u2, u1} α) (PFun.instMonadPFun.{u2, u1} α)) β γ f g)))
+  forall {α : Type.{u2}} {β : Type.{u1}} {γ : Type.{u1}} (p : Set.{u2} α) {f : PFun.{u2, u1} α β} {g : β -> (PFun.{u2, u1} α γ)}, (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α β f)) -> (forall (x : β), HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α γ (g x))) -> (HasSubset.Subset.{u2} (Set.{u2} α) (Set.instHasSubsetSet.{u2} α) p (PFun.Dom.{u2, u1} α γ (Bind.bind.{u1, max u2 u1} (PFun.{u2, u1} α) (Monad.toBind.{u1, max u2 u1} (PFun.{u2, u1} α) (PFun.monad.{u2, u1} α)) β γ f g)))
 Case conversion may be inaccurate. Consider using '#align pfun.bind_defined PFun.bind_definedₓ'. -/
 theorem bind_defined {α β γ} (p : Set α) {f : α →. β} {g : β → α →. γ} (H1 : p ⊆ f.Dom)
     (H2 : ∀ x, p ⊆ (g x).Dom) : p ⊆ (f >>= g).Dom := fun a ha =>
@@ -994,7 +994,7 @@ theorem comp_assoc (f : γ →. δ) (g : β →. γ) (h : α →. β) : (f.comp
 
 /- warning: pfun.coe_comp -> PFun.coe_comp is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (g : β -> γ) (f : α -> β), Eq.{max (succ u1) (succ u3)} (PFun.{u1, u3} α γ) ((fun (a : Sort.{max (succ u1) (succ u3)}) (b : Sort.{max (succ u1) (succ u3)}) [self : HasLiftT.{max (succ u1) (succ u3), max (succ u1) (succ u3)} a b] => self.0) (α -> γ) (PFun.{u1, u3} α γ) (HasLiftT.mk.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (CoeTCₓ.coe.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (coeBase.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (PFun.hasCoe.{u1, u3} α γ)))) (Function.comp.{succ u1, succ u2, succ u3} α β γ g f)) (PFun.comp.{u1, u2, u3} α β γ ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u2) (succ u3)} a b] => self.0) (β -> γ) (PFun.{u2, u3} β γ) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (coeBase.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (PFun.hasCoe.{u2, u3} β γ)))) g) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.hasCoe.{u1, u2} α β)))) f))
+  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (g : β -> γ) (f : α -> β), Eq.{max (succ u1) (succ u3)} (PFun.{u1, u3} α γ) ((fun (a : Sort.{max (succ u1) (succ u3)}) (b : Sort.{max (succ u1) (succ u3)}) [self : HasLiftT.{max (succ u1) (succ u3), max (succ u1) (succ u3)} a b] => self.0) (α -> γ) (PFun.{u1, u3} α γ) (HasLiftT.mk.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (CoeTCₓ.coe.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (coeBase.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (α -> γ) (PFun.{u1, u3} α γ) (PFun.coe.{u1, u3} α γ)))) (Function.comp.{succ u1, succ u2, succ u3} α β γ g f)) (PFun.comp.{u1, u2, u3} α β γ ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u2) (succ u3)} a b] => self.0) (β -> γ) (PFun.{u2, u3} β γ) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (coeBase.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (β -> γ) (PFun.{u2, u3} β γ) (PFun.coe.{u2, u3} β γ)))) g) ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ u1) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ u1) (succ u2)} a b] => self.0) (α -> β) (PFun.{u1, u2} α β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (coeBase.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (α -> β) (PFun.{u1, u2} α β) (PFun.coe.{u1, u2} α β)))) f))
 but is expected to have type
   forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} (g : β -> γ) (f : α -> β), Eq.{max (succ u3) (succ u2)} (PFun.{u3, u2} α γ) (PFun.lift.{u3, u2} α γ (Function.comp.{succ u3, succ u1, succ u2} α β γ g f)) (PFun.comp.{u3, u1, u2} α β γ (PFun.lift.{u1, u2} β γ g) (PFun.lift.{u3, u1} α β f))
 Case conversion may be inaccurate. Consider using '#align pfun.coe_comp PFun.coe_compₓ'. -/
@@ -1117,7 +1117,7 @@ theorem mem_prodMap {f : α →. γ} {g : β →. δ} {x : α × β} {y : γ ×
 
 /- warning: pfun.prod_lift_fst_comp_snd_comp -> PFun.prodLift_fst_comp_snd_comp is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (f : PFun.{u1, u3} α γ) (g : PFun.{u2, u4} β δ), Eq.{max (succ (max u1 u2)) (succ (max u3 u4))} (PFun.{max u1 u2, max u3 u4} (Prod.{u1, u2} α β) (Prod.{u3, u4} γ δ)) (PFun.prodLift.{max u1 u2, u3, u4} (Prod.{u1, u2} α β) γ δ (PFun.comp.{max u1 u2, u1, u3} (Prod.{u1, u2} α β) α γ f ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ (max u1 u2)) (succ u1)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} a b] => self.0) ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (coeBase.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (PFun.hasCoe.{max u1 u2, u1} (Prod.{u1, u2} α β) α)))) (Prod.fst.{u1, u2} α β))) (PFun.comp.{max u1 u2, u2, u4} (Prod.{u1, u2} α β) β δ g ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ (max u1 u2)) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} a b] => self.0) ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (coeBase.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (PFun.hasCoe.{max u1 u2, u2} (Prod.{u1, u2} α β) β)))) (Prod.snd.{u1, u2} α β)))) (PFun.prodMap.{u1, u2, u3, u4} α β γ δ f g)
+  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} (f : PFun.{u1, u3} α γ) (g : PFun.{u2, u4} β δ), Eq.{max (succ (max u1 u2)) (succ (max u3 u4))} (PFun.{max u1 u2, max u3 u4} (Prod.{u1, u2} α β) (Prod.{u3, u4} γ δ)) (PFun.prodLift.{max u1 u2, u3, u4} (Prod.{u1, u2} α β) γ δ (PFun.comp.{max u1 u2, u1, u3} (Prod.{u1, u2} α β) α γ f ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ (max u1 u2)) (succ u1)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} a b] => self.0) ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (coeBase.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u1)} ((Prod.{u1, u2} α β) -> α) (PFun.{max u1 u2, u1} (Prod.{u1, u2} α β) α) (PFun.coe.{max u1 u2, u1} (Prod.{u1, u2} α β) α)))) (Prod.fst.{u1, u2} α β))) (PFun.comp.{max u1 u2, u2, u4} (Prod.{u1, u2} α β) β δ g ((fun (a : Sort.{max (succ u1) (succ u2)}) (b : Sort.{max (succ (max u1 u2)) (succ u2)}) [self : HasLiftT.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} a b] => self.0) ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (HasLiftT.mk.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (CoeTCₓ.coe.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (coeBase.{max (succ u1) (succ u2), max (succ (max u1 u2)) (succ u2)} ((Prod.{u1, u2} α β) -> β) (PFun.{max u1 u2, u2} (Prod.{u1, u2} α β) β) (PFun.coe.{max u1 u2, u2} (Prod.{u1, u2} α β) β)))) (Prod.snd.{u1, u2} α β)))) (PFun.prodMap.{u1, u2, u3, u4} α β γ δ f g)
 but is expected to have type
   forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} (f : PFun.{u4, u3} α γ) (g : PFun.{u2, u1} β δ), Eq.{max (max (max (succ u4) (succ u2)) (succ u3)) (succ u1)} (PFun.{max u4 u2, max u1 u3} (Prod.{u4, u2} α β) (Prod.{u3, u1} γ δ)) (PFun.prodLift.{max u4 u2, u3, u1} (Prod.{u4, u2} α β) γ δ (PFun.comp.{max u4 u2, u4, u3} (Prod.{u4, u2} α β) α γ f (PFun.lift.{max u4 u2, u4} (Prod.{u4, u2} α β) α (Prod.fst.{u4, u2} α β))) (PFun.comp.{max u4 u2, u2, u1} (Prod.{u4, u2} α β) β δ g (PFun.lift.{max u4 u2, u2} (Prod.{u4, u2} α β) β (Prod.snd.{u4, u2} α β)))) (PFun.prodMap.{u4, u2, u3, u1} α β γ δ f g)
 Case conversion may be inaccurate. Consider using '#align pfun.prod_lift_fst_comp_snd_comp PFun.prodLift_fst_comp_snd_compₓ'. -/
Diff
@@ -816,13 +816,13 @@ theorem core_eq (f : α →. β) (s : Set β) : f.core s = f.Preimage s ∪ f.Do
     Set.inter_univ, Set.union_eq_self_of_subset_right (f.compl_dom_subset_core s)]
 #align pfun.core_eq PFun.core_eq
 
-/- warning: pfun.preimage_as_subtype -> PFun.preimage_as_subtype is a dubious translation:
+/- warning: pfun.preimage_as_subtype -> PFun.preimage_asSubtype is a dubious translation:
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} (f : PFun.{u1, u2} α β) (s : Set.{u2} β), Eq.{succ u1} (Set.{u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (PFun.Dom.{u1, u2} α β f))) (Set.preimage.{u1, u2} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (PFun.Dom.{u1, u2} α β f)) β (PFun.asSubtype.{u1, u2} α β f) s) (Set.preimage.{u1, u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} α) Type.{u1} (Set.hasCoeToSort.{u1} α) (PFun.Dom.{u1, u2} α β f)) α (Subtype.val.{succ u1} α (fun (x : α) => Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (PFun.Dom.{u1, u2} α β f))) (PFun.preimage.{u1, u2} α β f s))
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (f : PFun.{u2, u1} α β) (s : Set.{u1} β), Eq.{succ u2} (Set.{u2} (Set.Elem.{u2} α (PFun.Dom.{u2, u1} α β f))) (Set.preimage.{u2, u1} (Set.Elem.{u2} α (PFun.Dom.{u2, u1} α β f)) β (PFun.asSubtype.{u2, u1} α β f) s) (Set.preimage.{u2, u2} (Subtype.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.Dom.{u2, u1} α β f))) α (Subtype.val.{succ u2} α (fun (x : α) => Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (PFun.Dom.{u2, u1} α β f))) (PFun.preimage.{u2, u1} α β f s))
-Case conversion may be inaccurate. Consider using '#align pfun.preimage_as_subtype PFun.preimage_as_subtypeₓ'. -/
-theorem preimage_as_subtype (f : α →. β) (s : Set β) :
+Case conversion may be inaccurate. Consider using '#align pfun.preimage_as_subtype PFun.preimage_asSubtypeₓ'. -/
+theorem preimage_asSubtype (f : α →. β) (s : Set β) :
     f.asSubtype ⁻¹' s = Subtype.val ⁻¹' f.Preimage s :=
   by
   ext x
@@ -832,7 +832,7 @@ theorem preimage_as_subtype (f : α →. β) (s : Set β) :
     Iff.intro (fun h => ⟨_, h, Part.get_mem _⟩) fun ⟨y, ys, fxy⟩ =>
       have : f.fn x.val x.property ∈ f x.val := Part.get_mem _
       Part.mem_unique fxy this ▸ ys
-#align pfun.preimage_as_subtype PFun.preimage_as_subtype
+#align pfun.preimage_as_subtype PFun.preimage_asSubtype
 
 #print PFun.toSubtype /-
 /-- Turns a function into a partial function to a subtype. -/
@@ -840,37 +840,37 @@ def toSubtype (p : β → Prop) (f : α → β) : α →. Subtype p := fun a =>
 #align pfun.to_subtype PFun.toSubtype
 -/
 
-/- warning: pfun.dom_to_subtype -> PFun.dom_to_subtype is a dubious translation:
+/- warning: pfun.dom_to_subtype -> PFun.dom_toSubtype is a dubious translation:
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} (p : β -> Prop) (f : α -> β), Eq.{succ u1} (Set.{u1} α) (PFun.Dom.{u1, u2} α (Subtype.{succ u2} β p) (PFun.toSubtype.{u1, u2} α β p f)) (setOf.{u1} α (fun (a : α) => p (f a)))
 but is expected to have type
   forall {α : Type.{u2}} {β : Type.{u1}} (p : β -> Prop) (f : α -> β), Eq.{succ u2} (Set.{u2} α) (PFun.Dom.{u2, u1} α (Subtype.{succ u1} β p) (PFun.toSubtype.{u2, u1} α β p f)) (setOf.{u2} α (fun (a : α) => p (f a)))
-Case conversion may be inaccurate. Consider using '#align pfun.dom_to_subtype PFun.dom_to_subtypeₓ'. -/
+Case conversion may be inaccurate. Consider using '#align pfun.dom_to_subtype PFun.dom_toSubtypeₓ'. -/
 @[simp]
-theorem dom_to_subtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = { a | p (f a) } :=
+theorem dom_toSubtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = { a | p (f a) } :=
   rfl
-#align pfun.dom_to_subtype PFun.dom_to_subtype
+#align pfun.dom_to_subtype PFun.dom_toSubtype
 
-#print PFun.to_subtype_apply /-
+#print PFun.toSubtype_apply /-
 @[simp]
-theorem to_subtype_apply (p : β → Prop) (f : α → β) (a : α) :
+theorem toSubtype_apply (p : β → Prop) (f : α → β) (a : α) :
     toSubtype p f a = ⟨p (f a), Subtype.mk _⟩ :=
   rfl
-#align pfun.to_subtype_apply PFun.to_subtype_apply
+#align pfun.to_subtype_apply PFun.toSubtype_apply
 -/
 
-#print PFun.dom_to_subtype_apply_iff /-
-theorem dom_to_subtype_apply_iff {p : β → Prop} {f : α → β} {a : α} :
+#print PFun.dom_toSubtype_apply_iff /-
+theorem dom_toSubtype_apply_iff {p : β → Prop} {f : α → β} {a : α} :
     (toSubtype p f a).Dom ↔ p (f a) :=
   Iff.rfl
-#align pfun.dom_to_subtype_apply_iff PFun.dom_to_subtype_apply_iff
+#align pfun.dom_to_subtype_apply_iff PFun.dom_toSubtype_apply_iff
 -/
 
-#print PFun.mem_to_subtype_iff /-
-theorem mem_to_subtype_iff {p : β → Prop} {f : α → β} {a : α} {b : Subtype p} :
+#print PFun.mem_toSubtype_iff /-
+theorem mem_toSubtype_iff {p : β → Prop} {f : α → β} {a : α} {b : Subtype p} :
     b ∈ toSubtype p f a ↔ ↑b = f a := by
   rw [to_subtype_apply, Part.mem_mk_iff, exists_subtype_mk_eq_iff, eq_comm]
-#align pfun.mem_to_subtype_iff PFun.mem_to_subtype_iff
+#align pfun.mem_to_subtype_iff PFun.mem_toSubtype_iff
 -/
 
 #print PFun.id /-

Changes in mathlib4

mathlib3
mathlib4
feat: make generalize_proofs handle proofs under binders (#12472)

The generalize_proofs tactic had a bug where it would not generalize proofs that appeared under binders correctly, creating terms with fvars from the wrong context. The tactic has been refactored, and it now abstracts the proofs (universally quantifying all the bound variables that appear in the proof) before lifting them to the local context.

This feature can be controlled with the abstract option. Using generalize_proofs (config := { abstract := false }) turns off proof abstraction and leaves alone those proofs that refer to bound variables.

Other new features:

  • generalize_proofs at h for a let-bound local hypothesis h will clear its value.
  • generalize_proofs at h for a duplicate proposition will eliminate h from the local context.
  • Proofs are recursively generalized for each new local hypothesis. This can be turned off with generalize_proofs (config := { maxDepth := 0 }).
  • generalize_proofs at h will no longer generalize proofs from the goal.
  • The type of the generalized proof is carefully computed by propagating expected types, rather than by using inferType. This gives local hypotheses in more useful forms.

(This PR serves as a followup to this comment.)

Diff
@@ -328,11 +328,9 @@ theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a
 def fixInduction {C : α → Sort*} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') : C a := by
   have h₂ := (Part.mem_assert_iff.1 h).snd
-  -- Porting note: revert/intro trick required to address `generalize_proofs` bug
-  revert h₂
-  generalize_proofs h₁
-  intro h₂; clear h
-  induction' h₁ with a ha IH
+  generalize_proofs at h₂
+  clear h
+  induction' ‹Acc _ _› with a ha IH
   have h : b ∈ f.fix a := Part.mem_assert_iff.2 ⟨⟨a, ha⟩, h₂⟩
   exact H a h fun a' fa' => IH a' fa' (Part.mem_assert_iff.1 (fix_fwd h fa')).snd
 #align pfun.fix_induction PFun.fixInduction
@@ -341,9 +339,8 @@ theorem fixInduction_spec {C : α → Sort*} {f : α →. Sum β α} {b : β} {a
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') :
     @fixInduction _ _ C _ _ _ h H = H a h fun a' h' => fixInduction (fix_fwd h h') H := by
   unfold fixInduction
-  -- Porting note: `generalize` required to address `generalize_proofs` bug
-  generalize @fixInduction.proof_1 α β f b a h = ha
-  induction ha
+  generalize_proofs
+  induction ‹Acc _ _›
   rfl
 #align pfun.fix_induction_spec PFun.fixInduction_spec
 
chore: resolve a few porting notes could not infer motive (#11302)

These are not all; most of these porting notes are still real.

Diff
@@ -369,9 +369,8 @@ theorem fixInduction'_stop {C : α → Sort*} {f : α →. Sum β α} {b : β} {
   unfold fixInduction'
   rw [fixInduction_spec]
   -- Porting note: the explicit motive required because `simp` behaves differently
-  refine' Eq.rec (motive := fun x e =>
-      Sum.casesOn (motive := fun y => (f a).get (dom_of_mem_fix h) = y → C a) x _ _
-      (Eq.trans (Part.get_eq_of_mem fa (dom_of_mem_fix h)) e) = hbase a fa) _
+  refine' Eq.rec (motive := fun x e ↦
+      Sum.casesOn x _ _ (Eq.trans (Part.get_eq_of_mem fa (dom_of_mem_fix h)) e) = hbase a fa) _
     (Part.get_eq_of_mem fa (dom_of_mem_fix h)).symm
   simp
 #align pfun.fix_induction'_stop PFun.fixInduction'_stop
chore(Set/Finset): standardize names of distributivity laws (#11572)

Standardizes the following names for distributivity laws across Finset and Set:

  • inter_union_distrib_left
  • inter_union_distrib_right
  • union_inter_distrib_left
  • union_inter_distrib_right

Makes arguments explicit in:

  • Set.union_inter_distrib_right
  • Set.union_inter_distrib_left
  • Set.inter_union_distrib_right

Deprecates these theorem names:

  • Finset.inter_distrib_left
  • Finset.inter_distrib_right
  • Finset.union_distrib_right
  • Finset.union_distrib_left
  • Set.inter_distrib_left
  • Set.inter_distrib_right
  • Set.union_distrib_right
  • Set.union_distrib_left

Fixes use of deprecated names and implicit arguments in these files:

  • Topology/Basic
  • Topology/Connected/Basic
  • MeasureTheory/MeasurableSpace/Basic
  • MeasureTheory/Covering/Differentiation
  • MeasureTheory/Constructions/BorelSpace/Basic
  • Data/Set/Image
  • Data/Set/Basic
  • Data/PFun
  • Data/Matroid/Dual
  • Data/Finset/Sups
  • Data/Finset/Basic
  • Combinatorics/SetFamily/FourFunctions
  • Combinatorics/Additive/SalemSpencer
  • Counterexamples/Phillips.lean
  • Archive/Imo/Imo2021Q1.lean
Diff
@@ -516,7 +516,7 @@ theorem preimage_eq (f : α →. β) (s : Set β) : f.preimage s = f.core s ∩
 #align pfun.preimage_eq PFun.preimage_eq
 
 theorem core_eq (f : α →. β) (s : Set β) : f.core s = f.preimage s ∪ f.Domᶜ := by
-  rw [preimage_eq, Set.union_distrib_right, Set.union_comm (Dom f), Set.compl_union_self,
+  rw [preimage_eq, Set.inter_union_distrib_right, Set.union_comm (Dom f), Set.compl_union_self,
     Set.inter_univ, Set.union_eq_self_of_subset_right (f.compl_dom_subset_core s)]
 #align pfun.core_eq PFun.core_eq
 
chore: replace λ by fun (#11301)

Per the style guidelines, λ is disallowed in mathlib. This is close to exhaustive; I left some tactic code alone when it seemed to me that tactic could be upstreamed soon.

Notes

  • In lines I was modifying anyway, I also converted => to .
  • Also contains some mild in-passing indentation fixes in Mathlib/Order/SupClosed.
  • Some doc comments still contained Lean 3 syntax λ x, , which I also replaced.
Diff
@@ -695,16 +695,16 @@ theorem prodLift_fst_comp_snd_comp (f : α →. γ) (g : β →. δ) :
 
 @[simp]
 theorem prodMap_id_id : (PFun.id α).prodMap (PFun.id β) = PFun.id _ :=
-  ext fun _ _ => by simp [eq_comm]
+  ext fun _ _ ↦ by simp [eq_comm]
 #align pfun.prod_map_id_id PFun.prodMap_id_id
 
 @[simp]
 theorem prodMap_comp_comp (f₁ : α →. β) (f₂ : β →. γ) (g₁ : δ →. ε) (g₂ : ε →. ι) :
     (f₂.comp f₁).prodMap (g₂.comp g₁) = (f₂.prodMap g₂).comp (f₁.prodMap g₁) := -- by
-  -- Porting note: was `by tidy`, below is a golf'd version of the `tidy?` proof
-  ext <| λ ⟨_, _⟩ ⟨_, _⟩ =>
-  ⟨λ ⟨⟨⟨h1l1, h1l2⟩, ⟨h1r1, h1r2⟩⟩, h2⟩ => ⟨⟨⟨h1l1, h1r1⟩, ⟨h1l2, h1r2⟩⟩, h2⟩,
-   λ ⟨⟨⟨h1l1, h1r1⟩, ⟨h1l2, h1r2⟩⟩, h2⟩ => ⟨⟨⟨h1l1, h1l2⟩, ⟨h1r1, h1r2⟩⟩, h2⟩⟩
+  -- Porting note: was `by tidy`, below is a golfed version of the `tidy?` proof
+  ext <| fun ⟨_, _⟩ ⟨_, _⟩ ↦
+  ⟨fun ⟨⟨⟨h1l1, h1l2⟩, ⟨h1r1, h1r2⟩⟩, h2⟩ ↦ ⟨⟨⟨h1l1, h1r1⟩, ⟨h1l2, h1r2⟩⟩, h2⟩,
+   fun ⟨⟨⟨h1l1, h1r1⟩, ⟨h1l2, h1r2⟩⟩, h2⟩ ↦ ⟨⟨⟨h1l1, h1l2⟩, ⟨h1r1, h1r2⟩⟩, h2⟩⟩
 #align pfun.prod_map_comp_comp PFun.prodMap_comp_comp
 
 end PFun
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -487,7 +487,7 @@ theorem mem_core_res (f : α → β) (s : Set α) (t : Set β) (x : α) :
 
 section
 
-open Classical
+open scoped Classical
 
 theorem core_res (f : α → β) (s : Set α) (t : Set β) : (res f s).core t = sᶜ ∪ f ⁻¹' t := by
   ext x
chore: uneven spacing for ⟨ ⟩ (#10014)

This cleans up instances of

⟨ foo, bar⟩

and

⟨foo, bar ⟩

where spaces a on the inside one side, but not on the other side. Fixing this by removing the extra space.

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

Diff
@@ -123,7 +123,7 @@ def asSubtype (f : α →. β) (s : f.Dom) : β :=
 the type of pairs `(p : α → Prop, f : Subtype p → β)`. -/
 def equivSubtype : (α →. β) ≃ Σp : α → Prop, Subtype p → β :=
   ⟨fun f => ⟨fun a => (f a).Dom, asSubtype f⟩, fun f x => ⟨f.1 x, fun h => f.2 ⟨x, h⟩⟩, fun f =>
-    funext fun a => Part.eta _, fun ⟨p, f⟩ => by dsimp; congr ⟩
+    funext fun a => Part.eta _, fun ⟨p, f⟩ => by dsimp; congr⟩
 #align pfun.equiv_subtype PFun.equivSubtype
 
 theorem asSubtype_eq_of_mem {f : α →. β} {x : α} {y : β} (fxy : y ∈ f x) (domx : x ∈ f.Dom) :
chore(*): replace $ with <| (#9319)

See Zulip thread for the discussion.

Diff
@@ -702,7 +702,7 @@ theorem prodMap_id_id : (PFun.id α).prodMap (PFun.id β) = PFun.id _ :=
 theorem prodMap_comp_comp (f₁ : α →. β) (f₂ : β →. γ) (g₁ : δ →. ε) (g₂ : ε →. ι) :
     (f₂.comp f₁).prodMap (g₂.comp g₁) = (f₂.prodMap g₂).comp (f₁.prodMap g₁) := -- by
   -- Porting note: was `by tidy`, below is a golf'd version of the `tidy?` proof
-  ext $ λ ⟨_, _⟩ ⟨_, _⟩ =>
+  ext <| λ ⟨_, _⟩ ⟨_, _⟩ =>
   ⟨λ ⟨⟨⟨h1l1, h1l2⟩, ⟨h1r1, h1r2⟩⟩, h2⟩ => ⟨⟨⟨h1l1, h1r1⟩, ⟨h1l2, h1r2⟩⟩, h2⟩,
    λ ⟨⟨⟨h1l1, h1r1⟩, ⟨h1l2, h1r2⟩⟩, h2⟩ => ⟨⟨⟨h1l1, h1l2⟩, ⟨h1r1, h1r2⟩⟩, h2⟩⟩
 #align pfun.prod_map_comp_comp PFun.prodMap_comp_comp
chore(*): drop $/<| before fun (#9361)

Subset of #9319

Diff
@@ -248,10 +248,10 @@ case `f.fix a` returns `f a`), or it is undefined (in which case `f.fix a` is un
 it is in the `α` part of `β ⊕ α` (in which case we repeat the procedure, so `f.fix a` will return
 `f.fix (f a)`). -/
 def fix (f : α →. Sum β α) : α →. β := fun a =>
-  Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) $ fun h =>
+  Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
     WellFounded.fixF
       (fun a IH =>
-        Part.assert (f a).Dom $ fun hf =>
+        Part.assert (f a).Dom fun hf =>
           match e : (f a).get hf with
           | Sum.inl b => Part.some b
           | Sum.inr a' => IH a' ⟨hf, e⟩)
chore: move to v4.5.0-rc1, and merge changes from bump/v4.5.0 branch. (#9188)

This PR:

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

Diff
@@ -342,7 +342,7 @@ theorem fixInduction_spec {C : α → Sort*} {f : α →. Sum β α} {b : β} {a
     @fixInduction _ _ C _ _ _ h H = H a h fun a' h' => fixInduction (fix_fwd h h') H := by
   unfold fixInduction
   -- Porting note: `generalize` required to address `generalize_proofs` bug
-  generalize (Part.mem_assert_iff.1 h).fst = ha
+  generalize @fixInduction.proof_1 α β f b a h = ha
   induction ha
   rfl
 #align pfun.fix_induction_spec PFun.fixInduction_spec
chore: remove nonterminal simp (#7580)

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

Diff
@@ -274,7 +274,7 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     next e => simp only [Part.mem_some_iff] at h₃; subst b; exact Or.inl ⟨h₂, e⟩
     next e => exact Or.inr ⟨_, ⟨_, e⟩, Part.mem_assert _ h₃⟩,
    fun h => by
-    simp [fix]
+    simp only [fix, Part.mem_assert_iff]
     rcases h with (⟨h₁, h₂⟩ | ⟨a', h, h₃⟩)
     · refine' ⟨⟨_, fun y h' => _⟩, _⟩
       · injection Part.mem_unique ⟨h₁, h₂⟩ h'
chore: tidy various files (#7017)
Diff
@@ -268,10 +268,10 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
   ⟨fun h => by
     let ⟨h₁, h₂⟩ := Part.mem_assert_iff.1 h
     rw [WellFounded.fixFEq] at h₂
-    simp at h₂
+    simp only [Part.mem_assert_iff] at h₂
     cases' h₂ with h₂ h₃
     split at h₃
-    next e => simp at h₃; subst b; refine' Or.inl ⟨h₂, e⟩
+    next e => simp only [Part.mem_some_iff] at h₃; subst b; exact Or.inl ⟨h₂, e⟩
     next e => exact Or.inr ⟨_, ⟨_, e⟩, Part.mem_assert _ h₃⟩,
    fun h => by
     simp [fix]
chore: remove unused simps (#6632)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -270,8 +270,8 @@ theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
     rw [WellFounded.fixFEq] at h₂
     simp at h₂
     cases' h₂ with h₂ h₃
-    split at h₃ <;> simp at h₃
-    next e => subst b; refine' Or.inl ⟨h₂, e⟩
+    split at h₃
+    next e => simp at h₃; subst b; refine' Or.inl ⟨h₂, e⟩
     next e => exact Or.inr ⟨_, ⟨_, e⟩, Part.mem_assert _ h₃⟩,
    fun h => by
     simp [fix]
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
@@ -56,7 +56,7 @@ open Function
 
 /-- `PFun α β`, or `α →. β`, is the type of partial functions from
   `α` to `β`. It is defined as `α → Part β`. -/
-def PFun (α β : Type _) :=
+def PFun (α β : Type*) :=
   α → Part β
 #align pfun PFun
 
@@ -65,7 +65,7 @@ infixr:25 " →. " => PFun
 
 namespace PFun
 
-variable {α β γ δ ε ι : Type _}
+variable {α β γ δ ε ι : Type*}
 
 instance inhabited : Inhabited (α →. β) :=
   ⟨fun _ => Part.none⟩
@@ -325,7 +325,7 @@ theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a
 
 /-- A recursion principle for `PFun.fix`. -/
 @[elab_as_elim]
-def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
+def fixInduction {C : α → Sort*} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') : C a := by
   have h₂ := (Part.mem_assert_iff.1 h).snd
   -- Porting note: revert/intro trick required to address `generalize_proofs` bug
@@ -337,7 +337,7 @@ def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (
   exact H a h fun a' fa' => IH a' fa' (Part.mem_assert_iff.1 (fix_fwd h fa')).snd
 #align pfun.fix_induction PFun.fixInduction
 
-theorem fixInduction_spec {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
+theorem fixInduction_spec {C : α → Sort*} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') :
     @fixInduction _ _ C _ _ _ h H = H a h fun a' h' => fixInduction (fix_fwd h h') H := by
   unfold fixInduction
@@ -351,7 +351,7 @@ theorem fixInduction_spec {C : α → Sort _} {f : α →. Sum β α} {b : β} {
 `a` given that `f a` inherits `P` from `a` and `P` holds for preimages of `b`.
 -/
 @[elab_as_elim]
-def fixInduction' {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α}
+def fixInduction' {C : α → Sort*} {f : α →. Sum β α} {b : β} {a : α}
     (h : b ∈ f.fix a) (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
     (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) : C a := by
   refine' fixInduction h fun a' h ih => _
@@ -362,7 +362,7 @@ def fixInduction' {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α}
   · exact hind _ _ (fix_fwd h e) e (ih _ e)
 #align pfun.fix_induction' PFun.fixInduction'
 
-theorem fixInduction'_stop {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
+theorem fixInduction'_stop {C : α → Sort*} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (fa : Sum.inl b ∈ f a) (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
     (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) :
     @fixInduction' _ _ C _ _ _ h hbase hind = hbase a fa := by
@@ -376,7 +376,7 @@ theorem fixInduction'_stop {C : α → Sort _} {f : α →. Sum β α} {b : β}
   simp
 #align pfun.fix_induction'_stop PFun.fixInduction'_stop
 
-theorem fixInduction'_fwd {C : α → Sort _} {f : α →. Sum β α} {b : β} {a a' : α} (h : b ∈ f.fix a)
+theorem fixInduction'_fwd {C : α → Sort*} {f : α →. Sum β α} {b : β} {a a' : α} (h : b ∈ f.fix a)
     (h' : b ∈ f.fix a') (fa : Sum.inr a' ∈ f a)
     (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
     (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) :
@@ -557,12 +557,12 @@ theorem mem_toSubtype_iff {p : β → Prop} {f : α → β} {a : α} {b : Subtyp
 #align pfun.mem_to_subtype_iff PFun.mem_toSubtype_iff
 
 /-- The identity as a partial function -/
-protected def id (α : Type _) : α →. α :=
+protected def id (α : Type*) : α →. α :=
   Part.some
 #align pfun.id PFun.id
 
 @[simp]
-theorem coe_id (α : Type _) : ((id : α → α) : α →. α) = PFun.id α :=
+theorem coe_id (α : Type*) : ((id : α → α) : α →. α) = PFun.id α :=
   rfl
 #align pfun.coe_id PFun.coe_id
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2017 Mario Carneiro. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Mario Carneiro, Jeremy Avigad, Simon Hudon
-
-! This file was ported from Lean 3 source module data.pfun
-! leanprover-community/mathlib commit 207cfac9fcd06138865b5d04f7091e46d9320432
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Part
 import Mathlib.Data.Rel
 
+#align_import data.pfun from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
+
 /-!
 # Partial functions
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

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

Diff
@@ -63,7 +63,7 @@ def PFun (α β : Type _) :=
   α → Part β
 #align pfun PFun
 
-/-- `α  →. β` is notation for the type `PFun α β` of partial functions from `α` to `β`.  -/
+/-- `α →. β` is notation for the type `PFun α β` of partial functions from `α` to `β`.  -/
 infixr:25 " →. " => PFun
 
 namespace PFun
chore: remove a few superfluous semicolons (#5880)

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

Diff
@@ -330,10 +330,10 @@ theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a
 @[elab_as_elim]
 def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') : C a := by
-  have h₂ := (Part.mem_assert_iff.1 h).snd;
+  have h₂ := (Part.mem_assert_iff.1 h).snd
   -- Porting note: revert/intro trick required to address `generalize_proofs` bug
   revert h₂
-  generalize_proofs h₁;
+  generalize_proofs h₁
   intro h₂; clear h
   induction' h₁ with a ha IH
   have h : b ∈ f.fix a := Part.mem_assert_iff.2 ⟨⟨a, ha⟩, h₂⟩
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -126,7 +126,7 @@ def asSubtype (f : α →. β) (s : f.Dom) : β :=
 the type of pairs `(p : α → Prop, f : Subtype p → β)`. -/
 def equivSubtype : (α →. β) ≃ Σp : α → Prop, Subtype p → β :=
   ⟨fun f => ⟨fun a => (f a).Dom, asSubtype f⟩, fun f x => ⟨f.1 x, fun h => f.2 ⟨x, h⟩⟩, fun f =>
-    funext fun a => Part.eta _, fun ⟨p, f⟩ => by dsimp ; congr ⟩
+    funext fun a => Part.eta _, fun ⟨p, f⟩ => by dsimp; congr ⟩
 #align pfun.equiv_subtype PFun.equivSubtype
 
 theorem asSubtype_eq_of_mem {f : α →. β} {x : α} {y : β} (fxy : y ∈ f x) (domx : x ∈ f.Dom) :
@@ -230,7 +230,7 @@ instance monad : Monad (PFun α) where
 
 instance lawfulMonad : LawfulMonad (PFun α) := LawfulMonad.mk'
   (bind_pure_comp := fun f x => funext fun a => Part.bind_some_eq_map _ _)
-  (id_map := fun f => by funext a ; dsimp [Functor.map, PFun.map] ; cases f a; rfl)
+  (id_map := fun f => by funext a; dsimp [Functor.map, PFun.map]; cases f a; rfl)
   (pure_bind := fun x f => funext fun a => Part.bind_some _ (f x))
   (bind_assoc := fun f g k => funext fun a => (f a).bind_assoc (fun b => g b a) fun b => k b a)
 #align pfun.is_lawful_monad PFun.lawfulMonad
@@ -263,7 +263,7 @@ def fix (f : α →. Sum β α) : α →. β := fun a =>
 
 theorem dom_of_mem_fix {f : α →. Sum β α} {a : α} {b : β} (h : b ∈ f.fix a) : (f a).Dom := by
   let ⟨h₁, h₂⟩ := Part.mem_assert_iff.1 h
-  rw [WellFounded.fixFEq] at h₂ ; exact h₂.fst.fst
+  rw [WellFounded.fixFEq] at h₂; exact h₂.fst.fst
 #align pfun.dom_of_mem_fix PFun.dom_of_mem_fix
 
 theorem mem_fix_iff {f : α →. Sum β α} {a : α} {b : β} :
@@ -451,10 +451,10 @@ theorem preimage_union (s t : Set β) : f.preimage (s ∪ t) = f.preimage s ∪
   Rel.preimage_union _ s t
 #align pfun.preimage_union PFun.preimage_union
 
-theorem preimage_univ : f.preimage Set.univ = f.Dom := by ext ; simp [mem_preimage, mem_dom]
+theorem preimage_univ : f.preimage Set.univ = f.Dom := by ext; simp [mem_preimage, mem_dom]
 #align pfun.preimage_univ PFun.preimage_univ
 
-theorem coe_preimage (f : α → β) (s : Set β) : (f : α →. β).preimage s = f ⁻¹' s := by ext ; simp
+theorem coe_preimage (f : α → β) (s : Set β) : (f : α →. β).preimage s = f ⁻¹' s := by ext; simp
 #align pfun.coe_preimage PFun.coe_preimage
 
 /-- Core of a set `s : Set β` with respect to a partial function `f : α →. β`. Set of all `a : α`
@@ -501,7 +501,7 @@ theorem core_res (f : α → β) (s : Set α) (t : Set β) : (res f s).core t =
 end
 
 theorem core_restrict (f : α → β) (s : Set β) : (f : α →. β).core s = s.preimage f := by
-  ext x ; simp [core_def]
+  ext x; simp [core_def]
 #align pfun.core_restrict PFun.core_restrict
 
 theorem preimage_subset_core (f : α →. β) (s : Set β) : f.preimage s ⊆ f.core s :=
chore: fix typos (#4518)

I ran codespell Mathlib and got tired halfway through the suggestions.

Diff
@@ -704,7 +704,7 @@ theorem prodMap_id_id : (PFun.id α).prodMap (PFun.id β) = PFun.id _ :=
 @[simp]
 theorem prodMap_comp_comp (f₁ : α →. β) (f₂ : β →. γ) (g₁ : δ →. ε) (g₂ : ε →. ι) :
     (f₂.comp f₁).prodMap (g₂.comp g₁) = (f₂.prodMap g₂).comp (f₁.prodMap g₁) := -- by
-  -- Porting note: was `by tidy`, below is a golf'd verson of the `tidy?` proof
+  -- Porting note: was `by tidy`, below is a golf'd version of the `tidy?` proof
   ext $ λ ⟨_, _⟩ ⟨_, _⟩ =>
   ⟨λ ⟨⟨⟨h1l1, h1l2⟩, ⟨h1r1, h1r2⟩⟩, h2⟩ => ⟨⟨⟨h1l1, h1r1⟩, ⟨h1l2, h1r2⟩⟩, h2⟩,
    λ ⟨⟨⟨h1l1, h1r1⟩, ⟨h1l2, h1r2⟩⟩, h2⟩ => ⟨⟨⟨h1l1, h1l2⟩, ⟨h1r1, h1r2⟩⟩, h2⟩⟩
chore: fix upper/lowercase in comments (#4360)
  • Run a non-interactive version of fix-comments.py on all files.
  • Go through the diff and manually add/discard/edit chunks.
Diff
@@ -58,7 +58,7 @@ Monad operations:
 open Function
 
 /-- `PFun α β`, or `α →. β`, is the type of partial functions from
-  `α` to `β`. It is defined as `α → part β`. -/
+  `α` to `β`. It is defined as `α → Part β`. -/
 def PFun (α β : Type _) :=
   α → Part β
 #align pfun PFun
@@ -123,7 +123,7 @@ def asSubtype (f : α →. β) (s : f.Dom) : β :=
 #align pfun.as_subtype PFun.asSubtype
 
 /-- The type of partial functions `α →. β` is equivalent to
-the type of pairs `(p : α → Prop, f : subtype p → β)`. -/
+the type of pairs `(p : α → Prop, f : Subtype p → β)`. -/
 def equivSubtype : (α →. β) ≃ Σp : α → Prop, Subtype p → β :=
   ⟨fun f => ⟨fun a => (f a).Dom, asSubtype f⟩, fun f x => ⟨f.1 x, fun h => f.2 ⟨x, h⟩⟩, fun f =>
     funext fun a => Part.eta _, fun ⟨p, f⟩ => by dsimp ; congr ⟩
@@ -457,7 +457,7 @@ theorem preimage_univ : f.preimage Set.univ = f.Dom := by ext ; simp [mem_preima
 theorem coe_preimage (f : α → β) (s : Set β) : (f : α →. β).preimage s = f ⁻¹' s := by ext ; simp
 #align pfun.coe_preimage PFun.coe_preimage
 
-/-- Core of a set `s : set β` with respect to a partial function `f : α →. β`. Set of all `a : α`
+/-- Core of a set `s : Set β` with respect to a partial function `f : α →. β`. Set of all `a : α`
 such that `f a ∈ s`, if `f a` is defined. -/
 def core (s : Set β) : Set α :=
   f.graph'.core s
Diff
@@ -596,7 +596,7 @@ theorem comp_id (f : α →. β) : f.comp (PFun.id α) = f :=
 @[simp]
 theorem dom_comp (f : β →. γ) (g : α →. β) : (f.comp g).Dom = g.preimage f.Dom := by
   ext
-  simp_rw [mem_preimage, mem_dom, comp_apply, Part.mem_bind_iff, exists_prop, ← exists_and_right]
+  simp_rw [mem_preimage, mem_dom, comp_apply, Part.mem_bind_iff, ← exists_and_right]
   rw [exists_comm]
   simp_rw [and_comm]
 #align pfun.dom_comp PFun.dom_comp
@@ -605,8 +605,7 @@ theorem dom_comp (f : β →. γ) (g : α →. β) : (f.comp g).Dom = g.preimage
 theorem preimage_comp (f : β →. γ) (g : α →. β) (s : Set γ) :
     (f.comp g).preimage s = g.preimage (f.preimage s) := by
   ext
-  simp_rw [mem_preimage, comp_apply, Part.mem_bind_iff, exists_prop, ← exists_and_right, ←
-    exists_and_left]
+  simp_rw [mem_preimage, comp_apply, Part.mem_bind_iff, ← exists_and_right, ← exists_and_left]
   rw [exists_comm]
   simp_rw [and_assoc, and_comm]
 #align pfun.preimage_comp PFun.preimage_comp
@@ -615,8 +614,7 @@ theorem preimage_comp (f : β →. γ) (g : α →. β) (s : Set γ) :
 theorem Part.bind_comp (f : β →. γ) (g : α →. β) (a : Part α) :
     a.bind (f.comp g) = (a.bind g).bind f := by
   ext c
-  simp_rw [Part.mem_bind_iff, comp_apply, Part.mem_bind_iff, exists_prop, ← exists_and_right, ←
-    exists_and_left]
+  simp_rw [Part.mem_bind_iff, comp_apply, Part.mem_bind_iff, ← exists_and_right, ← exists_and_left]
   rw [exists_comm]
   simp_rw [and_assoc]
 #align part.bind_comp PFun.Part.bind_comp
feat: make Acc.rec and many related defs computable (#3535)

Lean 4 code generator has had no native supports for Acc.rec. This PR makes Acc.rec computable. This change makes many defs computable. Especially, computable PFun.fix and Part.hasFix enables us to reason about partial functions. This PR also renames some instances and gives PFun.lift @[coe] attr.

Diff
@@ -70,8 +70,9 @@ namespace PFun
 
 variable {α β γ δ ε ι : Type _}
 
-instance : Inhabited (α →. β) :=
+instance inhabited : Inhabited (α →. β) :=
   ⟨fun _ => Part.none⟩
+#align pfun.inhabited PFun.inhabited
 
 /-- The domain of a partial function -/
 def Dom (f : α →. β) : Set α :=
@@ -134,11 +135,13 @@ theorem asSubtype_eq_of_mem {f : α →. β} {x : α} {y : β} (fxy : y ∈ f x)
 #align pfun.as_subtype_eq_of_mem PFun.asSubtype_eq_of_mem
 
 /-- Turn a total function into a partial function. -/
+@[coe]
 protected def lift (f : α → β) : α →. β := fun a => Part.some (f a)
 #align pfun.lift PFun.lift
 
-instance : Coe (α → β) (α →. β) :=
+instance coe : Coe (α → β) (α →. β) :=
   ⟨PFun.lift⟩
+#align pfun.has_coe PFun.coe
 
 @[simp]
 theorem coe_val (f : α → β) (a : α) : (f : α →. β) a = Part.some (f a) :=
@@ -219,16 +222,18 @@ theorem bind_apply (f : α →. β) (g : β → α →. γ) (a : α) : f.bind g
 def map (f : β → γ) (g : α →. β) : α →. γ := fun a => (g a).map f
 #align pfun.map PFun.map
 
-instance : Monad (PFun α) where
+instance monad : Monad (PFun α) where
   pure := PFun.pure
   bind := PFun.bind
   map := PFun.map
+#align pfun.monad PFun.monad
 
-instance : LawfulMonad (PFun α) := LawfulMonad.mk'
+instance lawfulMonad : LawfulMonad (PFun α) := LawfulMonad.mk'
   (bind_pure_comp := fun f x => funext fun a => Part.bind_some_eq_map _ _)
   (id_map := fun f => by funext a ; dsimp [Functor.map, PFun.map] ; cases f a; rfl)
   (pure_bind := fun x f => funext fun a => Part.bind_some _ (f x))
   (bind_assoc := fun f g k => funext fun a => (f a).bind_assoc (fun b => g b a) fun b => k b a)
+#align pfun.is_lawful_monad PFun.lawfulMonad
 
 theorem pure_defined (p : Set α) (x : β) : p ⊆ (@PFun.pure α _ x).Dom :=
   p.subset_univ
@@ -245,8 +250,7 @@ exists. By abusing notation to illustrate, either `f a` is in the `β` part of `
 case `f.fix a` returns `f a`), or it is undefined (in which case `f.fix a` is undefined as well), or
 it is in the `α` part of `β ⊕ α` (in which case we repeat the procedure, so `f.fix a` will return
 `f.fix (f a)`). -/
--- Porting note: had to mark `noncomputable`
-noncomputable def fix (f : α →. Sum β α) : α →. β := fun a =>
+def fix (f : α →. Sum β α) : α →. β := fun a =>
   Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) $ fun h =>
     WellFounded.fixF
       (fun a IH =>
@@ -323,9 +327,8 @@ theorem fix_fwd {f : α →. Sum β α} {b : β} {a a' : α} (hb : b ∈ f.fix a
 #align pfun.fix_fwd PFun.fix_fwd
 
 /-- A recursion principle for `PFun.fix`. -/
--- Porting note: had to add `noncomputable`
 @[elab_as_elim]
-noncomputable def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
+def fixInduction {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α} (h : b ∈ f.fix a)
     (H : ∀ a', b ∈ f.fix a' → (∀ a'', Sum.inr a'' ∈ f a' → C a'') → C a') : C a := by
   have h₂ := (Part.mem_assert_iff.1 h).snd;
   -- Porting note: revert/intro trick required to address `generalize_proofs` bug
@@ -351,7 +354,7 @@ theorem fixInduction_spec {C : α → Sort _} {f : α →. Sum β α} {b : β} {
 `a` given that `f a` inherits `P` from `a` and `P` holds for preimages of `b`.
 -/
 @[elab_as_elim]
-noncomputable def fixInduction' {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α}
+def fixInduction' {C : α → Sort _} {f : α →. Sum β α} {b : β} {a : α}
     (h : b ∈ f.fix a) (hbase : ∀ a_final : α, Sum.inl b ∈ f a_final → C a_final)
     (hind : ∀ a₀ a₁ : α, b ∈ f.fix a₁ → Sum.inr a₁ ∈ f a₀ → C a₁ → C a₀) : C a := by
   refine' fixInduction h fun a' h ih => _
chore: tidy various files (#3124)
Diff
@@ -63,7 +63,6 @@ def PFun (α β : Type _) :=
   α → Part β
 #align pfun PFun
 
--- mathport name: «expr →. »
 /-- `α  →. β` is notation for the type `PFun α β` of partial functions from `α` to `β`.  -/
 infixr:25 " →. " => PFun
 
@@ -207,7 +206,7 @@ theorem lift_graph {f : α → β} {a b} : (a, b) ∈ (f : α →. β).graph ↔
 protected def pure (x : β) : α →. β := fun _ => Part.some x
 #align pfun.pure PFun.pure
 
-/-- The monad `bind` function, pointwise `part.bind` -/
+/-- The monad `bind` function, pointwise `Part.bind` -/
 def bind (f : α →. β) (g : β → α →. γ) : α →. γ := fun a => (f a).bind fun b => g b a
 #align pfun.bind PFun.bind
 
@@ -216,14 +215,14 @@ theorem bind_apply (f : α →. β) (g : β → α →. γ) (a : α) : f.bind g
   rfl
 #align pfun.bind_apply PFun.bind_apply
 
-/-- The monad `map` function, pointwise `part.map` -/
+/-- The monad `map` function, pointwise `Part.map` -/
 def map (f : β → γ) (g : α →. β) : α →. γ := fun a => (g a).map f
 #align pfun.map PFun.map
 
 instance : Monad (PFun α) where
-  pure := @PFun.pure _
-  bind := @PFun.bind _
-  map := @PFun.map _
+  pure := PFun.pure
+  bind := PFun.bind
+  map := PFun.map
 
 instance : LawfulMonad (PFun α) := LawfulMonad.mk'
   (bind_pure_comp := fun f x => funext fun a => Part.bind_some_eq_map _ _)
@@ -249,7 +248,7 @@ it is in the `α` part of `β ⊕ α` (in which case we repeat the procedure, so
 -- Porting note: had to mark `noncomputable`
 noncomputable def fix (f : α →. Sum β α) : α →. β := fun a =>
   Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) $ fun h =>
-    @WellFounded.fixF _ (fun x y => Sum.inr x ∈ f y) _
+    WellFounded.fixF
       (fun a IH =>
         Part.assert (f a).Dom $ fun hf =>
           match e : (f a).get hf with
@@ -521,7 +520,7 @@ theorem core_eq (f : α →. β) (s : Set β) : f.core s = f.preimage s ∪ f.Do
     Set.inter_univ, Set.union_eq_self_of_subset_right (f.compl_dom_subset_core s)]
 #align pfun.core_eq PFun.core_eq
 
-theorem preimage_as_subtype (f : α →. β) (s : Set β) :
+theorem preimage_asSubtype (f : α →. β) (s : Set β) :
     f.asSubtype ⁻¹' s = Subtype.val ⁻¹' f.preimage s := by
   ext x
   simp only [Set.mem_preimage, Set.mem_setOf_eq, PFun.asSubtype, PFun.mem_preimage]
@@ -530,32 +529,32 @@ theorem preimage_as_subtype (f : α →. β) (s : Set β) :
     Iff.intro (fun h => ⟨_, h, Part.get_mem _⟩) fun ⟨y, ys, fxy⟩ =>
       have : f.fn x.val x.property ∈ f x.val := Part.get_mem _
       Part.mem_unique fxy this ▸ ys
-#align pfun.preimage_as_subtype PFun.preimage_as_subtype
+#align pfun.preimage_as_subtype PFun.preimage_asSubtype
 
 /-- Turns a function into a partial function to a subtype. -/
 def toSubtype (p : β → Prop) (f : α → β) : α →. Subtype p := fun a => ⟨p (f a), Subtype.mk _⟩
 #align pfun.to_subtype PFun.toSubtype
 
 @[simp]
-theorem dom_to_subtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = { a | p (f a) } :=
+theorem dom_toSubtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = { a | p (f a) } :=
   rfl
-#align pfun.dom_to_subtype PFun.dom_to_subtype
+#align pfun.dom_to_subtype PFun.dom_toSubtype
 
 @[simp]
-theorem to_subtype_apply (p : β → Prop) (f : α → β) (a : α) :
+theorem toSubtype_apply (p : β → Prop) (f : α → β) (a : α) :
     toSubtype p f a = ⟨p (f a), Subtype.mk _⟩ :=
   rfl
-#align pfun.to_subtype_apply PFun.to_subtype_apply
+#align pfun.to_subtype_apply PFun.toSubtype_apply
 
-theorem dom_to_subtype_apply_iff {p : β → Prop} {f : α → β} {a : α} :
+theorem dom_toSubtype_apply_iff {p : β → Prop} {f : α → β} {a : α} :
     (toSubtype p f a).Dom ↔ p (f a) :=
   Iff.rfl
-#align pfun.dom_to_subtype_apply_iff PFun.dom_to_subtype_apply_iff
+#align pfun.dom_to_subtype_apply_iff PFun.dom_toSubtype_apply_iff
 
-theorem mem_to_subtype_iff {p : β → Prop} {f : α → β} {a : α} {b : Subtype p} :
+theorem mem_toSubtype_iff {p : β → Prop} {f : α → β} {a : α} {b : Subtype p} :
     b ∈ toSubtype p f a ↔ ↑b = f a := by
-  rw [to_subtype_apply, Part.mem_mk_iff, exists_subtype_mk_eq_iff, eq_comm]
-#align pfun.mem_to_subtype_iff PFun.mem_to_subtype_iff
+  rw [toSubtype_apply, Part.mem_mk_iff, exists_subtype_mk_eq_iff, eq_comm]
+#align pfun.mem_to_subtype_iff PFun.mem_toSubtype_iff
 
 /-- The identity as a partial function -/
 protected def id (α : Type _) : α →. α :=
feat: port data.pfun (#1179)

Port of data.pfun

Co-authored-by: Antoine Labelle <antoinelab01@gmail.com> Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Dependencies 59

60 files ported (100.0%)
32951 lines ported (100.0%)

All dependencies are ported!