-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Submonoid/Membership): don't import
MonoidWithZero
See #10327 for the new copyright header
- Loading branch information
1 parent
f7d835a
commit 34df748
Showing
9 changed files
with
70 additions
and
47 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
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,17 @@ | ||
/- | ||
Copyright (c) 2024 Junyan Xu. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Junyan Xu | ||
-/ | ||
import Mathlib.Algebra.Group.Submonoid.Defs | ||
import Mathlib.Algebra.GroupWithZero.Divisibility | ||
|
||
/-! | ||
# Submonoid of primal elements | ||
-/ | ||
|
||
/-- The submonoid of primal elements in a cancellative commutative monoid with zero. -/ | ||
def Submonoid.isPrimal (M₀ : Type*) [CancelCommMonoidWithZero M₀] : Submonoid M₀ where | ||
carrier := {a | IsPrimal a} | ||
mul_mem' := .mul | ||
one_mem' := isUnit_one.isPrimal |
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,43 @@ | ||
/- | ||
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, Kenny Lau, Johan Commelin, Mario Carneiro, Kevin Buzzard, | ||
Amelia Livingston, Yury Kudryashov | ||
-/ | ||
import Mathlib.Algebra.Group.Submonoid.Basic | ||
import Mathlib.Algebra.Ring.Defs | ||
import Mathlib.Tactic.MinImports | ||
|
||
/-! # Lemmas about additive closures of `Subsemigroup`. -/ | ||
|
||
open AddSubmonoid | ||
|
||
namespace MulMemClass | ||
variable {M R : Type*} [NonUnitalNonAssocSemiring R] [SetLike M R] [MulMemClass M R] {S : M} | ||
{a b : R} | ||
|
||
/-- The product of an element of the additive closure of a multiplicative subsemigroup `M` | ||
and an element of `M` is contained in the additive closure of `M`. -/ | ||
lemma mul_right_mem_add_closure (ha : a ∈ closure (S : Set R)) (hb : b ∈ S) : | ||
a * b ∈ closure (S : Set R) := by | ||
induction ha using closure_induction with | ||
| mem r hr => exact AddSubmonoid.mem_closure.mpr fun y hy => hy (mul_mem hr hb) | ||
| one => simp only [zero_mul, zero_mem _] | ||
| mul r s _ _ hr hs => simpa only [add_mul] using add_mem hr hs | ||
|
||
/-- The product of two elements of the additive closure of a submonoid `M` is an element of the | ||
additive closure of `M`. -/ | ||
lemma mul_mem_add_closure (ha : a ∈ closure (S : Set R)) | ||
(hb : b ∈ closure (S : Set R)) : a * b ∈ closure (S : Set R) := by | ||
induction hb using closure_induction with | ||
| mem r hr => exact MulMemClass.mul_right_mem_add_closure ha hr | ||
| one => simp only [mul_zero, zero_mem _] | ||
| mul r s _ _ hr hs => simpa only [mul_add] using add_mem hr hs | ||
|
||
/-- The product of an element of `S` and an element of the additive closure of a multiplicative | ||
submonoid `S` is contained in the additive closure of `S`. -/ | ||
lemma mul_left_mem_add_closure (ha : a ∈ S) (hb : b ∈ closure (S : Set R)) : | ||
a * b ∈ closure (S : Set R) := | ||
mul_mem_add_closure (AddSubmonoid.mem_closure.mpr fun _sT hT => hT ha) hb | ||
|
||
end MulMemClass |
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