This is pretty big PR that upstreams all of Std.Data.Int.Init in one go. So far lemmas have seen minimal changes needed to adapt to Lean core environment. --------- Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
17 lines
378 B
Text
17 lines
378 B
Text
/-
|
|
Copyright (c) 2022 Mario Carneiro. All rights reserved.
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
Authors: Mario Carneiro
|
|
-/
|
|
prelude
|
|
import Init.Data.Int.Basic
|
|
import Init.Data.Nat.Gcd
|
|
|
|
namespace Int
|
|
|
|
/-! ## gcd -/
|
|
|
|
/-- Computes the greatest common divisor of two integers, as a `Nat`. -/
|
|
def gcd (m n : Int) : Nat := m.natAbs.gcd n.natAbs
|
|
|
|
end Int
|