2
2
Copyright (c) 2018 Johannes Hölzl. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Johannes Hölzl, Jens Wagemaker
5
-
6
- TODO: Provide a GCD monoid instance for `ℕ`, port GCD facts about nats
7
- TODO: Generalize normalization monoids commutative (cancellative) monoids with or without zero
8
- TODO: Generalize GCD monoid to not require normalization in all cases
9
5
-/
6
+
10
7
import algebra.associated
11
8
import data.nat.gcd
12
9
import algebra.group_power.lemmas
13
10
14
11
/-!
15
-
16
12
# Monoids with normalization functions, `gcd`, and `lcm`
17
13
18
14
This file defines extra structures on `comm_cancel_monoid_with_zero`s, including `integral_domain`s.
@@ -24,6 +20,8 @@ This file defines extra structures on `comm_cancel_monoid_with_zero`s, including
24
20
* `gcd_monoid_of_exists_gcd`
25
21
* `gcd_monoid_of_exists_lcm`
26
22
23
+ For the `gcd_monoid` instances on `ℕ` and `Z`, see `ring_theory.int.basic`.
24
+
27
25
## Implementation Notes
28
26
29
27
* `normalization_monoid` is defined by assigning to each element a `norm_unit` such that multiplying
@@ -48,15 +46,13 @@ without zero.
48
46
49
47
## TODO
50
48
51
- * Provide a GCD monoid instance for `ℕ`, port GCD facts about nats, definition of coprime
49
+ * Port GCD facts about nats, definition of coprime
52
50
* Generalize normalization monoids to commutative (cancellative) monoids with or without zero
53
51
* Generalize GCD monoid to not require normalization in all cases
54
52
55
-
56
53
## Tags
57
54
58
55
divisibility, gcd, lcm, normalize
59
-
60
56
-/
61
57
62
58
variables {α : Type *}
@@ -822,27 +818,4 @@ gcd_monoid_of_lcm
822
818
(λ a b c ac ab, normalize_dvd_iff.2 ((classical.some_spec (h c b) a).1 ⟨ac, ab⟩))
823
819
(λ a b, normalize_idem _)
824
820
825
- /-- `ℕ` is a `gcd_monoid` -/
826
- instance : gcd_monoid ℕ :=
827
- { gcd := nat.gcd,
828
- lcm := nat.lcm,
829
- gcd_dvd_left := nat.gcd_dvd_left,
830
- gcd_dvd_right := nat.gcd_dvd_right,
831
- dvd_gcd := λ _ _ _, nat.dvd_gcd,
832
- normalize_gcd := λ a b, nat.mul_one (a.gcd b),
833
- gcd_mul_lcm := λ a b, (a.gcd_mul_lcm b).trans (mul_one (a * b)).symm,
834
- lcm_zero_left := nat.lcm_zero_left,
835
- lcm_zero_right := nat.lcm_zero_right,
836
- norm_unit := λ _, 1 ,
837
- norm_unit_zero := rfl,
838
- norm_unit_mul := λ _ _ _ _, rfl,
839
- norm_unit_coe_units := λ u, eq_inv_of_eq_inv
840
- (by rw [one_inv, units.ext_iff, units.coe_one, nat.is_unit_iff.mp u.is_unit]) }
841
-
842
- @[simp] lemma nat.normalize_eq (n : ℕ) : normalize n = n := n.mul_one
843
-
844
- lemma nat.gcd_eq_gcd (m n : ℕ) : gcd m n = nat.gcd m n := rfl
845
-
846
- lemma nat.lcm_eq_lcm (m n : ℕ) : lcm m n = nat.lcm m n := rfl
847
-
848
821
end constructors
0 commit comments