Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port data/nat/gcd.lean (except for pow_dvd_pow_iff) #20

Merged
merged 10 commits into from
Jul 2, 2021
2 changes: 2 additions & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import Mathlib.Data.Equiv.Basic
import Mathlib.Data.Equiv.Functor
import Mathlib.Data.List.Basic
import Mathlib.Data.Nat.Basic
import Mathlib.Data.Nat.Gcd
import Mathlib.Data.UInt
import Mathlib.Dvd
import Mathlib.Function
import Mathlib.Logic.Basic
import Mathlib.Logic.Function.Basic
Expand Down
4 changes: 4 additions & 0 deletions Mathlib/Data/Nat/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ lemma eq_of_mul_eq_mul_left {m k n : ℕ} (Hn : 0 < n) (H : n * m = n * k) : m =
Nat.le_antisymm (Nat.le_of_mul_le_mul_left (Nat.le_of_eq H) Hn)
(Nat.le_of_mul_le_mul_left (Nat.le_of_eq H.symm) Hn)

lemma eq_of_mul_eq_mul_right {n m k : ℕ} (Hm : 0 < m) (H : n * m = k * m) : n = k :=
by rw [Nat.mul_comm n m, Nat.mul_comm k m] at H
exact Nat.eq_of_mul_eq_mul_left Hm H

protected lemma add_self_ne_one : ∀ (n : ℕ), n + n ≠ 1
| n+1, h =>
have h1 : succ (succ (n + n)) = 1 := succ_add n n ▸ h
Expand Down
Loading