Documentation

Init.Data.Nat.Compare

Basic lemmas about comparing natural numbers #

This file introduce some basic lemmas about compare as applied to natural numbers.

theorem Nat.compare_def_lt (a : Nat) (b : Nat) :
compare a b = if a < b then Ordering.lt else if b < a then Ordering.gt else Ordering.eq
theorem Nat.compare_def_le (a : Nat) (b : Nat) :
compare a b = if a b then if b a then Ordering.eq else Ordering.lt else Ordering.gt
theorem Nat.compare_swap (a : Nat) (b : Nat) :
(compare a b).swap = compare b a
theorem Nat.compare_eq_eq {a : Nat} {b : Nat} :
theorem Nat.compare_eq_lt {a : Nat} {b : Nat} :
theorem Nat.compare_eq_gt {a : Nat} {b : Nat} :