data.opposite
⟷
Mathlib.Data.Opposite
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Reid Barton, Simon Hudon, Kenny Lau
-/
-import Mathbin.Logic.Equiv.Defs
+import Logic.Equiv.Defs
#align_import data.opposite from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Reid Barton, Simon Hudon, Kenny Lau
-
-! This file was ported from Lean 3 source module data.opposite
-! 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.Logic.Equiv.Defs
+#align_import data.opposite from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
/-!
# Opposites
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -27,6 +27,7 @@ universe v u
-- morphism levels before object levels. See note [category_theory universes].
variable (α : Sort u)
+#print Opposite /-
/-- The type of objects of the opposite of `α`; used to define the opposite category.
In order to avoid confusion between `α` and its opposite type, we
@@ -52,8 +53,8 @@ variable (α : Sort u)
def Opposite : Sort u :=
α
#align opposite Opposite
+-/
--- mathport name: «expr ᵒᵖ»
notation:max -- Use a high right binding power (like that of postfix ⁻¹) so that, for example,
-- `presheaf Cᵒᵖ` parses as `presheaf (Cᵒᵖ)` and not `(presheaf C)ᵒᵖ`.
α "ᵒᵖ" => Opposite α
@@ -78,16 +79,22 @@ def unop : αᵒᵖ → α :=
#align opposite.unop Opposite.unop
-/
+#print Opposite.op_injective /-
theorem op_injective : Function.Injective (op : α → αᵒᵖ) := fun _ _ => id
#align opposite.op_injective Opposite.op_injective
+-/
+#print Opposite.unop_injective /-
theorem unop_injective : Function.Injective (unop : αᵒᵖ → α) := fun _ _ => id
#align opposite.unop_injective Opposite.unop_injective
+-/
+#print Opposite.op_unop /-
@[simp]
theorem op_unop (x : αᵒᵖ) : op (unop x) = x :=
rfl
#align opposite.op_unop Opposite.op_unop
+-/
#print Opposite.unop_op /-
@[simp]
@@ -96,18 +103,23 @@ theorem unop_op (x : α) : unop (op x) = x :=
#align opposite.unop_op Opposite.unop_op
-/
+#print Opposite.op_inj_iff /-
-- We could prove these by `iff.rfl`, but that would make these eligible for `dsimp`. That would be
-- a bad idea because `opposite` is irreducible.
@[simp]
theorem op_inj_iff (x y : α) : op x = op y ↔ x = y :=
op_injective.eq_iff
#align opposite.op_inj_iff Opposite.op_inj_iff
+-/
+#print Opposite.unop_inj_iff /-
@[simp]
theorem unop_inj_iff (x y : αᵒᵖ) : unop x = unop y ↔ x = y :=
unop_injective.eq_iff
#align opposite.unop_inj_iff Opposite.unop_inj_iff
+-/
+#print Opposite.equivToOpposite /-
/-- The type-level equivalence between a type and its opposite. -/
def equivToOpposite : α ≃ αᵒᵖ where
toFun := op
@@ -115,24 +127,33 @@ def equivToOpposite : α ≃ αᵒᵖ where
left_inv := unop_op
right_inv := op_unop
#align opposite.equiv_to_opposite Opposite.equivToOpposite
+-/
+#print Opposite.equivToOpposite_coe /-
@[simp]
theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op :=
rfl
#align opposite.equiv_to_opposite_coe Opposite.equivToOpposite_coe
+-/
+#print Opposite.equivToOpposite_symm_coe /-
@[simp]
theorem equivToOpposite_symm_coe : (equivToOpposite.symm : αᵒᵖ → α) = unop :=
rfl
#align opposite.equiv_to_opposite_symm_coe Opposite.equivToOpposite_symm_coe
+-/
+#print Opposite.op_eq_iff_eq_unop /-
theorem op_eq_iff_eq_unop {x : α} {y} : op x = y ↔ x = unop y :=
equivToOpposite.apply_eq_iff_eq_symm_apply
#align opposite.op_eq_iff_eq_unop Opposite.op_eq_iff_eq_unop
+-/
+#print Opposite.unop_eq_iff_eq_op /-
theorem unop_eq_iff_eq_op {x} {y : α} : unop x = y ↔ x = op y :=
equivToOpposite.symm.apply_eq_iff_eq_symm_apply
#align opposite.unop_eq_iff_eq_op Opposite.unop_eq_iff_eq_op
+-/
instance [Inhabited α] : Inhabited αᵒᵖ :=
⟨op default⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -27,12 +27,6 @@ universe v u
-- morphism levels before object levels. See note [category_theory universes].
variable (α : Sort u)
-/- warning: opposite -> Opposite is a dubious translation:
-lean 3 declaration is
- Sort.{u1} -> Sort.{u1}
-but is expected to have type
- Sort.{u1} -> Sort.{max 1 u1}
-Case conversion may be inaccurate. Consider using '#align opposite Oppositeₓ'. -/
/-- The type of objects of the opposite of `α`; used to define the opposite category.
In order to avoid confusion between `α` and its opposite type, we
@@ -84,30 +78,12 @@ def unop : αᵒᵖ → α :=
#align opposite.unop Opposite.unop
-/
-/- warning: opposite.op_injective -> Opposite.op_injective is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}}, Function.Injective.{u1, u1} α (Opposite.{u1} α) (Opposite.op.{u1} α)
-but is expected to have type
- forall {α : Sort.{u1}}, Function.Injective.{u1, max 1 u1} α (Opposite.{u1} α) (Opposite.op.{u1} α)
-Case conversion may be inaccurate. Consider using '#align opposite.op_injective Opposite.op_injectiveₓ'. -/
theorem op_injective : Function.Injective (op : α → αᵒᵖ) := fun _ _ => id
#align opposite.op_injective Opposite.op_injective
-/- warning: opposite.unop_injective -> Opposite.unop_injective is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}}, Function.Injective.{u1, u1} (Opposite.{u1} α) α (Opposite.unop.{u1} α)
-but is expected to have type
- forall {α : Sort.{u1}}, Function.Injective.{max 1 u1, u1} (Opposite.{u1} α) α (Opposite.unop.{u1} α)
-Case conversion may be inaccurate. Consider using '#align opposite.unop_injective Opposite.unop_injectiveₓ'. -/
theorem unop_injective : Function.Injective (unop : αᵒᵖ → α) := fun _ _ => id
#align opposite.unop_injective Opposite.unop_injective
-/- warning: opposite.op_unop -> Opposite.op_unop is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}} (x : Opposite.{u1} α), Eq.{u1} (Opposite.{u1} α) (Opposite.op.{u1} α (Opposite.unop.{u1} α x)) x
-but is expected to have type
- forall {α : Sort.{u1}} (x : Opposite.{u1} α), Eq.{max 1 u1} (Opposite.{u1} α) (Opposite.op.{u1} α (Opposite.unop.{u1} α x)) x
-Case conversion may be inaccurate. Consider using '#align opposite.op_unop Opposite.op_unopₓ'. -/
@[simp]
theorem op_unop (x : αᵒᵖ) : op (unop x) = x :=
rfl
@@ -120,12 +96,6 @@ theorem unop_op (x : α) : unop (op x) = x :=
#align opposite.unop_op Opposite.unop_op
-/
-/- warning: opposite.op_inj_iff -> Opposite.op_inj_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}} (x : α) (y : α), Iff (Eq.{u1} (Opposite.{u1} α) (Opposite.op.{u1} α x) (Opposite.op.{u1} α y)) (Eq.{u1} α x y)
-but is expected to have type
- forall {α : Sort.{u1}} (x : α) (y : α), Iff (Eq.{max 1 u1} (Opposite.{u1} α) (Opposite.op.{u1} α x) (Opposite.op.{u1} α y)) (Eq.{u1} α x y)
-Case conversion may be inaccurate. Consider using '#align opposite.op_inj_iff Opposite.op_inj_iffₓ'. -/
-- We could prove these by `iff.rfl`, but that would make these eligible for `dsimp`. That would be
-- a bad idea because `opposite` is irreducible.
@[simp]
@@ -133,23 +103,11 @@ theorem op_inj_iff (x y : α) : op x = op y ↔ x = y :=
op_injective.eq_iff
#align opposite.op_inj_iff Opposite.op_inj_iff
-/- warning: opposite.unop_inj_iff -> Opposite.unop_inj_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}} (x : Opposite.{u1} α) (y : Opposite.{u1} α), Iff (Eq.{u1} α (Opposite.unop.{u1} α x) (Opposite.unop.{u1} α y)) (Eq.{u1} (Opposite.{u1} α) x y)
-but is expected to have type
- forall {α : Sort.{u1}} (x : Opposite.{u1} α) (y : Opposite.{u1} α), Iff (Eq.{u1} α (Opposite.unop.{u1} α x) (Opposite.unop.{u1} α y)) (Eq.{max 1 u1} (Opposite.{u1} α) x y)
-Case conversion may be inaccurate. Consider using '#align opposite.unop_inj_iff Opposite.unop_inj_iffₓ'. -/
@[simp]
theorem unop_inj_iff (x y : αᵒᵖ) : unop x = unop y ↔ x = y :=
unop_injective.eq_iff
#align opposite.unop_inj_iff Opposite.unop_inj_iff
-/- warning: opposite.equiv_to_opposite -> Opposite.equivToOpposite is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}}, Equiv.{u1, u1} α (Opposite.{u1} α)
-but is expected to have type
- forall {α : Sort.{u1}}, Equiv.{u1, max 1 u1} α (Opposite.{u1} α)
-Case conversion may be inaccurate. Consider using '#align opposite.equiv_to_opposite Opposite.equivToOppositeₓ'. -/
/-- The type-level equivalence between a type and its opposite. -/
def equivToOpposite : α ≃ αᵒᵖ where
toFun := op
@@ -158,44 +116,20 @@ def equivToOpposite : α ≃ αᵒᵖ where
right_inv := op_unop
#align opposite.equiv_to_opposite Opposite.equivToOpposite
-/- warning: opposite.equiv_to_opposite_coe -> Opposite.equivToOpposite_coe is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}}, Eq.{u1} ((fun (_x : Equiv.{u1, u1} α (Opposite.{u1} α)) => α -> (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (coeFn.{max 1 u1, u1} (Equiv.{u1, u1} α (Opposite.{u1} α)) (fun (_x : Equiv.{u1, u1} α (Opposite.{u1} α)) => α -> (Opposite.{u1} α)) (Equiv.hasCoeToFun.{u1, u1} α (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (Opposite.op.{u1} α)
-but is expected to have type
- forall {α : Sort.{u1}}, Eq.{max 1 u1} (forall (a : α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => Opposite.{u1} α) a) (FunLike.coe.{max 1 u1, u1, max 1 u1} (Equiv.{u1, max 1 u1} α (Opposite.{u1} α)) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => Opposite.{u1} α) _x) (Equiv.instFunLikeEquiv.{u1, max 1 u1} α (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (Opposite.op.{u1} α)
-Case conversion may be inaccurate. Consider using '#align opposite.equiv_to_opposite_coe Opposite.equivToOpposite_coeₓ'. -/
@[simp]
theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op :=
rfl
#align opposite.equiv_to_opposite_coe Opposite.equivToOpposite_coe
-/- warning: opposite.equiv_to_opposite_symm_coe -> Opposite.equivToOpposite_symm_coe is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}}, Eq.{u1} ((fun (_x : Equiv.{u1, u1} (Opposite.{u1} α) α) => (Opposite.{u1} α) -> α) (Equiv.symm.{u1, u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (coeFn.{max 1 u1, u1} (Equiv.{u1, u1} (Opposite.{u1} α) α) (fun (_x : Equiv.{u1, u1} (Opposite.{u1} α) α) => (Opposite.{u1} α) -> α) (Equiv.hasCoeToFun.{u1, u1} (Opposite.{u1} α) α) (Equiv.symm.{u1, u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (Opposite.unop.{u1} α)
-but is expected to have type
- forall {α : Sort.{u1}}, Eq.{imax (max 1 u1) u1} (forall (a : Opposite.{u1} α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Opposite.{u1} α) => α) a) (FunLike.coe.{max 1 u1, max 1 u1, u1} (Equiv.{max 1 u1, u1} (Opposite.{u1} α) α) (Opposite.{u1} α) (fun (_x : Opposite.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Opposite.{u1} α) => α) _x) (Equiv.instFunLikeEquiv.{max 1 u1, u1} (Opposite.{u1} α) α) (Equiv.symm.{u1, max 1 u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (Opposite.unop.{u1} α)
-Case conversion may be inaccurate. Consider using '#align opposite.equiv_to_opposite_symm_coe Opposite.equivToOpposite_symm_coeₓ'. -/
@[simp]
theorem equivToOpposite_symm_coe : (equivToOpposite.symm : αᵒᵖ → α) = unop :=
rfl
#align opposite.equiv_to_opposite_symm_coe Opposite.equivToOpposite_symm_coe
-/- warning: opposite.op_eq_iff_eq_unop -> Opposite.op_eq_iff_eq_unop is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}} {x : α} {y : Opposite.{u1} α}, Iff (Eq.{u1} (Opposite.{u1} α) (Opposite.op.{u1} α x) y) (Eq.{u1} α x (Opposite.unop.{u1} α y))
-but is expected to have type
- forall {α : Sort.{u1}} {x : α} {y : Opposite.{u1} α}, Iff (Eq.{max 1 u1} (Opposite.{u1} α) (Opposite.op.{u1} α x) y) (Eq.{u1} α x (Opposite.unop.{u1} α y))
-Case conversion may be inaccurate. Consider using '#align opposite.op_eq_iff_eq_unop Opposite.op_eq_iff_eq_unopₓ'. -/
theorem op_eq_iff_eq_unop {x : α} {y} : op x = y ↔ x = unop y :=
equivToOpposite.apply_eq_iff_eq_symm_apply
#align opposite.op_eq_iff_eq_unop Opposite.op_eq_iff_eq_unop
-/- warning: opposite.unop_eq_iff_eq_op -> Opposite.unop_eq_iff_eq_op is a dubious translation:
-lean 3 declaration is
- forall {α : Sort.{u1}} {x : Opposite.{u1} α} {y : α}, Iff (Eq.{u1} α (Opposite.unop.{u1} α x) y) (Eq.{u1} (Opposite.{u1} α) x (Opposite.op.{u1} α y))
-but is expected to have type
- forall {α : Sort.{u1}} {x : Opposite.{u1} α} {y : α}, Iff (Eq.{u1} α (Opposite.unop.{u1} α x) y) (Eq.{max 1 u1} (Opposite.{u1} α) x (Opposite.op.{u1} α y))
-Case conversion may be inaccurate. Consider using '#align opposite.unop_eq_iff_eq_op Opposite.unop_eq_iff_eq_opₓ'. -/
theorem unop_eq_iff_eq_op {x} {y : α} : unop x = y ↔ x = op y :=
equivToOpposite.symm.apply_eq_iff_eq_symm_apply
#align opposite.unop_eq_iff_eq_op Opposite.unop_eq_iff_eq_op
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -162,7 +162,7 @@ def equivToOpposite : α ≃ αᵒᵖ where
lean 3 declaration is
forall {α : Sort.{u1}}, Eq.{u1} ((fun (_x : Equiv.{u1, u1} α (Opposite.{u1} α)) => α -> (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (coeFn.{max 1 u1, u1} (Equiv.{u1, u1} α (Opposite.{u1} α)) (fun (_x : Equiv.{u1, u1} α (Opposite.{u1} α)) => α -> (Opposite.{u1} α)) (Equiv.hasCoeToFun.{u1, u1} α (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (Opposite.op.{u1} α)
but is expected to have type
- forall {α : Sort.{u1}}, Eq.{max 1 u1} (forall (a : α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => Opposite.{u1} α) a) (FunLike.coe.{max 1 u1, u1, max 1 u1} (Equiv.{u1, max 1 u1} α (Opposite.{u1} α)) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => Opposite.{u1} α) _x) (Equiv.instFunLikeEquiv.{u1, max 1 u1} α (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (Opposite.op.{u1} α)
+ forall {α : Sort.{u1}}, Eq.{max 1 u1} (forall (a : α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => Opposite.{u1} α) a) (FunLike.coe.{max 1 u1, u1, max 1 u1} (Equiv.{u1, max 1 u1} α (Opposite.{u1} α)) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : α) => Opposite.{u1} α) _x) (Equiv.instFunLikeEquiv.{u1, max 1 u1} α (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (Opposite.op.{u1} α)
Case conversion may be inaccurate. Consider using '#align opposite.equiv_to_opposite_coe Opposite.equivToOpposite_coeₓ'. -/
@[simp]
theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op :=
@@ -173,7 +173,7 @@ theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op :=
lean 3 declaration is
forall {α : Sort.{u1}}, Eq.{u1} ((fun (_x : Equiv.{u1, u1} (Opposite.{u1} α) α) => (Opposite.{u1} α) -> α) (Equiv.symm.{u1, u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (coeFn.{max 1 u1, u1} (Equiv.{u1, u1} (Opposite.{u1} α) α) (fun (_x : Equiv.{u1, u1} (Opposite.{u1} α) α) => (Opposite.{u1} α) -> α) (Equiv.hasCoeToFun.{u1, u1} (Opposite.{u1} α) α) (Equiv.symm.{u1, u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (Opposite.unop.{u1} α)
but is expected to have type
- forall {α : Sort.{u1}}, Eq.{imax (max 1 u1) u1} (forall (a : Opposite.{u1} α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Opposite.{u1} α) => α) a) (FunLike.coe.{max 1 u1, max 1 u1, u1} (Equiv.{max 1 u1, u1} (Opposite.{u1} α) α) (Opposite.{u1} α) (fun (_x : Opposite.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Opposite.{u1} α) => α) _x) (Equiv.instFunLikeEquiv.{max 1 u1, u1} (Opposite.{u1} α) α) (Equiv.symm.{u1, max 1 u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (Opposite.unop.{u1} α)
+ forall {α : Sort.{u1}}, Eq.{imax (max 1 u1) u1} (forall (a : Opposite.{u1} α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Opposite.{u1} α) => α) a) (FunLike.coe.{max 1 u1, max 1 u1, u1} (Equiv.{max 1 u1, u1} (Opposite.{u1} α) α) (Opposite.{u1} α) (fun (_x : Opposite.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Opposite.{u1} α) => α) _x) (Equiv.instFunLikeEquiv.{max 1 u1, u1} (Opposite.{u1} α) α) (Equiv.symm.{u1, max 1 u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (Opposite.unop.{u1} α)
Case conversion may be inaccurate. Consider using '#align opposite.equiv_to_opposite_symm_coe Opposite.equivToOpposite_symm_coeₓ'. -/
@[simp]
theorem equivToOpposite_symm_coe : (equivToOpposite.symm : αᵒᵖ → α) = unop :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/49b7f94aab3a3bdca1f9f34c5d818afb253b3993
@@ -27,7 +27,12 @@ universe v u
-- morphism levels before object levels. See note [category_theory universes].
variable (α : Sort u)
-#print Opposite /-
+/- warning: opposite -> Opposite is a dubious translation:
+lean 3 declaration is
+ Sort.{u1} -> Sort.{u1}
+but is expected to have type
+ Sort.{u1} -> Sort.{max 1 u1}
+Case conversion may be inaccurate. Consider using '#align opposite Oppositeₓ'. -/
/-- The type of objects of the opposite of `α`; used to define the opposite category.
In order to avoid confusion between `α` and its opposite type, we
@@ -53,7 +58,6 @@ variable (α : Sort u)
def Opposite : Sort u :=
α
#align opposite Opposite
--/
-- mathport name: «expr ᵒᵖ»
notation:max -- Use a high right binding power (like that of postfix ⁻¹) so that, for example,
@@ -80,22 +84,34 @@ def unop : αᵒᵖ → α :=
#align opposite.unop Opposite.unop
-/
-#print Opposite.op_injective /-
+/- warning: opposite.op_injective -> Opposite.op_injective is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}}, Function.Injective.{u1, u1} α (Opposite.{u1} α) (Opposite.op.{u1} α)
+but is expected to have type
+ forall {α : Sort.{u1}}, Function.Injective.{u1, max 1 u1} α (Opposite.{u1} α) (Opposite.op.{u1} α)
+Case conversion may be inaccurate. Consider using '#align opposite.op_injective Opposite.op_injectiveₓ'. -/
theorem op_injective : Function.Injective (op : α → αᵒᵖ) := fun _ _ => id
#align opposite.op_injective Opposite.op_injective
--/
-#print Opposite.unop_injective /-
+/- warning: opposite.unop_injective -> Opposite.unop_injective is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}}, Function.Injective.{u1, u1} (Opposite.{u1} α) α (Opposite.unop.{u1} α)
+but is expected to have type
+ forall {α : Sort.{u1}}, Function.Injective.{max 1 u1, u1} (Opposite.{u1} α) α (Opposite.unop.{u1} α)
+Case conversion may be inaccurate. Consider using '#align opposite.unop_injective Opposite.unop_injectiveₓ'. -/
theorem unop_injective : Function.Injective (unop : αᵒᵖ → α) := fun _ _ => id
#align opposite.unop_injective Opposite.unop_injective
--/
-#print Opposite.op_unop /-
+/- warning: opposite.op_unop -> Opposite.op_unop is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}} (x : Opposite.{u1} α), Eq.{u1} (Opposite.{u1} α) (Opposite.op.{u1} α (Opposite.unop.{u1} α x)) x
+but is expected to have type
+ forall {α : Sort.{u1}} (x : Opposite.{u1} α), Eq.{max 1 u1} (Opposite.{u1} α) (Opposite.op.{u1} α (Opposite.unop.{u1} α x)) x
+Case conversion may be inaccurate. Consider using '#align opposite.op_unop Opposite.op_unopₓ'. -/
@[simp]
theorem op_unop (x : αᵒᵖ) : op (unop x) = x :=
rfl
#align opposite.op_unop Opposite.op_unop
--/
#print Opposite.unop_op /-
@[simp]
@@ -104,23 +120,36 @@ theorem unop_op (x : α) : unop (op x) = x :=
#align opposite.unop_op Opposite.unop_op
-/
-#print Opposite.op_inj_iff /-
+/- warning: opposite.op_inj_iff -> Opposite.op_inj_iff is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}} (x : α) (y : α), Iff (Eq.{u1} (Opposite.{u1} α) (Opposite.op.{u1} α x) (Opposite.op.{u1} α y)) (Eq.{u1} α x y)
+but is expected to have type
+ forall {α : Sort.{u1}} (x : α) (y : α), Iff (Eq.{max 1 u1} (Opposite.{u1} α) (Opposite.op.{u1} α x) (Opposite.op.{u1} α y)) (Eq.{u1} α x y)
+Case conversion may be inaccurate. Consider using '#align opposite.op_inj_iff Opposite.op_inj_iffₓ'. -/
-- We could prove these by `iff.rfl`, but that would make these eligible for `dsimp`. That would be
-- a bad idea because `opposite` is irreducible.
@[simp]
theorem op_inj_iff (x y : α) : op x = op y ↔ x = y :=
op_injective.eq_iff
#align opposite.op_inj_iff Opposite.op_inj_iff
--/
-#print Opposite.unop_inj_iff /-
+/- warning: opposite.unop_inj_iff -> Opposite.unop_inj_iff is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}} (x : Opposite.{u1} α) (y : Opposite.{u1} α), Iff (Eq.{u1} α (Opposite.unop.{u1} α x) (Opposite.unop.{u1} α y)) (Eq.{u1} (Opposite.{u1} α) x y)
+but is expected to have type
+ forall {α : Sort.{u1}} (x : Opposite.{u1} α) (y : Opposite.{u1} α), Iff (Eq.{u1} α (Opposite.unop.{u1} α x) (Opposite.unop.{u1} α y)) (Eq.{max 1 u1} (Opposite.{u1} α) x y)
+Case conversion may be inaccurate. Consider using '#align opposite.unop_inj_iff Opposite.unop_inj_iffₓ'. -/
@[simp]
theorem unop_inj_iff (x y : αᵒᵖ) : unop x = unop y ↔ x = y :=
unop_injective.eq_iff
#align opposite.unop_inj_iff Opposite.unop_inj_iff
--/
-#print Opposite.equivToOpposite /-
+/- warning: opposite.equiv_to_opposite -> Opposite.equivToOpposite is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}}, Equiv.{u1, u1} α (Opposite.{u1} α)
+but is expected to have type
+ forall {α : Sort.{u1}}, Equiv.{u1, max 1 u1} α (Opposite.{u1} α)
+Case conversion may be inaccurate. Consider using '#align opposite.equiv_to_opposite Opposite.equivToOppositeₓ'. -/
/-- The type-level equivalence between a type and its opposite. -/
def equivToOpposite : α ≃ αᵒᵖ where
toFun := op
@@ -128,42 +157,57 @@ def equivToOpposite : α ≃ αᵒᵖ where
left_inv := unop_op
right_inv := op_unop
#align opposite.equiv_to_opposite Opposite.equivToOpposite
--/
-#print Opposite.equivToOpposite_coe /-
+/- warning: opposite.equiv_to_opposite_coe -> Opposite.equivToOpposite_coe is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}}, Eq.{u1} ((fun (_x : Equiv.{u1, u1} α (Opposite.{u1} α)) => α -> (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (coeFn.{max 1 u1, u1} (Equiv.{u1, u1} α (Opposite.{u1} α)) (fun (_x : Equiv.{u1, u1} α (Opposite.{u1} α)) => α -> (Opposite.{u1} α)) (Equiv.hasCoeToFun.{u1, u1} α (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (Opposite.op.{u1} α)
+but is expected to have type
+ forall {α : Sort.{u1}}, Eq.{max 1 u1} (forall (a : α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => Opposite.{u1} α) a) (FunLike.coe.{max 1 u1, u1, max 1 u1} (Equiv.{u1, max 1 u1} α (Opposite.{u1} α)) α (fun (_x : α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : α) => Opposite.{u1} α) _x) (Equiv.instFunLikeEquiv.{u1, max 1 u1} α (Opposite.{u1} α)) (Opposite.equivToOpposite.{u1} α)) (Opposite.op.{u1} α)
+Case conversion may be inaccurate. Consider using '#align opposite.equiv_to_opposite_coe Opposite.equivToOpposite_coeₓ'. -/
@[simp]
theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op :=
rfl
#align opposite.equiv_to_opposite_coe Opposite.equivToOpposite_coe
--/
-#print Opposite.equivToOpposite_symm_coe /-
+/- warning: opposite.equiv_to_opposite_symm_coe -> Opposite.equivToOpposite_symm_coe is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}}, Eq.{u1} ((fun (_x : Equiv.{u1, u1} (Opposite.{u1} α) α) => (Opposite.{u1} α) -> α) (Equiv.symm.{u1, u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (coeFn.{max 1 u1, u1} (Equiv.{u1, u1} (Opposite.{u1} α) α) (fun (_x : Equiv.{u1, u1} (Opposite.{u1} α) α) => (Opposite.{u1} α) -> α) (Equiv.hasCoeToFun.{u1, u1} (Opposite.{u1} α) α) (Equiv.symm.{u1, u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (Opposite.unop.{u1} α)
+but is expected to have type
+ forall {α : Sort.{u1}}, Eq.{imax (max 1 u1) u1} (forall (a : Opposite.{u1} α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Opposite.{u1} α) => α) a) (FunLike.coe.{max 1 u1, max 1 u1, u1} (Equiv.{max 1 u1, u1} (Opposite.{u1} α) α) (Opposite.{u1} α) (fun (_x : Opposite.{u1} α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Opposite.{u1} α) => α) _x) (Equiv.instFunLikeEquiv.{max 1 u1, u1} (Opposite.{u1} α) α) (Equiv.symm.{u1, max 1 u1} α (Opposite.{u1} α) (Opposite.equivToOpposite.{u1} α))) (Opposite.unop.{u1} α)
+Case conversion may be inaccurate. Consider using '#align opposite.equiv_to_opposite_symm_coe Opposite.equivToOpposite_symm_coeₓ'. -/
@[simp]
theorem equivToOpposite_symm_coe : (equivToOpposite.symm : αᵒᵖ → α) = unop :=
rfl
#align opposite.equiv_to_opposite_symm_coe Opposite.equivToOpposite_symm_coe
--/
-#print Opposite.op_eq_iff_eq_unop /-
+/- warning: opposite.op_eq_iff_eq_unop -> Opposite.op_eq_iff_eq_unop is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}} {x : α} {y : Opposite.{u1} α}, Iff (Eq.{u1} (Opposite.{u1} α) (Opposite.op.{u1} α x) y) (Eq.{u1} α x (Opposite.unop.{u1} α y))
+but is expected to have type
+ forall {α : Sort.{u1}} {x : α} {y : Opposite.{u1} α}, Iff (Eq.{max 1 u1} (Opposite.{u1} α) (Opposite.op.{u1} α x) y) (Eq.{u1} α x (Opposite.unop.{u1} α y))
+Case conversion may be inaccurate. Consider using '#align opposite.op_eq_iff_eq_unop Opposite.op_eq_iff_eq_unopₓ'. -/
theorem op_eq_iff_eq_unop {x : α} {y} : op x = y ↔ x = unop y :=
equivToOpposite.apply_eq_iff_eq_symm_apply
#align opposite.op_eq_iff_eq_unop Opposite.op_eq_iff_eq_unop
--/
-#print Opposite.unop_eq_iff_eq_op /-
+/- warning: opposite.unop_eq_iff_eq_op -> Opposite.unop_eq_iff_eq_op is a dubious translation:
+lean 3 declaration is
+ forall {α : Sort.{u1}} {x : Opposite.{u1} α} {y : α}, Iff (Eq.{u1} α (Opposite.unop.{u1} α x) y) (Eq.{u1} (Opposite.{u1} α) x (Opposite.op.{u1} α y))
+but is expected to have type
+ forall {α : Sort.{u1}} {x : Opposite.{u1} α} {y : α}, Iff (Eq.{u1} α (Opposite.unop.{u1} α x) y) (Eq.{max 1 u1} (Opposite.{u1} α) x (Opposite.op.{u1} α y))
+Case conversion may be inaccurate. Consider using '#align opposite.unop_eq_iff_eq_op Opposite.unop_eq_iff_eq_opₓ'. -/
theorem unop_eq_iff_eq_op {x} {y : α} : unop x = y ↔ x = op y :=
equivToOpposite.symm.apply_eq_iff_eq_symm_apply
#align opposite.unop_eq_iff_eq_op Opposite.unop_eq_iff_eq_op
--/
instance [Inhabited α] : Inhabited αᵒᵖ :=
⟨op default⟩
-#print Opposite.rec /-
+#print Opposite.rec' /-
/-- A recursor for `opposite`. Use as `induction x using opposite.rec`. -/
@[simp]
-protected def rec {F : ∀ X : αᵒᵖ, Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
-#align opposite.rec Opposite.rec
+protected def rec' {F : ∀ X : αᵒᵖ, Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
+#align opposite.rec Opposite.rec'
-/
end Opposite
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -89,6 +89,10 @@ def equivToOpposite : α ≃ αᵒᵖ where
right_inv := op_unop
#align opposite.equiv_to_opposite Opposite.equivToOpposite
+theorem op_surjective : Function.Surjective (op : α → αᵒᵖ) := equivToOpposite.surjective
+
+theorem unop_surjective : Function.Surjective (unop : αᵒᵖ → α) := equivToOpposite.symm.surjective
+
@[simp]
theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op :=
rfl
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -22,7 +22,7 @@ universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
variable (α : Sort u)
--- porting note: in mathlib, `opposite α` was a type synonym for `α`, but if we did
+-- Porting note: in mathlib, `opposite α` was a type synonym for `α`, but if we did
-- the same in Lean4, one could write problematic definitions like:
-- example (X : C) : Cᵒᵖ := X
-- example {X Y : C} (f : X ⟶ Y): op Y ⟶ op X := f
Only Prop
-values fields should be capitalized, not P
-valued fields where P
is Prop
-valued.
Rather than fixing Nonempty :=
in constructors, I just deleted the line as the instance can almost always be found automatically.
@@ -110,6 +110,10 @@ theorem unop_eq_iff_eq_op {x} {y : α} : unop x = y ↔ x = op y :=
instance [Inhabited α] : Inhabited αᵒᵖ :=
⟨op default⟩
+instance [Nonempty α] : Nonempty αᵒᵖ := Nonempty.map op ‹_›
+
+instance [Subsingleton α] : Subsingleton αᵒᵖ := unop_injective.subsingleton
+
/-- A recursor for `Opposite`.
The `@[eliminator]` attribute makes it the default induction principle for `Opposite`
so you don't need to use `induction x using Opposite.rec'`. -/
@@ -2,14 +2,11 @@
Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Reid Barton, Simon Hudon, Kenny Lau
-
-! This file was ported from Lean 3 source module data.opposite
-! leanprover-community/mathlib commit 99e8971dc62f1f7ecf693d75e75fbbabd55849de
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Logic.Equiv.Defs
+#align_import data.opposite from "leanprover-community/mathlib"@"99e8971dc62f1f7ecf693d75e75fbbabd55849de"
+
/-!
# Opposites
@@ -113,8 +113,10 @@ theorem unop_eq_iff_eq_op {x} {y : α} : unop x = y ↔ x = op y :=
instance [Inhabited α] : Inhabited αᵒᵖ :=
⟨op default⟩
-/-- A recursor for `Opposite`. Use as `induction x using Opposite.rec'`. -/
-@[simp]
+/-- A recursor for `Opposite`.
+The `@[eliminator]` attribute makes it the default induction principle for `Opposite`
+so you don't need to use `induction x using Opposite.rec'`. -/
+@[simp, eliminator]
protected def rec' {F : αᵒᵖ → Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
#align opposite.rec Opposite.rec'
@@ -113,7 +113,7 @@ theorem unop_eq_iff_eq_op {x} {y : α} : unop x = y ↔ x = op y :=
instance [Inhabited α] : Inhabited αᵒᵖ :=
⟨op default⟩
-/-- A recursor for `Opposite`. Use as `induction x using Opposite.rec`. -/
+/-- A recursor for `Opposite`. Use as `induction x using Opposite.rec'`. -/
@[simp]
protected def rec' {F : αᵒᵖ → Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
#align opposite.rec Opposite.rec'
@@ -13,9 +13,10 @@ import Mathlib.Logic.Equiv.Defs
/-!
# Opposites
-In this file we define a type synonym `Opposite α := α`, denoted by `αᵒᵖ` and two synonyms for the
-identity map, `op : α → αᵒᵖ` and `unop : αᵒᵖ → α`. If `α` is a category, then `αᵒᵖ` is the opposite
-category, with all arrows reversed.
+In this file we define a structure `Opposite α` containing a single field of type `α` and
+two bijections `op : α → αᵒᵖ` and `unop : αᵒᵖ → α`. If `α` is a category, then `αᵒᵖ` is the
+opposite category, with all arrows reversed.
+
-/
@@ -24,31 +25,21 @@ universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
variable (α : Sort u)
+-- porting note: in mathlib, `opposite α` was a type synonym for `α`, but if we did
+-- the same in Lean4, one could write problematic definitions like:
+-- example (X : C) : Cᵒᵖ := X
+-- example {X Y : C} (f : X ⟶ Y): op Y ⟶ op X := f
/-- The type of objects of the opposite of `α`; used to define the opposite category.
- In order to avoid confusion between `α` and its opposite type, we
- set up the type of objects `Opposite α` using the following pattern,
- which will be repeated later for the morphisms.
-
- 1. Define `Opposite α := α`.
- 2. Define the isomorphisms `op : α → Opposite α`, `unop : Opposite α → α`.
- 3. Make the definition `Opposite` irreducible.
-
- This has the following consequences.
+ Now that Lean 4 supports definitional eta equality for records,
+ both `unop (op X) = X` and `op (unop X) = X` are definitional equalities.
- * `Opposite α` and `α` are distinct types in the elaborator, so you
- must use `op` and `unop` explicitly to convert between them.
- * Both `unop (op X) = X` and `op (unop X) = X` are definitional
- equalities. Notably, every object of the opposite category is
- definitionally of the form `op X`, which greatly simplifies the
- definition of the structure of the opposite category, for example.
-
- (Now that Lean 4 supports definitional eta equality for records, we could
- achieve the same goals using a structure with one field.)
-/
-def Opposite : Sort u :=
- α
+structure Opposite :=
+ /-- The canonical map `αᵒᵖ → α`. -/
+ unop : α
#align opposite Opposite
+#align opposite.unop Opposite.unop
@[inherit_doc]
notation:max -- Use a high right binding power (like that of postfix ⁻¹) so that, for example,
@@ -62,21 +53,13 @@ variable {α}
/-- The canonical map `α → αᵒᵖ`. -/
-- Porting note: pp_nodot has not been implemented.
--@[pp_nodot]
-def op : α → αᵒᵖ :=
- id
+def op (x : α) : αᵒᵖ := ⟨x⟩
#align opposite.op Opposite.op
-/-- The canonical map `αᵒᵖ → α`. -/
--- Porting note: pp_nodot has not been implemented.
---@[pp_nodot]
-def unop : αᵒᵖ → α :=
- id
-#align opposite.unop Opposite.unop
-
-theorem op_injective : Function.Injective (op : α → αᵒᵖ) := fun _ _ => id
+theorem op_injective : Function.Injective (op : α → αᵒᵖ) := fun _ _ => congr_arg Opposite.unop
#align opposite.op_injective Opposite.op_injective
-theorem unop_injective : Function.Injective (unop : αᵒᵖ → α) := fun _ _ => id
+theorem unop_injective : Function.Injective (unop : αᵒᵖ → α) := fun ⟨_⟩⟨_⟩ => by simp
#align opposite.unop_injective Opposite.unop_injective
@[simp]
@@ -132,7 +115,7 @@ instance [Inhabited α] : Inhabited αᵒᵖ :=
/-- A recursor for `Opposite`. Use as `induction x using Opposite.rec`. -/
@[simp]
-protected def rec {F : αᵒᵖ → Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
-#align opposite.rec Opposite.rec
+protected def rec' {F : αᵒᵖ → Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
+#align opposite.rec Opposite.rec'
end Opposite
@@ -21,7 +21,7 @@ category, with all arrows reversed.
universe v u
--- morphism levels before object levels. See note [category_theory universes].
+-- morphism levels before object levels. See note [CategoryTheory universes].
variable (α : Sort u)
/-- The type of objects of the opposite of `α`; used to define the opposite category.
This PR is the result of a slight variant on the following "algorithm"
_
and make all uppercase letters into lowercase_
and make all uppercase letters into lowercase(original_lean3_name, OriginalLean4Name)
#align
statement just before the next empty line#align
statement to have been inserted too early)@@ -64,14 +64,17 @@ variable {α}
--@[pp_nodot]
def op : α → αᵒᵖ :=
id
+#align opposite.op Opposite.op
/-- The canonical map `αᵒᵖ → α`. -/
-- Porting note: pp_nodot has not been implemented.
--@[pp_nodot]
def unop : αᵒᵖ → α :=
id
+#align opposite.unop Opposite.unop
theorem op_injective : Function.Injective (op : α → αᵒᵖ) := fun _ _ => id
+#align opposite.op_injective Opposite.op_injective
theorem unop_injective : Function.Injective (unop : αᵒᵖ → α) := fun _ _ => id
#align opposite.unop_injective Opposite.unop_injective
@@ -79,20 +82,24 @@ theorem unop_injective : Function.Injective (unop : αᵒᵖ → α) := fun _ _
@[simp]
theorem op_unop (x : αᵒᵖ) : op (unop x) = x :=
rfl
+#align opposite.op_unop Opposite.op_unop
@[simp]
theorem unop_op (x : α) : unop (op x) = x :=
rfl
+#align opposite.unop_op Opposite.unop_op
-- We could prove these by `Iff.rfl`, but that would make these eligible for `dsimp`. That would be
-- a bad idea because `Opposite` is irreducible.
@[simp]
theorem op_inj_iff (x y : α) : op x = op y ↔ x = y :=
op_injective.eq_iff
+#align opposite.op_inj_iff Opposite.op_inj_iff
@[simp]
theorem unop_inj_iff (x y : αᵒᵖ) : unop x = unop y ↔ x = y :=
unop_injective.eq_iff
+#align opposite.unop_inj_iff Opposite.unop_inj_iff
/-- The type-level equivalence between a type and its opposite. -/
def equivToOpposite : α ≃ αᵒᵖ where
@@ -100,6 +107,7 @@ def equivToOpposite : α ≃ αᵒᵖ where
invFun := unop
left_inv := unop_op
right_inv := op_unop
+#align opposite.equiv_to_opposite Opposite.equivToOpposite
@[simp]
theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op :=
@@ -113,9 +121,11 @@ theorem equivToOpposite_symm_coe : (equivToOpposite.symm : αᵒᵖ → α) = un
theorem op_eq_iff_eq_unop {x : α} {y} : op x = y ↔ x = unop y :=
equivToOpposite.apply_eq_iff_eq_symm_apply
+#align opposite.op_eq_iff_eq_unop Opposite.op_eq_iff_eq_unop
theorem unop_eq_iff_eq_op {x} {y : α} : unop x = y ↔ x = op y :=
equivToOpposite.symm.apply_eq_iff_eq_symm_apply
+#align opposite.unop_eq_iff_eq_op Opposite.unop_eq_iff_eq_op
instance [Inhabited α] : Inhabited αᵒᵖ :=
⟨op default⟩
@@ -123,5 +133,6 @@ instance [Inhabited α] : Inhabited αᵒᵖ :=
/-- A recursor for `Opposite`. Use as `induction x using Opposite.rec`. -/
@[simp]
protected def rec {F : αᵒᵖ → Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
+#align opposite.rec Opposite.rec
end Opposite
@@ -52,7 +52,7 @@ def Opposite : Sort u :=
@[inherit_doc]
notation:max -- Use a high right binding power (like that of postfix ⁻¹) so that, for example,
--- `presheaf Cᵒᵖ` parses as `presheaf (Cᵒᵖ)` and not `(presheaf C)ᵒᵖ`.
+-- `Presheaf Cᵒᵖ` parses as `Presheaf (Cᵒᵖ)` and not `(Presheaf C)ᵒᵖ`.
α "ᵒᵖ" => Opposite α
namespace Opposite
@@ -84,8 +84,8 @@ theorem op_unop (x : αᵒᵖ) : op (unop x) = x :=
theorem unop_op (x : α) : unop (op x) = x :=
rfl
--- We could prove these by `iff.rfl`, but that would make these eligible for `dsimp`. That would be
--- a bad idea because `opposite` is irreducible.
+-- We could prove these by `Iff.rfl`, but that would make these eligible for `dsimp`. That would be
+-- a bad idea because `Opposite` is irreducible.
@[simp]
theorem op_inj_iff (x y : α) : op x = op y ↔ x = y :=
op_injective.eq_iff
@@ -125,4 +125,3 @@ instance [Inhabited α] : Inhabited αᵒᵖ :=
protected def rec {F : αᵒᵖ → Sort v} (h : ∀ X, F (op X)) : ∀ X, F X := fun X => h (unop X)
end Opposite
-
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
@@ -2,6 +2,11 @@
Copyright (c) 2018 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Reid Barton, Simon Hudon, Kenny Lau
+
+! This file was ported from Lean 3 source module data.opposite
+! leanprover-community/mathlib commit 99e8971dc62f1f7ecf693d75e75fbbabd55849de
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
-/
import Mathlib.Logic.Equiv.Defs
All dependencies are ported!