order.succ_pred.linear_locally_finite
⟷
Mathlib.Order.SuccPred.LinearLocallyFinite
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2022 Rémy Degenne. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rémy Degenne
-/
-import Order.LocallyFinite
+import Order.Interval.Finset.Defs
import Order.SuccPred.Basic
import Order.Hom.Basic
import Data.Countable.Basic
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -239,14 +239,14 @@ theorem toZ_of_eq : toZ i0 i0 = 0 := by
#print iterate_succ_toZ /-
theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : (succ^[(toZ i0 i).toNat]) i0 = i := by
- rw [toZ_of_ge hi, Int.toNat_coe_nat]; exact Nat.find_spec (exists_succ_iterate_of_le hi)
+ rw [toZ_of_ge hi, Int.toNat_natCast]; exact Nat.find_spec (exists_succ_iterate_of_le hi)
#align iterate_succ_to_Z iterate_succ_toZ
-/
#print iterate_pred_toZ /-
theorem iterate_pred_toZ (i : ι) (hi : i < i0) : (pred^[(-toZ i0 i).toNat]) i0 = i :=
by
- rw [toZ_of_lt hi, neg_neg, Int.toNat_coe_nat]
+ rw [toZ_of_lt hi, neg_neg, Int.toNat_natCast]
exact Nat.find_spec (exists_pred_iterate_of_le hi.le)
#align iterate_pred_to_Z iterate_pred_toZ
-/
@@ -487,7 +487,7 @@ def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
right_inv n := by
simp_rw [if_pos bot_le]
rw [toZ_iterate_succ]
- exact Int.toNat_coe_nat n
+ exact Int.toNat_natCast n
map_rel_iff' i j := by
simp only [Equiv.coe_fn_mk, Int.toNat_le]
rw [← @toZ_le_iff ι _ _ _ _ ⊥, Int.toNat_of_nonneg (toZ_nonneg bot_le)]
@@ -516,7 +516,7 @@ def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
rw [hn_max]
exact nat.lt_succ_iff.mp (finset.mem_range.mp n.prop)
· rw [toZ_iterate_succ_of_not_isMax _ hn_max]
- simp only [Int.toNat_coe_nat]
+ simp only [Int.toNat_natCast]
map_rel_iff' i j :=
by
simp only [Equiv.coe_fn_mk, Subtype.mk_le_mk, Int.toNat_le]
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -105,29 +105,29 @@ theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i
by
rw [Finset.coe_Ioc]
have h := succ_fn_spec i
- rw [h_succ_fn_eq] at h
+ rw [h_succ_fn_eq] at h
exact is_glb_Ioc_of_is_glb_Ioi hij_lt h
have hi_mem : i ∈ Finset.Ioc i j :=
by
refine' Finset.isGLB_mem _ h_glb _
exact ⟨_, finset.mem_Ioc.mpr ⟨hij_lt, le_rfl⟩⟩
- rw [Finset.mem_Ioc] at hi_mem
+ rw [Finset.mem_Ioc] at hi_mem
exact lt_irrefl i hi_mem.1
#align linear_locally_finite_order.is_max_of_succ_fn_le LinearLocallyFiniteOrder.isMax_of_succFn_le
-/
#print LinearLocallyFiniteOrder.succFn_le_of_lt /-
theorem succFn_le_of_lt (i j : ι) (hij : i < j) : succFn i ≤ j := by have h := succ_fn_spec i;
- rw [IsGLB, IsGreatest, mem_lowerBounds] at h ; exact h.1 j hij
+ rw [IsGLB, IsGreatest, mem_lowerBounds] at h; exact h.1 j hij
#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_lt
-/
#print LinearLocallyFiniteOrder.le_of_lt_succFn /-
theorem le_of_lt_succFn (j i : ι) (hij : j < succFn i) : j ≤ i :=
by
- rw [lt_isGLB_iff (succ_fn_spec i)] at hij
+ rw [lt_isGLB_iff (succ_fn_spec i)] at hij
obtain ⟨k, hk_lb, hk⟩ := hij
- rw [mem_lowerBounds] at hk_lb
+ rw [mem_lowerBounds] at hk_lb
exact not_lt.mp fun hi_lt_j => not_le.mpr hk (hk_lb j hi_lt_j)
#align linear_locally_finite_order.le_of_lt_succ_fn LinearLocallyFiniteOrder.le_of_lt_succFn
-/
@@ -150,11 +150,11 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
IsSuccArchimedean ι
where exists_succ_iterate_of_le i j hij :=
by
- rw [le_iff_lt_or_eq] at hij
+ rw [le_iff_lt_or_eq] at hij
cases hij
swap; · refine' ⟨0, _⟩; simpa only [Function.iterate_zero, id.def] using hij
by_contra h
- push_neg at h
+ push_neg at h
have h_lt : ∀ n, (succ^[n]) i < j := by
intro n
induction' n with n hn
@@ -263,7 +263,7 @@ theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 :=
· rw [toZ_of_lt hi, neg_nonpos]; exact Nat.cast_nonneg _
· by_contra
have h_eq := iterate_pred_toZ i hi
- rw [← h_eq, h] at hi
+ rw [← h_eq, h] at hi
simpa only [neg_zero, Int.toNat_zero, Function.iterate_zero, id.def, lt_self_iff_false] using hi
#align to_Z_neg toZ_neg
-/
@@ -360,10 +360,10 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
nth_rw 1 [← iterate_succ_toZ i hi]
rw [Function.iterate_add]
by_contra h
- push_neg at h
+ push_neg at h
by_cases hm0 : m = 0
- · rw [hm0, Function.iterate_zero, id.def] at hm
- rw [hm] at h
+ · rw [hm0, Function.iterate_zero, id.def] at hm
+ rw [hm] at h
exact lt_irrefl _ h
refine' hi_max (max_of_succ_le (le_trans _ (@le_of_toZ_le _ _ _ _ _ i0 _ _ _)))
· exact j
@@ -372,7 +372,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
rw [hj_eq]
refine' Monotone.monotone_iterate_of_le_map succ_mono (le_succ i0) (add_le_add_left _ _)
exact nat.one_le_iff_ne_zero.mpr hm0
- rwa [Function.iterate_succ', Function.comp_apply, iterate_succ_toZ i hi] at h_succ_le
+ rwa [Function.iterate_succ', Function.comp_apply, iterate_succ_toZ i hi] at h_succ_le
· exact h.le
· exact absurd h_le (not_le.mpr (hj.trans_le hi))
· exact (toZ_neg hi).le.trans (toZ_nonneg hj)
@@ -384,10 +384,10 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
nth_rw 1 [← iterate_pred_toZ j hj]
rw [Function.iterate_add]
by_contra h
- push_neg at h
+ push_neg at h
by_cases hm0 : m = 0
- · rw [hm0, Function.iterate_zero, id.def] at hm
- rw [hm] at h
+ · rw [hm0, Function.iterate_zero, id.def] at hm
+ rw [hm] at h
exact lt_irrefl _ h
refine' hj_min (min_of_le_pred _)
refine' (@le_of_toZ_le _ _ _ _ _ i0 _ _ _).trans _
@@ -398,7 +398,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
rw [hj_eq]
refine' Monotone.antitone_iterate_of_map_le pred_mono (pred_le i0) (add_le_add_left _ _)
exact nat.one_le_iff_ne_zero.mpr hm0
- rwa [Function.iterate_succ', Function.comp_apply, iterate_pred_toZ j hj] at h_le_pred
+ rwa [Function.iterate_succ', Function.comp_apply, iterate_pred_toZ j hj] at h_le_pred
#align to_Z_mono toZ_mono
-/
@@ -512,7 +512,7 @@ def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
· rw [Int.toNat_le]
exact toZ_iterate_succ_le _
by_cases hn_max : IsMax ((succ^[↑n]) (⊥ : ι))
- · rw [← isTop_iff_isMax, isTop_iff_eq_top] at hn_max
+ · rw [← isTop_iff_isMax, isTop_iff_eq_top] at hn_max
rw [hn_max]
exact nat.lt_succ_iff.mp (finset.mem_range.mp n.prop)
· rw [toZ_iterate_succ_of_not_isMax _ hn_max]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2022 Rémy Degenne. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rémy Degenne
-/
-import Mathbin.Order.LocallyFinite
-import Mathbin.Order.SuccPred.Basic
-import Mathbin.Order.Hom.Basic
-import Mathbin.Data.Countable.Basic
-import Mathbin.Logic.Encodable.Basic
+import Order.LocallyFinite
+import Order.SuccPred.Basic
+import Order.Hom.Basic
+import Data.Countable.Basic
+import Logic.Encodable.Basic
#align_import order.succ_pred.linear_locally_finite from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -109,7 +109,7 @@ theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i
exact is_glb_Ioc_of_is_glb_Ioi hij_lt h
have hi_mem : i ∈ Finset.Ioc i j :=
by
- refine' Finset.is_glb_mem _ h_glb _
+ refine' Finset.isGLB_mem _ h_glb _
exact ⟨_, finset.mem_Ioc.mpr ⟨hij_lt, le_rfl⟩⟩
rw [Finset.mem_Ioc] at hi_mem
exact lt_irrefl i hi_mem.1
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2022 Rémy Degenne. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rémy Degenne
-
-! This file was ported from Lean 3 source module order.succ_pred.linear_locally_finite
-! leanprover-community/mathlib commit 4c19a16e4b705bf135cf9a80ac18fcc99c438514
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Order.LocallyFinite
import Mathbin.Order.SuccPred.Basic
@@ -14,6 +9,8 @@ import Mathbin.Order.Hom.Basic
import Mathbin.Data.Countable.Basic
import Mathbin.Logic.Encodable.Basic
+#align_import order.succ_pred.linear_locally_finite from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
+
/-!
# Linear locally finite orders
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -497,6 +497,7 @@ def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
#align order_iso_nat_of_linear_succ_pred_arch orderIsoNatOfLinearSuccPredArch
-/
+#print orderIsoRangeOfLinearSuccPredArch /-
/-- If the order has both a bot and a top, `to_Z` gives an `order_iso` between `ι` and
`finset.range n` for some `n`. -/
def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
@@ -524,6 +525,7 @@ def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
simp only [Equiv.coe_fn_mk, Subtype.mk_le_mk, Int.toNat_le]
rw [← @toZ_le_iff ι _ _ _ _ ⊥, Int.toNat_of_nonneg (toZ_nonneg bot_le)]
#align order_iso_range_of_linear_succ_pred_arch orderIsoRangeOfLinearSuccPredArch
+-/
end OrderIso
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -157,7 +157,7 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
cases hij
swap; · refine' ⟨0, _⟩; simpa only [Function.iterate_zero, id.def] using hij
by_contra h
- push_neg at h
+ push_neg at h
have h_lt : ∀ n, (succ^[n]) i < j := by
intro n
induction' n with n hn
@@ -363,7 +363,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
nth_rw 1 [← iterate_succ_toZ i hi]
rw [Function.iterate_add]
by_contra h
- push_neg at h
+ push_neg at h
by_cases hm0 : m = 0
· rw [hm0, Function.iterate_zero, id.def] at hm
rw [hm] at h
@@ -387,7 +387,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
nth_rw 1 [← iterate_pred_toZ j hj]
rw [Function.iterate_add]
by_contra h
- push_neg at h
+ push_neg at h
by_cases hm0 : m = 0
· rw [hm0, Function.iterate_zero, id.def] at hm
rw [hm] at h
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -90,7 +90,7 @@ theorem le_succFn (i : ι) : i ≤ succFn i := by rw [le_isGLB_iff (succ_fn_spec
theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi i) k) :
IsGLB (Set.Ioc i j) k :=
by
- simp_rw [IsGLB, IsGreatest, mem_upperBounds, mem_lowerBounds] at h⊢
+ simp_rw [IsGLB, IsGreatest, mem_upperBounds, mem_lowerBounds] at h ⊢
refine' ⟨fun x hx => h.1 x hx.1, fun x hx => h.2 x _⟩
intro y hy
cases' le_or_lt y j with h_le h_lt
@@ -108,29 +108,29 @@ theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i
by
rw [Finset.coe_Ioc]
have h := succ_fn_spec i
- rw [h_succ_fn_eq] at h
+ rw [h_succ_fn_eq] at h
exact is_glb_Ioc_of_is_glb_Ioi hij_lt h
have hi_mem : i ∈ Finset.Ioc i j :=
by
refine' Finset.is_glb_mem _ h_glb _
exact ⟨_, finset.mem_Ioc.mpr ⟨hij_lt, le_rfl⟩⟩
- rw [Finset.mem_Ioc] at hi_mem
+ rw [Finset.mem_Ioc] at hi_mem
exact lt_irrefl i hi_mem.1
#align linear_locally_finite_order.is_max_of_succ_fn_le LinearLocallyFiniteOrder.isMax_of_succFn_le
-/
#print LinearLocallyFiniteOrder.succFn_le_of_lt /-
theorem succFn_le_of_lt (i j : ι) (hij : i < j) : succFn i ≤ j := by have h := succ_fn_spec i;
- rw [IsGLB, IsGreatest, mem_lowerBounds] at h; exact h.1 j hij
+ rw [IsGLB, IsGreatest, mem_lowerBounds] at h ; exact h.1 j hij
#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_lt
-/
#print LinearLocallyFiniteOrder.le_of_lt_succFn /-
theorem le_of_lt_succFn (j i : ι) (hij : j < succFn i) : j ≤ i :=
by
- rw [lt_isGLB_iff (succ_fn_spec i)] at hij
+ rw [lt_isGLB_iff (succ_fn_spec i)] at hij
obtain ⟨k, hk_lb, hk⟩ := hij
- rw [mem_lowerBounds] at hk_lb
+ rw [mem_lowerBounds] at hk_lb
exact not_lt.mp fun hi_lt_j => not_le.mpr hk (hk_lb j hi_lt_j)
#align linear_locally_finite_order.le_of_lt_succ_fn LinearLocallyFiniteOrder.le_of_lt_succFn
-/
@@ -153,11 +153,11 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
IsSuccArchimedean ι
where exists_succ_iterate_of_le i j hij :=
by
- rw [le_iff_lt_or_eq] at hij
+ rw [le_iff_lt_or_eq] at hij
cases hij
swap; · refine' ⟨0, _⟩; simpa only [Function.iterate_zero, id.def] using hij
by_contra h
- push_neg at h
+ push_neg at h
have h_lt : ∀ n, (succ^[n]) i < j := by
intro n
induction' n with n hn
@@ -266,7 +266,7 @@ theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 :=
· rw [toZ_of_lt hi, neg_nonpos]; exact Nat.cast_nonneg _
· by_contra
have h_eq := iterate_pred_toZ i hi
- rw [← h_eq, h] at hi
+ rw [← h_eq, h] at hi
simpa only [neg_zero, Int.toNat_zero, Function.iterate_zero, id.def, lt_self_iff_false] using hi
#align to_Z_neg toZ_neg
-/
@@ -363,10 +363,10 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
nth_rw 1 [← iterate_succ_toZ i hi]
rw [Function.iterate_add]
by_contra h
- push_neg at h
+ push_neg at h
by_cases hm0 : m = 0
- · rw [hm0, Function.iterate_zero, id.def] at hm
- rw [hm] at h
+ · rw [hm0, Function.iterate_zero, id.def] at hm
+ rw [hm] at h
exact lt_irrefl _ h
refine' hi_max (max_of_succ_le (le_trans _ (@le_of_toZ_le _ _ _ _ _ i0 _ _ _)))
· exact j
@@ -375,7 +375,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
rw [hj_eq]
refine' Monotone.monotone_iterate_of_le_map succ_mono (le_succ i0) (add_le_add_left _ _)
exact nat.one_le_iff_ne_zero.mpr hm0
- rwa [Function.iterate_succ', Function.comp_apply, iterate_succ_toZ i hi] at h_succ_le
+ rwa [Function.iterate_succ', Function.comp_apply, iterate_succ_toZ i hi] at h_succ_le
· exact h.le
· exact absurd h_le (not_le.mpr (hj.trans_le hi))
· exact (toZ_neg hi).le.trans (toZ_nonneg hj)
@@ -387,10 +387,10 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
nth_rw 1 [← iterate_pred_toZ j hj]
rw [Function.iterate_add]
by_contra h
- push_neg at h
+ push_neg at h
by_cases hm0 : m = 0
- · rw [hm0, Function.iterate_zero, id.def] at hm
- rw [hm] at h
+ · rw [hm0, Function.iterate_zero, id.def] at hm
+ rw [hm] at h
exact lt_irrefl _ h
refine' hj_min (min_of_le_pred _)
refine' (@le_of_toZ_le _ _ _ _ _ i0 _ _ _).trans _
@@ -401,7 +401,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
rw [hj_eq]
refine' Monotone.antitone_iterate_of_map_le pred_mono (pred_le i0) (add_le_add_left _ _)
exact nat.one_le_iff_ne_zero.mpr hm0
- rwa [Function.iterate_succ', Function.comp_apply, iterate_pred_toZ j hj] at h_le_pred
+ rwa [Function.iterate_succ', Function.comp_apply, iterate_pred_toZ j hj] at h_le_pred
#align to_Z_mono toZ_mono
-/
@@ -514,7 +514,7 @@ def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
· rw [Int.toNat_le]
exact toZ_iterate_succ_le _
by_cases hn_max : IsMax ((succ^[↑n]) (⊥ : ι))
- · rw [← isTop_iff_isMax, isTop_iff_eq_top] at hn_max
+ · rw [← isTop_iff_isMax, isTop_iff_eq_top] at hn_max
rw [hn_max]
exact nat.lt_succ_iff.mp (finset.mem_range.mp n.prop)
· rw [toZ_iterate_succ_of_not_isMax _ hn_max]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -80,10 +80,13 @@ theorem succFn_spec (i : ι) : IsGLB (Set.Ioi i) (succFn i) :=
#align linear_locally_finite_order.succ_fn_spec LinearLocallyFiniteOrder.succFn_spec
-/
+#print LinearLocallyFiniteOrder.le_succFn /-
theorem le_succFn (i : ι) : i ≤ succFn i := by rw [le_isGLB_iff (succ_fn_spec i), mem_lowerBounds];
exact fun x hx => le_of_lt hx
#align linear_locally_finite_order.le_succ_fn LinearLocallyFiniteOrder.le_succFn
+-/
+#print LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi /-
theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi i) k) :
IsGLB (Set.Ioc i j) k :=
by
@@ -94,7 +97,9 @@ theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi
· exact hx y ⟨hy, h_le⟩
· exact le_trans (hx j ⟨hij_lt, le_rfl⟩) h_lt.le
#align linear_locally_finite_order.is_glb_Ioc_of_is_glb_Ioi LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi
+-/
+#print LinearLocallyFiniteOrder.isMax_of_succFn_le /-
theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i) : IsMax i :=
by
refine' fun j hij => not_lt.mp fun hij_lt => _
@@ -112,11 +117,15 @@ theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i
rw [Finset.mem_Ioc] at hi_mem
exact lt_irrefl i hi_mem.1
#align linear_locally_finite_order.is_max_of_succ_fn_le LinearLocallyFiniteOrder.isMax_of_succFn_le
+-/
+#print LinearLocallyFiniteOrder.succFn_le_of_lt /-
theorem succFn_le_of_lt (i j : ι) (hij : i < j) : succFn i ≤ j := by have h := succ_fn_spec i;
rw [IsGLB, IsGreatest, mem_lowerBounds] at h; exact h.1 j hij
#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_lt
+-/
+#print LinearLocallyFiniteOrder.le_of_lt_succFn /-
theorem le_of_lt_succFn (j i : ι) (hij : j < succFn i) : j ≤ i :=
by
rw [lt_isGLB_iff (succ_fn_spec i)] at hij
@@ -124,6 +133,7 @@ theorem le_of_lt_succFn (j i : ι) (hij : j < succFn i) : j ≤ i :=
rw [mem_lowerBounds] at hk_lb
exact not_lt.mp fun hi_lt_j => not_le.mpr hk (hk_lb j hi_lt_j)
#align linear_locally_finite_order.le_of_lt_succ_fn LinearLocallyFiniteOrder.le_of_lt_succFn
+-/
noncomputable instance (priority := 100) [LocallyFiniteOrder ι] : SuccOrder ι
where
@@ -208,13 +218,17 @@ def toZ (i0 i : ι) : ℤ :=
#align to_Z toZ
-/
+#print toZ_of_ge /-
theorem toZ_of_ge (hi : i0 ≤ i) : toZ i0 i = Nat.find (exists_succ_iterate_of_le hi) :=
dif_pos hi
#align to_Z_of_ge toZ_of_ge
+-/
+#print toZ_of_lt /-
theorem toZ_of_lt (hi : i < i0) : toZ i0 i = -Nat.find (exists_pred_iterate_of_le hi.le) :=
dif_neg (not_le.mpr hi)
#align to_Z_of_lt toZ_of_lt
+-/
#print toZ_of_eq /-
@[simp]
@@ -226,19 +240,26 @@ theorem toZ_of_eq : toZ i0 i0 = 0 := by
#align to_Z_of_eq toZ_of_eq
-/
+#print iterate_succ_toZ /-
theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : (succ^[(toZ i0 i).toNat]) i0 = i := by
rw [toZ_of_ge hi, Int.toNat_coe_nat]; exact Nat.find_spec (exists_succ_iterate_of_le hi)
#align iterate_succ_to_Z iterate_succ_toZ
+-/
+#print iterate_pred_toZ /-
theorem iterate_pred_toZ (i : ι) (hi : i < i0) : (pred^[(-toZ i0 i).toNat]) i0 = i :=
by
rw [toZ_of_lt hi, neg_neg, Int.toNat_coe_nat]
exact Nat.find_spec (exists_pred_iterate_of_le hi.le)
#align iterate_pred_to_Z iterate_pred_toZ
+-/
+#print toZ_nonneg /-
theorem toZ_nonneg (hi : i0 ≤ i) : 0 ≤ toZ i0 i := by rw [toZ_of_ge hi]; exact Nat.cast_nonneg _
#align to_Z_nonneg toZ_nonneg
+-/
+#print toZ_neg /-
theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 :=
by
refine' lt_of_le_of_ne _ _
@@ -248,6 +269,7 @@ theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 :=
rw [← h_eq, h] at hi
simpa only [neg_zero, Int.toNat_zero, Function.iterate_zero, id.def, lt_self_iff_false] using hi
#align to_Z_neg toZ_neg
+-/
#print toZ_iterate_succ_le /-
theorem toZ_iterate_succ_le (n : ℕ) : toZ i0 ((succ^[n]) i0) ≤ n :=
@@ -271,6 +293,7 @@ theorem toZ_iterate_pred_ge (n : ℕ) : -(n : ℤ) ≤ toZ i0 ((pred^[n]) i0) :=
#align to_Z_iterate_pred_ge toZ_iterate_pred_ge
-/
+#print toZ_iterate_succ_of_not_isMax /-
theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax ((succ^[n]) i0)) :
toZ i0 ((succ^[n]) i0) = n :=
by
@@ -284,7 +307,9 @@ theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax ((succ^[n]) i0)) :
suffices : IsMax ((succ^[n]) i0); exact absurd this hn
exact is_max_iterate_succ_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_succ_of_not_is_max toZ_iterate_succ_of_not_isMax
+-/
+#print toZ_iterate_pred_of_not_isMin /-
theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
toZ i0 ((pred^[n]) i0) = -n := by
cases n
@@ -306,7 +331,9 @@ theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
· suffices : IsMin ((pred^[n.succ]) i0); exact absurd this hn
exact is_min_iterate_pred_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMin
+-/
+#print le_of_toZ_le /-
theorem le_of_toZ_le {j : ι} (h_le : toZ i0 i ≤ toZ i0 j) : i ≤ j :=
by
cases' le_or_lt i0 i with hi hi <;> cases' le_or_lt i0 j with hj hj
@@ -318,7 +345,9 @@ theorem le_of_toZ_le {j : ι} (h_le : toZ i0 i ≤ toZ i0 j) : i ≤ j :=
refine' Monotone.antitone_iterate_of_map_le pred_mono (pred_le _) (Int.toNat_le_toNat _)
exact neg_le_neg h_le
#align le_of_to_Z_le le_of_toZ_le
+-/
+#print toZ_mono /-
theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
by
by_cases hi_max : IsMax i
@@ -374,18 +403,25 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
exact nat.one_le_iff_ne_zero.mpr hm0
rwa [Function.iterate_succ', Function.comp_apply, iterate_pred_toZ j hj] at h_le_pred
#align to_Z_mono toZ_mono
+-/
+#print toZ_le_iff /-
theorem toZ_le_iff (i j : ι) : toZ i0 i ≤ toZ i0 j ↔ i ≤ j :=
⟨le_of_toZ_le, toZ_mono⟩
#align to_Z_le_iff toZ_le_iff
+-/
+#print toZ_iterate_succ /-
theorem toZ_iterate_succ [NoMaxOrder ι] (n : ℕ) : toZ i0 ((succ^[n]) i0) = n :=
toZ_iterate_succ_of_not_isMax n (not_isMax _)
#align to_Z_iterate_succ toZ_iterate_succ
+-/
+#print toZ_iterate_pred /-
theorem toZ_iterate_pred [NoMinOrder ι] (n : ℕ) : toZ i0 ((pred^[n]) i0) = -n :=
toZ_iterate_pred_of_not_isMin n (not_isMin _)
#align to_Z_iterate_pred toZ_iterate_pred
+-/
#print injective_toZ /-
theorem injective_toZ : Function.Injective (toZ i0) := fun i j hij =>
@@ -399,6 +435,7 @@ section OrderIso
variable [SuccOrder ι] [PredOrder ι] [IsSuccArchimedean ι]
+#print orderIsoRangeToZOfLinearSuccPredArch /-
/-- `to_Z` defines an `order_iso` between `ι` and its range. -/
noncomputable def orderIsoRangeToZOfLinearSuccPredArch [hι : Nonempty ι] :
ι ≃o Set.range (toZ hι.some)
@@ -406,6 +443,7 @@ noncomputable def orderIsoRangeToZOfLinearSuccPredArch [hι : Nonempty ι] :
toEquiv := Equiv.ofInjective _ injective_toZ
map_rel_iff' := toZ_le_iff
#align order_iso_range_to_Z_of_linear_succ_pred_arch orderIsoRangeToZOfLinearSuccPredArch
+-/
#print countable_of_linear_succ_pred_arch /-
instance (priority := 100) countable_of_linear_succ_pred_arch : Countable ι :=
@@ -416,6 +454,7 @@ instance (priority := 100) countable_of_linear_succ_pred_arch : Countable ι :=
#align countable_of_linear_succ_pred_arch countable_of_linear_succ_pred_arch
-/
+#print orderIsoIntOfLinearSuccPredArch /-
/-- If the order has neither bot nor top, `to_Z` defines an `order_iso` between `ι` and `ℤ`. -/
noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι] [hι : Nonempty ι] :
ι ≃o ℤ where
@@ -439,7 +478,9 @@ noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι
simp only [hn.le, Int.toNat_of_nonneg, Right.nonneg_neg_iff, neg_neg]
map_rel_iff' := toZ_le_iff
#align order_iso_int_of_linear_succ_pred_arch orderIsoIntOfLinearSuccPredArch
+-/
+#print orderIsoNatOfLinearSuccPredArch /-
/-- If the order has a bot but no top, `to_Z` defines an `order_iso` between `ι` and `ℕ`. -/
def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
where
@@ -454,6 +495,7 @@ def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
simp only [Equiv.coe_fn_mk, Int.toNat_le]
rw [← @toZ_le_iff ι _ _ _ _ ⊥, Int.toNat_of_nonneg (toZ_nonneg bot_le)]
#align order_iso_nat_of_linear_succ_pred_arch orderIsoNatOfLinearSuccPredArch
+-/
/-- If the order has both a bot and a top, `to_Z` gives an `order_iso` between `ι` and
`finset.range n` for some `n`. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -80,22 +80,10 @@ theorem succFn_spec (i : ι) : IsGLB (Set.Ioi i) (succFn i) :=
#align linear_locally_finite_order.succ_fn_spec LinearLocallyFiniteOrder.succFn_spec
-/
-/- warning: linear_locally_finite_order.le_succ_fn -> LinearLocallyFiniteOrder.le_succFn is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι), LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι), LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)
-Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.le_succ_fn LinearLocallyFiniteOrder.le_succFnₓ'. -/
theorem le_succFn (i : ι) : i ≤ succFn i := by rw [le_isGLB_iff (succ_fn_spec i), mem_lowerBounds];
exact fun x hx => le_of_lt hx
#align linear_locally_finite_order.le_succ_fn LinearLocallyFiniteOrder.le_succFn
-/- warning: linear_locally_finite_order.is_glb_Ioc_of_is_glb_Ioi -> LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] {i : ι} {j : ι} {k : ι}, (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j) -> (IsGLB.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) (Set.Ioi.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i) k) -> (IsGLB.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) (Set.Ioc.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i j) k)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] {i : ι} {j : ι} {k : ι}, (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j) -> (IsGLB.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) (Set.Ioi.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i) k) -> (IsGLB.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) (Set.Ioc.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i j) k)
-Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.is_glb_Ioc_of_is_glb_Ioi LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioiₓ'. -/
theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi i) k) :
IsGLB (Set.Ioc i j) k :=
by
@@ -107,12 +95,6 @@ theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi
· exact le_trans (hx j ⟨hij_lt, le_rfl⟩) h_lt.le
#align linear_locally_finite_order.is_glb_Ioc_of_is_glb_Ioi LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi
-/- warning: linear_locally_finite_order.is_max_of_succ_fn_le -> LinearLocallyFiniteOrder.isMax_of_succFn_le is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : LocallyFiniteOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] (i : ι), (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) i) -> (IsMax.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : LocallyFiniteOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] (i : ι), (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) i) -> (IsMax.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i)
-Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.is_max_of_succ_fn_le LinearLocallyFiniteOrder.isMax_of_succFn_leₓ'. -/
theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i) : IsMax i :=
by
refine' fun j hij => not_lt.mp fun hij_lt => _
@@ -131,22 +113,10 @@ theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i
exact lt_irrefl i hi_mem.1
#align linear_locally_finite_order.is_max_of_succ_fn_le LinearLocallyFiniteOrder.isMax_of_succFn_le
-/- warning: linear_locally_finite_order.succ_fn_le_of_lt -> LinearLocallyFiniteOrder.succFn_le_of_lt is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι) (j : ι), (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j) -> (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) j)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι) (j : ι), (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j) -> (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) j)
-Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_ltₓ'. -/
theorem succFn_le_of_lt (i j : ι) (hij : i < j) : succFn i ≤ j := by have h := succ_fn_spec i;
rw [IsGLB, IsGreatest, mem_lowerBounds] at h; exact h.1 j hij
#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_lt
-/- warning: linear_locally_finite_order.le_of_lt_succ_fn -> LinearLocallyFiniteOrder.le_of_lt_succFn is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (j : ι) (i : ι), (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) j (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)) -> (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) j i)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (j : ι) (i : ι), (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) j (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)) -> (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) j i)
-Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.le_of_lt_succ_fn LinearLocallyFiniteOrder.le_of_lt_succFnₓ'. -/
theorem le_of_lt_succFn (j i : ι) (hij : j < succFn i) : j ≤ i :=
by
rw [lt_isGLB_iff (succ_fn_spec i)] at hij
@@ -238,22 +208,10 @@ def toZ (i0 i : ι) : ℤ :=
#align to_Z toZ
-/
-/- warning: to_Z_of_ge -> toZ_of_ge is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2 _inst_3 i0 i hi)))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Nat.cast.{0} Int instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2 _inst_3 i0 i hi)))
-Case conversion may be inaccurate. Consider using '#align to_Z_of_ge toZ_of_geₓ'. -/
theorem toZ_of_ge (hi : i0 ≤ i) : toZ i0 i = Nat.find (exists_succ_iterate_of_le hi) :=
dif_pos hi
#align to_Z_of_ge toZ_of_ge
-/- warning: to_Z_of_lt -> toZ_of_lt is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i i0 hi)))))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i i0 hi)))))
-Case conversion may be inaccurate. Consider using '#align to_Z_of_lt toZ_of_ltₓ'. -/
theorem toZ_of_lt (hi : i < i0) : toZ i0 i = -Nat.find (exists_pred_iterate_of_le hi.le) :=
dif_neg (not_le.mpr hi)
#align to_Z_of_lt toZ_of_lt
@@ -268,43 +226,19 @@ theorem toZ_of_eq : toZ i0 i0 = 0 := by
#align to_Z_of_eq toZ_of_eq
-/
-/- warning: iterate_succ_to_Z -> iterate_succ_toZ is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (i : ι), (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i0 i) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i)) i0) i)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (i : ι), (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i)) i0) i)
-Case conversion may be inaccurate. Consider using '#align iterate_succ_to_Z iterate_succ_toZₓ'. -/
theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : (succ^[(toZ i0 i).toNat]) i0 = i := by
rw [toZ_of_ge hi, Int.toNat_coe_nat]; exact Nat.find_spec (exists_succ_iterate_of_le hi)
#align iterate_succ_to_Z iterate_succ_toZ
-/- warning: iterate_pred_to_Z -> iterate_pred_toZ is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (i : ι), (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) (Int.toNat (Neg.neg.{0} Int Int.hasNeg (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))) i0) i)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (i : ι), (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) (Int.toNat (Neg.neg.{0} Int Int.instNegInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))) i0) i)
-Case conversion may be inaccurate. Consider using '#align iterate_pred_to_Z iterate_pred_toZₓ'. -/
theorem iterate_pred_toZ (i : ι) (hi : i < i0) : (pred^[(-toZ i0 i).toNat]) i0 = i :=
by
rw [toZ_of_lt hi, neg_neg, Int.toNat_coe_nat]
exact Nat.find_spec (exists_pred_iterate_of_le hi.le)
#align iterate_pred_to_Z iterate_pred_toZ
-/- warning: to_Z_nonneg -> toZ_nonneg is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι}, (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i0 i) -> (LE.le.{0} Int Int.hasLe (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero))) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι}, (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i) -> (LE.le.{0} Int Int.instLEInt (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))
-Case conversion may be inaccurate. Consider using '#align to_Z_nonneg toZ_nonnegₓ'. -/
theorem toZ_nonneg (hi : i0 ≤ i) : 0 ≤ toZ i0 i := by rw [toZ_of_ge hi]; exact Nat.cast_nonneg _
#align to_Z_nonneg toZ_nonneg
-/- warning: to_Z_neg -> toZ_neg is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι}, (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0) -> (LT.lt.{0} Int Int.hasLt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero))))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι}, (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0) -> (LT.lt.{0} Int Int.instLTInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)))
-Case conversion may be inaccurate. Consider using '#align to_Z_neg toZ_negₓ'. -/
theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 :=
by
refine' lt_of_le_of_ne _ _
@@ -337,12 +271,6 @@ theorem toZ_iterate_pred_ge (n : ℕ) : -(n : ℤ) ≤ toZ i0 ((pred^[n]) i0) :=
#align to_Z_iterate_pred_ge toZ_iterate_pred_ge
-/
-/- warning: to_Z_iterate_succ_of_not_is_max -> toZ_iterate_succ_of_not_isMax is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (n : Nat), (Not (IsMax.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0))) -> (Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (n : Nat), (Not (IsMax.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0))) -> (Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0)) (Nat.cast.{0} Int instNatCastInt n))
-Case conversion may be inaccurate. Consider using '#align to_Z_iterate_succ_of_not_is_max toZ_iterate_succ_of_not_isMaxₓ'. -/
theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax ((succ^[n]) i0)) :
toZ i0 ((succ^[n]) i0) = n :=
by
@@ -357,12 +285,6 @@ theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax ((succ^[n]) i0)) :
exact is_max_iterate_succ_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_succ_of_not_is_max toZ_iterate_succ_of_not_isMax
-/- warning: to_Z_iterate_pred_of_not_is_min -> toZ_iterate_pred_of_not_isMin is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (n : Nat), (Not (IsMin.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0))) -> (Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0)) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n)))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (n : Nat), (Not (IsMin.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0))) -> (Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0)) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n)))
-Case conversion may be inaccurate. Consider using '#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMinₓ'. -/
theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
toZ i0 ((pred^[n]) i0) = -n := by
cases n
@@ -385,12 +307,6 @@ theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
exact is_min_iterate_pred_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMin
-/- warning: le_of_to_Z_le -> le_of_toZ_le is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} {j : ι}, (LE.le.{0} Int Int.hasLe (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j)) -> (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} {j : ι}, (LE.le.{0} Int Int.instLEInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j)) -> (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j)
-Case conversion may be inaccurate. Consider using '#align le_of_to_Z_le le_of_toZ_leₓ'. -/
theorem le_of_toZ_le {j : ι} (h_le : toZ i0 i ≤ toZ i0 j) : i ≤ j :=
by
cases' le_or_lt i0 i with hi hi <;> cases' le_or_lt i0 j with hj hj
@@ -403,12 +319,6 @@ theorem le_of_toZ_le {j : ι} (h_le : toZ i0 i ≤ toZ i0 j) : i ≤ j :=
exact neg_le_neg h_le
#align le_of_to_Z_le le_of_toZ_le
-/- warning: to_Z_mono -> toZ_mono is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} {j : ι}, (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j) -> (LE.le.{0} Int Int.hasLe (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} {j : ι}, (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j) -> (LE.le.{0} Int Int.instLEInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j))
-Case conversion may be inaccurate. Consider using '#align to_Z_mono toZ_monoₓ'. -/
theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
by
by_cases hi_max : IsMax i
@@ -465,32 +375,14 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
rwa [Function.iterate_succ', Function.comp_apply, iterate_pred_toZ j hj] at h_le_pred
#align to_Z_mono toZ_mono
-/- warning: to_Z_le_iff -> toZ_le_iff is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (i : ι) (j : ι), Iff (LE.le.{0} Int Int.hasLe (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j)) (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (i : ι) (j : ι), Iff (LE.le.{0} Int Int.instLEInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j)) (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j)
-Case conversion may be inaccurate. Consider using '#align to_Z_le_iff toZ_le_iffₓ'. -/
theorem toZ_le_iff (i j : ι) : toZ i0 i ≤ toZ i0 j ↔ i ≤ j :=
⟨le_of_toZ_le, toZ_mono⟩
#align to_Z_le_iff toZ_le_iff
-/- warning: to_Z_iterate_succ -> toZ_iterate_succ is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] (n : Nat), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n)
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] (n : Nat), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0)) (Nat.cast.{0} Int instNatCastInt n)
-Case conversion may be inaccurate. Consider using '#align to_Z_iterate_succ toZ_iterate_succₓ'. -/
theorem toZ_iterate_succ [NoMaxOrder ι] (n : ℕ) : toZ i0 ((succ^[n]) i0) = n :=
toZ_iterate_succ_of_not_isMax n (not_isMax _)
#align to_Z_iterate_succ toZ_iterate_succ
-/- warning: to_Z_iterate_pred -> toZ_iterate_pred is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} [_inst_5 : NoMinOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] (n : Nat), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0)) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} [_inst_5 : NoMinOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] (n : Nat), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0)) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))
-Case conversion may be inaccurate. Consider using '#align to_Z_iterate_pred toZ_iterate_predₓ'. -/
theorem toZ_iterate_pred [NoMinOrder ι] (n : ℕ) : toZ i0 ((pred^[n]) i0) = -n :=
toZ_iterate_pred_of_not_isMin n (not_isMin _)
#align to_Z_iterate_pred toZ_iterate_pred
@@ -507,12 +399,6 @@ section OrderIso
variable [SuccOrder ι] [PredOrder ι] [IsSuccArchimedean ι]
-/- warning: order_iso_range_to_Z_of_linear_succ_pred_arch -> orderIsoRangeToZOfLinearSuccPredArch is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [hι : Nonempty.{succ u1} ι], OrderIso.{u1, 0} ι (coeSort.{1, 2} (Set.{0} Int) Type (Set.hasCoeToSort.{0} Int) (Set.range.{0, succ u1} Int ι (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Nonempty.some.{succ u1} ι hι)))) (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Subtype.hasLe.{0} Int Int.hasLe (fun (x : Int) => Membership.Mem.{0, 0} Int (Set.{0} Int) (Set.hasMem.{0} Int) x (Set.range.{0, succ u1} Int ι (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Nonempty.some.{succ u1} ι hι)))))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [hι : Nonempty.{succ u1} ι], OrderIso.{u1, 0} ι (Set.Elem.{0} Int (Set.range.{0, succ u1} Int ι (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Nonempty.some.{succ u1} ι hι)))) (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (Subtype.le.{0} Int Int.instLEInt (fun (x : Int) => Membership.mem.{0, 0} Int (Set.{0} Int) (Set.instMembershipSet.{0} Int) x (Set.range.{0, succ u1} Int ι (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Nonempty.some.{succ u1} ι hι)))))
-Case conversion may be inaccurate. Consider using '#align order_iso_range_to_Z_of_linear_succ_pred_arch orderIsoRangeToZOfLinearSuccPredArchₓ'. -/
/-- `to_Z` defines an `order_iso` between `ι` and its range. -/
noncomputable def orderIsoRangeToZOfLinearSuccPredArch [hι : Nonempty ι] :
ι ≃o Set.range (toZ hι.some)
@@ -530,12 +416,6 @@ instance (priority := 100) countable_of_linear_succ_pred_arch : Countable ι :=
#align countable_of_linear_succ_pred_arch countable_of_linear_succ_pred_arch
-/
-/- warning: order_iso_int_of_linear_succ_pred_arch -> orderIsoIntOfLinearSuccPredArch is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [_inst_6 : NoMinOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [hι : Nonempty.{succ u1} ι], OrderIso.{u1, 0} ι Int (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) Int.hasLe
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] [_inst_6 : NoMinOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] [hι : Nonempty.{succ u1} ι], OrderIso.{u1, 0} ι Int (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) Int.instLEInt
-Case conversion may be inaccurate. Consider using '#align order_iso_int_of_linear_succ_pred_arch orderIsoIntOfLinearSuccPredArchₓ'. -/
/-- If the order has neither bot nor top, `to_Z` defines an `order_iso` between `ι` and `ℤ`. -/
noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι] [hι : Nonempty ι] :
ι ≃o ℤ where
@@ -560,12 +440,6 @@ noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι
map_rel_iff' := toZ_le_iff
#align order_iso_int_of_linear_succ_pred_arch orderIsoIntOfLinearSuccPredArch
-/- warning: order_iso_nat_of_linear_succ_pred_arch -> orderIsoNatOfLinearSuccPredArch is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [_inst_6 : OrderBot.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))], OrderIso.{u1, 0} ι Nat (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) Nat.hasLe
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] [_inst_6 : OrderBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))], OrderIso.{u1, 0} ι Nat (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) instLENat
-Case conversion may be inaccurate. Consider using '#align order_iso_nat_of_linear_succ_pred_arch orderIsoNatOfLinearSuccPredArchₓ'. -/
/-- If the order has a bot but no top, `to_Z` defines an `order_iso` between `ι` and `ℕ`. -/
def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
where
@@ -581,12 +455,6 @@ def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
rw [← @toZ_le_iff ι _ _ _ _ ⊥, Int.toNat_of_nonneg (toZ_nonneg bot_le)]
#align order_iso_nat_of_linear_succ_pred_arch orderIsoNatOfLinearSuccPredArch
-/- warning: order_iso_range_of_linear_succ_pred_arch -> orderIsoRangeOfLinearSuccPredArch is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_5 : OrderBot.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [_inst_6 : OrderTop.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))], OrderIso.{u1, 0} ι (coeSort.{1, 2} (Finset.{0} Nat) Type (Finset.hasCoeToSort.{0} Nat) (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toHasBot.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toHasTop.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Subtype.hasLe.{0} Nat Nat.hasLe (fun (x : Nat) => Membership.Mem.{0, 0} Nat (Finset.{0} Nat) (Finset.hasMem.{0} Nat) x (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toHasBot.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toHasTop.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_5 : OrderBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] [_inst_6 : OrderTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))], OrderIso.{u1, 0} ι (Subtype.{1} Nat (fun (x : Nat) => Membership.mem.{0, 0} Nat (Finset.{0} Nat) (Finset.instMembershipFinset.{0} Nat) x (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))))) (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (Subtype.le.{0} Nat instLENat (fun (x : Nat) => Membership.mem.{0, 0} Nat (Finset.{0} Nat) (Finset.instMembershipFinset.{0} Nat) x (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))))
-Case conversion may be inaccurate. Consider using '#align order_iso_range_of_linear_succ_pred_arch orderIsoRangeOfLinearSuccPredArchₓ'. -/
/-- If the order has both a bot and a top, `to_Z` gives an `order_iso` between `ι` and
`finset.range n` for some `n`. -/
def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -86,9 +86,7 @@ lean 3 declaration is
but is expected to have type
forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι), LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)
Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.le_succ_fn LinearLocallyFiniteOrder.le_succFnₓ'. -/
-theorem le_succFn (i : ι) : i ≤ succFn i :=
- by
- rw [le_isGLB_iff (succ_fn_spec i), mem_lowerBounds]
+theorem le_succFn (i : ι) : i ≤ succFn i := by rw [le_isGLB_iff (succ_fn_spec i), mem_lowerBounds];
exact fun x hx => le_of_lt hx
#align linear_locally_finite_order.le_succ_fn LinearLocallyFiniteOrder.le_succFn
@@ -139,11 +137,8 @@ lean 3 declaration is
but is expected to have type
forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι) (j : ι), (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j) -> (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) j)
Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_ltₓ'. -/
-theorem succFn_le_of_lt (i j : ι) (hij : i < j) : succFn i ≤ j :=
- by
- have h := succ_fn_spec i
- rw [IsGLB, IsGreatest, mem_lowerBounds] at h
- exact h.1 j hij
+theorem succFn_le_of_lt (i j : ι) (hij : i < j) : succFn i ≤ j := by have h := succ_fn_spec i;
+ rw [IsGLB, IsGreatest, mem_lowerBounds] at h; exact h.1 j hij
#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_lt
/- warning: linear_locally_finite_order.le_of_lt_succ_fn -> LinearLocallyFiniteOrder.le_of_lt_succFn is a dubious translation:
@@ -180,9 +175,7 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
by
rw [le_iff_lt_or_eq] at hij
cases hij
- swap
- · refine' ⟨0, _⟩
- simpa only [Function.iterate_zero, id.def] using hij
+ swap; · refine' ⟨0, _⟩; simpa only [Function.iterate_zero, id.def] using hij
by_contra h
push_neg at h
have h_lt : ∀ n, (succ^[n]) i < j := by
@@ -222,8 +215,7 @@ instance (priority := 100) LinearOrder.isPredArchimedean_of_isSuccArchimedean [S
· simp only [Function.iterate_zero, id.def]
· rw [pred_succ_iterate_of_not_is_max]
rw [Nat.succ_sub_succ_eq_sub, tsub_zero]
- suffices : (succ^[n]) i < (succ^[n.succ]) i
- exact not_isMax_of_lt this
+ suffices : (succ^[n]) i < (succ^[n.succ]) i; exact not_isMax_of_lt this
refine' lt_of_le_of_ne _ _
· rw [Function.iterate_succ']
exact le_succ _
@@ -282,10 +274,8 @@ lean 3 declaration is
but is expected to have type
forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (i : ι), (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i)) i0) i)
Case conversion may be inaccurate. Consider using '#align iterate_succ_to_Z iterate_succ_toZₓ'. -/
-theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : (succ^[(toZ i0 i).toNat]) i0 = i :=
- by
- rw [toZ_of_ge hi, Int.toNat_coe_nat]
- exact Nat.find_spec (exists_succ_iterate_of_le hi)
+theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : (succ^[(toZ i0 i).toNat]) i0 = i := by
+ rw [toZ_of_ge hi, Int.toNat_coe_nat]; exact Nat.find_spec (exists_succ_iterate_of_le hi)
#align iterate_succ_to_Z iterate_succ_toZ
/- warning: iterate_pred_to_Z -> iterate_pred_toZ is a dubious translation:
@@ -306,10 +296,7 @@ lean 3 declaration is
but is expected to have type
forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι}, (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i) -> (LE.le.{0} Int Int.instLEInt (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))
Case conversion may be inaccurate. Consider using '#align to_Z_nonneg toZ_nonnegₓ'. -/
-theorem toZ_nonneg (hi : i0 ≤ i) : 0 ≤ toZ i0 i :=
- by
- rw [toZ_of_ge hi]
- exact Nat.cast_nonneg _
+theorem toZ_nonneg (hi : i0 ≤ i) : 0 ≤ toZ i0 i := by rw [toZ_of_ge hi]; exact Nat.cast_nonneg _
#align to_Z_nonneg toZ_nonneg
/- warning: to_Z_neg -> toZ_neg is a dubious translation:
@@ -321,8 +308,7 @@ Case conversion may be inaccurate. Consider using '#align to_Z_neg toZ_negₓ'.
theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 :=
by
refine' lt_of_le_of_ne _ _
- · rw [toZ_of_lt hi, neg_nonpos]
- exact Nat.cast_nonneg _
+ · rw [toZ_of_lt hi, neg_nonpos]; exact Nat.cast_nonneg _
· by_contra
have h_eq := iterate_pred_toZ i hi
rw [← h_eq, h] at hi
@@ -395,8 +381,7 @@ theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
rw [Int.toNat_eq_max, toZ_of_lt this, max_eq_left, neg_neg]
rw [neg_neg]
exact Nat.cast_nonneg _
- · suffices : IsMin ((pred^[n.succ]) i0)
- exact absurd this hn
+ · suffices : IsMin ((pred^[n.succ]) i0); exact absurd this hn
exact is_min_iterate_pred_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMin
@@ -586,9 +571,7 @@ def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
where
toFun i := (toZ ⊥ i).toNat
invFun n := (succ^[n]) ⊥
- left_inv i := by
- simp_rw [if_pos (toZ_nonneg bot_le)]
- exact iterate_succ_toZ i bot_le
+ left_inv i := by simp_rw [if_pos (toZ_nonneg bot_le)]; exact iterate_succ_toZ i bot_le
right_inv n := by
simp_rw [if_pos bot_le]
rw [toZ_iterate_succ]
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -80,15 +80,24 @@ theorem succFn_spec (i : ι) : IsGLB (Set.Ioi i) (succFn i) :=
#align linear_locally_finite_order.succ_fn_spec LinearLocallyFiniteOrder.succFn_spec
-/
-#print LinearLocallyFiniteOrder.le_succFn /-
+/- warning: linear_locally_finite_order.le_succ_fn -> LinearLocallyFiniteOrder.le_succFn is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι), LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι), LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)
+Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.le_succ_fn LinearLocallyFiniteOrder.le_succFnₓ'. -/
theorem le_succFn (i : ι) : i ≤ succFn i :=
by
rw [le_isGLB_iff (succ_fn_spec i), mem_lowerBounds]
exact fun x hx => le_of_lt hx
#align linear_locally_finite_order.le_succ_fn LinearLocallyFiniteOrder.le_succFn
--/
-#print LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi /-
+/- warning: linear_locally_finite_order.is_glb_Ioc_of_is_glb_Ioi -> LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] {i : ι} {j : ι} {k : ι}, (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j) -> (IsGLB.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) (Set.Ioi.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i) k) -> (IsGLB.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) (Set.Ioc.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i j) k)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] {i : ι} {j : ι} {k : ι}, (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j) -> (IsGLB.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) (Set.Ioi.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i) k) -> (IsGLB.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) (Set.Ioc.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i j) k)
+Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.is_glb_Ioc_of_is_glb_Ioi LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioiₓ'. -/
theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi i) k) :
IsGLB (Set.Ioc i j) k :=
by
@@ -99,9 +108,13 @@ theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi
· exact hx y ⟨hy, h_le⟩
· exact le_trans (hx j ⟨hij_lt, le_rfl⟩) h_lt.le
#align linear_locally_finite_order.is_glb_Ioc_of_is_glb_Ioi LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi
--/
-#print LinearLocallyFiniteOrder.isMax_of_succFn_le /-
+/- warning: linear_locally_finite_order.is_max_of_succ_fn_le -> LinearLocallyFiniteOrder.isMax_of_succFn_le is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : LocallyFiniteOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] (i : ι), (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) i) -> (IsMax.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : LocallyFiniteOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] (i : ι), (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) i) -> (IsMax.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i)
+Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.is_max_of_succ_fn_le LinearLocallyFiniteOrder.isMax_of_succFn_leₓ'. -/
theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i) : IsMax i :=
by
refine' fun j hij => not_lt.mp fun hij_lt => _
@@ -119,18 +132,26 @@ theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i
rw [Finset.mem_Ioc] at hi_mem
exact lt_irrefl i hi_mem.1
#align linear_locally_finite_order.is_max_of_succ_fn_le LinearLocallyFiniteOrder.isMax_of_succFn_le
--/
-#print LinearLocallyFiniteOrder.succFn_le_of_lt /-
+/- warning: linear_locally_finite_order.succ_fn_le_of_lt -> LinearLocallyFiniteOrder.succFn_le_of_lt is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι) (j : ι), (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j) -> (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) j)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (i : ι) (j : ι), (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j) -> (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i) j)
+Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_ltₓ'. -/
theorem succFn_le_of_lt (i j : ι) (hij : i < j) : succFn i ≤ j :=
by
have h := succ_fn_spec i
rw [IsGLB, IsGreatest, mem_lowerBounds] at h
exact h.1 j hij
#align linear_locally_finite_order.succ_fn_le_of_lt LinearLocallyFiniteOrder.succFn_le_of_lt
--/
-#print LinearLocallyFiniteOrder.le_of_lt_succFn /-
+/- warning: linear_locally_finite_order.le_of_lt_succ_fn -> LinearLocallyFiniteOrder.le_of_lt_succFn is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (j : ι) (i : ι), (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) j (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)) -> (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) j i)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] (j : ι) (i : ι), (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) j (LinearLocallyFiniteOrder.succFn.{u1} ι _inst_1 i)) -> (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) j i)
+Case conversion may be inaccurate. Consider using '#align linear_locally_finite_order.le_of_lt_succ_fn LinearLocallyFiniteOrder.le_of_lt_succFnₓ'. -/
theorem le_of_lt_succFn (j i : ι) (hij : j < succFn i) : j ≤ i :=
by
rw [lt_isGLB_iff (succ_fn_spec i)] at hij
@@ -138,7 +159,6 @@ theorem le_of_lt_succFn (j i : ι) (hij : j < succFn i) : j ≤ i :=
rw [mem_lowerBounds] at hk_lb
exact not_lt.mp fun hi_lt_j => not_le.mpr hk (hk_lb j hi_lt_j)
#align linear_locally_finite_order.le_of_lt_succ_fn LinearLocallyFiniteOrder.le_of_lt_succFn
--/
noncomputable instance (priority := 100) [LocallyFiniteOrder ι] : SuccOrder ι
where
@@ -226,17 +246,25 @@ def toZ (i0 i : ι) : ℤ :=
#align to_Z toZ
-/
-#print toZ_of_ge /-
+/- warning: to_Z_of_ge -> toZ_of_ge is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2 _inst_3 i0 i hi)))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Nat.cast.{0} Int instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2 _inst_3 i0 i hi)))
+Case conversion may be inaccurate. Consider using '#align to_Z_of_ge toZ_of_geₓ'. -/
theorem toZ_of_ge (hi : i0 ≤ i) : toZ i0 i = Nat.find (exists_succ_iterate_of_le hi) :=
dif_pos hi
#align to_Z_of_ge toZ_of_ge
--/
-#print toZ_of_lt /-
+/- warning: to_Z_of_lt -> toZ_of_lt is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i i0 hi)))))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i i0 hi)))))
+Case conversion may be inaccurate. Consider using '#align to_Z_of_lt toZ_of_ltₓ'. -/
theorem toZ_of_lt (hi : i < i0) : toZ i0 i = -Nat.find (exists_pred_iterate_of_le hi.le) :=
dif_neg (not_le.mpr hi)
#align to_Z_of_lt toZ_of_lt
--/
#print toZ_of_eq /-
@[simp]
@@ -248,31 +276,48 @@ theorem toZ_of_eq : toZ i0 i0 = 0 := by
#align to_Z_of_eq toZ_of_eq
-/
-#print iterate_succ_toZ /-
+/- warning: iterate_succ_to_Z -> iterate_succ_toZ is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (i : ι), (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i0 i) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i)) i0) i)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (i : ι), (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i)) i0) i)
+Case conversion may be inaccurate. Consider using '#align iterate_succ_to_Z iterate_succ_toZₓ'. -/
theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : (succ^[(toZ i0 i).toNat]) i0 = i :=
by
rw [toZ_of_ge hi, Int.toNat_coe_nat]
exact Nat.find_spec (exists_succ_iterate_of_le hi)
#align iterate_succ_to_Z iterate_succ_toZ
--/
-#print iterate_pred_toZ /-
+/- warning: iterate_pred_to_Z -> iterate_pred_toZ is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (i : ι), (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) (Int.toNat (Neg.neg.{0} Int Int.hasNeg (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))) i0) i)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (i : ι), (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0) -> (Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) (Int.toNat (Neg.neg.{0} Int Int.instNegInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))) i0) i)
+Case conversion may be inaccurate. Consider using '#align iterate_pred_to_Z iterate_pred_toZₓ'. -/
theorem iterate_pred_toZ (i : ι) (hi : i < i0) : (pred^[(-toZ i0 i).toNat]) i0 = i :=
by
rw [toZ_of_lt hi, neg_neg, Int.toNat_coe_nat]
exact Nat.find_spec (exists_pred_iterate_of_le hi.le)
#align iterate_pred_to_Z iterate_pred_toZ
--/
-#print toZ_nonneg /-
+/- warning: to_Z_nonneg -> toZ_nonneg is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι}, (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i0 i) -> (LE.le.{0} Int Int.hasLe (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero))) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι}, (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i) -> (LE.le.{0} Int Int.instLEInt (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i))
+Case conversion may be inaccurate. Consider using '#align to_Z_nonneg toZ_nonnegₓ'. -/
theorem toZ_nonneg (hi : i0 ≤ i) : 0 ≤ toZ i0 i :=
by
rw [toZ_of_ge hi]
exact Nat.cast_nonneg _
#align to_Z_nonneg toZ_nonneg
--/
-#print toZ_neg /-
+/- warning: to_Z_neg -> toZ_neg is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι}, (LT.lt.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0) -> (LT.lt.{0} Int Int.hasLt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (OfNat.ofNat.{0} Int 0 (OfNat.mk.{0} Int 0 (Zero.zero.{0} Int Int.hasZero))))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι}, (LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0) -> (LT.lt.{0} Int Int.instLTInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (OfNat.ofNat.{0} Int 0 (instOfNatInt 0)))
+Case conversion may be inaccurate. Consider using '#align to_Z_neg toZ_negₓ'. -/
theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 :=
by
refine' lt_of_le_of_ne _ _
@@ -283,7 +328,6 @@ theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 :=
rw [← h_eq, h] at hi
simpa only [neg_zero, Int.toNat_zero, Function.iterate_zero, id.def, lt_self_iff_false] using hi
#align to_Z_neg toZ_neg
--/
#print toZ_iterate_succ_le /-
theorem toZ_iterate_succ_le (n : ℕ) : toZ i0 ((succ^[n]) i0) ≤ n :=
@@ -307,7 +351,12 @@ theorem toZ_iterate_pred_ge (n : ℕ) : -(n : ℤ) ≤ toZ i0 ((pred^[n]) i0) :=
#align to_Z_iterate_pred_ge toZ_iterate_pred_ge
-/
-#print toZ_iterate_succ_of_not_isMax /-
+/- warning: to_Z_iterate_succ_of_not_is_max -> toZ_iterate_succ_of_not_isMax is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (n : Nat), (Not (IsMax.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0))) -> (Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (n : Nat), (Not (IsMax.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0))) -> (Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0)) (Nat.cast.{0} Int instNatCastInt n))
+Case conversion may be inaccurate. Consider using '#align to_Z_iterate_succ_of_not_is_max toZ_iterate_succ_of_not_isMaxₓ'. -/
theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax ((succ^[n]) i0)) :
toZ i0 ((succ^[n]) i0) = n :=
by
@@ -321,9 +370,13 @@ theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax ((succ^[n]) i0)) :
suffices : IsMax ((succ^[n]) i0); exact absurd this hn
exact is_max_iterate_succ_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_succ_of_not_is_max toZ_iterate_succ_of_not_isMax
--/
-#print toZ_iterate_pred_of_not_isMin /-
+/- warning: to_Z_iterate_pred_of_not_is_min -> toZ_iterate_pred_of_not_isMin is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (n : Nat), (Not (IsMin.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0))) -> (Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0)) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n)))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (n : Nat), (Not (IsMin.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0))) -> (Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0)) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n)))
+Case conversion may be inaccurate. Consider using '#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMinₓ'. -/
theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
toZ i0 ((pred^[n]) i0) = -n := by
cases n
@@ -346,9 +399,13 @@ theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
exact absurd this hn
exact is_min_iterate_pred_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMin
--/
-#print le_of_toZ_le /-
+/- warning: le_of_to_Z_le -> le_of_toZ_le is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} {j : ι}, (LE.le.{0} Int Int.hasLe (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j)) -> (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} {j : ι}, (LE.le.{0} Int Int.instLEInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j)) -> (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j)
+Case conversion may be inaccurate. Consider using '#align le_of_to_Z_le le_of_toZ_leₓ'. -/
theorem le_of_toZ_le {j : ι} (h_le : toZ i0 i ≤ toZ i0 j) : i ≤ j :=
by
cases' le_or_lt i0 i with hi hi <;> cases' le_or_lt i0 j with hj hj
@@ -360,9 +417,13 @@ theorem le_of_toZ_le {j : ι} (h_le : toZ i0 i ≤ toZ i0 j) : i ≤ j :=
refine' Monotone.antitone_iterate_of_map_le pred_mono (pred_le _) (Int.toNat_le_toNat _)
exact neg_le_neg h_le
#align le_of_to_Z_le le_of_toZ_le
--/
-#print toZ_mono /-
+/- warning: to_Z_mono -> toZ_mono is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} {j : ι}, (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j) -> (LE.le.{0} Int Int.hasLe (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} {j : ι}, (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j) -> (LE.le.{0} Int Int.instLEInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j))
+Case conversion may be inaccurate. Consider using '#align to_Z_mono toZ_monoₓ'. -/
theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
by
by_cases hi_max : IsMax i
@@ -418,25 +479,36 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j :=
exact nat.one_le_iff_ne_zero.mpr hm0
rwa [Function.iterate_succ', Function.comp_apply, iterate_pred_toZ j hj] at h_le_pred
#align to_Z_mono toZ_mono
--/
-#print toZ_le_iff /-
+/- warning: to_Z_le_iff -> toZ_le_iff is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} (i : ι) (j : ι), Iff (LE.le.{0} Int Int.hasLe (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j)) (LE.le.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i j)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} (i : ι) (j : ι), Iff (LE.le.{0} Int Int.instLEInt (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 j)) (LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i j)
+Case conversion may be inaccurate. Consider using '#align to_Z_le_iff toZ_le_iffₓ'. -/
theorem toZ_le_iff (i j : ι) : toZ i0 i ≤ toZ i0 j ↔ i ≤ j :=
⟨le_of_toZ_le, toZ_mono⟩
#align to_Z_le_iff toZ_le_iff
--/
-#print toZ_iterate_succ /-
+/- warning: to_Z_iterate_succ -> toZ_iterate_succ is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] (n : Nat), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n)
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] (n : Nat), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0)) (Nat.cast.{0} Int instNatCastInt n)
+Case conversion may be inaccurate. Consider using '#align to_Z_iterate_succ toZ_iterate_succₓ'. -/
theorem toZ_iterate_succ [NoMaxOrder ι] (n : ℕ) : toZ i0 ((succ^[n]) i0) = n :=
toZ_iterate_succ_of_not_isMax n (not_isMax _)
#align to_Z_iterate_succ toZ_iterate_succ
--/
-#print toZ_iterate_pred /-
+/- warning: to_Z_iterate_pred -> toZ_iterate_pred is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} [_inst_5 : NoMinOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] (n : Nat), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0)) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) n))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} [_inst_5 : NoMinOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] (n : Nat), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0)) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt n))
+Case conversion may be inaccurate. Consider using '#align to_Z_iterate_pred toZ_iterate_predₓ'. -/
theorem toZ_iterate_pred [NoMinOrder ι] (n : ℕ) : toZ i0 ((pred^[n]) i0) = -n :=
toZ_iterate_pred_of_not_isMin n (not_isMin _)
#align to_Z_iterate_pred toZ_iterate_pred
--/
#print injective_toZ /-
theorem injective_toZ : Function.Injective (toZ i0) := fun i j hij =>
@@ -450,7 +522,12 @@ section OrderIso
variable [SuccOrder ι] [PredOrder ι] [IsSuccArchimedean ι]
-#print orderIsoRangeToZOfLinearSuccPredArch /-
+/- warning: order_iso_range_to_Z_of_linear_succ_pred_arch -> orderIsoRangeToZOfLinearSuccPredArch is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [hι : Nonempty.{succ u1} ι], OrderIso.{u1, 0} ι (coeSort.{1, 2} (Set.{0} Int) Type (Set.hasCoeToSort.{0} Int) (Set.range.{0, succ u1} Int ι (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Nonempty.some.{succ u1} ι hι)))) (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Subtype.hasLe.{0} Int Int.hasLe (fun (x : Int) => Membership.Mem.{0, 0} Int (Set.{0} Int) (Set.hasMem.{0} Int) x (Set.range.{0, succ u1} Int ι (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Nonempty.some.{succ u1} ι hι)))))
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [hι : Nonempty.{succ u1} ι], OrderIso.{u1, 0} ι (Set.Elem.{0} Int (Set.range.{0, succ u1} Int ι (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Nonempty.some.{succ u1} ι hι)))) (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (Subtype.le.{0} Int Int.instLEInt (fun (x : Int) => Membership.mem.{0, 0} Int (Set.{0} Int) (Set.instMembershipSet.{0} Int) x (Set.range.{0, succ u1} Int ι (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Nonempty.some.{succ u1} ι hι)))))
+Case conversion may be inaccurate. Consider using '#align order_iso_range_to_Z_of_linear_succ_pred_arch orderIsoRangeToZOfLinearSuccPredArchₓ'. -/
/-- `to_Z` defines an `order_iso` between `ι` and its range. -/
noncomputable def orderIsoRangeToZOfLinearSuccPredArch [hι : Nonempty ι] :
ι ≃o Set.range (toZ hι.some)
@@ -458,7 +535,6 @@ noncomputable def orderIsoRangeToZOfLinearSuccPredArch [hι : Nonempty ι] :
toEquiv := Equiv.ofInjective _ injective_toZ
map_rel_iff' := toZ_le_iff
#align order_iso_range_to_Z_of_linear_succ_pred_arch orderIsoRangeToZOfLinearSuccPredArch
--/
#print countable_of_linear_succ_pred_arch /-
instance (priority := 100) countable_of_linear_succ_pred_arch : Countable ι :=
@@ -469,7 +545,12 @@ instance (priority := 100) countable_of_linear_succ_pred_arch : Countable ι :=
#align countable_of_linear_succ_pred_arch countable_of_linear_succ_pred_arch
-/
-#print orderIsoIntOfLinearSuccPredArch /-
+/- warning: order_iso_int_of_linear_succ_pred_arch -> orderIsoIntOfLinearSuccPredArch is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [_inst_6 : NoMinOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [hι : Nonempty.{succ u1} ι], OrderIso.{u1, 0} ι Int (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) Int.hasLe
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] [_inst_6 : NoMinOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] [hι : Nonempty.{succ u1} ι], OrderIso.{u1, 0} ι Int (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) Int.instLEInt
+Case conversion may be inaccurate. Consider using '#align order_iso_int_of_linear_succ_pred_arch orderIsoIntOfLinearSuccPredArchₓ'. -/
/-- If the order has neither bot nor top, `to_Z` defines an `order_iso` between `ι` and `ℤ`. -/
noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι] [hι : Nonempty ι] :
ι ≃o ℤ where
@@ -493,9 +574,13 @@ noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι
simp only [hn.le, Int.toNat_of_nonneg, Right.nonneg_neg_iff, neg_neg]
map_rel_iff' := toZ_le_iff
#align order_iso_int_of_linear_succ_pred_arch orderIsoIntOfLinearSuccPredArch
--/
-#print orderIsoNatOfLinearSuccPredArch /-
+/- warning: order_iso_nat_of_linear_succ_pred_arch -> orderIsoNatOfLinearSuccPredArch is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toHasLt.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [_inst_6 : OrderBot.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))], OrderIso.{u1, 0} ι Nat (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) Nat.hasLe
+but is expected to have type
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_5 : NoMaxOrder.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] [_inst_6 : OrderBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))], OrderIso.{u1, 0} ι Nat (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) instLENat
+Case conversion may be inaccurate. Consider using '#align order_iso_nat_of_linear_succ_pred_arch orderIsoNatOfLinearSuccPredArchₓ'. -/
/-- If the order has a bot but no top, `to_Z` defines an `order_iso` between `ι` and `ℕ`. -/
def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
where
@@ -512,11 +597,10 @@ def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
simp only [Equiv.coe_fn_mk, Int.toNat_le]
rw [← @toZ_le_iff ι _ _ _ _ ⊥, Int.toNat_of_nonneg (toZ_nonneg bot_le)]
#align order_iso_nat_of_linear_succ_pred_arch orderIsoNatOfLinearSuccPredArch
--/
/- warning: order_iso_range_of_linear_succ_pred_arch -> orderIsoRangeOfLinearSuccPredArch is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_5 : OrderBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [_inst_6 : OrderTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))], OrderIso.{u1, 0} ι (coeSort.{1, 2} (Finset.{0} Nat) Type (Finset.hasCoeToSort.{0} Nat) (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toHasBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toHasTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Subtype.hasLe.{0} Nat Nat.hasLe (fun (x : Nat) => Membership.Mem.{0, 0} Nat (Finset.{0} Nat) (Finset.hasMem.{0} Nat) x (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toHasBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toHasTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))))
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_5 : OrderBot.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))] [_inst_6 : OrderTop.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))))], OrderIso.{u1, 0} ι (coeSort.{1, 2} (Finset.{0} Nat) Type (Finset.hasCoeToSort.{0} Nat) (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toHasBot.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toHasTop.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) (Subtype.hasLe.{0} Nat Nat.hasLe (fun (x : Nat) => Membership.Mem.{0, 0} Nat (Finset.{0} Nat) (Finset.hasMem.{0} Nat) x (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toHasBot.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toHasTop.{u1} ι (Preorder.toHasLe.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))))
but is expected to have type
forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_4 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_5 : OrderBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))] [_inst_6 : OrderTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))))], OrderIso.{u1, 0} ι (Subtype.{1} Nat (fun (x : Nat) => Membership.mem.{0, 0} Nat (Finset.{0} Nat) (Finset.instMembershipFinset.{0} Nat) x (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))))) (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) (Subtype.le.{0} Nat instLENat (fun (x : Nat) => Membership.mem.{0, 0} Nat (Finset.{0} Nat) (Finset.instMembershipFinset.{0} Nat) x (Finset.range (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Int.toNat (toZ.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3 (Bot.bot.{u1} ι (OrderBot.toBot.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) _inst_5)) (Top.top.{u1} ι (OrderTop.toTop.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) _inst_6)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))))
Case conversion may be inaccurate. Consider using '#align order_iso_range_of_linear_succ_pred_arch orderIsoRangeOfLinearSuccPredArchₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/7ad820c4997738e2f542f8a20f32911f52020e26
@@ -226,25 +226,17 @@ def toZ (i0 i : ι) : ℤ :=
#align to_Z toZ
-/
-/- warning: to_Z_of_ge -> toZ_of_ge is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2 _inst_3 i0 i hi)))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Nat.cast.{0} Int instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2 _inst_3 i0 i hi)))
-Case conversion may be inaccurate. Consider using '#align to_Z_of_ge toZ_of_geₓ'. -/
+#print toZ_of_ge /-
theorem toZ_of_ge (hi : i0 ≤ i) : toZ i0 i = Nat.find (exists_succ_iterate_of_le hi) :=
dif_pos hi
#align to_Z_of_ge toZ_of_ge
+-/
-/- warning: to_Z_of_lt -> toZ_of_lt is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i i0 hi)))))
-but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i i0 hi)))))
-Case conversion may be inaccurate. Consider using '#align to_Z_of_lt toZ_of_ltₓ'. -/
+#print toZ_of_lt /-
theorem toZ_of_lt (hi : i < i0) : toZ i0 i = -Nat.find (exists_pred_iterate_of_le hi.le) :=
dif_neg (not_le.mpr hi)
#align to_Z_of_lt toZ_of_lt
+-/
#print toZ_of_eq /-
@[simp]
mathlib commit https://github.com/leanprover-community/mathlib/commit/da3fc4a33ff6bc75f077f691dc94c217b8d41559
@@ -230,7 +230,7 @@ def toZ (i0 i : ι) : ℤ :=
lean 3 declaration is
forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2 _inst_3 i0 i hi)))
but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Nat.cast.{0} Int Int.instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2 _inst_3 i0 i hi)))
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LE.le.{u1} ι (Preorder.toLE.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i0 i), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Nat.cast.{0} Int instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.succ.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2) a i0) i) (IsSuccArchimedean.exists_succ_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2 _inst_3 i0 i hi)))
Case conversion may be inaccurate. Consider using '#align to_Z_of_ge toZ_of_geₓ'. -/
theorem toZ_of_ge (hi : i0 ≤ i) : toZ i0 i = Nat.find (exists_succ_iterate_of_le hi) :=
dif_pos hi
@@ -240,7 +240,7 @@ theorem toZ_of_ge (hi : i0 ≤ i) : toZ i0 i = Nat.find (exists_succ_iterate_of_
lean 3 declaration is
forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i i0 hi)))))
but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int Int.instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i i0 hi)))))
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i i0 hi)))))
Case conversion may be inaccurate. Consider using '#align to_Z_of_lt toZ_of_ltₓ'. -/
theorem toZ_of_lt (hi : i < i0) : toZ i0 i = -Nat.find (exists_pred_iterate_of_le hi.le) :=
dif_neg (not_le.mpr hi)
mathlib commit https://github.com/leanprover-community/mathlib/commit/3ade05ac9447ae31a22d2ea5423435e054131240
@@ -188,8 +188,8 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
#align linear_locally_finite_order.is_succ_archimedean LinearLocallyFiniteOrder.isSuccArchimedean
-/
-#print LinearOrder.pred_archimedean_of_succ_archimedean /-
-instance (priority := 100) LinearOrder.pred_archimedean_of_succ_archimedean [SuccOrder ι]
+#print LinearOrder.isPredArchimedean_of_isSuccArchimedean /-
+instance (priority := 100) LinearOrder.isPredArchimedean_of_isSuccArchimedean [SuccOrder ι]
[PredOrder ι] [IsSuccArchimedean ι] : IsPredArchimedean ι
where exists_pred_iterate_of_le i j hij :=
by
@@ -209,7 +209,7 @@ instance (priority := 100) LinearOrder.pred_archimedean_of_succ_archimedean [Suc
exact le_succ _
· rw [hn_eq]
exact hn_lt_ne _ (Nat.lt_succ_self n)
-#align linear_order.pred_archimedean_of_succ_archimedean LinearOrder.pred_archimedean_of_succ_archimedean
+#align linear_order.pred_archimedean_of_succ_archimedean LinearOrder.isPredArchimedean_of_isSuccArchimedean
-/
section toZ
@@ -238,9 +238,9 @@ theorem toZ_of_ge (hi : i0 ≤ i) : toZ i0 i = Nat.find (exists_succ_iterate_of_
/- warning: to_Z_of_lt -> toZ_of_lt is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4 (LinearOrder.pred_archimedean_of_succ_archimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i i0 hi)))))
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.hasNeg ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) n i0) i) (fun (a : Nat) => Eq.decidable.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (LinearOrder.toLattice.{u1} ι _inst_1)))) i i0 hi)))))
but is expected to have type
- forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int Int.instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4 (LinearOrder.pred_archimedean_of_succ_archimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i i0 hi)))))
+ forall {ι : Type.{u1}} [_inst_1 : LinearOrder.{u1} ι] [_inst_2 : SuccOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] [_inst_3 : IsSuccArchimedean.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_2] [_inst_4 : PredOrder.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))] {i0 : ι} {i : ι} (hi : LT.lt.{u1} ι (Preorder.toLT.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1)))))) i i0), Eq.{1} Int (toZ.{u1} ι _inst_1 _inst_2 _inst_3 _inst_4 i0 i) (Neg.neg.{0} Int Int.instNegInt (Nat.cast.{0} Int Int.instNatCastInt (Nat.find (fun (n : Nat) => Eq.{succ u1} ι (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) n i0) i) (fun (a : Nat) => instDecidableEq.{u1} ι _inst_1 (Nat.iterate.{succ u1} ι (Order.pred.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4) a i0) i) (IsPredArchimedean.exists_pred_iterate_of_le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) _inst_4 (LinearOrder.isPredArchimedean_of_isSuccArchimedean.{u1} ι _inst_1 _inst_2 _inst_4 _inst_3) i i0 (LT.lt.le.{u1} ι (PartialOrder.toPreorder.{u1} ι (SemilatticeInf.toPartialOrder.{u1} ι (Lattice.toSemilatticeInf.{u1} ι (DistribLattice.toLattice.{u1} ι (instDistribLattice.{u1} ι _inst_1))))) i i0 hi)))))
Case conversion may be inaccurate. Consider using '#align to_Z_of_lt toZ_of_ltₓ'. -/
theorem toZ_of_lt (hi : i < i0) : toZ i0 i = -Nat.find (exists_pred_iterate_of_le hi.le) :=
dif_neg (not_le.mpr hi)
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Move Set.Ixx
, Finset.Ixx
, Multiset.Ixx
together under two different folders:
Order.Interval
for their definition and basic propertiesAlgebra.Order.Interval
for their algebraic propertiesMove the definitions of Multiset.Ixx
to what is now Order.Interval.Multiset
. I believe we could just delete this file in a later PR as nothing uses it (and I already had doubts when defining Multiset.Ixx
three years ago).
Move the algebraic results out of what is now Order.Interval.Finset.Basic
to a new file Algebra.Order.Interval.Finset.Basic
.
@@ -3,7 +3,7 @@ Copyright (c) 2022 Rémy Degenne. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rémy Degenne
-/
-import Mathlib.Order.LocallyFinite
+import Mathlib.Order.Interval.Finset.Defs
import Mathlib.Order.SuccPred.Basic
import Mathlib.Order.Hom.Basic
import Mathlib.Data.Countable.Basic
@@ -134,12 +134,12 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
cases' hij with hij hij
swap
· refine' ⟨0, _⟩
- simpa only [Function.iterate_zero, id.def] using hij
+ simpa only [Function.iterate_zero, id] using hij
by_contra! h
have h_lt : ∀ n, succ^[n] i < j := by
intro n
induction' n with n hn
- · simpa only [Function.iterate_zero, id.def] using hij
+ · simpa only [Function.iterate_zero, id] using hij
· refine' lt_of_le_of_ne _ (h _)
rw [Function.iterate_succ', Function.comp_apply]
exact succ_le_of_lt hn
@@ -167,7 +167,7 @@ instance (priority := 100) LinearOrder.isPredArchimedean_of_isSuccArchimedean [S
refine' ⟨n, _⟩
rw [← hn_eq]
induction' n with n
- · simp only [Nat.zero_eq, Function.iterate_zero, id.def]
+ · simp only [Nat.zero_eq, Function.iterate_zero, id]
· rw [pred_succ_iterate_of_not_isMax]
rw [Nat.succ_sub_succ_eq_sub, tsub_zero]
suffices succ^[n] i < succ^[n.succ] i from not_isMax_of_lt this
@@ -206,7 +206,7 @@ theorem toZ_of_eq : toZ i0 i0 = 0 := by
rw [toZ_of_ge le_rfl]
norm_cast
refine' le_antisymm (Nat.find_le _) (zero_le _)
- rw [Function.iterate_zero, id.def]
+ rw [Function.iterate_zero, id]
#align to_Z_of_eq toZ_of_eq
theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : succ^[(toZ i0 i).toNat] i0 = i := by
@@ -231,7 +231,7 @@ theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 := by
· by_contra h
have h_eq := iterate_pred_toZ i hi
rw [← h_eq, h] at hi
- simp only [neg_zero, Int.toNat_zero, Function.iterate_zero, id.def, lt_self_iff_false] at hi
+ simp only [neg_zero, Int.toNat_zero, Function.iterate_zero, id, lt_self_iff_false] at hi
#align to_Z_neg toZ_neg
theorem toZ_iterate_succ_le (n : ℕ) : toZ i0 (succ^[n] i0) ≤ n := by
@@ -265,11 +265,11 @@ theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax (succ^[n] i0)) :
theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin (pred^[n] i0)) :
toZ i0 (pred^[n] i0) = -n := by
cases' n with n n
- · simp only [Nat.zero_eq, Function.iterate_zero, id.def, toZ_of_eq, Nat.cast_zero, neg_zero]
+ · simp only [Nat.zero_eq, Function.iterate_zero, id, toZ_of_eq, Nat.cast_zero, neg_zero]
have : pred^[n.succ] i0 < i0 := by
refine' lt_of_le_of_ne (pred_iterate_le _ _) fun h_pred_iterate_eq ↦ hn _
have h_pred_eq_pred : pred^[n.succ] i0 = pred^[0] i0 := by
- rwa [Function.iterate_zero, id.def]
+ rwa [Function.iterate_zero, id]
exact isMin_iterate_pred_of_eq_of_ne h_pred_eq_pred (Nat.succ_ne_zero n)
let m := (-toZ i0 (pred^[n.succ] i0)).toNat
have h_eq : pred^[m] i0 = pred^[n.succ] i0 := iterate_pred_toZ _ this
@@ -308,7 +308,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j := by
rfl
by_contra h
by_cases hm0 : m = 0
- · rw [hm0, Function.iterate_zero, id.def] at hm
+ · rw [hm0, Function.iterate_zero, id] at hm
rw [hm] at h
exact h (le_of_eq rfl)
refine' hi_max (max_of_succ_le (le_trans _ (@le_of_toZ_le _ _ _ _ _ i0 j i _)))
@@ -329,7 +329,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j := by
rfl
by_contra h
by_cases hm0 : m = 0
- · rw [hm0, Function.iterate_zero, id.def] at hm
+ · rw [hm0, Function.iterate_zero, id] at hm
rw [hm] at h
exact h (le_of_eq rfl)
refine' hj_min (min_of_le_pred _)
Nat.sqrt
material (#11866)
Move the content of Data.Nat.ForSqrt
and Data.Nat.Sqrt
to Data.Nat.Defs
by using Nat
-specific Std lemmas rather than the mathlib general ones. This makes it ready to move to Std if wanted.
@@ -7,6 +7,7 @@ import Mathlib.Order.LocallyFinite
import Mathlib.Order.SuccPred.Basic
import Mathlib.Order.Hom.Basic
import Mathlib.Data.Countable.Basic
+import Mathlib.Data.Nat.Cast.Order
import Mathlib.Logic.Encodable.Basic
#align_import order.succ_pred.linear_locally_finite from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
coe_nat
to natCast
(#11637)
Reduce the diff of #11499
All in the Int
namespace:
ofNat_eq_cast
→ ofNat_eq_natCast
cast_eq_cast_iff_Nat
→ natCast_inj
natCast_eq_ofNat
→ ofNat_eq_natCast
coe_nat_sub
→ natCast_sub
coe_nat_nonneg
→ natCast_nonneg
sign_coe_add_one
→ sign_natCast_add_one
nat_succ_eq_int_succ
→ natCast_succ
succ_neg_nat_succ
→ succ_neg_natCast_succ
coe_pred_of_pos
→ natCast_pred_of_pos
coe_nat_div
→ natCast_div
coe_nat_ediv
→ natCast_ediv
sign_coe_nat_of_nonzero
→ sign_natCast_of_ne_zero
toNat_coe_nat
→ toNat_natCast
toNat_coe_nat_add_one
→ toNat_natCast_add_one
coe_nat_dvd
→ natCast_dvd_natCast
coe_nat_dvd_left
→ natCast_dvd
coe_nat_dvd_right
→ dvd_natCast
le_coe_nat_sub
→ le_natCast_sub
succ_coe_nat_pos
→ succ_natCast_pos
coe_nat_modEq_iff
→ natCast_modEq_iff
coe_natAbs
→ natCast_natAbs
coe_nat_eq_zero
→ natCast_eq_zero
coe_nat_ne_zero
→ natCast_ne_zero
coe_nat_ne_zero_iff_pos
→ natCast_ne_zero_iff_pos
abs_coe_nat
→ abs_natCast
coe_nat_nonpos_iff
→ natCast_nonpos_iff
Also rename Nat.coe_nat_dvd
to Nat.cast_dvd_cast
@@ -209,12 +209,12 @@ theorem toZ_of_eq : toZ i0 i0 = 0 := by
#align to_Z_of_eq toZ_of_eq
theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : succ^[(toZ i0 i).toNat] i0 = i := by
- rw [toZ_of_ge hi, Int.toNat_coe_nat]
+ rw [toZ_of_ge hi, Int.toNat_natCast]
exact Nat.find_spec (exists_succ_iterate_of_le hi)
#align iterate_succ_to_Z iterate_succ_toZ
theorem iterate_pred_toZ (i : ι) (hi : i < i0) : pred^[(-toZ i0 i).toNat] i0 = i := by
- rw [toZ_of_lt hi, neg_neg, Int.toNat_coe_nat]
+ rw [toZ_of_lt hi, neg_neg, Int.toNat_natCast]
exact Nat.find_spec (exists_pred_iterate_of_le hi.le)
#align iterate_pred_to_Z iterate_pred_toZ
@@ -411,7 +411,7 @@ def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
right_inv n := by
dsimp only
rw [toZ_iterate_succ]
- exact Int.toNat_coe_nat n
+ exact Int.toNat_natCast n
map_rel_iff' := by
intro i j
simp only [Equiv.coe_fn_mk, Int.toNat_le]
@@ -438,7 +438,7 @@ def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
rw [hn_max]
exact Nat.lt_succ_iff.mp (Finset.mem_range.mp n.prop)
· rw [toZ_iterate_succ_of_not_isMax _ hn_max]
- simp only [Int.toNat_coe_nat, le_refl]
+ simp only [Int.toNat_natCast, le_refl]
map_rel_iff' := by
intro i j
simp only [Equiv.coe_fn_mk, Subtype.mk_le_mk, Int.toNat_le]
@@ -146,8 +146,8 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
fun n ↦ Finset.mem_Icc.mpr ⟨le_succ_iterate n i, (h_lt n).le⟩
obtain ⟨n, m, hnm, h_eq⟩ : ∃ n m, n < m ∧ succ^[n] i = succ^[m] i := by
let f : ℕ → Finset.Icc i j := fun n ↦ ⟨succ^[n] i, h_mem n⟩
- obtain ⟨n, m, hnm_ne, hfnm⟩ : ∃ n m, n ≠ m ∧ f n = f m
- exact Finite.exists_ne_map_eq_of_infinite f
+ obtain ⟨n, m, hnm_ne, hfnm⟩ : ∃ n m, n ≠ m ∧ f n = f m :=
+ Finite.exists_ne_map_eq_of_infinite f
have hnm_eq : succ^[n] i = succ^[m] i := by simpa only [f, Subtype.mk_eq_mk] using hfnm
rcases le_total n m with h_le | h_le
· exact ⟨n, m, lt_of_le_of_ne h_le hnm_ne, hnm_eq⟩
@@ -161,8 +161,8 @@ instance (priority := 100) LinearOrder.isPredArchimedean_of_isSuccArchimedean [S
exists_pred_iterate_of_le := by
intro i j hij
have h_exists := exists_succ_iterate_of_le hij
- obtain ⟨n, hn_eq, hn_lt_ne⟩ : ∃ n, succ^[n] i = j ∧ ∀ m < n, succ^[m] i ≠ j
- exact ⟨Nat.find h_exists, Nat.find_spec h_exists, fun m hmn ↦ Nat.find_min h_exists hmn⟩
+ obtain ⟨n, hn_eq, hn_lt_ne⟩ : ∃ n, succ^[n] i = j ∧ ∀ m < n, succ^[m] i ≠ j :=
+ ⟨Nat.find h_exists, Nat.find_spec h_exists, fun m hmn ↦ Nat.find_min h_exists hmn⟩
refine' ⟨n, _⟩
rw [← hn_eq]
induction' n with n
@@ -148,7 +148,7 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
let f : ℕ → Finset.Icc i j := fun n ↦ ⟨succ^[n] i, h_mem n⟩
obtain ⟨n, m, hnm_ne, hfnm⟩ : ∃ n m, n ≠ m ∧ f n = f m
exact Finite.exists_ne_map_eq_of_infinite f
- have hnm_eq : succ^[n] i = succ^[m] i := by simpa only [Subtype.mk_eq_mk] using hfnm
+ have hnm_eq : succ^[n] i = succ^[m] i := by simpa only [f, Subtype.mk_eq_mk] using hfnm
rcases le_total n m with h_le | h_le
· exact ⟨n, m, lt_of_le_of_ne h_le hnm_ne, hnm_eq⟩
· exact ⟨m, n, lt_of_le_of_ne h_le hnm_ne.symm, hnm_eq.symm⟩
cases'
(#9171)
I literally went through and regex'd some uses of cases'
, replacing them with rcases
; this is meant to be a low effort PR as I hope that tools can do this in the future.
rcases
is an easier replacement than cases
, though with better tools we could in future do a second pass converting simple rcases
added here (and existing ones) to cases
.
@@ -80,7 +80,7 @@ theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi
simp_rw [IsGLB, IsGreatest, mem_upperBounds, mem_lowerBounds] at h ⊢
refine' ⟨fun x hx ↦ h.1 x hx.1, fun x hx ↦ h.2 x _⟩
intro y hy
- cases' le_or_lt y j with h_le h_lt
+ rcases le_or_lt y j with h_le | h_lt
· exact hx y ⟨hy, h_le⟩
· exact le_trans (hx j ⟨hij_lt, le_rfl⟩) h_lt.le
#align linear_locally_finite_order.is_glb_Ioc_of_is_glb_Ioi LinearLocallyFiniteOrder.isGLB_Ioc_of_isGLB_Ioi
@@ -149,7 +149,7 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
obtain ⟨n, m, hnm_ne, hfnm⟩ : ∃ n m, n ≠ m ∧ f n = f m
exact Finite.exists_ne_map_eq_of_infinite f
have hnm_eq : succ^[n] i = succ^[m] i := by simpa only [Subtype.mk_eq_mk] using hfnm
- cases' le_total n m with h_le h_le
+ rcases le_total n m with h_le | h_le
· exact ⟨n, m, lt_of_le_of_ne h_le hnm_ne, hnm_eq⟩
· exact ⟨m, n, lt_of_le_of_ne h_le hnm_ne.symm, hnm_eq.symm⟩
have h_max : IsMax (succ^[n] i) := isMax_iterate_succ_of_eq_of_ne h_eq hnm.ne
@@ -240,7 +240,7 @@ theorem toZ_iterate_succ_le (n : ℕ) : toZ i0 (succ^[n] i0) ≤ n := by
#align to_Z_iterate_succ_le toZ_iterate_succ_le
theorem toZ_iterate_pred_ge (n : ℕ) : -(n : ℤ) ≤ toZ i0 (pred^[n] i0) := by
- cases' le_or_lt i0 (pred^[n] i0) with h h
+ rcases le_or_lt i0 (pred^[n] i0) with h | h
· have h_eq : pred^[n] i0 = i0 := le_antisymm (pred_iterate_le _ _) h
rw [h_eq, toZ_of_eq]
simp only [Right.neg_nonpos_iff, Nat.cast_nonneg]
@@ -282,7 +282,7 @@ theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin (pred^[n] i0)) :
#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMin
theorem le_of_toZ_le {j : ι} (h_le : toZ i0 i ≤ toZ i0 j) : i ≤ j := by
- cases' le_or_lt i0 i with hi hi <;> cases' le_or_lt i0 j with hj hj
+ rcases le_or_lt i0 i with hi | hi <;> rcases le_or_lt i0 j with hj | hj
· rw [← iterate_succ_toZ i hi, ← iterate_succ_toZ j hj]
exact Monotone.monotone_iterate_of_le_map succ_mono (le_succ _) (Int.toNat_le_toNat h_le)
· exact absurd ((toZ_neg hj).trans_le (toZ_nonneg hi)) (not_lt.mpr h_le)
@@ -297,7 +297,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j := by
· rw [le_antisymm h_le (hi_max h_le)]
by_cases hj_min : IsMin j
· rw [le_antisymm h_le (hj_min h_le)]
- cases' le_or_lt i0 i with hi hi <;> cases' le_or_lt i0 j with hj hj
+ rcases le_or_lt i0 i with hi | hi <;> rcases le_or_lt i0 j with hj | hj
· let m := Nat.find (exists_succ_iterate_of_le h_le)
have hm : succ^[m] i = j := Nat.find_spec (exists_succ_iterate_of_le h_le)
have hj_eq : j = succ^[(toZ i0 i).toNat + m] i0 := by
@@ -383,7 +383,7 @@ noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι
toFun := toZ hι.some
invFun n := if 0 ≤ n then succ^[n.toNat] hι.some else pred^[(-n).toNat] hι.some
left_inv i := by
- cases' le_or_lt hι.some i with hi hi
+ rcases le_or_lt hι.some i with hi | hi
· have h_nonneg : 0 ≤ toZ hι.some i := toZ_nonneg hi
simp_rw [if_pos h_nonneg]
exact iterate_succ_toZ i hi
@@ -391,7 +391,7 @@ noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι
simp_rw [if_neg (not_le.mpr h_neg)]
exact iterate_pred_toZ i hi
right_inv n := by
- cases' le_or_lt 0 n with hn hn
+ rcases le_or_lt 0 n with hn | hn
· simp_rw [if_pos hn]
rw [toZ_iterate_succ]
exact Int.toNat_of_nonneg hn
@@ -134,7 +134,7 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
swap
· refine' ⟨0, _⟩
simpa only [Function.iterate_zero, id.def] using hij
- by_contra' h
+ by_contra! h
have h_lt : ∀ n, succ^[n] i < j := by
intro n
induction' n with n hn
@@ -134,8 +134,7 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
swap
· refine' ⟨0, _⟩
simpa only [Function.iterate_zero, id.def] using hij
- by_contra h
- push_neg at h
+ by_contra' h
have h_lt : ∀ n, succ^[n] i < j := by
intro n
induction' n with n hn
Many proofs use the "stream of consciousness" style from Lean 3, rather than have ... :=
or suffices ... from/by
.
This PR updates a fraction of these to the preferred Lean 4 style.
I think a good goal would be to delete the "deferred" versions of have
, suffices
, and let
at the bottom of Mathlib.Tactic.Have
(Anyone who would like to contribute more cleanup is welcome to push directly to this branch.)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -170,8 +170,7 @@ instance (priority := 100) LinearOrder.isPredArchimedean_of_isSuccArchimedean [S
· simp only [Nat.zero_eq, Function.iterate_zero, id.def]
· rw [pred_succ_iterate_of_not_isMax]
rw [Nat.succ_sub_succ_eq_sub, tsub_zero]
- suffices : succ^[n] i < succ^[n.succ] i
- exact not_isMax_of_lt this
+ suffices succ^[n] i < succ^[n.succ] i from not_isMax_of_lt this
refine' lt_of_le_of_ne _ _
· rw [Function.iterate_succ']
exact le_succ _
@@ -259,7 +258,7 @@ theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax (succ^[n] i0)) :
· nth_rw 2 [← hmn]
rw [Int.toNat_eq_max, toZ_of_ge (le_succ_iterate _ _), max_eq_left]
exact Nat.cast_nonneg _
- suffices : IsMax (succ^[n] i0); exact absurd this hn
+ suffices IsMax (succ^[n] i0) from absurd this hn
exact isMax_iterate_succ_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_succ_of_not_is_max toZ_iterate_succ_of_not_isMax
@@ -279,8 +278,7 @@ theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin (pred^[n] i0)) :
rw [Int.toNat_eq_max, toZ_of_lt this, max_eq_left, neg_neg]
rw [neg_neg]
exact Nat.cast_nonneg _
- · suffices : IsMin (pred^[n.succ] i0)
- exact absurd this hn
+ · suffices IsMin (pred^[n.succ] i0) from absurd this hn
exact isMin_iterate_pred_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMin
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -56,7 +56,7 @@ About `toZ`:
open Order
-variable {ι : Type _} [LinearOrder ι]
+variable {ι : Type*} [LinearOrder ι]
namespace LinearLocallyFiniteOrder
@@ -94,7 +94,7 @@ theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i
rw [h_succFn_eq] at h
exact isGLB_Ioc_of_isGLB_Ioi hij_lt h
have hi_mem : i ∈ Finset.Ioc i j := by
- refine' Finset.is_glb_mem _ h_glb _
+ refine' Finset.isGLB_mem _ h_glb _
exact ⟨_, Finset.mem_Ioc.mpr ⟨hij_lt, le_rfl⟩⟩
rw [Finset.mem_Ioc] at hi_mem
exact lt_irrefl i hi_mem.1
@@ -2,11 +2,6 @@
Copyright (c) 2022 Rémy Degenne. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rémy Degenne
-
-! This file was ported from Lean 3 source module order.succ_pred.linear_locally_finite
-! leanprover-community/mathlib commit 2705404e701abc6b3127da906f40bae062a169c9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Order.LocallyFinite
import Mathlib.Order.SuccPred.Basic
@@ -14,6 +9,8 @@ import Mathlib.Order.Hom.Basic
import Mathlib.Data.Countable.Basic
import Mathlib.Logic.Encodable.Basic
+#align_import order.succ_pred.linear_locally_finite from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
+
/-!
# Linear locally finite orders
This is the second half of the changes originally in #5699, removing all occurrences of ;
after a space and implementing a linter rule to enforce it.
In most cases this 2-character substring has a space after it, so the following command was run first:
find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;
The remaining cases were few enough in number that they were done manually.
@@ -373,7 +373,7 @@ variable [SuccOrder ι] [PredOrder ι] [IsSuccArchimedean ι]
noncomputable def orderIsoRangeToZOfLinearSuccPredArch [hι : Nonempty ι] :
ι ≃o Set.range (toZ hι.some) where
toEquiv := Equiv.ofInjective _ injective_toZ
- map_rel_iff' := by intro i j ; exact toZ_le_iff i j
+ map_rel_iff' := by intro i j; exact toZ_le_iff i j
set_option linter.uppercaseLean3 false in
#align order_iso_range_to_Z_of_linear_succ_pred_arch orderIsoRangeToZOfLinearSuccPredArch
@@ -404,7 +404,7 @@ noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι
· simp_rw [if_neg (not_le.mpr hn)]
rw [toZ_iterate_pred]
simp only [hn.le, Int.toNat_of_nonneg, Right.nonneg_neg_iff, neg_neg]
- map_rel_iff' := by intro i j ; exact toZ_le_iff i j
+ map_rel_iff' := by intro i j; exact toZ_le_iff i j
#align order_iso_int_of_linear_succ_pred_arch orderIsoIntOfLinearSuccPredArch
/-- If the order has a bot but no top, `toZ` defines an `OrderIso` between `ι` and `ℕ`. -/
@@ -139,24 +139,24 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
simpa only [Function.iterate_zero, id.def] using hij
by_contra h
push_neg at h
- have h_lt : ∀ n, (succ^[n]) i < j := by
+ have h_lt : ∀ n, succ^[n] i < j := by
intro n
induction' n with n hn
· simpa only [Function.iterate_zero, id.def] using hij
· refine' lt_of_le_of_ne _ (h _)
rw [Function.iterate_succ', Function.comp_apply]
exact succ_le_of_lt hn
- have h_mem : ∀ n, (succ^[n]) i ∈ Finset.Icc i j :=
+ have h_mem : ∀ n, succ^[n] i ∈ Finset.Icc i j :=
fun n ↦ Finset.mem_Icc.mpr ⟨le_succ_iterate n i, (h_lt n).le⟩
- obtain ⟨n, m, hnm, h_eq⟩ : ∃ n m, n < m ∧ (succ^[n]) i = (succ^[m]) i := by
- let f : ℕ → Finset.Icc i j := fun n ↦ ⟨(succ^[n]) i, h_mem n⟩
+ obtain ⟨n, m, hnm, h_eq⟩ : ∃ n m, n < m ∧ succ^[n] i = succ^[m] i := by
+ let f : ℕ → Finset.Icc i j := fun n ↦ ⟨succ^[n] i, h_mem n⟩
obtain ⟨n, m, hnm_ne, hfnm⟩ : ∃ n m, n ≠ m ∧ f n = f m
exact Finite.exists_ne_map_eq_of_infinite f
- have hnm_eq : (succ^[n]) i = (succ^[m]) i := by simpa only [Subtype.mk_eq_mk] using hfnm
+ have hnm_eq : succ^[n] i = succ^[m] i := by simpa only [Subtype.mk_eq_mk] using hfnm
cases' le_total n m with h_le h_le
· exact ⟨n, m, lt_of_le_of_ne h_le hnm_ne, hnm_eq⟩
· exact ⟨m, n, lt_of_le_of_ne h_le hnm_ne.symm, hnm_eq.symm⟩
- have h_max : IsMax ((succ^[n]) i) := isMax_iterate_succ_of_eq_of_ne h_eq hnm.ne
+ have h_max : IsMax (succ^[n] i) := isMax_iterate_succ_of_eq_of_ne h_eq hnm.ne
exact not_le.mpr (h_lt n) (h_max (h_lt n).le)
#align linear_locally_finite_order.is_succ_archimedean LinearLocallyFiniteOrder.isSuccArchimedean
@@ -165,7 +165,7 @@ instance (priority := 100) LinearOrder.isPredArchimedean_of_isSuccArchimedean [S
exists_pred_iterate_of_le := by
intro i j hij
have h_exists := exists_succ_iterate_of_le hij
- obtain ⟨n, hn_eq, hn_lt_ne⟩ : ∃ n, (succ^[n]) i = j ∧ ∀ m < n, (succ^[m]) i ≠ j
+ obtain ⟨n, hn_eq, hn_lt_ne⟩ : ∃ n, succ^[n] i = j ∧ ∀ m < n, succ^[m] i ≠ j
exact ⟨Nat.find h_exists, Nat.find_spec h_exists, fun m hmn ↦ Nat.find_min h_exists hmn⟩
refine' ⟨n, _⟩
rw [← hn_eq]
@@ -173,7 +173,7 @@ instance (priority := 100) LinearOrder.isPredArchimedean_of_isSuccArchimedean [S
· simp only [Nat.zero_eq, Function.iterate_zero, id.def]
· rw [pred_succ_iterate_of_not_isMax]
rw [Nat.succ_sub_succ_eq_sub, tsub_zero]
- suffices : (succ^[n]) i < (succ^[n.succ]) i
+ suffices : succ^[n] i < succ^[n.succ] i
exact not_isMax_of_lt this
refine' lt_of_le_of_ne _ _
· rw [Function.iterate_succ']
@@ -213,12 +213,12 @@ theorem toZ_of_eq : toZ i0 i0 = 0 := by
rw [Function.iterate_zero, id.def]
#align to_Z_of_eq toZ_of_eq
-theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : (succ^[(toZ i0 i).toNat]) i0 = i := by
+theorem iterate_succ_toZ (i : ι) (hi : i0 ≤ i) : succ^[(toZ i0 i).toNat] i0 = i := by
rw [toZ_of_ge hi, Int.toNat_coe_nat]
exact Nat.find_spec (exists_succ_iterate_of_le hi)
#align iterate_succ_to_Z iterate_succ_toZ
-theorem iterate_pred_toZ (i : ι) (hi : i < i0) : (pred^[(-toZ i0 i).toNat]) i0 = i := by
+theorem iterate_pred_toZ (i : ι) (hi : i < i0) : pred^[(-toZ i0 i).toNat] i0 = i := by
rw [toZ_of_lt hi, neg_neg, Int.toNat_coe_nat]
exact Nat.find_spec (exists_pred_iterate_of_le hi.le)
#align iterate_pred_to_Z iterate_pred_toZ
@@ -238,15 +238,15 @@ theorem toZ_neg (hi : i < i0) : toZ i0 i < 0 := by
simp only [neg_zero, Int.toNat_zero, Function.iterate_zero, id.def, lt_self_iff_false] at hi
#align to_Z_neg toZ_neg
-theorem toZ_iterate_succ_le (n : ℕ) : toZ i0 ((succ^[n]) i0) ≤ n := by
+theorem toZ_iterate_succ_le (n : ℕ) : toZ i0 (succ^[n] i0) ≤ n := by
rw [toZ_of_ge (le_succ_iterate _ _)]
norm_cast
exact Nat.find_min' _ rfl
#align to_Z_iterate_succ_le toZ_iterate_succ_le
-theorem toZ_iterate_pred_ge (n : ℕ) : -(n : ℤ) ≤ toZ i0 ((pred^[n]) i0) := by
- cases' le_or_lt i0 ((pred^[n]) i0) with h h
- · have h_eq : (pred^[n]) i0 = i0 := le_antisymm (pred_iterate_le _ _) h
+theorem toZ_iterate_pred_ge (n : ℕ) : -(n : ℤ) ≤ toZ i0 (pred^[n] i0) := by
+ cases' le_or_lt i0 (pred^[n] i0) with h h
+ · have h_eq : pred^[n] i0 = i0 := le_antisymm (pred_iterate_le _ _) h
rw [h_eq, toZ_of_eq]
simp only [Right.neg_nonpos_iff, Nat.cast_nonneg]
· rw [toZ_of_lt h, neg_le_neg_iff]
@@ -254,35 +254,35 @@ theorem toZ_iterate_pred_ge (n : ℕ) : -(n : ℤ) ≤ toZ i0 ((pred^[n]) i0) :=
exact Nat.find_min' _ rfl
#align to_Z_iterate_pred_ge toZ_iterate_pred_ge
-theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax ((succ^[n]) i0)) :
- toZ i0 ((succ^[n]) i0) = n := by
- let m := (toZ i0 ((succ^[n]) i0)).toNat
- have h_eq : (succ^[m]) i0 = (succ^[n]) i0 := iterate_succ_toZ _ (le_succ_iterate _ _)
+theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax (succ^[n] i0)) :
+ toZ i0 (succ^[n] i0) = n := by
+ let m := (toZ i0 (succ^[n] i0)).toNat
+ have h_eq : succ^[m] i0 = succ^[n] i0 := iterate_succ_toZ _ (le_succ_iterate _ _)
by_cases hmn : m = n
· nth_rw 2 [← hmn]
rw [Int.toNat_eq_max, toZ_of_ge (le_succ_iterate _ _), max_eq_left]
exact Nat.cast_nonneg _
- suffices : IsMax ((succ^[n]) i0); exact absurd this hn
+ suffices : IsMax (succ^[n] i0); exact absurd this hn
exact isMax_iterate_succ_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_succ_of_not_is_max toZ_iterate_succ_of_not_isMax
-theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
- toZ i0 ((pred^[n]) i0) = -n := by
+theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin (pred^[n] i0)) :
+ toZ i0 (pred^[n] i0) = -n := by
cases' n with n n
· simp only [Nat.zero_eq, Function.iterate_zero, id.def, toZ_of_eq, Nat.cast_zero, neg_zero]
- have : (pred^[n.succ]) i0 < i0 := by
+ have : pred^[n.succ] i0 < i0 := by
refine' lt_of_le_of_ne (pred_iterate_le _ _) fun h_pred_iterate_eq ↦ hn _
- have h_pred_eq_pred : (pred^[n.succ]) i0 = (pred^[0]) i0 := by
+ have h_pred_eq_pred : pred^[n.succ] i0 = pred^[0] i0 := by
rwa [Function.iterate_zero, id.def]
exact isMin_iterate_pred_of_eq_of_ne h_pred_eq_pred (Nat.succ_ne_zero n)
- let m := (-toZ i0 ((pred^[n.succ]) i0)).toNat
- have h_eq : (pred^[m]) i0 = (pred^[n.succ]) i0 := iterate_pred_toZ _ this
+ let m := (-toZ i0 (pred^[n.succ] i0)).toNat
+ have h_eq : pred^[m] i0 = pred^[n.succ] i0 := iterate_pred_toZ _ this
by_cases hmn : m = n.succ
· nth_rw 2 [← hmn]
rw [Int.toNat_eq_max, toZ_of_lt this, max_eq_left, neg_neg]
rw [neg_neg]
exact Nat.cast_nonneg _
- · suffices : IsMin ((pred^[n.succ]) i0)
+ · suffices : IsMin (pred^[n.succ] i0)
exact absurd this hn
exact isMin_iterate_pred_of_eq_of_ne h_eq.symm (Ne.symm hmn)
#align to_Z_iterate_pred_of_not_is_min toZ_iterate_pred_of_not_isMin
@@ -305,8 +305,8 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j := by
· rw [le_antisymm h_le (hj_min h_le)]
cases' le_or_lt i0 i with hi hi <;> cases' le_or_lt i0 j with hj hj
· let m := Nat.find (exists_succ_iterate_of_le h_le)
- have hm : (succ^[m]) i = j := Nat.find_spec (exists_succ_iterate_of_le h_le)
- have hj_eq : j = (succ^[(toZ i0 i).toNat + m]) i0 := by
+ have hm : succ^[m] i = j := Nat.find_spec (exists_succ_iterate_of_le h_le)
+ have hj_eq : j = succ^[(toZ i0 i).toNat + m] i0 := by
rw [← hm, add_comm]
nth_rw 1 [← iterate_succ_toZ i hi]
rw [Function.iterate_add]
@@ -317,7 +317,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j := by
rw [hm] at h
exact h (le_of_eq rfl)
refine' hi_max (max_of_succ_le (le_trans _ (@le_of_toZ_le _ _ _ _ _ i0 j i _)))
- · have h_succ_le : (succ^[(toZ i0 i).toNat + 1]) i0 ≤ j := by
+ · have h_succ_le : succ^[(toZ i0 i).toNat + 1] i0 ≤ j := by
rw [hj_eq]
refine' Monotone.monotone_iterate_of_le_map succ_mono (le_succ i0) (add_le_add_left _ _)
exact Nat.one_le_iff_ne_zero.mpr hm0
@@ -326,8 +326,8 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j := by
· exact absurd h_le (not_le.mpr (hj.trans_le hi))
· exact (toZ_neg hi).le.trans (toZ_nonneg hj)
· let m := Nat.find (exists_pred_iterate_of_le h_le)
- have hm : (pred^[m]) j = i := Nat.find_spec (exists_pred_iterate_of_le h_le)
- have hj_eq : i = (pred^[(-toZ i0 j).toNat + m]) i0 := by
+ have hm : pred^[m] j = i := Nat.find_spec (exists_pred_iterate_of_le h_le)
+ have hj_eq : i = pred^[(-toZ i0 j).toNat + m] i0 := by
rw [← hm, add_comm]
nth_rw 1 [← iterate_pred_toZ j hj]
rw [Function.iterate_add]
@@ -340,7 +340,7 @@ theorem toZ_mono {i j : ι} (h_le : i ≤ j) : toZ i0 i ≤ toZ i0 j := by
refine' hj_min (min_of_le_pred _)
refine' (@le_of_toZ_le _ _ _ _ _ i0 j i _).trans _
· exact le_of_not_le h
- · have h_le_pred : i ≤ (pred^[(-toZ i0 j).toNat + 1]) i0 := by
+ · have h_le_pred : i ≤ pred^[(-toZ i0 j).toNat + 1] i0 := by
rw [hj_eq]
refine' Monotone.antitone_iterate_of_map_le pred_mono (pred_le i0) (add_le_add_left _ _)
exact Nat.one_le_iff_ne_zero.mpr hm0
@@ -351,11 +351,11 @@ theorem toZ_le_iff (i j : ι) : toZ i0 i ≤ toZ i0 j ↔ i ≤ j :=
⟨le_of_toZ_le, toZ_mono⟩
#align to_Z_le_iff toZ_le_iff
-theorem toZ_iterate_succ [NoMaxOrder ι] (n : ℕ) : toZ i0 ((succ^[n]) i0) = n :=
+theorem toZ_iterate_succ [NoMaxOrder ι] (n : ℕ) : toZ i0 (succ^[n] i0) = n :=
toZ_iterate_succ_of_not_isMax n (not_isMax _)
#align to_Z_iterate_succ toZ_iterate_succ
-theorem toZ_iterate_pred [NoMinOrder ι] (n : ℕ) : toZ i0 ((pred^[n]) i0) = -n :=
+theorem toZ_iterate_pred [NoMinOrder ι] (n : ℕ) : toZ i0 (pred^[n] i0) = -n :=
toZ_iterate_pred_of_not_isMin n (not_isMin _)
#align to_Z_iterate_pred toZ_iterate_pred
@@ -387,7 +387,7 @@ instance (priority := 100) countable_of_linear_succ_pred_arch : Countable ι :=
noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι] [hι : Nonempty ι] :
ι ≃o ℤ where
toFun := toZ hι.some
- invFun n := if 0 ≤ n then (succ^[n.toNat]) hι.some else (pred^[(-n).toNat]) hι.some
+ invFun n := if 0 ≤ n then succ^[n.toNat] hι.some else pred^[(-n).toNat] hι.some
left_inv i := by
cases' le_or_lt hι.some i with hi hi
· have h_nonneg : 0 ≤ toZ hι.some i := toZ_nonneg hi
@@ -410,7 +410,7 @@ noncomputable def orderIsoIntOfLinearSuccPredArch [NoMaxOrder ι] [NoMinOrder ι
/-- If the order has a bot but no top, `toZ` defines an `OrderIso` between `ι` and `ℕ`. -/
def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ where
toFun i := (toZ ⊥ i).toNat
- invFun n := (succ^[n]) ⊥
+ invFun n := succ^[n] ⊥
left_inv i := by
dsimp only
exact iterate_succ_toZ i bot_le
@@ -431,7 +431,7 @@ def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
toFun i :=
⟨(toZ ⊥ i).toNat,
Finset.mem_range_succ_iff.mpr (Int.toNat_le_toNat ((toZ_le_iff _ _).mpr le_top))⟩
- invFun n := (succ^[n]) ⊥
+ invFun n := succ^[n] ⊥
left_inv i := iterate_succ_toZ i bot_le
right_inv n := by
ext1
@@ -439,7 +439,7 @@ def orderIsoRangeOfLinearSuccPredArch [OrderBot ι] [OrderTop ι] :
refine' le_antisymm _ _
· rw [Int.toNat_le]
exact toZ_iterate_succ_le _
- by_cases hn_max : IsMax ((succ^[↑n]) (⊥ : ι))
+ by_cases hn_max : IsMax (succ^[↑n] (⊥ : ι))
· rw [← isTop_iff_isMax, isTop_iff_eq_top] at hn_max
rw [hn_max]
exact Nat.lt_succ_iff.mp (Finset.mem_range.mp n.prop)
at
and goals (#5387)
Changes are of the form
some_tactic at h⊢
-> some_tactic at h ⊢
some_tactic at h
-> some_tactic at h
@@ -80,7 +80,7 @@ theorem le_succFn (i : ι) : i ≤ succFn i := by
theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi i) k) :
IsGLB (Set.Ioc i j) k := by
- simp_rw [IsGLB, IsGreatest, mem_upperBounds, mem_lowerBounds] at h⊢
+ simp_rw [IsGLB, IsGreatest, mem_upperBounds, mem_lowerBounds] at h ⊢
refine' ⟨fun x hx ↦ h.1 x hx.1, fun x hx ↦ h.2 x _⟩
intro y hy
cases' le_or_lt y j with h_le h_lt
closes #3680, see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Stepping.20through.20simp_rw/near/326712986
@@ -412,10 +412,10 @@ def orderIsoNatOfLinearSuccPredArch [NoMaxOrder ι] [OrderBot ι] : ι ≃o ℕ
toFun i := (toZ ⊥ i).toNat
invFun n := (succ^[n]) ⊥
left_inv i := by
- simp_rw [if_pos (toZ_nonneg bot_le)]
+ dsimp only
exact iterate_succ_toZ i bot_le
right_inv n := by
- simp_rw [if_pos bot_le]
+ dsimp only
rw [toZ_iterate_succ]
exact Int.toNat_coe_nat n
map_rel_iff' := by
@@ -133,7 +133,7 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
exists_succ_iterate_of_le := by
intro i j hij
rw [le_iff_lt_or_eq] at hij
- cases hij <;> rename_i hij
+ cases' hij with hij hij
swap
· refine' ⟨0, _⟩
simpa only [Function.iterate_zero, id.def] using hij
@@ -268,9 +268,8 @@ theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax ((succ^[n]) i0)) :
theorem toZ_iterate_pred_of_not_isMin (n : ℕ) (hn : ¬IsMin ((pred^[n]) i0)) :
toZ i0 ((pred^[n]) i0) = -n := by
- cases n
+ cases' n with n n
· simp only [Nat.zero_eq, Function.iterate_zero, id.def, toZ_of_eq, Nat.cast_zero, neg_zero]
- rename_i n
have : (pred^[n.succ]) i0 < i0 := by
refine' lt_of_le_of_ne (pred_iterate_le _ _) fun h_pred_iterate_eq ↦ hn _
have h_pred_eq_pred : (pred^[n.succ]) i0 = (pred^[0]) i0 := by
@@ -160,7 +160,7 @@ instance (priority := 100) LinearLocallyFiniteOrder.isSuccArchimedean [LocallyFi
exact not_le.mpr (h_lt n) (h_max (h_lt n).le)
#align linear_locally_finite_order.is_succ_archimedean LinearLocallyFiniteOrder.isSuccArchimedean
-instance (priority := 100) LinearOrder.pred_archimedean_of_succ_archimedean [SuccOrder ι]
+instance (priority := 100) LinearOrder.isPredArchimedean_of_isSuccArchimedean [SuccOrder ι]
[PredOrder ι] [IsSuccArchimedean ι] : IsPredArchimedean ι where
exists_pred_iterate_of_le := by
intro i j hij
@@ -180,7 +180,7 @@ instance (priority := 100) LinearOrder.pred_archimedean_of_succ_archimedean [Suc
exact le_succ _
· rw [hn_eq]
exact hn_lt_ne _ (Nat.lt_succ_self n)
-#align linear_order.pred_archimedean_of_succ_archimedean LinearOrder.pred_archimedean_of_succ_archimedean
+#align linear_order.pred_archimedean_of_succ_archimedean LinearOrder.isPredArchimedean_of_isSuccArchimedean
section toZ
The unported dependencies are