refactor(library/data/int/basic): cleanup proof

Proof was abusing the higher-order unifier
This commit is contained in:
Leonardo de Moura 2015-08-31 16:53:11 -10:00
parent 2b1d2c21ad
commit e01b155b2e

View file

@ -533,7 +533,14 @@ end migrate_algebra
/- additional properties -/
theorem of_nat_sub {m n : } (H : m ≥ n) : m - n = sub m n :=
(sub_eq_of_eq_add (!congr_arg (nat.sub_add_cancel H)⁻¹))⁻¹
assert m - n + n = m, from nat.sub_add_cancel H,
begin
symmetry,
apply sub_eq_of_eq_add,
rewrite [-of_nat_add, this]
end
-- (sub_eq_of_eq_add (!congr_arg (nat.sub_add_cancel H)⁻¹))⁻¹
theorem neg_succ_of_nat_eq' (m : ) : -[1+ m] = -m - 1 :=
by rewrite [neg_succ_of_nat_eq, of_nat_add, neg_add]