order.grade
β·
Mathlib.Order.Grade
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -73,7 +73,7 @@ which preserves order covering (`covby`). -/
class GradeOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] where
grade : Ξ± β π
grade_strictMono : StrictMono grade
- covby_grade β¦a b : Ξ±β¦ : a β b β grade a β grade b
+ covBy_grade β¦a b : Ξ±β¦ : a β b β grade a β grade b
#align grade_order GradeOrder
-/
@@ -121,10 +121,10 @@ def grade : Ξ± β π :=
#align grade grade
-/
-#print Covby.grade /-
-protected theorem Covby.grade (h : a β b) : grade π a β grade π b :=
- GradeOrder.covby_grade h
-#align covby.grade Covby.grade
+#print CovBy.grade /-
+protected theorem CovBy.grade (h : a β b) : grade π a β grade π b :=
+ GradeOrder.covBy_grade h
+#align covby.grade CovBy.grade
-/
variable {π}
@@ -135,11 +135,11 @@ theorem grade_strictMono : StrictMono (grade π : Ξ± β π) :=
#align grade_strict_mono grade_strictMono
-/
-#print covby_iff_lt_covby_grade /-
-theorem covby_iff_lt_covby_grade : a β b β a < b β§ grade π a β grade π b :=
+#print covBy_iff_lt_covBy_grade /-
+theorem covBy_iff_lt_covBy_grade : a β b β a < b β§ grade π a β grade π b :=
β¨fun h => β¨h.1, h.grade _β©,
And.imp_right fun h c ha hb => h.2 (grade_strictMono ha) <| grade_strictMono hbβ©
-#align covby_iff_lt_covby_grade covby_iff_lt_covby_grade
+#align covby_iff_lt_covby_grade covBy_iff_lt_covBy_grade
-/
end GradeOrder
@@ -233,10 +233,10 @@ theorem grade_ne_grade_iff : grade π a β grade π b β a β b :=
#align grade_ne_grade_iff grade_ne_grade_iff
-/
-#print grade_covby_grade_iff /-
-theorem grade_covby_grade_iff : grade π a β grade π b β a β b :=
- (covby_iff_lt_covby_grade.trans <| and_iff_right_of_imp fun h => grade_lt_grade_iff.1 h.1).symm
-#align grade_covby_grade_iff grade_covby_grade_iff
+#print grade_covBy_grade_iff /-
+theorem grade_covBy_grade_iff : grade π a β grade π b β a β b :=
+ (covBy_iff_lt_covBy_grade.trans <| and_iff_right_of_imp fun h => grade_lt_grade_iff.1 h.1).symm
+#align grade_covby_grade_iff grade_covBy_grade_iff
-/
end LinearOrder
@@ -277,7 +277,7 @@ instance Preorder.toGradeBoundedOrder : GradeBoundedOrder Ξ± Ξ±
isMin_grade _ := id
isMax_grade _ := id
grade_strictMono := strictMono_id
- covby_grade a b := id
+ covBy_grade a b := id
#align preorder.to_grade_bounded_order Preorder.toGradeBoundedOrder
-/
@@ -295,7 +295,7 @@ instance [GradeOrder π Ξ±] : GradeOrder πα΅α΅ Ξ±α΅α΅
where
grade := toDual β grade π β ofDual
grade_strictMono := grade_strictMono.dual
- covby_grade a b h := (h.ofDual.grade _).toDual
+ covBy_grade a b h := (h.ofDual.grade _).toDual
instance [GradeMaxOrder π Ξ±] : GradeMinOrder πα΅α΅ Ξ±α΅α΅ :=
{ OrderDual.gradeOrder with isMin_grade := fun _ => IsMax.grade _ }
@@ -332,7 +332,7 @@ def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono
where
grade := f β grade π
grade_strictMono := hf.comp grade_strictMono
- covby_grade a b h := hcovby _ _ <| h.grade _
+ covBy_grade a b h := hcovby _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
-/
@@ -376,7 +376,7 @@ def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f
where
grade := grade π β f
grade_strictMono := grade_strictMono.comp hf
- covby_grade a b h := (hcovby _ _ h).grade _
+ covBy_grade a b h := (hcovby _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
-/
@@ -420,7 +420,7 @@ def GradeBoundedOrder.liftRight [GradeBoundedOrder π Ξ²] (f : Ξ± β Ξ²) (hf
inferrable. -/
@[reducible]
def GradeOrder.finToNat (n : β) [GradeOrder (Fin n) Ξ±] : GradeOrder β Ξ± :=
- GradeOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono fun _ _ => Covby.coe_fin
+ GradeOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono fun _ _ => CovBy.coe_fin
#align grade_order.fin_to_nat GradeOrder.finToNat
-/
@@ -430,7 +430,7 @@ def GradeOrder.finToNat (n : β) [GradeOrder (Fin n) Ξ±] : GradeOrder β Ξ± :=
inferrable. -/
@[reducible]
def GradeMinOrder.finToNat (n : β) [GradeMinOrder (Fin n) Ξ±] : GradeMinOrder β Ξ± :=
- GradeMinOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono (fun _ _ => Covby.coe_fin) fun a h =>
+ GradeMinOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono (fun _ _ => CovBy.coe_fin) fun a h =>
by
cases n
Β· exact ((@Fin.elim0 fun _ => False) <| grade (Fin 0) a).elim
@@ -441,7 +441,7 @@ def GradeMinOrder.finToNat (n : β) [GradeMinOrder (Fin n) Ξ±] : GradeMinOrder
#print GradeOrder.natToInt /-
instance GradeOrder.natToInt [GradeOrder β Ξ±] : GradeOrder β€ Ξ± :=
- GradeOrder.liftLeft _ Int.coe_nat_strictMono fun _ _ => Covby.cast_int
+ GradeOrder.liftLeft _ Int.coe_nat_strictMono fun _ _ => CovBy.cast_int
#align grade_order.nat_to_int GradeOrder.natToInt
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2022 YaΓ«l Dillies, Violeta HernΓ‘ndez Palacios. All rights reserv
Released under Apache 2.0 license as described in the file LICENSE.
Authors: YaΓ«l Dillies, Violeta HernΓ‘ndez Palacios, Grayson Burton, Vladimir Ivanov
-/
-import Mathbin.Data.Finset.Basic
-import Mathbin.Data.Int.SuccPred
+import Data.Finset.Basic
+import Data.Int.SuccPred
#align_import order.grade from "leanprover-community/mathlib"@"cc70d9141824ea8982d1562ce009952f2c3ece30"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2022 YaΓ«l Dillies, Violeta HernΓ‘ndez Palacios. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: YaΓ«l Dillies, Violeta HernΓ‘ndez Palacios, Grayson Burton, Vladimir Ivanov
-
-! This file was ported from Lean 3 source module order.grade
-! leanprover-community/mathlib commit cc70d9141824ea8982d1562ce009952f2c3ece30
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Finset.Basic
import Mathbin.Data.Int.SuccPred
+#align_import order.grade from "leanprover-community/mathlib"@"cc70d9141824ea8982d1562ce009952f2c3ece30"
+
/-!
# Graded orders
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -116,26 +116,34 @@ section GradeOrder
variable (π) [GradeOrder π Ξ±] {a b : Ξ±}
+#print grade /-
/-- The grade of an element in a graded order. Morally, this is the number of elements you need to
go down by to get to `β₯`. -/
def grade : Ξ± β π :=
GradeOrder.grade
#align grade grade
+-/
+#print Covby.grade /-
protected theorem Covby.grade (h : a β b) : grade π a β grade π b :=
GradeOrder.covby_grade h
#align covby.grade Covby.grade
+-/
variable {π}
+#print grade_strictMono /-
theorem grade_strictMono : StrictMono (grade π : Ξ± β π) :=
GradeOrder.grade_strictMono
#align grade_strict_mono grade_strictMono
+-/
+#print covby_iff_lt_covby_grade /-
theorem covby_iff_lt_covby_grade : a β b β a < b β§ grade π a β grade π b :=
β¨fun h => β¨h.1, h.grade _β©,
And.imp_right fun h c ha hb => h.2 (grade_strictMono ha) <| grade_strictMono hbβ©
#align covby_iff_lt_covby_grade covby_iff_lt_covby_grade
+-/
end GradeOrder
@@ -143,16 +151,20 @@ section GradeMinOrder
variable (π) [GradeMinOrder π Ξ±] {a : Ξ±}
+#print IsMin.grade /-
protected theorem IsMin.grade (h : IsMin a) : IsMin (grade π a) :=
GradeMinOrder.isMin_grade h
#align is_min.grade IsMin.grade
+-/
variable {π}
+#print isMin_grade_iff /-
@[simp]
theorem isMin_grade_iff : IsMin (grade π a) β IsMin a :=
β¨grade_strictMono.isMin_of_apply, IsMin.grade _β©
#align is_min_grade_iff isMin_grade_iff
+-/
end GradeMinOrder
@@ -160,57 +172,75 @@ section GradeMaxOrder
variable (π) [GradeMaxOrder π Ξ±] {a : Ξ±}
+#print IsMax.grade /-
protected theorem IsMax.grade (h : IsMax a) : IsMax (grade π a) :=
GradeMaxOrder.isMax_grade h
#align is_max.grade IsMax.grade
+-/
variable {π}
+#print isMax_grade_iff /-
@[simp]
theorem isMax_grade_iff : IsMax (grade π a) β IsMax a :=
β¨grade_strictMono.isMax_of_apply, IsMax.grade _β©
#align is_max_grade_iff isMax_grade_iff
+-/
end GradeMaxOrder
end Preorder
+#print grade_mono /-
-- graded order
theorem grade_mono [PartialOrder Ξ±] [GradeOrder π Ξ±] : Monotone (grade π : Ξ± β π) :=
grade_strictMono.Monotone
#align grade_mono grade_mono
+-/
section LinearOrder
-- graded order
variable [LinearOrder Ξ±] [GradeOrder π Ξ±] {a b : Ξ±}
+#print grade_injective /-
theorem grade_injective : Function.Injective (grade π : Ξ± β π) :=
grade_strictMono.Injective
#align grade_injective grade_injective
+-/
+#print grade_le_grade_iff /-
@[simp]
theorem grade_le_grade_iff : grade π a β€ grade π b β a β€ b :=
grade_strictMono.le_iff_le
#align grade_le_grade_iff grade_le_grade_iff
+-/
+#print grade_lt_grade_iff /-
@[simp]
theorem grade_lt_grade_iff : grade π a < grade π b β a < b :=
grade_strictMono.lt_iff_lt
#align grade_lt_grade_iff grade_lt_grade_iff
+-/
+#print grade_eq_grade_iff /-
@[simp]
theorem grade_eq_grade_iff : grade π a = grade π b β a = b :=
grade_injective.eq_iff
#align grade_eq_grade_iff grade_eq_grade_iff
+-/
+#print grade_ne_grade_iff /-
theorem grade_ne_grade_iff : grade π a β grade π b β a β b :=
grade_injective.ne_iff
#align grade_ne_grade_iff grade_ne_grade_iff
+-/
+#print grade_covby_grade_iff /-
theorem grade_covby_grade_iff : grade π a β grade π b β a β b :=
(covby_iff_lt_covby_grade.trans <| and_iff_right_of_imp fun h => grade_lt_grade_iff.1 h.1).symm
#align grade_covby_grade_iff grade_covby_grade_iff
+-/
end LinearOrder
@@ -222,15 +252,19 @@ section PartialOrder
variable [PartialOrder π] [Preorder Ξ±]
+#print grade_bot /-
@[simp]
theorem grade_bot [OrderBot π] [OrderBot Ξ±] [GradeMinOrder π Ξ±] : grade π (β₯ : Ξ±) = β₯ :=
(isMin_bot.grade _).eq_bot
#align grade_bot grade_bot
+-/
+#print grade_top /-
@[simp]
theorem grade_top [OrderTop π] [OrderTop Ξ±] [GradeMaxOrder π Ξ±] : grade π (β€ : Ξ±) = β€ :=
(isMax_top.grade _).eq_top
#align grade_top grade_top
+-/
end PartialOrder
@@ -275,15 +309,19 @@ instance [GradeMinOrder π Ξ±] : GradeMaxOrder πα΅α΅ Ξ±α΅α΅ :=
instance [GradeBoundedOrder π Ξ±] : GradeBoundedOrder πα΅α΅ Ξ±α΅α΅ :=
{ OrderDual.gradeMinOrder, OrderDual.gradeMaxOrder with }
+#print grade_toDual /-
@[simp]
theorem grade_toDual [GradeOrder π Ξ±] (a : Ξ±) : grade πα΅α΅ (toDual a) = toDual (grade π a) :=
rfl
#align grade_to_dual grade_toDual
+-/
+#print grade_ofDual /-
@[simp]
theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a) = ofDual (grade πα΅α΅ a) :=
rfl
#align grade_of_dual grade_ofDual
+-/
/-! #### Lifting a graded order -/
@@ -379,6 +417,7 @@ def GradeBoundedOrder.liftRight [GradeBoundedOrder π Ξ²] (f : Ξ± β Ξ²) (hf
/-! #### `fin n`-graded to `β`-graded to `β€`-graded -/
+#print GradeOrder.finToNat /-
-- See note [reducible non-instances]
/-- A `fin n`-graded order is also `β`-graded. We do not mark this an instance because `n` is not
inferrable. -/
@@ -386,7 +425,9 @@ inferrable. -/
def GradeOrder.finToNat (n : β) [GradeOrder (Fin n) Ξ±] : GradeOrder β Ξ± :=
GradeOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono fun _ _ => Covby.coe_fin
#align grade_order.fin_to_nat GradeOrder.finToNat
+-/
+#print GradeMinOrder.finToNat /-
-- See note [reducible non-instances]
/-- A `fin n`-graded order is also `β`-graded. We do not mark this an instance because `n` is not
inferrable. -/
@@ -399,6 +440,7 @@ def GradeMinOrder.finToNat (n : β) [GradeMinOrder (Fin n) Ξ±] : GradeMinOrder
rw [h.eq_bot, Fin.bot_eq_zero]
exact isMin_bot
#align grade_min_order.fin_to_nat GradeMinOrder.finToNat
+-/
#print GradeOrder.natToInt /-
instance GradeOrder.natToInt [GradeOrder β Ξ±] : GradeOrder β€ Ξ± :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -98,7 +98,7 @@ class GradeMaxOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends Gra
/-- A `π`-graded order where minimal elements have minimal grades and maximal elements have maximal
grades. -/
class GradeBoundedOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeMinOrder π Ξ±,
- GradeMaxOrder π Ξ±
+ GradeMaxOrder π Ξ±
#align grade_bounded_order GradeBoundedOrder
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -288,6 +288,7 @@ theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a)
/-! #### Lifting a graded order -/
+#print GradeOrder.liftLeft /-
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -298,7 +299,9 @@ def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono
grade_strictMono := hf.comp grade_strictMono
covby_grade a b h := hcovby _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
+-/
+#print GradeMinOrder.liftLeft /-
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -306,7 +309,9 @@ def GradeMinOrder.liftLeft [GradeMinOrder π Ξ±] (f : π β β) (hf : Stri
(hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder β Ξ± :=
{ GradeOrder.liftLeft f hf hcovby with isMin_grade := fun a ha => hmin _ <| ha.grade _ }
#align grade_min_order.lift_left GradeMinOrder.liftLeft
+-/
+#print GradeMaxOrder.liftLeft /-
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -314,7 +319,9 @@ def GradeMaxOrder.liftLeft [GradeMaxOrder π Ξ±] (f : π β β) (hf : Stri
(hcovby : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder β Ξ± :=
{ GradeOrder.liftLeft f hf hcovby with isMax_grade := fun a ha => hmax _ <| ha.grade _ }
#align grade_max_order.lift_left GradeMaxOrder.liftLeft
+-/
+#print GradeBoundedOrder.liftLeft /-
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -323,7 +330,9 @@ def GradeBoundedOrder.liftLeft [GradeBoundedOrder π Ξ±] (f : π β β) (h
(hmax : β a, IsMax a β IsMax (f a)) : GradeBoundedOrder β Ξ± :=
{ GradeMinOrder.liftLeft f hf hcovby hmin, GradeMaxOrder.liftLeft f hf hcovby hmax with }
#align grade_bounded_order.lift_left GradeBoundedOrder.liftLeft
+-/
+#print GradeOrder.liftRight /-
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -334,7 +343,9 @@ def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f
grade_strictMono := grade_strictMono.comp hf
covby_grade a b h := (hcovby _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
+-/
+#print GradeMinOrder.liftRight /-
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -342,7 +353,9 @@ def GradeMinOrder.liftRight [GradeMinOrder π Ξ²] (f : Ξ± β Ξ²) (hf : Strict
(hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder π Ξ± :=
{ GradeOrder.liftRight f hf hcovby with isMin_grade := fun a ha => (hmin _ ha).grade _ }
#align grade_min_order.lift_right GradeMinOrder.liftRight
+-/
+#print GradeMaxOrder.liftRight /-
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -350,7 +363,9 @@ def GradeMaxOrder.liftRight [GradeMaxOrder π Ξ²] (f : Ξ± β Ξ²) (hf : Strict
(hcovby : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder π Ξ± :=
{ GradeOrder.liftRight f hf hcovby with isMax_grade := fun a ha => (hmax _ ha).grade _ }
#align grade_max_order.lift_right GradeMaxOrder.liftRight
+-/
+#print GradeBoundedOrder.liftRight /-
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -359,6 +374,7 @@ def GradeBoundedOrder.liftRight [GradeBoundedOrder π Ξ²] (f : Ξ± β Ξ²) (hf
(hmax : β a, IsMax a β IsMax (f a)) : GradeBoundedOrder π Ξ± :=
{ GradeMinOrder.liftRight f hf hcovby hmin, GradeMaxOrder.liftRight f hf hcovby hmax with }
#align grade_bounded_order.lift_right GradeBoundedOrder.liftRight
+-/
/-! #### `fin n`-graded to `β`-graded to `β€`-graded -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -116,46 +116,22 @@ section GradeOrder
variable (π) [GradeOrder π Ξ±] {a b : Ξ±}
-/- warning: grade -> grade is a dubious translation:
-lean 3 declaration is
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2], Ξ± -> π
-but is expected to have type
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1], Ξ± -> π
-Case conversion may be inaccurate. Consider using '#align grade gradeβ'. -/
/-- The grade of an element in a graded order. Morally, this is the number of elements you need to
go down by to get to `β₯`. -/
def grade : Ξ± β π :=
GradeOrder.grade
#align grade grade
-/- warning: covby.grade -> Covby.grade is a dubious translation:
-lean 3 declaration is
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±} {b : Ξ±}, (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_2) a b) -> (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b))
-but is expected to have type
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1] {a : Ξ±} {b : Ξ±}, (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_1) a b) -> (Covby.{u1} π (Preorder.toLT.{u1} π _inst_2) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b))
-Case conversion may be inaccurate. Consider using '#align covby.grade Covby.gradeβ'. -/
protected theorem Covby.grade (h : a β b) : grade π a β grade π b :=
GradeOrder.covby_grade h
#align covby.grade Covby.grade
variable {π}
-/- warning: grade_strict_mono -> grade_strictMono is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2], StrictMono.{u2, u1} Ξ± π _inst_2 _inst_1 (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1], StrictMono.{u2, u1} Ξ± π _inst_1 _inst_2 (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_strict_mono grade_strictMonoβ'. -/
theorem grade_strictMono : StrictMono (grade π : Ξ± β π) :=
GradeOrder.grade_strictMono
#align grade_strict_mono grade_strictMono
-/- warning: covby_iff_lt_covby_grade -> covby_iff_lt_covby_grade is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_2) a b) (And (LT.lt.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_2) a b) (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b)))
-but is expected to have type
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_1) a b) (And (LT.lt.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_1) a b) (Covby.{u1} π (Preorder.toLT.{u1} π _inst_2) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b)))
-Case conversion may be inaccurate. Consider using '#align covby_iff_lt_covby_grade covby_iff_lt_covby_gradeβ'. -/
theorem covby_iff_lt_covby_grade : a β b β a < b β§ grade π a β grade π b :=
β¨fun h => β¨h.1, h.grade _β©,
And.imp_right fun h c ha hb => h.2 (grade_strictMono ha) <| grade_strictMono hbβ©
@@ -167,24 +143,12 @@ section GradeMinOrder
variable (π) [GradeMinOrder π Ξ±] {a : Ξ±}
-/- warning: is_min.grade -> IsMin.grade is a dubious translation:
-lean 3 declaration is
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, (IsMin.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) a) -> (IsMin.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a))
-but is expected to have type
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeMinOrder.{u1, u2} π Ξ± _inst_2 _inst_1] {a : Ξ±}, (IsMin.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_1) a) -> (IsMin.{u1} π (Preorder.toLE.{u1} π _inst_2) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1 _inst_3) a))
-Case conversion may be inaccurate. Consider using '#align is_min.grade IsMin.gradeβ'. -/
protected theorem IsMin.grade (h : IsMin a) : IsMin (grade π a) :=
GradeMinOrder.isMin_grade h
#align is_min.grade IsMin.grade
variable {π}
-/- warning: is_min_grade_iff -> isMin_grade_iff is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, Iff (IsMin.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a)) (IsMin.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) a)
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeMinOrder.{u2, u1} π Ξ± _inst_2 _inst_1] {a : Ξ±}, Iff (IsMin.{u2} π (Preorder.toLE.{u2} π _inst_2) (grade.{u2, u1} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u2, u1} π Ξ± _inst_2 _inst_1 _inst_3) a)) (IsMin.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_1) a)
-Case conversion may be inaccurate. Consider using '#align is_min_grade_iff isMin_grade_iffβ'. -/
@[simp]
theorem isMin_grade_iff : IsMin (grade π a) β IsMin a :=
β¨grade_strictMono.isMin_of_apply, IsMin.grade _β©
@@ -196,24 +160,12 @@ section GradeMaxOrder
variable (π) [GradeMaxOrder π Ξ±] {a : Ξ±}
-/- warning: is_max.grade -> IsMax.grade is a dubious translation:
-lean 3 declaration is
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, (IsMax.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) a) -> (IsMax.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a))
-but is expected to have type
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeMaxOrder.{u1, u2} π Ξ± _inst_2 _inst_1] {a : Ξ±}, (IsMax.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_1) a) -> (IsMax.{u1} π (Preorder.toLE.{u1} π _inst_2) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1 _inst_3) a))
-Case conversion may be inaccurate. Consider using '#align is_max.grade IsMax.gradeβ'. -/
protected theorem IsMax.grade (h : IsMax a) : IsMax (grade π a) :=
GradeMaxOrder.isMax_grade h
#align is_max.grade IsMax.grade
variable {π}
-/- warning: is_max_grade_iff -> isMax_grade_iff is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, Iff (IsMax.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a)) (IsMax.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) a)
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeMaxOrder.{u2, u1} π Ξ± _inst_2 _inst_1] {a : Ξ±}, Iff (IsMax.{u2} π (Preorder.toLE.{u2} π _inst_2) (grade.{u2, u1} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u2, u1} π Ξ± _inst_2 _inst_1 _inst_3) a)) (IsMax.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_1) a)
-Case conversion may be inaccurate. Consider using '#align is_max_grade_iff isMax_grade_iffβ'. -/
@[simp]
theorem isMax_grade_iff : IsMax (grade π a) β IsMax a :=
β¨grade_strictMono.isMax_of_apply, IsMax.grade _β©
@@ -223,12 +175,6 @@ end GradeMaxOrder
end Preorder
-/- warning: grade_mono -> grade_mono is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : PartialOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± _inst_2)], Monotone.{u2, u1} Ξ± π (PartialOrder.toPreorder.{u2} Ξ± _inst_2) _inst_1 (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± _inst_2) _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : PartialOrder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_2 (PartialOrder.toPreorder.{u2} Ξ± _inst_1)], Monotone.{u2, u1} Ξ± π (PartialOrder.toPreorder.{u2} Ξ± _inst_1) _inst_2 (grade.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u2} Ξ± _inst_1) _inst_2 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_mono grade_monoβ'. -/
-- graded order
theorem grade_mono [PartialOrder Ξ±] [GradeOrder π Ξ±] : Monotone (grade π : Ξ± β π) :=
grade_strictMono.Monotone
@@ -239,65 +185,29 @@ section LinearOrder
-- graded order
variable [LinearOrder Ξ±] [GradeOrder π Ξ±] {a b : Ξ±}
-/- warning: grade_injective -> grade_injective is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))], Function.Injective.{succ u2, succ u1} Ξ± π (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : LinearOrder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_2 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (DistribLattice.toLattice.{u2} Ξ± (instDistribLattice.{u2} Ξ± _inst_1)))))], Function.Injective.{succ u2, succ u1} Ξ± π (grade.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (DistribLattice.toLattice.{u2} Ξ± (instDistribLattice.{u2} Ξ± _inst_1))))) _inst_2 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_injective grade_injectiveβ'. -/
theorem grade_injective : Function.Injective (grade π : Ξ± β π) :=
grade_strictMono.Injective
#align grade_injective grade_injective
-/- warning: grade_le_grade_iff -> grade_le_grade_iff is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (LE.le.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (LE.le.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : LinearOrder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeOrder.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))] {a : Ξ±} {b : Ξ±}, Iff (LE.le.{u2} π (Preorder.toLE.{u2} π _inst_2) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 a) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 b)) (LE.le.{u1} Ξ± (Preorder.toLE.{u1} Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))) a b)
-Case conversion may be inaccurate. Consider using '#align grade_le_grade_iff grade_le_grade_iffβ'. -/
@[simp]
theorem grade_le_grade_iff : grade π a β€ grade π b β a β€ b :=
grade_strictMono.le_iff_le
#align grade_le_grade_iff grade_le_grade_iff
-/- warning: grade_lt_grade_iff -> grade_lt_grade_iff is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (LT.lt.{u1} π (Preorder.toHasLt.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (LT.lt.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : LinearOrder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeOrder.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))] {a : Ξ±} {b : Ξ±}, Iff (LT.lt.{u2} π (Preorder.toLT.{u2} π _inst_2) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 a) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 b)) (LT.lt.{u1} Ξ± (Preorder.toLT.{u1} Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))) a b)
-Case conversion may be inaccurate. Consider using '#align grade_lt_grade_iff grade_lt_grade_iffβ'. -/
@[simp]
theorem grade_lt_grade_iff : grade π a < grade π b β a < b :=
grade_strictMono.lt_iff_lt
#align grade_lt_grade_iff grade_lt_grade_iff
-/- warning: grade_eq_grade_iff -> grade_eq_grade_iff is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (Eq.{succ u1} π (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (Eq.{succ u2} Ξ± a b)
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : LinearOrder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeOrder.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))] {a : Ξ±} {b : Ξ±}, Iff (Eq.{succ u2} π (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 a) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 b)) (Eq.{succ u1} Ξ± a b)
-Case conversion may be inaccurate. Consider using '#align grade_eq_grade_iff grade_eq_grade_iffβ'. -/
@[simp]
theorem grade_eq_grade_iff : grade π a = grade π b β a = b :=
grade_injective.eq_iff
#align grade_eq_grade_iff grade_eq_grade_iff
-/- warning: grade_ne_grade_iff -> grade_ne_grade_iff is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (Ne.{succ u1} π (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (Ne.{succ u2} Ξ± a b)
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : LinearOrder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeOrder.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))] {a : Ξ±} {b : Ξ±}, Iff (Ne.{succ u2} π (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 a) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 b)) (Ne.{succ u1} Ξ± a b)
-Case conversion may be inaccurate. Consider using '#align grade_ne_grade_iff grade_ne_grade_iffβ'. -/
theorem grade_ne_grade_iff : grade π a β grade π b β a β b :=
grade_injective.ne_iff
#align grade_ne_grade_iff grade_ne_grade_iff
-/- warning: grade_covby_grade_iff -> grade_covby_grade_iff is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : LinearOrder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeOrder.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u2} π (Preorder.toLT.{u2} π _inst_2) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 a) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 b)) (Covby.{u1} Ξ± (Preorder.toLT.{u1} Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))) a b)
-Case conversion may be inaccurate. Consider using '#align grade_covby_grade_iff grade_covby_grade_iffβ'. -/
theorem grade_covby_grade_iff : grade π a β grade π b β a β b :=
(covby_iff_lt_covby_grade.trans <| and_iff_right_of_imp fun h => grade_lt_grade_iff.1 h.1).symm
#align grade_covby_grade_iff grade_covby_grade_iff
@@ -312,23 +222,11 @@ section PartialOrder
variable [PartialOrder π] [Preorder Ξ±]
-/- warning: grade_bot -> grade_bot is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : PartialOrder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : OrderBot.{u1} π (Preorder.toHasLe.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1))] [_inst_4 : OrderBot.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2)] [_inst_5 : GradeMinOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2], Eq.{succ u1} π (grade.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 _inst_5) (Bot.bot.{u2} Ξ± (OrderBot.toHasBot.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) _inst_4))) (Bot.bot.{u1} π (OrderBot.toHasBot.{u1} π (Preorder.toHasLe.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1)) _inst_3))
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : PartialOrder.{u2} π] [_inst_2 : Preorder.{u1} Ξ±] [_inst_3 : OrderBot.{u2} π (Preorder.toLE.{u2} π (PartialOrder.toPreorder.{u2} π _inst_1))] [_inst_4 : OrderBot.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_2)] [_inst_5 : GradeMinOrder.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u2} π _inst_1) _inst_2], Eq.{succ u2} π (grade.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u2} π _inst_1) (GradeMinOrder.toGradeOrder.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u2} π _inst_1) _inst_2 _inst_5) (Bot.bot.{u1} Ξ± (OrderBot.toBot.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_2) _inst_4))) (Bot.bot.{u2} π (OrderBot.toBot.{u2} π (Preorder.toLE.{u2} π (PartialOrder.toPreorder.{u2} π _inst_1)) _inst_3))
-Case conversion may be inaccurate. Consider using '#align grade_bot grade_botβ'. -/
@[simp]
theorem grade_bot [OrderBot π] [OrderBot Ξ±] [GradeMinOrder π Ξ±] : grade π (β₯ : Ξ±) = β₯ :=
(isMin_bot.grade _).eq_bot
#align grade_bot grade_bot
-/- warning: grade_top -> grade_top is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : PartialOrder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : OrderTop.{u1} π (Preorder.toHasLe.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1))] [_inst_4 : OrderTop.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2)] [_inst_5 : GradeMaxOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2], Eq.{succ u1} π (grade.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 _inst_5) (Top.top.{u2} Ξ± (OrderTop.toHasTop.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) _inst_4))) (Top.top.{u1} π (OrderTop.toHasTop.{u1} π (Preorder.toHasLe.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1)) _inst_3))
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : PartialOrder.{u2} π] [_inst_2 : Preorder.{u1} Ξ±] [_inst_3 : OrderTop.{u2} π (Preorder.toLE.{u2} π (PartialOrder.toPreorder.{u2} π _inst_1))] [_inst_4 : OrderTop.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_2)] [_inst_5 : GradeMaxOrder.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u2} π _inst_1) _inst_2], Eq.{succ u2} π (grade.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u2} π _inst_1) (GradeMaxOrder.toGradeOrder.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u2} π _inst_1) _inst_2 _inst_5) (Top.top.{u1} Ξ± (OrderTop.toTop.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_2) _inst_4))) (Top.top.{u2} π (OrderTop.toTop.{u2} π (Preorder.toLE.{u2} π (PartialOrder.toPreorder.{u2} π _inst_1)) _inst_3))
-Case conversion may be inaccurate. Consider using '#align grade_top grade_topβ'. -/
@[simp]
theorem grade_top [OrderTop π] [OrderTop Ξ±] [GradeMaxOrder π Ξ±] : grade π (β€ : Ξ±) = β€ :=
(isMax_top.grade _).eq_top
@@ -377,23 +275,11 @@ instance [GradeMinOrder π Ξ±] : GradeMaxOrder πα΅α΅ Ξ±α΅α΅ :=
instance [GradeBoundedOrder π Ξ±] : GradeBoundedOrder πα΅α΅ Ξ±α΅α΅ :=
{ OrderDual.gradeMinOrder, OrderDual.gradeMaxOrder with }
-/- warning: grade_to_dual -> grade_toDual is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_5 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3] (a : Ξ±), Eq.{succ u1} (OrderDual.{u1} π) (grade.{u1, u2} (OrderDual.{u1} π) (OrderDual.{u2} Ξ±) (OrderDual.preorder.{u1} π _inst_1) (OrderDual.preorder.{u2} Ξ± _inst_3) (OrderDual.gradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) (fun (_x : Equiv.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) => Ξ± -> (OrderDual.{u2} Ξ±)) (Equiv.hasCoeToFun.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) (OrderDual.toDual.{u2} Ξ±) a)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} π (OrderDual.{u1} π)) (fun (_x : Equiv.{succ u1, succ u1} π (OrderDual.{u1} π)) => π -> (OrderDual.{u1} π)) (Equiv.hasCoeToFun.{succ u1, succ u1} π (OrderDual.{u1} π)) (OrderDual.toDual.{u1} π) (grade.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5 a))
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : Ξ±), Eq.{succ u2} (OrderDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Ξ±) => OrderDual.{u1} Ξ±) a) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) Ξ± (fun (_x : Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Ξ±) => OrderDual.{u1} Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) (OrderDual.toDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} π (OrderDual.{u2} π)) π (fun (_x : π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : π) => OrderDual.{u2} π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} π (OrderDual.{u2} π)) (OrderDual.toDual.{u2} π) (grade.{u2, u1} π Ξ± _inst_3 _inst_1 _inst_5 a))
-Case conversion may be inaccurate. Consider using '#align grade_to_dual grade_toDualβ'. -/
@[simp]
theorem grade_toDual [GradeOrder π Ξ±] (a : Ξ±) : grade πα΅α΅ (toDual a) = toDual (grade π a) :=
rfl
#align grade_to_dual grade_toDual
-/- warning: grade_of_dual -> grade_ofDual is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_5 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3] (a : OrderDual.{u2} Ξ±), Eq.{succ u1} π (grade.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5 (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) (fun (_x : Equiv.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) => (OrderDual.{u2} Ξ±) -> Ξ±) (Equiv.hasCoeToFun.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) (OrderDual.ofDual.{u2} Ξ±) a)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (OrderDual.{u1} π) π) (fun (_x : Equiv.{succ u1, succ u1} (OrderDual.{u1} π) π) => (OrderDual.{u1} π) -> π) (Equiv.hasCoeToFun.{succ u1, succ u1} (OrderDual.{u1} π) π) (OrderDual.ofDual.{u1} π) (grade.{u1, u2} (OrderDual.{u1} π) (OrderDual.{u2} Ξ±) (OrderDual.preorder.{u1} π _inst_1) (OrderDual.preorder.{u2} Ξ± _inst_3) (OrderDual.gradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5) a))
-but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : OrderDual.{u1} Ξ±), Eq.{succ u2} π (grade.{u2, u1} π ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : OrderDual.{u1} Ξ±) => Ξ±) a) _inst_3 _inst_1 _inst_5 (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.{u1} Ξ±) (fun (_x : OrderDual.{u1} Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : OrderDual.{u1} Ξ±) => Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.ofDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.{u2} π) (fun (_x : OrderDual.{u2} π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : OrderDual.{u2} π) => π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.ofDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) (OrderDual.{u1} Ξ±) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) a))
-Case conversion may be inaccurate. Consider using '#align grade_of_dual grade_ofDualβ'. -/
@[simp]
theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a) = ofDual (grade πα΅α΅ a) :=
rfl
@@ -402,12 +288,6 @@ theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a)
/-! #### Lifting a graded order -/
-/- warning: grade_order.lift_left -> GradeOrder.liftLeft is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (f a) (f b))) -> (GradeOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toLT.{u2} β _inst_2) (f a) (f b))) -> (GradeOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_order.lift_left GradeOrder.liftLeftβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -419,12 +299,6 @@ def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono
covby_grade a b h := hcovby _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
-/- warning: grade_min_order.lift_left -> GradeMinOrder.liftLeft is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeMinOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMin.{u1} π (Preorder.toHasLe.{u1} π _inst_1) a) -> (IsMin.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (f a))) -> (GradeMinOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeMinOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toLT.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMin.{u1} π (Preorder.toLE.{u1} π _inst_1) a) -> (IsMin.{u2} β (Preorder.toLE.{u2} β _inst_2) (f a))) -> (GradeMinOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_min_order.lift_left GradeMinOrder.liftLeftβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -433,12 +307,6 @@ def GradeMinOrder.liftLeft [GradeMinOrder π Ξ±] (f : π β β) (hf : Stri
{ GradeOrder.liftLeft f hf hcovby with isMin_grade := fun a ha => hmin _ <| ha.grade _ }
#align grade_min_order.lift_left GradeMinOrder.liftLeft
-/- warning: grade_max_order.lift_left -> GradeMaxOrder.liftLeft is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeMaxOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMax.{u1} π (Preorder.toHasLe.{u1} π _inst_1) a) -> (IsMax.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (f a))) -> (GradeMaxOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeMaxOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toLT.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMax.{u1} π (Preorder.toLE.{u1} π _inst_1) a) -> (IsMax.{u2} β (Preorder.toLE.{u2} β _inst_2) (f a))) -> (GradeMaxOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_max_order.lift_left GradeMaxOrder.liftLeftβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -447,12 +315,6 @@ def GradeMaxOrder.liftLeft [GradeMaxOrder π Ξ±] (f : π β β) (hf : Stri
{ GradeOrder.liftLeft f hf hcovby with isMax_grade := fun a ha => hmax _ <| ha.grade _ }
#align grade_max_order.lift_left GradeMaxOrder.liftLeft
-/- warning: grade_bounded_order.lift_left -> GradeBoundedOrder.liftLeft is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeBoundedOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMin.{u1} π (Preorder.toHasLe.{u1} π _inst_1) a) -> (IsMin.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (f a))) -> (forall (a : π), (IsMax.{u1} π (Preorder.toHasLe.{u1} π _inst_1) a) -> (IsMax.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (f a))) -> (GradeBoundedOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeBoundedOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toLT.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMin.{u1} π (Preorder.toLE.{u1} π _inst_1) a) -> (IsMin.{u2} β (Preorder.toLE.{u2} β _inst_2) (f a))) -> (forall (a : π), (IsMax.{u1} π (Preorder.toLE.{u1} π _inst_1) a) -> (IsMax.{u2} β (Preorder.toLE.{u2} β _inst_2) (f a))) -> (GradeBoundedOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_bounded_order.lift_left GradeBoundedOrder.liftLeftβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -462,12 +324,6 @@ def GradeBoundedOrder.liftLeft [GradeBoundedOrder π Ξ±] (f : π β β) (h
{ GradeMinOrder.liftLeft f hf hcovby hmin, GradeMaxOrder.liftLeft f hf hcovby hmax with }
#align grade_bounded_order.lift_left GradeBoundedOrder.liftLeft
-/- warning: grade_order.lift_right -> GradeOrder.liftRight is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toHasLt.{u3} Ξ² _inst_4) (f a) (f b))) -> (GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toLT.{u3} Ξ² _inst_4) (f a) (f b))) -> (GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_order.lift_right GradeOrder.liftRightβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -479,12 +335,6 @@ def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f
covby_grade a b h := (hcovby _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
-/- warning: grade_min_order.lift_right -> GradeMinOrder.liftRight is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeMinOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toHasLt.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMin.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_3) a) -> (IsMin.{u3} Ξ² (Preorder.toHasLe.{u3} Ξ² _inst_4) (f a))) -> (GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeMinOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toLT.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMin.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_3) a) -> (IsMin.{u3} Ξ² (Preorder.toLE.{u3} Ξ² _inst_4) (f a))) -> (GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_min_order.lift_right GradeMinOrder.liftRightβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -493,12 +343,6 @@ def GradeMinOrder.liftRight [GradeMinOrder π Ξ²] (f : Ξ± β Ξ²) (hf : Strict
{ GradeOrder.liftRight f hf hcovby with isMin_grade := fun a ha => (hmin _ ha).grade _ }
#align grade_min_order.lift_right GradeMinOrder.liftRight
-/- warning: grade_max_order.lift_right -> GradeMaxOrder.liftRight is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeMaxOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toHasLt.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMax.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_3) a) -> (IsMax.{u3} Ξ² (Preorder.toHasLe.{u3} Ξ² _inst_4) (f a))) -> (GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeMaxOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toLT.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMax.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_3) a) -> (IsMax.{u3} Ξ² (Preorder.toLE.{u3} Ξ² _inst_4) (f a))) -> (GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_max_order.lift_right GradeMaxOrder.liftRightβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -507,12 +351,6 @@ def GradeMaxOrder.liftRight [GradeMaxOrder π Ξ²] (f : Ξ± β Ξ²) (hf : Strict
{ GradeOrder.liftRight f hf hcovby with isMax_grade := fun a ha => (hmax _ ha).grade _ }
#align grade_max_order.lift_right GradeMaxOrder.liftRight
-/- warning: grade_bounded_order.lift_right -> GradeBoundedOrder.liftRight is a dubious translation:
-lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeBoundedOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toHasLt.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMin.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_3) a) -> (IsMin.{u3} Ξ² (Preorder.toHasLe.{u3} Ξ² _inst_4) (f a))) -> (forall (a : Ξ±), (IsMax.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_3) a) -> (IsMax.{u3} Ξ² (Preorder.toHasLe.{u3} Ξ² _inst_4) (f a))) -> (GradeBoundedOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
-but is expected to have type
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeBoundedOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toLT.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMin.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_3) a) -> (IsMin.{u3} Ξ² (Preorder.toLE.{u3} Ξ² _inst_4) (f a))) -> (forall (a : Ξ±), (IsMax.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_3) a) -> (IsMax.{u3} Ξ² (Preorder.toLE.{u3} Ξ² _inst_4) (f a))) -> (GradeBoundedOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align grade_bounded_order.lift_right GradeBoundedOrder.liftRightβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -525,12 +363,6 @@ def GradeBoundedOrder.liftRight [GradeBoundedOrder π Ξ²] (f : Ξ± β Ξ²) (hf
/-! #### `fin n`-graded to `β`-graded to `β€`-graded -/
-/- warning: grade_order.fin_to_nat -> GradeOrder.finToNat is a dubious translation:
-lean 3 declaration is
- forall {Ξ± : Type.{u1}} [_inst_3 : Preorder.{u1} Ξ±] (n : Nat) [_inst_5 : GradeOrder.{0, u1} (Fin n) Ξ± (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) _inst_3], GradeOrder.{0, u1} Nat Ξ± (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) _inst_3
-but is expected to have type
- forall {Ξ± : Type.{u1}} [_inst_3 : Preorder.{u1} Ξ±] (n : Nat) [_inst_5 : GradeOrder.{0, u1} (Fin n) Ξ± (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) _inst_3], GradeOrder.{0, u1} Nat Ξ± (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) _inst_3
-Case conversion may be inaccurate. Consider using '#align grade_order.fin_to_nat GradeOrder.finToNatβ'. -/
-- See note [reducible non-instances]
/-- A `fin n`-graded order is also `β`-graded. We do not mark this an instance because `n` is not
inferrable. -/
@@ -539,12 +371,6 @@ def GradeOrder.finToNat (n : β) [GradeOrder (Fin n) Ξ±] : GradeOrder β Ξ± :=
GradeOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono fun _ _ => Covby.coe_fin
#align grade_order.fin_to_nat GradeOrder.finToNat
-/- warning: grade_min_order.fin_to_nat -> GradeMinOrder.finToNat is a dubious translation:
-lean 3 declaration is
- forall {Ξ± : Type.{u1}} [_inst_3 : Preorder.{u1} Ξ±] (n : Nat) [_inst_5 : GradeMinOrder.{0, u1} (Fin n) Ξ± (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) _inst_3], GradeMinOrder.{0, u1} Nat Ξ± (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) _inst_3
-but is expected to have type
- forall {Ξ± : Type.{u1}} [_inst_3 : Preorder.{u1} Ξ±] (n : Nat) [_inst_5 : GradeMinOrder.{0, u1} (Fin n) Ξ± (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) _inst_3], GradeMinOrder.{0, u1} Nat Ξ± (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) _inst_3
-Case conversion may be inaccurate. Consider using '#align grade_min_order.fin_to_nat GradeMinOrder.finToNatβ'. -/
-- See note [reducible non-instances]
/-- A `fin n`-graded order is also `β`-graded. We do not mark this an instance because `n` is not
inferrable. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -381,7 +381,7 @@ instance [GradeBoundedOrder π Ξ±] : GradeBoundedOrder πα΅α΅ Ξ±α΅α΅ :=
lean 3 declaration is
forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_5 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3] (a : Ξ±), Eq.{succ u1} (OrderDual.{u1} π) (grade.{u1, u2} (OrderDual.{u1} π) (OrderDual.{u2} Ξ±) (OrderDual.preorder.{u1} π _inst_1) (OrderDual.preorder.{u2} Ξ± _inst_3) (OrderDual.gradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) (fun (_x : Equiv.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) => Ξ± -> (OrderDual.{u2} Ξ±)) (Equiv.hasCoeToFun.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) (OrderDual.toDual.{u2} Ξ±) a)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} π (OrderDual.{u1} π)) (fun (_x : Equiv.{succ u1, succ u1} π (OrderDual.{u1} π)) => π -> (OrderDual.{u1} π)) (Equiv.hasCoeToFun.{succ u1, succ u1} π (OrderDual.{u1} π)) (OrderDual.toDual.{u1} π) (grade.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5 a))
but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : Ξ±), Eq.{succ u2} (OrderDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Ξ±) => OrderDual.{u1} Ξ±) a) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) Ξ± (fun (_x : Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Ξ±) => OrderDual.{u1} Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) (OrderDual.toDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} π (OrderDual.{u2} π)) π (fun (_x : π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : π) => OrderDual.{u2} π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} π (OrderDual.{u2} π)) (OrderDual.toDual.{u2} π) (grade.{u2, u1} π Ξ± _inst_3 _inst_1 _inst_5 a))
+ forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : Ξ±), Eq.{succ u2} (OrderDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Ξ±) => OrderDual.{u1} Ξ±) a) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) Ξ± (fun (_x : Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Ξ±) => OrderDual.{u1} Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) (OrderDual.toDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} π (OrderDual.{u2} π)) π (fun (_x : π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : π) => OrderDual.{u2} π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} π (OrderDual.{u2} π)) (OrderDual.toDual.{u2} π) (grade.{u2, u1} π Ξ± _inst_3 _inst_1 _inst_5 a))
Case conversion may be inaccurate. Consider using '#align grade_to_dual grade_toDualβ'. -/
@[simp]
theorem grade_toDual [GradeOrder π Ξ±] (a : Ξ±) : grade πα΅α΅ (toDual a) = toDual (grade π a) :=
@@ -392,7 +392,7 @@ theorem grade_toDual [GradeOrder π Ξ±] (a : Ξ±) : grade πα΅α΅ (toDual a)
lean 3 declaration is
forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_5 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3] (a : OrderDual.{u2} Ξ±), Eq.{succ u1} π (grade.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5 (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) (fun (_x : Equiv.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) => (OrderDual.{u2} Ξ±) -> Ξ±) (Equiv.hasCoeToFun.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) (OrderDual.ofDual.{u2} Ξ±) a)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (OrderDual.{u1} π) π) (fun (_x : Equiv.{succ u1, succ u1} (OrderDual.{u1} π) π) => (OrderDual.{u1} π) -> π) (Equiv.hasCoeToFun.{succ u1, succ u1} (OrderDual.{u1} π) π) (OrderDual.ofDual.{u1} π) (grade.{u1, u2} (OrderDual.{u1} π) (OrderDual.{u2} Ξ±) (OrderDual.preorder.{u1} π _inst_1) (OrderDual.preorder.{u2} Ξ± _inst_3) (OrderDual.gradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5) a))
but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : OrderDual.{u1} Ξ±), Eq.{succ u2} π (grade.{u2, u1} π ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : OrderDual.{u1} Ξ±) => Ξ±) a) _inst_3 _inst_1 _inst_5 (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.{u1} Ξ±) (fun (_x : OrderDual.{u1} Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : OrderDual.{u1} Ξ±) => Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.ofDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.{u2} π) (fun (_x : OrderDual.{u2} π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : OrderDual.{u2} π) => π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.ofDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) (OrderDual.{u1} Ξ±) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) a))
+ forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : OrderDual.{u1} Ξ±), Eq.{succ u2} π (grade.{u2, u1} π ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : OrderDual.{u1} Ξ±) => Ξ±) a) _inst_3 _inst_1 _inst_5 (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.{u1} Ξ±) (fun (_x : OrderDual.{u1} Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : OrderDual.{u1} Ξ±) => Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.ofDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.{u2} π) (fun (_x : OrderDual.{u2} π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : OrderDual.{u2} π) => π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.ofDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) (OrderDual.{u1} Ξ±) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) a))
Case conversion may be inaccurate. Consider using '#align grade_of_dual grade_ofDualβ'. -/
@[simp]
theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a) = ofDual (grade πα΅α΅ a) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -130,7 +130,7 @@ def grade : Ξ± β π :=
/- warning: covby.grade -> Covby.grade is a dubious translation:
lean 3 declaration is
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±} {b : Ξ±}, (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_2) a b) -> (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b))
+ forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±} {b : Ξ±}, (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_2) a b) -> (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b))
but is expected to have type
forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1] {a : Ξ±} {b : Ξ±}, (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_1) a b) -> (Covby.{u1} π (Preorder.toLT.{u1} π _inst_2) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b))
Case conversion may be inaccurate. Consider using '#align covby.grade Covby.gradeβ'. -/
@@ -152,7 +152,7 @@ theorem grade_strictMono : StrictMono (grade π : Ξ± β π) :=
/- warning: covby_iff_lt_covby_grade -> covby_iff_lt_covby_grade is a dubious translation:
lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_2) a b) (And (LT.lt.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_2) a b) (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b)))
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_2) a b) (And (LT.lt.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_2) a b) (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b)))
but is expected to have type
forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_1) a b) (And (LT.lt.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_1) a b) (Covby.{u1} π (Preorder.toLT.{u1} π _inst_2) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3 b)))
Case conversion may be inaccurate. Consider using '#align covby_iff_lt_covby_grade covby_iff_lt_covby_gradeβ'. -/
@@ -169,7 +169,7 @@ variable (π) [GradeMinOrder π Ξ±] {a : Ξ±}
/- warning: is_min.grade -> IsMin.grade is a dubious translation:
lean 3 declaration is
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, (IsMin.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_2) a) -> (IsMin.{u1} π (Preorder.toLE.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a))
+ forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, (IsMin.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) a) -> (IsMin.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a))
but is expected to have type
forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeMinOrder.{u1, u2} π Ξ± _inst_2 _inst_1] {a : Ξ±}, (IsMin.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_1) a) -> (IsMin.{u1} π (Preorder.toLE.{u1} π _inst_2) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1 _inst_3) a))
Case conversion may be inaccurate. Consider using '#align is_min.grade IsMin.gradeβ'. -/
@@ -181,7 +181,7 @@ variable {π}
/- warning: is_min_grade_iff -> isMin_grade_iff is a dubious translation:
lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, Iff (IsMin.{u1} π (Preorder.toLE.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a)) (IsMin.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_2) a)
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, Iff (IsMin.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a)) (IsMin.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) a)
but is expected to have type
forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeMinOrder.{u2, u1} π Ξ± _inst_2 _inst_1] {a : Ξ±}, Iff (IsMin.{u2} π (Preorder.toLE.{u2} π _inst_2) (grade.{u2, u1} π Ξ± _inst_1 _inst_2 (GradeMinOrder.toGradeOrder.{u2, u1} π Ξ± _inst_2 _inst_1 _inst_3) a)) (IsMin.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_1) a)
Case conversion may be inaccurate. Consider using '#align is_min_grade_iff isMin_grade_iffβ'. -/
@@ -198,7 +198,7 @@ variable (π) [GradeMaxOrder π Ξ±] {a : Ξ±}
/- warning: is_max.grade -> IsMax.grade is a dubious translation:
lean 3 declaration is
- forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, (IsMax.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_2) a) -> (IsMax.{u1} π (Preorder.toLE.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a))
+ forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, (IsMax.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) a) -> (IsMax.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a))
but is expected to have type
forall (π : Type.{u1}) {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u2} Ξ±] [_inst_2 : Preorder.{u1} π] [_inst_3 : GradeMaxOrder.{u1, u2} π Ξ± _inst_2 _inst_1] {a : Ξ±}, (IsMax.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_1) a) -> (IsMax.{u1} π (Preorder.toLE.{u1} π _inst_2) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± _inst_2 _inst_1 _inst_3) a))
Case conversion may be inaccurate. Consider using '#align is_max.grade IsMax.gradeβ'. -/
@@ -210,7 +210,7 @@ variable {π}
/- warning: is_max_grade_iff -> isMax_grade_iff is a dubious translation:
lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, Iff (IsMax.{u1} π (Preorder.toLE.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a)) (IsMax.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_2) a)
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_2] {a : Ξ±}, Iff (IsMax.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± _inst_1 _inst_2 _inst_3) a)) (IsMax.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) a)
but is expected to have type
forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeMaxOrder.{u2, u1} π Ξ± _inst_2 _inst_1] {a : Ξ±}, Iff (IsMax.{u2} π (Preorder.toLE.{u2} π _inst_2) (grade.{u2, u1} π Ξ± _inst_1 _inst_2 (GradeMaxOrder.toGradeOrder.{u2, u1} π Ξ± _inst_2 _inst_1 _inst_3) a)) (IsMax.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_1) a)
Case conversion may be inaccurate. Consider using '#align is_max_grade_iff isMax_grade_iffβ'. -/
@@ -251,7 +251,7 @@ theorem grade_injective : Function.Injective (grade π : Ξ± β π) :=
/- warning: grade_le_grade_iff -> grade_le_grade_iff is a dubious translation:
lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (LE.le.{u1} π (Preorder.toLE.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (LE.le.{u2} Ξ± (Preorder.toLE.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (LE.le.{u1} π (Preorder.toHasLe.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (LE.le.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
but is expected to have type
forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : LinearOrder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeOrder.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))] {a : Ξ±} {b : Ξ±}, Iff (LE.le.{u2} π (Preorder.toLE.{u2} π _inst_2) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 a) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 b)) (LE.le.{u1} Ξ± (Preorder.toLE.{u1} Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))) a b)
Case conversion may be inaccurate. Consider using '#align grade_le_grade_iff grade_le_grade_iffβ'. -/
@@ -262,7 +262,7 @@ theorem grade_le_grade_iff : grade π a β€ grade π b β a β€ b :=
/- warning: grade_lt_grade_iff -> grade_lt_grade_iff is a dubious translation:
lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (LT.lt.{u1} π (Preorder.toLT.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (LT.lt.{u2} Ξ± (Preorder.toLT.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (LT.lt.{u1} π (Preorder.toHasLt.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (LT.lt.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
but is expected to have type
forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : LinearOrder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeOrder.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))] {a : Ξ±} {b : Ξ±}, Iff (LT.lt.{u2} π (Preorder.toLT.{u2} π _inst_2) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 a) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 b)) (LT.lt.{u1} Ξ± (Preorder.toLT.{u1} Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))) a b)
Case conversion may be inaccurate. Consider using '#align grade_lt_grade_iff grade_lt_grade_iffβ'. -/
@@ -294,7 +294,7 @@ theorem grade_ne_grade_iff : grade π a β grade π b β a β b :=
/- warning: grade_covby_grade_iff -> grade_covby_grade_iff is a dubious translation:
lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_2 : LinearOrder.{u2} Ξ±] [_inst_3 : GradeOrder.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 a) (grade.{u1, u2} π Ξ± _inst_1 (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2)))) _inst_3 b)) (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± (PartialOrder.toPreorder.{u2} Ξ± (SemilatticeInf.toPartialOrder.{u2} Ξ± (Lattice.toSemilatticeInf.{u2} Ξ± (LinearOrder.toLattice.{u2} Ξ± _inst_2))))) a b)
but is expected to have type
forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : LinearOrder.{u1} Ξ±] [_inst_2 : Preorder.{u2} π] [_inst_3 : GradeOrder.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))] {a : Ξ±} {b : Ξ±}, Iff (Covby.{u2} π (Preorder.toLT.{u2} π _inst_2) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 a) (grade.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1))))) _inst_2 _inst_3 b)) (Covby.{u1} Ξ± (Preorder.toLT.{u1} Ξ± (PartialOrder.toPreorder.{u1} Ξ± (SemilatticeInf.toPartialOrder.{u1} Ξ± (Lattice.toSemilatticeInf.{u1} Ξ± (DistribLattice.toLattice.{u1} Ξ± (instDistribLattice.{u1} Ξ± _inst_1)))))) a b)
Case conversion may be inaccurate. Consider using '#align grade_covby_grade_iff grade_covby_grade_iffβ'. -/
@@ -314,7 +314,7 @@ variable [PartialOrder π] [Preorder Ξ±]
/- warning: grade_bot -> grade_bot is a dubious translation:
lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : PartialOrder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : OrderBot.{u1} π (Preorder.toLE.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1))] [_inst_4 : OrderBot.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_2)] [_inst_5 : GradeMinOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2], Eq.{succ u1} π (grade.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 _inst_5) (Bot.bot.{u2} Ξ± (OrderBot.toHasBot.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_2) _inst_4))) (Bot.bot.{u1} π (OrderBot.toHasBot.{u1} π (Preorder.toLE.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1)) _inst_3))
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : PartialOrder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : OrderBot.{u1} π (Preorder.toHasLe.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1))] [_inst_4 : OrderBot.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2)] [_inst_5 : GradeMinOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2], Eq.{succ u1} π (grade.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 (GradeMinOrder.toGradeOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 _inst_5) (Bot.bot.{u2} Ξ± (OrderBot.toHasBot.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) _inst_4))) (Bot.bot.{u1} π (OrderBot.toHasBot.{u1} π (Preorder.toHasLe.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1)) _inst_3))
but is expected to have type
forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : PartialOrder.{u2} π] [_inst_2 : Preorder.{u1} Ξ±] [_inst_3 : OrderBot.{u2} π (Preorder.toLE.{u2} π (PartialOrder.toPreorder.{u2} π _inst_1))] [_inst_4 : OrderBot.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_2)] [_inst_5 : GradeMinOrder.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u2} π _inst_1) _inst_2], Eq.{succ u2} π (grade.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u2} π _inst_1) (GradeMinOrder.toGradeOrder.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u2} π _inst_1) _inst_2 _inst_5) (Bot.bot.{u1} Ξ± (OrderBot.toBot.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_2) _inst_4))) (Bot.bot.{u2} π (OrderBot.toBot.{u2} π (Preorder.toLE.{u2} π (PartialOrder.toPreorder.{u2} π _inst_1)) _inst_3))
Case conversion may be inaccurate. Consider using '#align grade_bot grade_botβ'. -/
@@ -325,7 +325,7 @@ theorem grade_bot [OrderBot π] [OrderBot Ξ±] [GradeMinOrder π Ξ±] : grade
/- warning: grade_top -> grade_top is a dubious translation:
lean 3 declaration is
- forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : PartialOrder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : OrderTop.{u1} π (Preorder.toLE.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1))] [_inst_4 : OrderTop.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_2)] [_inst_5 : GradeMaxOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2], Eq.{succ u1} π (grade.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 _inst_5) (Top.top.{u2} Ξ± (OrderTop.toHasTop.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_2) _inst_4))) (Top.top.{u1} π (OrderTop.toHasTop.{u1} π (Preorder.toLE.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1)) _inst_3))
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : PartialOrder.{u1} π] [_inst_2 : Preorder.{u2} Ξ±] [_inst_3 : OrderTop.{u1} π (Preorder.toHasLe.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1))] [_inst_4 : OrderTop.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2)] [_inst_5 : GradeMaxOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2], Eq.{succ u1} π (grade.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 (GradeMaxOrder.toGradeOrder.{u1, u2} π Ξ± (PartialOrder.toPreorder.{u1} π _inst_1) _inst_2 _inst_5) (Top.top.{u2} Ξ± (OrderTop.toHasTop.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_2) _inst_4))) (Top.top.{u1} π (OrderTop.toHasTop.{u1} π (Preorder.toHasLe.{u1} π (PartialOrder.toPreorder.{u1} π _inst_1)) _inst_3))
but is expected to have type
forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : PartialOrder.{u2} π] [_inst_2 : Preorder.{u1} Ξ±] [_inst_3 : OrderTop.{u2} π (Preorder.toLE.{u2} π (PartialOrder.toPreorder.{u2} π _inst_1))] [_inst_4 : OrderTop.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_2)] [_inst_5 : GradeMaxOrder.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u2} π _inst_1) _inst_2], Eq.{succ u2} π (grade.{u2, u1} π Ξ± _inst_2 (PartialOrder.toPreorder.{u2} π _inst_1) (GradeMaxOrder.toGradeOrder.{u2, u1} π Ξ± (PartialOrder.toPreorder.{u2} π _inst_1) _inst_2 _inst_5) (Top.top.{u1} Ξ± (OrderTop.toTop.{u1} Ξ± (Preorder.toLE.{u1} Ξ± _inst_2) _inst_4))) (Top.top.{u2} π (OrderTop.toTop.{u2} π (Preorder.toLE.{u2} π (PartialOrder.toPreorder.{u2} π _inst_1)) _inst_3))
Case conversion may be inaccurate. Consider using '#align grade_top grade_topβ'. -/
@@ -402,7 +402,12 @@ theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a)
/-! #### Lifting a graded order -/
-#print GradeOrder.liftLeft /-
+/- warning: grade_order.lift_left -> GradeOrder.liftLeft is a dubious translation:
+lean 3 declaration is
+ forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (f a) (f b))) -> (GradeOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
+but is expected to have type
+ forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toLT.{u2} β _inst_2) (f a) (f b))) -> (GradeOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
+Case conversion may be inaccurate. Consider using '#align grade_order.lift_left GradeOrder.liftLeftβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -413,9 +418,13 @@ def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono
grade_strictMono := hf.comp grade_strictMono
covby_grade a b h := hcovby _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
--/
-#print GradeMinOrder.liftLeft /-
+/- warning: grade_min_order.lift_left -> GradeMinOrder.liftLeft is a dubious translation:
+lean 3 declaration is
+ forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeMinOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMin.{u1} π (Preorder.toHasLe.{u1} π _inst_1) a) -> (IsMin.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (f a))) -> (GradeMinOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
+but is expected to have type
+ forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeMinOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toLT.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMin.{u1} π (Preorder.toLE.{u1} π _inst_1) a) -> (IsMin.{u2} β (Preorder.toLE.{u2} β _inst_2) (f a))) -> (GradeMinOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
+Case conversion may be inaccurate. Consider using '#align grade_min_order.lift_left GradeMinOrder.liftLeftβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -423,9 +432,13 @@ def GradeMinOrder.liftLeft [GradeMinOrder π Ξ±] (f : π β β) (hf : Stri
(hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder β Ξ± :=
{ GradeOrder.liftLeft f hf hcovby with isMin_grade := fun a ha => hmin _ <| ha.grade _ }
#align grade_min_order.lift_left GradeMinOrder.liftLeft
--/
-#print GradeMaxOrder.liftLeft /-
+/- warning: grade_max_order.lift_left -> GradeMaxOrder.liftLeft is a dubious translation:
+lean 3 declaration is
+ forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeMaxOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMax.{u1} π (Preorder.toHasLe.{u1} π _inst_1) a) -> (IsMax.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (f a))) -> (GradeMaxOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
+but is expected to have type
+ forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeMaxOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toLT.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMax.{u1} π (Preorder.toLE.{u1} π _inst_1) a) -> (IsMax.{u2} β (Preorder.toLE.{u2} β _inst_2) (f a))) -> (GradeMaxOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
+Case conversion may be inaccurate. Consider using '#align grade_max_order.lift_left GradeMaxOrder.liftLeftβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -433,9 +446,13 @@ def GradeMaxOrder.liftLeft [GradeMaxOrder π Ξ±] (f : π β β) (hf : Stri
(hcovby : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder β Ξ± :=
{ GradeOrder.liftLeft f hf hcovby with isMax_grade := fun a ha => hmax _ <| ha.grade _ }
#align grade_max_order.lift_left GradeMaxOrder.liftLeft
--/
-#print GradeBoundedOrder.liftLeft /-
+/- warning: grade_bounded_order.lift_left -> GradeBoundedOrder.liftLeft is a dubious translation:
+lean 3 declaration is
+ forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeBoundedOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toHasLt.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toHasLt.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMin.{u1} π (Preorder.toHasLe.{u1} π _inst_1) a) -> (IsMin.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (f a))) -> (forall (a : π), (IsMax.{u1} π (Preorder.toHasLe.{u1} π _inst_1) a) -> (IsMax.{u2} β (Preorder.toHasLe.{u2} β _inst_2) (f a))) -> (GradeBoundedOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
+but is expected to have type
+ forall {π : Type.{u1}} {β : Type.{u2}} {Ξ± : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_2 : Preorder.{u2} β] [_inst_3 : Preorder.{u3} Ξ±] [_inst_5 : GradeBoundedOrder.{u1, u3} π Ξ± _inst_1 _inst_3] (f : π -> β), (StrictMono.{u1, u2} π β _inst_1 _inst_2 f) -> (forall (a : π) (b : π), (Covby.{u1} π (Preorder.toLT.{u1} π _inst_1) a b) -> (Covby.{u2} β (Preorder.toLT.{u2} β _inst_2) (f a) (f b))) -> (forall (a : π), (IsMin.{u1} π (Preorder.toLE.{u1} π _inst_1) a) -> (IsMin.{u2} β (Preorder.toLE.{u2} β _inst_2) (f a))) -> (forall (a : π), (IsMax.{u1} π (Preorder.toLE.{u1} π _inst_1) a) -> (IsMax.{u2} β (Preorder.toLE.{u2} β _inst_2) (f a))) -> (GradeBoundedOrder.{u2, u3} β Ξ± _inst_2 _inst_3)
+Case conversion may be inaccurate. Consider using '#align grade_bounded_order.lift_left GradeBoundedOrder.liftLeftβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -444,9 +461,13 @@ def GradeBoundedOrder.liftLeft [GradeBoundedOrder π Ξ±] (f : π β β) (h
(hmax : β a, IsMax a β IsMax (f a)) : GradeBoundedOrder β Ξ± :=
{ GradeMinOrder.liftLeft f hf hcovby hmin, GradeMaxOrder.liftLeft f hf hcovby hmax with }
#align grade_bounded_order.lift_left GradeBoundedOrder.liftLeft
--/
-#print GradeOrder.liftRight /-
+/- warning: grade_order.lift_right -> GradeOrder.liftRight is a dubious translation:
+lean 3 declaration is
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toHasLt.{u3} Ξ² _inst_4) (f a) (f b))) -> (GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
+but is expected to have type
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toLT.{u3} Ξ² _inst_4) (f a) (f b))) -> (GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align grade_order.lift_right GradeOrder.liftRightβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -457,9 +478,13 @@ def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f
grade_strictMono := grade_strictMono.comp hf
covby_grade a b h := (hcovby _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
--/
-#print GradeMinOrder.liftRight /-
+/- warning: grade_min_order.lift_right -> GradeMinOrder.liftRight is a dubious translation:
+lean 3 declaration is
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeMinOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toHasLt.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMin.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_3) a) -> (IsMin.{u3} Ξ² (Preorder.toHasLe.{u3} Ξ² _inst_4) (f a))) -> (GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
+but is expected to have type
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeMinOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toLT.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMin.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_3) a) -> (IsMin.{u3} Ξ² (Preorder.toLE.{u3} Ξ² _inst_4) (f a))) -> (GradeMinOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align grade_min_order.lift_right GradeMinOrder.liftRightβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -467,9 +492,13 @@ def GradeMinOrder.liftRight [GradeMinOrder π Ξ²] (f : Ξ± β Ξ²) (hf : Strict
(hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder π Ξ± :=
{ GradeOrder.liftRight f hf hcovby with isMin_grade := fun a ha => (hmin _ ha).grade _ }
#align grade_min_order.lift_right GradeMinOrder.liftRight
--/
-#print GradeMaxOrder.liftRight /-
+/- warning: grade_max_order.lift_right -> GradeMaxOrder.liftRight is a dubious translation:
+lean 3 declaration is
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeMaxOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toHasLt.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMax.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_3) a) -> (IsMax.{u3} Ξ² (Preorder.toHasLe.{u3} Ξ² _inst_4) (f a))) -> (GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
+but is expected to have type
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeMaxOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toLT.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMax.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_3) a) -> (IsMax.{u3} Ξ² (Preorder.toLE.{u3} Ξ² _inst_4) (f a))) -> (GradeMaxOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align grade_max_order.lift_right GradeMaxOrder.liftRightβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -477,9 +506,13 @@ def GradeMaxOrder.liftRight [GradeMaxOrder π Ξ²] (f : Ξ± β Ξ²) (hf : Strict
(hcovby : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder π Ξ± :=
{ GradeOrder.liftRight f hf hcovby with isMax_grade := fun a ha => (hmax _ ha).grade _ }
#align grade_max_order.lift_right GradeMaxOrder.liftRight
--/
-#print GradeBoundedOrder.liftRight /-
+/- warning: grade_bounded_order.lift_right -> GradeBoundedOrder.liftRight is a dubious translation:
+lean 3 declaration is
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeBoundedOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toHasLt.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toHasLt.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMin.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_3) a) -> (IsMin.{u3} Ξ² (Preorder.toHasLe.{u3} Ξ² _inst_4) (f a))) -> (forall (a : Ξ±), (IsMax.{u2} Ξ± (Preorder.toHasLe.{u2} Ξ± _inst_3) a) -> (IsMax.{u3} Ξ² (Preorder.toHasLe.{u3} Ξ² _inst_4) (f a))) -> (GradeBoundedOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
+but is expected to have type
+ forall {π : Type.{u1}} {Ξ± : Type.{u2}} {Ξ² : Type.{u3}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_4 : Preorder.{u3} Ξ²] [_inst_5 : GradeBoundedOrder.{u1, u3} π Ξ² _inst_1 _inst_4] (f : Ξ± -> Ξ²), (StrictMono.{u2, u3} Ξ± Ξ² _inst_3 _inst_4 f) -> (forall (a : Ξ±) (b : Ξ±), (Covby.{u2} Ξ± (Preorder.toLT.{u2} Ξ± _inst_3) a b) -> (Covby.{u3} Ξ² (Preorder.toLT.{u3} Ξ² _inst_4) (f a) (f b))) -> (forall (a : Ξ±), (IsMin.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_3) a) -> (IsMin.{u3} Ξ² (Preorder.toLE.{u3} Ξ² _inst_4) (f a))) -> (forall (a : Ξ±), (IsMax.{u2} Ξ± (Preorder.toLE.{u2} Ξ± _inst_3) a) -> (IsMax.{u3} Ξ² (Preorder.toLE.{u3} Ξ² _inst_4) (f a))) -> (GradeBoundedOrder.{u1, u2} π Ξ± _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align grade_bounded_order.lift_right GradeBoundedOrder.liftRightβ'. -/
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
@@ -488,7 +521,6 @@ def GradeBoundedOrder.liftRight [GradeBoundedOrder π Ξ²] (f : Ξ± β Ξ²) (hf
(hmax : β a, IsMax a β IsMax (f a)) : GradeBoundedOrder π Ξ± :=
{ GradeMinOrder.liftRight f hf hcovby hmin, GradeMaxOrder.liftRight f hf hcovby hmax with }
#align grade_bounded_order.lift_right GradeBoundedOrder.liftRight
--/
/-! #### `fin n`-graded to `β`-graded to `β€`-graded -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -381,7 +381,7 @@ instance [GradeBoundedOrder π Ξ±] : GradeBoundedOrder πα΅α΅ Ξ±α΅α΅ :=
lean 3 declaration is
forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_5 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3] (a : Ξ±), Eq.{succ u1} (OrderDual.{u1} π) (grade.{u1, u2} (OrderDual.{u1} π) (OrderDual.{u2} Ξ±) (OrderDual.preorder.{u1} π _inst_1) (OrderDual.preorder.{u2} Ξ± _inst_3) (OrderDual.gradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5) (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) (fun (_x : Equiv.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) => Ξ± -> (OrderDual.{u2} Ξ±)) (Equiv.hasCoeToFun.{succ u2, succ u2} Ξ± (OrderDual.{u2} Ξ±)) (OrderDual.toDual.{u2} Ξ±) a)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} π (OrderDual.{u1} π)) (fun (_x : Equiv.{succ u1, succ u1} π (OrderDual.{u1} π)) => π -> (OrderDual.{u1} π)) (Equiv.hasCoeToFun.{succ u1, succ u1} π (OrderDual.{u1} π)) (OrderDual.toDual.{u1} π) (grade.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5 a))
but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : Ξ±), Eq.{succ u2} (OrderDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Ξ±) => OrderDual.{u1} Ξ±) a) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) Ξ± (fun (_x : Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : Ξ±) => OrderDual.{u1} Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) (OrderDual.toDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} π (OrderDual.{u2} π)) π (fun (_x : π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : π) => OrderDual.{u2} π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} π (OrderDual.{u2} π)) (OrderDual.toDual.{u2} π) (grade.{u2, u1} π Ξ± _inst_3 _inst_1 _inst_5 a))
+ forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : Ξ±), Eq.{succ u2} (OrderDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Ξ±) => OrderDual.{u1} Ξ±) a) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) Ξ± (fun (_x : Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Ξ±) => OrderDual.{u1} Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} Ξ± (OrderDual.{u1} Ξ±)) (OrderDual.toDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} π (OrderDual.{u2} π)) π (fun (_x : π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : π) => OrderDual.{u2} π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} π (OrderDual.{u2} π)) (OrderDual.toDual.{u2} π) (grade.{u2, u1} π Ξ± _inst_3 _inst_1 _inst_5 a))
Case conversion may be inaccurate. Consider using '#align grade_to_dual grade_toDualβ'. -/
@[simp]
theorem grade_toDual [GradeOrder π Ξ±] (a : Ξ±) : grade πα΅α΅ (toDual a) = toDual (grade π a) :=
@@ -392,7 +392,7 @@ theorem grade_toDual [GradeOrder π Ξ±] (a : Ξ±) : grade πα΅α΅ (toDual a)
lean 3 declaration is
forall {π : Type.{u1}} {Ξ± : Type.{u2}} [_inst_1 : Preorder.{u1} π] [_inst_3 : Preorder.{u2} Ξ±] [_inst_5 : GradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3] (a : OrderDual.{u2} Ξ±), Eq.{succ u1} π (grade.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5 (coeFn.{succ u2, succ u2} (Equiv.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) (fun (_x : Equiv.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) => (OrderDual.{u2} Ξ±) -> Ξ±) (Equiv.hasCoeToFun.{succ u2, succ u2} (OrderDual.{u2} Ξ±) Ξ±) (OrderDual.ofDual.{u2} Ξ±) a)) (coeFn.{succ u1, succ u1} (Equiv.{succ u1, succ u1} (OrderDual.{u1} π) π) (fun (_x : Equiv.{succ u1, succ u1} (OrderDual.{u1} π) π) => (OrderDual.{u1} π) -> π) (Equiv.hasCoeToFun.{succ u1, succ u1} (OrderDual.{u1} π) π) (OrderDual.ofDual.{u1} π) (grade.{u1, u2} (OrderDual.{u1} π) (OrderDual.{u2} Ξ±) (OrderDual.preorder.{u1} π _inst_1) (OrderDual.preorder.{u2} Ξ± _inst_3) (OrderDual.gradeOrder.{u1, u2} π Ξ± _inst_1 _inst_3 _inst_5) a))
but is expected to have type
- forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : OrderDual.{u1} Ξ±), Eq.{succ u2} π (grade.{u2, u1} π ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : OrderDual.{u1} Ξ±) => Ξ±) a) _inst_3 _inst_1 _inst_5 (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.{u1} Ξ±) (fun (_x : OrderDual.{u1} Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : OrderDual.{u1} Ξ±) => Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.ofDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.{u2} π) (fun (_x : OrderDual.{u2} π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.805 : OrderDual.{u2} π) => π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.ofDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) (OrderDual.{u1} Ξ±) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) a))
+ forall {π : Type.{u2}} {Ξ± : Type.{u1}} [_inst_1 : Preorder.{u2} π] [_inst_3 : Preorder.{u1} Ξ±] [_inst_5 : GradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3] (a : OrderDual.{u1} Ξ±), Eq.{succ u2} π (grade.{u2, u1} π ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : OrderDual.{u1} Ξ±) => Ξ±) a) _inst_3 _inst_1 _inst_5 (FunLike.coe.{succ u1, succ u1, succ u1} (Equiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.{u1} Ξ±) (fun (_x : OrderDual.{u1} Ξ±) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : OrderDual.{u1} Ξ±) => Ξ±) _x) (Equiv.instFunLikeEquiv.{succ u1, succ u1} (OrderDual.{u1} Ξ±) Ξ±) (OrderDual.ofDual.{u1} Ξ±) a)) (FunLike.coe.{succ u2, succ u2, succ u2} (Equiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.{u2} π) (fun (_x : OrderDual.{u2} π) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : OrderDual.{u2} π) => π) _x) (Equiv.instFunLikeEquiv.{succ u2, succ u2} (OrderDual.{u2} π) π) (OrderDual.ofDual.{u2} π) (grade.{u2, u1} (OrderDual.{u2} π) (OrderDual.{u1} Ξ±) (OrderDual.preorder.{u1} Ξ± _inst_3) (OrderDual.preorder.{u2} π _inst_1) (OrderDual.gradeOrder.{u2, u1} π Ξ± _inst_1 _inst_3 _inst_5) a))
Case conversion may be inaccurate. Consider using '#align grade_of_dual grade_ofDualβ'. -/
@[simp]
theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a) = ofDual (grade πα΅α΅ a) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
In #10496, a better fix was suggested in the comments by @Ruben-VandeVelde: make GradedOrder.grade
protected
to freely use grade
for _root_.grade
. This implements that fix.
@@ -63,7 +63,7 @@ variable {π β Ξ± Ξ² : Type*}
`grade π : Ξ± β π` which preserves order covering (`CovBy`). -/
class GradeOrder (π Ξ± : Type*) [Preorder π] [Preorder Ξ±] where
/-- The grading function. -/
- grade : Ξ± β π
+ protected grade : Ξ± β π
/-- `grade` is strictly monotonic. -/
grade_strictMono : StrictMono grade
/-- `grade` preserves `CovBy`. -/
@@ -266,7 +266,7 @@ theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a)
@[reducible]
def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono f)
(hcovBy : β a b, a β b β f a β f b) : GradeOrder β Ξ± where
- grade := f β _root_.grade π
+ grade := f β grade π
grade_strictMono := hf.comp grade_strictMono
covBy_grade _ _ h := hcovBy _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
@@ -301,7 +301,7 @@ def GradeBoundedOrder.liftLeft [GradeBoundedOrder π Ξ±] (f : π β β) (h
@[reducible]
def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f)
(hcovBy : β a b, a β b β f a β f b) : GradeOrder π Ξ± where
- grade := _root_.grade π β f
+ grade := grade π β f
grade_strictMono := grade_strictMono.comp hf
covBy_grade _ _ h := (hcovBy _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
@@ -89,14 +89,14 @@ class GradeBoundedOrder (π Ξ± : Type*) [Preorder π] [Preorder Ξ±] extends
#align grade_bounded_order GradeBoundedOrder
section Preorder -- grading
--- PORTING NOTE: this `variable [Preorder π]` for the whole section seems to not work in Lean4
--- variable [Preorder π]
+variable [Preorder π]
section Preorder -- graded order
variable [Preorder Ξ±]
section GradeOrder
-variable (π) [Preorder π] [GradeOrder π Ξ±] {a b : Ξ±}
+variable (π)
+variable [GradeOrder π Ξ±] {a b : Ξ±}
/-- The grade of an element in a graded order. Morally, this is the number of elements you need to
go down by to get to `β₯`. -/
@@ -265,9 +265,8 @@ theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a)
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono f)
- (hcovBy : β a b, a β b β f a β f b) : GradeOrder β Ξ±
- where
- grade := f β (@grade π _ _ _ _) -- porting note - what the hell?! used to be `grade π`
+ (hcovBy : β a b, a β b β f a β f b) : GradeOrder β Ξ± where
+ grade := f β _root_.grade π
grade_strictMono := hf.comp grade_strictMono
covBy_grade _ _ h := hcovBy _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
@@ -301,9 +300,8 @@ def GradeBoundedOrder.liftLeft [GradeBoundedOrder π Ξ±] (f : π β β) (h
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f)
- (hcovBy : β a b, a β b β f a β f b) : GradeOrder π Ξ±
- where
- grade := (@grade π _ _ _ _) β f -- porting note: again, weird
+ (hcovBy : β a b, a β b β f a β f b) : GradeOrder π Ξ± where
+ grade := _root_.grade π β f
grade_strictMono := grade_strictMono.comp hf
covBy_grade _ _ h := (hcovBy _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
@@ -3,7 +3,6 @@ Copyright (c) 2022 YaΓ«l Dillies, Violeta HernΓ‘ndez Palacios. All rights reserv
Released under Apache 2.0 license as described in the file LICENSE.
Authors: YaΓ«l Dillies, Violeta HernΓ‘ndez Palacios, Grayson Burton, Vladimir Ivanov
-/
-import Mathlib.Data.Finset.Basic
import Mathlib.Data.Int.SuccPred
#align_import order.grade from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
@@ -56,7 +55,7 @@ Instead, we define graded orders by their grade function, without talking about
* [Richard Stanley, *Enumerative Combinatorics*][stanley2012]
-/
-open Finset Nat OrderDual
+open Nat OrderDual
variable {π β Ξ± Ξ² : Type*}
Covby
to CovBy
(#9578)
Rename
Covby
β CovBy
, Wcovby
β WCovBy
*covby*
β *covBy*
wcovby.finset_val
β WCovBy.finset_val
, wcovby.finset_coe
β WCovBy.finset_coe
Covby.is_coatom
β CovBy.isCoatom
@@ -61,14 +61,14 @@ open Finset Nat OrderDual
variable {π β Ξ± Ξ² : Type*}
/-- An `π`-graded order is an order `Ξ±` equipped with a strictly monotone function
-`grade π : Ξ± β π` which preserves order covering (`Covby`). -/
+`grade π : Ξ± β π` which preserves order covering (`CovBy`). -/
class GradeOrder (π Ξ± : Type*) [Preorder π] [Preorder Ξ±] where
/-- The grading function. -/
grade : Ξ± β π
/-- `grade` is strictly monotonic. -/
grade_strictMono : StrictMono grade
- /-- `grade` preserves `Covby`. -/
- covby_grade β¦a b : Ξ±β¦ : a β b β grade a β grade b
+ /-- `grade` preserves `CovBy`. -/
+ covBy_grade β¦a b : Ξ±β¦ : a β b β grade a β grade b
#align grade_order GradeOrder
/-- An `π`-graded order where minimal elements have minimal grades. -/
@@ -105,9 +105,9 @@ def grade : Ξ± β π :=
GradeOrder.grade
#align grade grade
-protected theorem Covby.grade (h : a β b) : grade π a β grade π b :=
- GradeOrder.covby_grade h
-#align covby.grade Covby.grade
+protected theorem CovBy.grade (h : a β b) : grade π a β grade π b :=
+ GradeOrder.covBy_grade h
+#align covby.grade CovBy.grade
variable {π}
@@ -115,10 +115,10 @@ theorem grade_strictMono : StrictMono (grade π : Ξ± β π) :=
GradeOrder.grade_strictMono
#align grade_strict_mono grade_strictMono
-theorem covby_iff_lt_covby_grade : a β b β a < b β§ grade π a β grade π b :=
+theorem covBy_iff_lt_covBy_grade : a β b β a < b β§ grade π a β grade π b :=
β¨fun h => β¨h.1, h.grade _β©,
And.imp_right fun h _ ha hb => h.2 (grade_strictMono ha) <| grade_strictMono hbβ©
-#align covby_iff_lt_covby_grade covby_iff_lt_covby_grade
+#align covby_iff_lt_covby_grade covBy_iff_lt_covBy_grade
end GradeOrder
@@ -191,9 +191,9 @@ theorem grade_ne_grade_iff : grade π a β grade π b β a β b :=
grade_injective.ne_iff
#align grade_ne_grade_iff grade_ne_grade_iff
-theorem grade_covby_grade_iff : grade π a β grade π b β a β b :=
- (covby_iff_lt_covby_grade.trans <| and_iff_right_of_imp fun h => grade_lt_grade_iff.1 h.1).symm
-#align grade_covby_grade_iff grade_covby_grade_iff
+theorem grade_covBy_grade_iff : grade π a β grade π b β a β b :=
+ (covBy_iff_lt_covBy_grade.trans <| and_iff_right_of_imp fun h => grade_lt_grade_iff.1 h.1).symm
+#align grade_covby_grade_iff grade_covBy_grade_iff
end LinearOrder
@@ -226,7 +226,7 @@ instance Preorder.toGradeBoundedOrder : GradeBoundedOrder Ξ± Ξ± where
isMin_grade _ := id
isMax_grade _ := id
grade_strictMono := strictMono_id
- covby_grade _ _ := id
+ covBy_grade _ _ := id
#align preorder.to_grade_bounded_order Preorder.toGradeBoundedOrder
@[simp]
@@ -239,7 +239,7 @@ theorem grade_self (a : Ξ±) : grade Ξ± a = a :=
instance OrderDual.gradeOrder [GradeOrder π Ξ±] : GradeOrder πα΅α΅ Ξ±α΅α΅ where
grade := toDual β grade π β ofDual
grade_strictMono := grade_strictMono.dual
- covby_grade _ _ h := (h.ofDual.grade _).toDual
+ covBy_grade _ _ h := (h.ofDual.grade _).toDual
instance OrderDual.gradeMinOrder [GradeMaxOrder π Ξ±] : GradeMinOrder πα΅α΅ Ξ±α΅α΅ :=
{ OrderDual.gradeOrder with isMin_grade := fun _ => IsMax.grade (Ξ± := Ξ±) π }
@@ -266,72 +266,72 @@ theorem grade_ofDual [GradeOrder π Ξ±] (a : Ξ±α΅α΅) : grade π (ofDual a)
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono f)
- (hcovby : β a b, a β b β f a β f b) : GradeOrder β Ξ±
+ (hcovBy : β a b, a β b β f a β f b) : GradeOrder β Ξ±
where
grade := f β (@grade π _ _ _ _) -- porting note - what the hell?! used to be `grade π`
grade_strictMono := hf.comp grade_strictMono
- covby_grade _ _ h := hcovby _ _ <| h.grade _
+ covBy_grade _ _ h := hcovBy _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeMinOrder.liftLeft [GradeMinOrder π Ξ±] (f : π β β) (hf : StrictMono f)
- (hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder β Ξ± :=
- { GradeOrder.liftLeft f hf hcovby with isMin_grade := fun _ ha => hmin _ <| ha.grade _ }
+ (hcovBy : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder β Ξ± :=
+ { GradeOrder.liftLeft f hf hcovBy with isMin_grade := fun _ ha => hmin _ <| ha.grade _ }
#align grade_min_order.lift_left GradeMinOrder.liftLeft
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeMaxOrder.liftLeft [GradeMaxOrder π Ξ±] (f : π β β) (hf : StrictMono f)
- (hcovby : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder β Ξ± :=
- { GradeOrder.liftLeft f hf hcovby with isMax_grade := fun _ ha => hmax _ <| ha.grade _ }
+ (hcovBy : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder β Ξ± :=
+ { GradeOrder.liftLeft f hf hcovBy with isMax_grade := fun _ ha => hmax _ <| ha.grade _ }
#align grade_max_order.lift_left GradeMaxOrder.liftLeft
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeBoundedOrder.liftLeft [GradeBoundedOrder π Ξ±] (f : π β β) (hf : StrictMono f)
- (hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a))
+ (hcovBy : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a))
(hmax : β a, IsMax a β IsMax (f a)) : GradeBoundedOrder β Ξ± :=
- { GradeMinOrder.liftLeft f hf hcovby hmin, GradeMaxOrder.liftLeft f hf hcovby hmax with }
+ { GradeMinOrder.liftLeft f hf hcovBy hmin, GradeMaxOrder.liftLeft f hf hcovBy hmax with }
#align grade_bounded_order.lift_left GradeBoundedOrder.liftLeft
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f)
- (hcovby : β a b, a β b β f a β f b) : GradeOrder π Ξ±
+ (hcovBy : β a b, a β b β f a β f b) : GradeOrder π Ξ±
where
grade := (@grade π _ _ _ _) β f -- porting note: again, weird
grade_strictMono := grade_strictMono.comp hf
- covby_grade _ _ h := (hcovby _ _ h).grade _
+ covBy_grade _ _ h := (hcovBy _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeMinOrder.liftRight [GradeMinOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f)
- (hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder π Ξ± :=
- { GradeOrder.liftRight f hf hcovby with isMin_grade := fun _ ha => (hmin _ ha).grade _ }
+ (hcovBy : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder π Ξ± :=
+ { GradeOrder.liftRight f hf hcovBy with isMin_grade := fun _ ha => (hmin _ ha).grade _ }
#align grade_min_order.lift_right GradeMinOrder.liftRight
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeMaxOrder.liftRight [GradeMaxOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f)
- (hcovby : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder π Ξ± :=
- { GradeOrder.liftRight f hf hcovby with isMax_grade := fun _ ha => (hmax _ ha).grade _ }
+ (hcovBy : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder π Ξ± :=
+ { GradeOrder.liftRight f hf hcovBy with isMax_grade := fun _ ha => (hmax _ ha).grade _ }
#align grade_max_order.lift_right GradeMaxOrder.liftRight
-- See note [reducible non-instances]
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeBoundedOrder.liftRight [GradeBoundedOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f)
- (hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a))
+ (hcovBy : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a))
(hmax : β a, IsMax a β IsMax (f a)) : GradeBoundedOrder π Ξ± :=
- { GradeMinOrder.liftRight f hf hcovby hmin, GradeMaxOrder.liftRight f hf hcovby hmax with }
+ { GradeMinOrder.liftRight f hf hcovBy hmin, GradeMaxOrder.liftRight f hf hcovBy hmax with }
#align grade_bounded_order.lift_right GradeBoundedOrder.liftRight
/-! #### `Fin n`-graded to `β`-graded to `β€`-graded -/
@@ -342,7 +342,7 @@ def GradeBoundedOrder.liftRight [GradeBoundedOrder π Ξ²] (f : Ξ± β Ξ²) (hf
inferrable. -/
@[reducible]
def GradeOrder.finToNat (n : β) [GradeOrder (Fin n) Ξ±] : GradeOrder β Ξ± :=
- (GradeOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono) fun _ _ => Covby.coe_fin
+ (GradeOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono) fun _ _ => CovBy.coe_fin
#align grade_order.fin_to_nat GradeOrder.finToNat
-- See note [reducible non-instances]
@@ -350,7 +350,7 @@ def GradeOrder.finToNat (n : β) [GradeOrder (Fin n) Ξ±] : GradeOrder β Ξ± :=
inferrable. -/
@[reducible]
def GradeMinOrder.finToNat (n : β) [GradeMinOrder (Fin n) Ξ±] : GradeMinOrder β Ξ± :=
- (GradeMinOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono fun _ _ => Covby.coe_fin) fun a h => by
+ (GradeMinOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono fun _ _ => CovBy.coe_fin) fun a h => by
cases n
Β· exact a.elim0
rw [h.eq_bot, Fin.bot_eq_zero]
@@ -358,5 +358,5 @@ def GradeMinOrder.finToNat (n : β) [GradeMinOrder (Fin n) Ξ±] : GradeMinOrder
#align grade_min_order.fin_to_nat GradeMinOrder.finToNat
instance GradeOrder.natToInt [GradeOrder β Ξ±] : GradeOrder β€ Ξ± :=
- (GradeOrder.liftLeft _ Int.coe_nat_strictMono) fun _ _ => Covby.cast_int
+ (GradeOrder.liftLeft _ Int.coe_nat_strictMono) fun _ _ => CovBy.cast_int
#align grade_order.nat_to_int GradeOrder.natToInt
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -58,11 +58,11 @@ Instead, we define graded orders by their grade function, without talking about
open Finset Nat OrderDual
-variable {π β Ξ± Ξ² : Type _}
+variable {π β Ξ± Ξ² : Type*}
/-- An `π`-graded order is an order `Ξ±` equipped with a strictly monotone function
`grade π : Ξ± β π` which preserves order covering (`Covby`). -/
-class GradeOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] where
+class GradeOrder (π Ξ± : Type*) [Preorder π] [Preorder Ξ±] where
/-- The grading function. -/
grade : Ξ± β π
/-- `grade` is strictly monotonic. -/
@@ -72,20 +72,20 @@ class GradeOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] where
#align grade_order GradeOrder
/-- An `π`-graded order where minimal elements have minimal grades. -/
-class GradeMinOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeOrder π Ξ± where
+class GradeMinOrder (π Ξ± : Type*) [Preorder π] [Preorder Ξ±] extends GradeOrder π Ξ± where
/-- Minimal elements have minimal grades. -/
isMin_grade β¦a : Ξ±β¦ : IsMin a β IsMin (grade a)
#align grade_min_order GradeMinOrder
/-- An `π`-graded order where maximal elements have maximal grades. -/
-class GradeMaxOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeOrder π Ξ± where
+class GradeMaxOrder (π Ξ± : Type*) [Preorder π] [Preorder Ξ±] extends GradeOrder π Ξ± where
/-- Maximal elements have maximal grades. -/
isMax_grade β¦a : Ξ±β¦ : IsMax a β IsMax (grade a)
#align grade_max_order GradeMaxOrder
/-- An `π`-graded order where minimal elements have minimal grades and maximal elements have maximal
grades. -/
-class GradeBoundedOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeMinOrder π Ξ±,
+class GradeBoundedOrder (π Ξ± : Type*) [Preorder π] [Preorder Ξ±] extends GradeMinOrder π Ξ±,
GradeMaxOrder π Ξ±
#align grade_bounded_order GradeBoundedOrder
@@ -74,13 +74,13 @@ class GradeOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] where
/-- An `π`-graded order where minimal elements have minimal grades. -/
class GradeMinOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeOrder π Ξ± where
/-- Minimal elements have minimal grades. -/
- is_min_grade β¦a : Ξ±β¦ : IsMin a β IsMin (grade a)
+ isMin_grade β¦a : Ξ±β¦ : IsMin a β IsMin (grade a)
#align grade_min_order GradeMinOrder
/-- An `π`-graded order where maximal elements have maximal grades. -/
class GradeMaxOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeOrder π Ξ± where
/-- Maximal elements have maximal grades. -/
- is_max_grade β¦a : Ξ±β¦ : IsMax a β IsMax (grade a)
+ isMax_grade β¦a : Ξ±β¦ : IsMax a β IsMax (grade a)
#align grade_max_order GradeMaxOrder
/-- An `π`-graded order where minimal elements have minimal grades and maximal elements have maximal
@@ -127,7 +127,7 @@ section GradeMinOrder
variable (π) [Preorder π] [GradeMinOrder π Ξ±] {a : Ξ±}
protected theorem IsMin.grade (h : IsMin a) : IsMin (grade π a) :=
- GradeMinOrder.is_min_grade h
+ GradeMinOrder.isMin_grade h
#align is_min.grade IsMin.grade
variable {π}
@@ -144,7 +144,7 @@ section GradeMaxOrder
variable (π) [Preorder π] [GradeMaxOrder π Ξ±] {a : Ξ±}
protected theorem IsMax.grade (h : IsMax a) : IsMax (grade π a) :=
- GradeMaxOrder.is_max_grade h
+ GradeMaxOrder.isMax_grade h
#align is_max.grade IsMax.grade
variable {π}
@@ -221,11 +221,10 @@ end PartialOrder
variable [Preorder π] [Preorder β] [Preorder Ξ±] [Preorder Ξ²]
-instance Preorder.toGradeBoundedOrder : GradeBoundedOrder Ξ± Ξ±
- where
+instance Preorder.toGradeBoundedOrder : GradeBoundedOrder Ξ± Ξ± where
grade := id
- is_min_grade _ := id
- is_max_grade _ := id
+ isMin_grade _ := id
+ isMax_grade _ := id
grade_strictMono := strictMono_id
covby_grade _ _ := id
#align preorder.to_grade_bounded_order Preorder.toGradeBoundedOrder
@@ -237,17 +236,16 @@ theorem grade_self (a : Ξ±) : grade Ξ± a = a :=
/-! #### Dual -/
-instance OrderDual.gradeOrder [GradeOrder π Ξ±] : GradeOrder πα΅α΅ Ξ±α΅α΅
- where
+instance OrderDual.gradeOrder [GradeOrder π Ξ±] : GradeOrder πα΅α΅ Ξ±α΅α΅ where
grade := toDual β grade π β ofDual
grade_strictMono := grade_strictMono.dual
covby_grade _ _ h := (h.ofDual.grade _).toDual
instance OrderDual.gradeMinOrder [GradeMaxOrder π Ξ±] : GradeMinOrder πα΅α΅ Ξ±α΅α΅ :=
- { OrderDual.gradeOrder with is_min_grade := fun _ => IsMax.grade (Ξ± := Ξ±) π }
+ { OrderDual.gradeOrder with isMin_grade := fun _ => IsMax.grade (Ξ± := Ξ±) π }
instance OrderDual.gradeMaxOrder [GradeMinOrder π Ξ±] : GradeMaxOrder πα΅α΅ Ξ±α΅α΅ :=
- { OrderDual.gradeOrder with is_max_grade := fun _ => IsMin.grade (Ξ± := Ξ±) π }
+ { OrderDual.gradeOrder with isMax_grade := fun _ => IsMin.grade (Ξ± := Ξ±) π }
instance [GradeBoundedOrder π Ξ±] : GradeBoundedOrder πα΅α΅ Ξ±α΅α΅ :=
{ OrderDual.gradeMinOrder, OrderDual.gradeMaxOrder with }
@@ -280,7 +278,7 @@ def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono
@[reducible]
def GradeMinOrder.liftLeft [GradeMinOrder π Ξ±] (f : π β β) (hf : StrictMono f)
(hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder β Ξ± :=
- { GradeOrder.liftLeft f hf hcovby with is_min_grade := fun _ ha => hmin _ <| ha.grade _ }
+ { GradeOrder.liftLeft f hf hcovby with isMin_grade := fun _ ha => hmin _ <| ha.grade _ }
#align grade_min_order.lift_left GradeMinOrder.liftLeft
-- See note [reducible non-instances]
@@ -288,7 +286,7 @@ def GradeMinOrder.liftLeft [GradeMinOrder π Ξ±] (f : π β β) (hf : Stri
@[reducible]
def GradeMaxOrder.liftLeft [GradeMaxOrder π Ξ±] (f : π β β) (hf : StrictMono f)
(hcovby : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder β Ξ± :=
- { GradeOrder.liftLeft f hf hcovby with is_max_grade := fun _ ha => hmax _ <| ha.grade _ }
+ { GradeOrder.liftLeft f hf hcovby with isMax_grade := fun _ ha => hmax _ <| ha.grade _ }
#align grade_max_order.lift_left GradeMaxOrder.liftLeft
-- See note [reducible non-instances]
@@ -316,7 +314,7 @@ def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f
@[reducible]
def GradeMinOrder.liftRight [GradeMinOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f)
(hcovby : β a b, a β b β f a β f b) (hmin : β a, IsMin a β IsMin (f a)) : GradeMinOrder π Ξ± :=
- { GradeOrder.liftRight f hf hcovby with is_min_grade := fun _ ha => (hmin _ ha).grade _ }
+ { GradeOrder.liftRight f hf hcovby with isMin_grade := fun _ ha => (hmin _ ha).grade _ }
#align grade_min_order.lift_right GradeMinOrder.liftRight
-- See note [reducible non-instances]
@@ -324,7 +322,7 @@ def GradeMinOrder.liftRight [GradeMinOrder π Ξ²] (f : Ξ± β Ξ²) (hf : Strict
@[reducible]
def GradeMaxOrder.liftRight [GradeMaxOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f)
(hcovby : β a b, a β b β f a β f b) (hmax : β a, IsMax a β IsMax (f a)) : GradeMaxOrder π Ξ± :=
- { GradeOrder.liftRight f hf hcovby with is_max_grade := fun _ ha => (hmax _ ha).grade _ }
+ { GradeOrder.liftRight f hf hcovby with isMax_grade := fun _ ha => (hmax _ ha).grade _ }
#align grade_max_order.lift_right GradeMaxOrder.liftRight
-- See note [reducible non-instances]
@@ -2,15 +2,12 @@
Copyright (c) 2022 YaΓ«l Dillies, Violeta HernΓ‘ndez Palacios. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: YaΓ«l Dillies, Violeta HernΓ‘ndez Palacios, Grayson Burton, Vladimir Ivanov
-
-! This file was ported from Lean 3 source module order.grade
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.Basic
import Mathlib.Data.Int.SuccPred
+#align_import order.grade from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
+
/-!
# Graded orders
@@ -16,7 +16,7 @@ import Mathlib.Data.Int.SuccPred
This file defines graded orders, also known as ranked orders.
-A `π`-graded order is an order `Ξ±` equipped with a distinguished "grade" function `Ξ± β π` which
+An `π`-graded order is an order `Ξ±` equipped with a distinguished "grade" function `Ξ± β π` which
should be understood as giving the "height" of the elements. Usual graded orders are `β`-graded,
cograded orders are `βα΅α΅`-graded, but we can also grade by `β€`, and polytopes are naturally
`Fin n`-graded.
@@ -74,19 +74,19 @@ class GradeOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] where
covby_grade β¦a b : Ξ±β¦ : a β b β grade a β grade b
#align grade_order GradeOrder
-/-- A `π`-graded order where minimal elements have minimal grades. -/
+/-- An `π`-graded order where minimal elements have minimal grades. -/
class GradeMinOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeOrder π Ξ± where
/-- Minimal elements have minimal grades. -/
is_min_grade β¦a : Ξ±β¦ : IsMin a β IsMin (grade a)
#align grade_min_order GradeMinOrder
-/-- A `π`-graded order where maximal elements have maximal grades. -/
+/-- An `π`-graded order where maximal elements have maximal grades. -/
class GradeMaxOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeOrder π Ξ± where
/-- Maximal elements have maximal grades. -/
is_max_grade β¦a : Ξ±β¦ : IsMax a β IsMax (grade a)
#align grade_max_order GradeMaxOrder
-/-- A `π`-graded order where minimal elements have minimal grades and maximal elements have maximal
+/-- An `π`-graded order where minimal elements have minimal grades and maximal elements have maximal
grades. -/
class GradeBoundedOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] extends GradeMinOrder π Ξ±,
GradeMaxOrder π Ξ±
fix-comments.py
on all files.@@ -339,7 +339,7 @@ def GradeBoundedOrder.liftRight [GradeBoundedOrder π Ξ²] (f : Ξ± β Ξ²) (hf
{ GradeMinOrder.liftRight f hf hcovby hmin, GradeMaxOrder.liftRight f hf hcovby hmax with }
#align grade_bounded_order.lift_right GradeBoundedOrder.liftRight
-/-! #### `fin n`-graded to `β`-graded to `β€`-graded -/
+/-! #### `Fin n`-graded to `β`-graded to `β€`-graded -/
-- See note [reducible non-instances]
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -355,8 +355,7 @@ def GradeOrder.finToNat (n : β) [GradeOrder (Fin n) Ξ±] : GradeOrder β Ξ± :=
inferrable. -/
@[reducible]
def GradeMinOrder.finToNat (n : β) [GradeMinOrder (Fin n) Ξ±] : GradeMinOrder β Ξ± :=
- (GradeMinOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono fun _ _ => Covby.coe_fin) fun a h =>
- by
+ (GradeMinOrder.liftLeft (_ : Fin n β β) Fin.val_strictMono fun _ _ => Covby.coe_fin) fun a h => by
cases n
Β· exact a.elim0
rw [h.eq_bot, Fin.bot_eq_zero]
@@ -69,7 +69,7 @@ class GradeOrder (π Ξ± : Type _) [Preorder π] [Preorder Ξ±] where
/-- The grading function. -/
grade : Ξ± β π
/-- `grade` is strictly monotonic. -/
- grade_strict_mono : StrictMono grade
+ grade_strictMono : StrictMono grade
/-- `grade` preserves `Covby`. -/
covby_grade β¦a b : Ξ±β¦ : a β b β grade a β grade b
#align grade_order GradeOrder
@@ -114,13 +114,13 @@ protected theorem Covby.grade (h : a β b) : grade π a β grade π b :=
variable {π}
-theorem grade_strict_mono : StrictMono (grade π : Ξ± β π) :=
- GradeOrder.grade_strict_mono
-#align grade_strict_mono grade_strict_mono
+theorem grade_strictMono : StrictMono (grade π : Ξ± β π) :=
+ GradeOrder.grade_strictMono
+#align grade_strict_mono grade_strictMono
theorem covby_iff_lt_covby_grade : a β b β a < b β§ grade π a β grade π b :=
β¨fun h => β¨h.1, h.grade _β©,
- And.imp_right fun h _ ha hb => h.2 (grade_strict_mono ha) <| grade_strict_mono hbβ©
+ And.imp_right fun h _ ha hb => h.2 (grade_strictMono ha) <| grade_strictMono hbβ©
#align covby_iff_lt_covby_grade covby_iff_lt_covby_grade
end GradeOrder
@@ -137,7 +137,7 @@ variable {π}
@[simp]
theorem isMin_grade_iff : IsMin (grade π a) β IsMin a :=
- β¨grade_strict_mono.isMin_of_apply, IsMin.grade _β©
+ β¨grade_strictMono.isMin_of_apply, IsMin.grade _β©
#align is_min_grade_iff isMin_grade_iff
end GradeMinOrder
@@ -154,7 +154,7 @@ variable {π}
@[simp]
theorem isMax_grade_iff : IsMax (grade π a) β IsMax a :=
- β¨grade_strict_mono.isMax_of_apply, IsMax.grade _β©
+ β¨grade_strictMono.isMax_of_apply, IsMax.grade _β©
#align is_max_grade_iff isMax_grade_iff
end GradeMaxOrder
@@ -163,7 +163,7 @@ end Preorder
-- graded order
theorem grade_mono [PartialOrder Ξ±] [Preorder π] [GradeOrder π Ξ±] : Monotone (grade π : Ξ± β π) :=
- grade_strict_mono.monotone
+ grade_strictMono.monotone
#align grade_mono grade_mono
section LinearOrder
@@ -172,17 +172,17 @@ section LinearOrder
variable [LinearOrder Ξ±] [Preorder π] [GradeOrder π Ξ±] {a b : Ξ±}
theorem grade_injective : Function.Injective (grade π : Ξ± β π) :=
- grade_strict_mono.injective
+ grade_strictMono.injective
#align grade_injective grade_injective
@[simp]
theorem grade_le_grade_iff : grade π a β€ grade π b β a β€ b :=
- grade_strict_mono.le_iff_le
+ grade_strictMono.le_iff_le
#align grade_le_grade_iff grade_le_grade_iff
@[simp]
theorem grade_lt_grade_iff : grade π a < grade π b β a < b :=
- grade_strict_mono.lt_iff_lt
+ grade_strictMono.lt_iff_lt
#align grade_lt_grade_iff grade_lt_grade_iff
@[simp]
@@ -229,7 +229,7 @@ instance Preorder.toGradeBoundedOrder : GradeBoundedOrder Ξ± Ξ±
grade := id
is_min_grade _ := id
is_max_grade _ := id
- grade_strict_mono := strictMono_id
+ grade_strictMono := strictMono_id
covby_grade _ _ := id
#align preorder.to_grade_bounded_order Preorder.toGradeBoundedOrder
@@ -243,7 +243,7 @@ theorem grade_self (a : Ξ±) : grade Ξ± a = a :=
instance OrderDual.gradeOrder [GradeOrder π Ξ±] : GradeOrder πα΅α΅ Ξ±α΅α΅
where
grade := toDual β grade π β ofDual
- grade_strict_mono := grade_strict_mono.dual
+ grade_strictMono := grade_strictMono.dual
covby_grade _ _ h := (h.ofDual.grade _).toDual
instance OrderDual.gradeMinOrder [GradeMaxOrder π Ξ±] : GradeMinOrder πα΅α΅ Ξ±α΅α΅ :=
@@ -274,7 +274,7 @@ def GradeOrder.liftLeft [GradeOrder π Ξ±] (f : π β β) (hf : StrictMono
(hcovby : β a b, a β b β f a β f b) : GradeOrder β Ξ±
where
grade := f β (@grade π _ _ _ _) -- porting note - what the hell?! used to be `grade π`
- grade_strict_mono := hf.comp grade_strict_mono
+ grade_strictMono := hf.comp grade_strictMono
covby_grade _ _ h := hcovby _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
@@ -310,7 +310,7 @@ def GradeOrder.liftRight [GradeOrder π Ξ²] (f : Ξ± β Ξ²) (hf : StrictMono f
(hcovby : β a b, a β b β f a β f b) : GradeOrder π Ξ±
where
grade := (@grade π _ _ _ _) β f -- porting note: again, weird
- grade_strict_mono := grade_strict_mono.comp hf
+ grade_strictMono := grade_strictMono.comp hf
covby_grade _ _ h := (hcovby _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
Some of the docs seem dodgy, even Lean3 wise. I left them as-is for now awaiting further input. I got some weird breakage with OrderDual that I don't know how to fix; judicious @
didn't seem to help. Also, some nice variable
features seem to not be working in Lean4; they were very useful for organisation.
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk> Co-authored-by: Eric Rodriguez <37984851+ericrbg@users.noreply.github.com>
The unported dependencies are