File: Mathlib/Order/Interval/Finset/Nat.lean

full_name: Nat.instLocallyFiniteOrder
code: instance instLocallyFiniteOrder : LocallyFiniteOrder ℕ 
goal: LocallyFiniteOrder ℕ

full_name: Nat.Icc_eq_range'
code: theorem Icc_eq_range' : Icc a b = ⟨List.range' a (b + 1 - a), List.nodup_range' _ _⟩ 
goal: Finset.Icc a b = { val := ↑(List.range' a (b + 1 - a)), nodup := ⋯ }

full_name: Nat.Ico_eq_range'
code: theorem Ico_eq_range' : Ico a b = ⟨List.range' a (b - a), List.nodup_range' _ _⟩ 
goal: Finset.Ico a b = { val := ↑(List.range' a (b - a)), nodup := ⋯ }

full_name: Nat.Ioc_eq_range'
code: theorem Ioc_eq_range' : Ioc a b = ⟨List.range' (a + 1) (b - a), List.nodup_range' _ _⟩ 
goal: Finset.Ioc a b = { val := ↑(List.range' (a + 1) (b - a)), nodup := ⋯ }

full_name: Nat.Ioo_eq_range'
code: theorem Ioo_eq_range' : Ioo a b = ⟨List.range' (a + 1) (b - a - 1), List.nodup_range' _ _⟩ 
goal: Finset.Ioo a b = { val := ↑(List.range' (a + 1) (b - a - 1)), nodup := ⋯ }

full_name: Nat.uIcc_eq_range'
code: theorem uIcc_eq_range' :
    uIcc a b = ⟨List.range' (min a b) (max a b + 1 - min a b), List.nodup_range' _ _⟩ 
goal: Finset.uIcc a b = { val := ↑(List.range' (min a b) (max a b + 1 - min a b)), nodup := ⋯ }

full_name: Nat.Iio_eq_range
code: theorem Iio_eq_range : Iio = range 
goal: Finset.Iio = Finset.range

full_name: Nat.Ico_zero_eq_range
code: @[simp]
theorem Ico_zero_eq_range : Ico 0 = range 
goal: Finset.Ico 0 = Finset.range

full_name: Nat.range_eq_Icc_zero_sub_one
code: lemma range_eq_Icc_zero_sub_one (n : ℕ) (hn : n ≠ 0) : range n = Icc 0 (n - 1) 
goal: Finset.range n = Finset.Icc 0 (n - 1)

full_name: Finset.range_eq_Ico
code: theorem _root_.Finset.range_eq_Ico : range = Ico 0 
goal: Finset.range = Finset.Ico 0

full_name: Nat.card_Icc
code: @[simp]
theorem card_Icc : (Icc a b).card = b + 1 - a 
goal: (Finset.Icc a b).card = b + 1 - a

full_name: Nat.card_Ico
code: @[simp]
theorem card_Ico : (Ico a b).card = b - a 
goal: (Finset.Ico a b).card = b - a

full_name: Nat.card_Ioc
code: @[simp]
theorem card_Ioc : (Ioc a b).card = b - a 
goal: (Finset.Ioc a b).card = b - a

full_name: Nat.card_Ioo
code: @[simp]
theorem card_Ioo : (Ioo a b).card = b - a - 1 
goal: (Finset.Ioo a b).card = b - a - 1

full_name: Nat.card_uIcc
code: @[simp]
theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1 
goal: (Finset.uIcc a b).card = (↑b - ↑a).natAbs + 1

full_name: Nat.card_Iic
code: @[simp]
lemma card_Iic : (Iic b).card = b + 1 
goal: (Finset.Iic b).card = b + 1

full_name: Nat.card_Iio
code: @[simp]
theorem card_Iio : (Iio b).card = b 
goal: (Finset.Iio b).card = b

full_name: Nat.card_fintypeIcc
code: theorem card_fintypeIcc : Fintype.card (Set.Icc a b) = b + 1 - a 
goal: Fintype.card ↑(Set.Icc a b) = b + 1 - a

full_name: Nat.card_fintypeIco
code: theorem card_fintypeIco : Fintype.card (Set.Ico a b) = b - a 
goal: Fintype.card ↑(Set.Ico a b) = b - a

full_name: Nat.card_fintypeIoc
code: theorem card_fintypeIoc : Fintype.card (Set.Ioc a b) = b - a 
goal: Fintype.card ↑(Set.Ioc a b) = b - a

full_name: Nat.card_fintypeIoo
code: theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 
goal: Fintype.card ↑(Set.Ioo a b) = b - a - 1

full_name: Nat.card_fintypeIic
code: theorem card_fintypeIic : Fintype.card (Set.Iic b) = b + 1 
goal: Fintype.card ↑(Set.Iic b) = b + 1

full_name: Nat.card_fintypeIio
code: theorem card_fintypeIio : Fintype.card (Set.Iio b) = b 
goal: Fintype.card ↑(Set.Iio b) = b

full_name: Nat.Icc_succ_left
code: theorem Icc_succ_left : Icc a.succ b = Ioc a b 
goal: Finset.Icc a.succ b = Finset.Ioc a b

full_name: Nat.Ico_succ_right
code: theorem Ico_succ_right : Ico a b.succ = Icc a b 
goal: Finset.Ico a b.succ = Finset.Icc a b

full_name: Nat.Ico_succ_left
code: theorem Ico_succ_left : Ico a.succ b = Ioo a b 
goal: Finset.Ico a.succ b = Finset.Ioo a b

full_name: Nat.Icc_pred_right
code: theorem Icc_pred_right {b : ℕ} (h : 0 < b) : Icc a (b - 1) = Ico a b 
goal: Finset.Icc a (b - 1) = Finset.Ico a b

full_name: Nat.Ico_succ_succ
code: theorem Ico_succ_succ : Ico a.succ b.succ = Ioc a b 
goal: Finset.Ico a.succ b.succ = Finset.Ioc a b

full_name: Nat.Ico_succ_singleton
code: @[simp]
theorem Ico_succ_singleton : Ico a (a + 1) = {a} 
goal: Finset.Ico a (a + 1) = {a}

full_name: Nat.Ico_pred_singleton
code: @[simp]
theorem Ico_pred_singleton {a : ℕ} (h : 0 < a) : Ico (a - 1) a = {a - 1} 
goal: Finset.Ico (a - 1) a = {a - 1}

full_name: Nat.Ioc_succ_singleton
code: @[simp]
theorem Ioc_succ_singleton : Ioc b (b + 1) = {b + 1} 
goal: Finset.Ioc b (b + 1) = {b + 1}

full_name: Nat.Ico_succ_right_eq_insert_Ico
code: theorem Ico_succ_right_eq_insert_Ico (h : a ≤ b) : Ico a (b + 1) = insert b (Ico a b) 
goal: Finset.Ico a (b + 1) = insert b (Finset.Ico a b)

full_name: Nat.Ico_insert_succ_left
code: theorem Ico_insert_succ_left (h : a < b) : insert a (Ico a.succ b) = Ico a b 
goal: insert a (Finset.Ico a.succ b) = Finset.Ico a b

full_name: Nat.Icc_insert_succ_left
code: lemma Icc_insert_succ_left (h : a ≤ b) : insert a (Icc (a + 1) b) = Icc a b 
goal: insert a (Finset.Icc (a + 1) b) = Finset.Icc a b

full_name: Nat.Icc_insert_succ_right
code: lemma Icc_insert_succ_right (h : a ≤ b + 1) : insert (b + 1) (Icc a b) = Icc a (b + 1) 
goal: insert (b + 1) (Finset.Icc a b) = Finset.Icc a (b + 1)

full_name: Nat.image_sub_const_Ico
code: theorem image_sub_const_Ico (h : c ≤ a) :
    ((Ico a b).image fun x => x - c) = Ico (a - c) (b - c) 
goal: Finset.image (fun x => x - c) (Finset.Ico a b) = Finset.Ico (a - c) (b - c)

full_name: Nat.Ico_image_const_sub_eq_Ico
code: theorem Ico_image_const_sub_eq_Ico (hac : a ≤ c) :
    ((Ico a b).image fun x => c - x) = Ico (c + 1 - b) (c + 1 - a) 
goal: Finset.image (fun x => c - x) (Finset.Ico a b) = Finset.Ico (c + 1 - b) (c + 1 - a)

full_name: Nat.Ico_succ_left_eq_erase_Ico
code: theorem Ico_succ_left_eq_erase_Ico : Ico a.succ b = erase (Ico a b) a 
goal: Finset.Ico a.succ b = (Finset.Ico a b).erase a

full_name: Nat.mod_injOn_Ico
code: theorem mod_injOn_Ico (n a : ℕ) : Set.InjOn (· % a) (Finset.Ico n (n + a)) 
goal: Set.InjOn (fun x => x % a) ↑(Finset.Ico n (n + a))

full_name: Nat.image_Ico_mod
code: /-- Note that while this lemma cannot be easily generalized to a type class, it holds for ℤ as
well. See `Int.image_Ico_emod` for the ℤ version. -/
theorem image_Ico_mod (n a : ℕ) : (Ico n (n + a)).image (· % a) = range a 
goal: Finset.image (fun x => x % a) (Finset.Ico n (n + a)) = Finset.range a

full_name: Nat.multiset_Ico_map_mod
code: theorem multiset_Ico_map_mod (n a : ℕ) :
    (Multiset.Ico n (n + a)).map (· % a) = Multiset.range a 
goal: Multiset.map (fun x => x % a) (Multiset.Ico n (n + a)) = Multiset.range a

full_name: Finset.range_image_pred_top_sub
code: theorem range_image_pred_top_sub (n : ℕ) :
    ((Finset.range n).image fun j => n - 1 - j) = Finset.range n 
goal: Finset.image (fun j => n - 1 - j) (Finset.range n) = Finset.range n

full_name: Finset.range_add_eq_union
code: theorem range_add_eq_union : range (a + b) = range a ∪ (range b).map (addLeftEmbedding a) 
goal: Finset.range (a + b) = Finset.range a ∪ Finset.map (addLeftEmbedding a) (Finset.range b)

full_name: Nat.decreasing_induction_of_not_bddAbove
code: theorem Nat.decreasing_induction_of_not_bddAbove (hP : ¬BddAbove { x | P x }) (n : ℕ) : P n 
goal: P n

full_name: Nat.strong_decreasing_induction
code: @[elab_as_elim]
lemma Nat.strong_decreasing_induction (base : ∃ n, ∀ m > n, P m) (step : ∀ n, (∀ m > n, P m) → P n)
    (n : ℕ) : P n 
goal: P n

full_name: Nat.decreasing_induction_of_infinite
code: theorem Nat.decreasing_induction_of_infinite (hP : { x | P x }.Infinite) (n : ℕ) : P n 
goal: P n

full_name: Nat.cauchy_induction'
code: theorem Nat.cauchy_induction' (seed : ℕ) (h : ∀ n, P (n + 1) → P n) (hs : P seed)
    (hi : ∀ x, seed ≤ x → P x → ∃ y, x < y ∧ P y) (n : ℕ) : P n 
goal: P n

full_name: Nat.cauchy_induction
code: theorem Nat.cauchy_induction (seed : ℕ) (hs : P seed) (f : ℕ → ℕ)
    (hf : ∀ x, seed ≤ x → P x → x < f x ∧ P (f x)) (n : ℕ) : P n 
goal: P n

full_name: Nat.cauchy_induction_mul
code: theorem Nat.cauchy_induction_mul (h : ∀ (n : ℕ), P (n + 1) → P n) (k seed : ℕ) (hk : 1 < k)
    (hs : P seed.succ) (hm : ∀ x, seed < x → P x → P (k * x)) (n : ℕ) : P n 
goal: P n

full_name: Nat.cauchy_induction_two_mul
code: theorem Nat.cauchy_induction_two_mul (seed : ℕ) (hs : P seed.succ)
    (hm : ∀ x, seed < x → P x → P (2 * x)) (n : ℕ) : P n 
goal: P n

full_name: Nat.pow_imp_self_of_one_lt
code: theorem Nat.pow_imp_self_of_one_lt {M} [Monoid M] (k : ℕ) (hk : 1 < k)
    (P : M → Prop) (hmul : ∀ x y, P x → P (x * y) ∨ P (y * x))
    (hpow : ∀ x, P (x ^ k) → P x) : ∀ n x, P (x ^ n) → P x 
goal: P (x ^ n) → P x