| /- | |
| 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 |