Basic lemmas about natural numbers #
The primary purpose of the lemmas in this file is to assist with reasoning about sizes of objects, array indices and such. For a more thorough development of the theory of natural numbers, we recommend using Mathlib.
rec/cases #
le/lt #
Alias of the forward direction of Nat.not_le
.
Alias of the reverse direction of Nat.not_le
.
Alias of the forward direction of Nat.not_le
.
Alias of the reverse direction of Nat.not_le
.
Alias of the forward direction of Nat.not_lt
.
Alias of the reverse direction of Nat.not_lt
.
Alias of the forward direction of Nat.not_lt
.
Alias of the reverse direction of Nat.not_lt
.
Alias of the reverse direction of Nat.not_lt
.
Alias of Nat.le_antisymm_iff
.
Alias of Nat.lt_or_gt_of_ne
.
Alias of Nat.lt_or_gt_of_ne
.
compare #
zero/one/two #
succ/pred #
add #
Alias of Nat.succ_add_eq_add_succ
.
sub #
Alias of Nat.sub_lt_of_pos_le
.
min/max #
mul #
div/mod #
pow #
log2 #
dvd #
Equations
- Nat.decidable_dvd x✝ x = decidable_of_decidable_of_iff (_ : x % x✝ = 0 ↔ x✝ ∣ x)
sum #
shiftLeft and shiftRight #
Decidability of predicates #
Equations
- Nat.decidableForallFin P = decidable_of_iff (∀ (k : Nat) (h : k < n), P { val := k, isLt := h }) (_ : (∀ (k : Nat) (h : k < n), P { val := k, isLt := h }) ↔ ∀ (i : Fin n), P i)