refactor(library/data/nat/sub): cleanup 'max' theorems

This commit is contained in:
Leonardo de Moura 2014-11-18 17:56:42 -08:00
parent e77cd59368
commit dbb3b7c72a

View file

@ -368,13 +368,17 @@ sub_split
definition max (n m : ) : := n + (m - n)
definition min (n m : ) : := m - (m - n)
theorem max_le {n m : } (H : n ≤ m) : n + (m - n) = m := add_sub_le H
theorem max_le {n m : } (H : n ≤ m) : max n m = m :=
add_sub_le H
theorem max_ge {n m : } (H : n ≥ m) : n + (m - n) = n := add_sub_ge H
theorem max_ge {n m : } (H : n ≥ m) : max n m = n :=
add_sub_ge H
theorem left_le_max (n m : ) : n ≤ n + (m - n) := !le_add_sub_left
theorem left_le_max (n m : ) : n ≤ max n m :=
!le_add_sub_left
theorem right_le_max (n m : ) : m ≤ max n m := !le_add_sub_right
theorem right_le_max (n m : ) : m ≤ max n m :=
!le_add_sub_right
-- ### absolute difference