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

Commit 685289c

Browse files
committed
feat(algebra/pointwise): pow_mem_pow (#7822)
If `a ∈ s` then `a ^ n ∈ s ^ n`. Co-authored-by: tb65536 <tb65536@users.noreply.github.com>
1 parent 29d0c63 commit 685289c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/algebra/pointwise.lean

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ instance [monoid α] : monoid (set α) :=
141141
{ ..set.semigroup,
142142
..set.mul_one_class }
143143

144+
lemma pow_mem_pow [monoid α] (ha : a ∈ s) (n : ℕ) :
145+
a ^ n ∈ s ^ n :=
146+
begin
147+
induction n with n ih,
148+
{ rw pow_zero,
149+
exact set.mem_singleton 1 },
150+
{ rw pow_succ,
151+
exact set.mul_mem_mul ha ih },
152+
end
153+
144154
@[to_additive]
145155
protected lemma mul_comm [comm_semigroup α] : s * t = t * s :=
146156
by simp only [← image2_mul, image2_swap _ s, mul_comm]
@@ -163,6 +173,16 @@ lemma mul_empty [has_mul α] : s * ∅ = ∅ := image2_empty_right
163173
lemma mul_subset_mul [has_mul α] (h₁ : s₁ ⊆ t₁) (h₂ : s₂ ⊆ t₂) : s₁ * s₂ ⊆ t₁ * t₂ :=
164174
image2_subset h₁ h₂
165175

176+
lemma pow_subset_pow [monoid α] (hst : s ⊆ t) (n : ℕ) :
177+
s ^ n ⊆ t ^ n :=
178+
begin
179+
induction n with n ih,
180+
{ rw pow_zero,
181+
exact subset.rfl },
182+
{ rw [pow_succ, pow_succ],
183+
exact mul_subset_mul hst ih },
184+
end
185+
166186
@[to_additive]
167187
lemma union_mul [has_mul α] : (s ∪ t) * u = (s * u) ∪ (t * u) := image2_union_left
168188

0 commit comments

Comments
 (0)