logic.equiv.optionMathlib.Logic.Equiv.Option

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -89,7 +89,7 @@ private def remove_none_aux (x : α) : β :=
       show (e none).isSome by
         rw [← Option.ne_none_iff_isSome]
         intro hn
-        rw [Option.not_isSome_iff_eq_none, ← hn] at h 
+        rw [Option.not_isSome_iff_eq_none, ← hn] at h
         simpa only using e.injective h
 
 private theorem remove_none_aux_some {x : α} (h : ∃ x', e (some x) = some x') :
@@ -106,9 +106,9 @@ private theorem remove_none_aux_inv (x : α) : removeNoneAux e.symm (removeNoneA
       cases h1 : e.symm (some (remove_none_aux e x)) <;> cases h2 : e (some x)
       · rw [remove_none_aux_none _ h1]
         exact (e.eq_symm_apply.mpr h2).symm
-      · rw [remove_none_aux_some _ ⟨_, h2⟩] at h1 
+      · rw [remove_none_aux_some _ ⟨_, h2⟩] at h1
         simpa using h1
-      · rw [remove_none_aux_none _ h2] at h1 
+      · rw [remove_none_aux_none _ h2] at h1
         simpa using h1
       · rw [remove_none_aux_some _ ⟨_, h1⟩]
         rw [remove_none_aux_some _ ⟨_, h2⟩]
@@ -160,7 +160,7 @@ theorem some_removeNone_iff {x : α} : some (removeNone e x) = e none ↔ e.symm
     simpa using (congr_arg e.symm h).symm
   · rw [remove_none_some _ ⟨a, h⟩]
     have := congr_arg e.symm h
-    rw [symm_apply_apply] at this 
+    rw [symm_apply_apply] at this
     simp only [false_iff_iff, apply_eq_iff_eq]
     simp [this]
 #align equiv.some_remove_none_iff Equiv.some_removeNone_iff
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2021 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 -/
-import Mathbin.Control.EquivFunctor
-import Mathbin.Data.Option.Basic
-import Mathbin.Data.Subtype
-import Mathbin.Logic.Equiv.Defs
+import Control.EquivFunctor
+import Data.Option.Basic
+import Data.Subtype
+import Logic.Equiv.Defs
 
 #align_import logic.equiv.option from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2021 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module logic.equiv.option
-! leanprover-community/mathlib commit 448144f7ae193a8990cb7473c9e9a01990f64ac7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Control.EquivFunctor
 import Mathbin.Data.Option.Basic
 import Mathbin.Data.Subtype
 import Mathbin.Logic.Equiv.Defs
 
+#align_import logic.equiv.option from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
 /-!
 # Equivalences for `option α`
 
Diff
@@ -55,23 +55,29 @@ theorem optionCongr_refl : optionCongr (Equiv.refl α) = Equiv.refl _ :=
 #align equiv.option_congr_refl Equiv.optionCongr_refl
 -/
 
+#print Equiv.optionCongr_symm /-
 @[simp]
 theorem optionCongr_symm (e : α ≃ β) : (optionCongr e).symm = optionCongr e.symm :=
   rfl
 #align equiv.option_congr_symm Equiv.optionCongr_symm
+-/
 
+#print Equiv.optionCongr_trans /-
 @[simp]
 theorem optionCongr_trans (e₁ : α ≃ β) (e₂ : β ≃ γ) :
     (optionCongr e₁).trans (optionCongr e₂) = optionCongr (e₁.trans e₂) :=
   ext <| Option.map_map _ _
 #align equiv.option_congr_trans Equiv.optionCongr_trans
+-/
 
+#print Equiv.optionCongr_eq_equivFunctor_mapEquiv /-
 /-- When `α` and `β` are in the same universe, this is the same as the result of
 `equiv_functor.map_equiv`. -/
 theorem optionCongr_eq_equivFunctor_mapEquiv {α β : Type _} (e : α ≃ β) :
     optionCongr e = EquivFunctor.mapEquiv Option e :=
   rfl
 #align equiv.option_congr_eq_equiv_function_map_equiv Equiv.optionCongr_eq_equivFunctor_mapEquiv
+-/
 
 end OptionCongr
 
@@ -122,10 +128,12 @@ def removeNone : α ≃ β where
 #align equiv.remove_none Equiv.removeNone
 -/
 
+#print Equiv.removeNone_symm /-
 @[simp]
 theorem removeNone_symm : (removeNone e).symm = removeNone e.symm :=
   rfl
 #align equiv.remove_none_symm Equiv.removeNone_symm
+-/
 
 #print Equiv.removeNone_some /-
 theorem removeNone_some {x : α} (h : ∃ x', e (some x) = some x') :
@@ -140,10 +148,12 @@ theorem removeNone_none {x : α} (h : e (some x) = none) : some (removeNone e x)
 #align equiv.remove_none_none Equiv.removeNone_none
 -/
 
+#print Equiv.option_symm_apply_none_iff /-
 @[simp]
 theorem option_symm_apply_none_iff : e.symm none = none ↔ e none = none :=
   ⟨fun h => by simpa using (congr_arg e h).symm, fun h => by simpa using (congr_arg e.symm h).symm⟩
 #align equiv.option_symm_apply_none_iff Equiv.option_symm_apply_none_iff
+-/
 
 #print Equiv.some_removeNone_iff /-
 theorem some_removeNone_iff {x : α} : some (removeNone e x) = e none ↔ e.symm none = some x :=
@@ -159,16 +169,20 @@ theorem some_removeNone_iff {x : α} : some (removeNone e x) = e none ↔ e.symm
 #align equiv.some_remove_none_iff Equiv.some_removeNone_iff
 -/
 
+#print Equiv.removeNone_optionCongr /-
 @[simp]
 theorem removeNone_optionCongr (e : α ≃ β) : removeNone e.optionCongr = e :=
   Equiv.ext fun x => Option.some_injective _ <| removeNone_some _ ⟨e x, by simp [EquivFunctor.map]⟩
 #align equiv.remove_none_option_congr Equiv.removeNone_optionCongr
+-/
 
 end RemoveNone
 
+#print Equiv.optionCongr_injective /-
 theorem optionCongr_injective : Function.Injective (optionCongr : α ≃ β → Option α ≃ Option β) :=
   Function.LeftInverse.injective removeNone_optionCongr
 #align equiv.option_congr_injective Equiv.optionCongr_injective
+-/
 
 #print Equiv.optionSubtype /-
 /-- Equivalences between `option α` and `β` that send `none` to `x` are equivalent to
Diff
@@ -86,7 +86,7 @@ private def remove_none_aux (x : α) : β :=
       show (e none).isSome by
         rw [← Option.ne_none_iff_isSome]
         intro hn
-        rw [Option.not_isSome_iff_eq_none, ← hn] at h
+        rw [Option.not_isSome_iff_eq_none, ← hn] at h 
         simpa only using e.injective h
 
 private theorem remove_none_aux_some {x : α} (h : ∃ x', e (some x) = some x') :
@@ -103,9 +103,9 @@ private theorem remove_none_aux_inv (x : α) : removeNoneAux e.symm (removeNoneA
       cases h1 : e.symm (some (remove_none_aux e x)) <;> cases h2 : e (some x)
       · rw [remove_none_aux_none _ h1]
         exact (e.eq_symm_apply.mpr h2).symm
-      · rw [remove_none_aux_some _ ⟨_, h2⟩] at h1
+      · rw [remove_none_aux_some _ ⟨_, h2⟩] at h1 
         simpa using h1
-      · rw [remove_none_aux_none _ h2] at h1
+      · rw [remove_none_aux_none _ h2] at h1 
         simpa using h1
       · rw [remove_none_aux_some _ ⟨_, h1⟩]
         rw [remove_none_aux_some _ ⟨_, h2⟩]
@@ -153,7 +153,7 @@ theorem some_removeNone_iff {x : α} : some (removeNone e x) = e none ↔ e.symm
     simpa using (congr_arg e.symm h).symm
   · rw [remove_none_some _ ⟨a, h⟩]
     have := congr_arg e.symm h
-    rw [symm_apply_apply] at this
+    rw [symm_apply_apply] at this 
     simp only [false_iff_iff, apply_eq_iff_eq]
     simp [this]
 #align equiv.some_remove_none_iff Equiv.some_removeNone_iff
Diff
@@ -55,35 +55,17 @@ theorem optionCongr_refl : optionCongr (Equiv.refl α) = Equiv.refl _ :=
 #align equiv.option_congr_refl Equiv.optionCongr_refl
 -/
 
-/- warning: equiv.option_congr_symm -> Equiv.optionCongr_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β), Eq.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2)} (Equiv.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) (Equiv.symm.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β) (Equiv.optionCongr.{u1, u2} α β e)) (Equiv.optionCongr.{u2, u1} β α (Equiv.symm.{succ u1, succ u2} α β e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} α β), Eq.{max (succ u2) (succ u1)} (Equiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Equiv.symm.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β) (Equiv.optionCongr.{u2, u1} α β e)) (Equiv.optionCongr.{u1, u2} β α (Equiv.symm.{succ u2, succ u1} α β e))
-Case conversion may be inaccurate. Consider using '#align equiv.option_congr_symm Equiv.optionCongr_symmₓ'. -/
 @[simp]
 theorem optionCongr_symm (e : α ≃ β) : (optionCongr e).symm = optionCongr e.symm :=
   rfl
 #align equiv.option_congr_symm Equiv.optionCongr_symm
 
-/- warning: equiv.option_congr_trans -> Equiv.optionCongr_trans is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} (e₁ : Equiv.{succ u1, succ u2} α β) (e₂ : Equiv.{succ u2, succ u3} β γ), Eq.{max 1 (max (succ u1) (succ u3)) (succ u3) (succ u1)} (Equiv.{succ u1, succ u3} (Option.{u1} α) (Option.{u3} γ)) (Equiv.trans.{succ u1, succ u2, succ u3} (Option.{u1} α) (Option.{u2} β) (Option.{u3} γ) (Equiv.optionCongr.{u1, u2} α β e₁) (Equiv.optionCongr.{u2, u3} β γ e₂)) (Equiv.optionCongr.{u1, u3} α γ (Equiv.trans.{succ u1, succ u2, succ u3} α β γ e₁ e₂))
-but is expected to have type
-  forall {α : Type.{u3}} {β : Type.{u2}} {γ : Type.{u1}} (e₁ : Equiv.{succ u3, succ u2} α β) (e₂ : Equiv.{succ u2, succ u1} β γ), Eq.{max (succ u3) (succ u1)} (Equiv.{succ u3, succ u1} (Option.{u3} α) (Option.{u1} γ)) (Equiv.trans.{succ u3, succ u2, succ u1} (Option.{u3} α) (Option.{u2} β) (Option.{u1} γ) (Equiv.optionCongr.{u3, u2} α β e₁) (Equiv.optionCongr.{u2, u1} β γ e₂)) (Equiv.optionCongr.{u3, u1} α γ (Equiv.trans.{succ u3, succ u2, succ u1} α β γ e₁ e₂))
-Case conversion may be inaccurate. Consider using '#align equiv.option_congr_trans Equiv.optionCongr_transₓ'. -/
 @[simp]
 theorem optionCongr_trans (e₁ : α ≃ β) (e₂ : β ≃ γ) :
     (optionCongr e₁).trans (optionCongr e₂) = optionCongr (e₁.trans e₂) :=
   ext <| Option.map_map _ _
 #align equiv.option_congr_trans Equiv.optionCongr_trans
 
-/- warning: equiv.option_congr_eq_equiv_function_map_equiv -> Equiv.optionCongr_eq_equivFunctor_mapEquiv is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u1}} (e : Equiv.{succ u1, succ u1} α β), Eq.{succ u1} (Equiv.{succ u1, succ u1} (Option.{u1} α) (Option.{u1} β)) (Equiv.optionCongr.{u1, u1} α β e) (EquivFunctor.mapEquiv.{u1, u1} Option.{u1} (EquivFunctor.ofLawfulFunctor.{u1, u1} Option.{u1} (Applicative.toFunctor.{u1, u1} Option.{u1} (Monad.toApplicative.{u1, u1} Option.{u1} Option.monad.{u1})) (LawfulApplicative.to_lawfulFunctor.{u1, u1} Option.{u1} (Monad.toApplicative.{u1, u1} Option.{u1} Option.monad.{u1}) (LawfulMonad.to_lawfulApplicative.{u1, u1} Option.{u1} Option.monad.{u1} Option.lawfulMonad.{u1}))) α β e)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u1}} (e : Equiv.{succ u1, succ u1} α β), Eq.{succ u1} (Equiv.{succ u1, succ u1} (Option.{u1} α) (Option.{u1} β)) (Equiv.optionCongr.{u1, u1} α β e) (EquivFunctor.mapEquiv.{u1, u1} Option.{u1} (EquivFunctor.ofLawfulFunctor.{u1, u1} Option.{u1} instFunctorOption.{u1} instLawfulFunctorOptionInstFunctorOption.{u1}) α β e)
-Case conversion may be inaccurate. Consider using '#align equiv.option_congr_eq_equiv_function_map_equiv Equiv.optionCongr_eq_equivFunctor_mapEquivₓ'. -/
 /-- When `α` and `β` are in the same universe, this is the same as the result of
 `equiv_functor.map_equiv`. -/
 theorem optionCongr_eq_equivFunctor_mapEquiv {α β : Type _} (e : α ≃ β) :
@@ -140,12 +122,6 @@ def removeNone : α ≃ β where
 #align equiv.remove_none Equiv.removeNone
 -/
 
-/- warning: equiv.remove_none_symm -> Equiv.removeNone_symm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)), Eq.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2)} (Equiv.{succ u2, succ u1} β α) (Equiv.symm.{succ u1, succ u2} α β (Equiv.removeNone.{u1, u2} α β e)) (Equiv.removeNone.{u2, u1} β α (Equiv.symm.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β) e))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)), Eq.{max (succ u2) (succ u1)} (Equiv.{succ u1, succ u2} β α) (Equiv.symm.{succ u2, succ u1} α β (Equiv.removeNone.{u2, u1} α β e)) (Equiv.removeNone.{u1, u2} β α (Equiv.symm.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β) e))
-Case conversion may be inaccurate. Consider using '#align equiv.remove_none_symm Equiv.removeNone_symmₓ'. -/
 @[simp]
 theorem removeNone_symm : (removeNone e).symm = removeNone e.symm :=
   rfl
@@ -164,12 +140,6 @@ theorem removeNone_none {x : α} (h : e (some x) = none) : some (removeNone e x)
 #align equiv.remove_none_none Equiv.removeNone_none
 -/
 
-/- warning: equiv.option_symm_apply_none_iff -> Equiv.option_symm_apply_none_iff is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)), Iff (Eq.{succ u1} (Option.{u1} α) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) (fun (_x : Equiv.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) => (Option.{u2} β) -> (Option.{u1} α)) (Equiv.hasCoeToFun.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) (Equiv.symm.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β) e) (Option.none.{u2} β)) (Option.none.{u1} α)) (Eq.{succ u2} (Option.{u2} β) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) (fun (_x : Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) => (Option.{u1} α) -> (Option.{u2} β)) (Equiv.hasCoeToFun.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) e (Option.none.{u1} α)) (Option.none.{u2} β))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)), Iff (Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Option.{u1} β) => Option.{u2} α) (Option.none.{u1} β)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Option.{u1} β) (fun (_x : Option.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Option.{u1} β) => Option.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Equiv.symm.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β) e) (Option.none.{u1} β)) (Option.none.{u2} α)) (Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Option.{u2} α) => Option.{u1} β) (Option.none.{u2} α)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) (Option.{u2} α) (fun (_x : Option.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Option.{u2} α) => Option.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) e (Option.none.{u2} α)) (Option.none.{u1} β))
-Case conversion may be inaccurate. Consider using '#align equiv.option_symm_apply_none_iff Equiv.option_symm_apply_none_iffₓ'. -/
 @[simp]
 theorem option_symm_apply_none_iff : e.symm none = none ↔ e none = none :=
   ⟨fun h => by simpa using (congr_arg e h).symm, fun h => by simpa using (congr_arg e.symm h).symm⟩
@@ -189,12 +159,6 @@ theorem some_removeNone_iff {x : α} : some (removeNone e x) = e none ↔ e.symm
 #align equiv.some_remove_none_iff Equiv.some_removeNone_iff
 -/
 
-/- warning: equiv.remove_none_option_congr -> Equiv.removeNone_optionCongr is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} α β), Eq.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1)} (Equiv.{succ u1, succ u2} α β) (Equiv.removeNone.{u1, u2} α β (Equiv.optionCongr.{u1, u2} α β e)) e
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} α β), Eq.{max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} α β) (Equiv.removeNone.{u2, u1} α β (Equiv.optionCongr.{u2, u1} α β e)) e
-Case conversion may be inaccurate. Consider using '#align equiv.remove_none_option_congr Equiv.removeNone_optionCongrₓ'. -/
 @[simp]
 theorem removeNone_optionCongr (e : α ≃ β) : removeNone e.optionCongr = e :=
   Equiv.ext fun x => Option.some_injective _ <| removeNone_some _ ⟨e x, by simp [EquivFunctor.map]⟩
@@ -202,12 +166,6 @@ theorem removeNone_optionCongr (e : α ≃ β) : removeNone e.optionCongr = e :=
 
 end RemoveNone
 
-/- warning: equiv.option_congr_injective -> Equiv.optionCongr_injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}}, Function.Injective.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1)} (Equiv.{succ u1, succ u2} α β) (Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) (Equiv.optionCongr.{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)} (Equiv.{succ u2, succ u1} α β) (Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) (Equiv.optionCongr.{u2, u1} α β)
-Case conversion may be inaccurate. Consider using '#align equiv.option_congr_injective Equiv.optionCongr_injectiveₓ'. -/
 theorem optionCongr_injective : Function.Injective (optionCongr : α ≃ β → Option α ≃ Option β) :=
   Function.LeftInverse.injective removeNone_optionCongr
 #align equiv.option_congr_injective Equiv.optionCongr_injective
Diff
@@ -106,17 +106,14 @@ private def remove_none_aux (x : α) : β :=
         intro hn
         rw [Option.not_isSome_iff_eq_none, ← hn] at h
         simpa only using e.injective h
-#align equiv.remove_none_aux equiv.remove_none_aux
 
 private theorem remove_none_aux_some {x : α} (h : ∃ x', e (some x) = some x') :
     some (removeNoneAux e x) = e (some x) := by
   simp [remove_none_aux, option.is_some_iff_exists.mpr h]
-#align equiv.remove_none_aux_some equiv.remove_none_aux_some
 
 private theorem remove_none_aux_none {x : α} (h : e (some x) = none) :
     some (removeNoneAux e x) = e none := by
   simp [remove_none_aux, option.not_is_some_iff_eq_none.mpr h]
-#align equiv.remove_none_aux_none equiv.remove_none_aux_none
 
 private theorem remove_none_aux_inv (x : α) : removeNoneAux e.symm (removeNoneAux e x) = x :=
   Option.some_injective _
@@ -131,7 +128,6 @@ private theorem remove_none_aux_inv (x : α) : removeNoneAux e.symm (removeNoneA
       · rw [remove_none_aux_some _ ⟨_, h1⟩]
         rw [remove_none_aux_some _ ⟨_, h2⟩]
         simp)
-#align equiv.remove_none_aux_inv equiv.remove_none_aux_inv
 
 #print Equiv.removeNone /-
 /-- Given an equivalence between two `option` types, eliminate `none` from that equivalence by
Diff
@@ -172,7 +172,7 @@ theorem removeNone_none {x : α} (h : e (some x) = none) : some (removeNone e x)
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)), Iff (Eq.{succ u1} (Option.{u1} α) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) (fun (_x : Equiv.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) => (Option.{u2} β) -> (Option.{u1} α)) (Equiv.hasCoeToFun.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) (Equiv.symm.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β) e) (Option.none.{u2} β)) (Option.none.{u1} α)) (Eq.{succ u2} (Option.{u2} β) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) (fun (_x : Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) => (Option.{u1} α) -> (Option.{u2} β)) (Equiv.hasCoeToFun.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) e (Option.none.{u1} α)) (Option.none.{u2} β))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)), Iff (Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Option.{u1} β) => Option.{u2} α) (Option.none.{u1} β)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Option.{u1} β) (fun (_x : Option.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Option.{u1} β) => Option.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Equiv.symm.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β) e) (Option.none.{u1} β)) (Option.none.{u2} α)) (Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Option.{u2} α) => Option.{u1} β) (Option.none.{u2} α)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) (Option.{u2} α) (fun (_x : Option.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Option.{u2} α) => Option.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) e (Option.none.{u2} α)) (Option.none.{u1} β))
+  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)), Iff (Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Option.{u1} β) => Option.{u2} α) (Option.none.{u1} β)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Option.{u1} β) (fun (_x : Option.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Option.{u1} β) => Option.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Equiv.symm.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β) e) (Option.none.{u1} β)) (Option.none.{u2} α)) (Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Option.{u2} α) => Option.{u1} β) (Option.none.{u2} α)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) (Option.{u2} α) (fun (_x : Option.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Option.{u2} α) => Option.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) e (Option.none.{u2} α)) (Option.none.{u1} β))
 Case conversion may be inaccurate. Consider using '#align equiv.option_symm_apply_none_iff Equiv.option_symm_apply_none_iffₓ'. -/
 @[simp]
 theorem option_symm_apply_none_iff : e.symm none = none ↔ e none = none :=
Diff
@@ -172,7 +172,7 @@ theorem removeNone_none {x : α} (h : e (some x) = none) : some (removeNone e x)
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} (e : Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)), Iff (Eq.{succ u1} (Option.{u1} α) (coeFn.{max 1 (max (succ u2) (succ u1)) (succ u1) (succ u2), max (succ u2) (succ u1)} (Equiv.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) (fun (_x : Equiv.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) => (Option.{u2} β) -> (Option.{u1} α)) (Equiv.hasCoeToFun.{succ u2, succ u1} (Option.{u2} β) (Option.{u1} α)) (Equiv.symm.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β) e) (Option.none.{u2} β)) (Option.none.{u1} α)) (Eq.{succ u2} (Option.{u2} β) (coeFn.{max 1 (max (succ u1) (succ u2)) (succ u2) (succ u1), max (succ u1) (succ u2)} (Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) (fun (_x : Equiv.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) => (Option.{u1} α) -> (Option.{u2} β)) (Equiv.hasCoeToFun.{succ u1, succ u2} (Option.{u1} α) (Option.{u2} β)) e (Option.none.{u1} α)) (Option.none.{u2} β))
 but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)), Iff (Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Option.{u1} β) => Option.{u2} α) (Option.none.{u1} β)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Option.{u1} β) (fun (_x : Option.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Option.{u1} β) => Option.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Equiv.symm.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β) e) (Option.none.{u1} β)) (Option.none.{u2} α)) (Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Option.{u2} α) => Option.{u1} β) (Option.none.{u2} α)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) (Option.{u2} α) (fun (_x : Option.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Option.{u2} α) => Option.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) e (Option.none.{u2} α)) (Option.none.{u1} β))
+  forall {α : Type.{u2}} {β : Type.{u1}} (e : Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)), Iff (Eq.{succ u2} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Option.{u1} β) => Option.{u2} α) (Option.none.{u1} β)) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (Equiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Option.{u1} β) (fun (_x : Option.{u1} β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Option.{u1} β) => Option.{u2} α) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u2} (Option.{u1} β) (Option.{u2} α)) (Equiv.symm.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β) e) (Option.none.{u1} β)) (Option.none.{u2} α)) (Eq.{succ u1} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Option.{u2} α) => Option.{u1} β) (Option.none.{u2} α)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Equiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) (Option.{u2} α) (fun (_x : Option.{u2} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Option.{u2} α) => Option.{u1} β) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u1} (Option.{u2} α) (Option.{u1} β)) e (Option.none.{u2} α)) (Option.none.{u1} β))
 Case conversion may be inaccurate. Consider using '#align equiv.option_symm_apply_none_iff Equiv.option_symm_apply_none_iffₓ'. -/
 @[simp]
 theorem option_symm_apply_none_iff : e.symm none = none ↔ e none = none :=

Changes in mathlib4

mathlib3
mathlib4
feat: Option {b // b ≠ a} ≃ α (#11095)

Extract from partialFunEquivPointed the equivalence between any type with a distinguished element and an Option type.

Co-authored-by: @YaelDillies <yael.dillies@gmail.com> Co-authored-by: @fpvandoorn <fpvdoorn@gmail.com>

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>

Diff
@@ -266,4 +266,18 @@ theorem optionSubtype_symm_apply_symm_apply [DecidableEq β] (x : β) (e : α 
   exact fun h => False.elim (b.property h)
 #align equiv.option_subtype_symm_apply_symm_apply Equiv.optionSubtype_symm_apply_symm_apply
 
+variable [DecidableEq α] {a b : α}
+
+/-- Any type with a distinguished element is equivalent to an `Option` type on the subtype excluding
+that element. -/
+@[simps!]
+def optionSubtypeNe (a : α) : Option {b // b ≠ a} ≃ α := optionSubtype a |>.symm (.refl _) |>.1
+
+lemma optionSubtypeNe_symm_self (a : α) : (optionSubtypeNe a).symm a = none := by simp
+lemma optionSubtypeNe_symm_of_ne (hba : b ≠ a) : (optionSubtypeNe a).symm b = some ⟨b, hba⟩ := by
+  simp [hba]
+
+@[simp] lemma optionSubtypeNe_none (a : α) : optionSubtypeNe a none = a := rfl
+@[simp] lemma optionSubtypeNe_some (a : α) (b) : optionSubtypeNe a (some b) = b := rfl
+
 end Equiv
chore: remove many Type _ before the colon (#7718)

We have turned to Type* instead of Type _, but many of them remained in mathlib because the straight replacement did not work. In general, having Type _ before the colon is a code smell, though, as it hides which types should be in the same universe and which shouldn't, and is not very robust.

This PR replaces most of the remaining Type _ before the colon (except those in category theory) by Type* or Type u. This has uncovered a few bugs (where declarations were not as polymorphic as they should be).

I had to increase heartbeats at two places when replacing Type _ by Type*, but I think it's worth it as it's really more robust.

Diff
@@ -22,6 +22,7 @@ We define
   both sides.
 -/
 
+universe u
 
 namespace Equiv
 
@@ -59,7 +60,7 @@ theorem optionCongr_trans (e₁ : α ≃ β) (e₂ : β ≃ γ) :
 
 /-- When `α` and `β` are in the same universe, this is the same as the result of
 `EquivFunctor.mapEquiv`. -/
-theorem optionCongr_eq_equivFunctor_mapEquiv {α β : Type _} (e : α ≃ β) :
+theorem optionCongr_eq_equivFunctor_mapEquiv {α β : Type u} (e : α ≃ β) :
     optionCongr e = EquivFunctor.mapEquiv Option e :=
   rfl
 #align equiv.option_congr_eq_equiv_function_map_equiv Equiv.optionCongr_eq_equivFunctor_mapEquiv
chore: fix nonterminal simps (#7497)

Fixes the nonterminal simps identified by #7496

Diff
@@ -112,8 +112,7 @@ theorem removeNone_aux_inv (x : α) : removeNone_aux e.symm (removeNone_aux e x)
 
       · rw [removeNone_aux_some _ ⟨_, h1⟩]
         rw [removeNone_aux_some _ ⟨_, h2⟩]
-        simp
-        )
+        simp)
 -- Porting note: private
 -- #align equiv.remove_none_aux_inv Equiv.removeNone_aux_inv
 
chore: delay import of Tactic.Common (#7000)

I know that this is contrary to what we've done previously, but:

  • I'm trying to upstream a great many tactics from Mathlib to Std (essentially, everything that non-mathematicians want too).
  • This makes it much easier for me to see what is going on, and understand the import requirements (particularly for the "big" tactics norm_num / ring / linarith)
  • It's actually not as bad as it looks here, because as these tactics move up to Std they will start disappearing again from explicit imports, but Mathlib can happily import all of Std.

(Oh

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

Diff
@@ -7,6 +7,7 @@ import Mathlib.Control.EquivFunctor
 import Mathlib.Data.Option.Basic
 import Mathlib.Data.Subtype
 import Mathlib.Logic.Equiv.Defs
+import Mathlib.Tactic.Cases
 
 #align_import logic.equiv.option from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
 
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
@@ -26,7 +26,7 @@ namespace Equiv
 
 open Option
 
-variable {α β γ : Type _}
+variable {α β γ : Type*}
 
 section OptionCongr
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2021 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module logic.equiv.option
-! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Control.EquivFunctor
 import Mathlib.Data.Option.Basic
 import Mathlib.Data.Subtype
 import Mathlib.Logic.Equiv.Defs
 
+#align_import logic.equiv.option from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
+
 /-!
 # Equivalences for `Option α`
 
chore: fix #align lines (#3640)

This PR fixes two things:

  • Most align statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align). This is often seen in the mathport output after ending calc blocks.
  • All remaining more-than-one-line #align statements. (This was needed for a script I wrote for #3630.)
Diff
@@ -151,13 +151,11 @@ theorem some_removeNone_iff {x : α} : some (removeNone e x) = e none ↔ e.symm
   cases' h : e (some x) with a
   · rw [removeNone_none _ h]
     simpa using (congr_arg e.symm h).symm
-
   · rw [removeNone_some _ ⟨a, h⟩]
     have h1 := congr_arg e.symm h
     rw [symm_apply_apply] at h1
     simp only [false_iff_iff, apply_eq_iff_eq]
     simp [h1, apply_eq_iff_eq]
-
 #align equiv.some_remove_none_iff Equiv.some_removeNone_iff
 
 @[simp]
chore: add missing #align statements (#1902)

This PR is the result of a slight variant on the following "algorithm"

  • take all mathlib 3 names, remove _ and make all uppercase letters into lowercase
  • take all mathlib 4 names, remove _ and make all uppercase letters into lowercase
  • look for matches, and create pairs (original_lean3_name, OriginalLean4Name)
  • for pairs that do not have an align statement:
    • use Lean 4 to lookup the file + position of the Lean 4 name
    • add an #align statement just before the next empty line
  • manually fix some tiny mistakes (e.g., empty lines in proofs might cause the #align statement to have been inserted too early)
Diff
@@ -41,6 +41,7 @@ def optionCongr (e : α ≃ β) : Option α ≃ Option β where
   left_inv x := (Option.map_map _ _ _).trans <| e.symm_comp_self.symm ▸ congr_fun Option.map_id x
   right_inv x := (Option.map_map _ _ _).trans <| e.self_comp_symm.symm ▸ congr_fun Option.map_id x
 #align equiv.option_congr Equiv.optionCongr
+#align equiv.option_congr_apply Equiv.optionCongr_apply
 
 @[simp]
 theorem optionCongr_refl : optionCongr (Equiv.refl α) = Equiv.refl _ :=
chore: fix most phantom #aligns (#1794)
Diff
@@ -83,18 +83,20 @@ def removeNone_aux (x : α) : β :=
         intro hn
         rw [Option.not_isSome_iff_eq_none, ← hn] at h
         exact Option.some_ne_none _ (e.injective h)
-
-#align equiv.remove_none_aux Equiv.removeNone_aux
+-- Porting note: private
+-- #align equiv.remove_none_aux Equiv.removeNone_aux
 
 theorem removeNone_aux_some {x : α} (h : ∃ x', e (some x) = some x') :
     some (removeNone_aux e x) = e (some x) :=
   by simp [removeNone_aux, Option.isSome_iff_exists.mpr h]
-#align equiv.remove_none_aux_some Equiv.removeNone_aux_some
+-- Porting note: private
+-- #align equiv.remove_none_aux_some Equiv.removeNone_aux_some
 
 theorem removeNone_aux_none {x : α} (h : e (some x) = none) :
     some (removeNone_aux e x) = e none := by
   simp [removeNone_aux, Option.not_isSome_iff_eq_none.mpr h]
-#align equiv.remove_none_aux_none Equiv.removeNone_aux_none
+-- Porting note: private
+-- #align equiv.remove_none_aux_none Equiv.removeNone_aux_none
 
 theorem removeNone_aux_inv (x : α) : removeNone_aux e.symm (removeNone_aux e x) = x :=
   Option.some_injective _
@@ -113,7 +115,8 @@ theorem removeNone_aux_inv (x : α) : removeNone_aux e.symm (removeNone_aux e x)
         rw [removeNone_aux_some _ ⟨_, h2⟩]
         simp
         )
-#align equiv.remove_none_aux_inv Equiv.removeNone_aux_inv
+-- Porting note: private
+-- #align equiv.remove_none_aux_inv Equiv.removeNone_aux_inv
 
 /-- Given an equivalence between two `Option` types, eliminate `none` from that equivalence by
 mapping `e.symm none` to `e none`. -/
chore: add source headers to ported theory files (#1094)

The script used to do this is included. The yaml file was obtained from https://raw.githubusercontent.com/wiki/leanprover-community/mathlib/mathlib4-port-status.md

Diff
@@ -2,6 +2,11 @@
 Copyright (c) 2021 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
+
+! This file was ported from Lean 3 source module logic.equiv.option
+! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Control.EquivFunctor
 import Mathlib.Data.Option.Basic

Dependencies 13

14 files ported (100.0%)
5627 lines ported (100.0%)

All dependencies are ported!