Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move NormalizedGCDMonoid ℕ to reduce imports (#12341)
Previously `Mathlib.GroupTheory.Perm.Fin` knew about `LinearMap` for no good reason, because it relied on `Mathlib.RingTheory.Int.Basic` for some basic things, but that file also has heavy imports. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
- Loading branch information
1 parent
21e9965
commit 61ef41d
Showing
8 changed files
with
44 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/- | ||
Copyright (c) 2018 Johannes Hölzl. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Johannes Hölzl, Jens Wagemaker, Aaron Anderson | ||
-/ | ||
import Mathlib.Algebra.GCDMonoid.Basic | ||
import Mathlib.Algebra.Ring.Nat | ||
import Mathlib.Data.Nat.Units | ||
|
||
/-! | ||
# ℕ is a normalized GCD monoid. | ||
-/ | ||
|
||
/-- `ℕ` is a gcd_monoid. -/ | ||
instance : GCDMonoid ℕ where | ||
gcd := Nat.gcd | ||
lcm := Nat.lcm | ||
gcd_dvd_left := Nat.gcd_dvd_left | ||
gcd_dvd_right := Nat.gcd_dvd_right | ||
dvd_gcd := Nat.dvd_gcd | ||
gcd_mul_lcm a b := by rw [Nat.gcd_mul_lcm]; rfl | ||
lcm_zero_left := Nat.lcm_zero_left | ||
lcm_zero_right := Nat.lcm_zero_right | ||
|
||
theorem gcd_eq_nat_gcd (m n : ℕ) : gcd m n = Nat.gcd m n := | ||
rfl | ||
#align gcd_eq_nat_gcd gcd_eq_nat_gcd | ||
|
||
theorem lcm_eq_nat_lcm (m n : ℕ) : lcm m n = Nat.lcm m n := | ||
rfl | ||
#align lcm_eq_nat_lcm lcm_eq_nat_lcm | ||
|
||
instance : NormalizedGCDMonoid ℕ := | ||
{ (inferInstance : GCDMonoid ℕ), | ||
(inferInstance : NormalizationMonoid ℕ) with | ||
normalize_gcd := fun _ _ => normalize_eq _ | ||
normalize_lcm := fun _ _ => normalize_eq _ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters