data.nat.succ_predMathlib.Data.Nat.SuccPred

This file has been ported!

Changes since the initial port

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

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -82,21 +82,21 @@ instance : IsPredArchimedean ℕ :=
 /-! ### Covering relation -/
 
 
-#print Nat.covby_iff_succ_eq /-
-protected theorem covby_iff_succ_eq {m n : ℕ} : m ⋖ n ↔ m + 1 = n :=
-  succ_eq_iff_covby.symm
-#align nat.covby_iff_succ_eq Nat.covby_iff_succ_eq
+#print Nat.covBy_iff_succ_eq /-
+protected theorem covBy_iff_succ_eq {m n : ℕ} : m ⋖ n ↔ m + 1 = n :=
+  succ_eq_iff_covBy.symm
+#align nat.covby_iff_succ_eq Nat.covBy_iff_succ_eq
 -/
 
 end Nat
 
-#print Fin.coe_covby_iff /-
+#print Fin.coe_covBy_iff /-
 @[simp, norm_cast]
-theorem Fin.coe_covby_iff {n : ℕ} {a b : Fin n} : (a : ℕ) ⋖ b ↔ a ⋖ b :=
+theorem Fin.coe_covBy_iff {n : ℕ} {a b : Fin n} : (a : ℕ) ⋖ b ↔ a ⋖ b :=
   and_congr_right' ⟨fun h c hc => h hc, fun h c ha hb => @h ⟨c, hb.trans b.Prop⟩ ha hb⟩
-#align fin.coe_covby_iff Fin.coe_covby_iff
+#align fin.coe_covby_iff Fin.coe_covBy_iff
 -/
 
-alias ⟨_, Covby.coe_fin⟩ := Fin.coe_covby_iff
-#align covby.coe_fin Covby.coe_fin
+alias ⟨_, CovBy.coe_fin⟩ := Fin.coe_covBy_iff
+#align covby.coe_fin CovBy.coe_fin
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
-import Mathbin.Data.Fin.Basic
-import Mathbin.Order.SuccPred.Basic
+import Data.Fin.Basic
+import Order.SuccPred.Basic
 
 #align_import data.nat.succ_pred from "leanprover-community/mathlib"@"f2f413b9d4be3a02840d0663dace76e8fe3da053"
 
Diff
@@ -97,6 +97,6 @@ theorem Fin.coe_covby_iff {n : ℕ} {a b : Fin n} : (a : ℕ) ⋖ b ↔ a ⋖ b
 #align fin.coe_covby_iff Fin.coe_covby_iff
 -/
 
-alias Fin.coe_covby_iff ↔ _ Covby.coe_fin
+alias ⟨_, Covby.coe_fin⟩ := Fin.coe_covby_iff
 #align covby.coe_fin Covby.coe_fin
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.nat.succ_pred
-! leanprover-community/mathlib commit f2f413b9d4be3a02840d0663dace76e8fe3da053
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Fin.Basic
 import Mathbin.Order.SuccPred.Basic
 
+#align_import data.nat.succ_pred from "leanprover-community/mathlib"@"f2f413b9d4be3a02840d0663dace76e8fe3da053"
+
 /-!
 # Successors and predecessors of naturals
 
Diff
@@ -48,15 +48,19 @@ instance : PredOrder ℕ where
     · exact b.zero_le
     · exact h
 
+#print Nat.succ_eq_succ /-
 @[simp]
 theorem succ_eq_succ : Order.succ = succ :=
   rfl
 #align nat.succ_eq_succ Nat.succ_eq_succ
+-/
 
+#print Nat.pred_eq_pred /-
 @[simp]
 theorem pred_eq_pred : Order.pred = pred :=
   rfl
 #align nat.pred_eq_pred Nat.pred_eq_pred
+-/
 
 #print Nat.succ_iterate /-
 theorem succ_iterate (a : ℕ) : ∀ n, (succ^[n]) a = a + n
Diff
@@ -48,23 +48,11 @@ instance : PredOrder ℕ where
     · exact b.zero_le
     · exact h
 
-/- warning: nat.succ_eq_succ -> Nat.succ_eq_succ is a dubious translation:
-lean 3 declaration is
-  Eq.{1} (Nat -> Nat) (Order.succ.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.succOrder) Nat.succ
-but is expected to have type
-  Eq.{1} (Nat -> Nat) (Order.succ.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.instSuccOrderNatToPreorderToPartialOrderStrictOrderedSemiring) Nat.succ
-Case conversion may be inaccurate. Consider using '#align nat.succ_eq_succ Nat.succ_eq_succₓ'. -/
 @[simp]
 theorem succ_eq_succ : Order.succ = succ :=
   rfl
 #align nat.succ_eq_succ Nat.succ_eq_succ
 
-/- warning: nat.pred_eq_pred -> Nat.pred_eq_pred is a dubious translation:
-lean 3 declaration is
-  Eq.{1} (Nat -> Nat) (Order.pred.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.predOrder) Nat.pred
-but is expected to have type
-  Eq.{1} (([mdata borrowed:1 Nat]) -> ([mdata borrowed:1 Nat])) (Order.pred.{0} ([mdata borrowed:1 Nat]) (PartialOrder.toPreorder.{0} ([mdata borrowed:1 Nat]) (StrictOrderedSemiring.toPartialOrder.{0} ([mdata borrowed:1 Nat]) Nat.strictOrderedSemiring)) Nat.instPredOrderNatToPreorderToPartialOrderStrictOrderedSemiring) Nat.pred
-Case conversion may be inaccurate. Consider using '#align nat.pred_eq_pred Nat.pred_eq_predₓ'. -/
 @[simp]
 theorem pred_eq_pred : Order.pred = pred :=
   rfl
Diff
@@ -73,18 +73,14 @@ theorem pred_eq_pred : Order.pred = pred :=
 #print Nat.succ_iterate /-
 theorem succ_iterate (a : ℕ) : ∀ n, (succ^[n]) a = a + n
   | 0 => rfl
-  | n + 1 => by
-    rw [Function.iterate_succ', add_succ]
-    exact congr_arg _ n.succ_iterate
+  | n + 1 => by rw [Function.iterate_succ', add_succ]; exact congr_arg _ n.succ_iterate
 #align nat.succ_iterate Nat.succ_iterate
 -/
 
 #print Nat.pred_iterate /-
 theorem pred_iterate (a : ℕ) : ∀ n, (pred^[n]) a = a - n
   | 0 => rfl
-  | n + 1 => by
-    rw [Function.iterate_succ', sub_succ]
-    exact congr_arg _ n.pred_iterate
+  | n + 1 => by rw [Function.iterate_succ', sub_succ]; exact congr_arg _ n.pred_iterate
 #align nat.pred_iterate Nat.pred_iterate
 -/
 
Diff
@@ -48,19 +48,27 @@ instance : PredOrder ℕ where
     · exact b.zero_le
     · exact h
 
-#print Nat.succ_eq_succ /-
+/- warning: nat.succ_eq_succ -> Nat.succ_eq_succ is a dubious translation:
+lean 3 declaration is
+  Eq.{1} (Nat -> Nat) (Order.succ.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.succOrder) Nat.succ
+but is expected to have type
+  Eq.{1} (Nat -> Nat) (Order.succ.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.instSuccOrderNatToPreorderToPartialOrderStrictOrderedSemiring) Nat.succ
+Case conversion may be inaccurate. Consider using '#align nat.succ_eq_succ Nat.succ_eq_succₓ'. -/
 @[simp]
 theorem succ_eq_succ : Order.succ = succ :=
   rfl
 #align nat.succ_eq_succ Nat.succ_eq_succ
--/
 
-#print Nat.pred_eq_pred /-
+/- warning: nat.pred_eq_pred -> Nat.pred_eq_pred is a dubious translation:
+lean 3 declaration is
+  Eq.{1} (Nat -> Nat) (Order.pred.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.predOrder) Nat.pred
+but is expected to have type
+  Eq.{1} (([mdata borrowed:1 Nat]) -> ([mdata borrowed:1 Nat])) (Order.pred.{0} ([mdata borrowed:1 Nat]) (PartialOrder.toPreorder.{0} ([mdata borrowed:1 Nat]) (StrictOrderedSemiring.toPartialOrder.{0} ([mdata borrowed:1 Nat]) Nat.strictOrderedSemiring)) Nat.instPredOrderNatToPreorderToPartialOrderStrictOrderedSemiring) Nat.pred
+Case conversion may be inaccurate. Consider using '#align nat.pred_eq_pred Nat.pred_eq_predₓ'. -/
 @[simp]
 theorem pred_eq_pred : Order.pred = pred :=
   rfl
 #align nat.pred_eq_pred Nat.pred_eq_pred
--/
 
 #print Nat.succ_iterate /-
 theorem succ_iterate (a : ℕ) : ∀ n, (succ^[n]) a = a + n

Changes in mathlib4

mathlib3
mathlib4
feat: Lemmas relating Polynomial.eraseLead and nextCoeff. (#9083)

Some little theorems relating eraseLead and nextCoeff to each other. Also includes monomial_sub and card_support_mul which could be of independent interest.

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

Diff
@@ -18,6 +18,7 @@ In this file, we show that `ℕ` is both an archimedean `succOrder` and an archi
 open Function Order
 
 namespace Nat
+variable {m n : ℕ}
 
 -- so that Lean reads `Nat.succ` through `succ_order.succ`
 @[reducible]
@@ -66,6 +67,8 @@ theorem pred_iterate (a : ℕ) : ∀ n, pred^[n] a = a - n
     exact congr_arg _ (pred_iterate a n)
 #align nat.pred_iterate Nat.pred_iterate
 
+lemma le_succ_iff_eq_or_le : m ≤ n.succ ↔ m = n.succ ∨ m ≤ n := Order.le_succ_iff_eq_or_le
+
 instance : IsSuccArchimedean ℕ :=
   ⟨fun {a} {b} h => ⟨b - a, by rw [succ_eq_succ, succ_iterate, add_tsub_cancel_of_le h]⟩⟩
 
chore(Covby): rename Covby to CovBy (#9578)

Rename

  • CovbyCovBy, WcovbyWCovBy
  • *covby**covBy*
  • wcovby.finset_valWCovBy.finset_val, wcovby.finset_coeWCovBy.finset_coe
  • Covby.is_coatomCovBy.isCoatom
Diff
@@ -79,16 +79,16 @@ lemma forall_ne_zero_iff (P : ℕ → Prop) :
 /-! ### Covering relation -/
 
 
-protected theorem covby_iff_succ_eq {m n : ℕ} : m ⋖ n ↔ m + 1 = n :=
-  succ_eq_iff_covby.symm
-#align nat.covby_iff_succ_eq Nat.covby_iff_succ_eq
+protected theorem covBy_iff_succ_eq {m n : ℕ} : m ⋖ n ↔ m + 1 = n :=
+  succ_eq_iff_covBy.symm
+#align nat.covby_iff_succ_eq Nat.covBy_iff_succ_eq
 
 end Nat
 
 @[simp, norm_cast]
-theorem Fin.coe_covby_iff {n : ℕ} {a b : Fin n} : (a : ℕ) ⋖ b ↔ a ⋖ b :=
+theorem Fin.coe_covBy_iff {n : ℕ} {a b : Fin n} : (a : ℕ) ⋖ b ↔ a ⋖ b :=
   and_congr_right' ⟨fun h _c hc => h hc, fun h c ha hb => @h ⟨c, hb.trans b.prop⟩ ha hb⟩
-#align fin.coe_covby_iff Fin.coe_covby_iff
+#align fin.coe_covby_iff Fin.coe_covBy_iff
 
-alias ⟨_, Covby.coe_fin⟩ := Fin.coe_covby_iff
-#align covby.coe_fin Covby.coe_fin
+alias ⟨_, CovBy.coe_fin⟩ := Fin.coe_covBy_iff
+#align covby.coe_fin CovBy.coe_fin
feat: patch for new alias command (#6172)
Diff
@@ -90,5 +90,5 @@ theorem Fin.coe_covby_iff {n : ℕ} {a b : Fin n} : (a : ℕ) ⋖ b ↔ a ⋖ b
   and_congr_right' ⟨fun h _c hc => h hc, fun h c ha hb => @h ⟨c, hb.trans b.prop⟩ ha hb⟩
 #align fin.coe_covby_iff Fin.coe_covby_iff
 
-alias Fin.coe_covby_iff ↔ _ Covby.coe_fin
+alias ⟨_, Covby.coe_fin⟩ := Fin.coe_covby_iff
 #align covby.coe_fin Covby.coe_fin
feat: lemmas about nilpotency and polynomials (#6450)
Diff
@@ -72,6 +72,10 @@ instance : IsSuccArchimedean ℕ :=
 instance : IsPredArchimedean ℕ :=
   ⟨fun {a} {b} h => ⟨b - a, by rw [pred_eq_pred, pred_iterate, tsub_tsub_cancel_of_le h]⟩⟩
 
+lemma forall_ne_zero_iff (P : ℕ → Prop) :
+    (∀ i, i ≠ 0 → P i) ↔ (∀ i, P (i + 1)) :=
+  SuccOrder.forall_ne_bot_iff P
+
 /-! ### Covering relation -/
 
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.nat.succ_pred
-! leanprover-community/mathlib commit a2d2e18906e2b62627646b5d5be856e6a642062f
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Fin.Basic
 import Mathlib.Order.SuccPred.Basic
 
+#align_import data.nat.succ_pred from "leanprover-community/mathlib"@"a2d2e18906e2b62627646b5d5be856e6a642062f"
+
 /-!
 # Successors and predecessors of naturals
 
fix precedence of Nat.iterate (#5589)
Diff
@@ -55,14 +55,14 @@ theorem pred_eq_pred : Order.pred = pred :=
   rfl
 #align nat.pred_eq_pred Nat.pred_eq_pred
 
-theorem succ_iterate (a : ℕ) : ∀ n, (succ^[n]) a = a + n
+theorem succ_iterate (a : ℕ) : ∀ n, succ^[n] a = a + n
   | 0 => rfl
   | n + 1 => by
     rw [Function.iterate_succ', add_succ]
     exact congr_arg _ (succ_iterate a n)
 #align nat.succ_iterate Nat.succ_iterate
 
-theorem pred_iterate (a : ℕ) : ∀ n, (pred^[n]) a = a - n
+theorem pred_iterate (a : ℕ) : ∀ n, pred^[n] a = a - n
   | 0 => rfl
   | n + 1 => by
     rw [Function.iterate_succ', sub_succ]
@@ -91,4 +91,3 @@ theorem Fin.coe_covby_iff {n : ℕ} {a b : Fin n} : (a : ℕ) ⋖ b ↔ a ⋖ b
 
 alias Fin.coe_covby_iff ↔ _ Covby.coe_fin
 #align covby.coe_fin Covby.coe_fin
-
feat: Port/data.nat.succ_pred (#1480)

Dependencies 1 + 118

119 files ported (99.2%)
56777 lines ported (99.8%)
Show graph

The unported dependencies are