@@ -4,12 +4,15 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot, Yury Kudryashov, Rémy Degenne
5
5
-/
6
6
import data.set.intervals.basic
7
+ import data.set.pairwise
7
8
import algebra.order.group.abs
9
+ import algebra.group_power.lemmas
8
10
9
- /-! ### Lemmas about arithmetic operations and intervals.
11
+ /-! ### Lemmas about arithmetic operations and intervals.
10
12
11
13
> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
12
- > Any changes to this file require a corresponding PR to mathlib4.-/
14
+ > Any changes to this file require a corresponding PR to mathlib4.
15
+ -/
13
16
14
17
variables {α : Type *}
15
18
98
101
99
102
end linear_ordered_add_comm_group
100
103
104
+ /-! ### Lemmas about disjointness of translates of intervals -/
105
+ section pairwise_disjoint
106
+
107
+ section ordered_comm_group
108
+
109
+ variables [ordered_comm_group α] (a b : α)
110
+
111
+ @[to_additive]
112
+ lemma pairwise_disjoint_Ioc_mul_zpow :
113
+ pairwise (disjoint on λ n : ℤ, Ioc (a * b ^ n) (a * b ^ (n + 1 ))) :=
114
+ begin
115
+ simp_rw [function.on_fun, set.disjoint_iff],
116
+ intros m n hmn x hx,
117
+ apply hmn,
118
+ have hb : 1 < b,
119
+ { have : a * b ^ m < a * b ^ (m + 1 ), from hx.1 .1 .trans_le hx.1 .2 ,
120
+ rwa [mul_lt_mul_iff_left, ←mul_one (b ^ m), zpow_add_one, mul_lt_mul_iff_left] at this },
121
+ have i1 := hx.1 .1 .trans_le hx.2 .2 ,
122
+ have i2 := hx.2 .1 .trans_le hx.1 .2 ,
123
+ rw [mul_lt_mul_iff_left, zpow_lt_zpow_iff hb, int.lt_add_one_iff] at i1 i2,
124
+ exact le_antisymm i1 i2
125
+ end
126
+
127
+ @[to_additive]
128
+ lemma pairwise_disjoint_Ico_mul_zpow :
129
+ pairwise (disjoint on λ n : ℤ, Ico (a * b ^ n) (a * b ^ (n + 1 ))) :=
130
+ begin
131
+ simp_rw [function.on_fun, set.disjoint_iff],
132
+ intros m n hmn x hx,
133
+ apply hmn,
134
+ have hb : 1 < b,
135
+ { have : a * b ^ m < a * b ^ (m + 1 ), from hx.1 .1 .trans_lt hx.1 .2 ,
136
+ rwa [mul_lt_mul_iff_left, ←mul_one (b ^ m), zpow_add_one, mul_lt_mul_iff_left] at this },
137
+ have i1 := hx.1 .1 .trans_lt hx.2 .2 ,
138
+ have i2 := hx.2 .1 .trans_lt hx.1 .2 ,
139
+ rw [mul_lt_mul_iff_left, zpow_lt_zpow_iff hb, int.lt_add_one_iff] at i1 i2,
140
+ exact le_antisymm i1 i2,
141
+ end
142
+
143
+ @[to_additive]
144
+ lemma pairwise_disjoint_Ioo_mul_zpow :
145
+ pairwise (disjoint on λ n : ℤ, Ioo (a * b ^ n) (a * b ^ (n + 1 ))) :=
146
+ λ m n hmn, (pairwise_disjoint_Ioc_mul_zpow a b hmn).mono Ioo_subset_Ioc_self Ioo_subset_Ioc_self
147
+
148
+ @[to_additive]
149
+ lemma pairwise_disjoint_Ioc_zpow :
150
+ pairwise (disjoint on λ n : ℤ, Ioc (b ^ n) (b ^ (n + 1 ))) :=
151
+ by simpa only [one_mul] using pairwise_disjoint_Ioc_mul_zpow 1 b
152
+
153
+ @[to_additive]
154
+ lemma pairwise_disjoint_Ico_zpow :
155
+ pairwise (disjoint on λ n : ℤ, Ico (b ^ n) (b ^ (n + 1 ))) :=
156
+ by simpa only [one_mul] using pairwise_disjoint_Ico_mul_zpow 1 b
157
+
158
+ @[to_additive]
159
+ lemma pairwise_disjoint_Ioo_zpow :
160
+ pairwise (disjoint on λ n : ℤ, Ioo (b ^ n) (b ^ (n + 1 ))) :=
161
+ by simpa only [one_mul] using pairwise_disjoint_Ioo_mul_zpow 1 b
162
+
163
+ end ordered_comm_group
164
+
165
+ section ordered_ring
166
+
167
+ variables [ordered_ring α] (a : α)
168
+
169
+ lemma pairwise_disjoint_Ioc_add_int_cast :
170
+ pairwise (disjoint on λ n : ℤ, Ioc (a + n) (a + n + 1 )) :=
171
+ by simpa only [zsmul_one, int.cast_add, int.cast_one, ←add_assoc]
172
+ using pairwise_disjoint_Ioc_add_zsmul a (1 : α)
173
+
174
+ lemma pairwise_disjoint_Ico_add_int_cast :
175
+ pairwise (disjoint on λ n : ℤ, Ico (a + n) (a + n + 1 )) :=
176
+ by simpa only [zsmul_one, int.cast_add, int.cast_one, ←add_assoc]
177
+ using pairwise_disjoint_Ico_add_zsmul a (1 : α)
178
+
179
+ lemma pairwise_disjoint_Ioo_add_int_cast :
180
+ pairwise (disjoint on λ n : ℤ, Ioo (a + n) (a + n + 1 )) :=
181
+ by simpa only [zsmul_one, int.cast_add, int.cast_one, ←add_assoc]
182
+ using pairwise_disjoint_Ioo_add_zsmul a (1 : α)
183
+
184
+ variables (α)
185
+
186
+ lemma pairwise_disjoint_Ico_int_cast : pairwise (disjoint on λ n : ℤ, Ico (n : α) (n + 1 )) :=
187
+ by simpa only [zero_add] using pairwise_disjoint_Ico_add_int_cast (0 : α)
188
+
189
+ lemma pairwise_disjoint_Ioo_int_cast : pairwise (disjoint on λ n : ℤ, Ioo (n : α) (n + 1 )) :=
190
+ by simpa only [zero_add] using pairwise_disjoint_Ioo_add_int_cast (0 : α)
191
+
192
+ lemma pairwise_disjoint_Ioc_int_cast : pairwise (disjoint on λ n : ℤ, Ioc (n : α) (n + 1 )) :=
193
+ by simpa only [zero_add] using pairwise_disjoint_Ioc_add_int_cast (0 : α)
194
+
195
+ end ordered_ring
196
+
197
+ end pairwise_disjoint
198
+
101
199
end set
0 commit comments