refactor(library/data/int/basic): cleanup proof
Proof was abusing the higher-order unifier
This commit is contained in:
parent
2b1d2c21ad
commit
e01b155b2e
1 changed files with 8 additions and 1 deletions
|
@ -533,7 +533,14 @@ end migrate_algebra
|
||||||
|
|
||||||
/- additional properties -/
|
/- additional properties -/
|
||||||
theorem of_nat_sub {m n : ℕ} (H : m ≥ n) : m - n = sub m n :=
|
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 :=
|
theorem neg_succ_of_nat_eq' (m : ℕ) : -[1+ m] = -m - 1 :=
|
||||||
by rewrite [neg_succ_of_nat_eq, of_nat_add, neg_add]
|
by rewrite [neg_succ_of_nat_eq, of_nat_add, neg_add]
|
||||||
|
|
Loading…
Reference in a new issue