Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
feat(group_theory/submonoid): add submonoid.powers_one (#17692)
Browse files Browse the repository at this point in the history
* Add `submonoid.powers_one` and `add_submonoid.multiples_zero`.
* Use `to_additive` to generate more proofs.
  • Loading branch information
urkud committed Nov 25, 2022
1 parent 4e634b9 commit 4b4e76c
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions src/group_theory/submonoid/membership.lean
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ by { ext, exact mem_closure_singleton.symm }
lemma powers_subset {n : M} {P : submonoid M} (h : n ∈ P) : powers n ≤ P :=
λ x hx, match x, hx with _, ⟨i, rfl⟩ := pow_mem h i end

@[simp] lemma powers_one : powers (1 : M) = ⊥ := bot_unique $ powers_subset (one_mem _)

/-- Exponentiation map from natural numbers to powers. -/
@[simps] def pow (n : M) (m : ℕ) : powers n :=
(powers_hom M n).mrange_restrict (multiplicative.of_add m)
Expand Down Expand Up @@ -472,21 +474,12 @@ def multiples (x : A) : add_submonoid A :=
add_submonoid.copy (multiples_hom A x).mrange (set.range (λ i, i • x : ℕ → A)) $
set.ext (λ n, exists_congr $ λ i, by simp; refl)

@[simp] lemma mem_multiples (x : A) : x ∈ multiples x := ⟨1, one_nsmul _⟩

lemma mem_multiples_iff (x z : A) : x ∈ multiples z ↔ ∃ n : ℕ, n • z = x := iff.rfl

lemma multiples_eq_closure (x : A) : multiples x = closure {x} :=
by { ext, exact mem_closure_singleton.symm }

lemma multiples_subset {x : A} {P : add_submonoid A} (h : x ∈ P) : multiples x ≤ P :=
λ x hx, match x, hx with _, ⟨i, rfl⟩ := nsmul_mem h i end

attribute [to_additive add_submonoid.multiples] submonoid.powers
attribute [to_additive add_submonoid.mem_multiples] submonoid.mem_powers
attribute [to_additive add_submonoid.mem_multiples_iff] submonoid.mem_powers_iff
attribute [to_additive add_submonoid.multiples_eq_closure] submonoid.powers_eq_closure
attribute [to_additive add_submonoid.multiples_subset] submonoid.powers_subset
attribute [to_additive multiples] submonoid.powers
attribute [to_additive mem_multiples] submonoid.mem_powers
attribute [to_additive mem_multiples_iff] submonoid.mem_powers_iff
attribute [to_additive multiples_eq_closure] submonoid.powers_eq_closure
attribute [to_additive multiples_subset] submonoid.powers_subset
attribute [to_additive multiples_zero] submonoid.powers_one

end add_submonoid

Expand Down

0 comments on commit 4b4e76c

Please sign in to comment.