Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(algebra/*, * : [regular, smul_with_zero, module/basic]): introdu…
…ce `mul_action_with_zero` and `M`-regular elements (#6590) This PR has been split and there are now two separate PRs. * #6590, this one, introducing `smul_with_zero` and `mul_action_with_zero`: two typeclasses to deal with multiplicative actions of `monoid_with_zero`, without the need to assume the presence of an addition! * #6659, introducing `M`-regular elements, called `smul_regular`: the analogue of `is_left_regular`, but defined for an action of `monoid_with_zero` on a module `M`. This PR is a preparation for introducing `M`-regular elements. From the doc-string: ### Introduce `smul_with_zero` In analogy with the usual monoid action on a Type `M`, we introduce an action of a `monoid_with_zero` on a Type with `0`. In particular, for Types `R` and `M`, both containing `0`, we define `smul_with_zero R M` to be the typeclass where the products `r • 0` and `0 • m` vanish for all `r ∈ R` and all `m ∈ M`. Moreover, in the case in which `R` is a `monoid_with_zero`, we introduce the typeclass `mul_action_with_zero R M`, mimicking group actions and having an absorbing `0` in `R`. Thus, the action is required to be compatible with * the unit of the monoid, acting as the identity; * the zero of the monoid_with_zero, acting as zero; * associativity of the monoid. Next, in a separate file, I introduce `M`-regular elements for a `monoid_with_zero R` with a `mul_action_with_zero` on a module `M`. The definition is simply to require that an element `a : R` is `M`-regular if the smultiplication `M → M`, given by `m ↦ a • m` is injective. We also prove some basic facts about `M`-regular elements. The PR further changes three further the files * `data/polynomial/coeffs`; * `topology/algebra/module.lean`; * `analysis/normed_space/bounded_linear_maps`. The changes are prompted by a failure in CI. In each case, the change was tiny, mostly having to do with an exchange of a multiplication by a smultiplication or vice-versa. Co-authored-by: Vierkantor <vierkantor@vierkantor.com> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
- Loading branch information
1 parent
abf2ab4
commit 1f47833
Showing
6 changed files
with
99 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/- | ||
Copyright (c) 2021 Damiano Testa. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Damiano Testa | ||
-/ | ||
import group_theory.group_action.defs | ||
/-! | ||
# Introduce `smul_with_zero` | ||
In analogy with the usual monoid action on a Type `M`, we introduce an action of a | ||
`monoid_with_zero` on a Type with `0`. | ||
In particular, for Types `R` and `M`, both containing `0`, we define `smul_with_zero R M` to | ||
be the typeclass where the products `r • 0` and `0 • m` vanish for all `r : R` and all `m : M`. | ||
Moreover, in the case in which `R` is a `monoid_with_zero`, we introduce the typeclass | ||
`mul_action_with_zero R M`, mimicking group actions and having an absorbing `0` in `R`. | ||
Thus, the action is required to be compatible with | ||
* the unit of the monoid, acting as the identity; | ||
* the zero of the monoid_with_zero, acting as zero; | ||
* associativity of the monoid. | ||
We also add `instances`: | ||
* any `monoid_with_zero` has a `mul_action_with_zero R R` acting on itself; | ||
-/ | ||
|
||
variables (R M : Type*) | ||
|
||
section has_zero | ||
|
||
variable [has_zero M] | ||
|
||
/-- `smul_with_zero` is a class consisting of a Type `R` with `0 : R` and a scalar multiplication | ||
of `R` on a Type `M` with `0`, such that the equality `r • m = 0` holds if at least one among `r` | ||
or `m` equals `0`. -/ | ||
class smul_with_zero [has_zero R] extends has_scalar R M := | ||
(smul_zero : ∀ r : R, r • (0 : M) = 0) | ||
(zero_smul : ∀ m : M, (0 : R) • m = 0) | ||
|
||
variables {M} | ||
|
||
@[simp] lemma zero_smul [has_zero R] [smul_with_zero R M] (m : M) : | ||
(0 : R) • m = 0 := | ||
smul_with_zero.zero_smul m | ||
|
||
variables (M) | ||
|
||
section monoid_with_zero | ||
|
||
variable [monoid_with_zero R] | ||
|
||
/-- An action of a monoid with zero `R` on a Type `M`, also with `0`, compatible with `0` | ||
(both in `R` and in `M`), with `1 ∈ R`, and with associativity of multiplication on the | ||
monoid `M`. -/ | ||
class mul_action_with_zero extends mul_action R M := | ||
-- these fields are copied from `smul_with_zero`, as `extends` behaves poorly | ||
(smul_zero : ∀ r : R, r • (0 : M) = 0) | ||
(zero_smul : ∀ m : M, (0 : R) • m = 0) | ||
|
||
@[priority 100] -- see Note [lower instance priority] | ||
instance mul_action_with_zero.to_smul_with_zero [m : mul_action_with_zero R M] : | ||
smul_with_zero R M := | ||
{..m} | ||
|
||
instance monoid_with_zero.to_mul_action_with_zero : mul_action_with_zero R R := | ||
{ smul_zero := mul_zero, | ||
zero_smul := zero_mul, | ||
..monoid.to_mul_action R } | ||
|
||
end monoid_with_zero | ||
|
||
end has_zero |
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