|
| 1 | +/- |
| 2 | +Copyright (c) 2020 Kenny Lau. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Kenny Lau |
| 5 | +
|
| 6 | +Group action on rings. |
| 7 | +-/ |
| 8 | + |
| 9 | +import group_theory.group_action data.equiv.ring |
| 10 | + |
| 11 | +universes u v |
| 12 | + |
| 13 | +variables (M G : Type u) [monoid M] [group G] |
| 14 | +variables (A R F : Type v) [add_monoid A] [semiring R] [field F] |
| 15 | + |
| 16 | +section prio |
| 17 | +set_option default_priority 100 -- see Note [default priority] |
| 18 | + |
| 19 | +/-- Typeclass for multiplicative actions by monoids on semirings. -/ |
| 20 | +class mul_semiring_action extends distrib_mul_action M R := |
| 21 | +(smul_one : ∀ (g : M), (g • 1 : R) = 1) |
| 22 | +(smul_mul : ∀ (g : M) (x y : R), g • (x * y) = (g • x) * (g • y)) |
| 23 | + |
| 24 | +end prio |
| 25 | + |
| 26 | +export mul_semiring_action (smul_one) |
| 27 | + |
| 28 | +variables {M R} |
| 29 | +lemma smul_mul' [mul_semiring_action M R] (g : M) (x y : R) : |
| 30 | + g • (x * y) = (g • x) * (g • y) := |
| 31 | +mul_semiring_action.smul_mul g x y |
| 32 | +variables (M R) |
| 33 | + |
| 34 | +/-- Each element of the monoid defines a additive monoid homomorphism. -/ |
| 35 | +def distrib_mul_action.to_add_monoid_hom [distrib_mul_action M A] (x : M) : A →+ A := |
| 36 | +{ to_fun := (•) x, |
| 37 | + map_zero' := smul_zero x, |
| 38 | + map_add' := smul_add x } |
| 39 | + |
| 40 | +/-- Each element of the group defines an additive monoid isomorphism. -/ |
| 41 | +def distrib_mul_action.to_add_equiv [distrib_mul_action G A] (x : G) : A ≃+ A := |
| 42 | +{ .. distrib_mul_action.to_add_monoid_hom G A x, |
| 43 | + .. mul_action.to_perm G A x } |
| 44 | + |
| 45 | +/-- The monoid of endomorphisms. -/ |
| 46 | +def monoid.End := M →* M |
| 47 | + |
| 48 | +instance monoid.End.monoid : monoid (monoid.End M) := |
| 49 | +{ mul := monoid_hom.comp, |
| 50 | + one := monoid_hom.id M, |
| 51 | + mul_assoc := λ _ _ _, monoid_hom.comp_assoc _ _ _, |
| 52 | + mul_one := monoid_hom.comp_id, |
| 53 | + one_mul := monoid_hom.id_comp } |
| 54 | + |
| 55 | +instance monoid.End.inhabited : inhabited (monoid.End M) := |
| 56 | +⟨1⟩ |
| 57 | + |
| 58 | +/-- The monoid of endomorphisms. -/ |
| 59 | +def add_monoid.End := A →+ A |
| 60 | + |
| 61 | +instance add_monoid.End.monoid : monoid (add_monoid.End A) := |
| 62 | +{ mul := add_monoid_hom.comp, |
| 63 | + one := add_monoid_hom.id A, |
| 64 | + mul_assoc := λ _ _ _, add_monoid_hom.comp_assoc _ _ _, |
| 65 | + mul_one := add_monoid_hom.comp_id, |
| 66 | + one_mul := add_monoid_hom.id_comp } |
| 67 | + |
| 68 | +instance add_monoid.End.inhabited : inhabited (add_monoid.End A) := |
| 69 | +⟨1⟩ |
| 70 | + |
| 71 | +/-- Each element of the group defines an additive monoid homomorphism. -/ |
| 72 | +def distrib_mul_action.hom_add_monoid_hom [distrib_mul_action M A] : M →* add_monoid.End A := |
| 73 | +{ to_fun := distrib_mul_action.to_add_monoid_hom M A, |
| 74 | + map_one' := add_monoid_hom.ext $ λ x, one_smul M x, |
| 75 | + map_mul' := λ x y, add_monoid_hom.ext $ λ z, mul_smul x y z } |
| 76 | + |
| 77 | +/-- Each element of the monoid defines a semiring homomorphism. -/ |
| 78 | +def mul_semiring_action.to_semiring_hom [mul_semiring_action M R] (x : M) : R →+* R := |
| 79 | +{ map_one' := smul_one x, |
| 80 | + map_mul' := smul_mul' x, |
| 81 | + .. distrib_mul_action.to_add_monoid_hom M R x } |
| 82 | + |
| 83 | +/-- Each element of the group defines a semiring isomorphism. -/ |
| 84 | +def mul_semiring_action.to_semiring_equiv [mul_semiring_action G R] (x : G) : R ≃+* R := |
| 85 | +{ .. distrib_mul_action.to_add_equiv G R x, |
| 86 | + .. mul_semiring_action.to_semiring_hom G R x } |
| 87 | + |
| 88 | +section simp_lemmas |
| 89 | + |
| 90 | +variables {M G A R} |
| 91 | + |
| 92 | +attribute [simp] smul_one smul_mul' smul_zero smul_add |
| 93 | + |
| 94 | +@[simp] lemma smul_inv [mul_semiring_action M F] (x : M) (m : F) : x • m⁻¹ = (x • m)⁻¹ := |
| 95 | +(mul_semiring_action.to_semiring_hom M F x).map_inv |
| 96 | + |
| 97 | +@[simp] lemma smul_pow [mul_semiring_action M R] (x : M) (m : R) (n : ℕ) : |
| 98 | + x • m ^ n = (x • m) ^ n := |
| 99 | +nat.rec_on n (smul_one x) $ λ n ih, (smul_mul' x m (m ^ n)).trans $ congr_arg _ ih |
| 100 | + |
| 101 | +end simp_lemmas |
0 commit comments