data.nat.succ_pred
⟷
Mathlib.Data.Nat.SuccPred
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -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"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -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
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -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
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
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>
@@ -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]⟩⟩
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
@@ -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
@@ -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
@@ -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 -/
@@ -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
@@ -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
-