|
| 1 | +# Arithmetic sequences of positive rational numbers |
| 2 | + |
| 3 | +```agda |
| 4 | +{-# OPTIONS --lossy-unification #-} |
| 5 | +
|
| 6 | +module elementary-number-theory.arithmetic-sequences-positive-rational-numbers where |
| 7 | +``` |
| 8 | + |
| 9 | +<details><summary>Imports</summary> |
| 10 | + |
| 11 | +```agda |
| 12 | +open import elementary-number-theory.addition-rational-numbers |
| 13 | +open import elementary-number-theory.additive-group-of-rational-numbers |
| 14 | +open import elementary-number-theory.archimedean-property-rational-numbers |
| 15 | +open import elementary-number-theory.inequality-rational-numbers |
| 16 | +open import elementary-number-theory.integers |
| 17 | +open import elementary-number-theory.multiplication-rational-numbers |
| 18 | +open import elementary-number-theory.natural-numbers |
| 19 | +open import elementary-number-theory.positive-rational-numbers |
| 20 | +open import elementary-number-theory.rational-numbers |
| 21 | +open import elementary-number-theory.strict-inequality-rational-numbers |
| 22 | +
|
| 23 | +open import foundation.action-on-identifications-functions |
| 24 | +open import foundation.binary-transport |
| 25 | +open import foundation.dependent-pair-types |
| 26 | +open import foundation.function-types |
| 27 | +open import foundation.functoriality-dependent-pair-types |
| 28 | +open import foundation.homotopies |
| 29 | +open import foundation.identity-types |
| 30 | +open import foundation.propositional-truncations |
| 31 | +open import foundation.sequences |
| 32 | +open import foundation.transport-along-identifications |
| 33 | +open import foundation.universe-levels |
| 34 | +
|
| 35 | +open import group-theory.arithmetic-sequences-semigroups |
| 36 | +open import group-theory.powers-of-elements-monoids |
| 37 | +
|
| 38 | +open import order-theory.increasing-sequences-posets |
| 39 | +open import order-theory.strictly-increasing-sequences-strictly-preordered-sets |
| 40 | +open import order-theory.strictly-preordered-sets |
| 41 | +``` |
| 42 | + |
| 43 | +</details> |
| 44 | + |
| 45 | +## Idea |
| 46 | + |
| 47 | +An |
| 48 | +{{#concept "arithmetic sequence" Disambiguation="of positive rational numbers" Agda=arithmetic-sequence-ℚ⁺ WD="arithmetic progression" WDID=Q170008}} |
| 49 | +of positive rational numbers is an |
| 50 | +[arithmetic sequence](group-theory.arithmetic-sequences-semigroups.md) in the |
| 51 | +additive [semigroup](group-theory.semigroups.md) of |
| 52 | +[positive rational numbers](elementary-number-theory.positive-rational-numbers.md). |
| 53 | + |
| 54 | +The values of an arithmetic sequence are determined by its initial value and its |
| 55 | +common difference; an arithmetic sequence of positive rational numbers is |
| 56 | +[strictly increasing](order-theory.strictly-increasing-sequences-strictly-preordered-sets.md). |
| 57 | + |
| 58 | +## Definitions |
| 59 | + |
| 60 | +### Arithmetic sequences of positive rational numbers |
| 61 | + |
| 62 | +```agda |
| 63 | +arithmetic-sequence-ℚ⁺ : UU lzero |
| 64 | +arithmetic-sequence-ℚ⁺ = arithmetic-sequence-Semigroup semigroup-add-ℚ⁺ |
| 65 | +
|
| 66 | +module _ |
| 67 | + (u : arithmetic-sequence-ℚ⁺) |
| 68 | + where |
| 69 | +
|
| 70 | + seq-arithmetic-sequence-ℚ⁺ : sequence ℚ⁺ |
| 71 | + seq-arithmetic-sequence-ℚ⁺ = |
| 72 | + seq-arithmetic-sequence-Semigroup semigroup-add-ℚ⁺ u |
| 73 | +
|
| 74 | + is-arithmetic-seq-arithmetic-sequence-ℚ⁺ : |
| 75 | + is-arithmetic-sequence-Semigroup |
| 76 | + semigroup-add-ℚ⁺ |
| 77 | + seq-arithmetic-sequence-ℚ⁺ |
| 78 | + is-arithmetic-seq-arithmetic-sequence-ℚ⁺ = |
| 79 | + is-arithmetic-seq-arithmetic-sequence-Semigroup semigroup-add-ℚ⁺ u |
| 80 | +
|
| 81 | + common-difference-arithmetic-sequence-ℚ⁺ : ℚ⁺ |
| 82 | + common-difference-arithmetic-sequence-ℚ⁺ = |
| 83 | + common-difference-arithmetic-sequence-Semigroup semigroup-add-ℚ⁺ u |
| 84 | +
|
| 85 | + rational-common-difference-arithmetic-sequence-ℚ⁺ : ℚ |
| 86 | + rational-common-difference-arithmetic-sequence-ℚ⁺ = |
| 87 | + rational-ℚ⁺ common-difference-arithmetic-sequence-ℚ⁺ |
| 88 | +
|
| 89 | + is-common-difference-arithmetic-sequence-ℚ⁺ : |
| 90 | + is-common-difference-sequence-Semigroup |
| 91 | + semigroup-add-ℚ⁺ |
| 92 | + seq-arithmetic-sequence-ℚ⁺ |
| 93 | + common-difference-arithmetic-sequence-ℚ⁺ |
| 94 | + is-common-difference-arithmetic-sequence-ℚ⁺ = |
| 95 | + is-common-difference-arithmetic-sequence-Semigroup semigroup-add-ℚ⁺ u |
| 96 | +
|
| 97 | + initial-term-arithmetic-sequence-ℚ⁺ : ℚ⁺ |
| 98 | + initial-term-arithmetic-sequence-ℚ⁺ = |
| 99 | + initial-term-arithmetic-sequence-Semigroup semigroup-add-ℚ⁺ u |
| 100 | +``` |
| 101 | + |
| 102 | +### The standard arithmetic sequence of positive rational numbers with initial term `a` and common difference `d` |
| 103 | + |
| 104 | +```agda |
| 105 | +module _ |
| 106 | + (a d : ℚ⁺) |
| 107 | + where |
| 108 | +
|
| 109 | + standard-arithmetic-sequence-ℚ⁺ : arithmetic-sequence-ℚ⁺ |
| 110 | + standard-arithmetic-sequence-ℚ⁺ = |
| 111 | + standard-arithmetic-sequence-Semigroup semigroup-add-ℚ⁺ a d |
| 112 | +
|
| 113 | + seq-standard-arithmetic-sequence-ℚ⁺ : sequence ℚ⁺ |
| 114 | + seq-standard-arithmetic-sequence-ℚ⁺ = |
| 115 | + seq-arithmetic-sequence-ℚ⁺ standard-arithmetic-sequence-ℚ⁺ |
| 116 | +``` |
| 117 | + |
| 118 | +## Properties |
| 119 | + |
| 120 | +### Two arithmetic sequences of positive rational numbers with the same initial term and common difference are homotopic |
| 121 | + |
| 122 | +```agda |
| 123 | +htpy-seq-arithmetic-sequence-ℚ⁺ : |
| 124 | + ( u v : arithmetic-sequence-ℚ⁺) → |
| 125 | + ( initial-term-arithmetic-sequence-ℚ⁺ u = |
| 126 | + initial-term-arithmetic-sequence-ℚ⁺ v) → |
| 127 | + ( common-difference-arithmetic-sequence-ℚ⁺ u = |
| 128 | + common-difference-arithmetic-sequence-ℚ⁺ v) → |
| 129 | + seq-arithmetic-sequence-ℚ⁺ u ~ seq-arithmetic-sequence-ℚ⁺ v |
| 130 | +htpy-seq-arithmetic-sequence-ℚ⁺ = |
| 131 | + htpy-seq-arithmetic-sequence-Semigroup semigroup-add-ℚ⁺ |
| 132 | +``` |
| 133 | + |
| 134 | +### The nth term of the arithmetic sequence with initial term `a` and common difference `d` is `a + n * d` |
| 135 | + |
| 136 | +```agda |
| 137 | +module _ |
| 138 | + (a d : ℚ⁺) |
| 139 | + where |
| 140 | +
|
| 141 | + abstract |
| 142 | + compute-standard-arithmetic-sequence-ℚ⁺ : |
| 143 | + ( n : ℕ) → |
| 144 | + ( rational-ℚ⁺ a +ℚ rational-ℕ n *ℚ rational-ℚ⁺ d) = |
| 145 | + ( rational-ℚ⁺ (seq-standard-arithmetic-sequence-ℚ⁺ a d n)) |
| 146 | + compute-standard-arithmetic-sequence-ℚ⁺ zero-ℕ = |
| 147 | + ( ap (add-ℚ (rational-ℚ⁺ a)) (left-zero-law-mul-ℚ (rational-ℚ⁺ d))) ∙ |
| 148 | + ( right-unit-law-add-ℚ (rational-ℚ⁺ a)) |
| 149 | + compute-standard-arithmetic-sequence-ℚ⁺ (succ-ℕ n) = |
| 150 | + ( ap |
| 151 | + ( add-ℚ (rational-ℚ⁺ a)) |
| 152 | + ( ( ap (mul-ℚ' (rational-ℚ⁺ d)) (inv (succ-rational-int-ℕ n))) ∙ |
| 153 | + ( mul-left-succ-ℚ (rational-ℕ n) (rational-ℚ⁺ d)) ∙ |
| 154 | + ( commutative-add-ℚ |
| 155 | + ( rational-ℚ⁺ d) |
| 156 | + ( rational-ℕ n *ℚ rational-ℚ⁺ d)))) ∙ |
| 157 | + ( inv |
| 158 | + ( associative-add-ℚ |
| 159 | + ( rational-ℚ⁺ a) |
| 160 | + ( rational-ℕ n *ℚ rational-ℚ⁺ d) |
| 161 | + ( rational-ℚ⁺ d))) ∙ |
| 162 | + ( ap |
| 163 | + ( add-ℚ' (rational-ℚ⁺ d)) |
| 164 | + ( compute-standard-arithmetic-sequence-ℚ⁺ n)) |
| 165 | +
|
| 166 | +module _ |
| 167 | + (u : arithmetic-sequence-ℚ⁺) |
| 168 | + where |
| 169 | +
|
| 170 | + abstract |
| 171 | + compute-arithmetic-sequence-ℚ⁺ : |
| 172 | + ( n : ℕ) → |
| 173 | + Id |
| 174 | + ( add-ℚ |
| 175 | + ( rational-ℚ⁺ (initial-term-arithmetic-sequence-ℚ⁺ u)) |
| 176 | + ( mul-ℚ |
| 177 | + ( rational-ℕ n) |
| 178 | + ( rational-ℚ⁺ (common-difference-arithmetic-sequence-ℚ⁺ u)))) |
| 179 | + ( rational-ℚ⁺ (seq-arithmetic-sequence-ℚ⁺ u n)) |
| 180 | + compute-arithmetic-sequence-ℚ⁺ n = |
| 181 | + ( compute-standard-arithmetic-sequence-ℚ⁺ |
| 182 | + ( initial-term-arithmetic-sequence-ℚ⁺ u) |
| 183 | + ( common-difference-arithmetic-sequence-ℚ⁺ u) |
| 184 | + ( n)) ∙ |
| 185 | + ( ap |
| 186 | + ( rational-ℚ⁺) |
| 187 | + ( htpy-seq-standard-arithmetic-sequence-Semigroup |
| 188 | + semigroup-add-ℚ⁺ |
| 189 | + u |
| 190 | + n)) |
| 191 | +``` |
| 192 | + |
| 193 | +### An arithmetic sequence of positive rational numbers is strictly increasing |
| 194 | + |
| 195 | +```agda |
| 196 | +module _ |
| 197 | + (u : arithmetic-sequence-ℚ⁺) |
| 198 | + where |
| 199 | +
|
| 200 | + abstract |
| 201 | + le-succ-seq-arithmetic-sequence-ℚ⁺ : |
| 202 | + (n : ℕ) → |
| 203 | + le-ℚ⁺ |
| 204 | + ( seq-arithmetic-sequence-ℚ⁺ u n) |
| 205 | + ( seq-arithmetic-sequence-ℚ⁺ u (succ-ℕ n)) |
| 206 | + le-succ-seq-arithmetic-sequence-ℚ⁺ n = |
| 207 | + inv-tr |
| 208 | + ( le-ℚ⁺ (seq-arithmetic-sequence-ℚ⁺ u n)) |
| 209 | + ( is-common-difference-arithmetic-sequence-ℚ⁺ u n) |
| 210 | + ( le-right-add-rational-ℚ⁺ |
| 211 | + ( rational-ℚ⁺ (seq-arithmetic-sequence-ℚ⁺ u n)) |
| 212 | + ( common-difference-arithmetic-sequence-ℚ⁺ u)) |
| 213 | +
|
| 214 | + is-strictly-increasing-seq-arithmetic-sequence-ℚ⁺ : |
| 215 | + is-strictly-increasing-sequence-Strictly-Preordered-Set |
| 216 | + ( strictly-preordered-set-ℚ⁺) |
| 217 | + ( seq-arithmetic-sequence-ℚ⁺ u) |
| 218 | + is-strictly-increasing-seq-arithmetic-sequence-ℚ⁺ = |
| 219 | + is-strictly-increasing-le-succ-sequence-Strictly-Preordered-Set |
| 220 | + ( strictly-preordered-set-ℚ⁺) |
| 221 | + ( seq-arithmetic-sequence-ℚ⁺ u) |
| 222 | + ( le-succ-seq-arithmetic-sequence-ℚ⁺) |
| 223 | +``` |
| 224 | + |
| 225 | +### An arithmetic sequence of positive rational numbers is increasing |
| 226 | + |
| 227 | +```agda |
| 228 | +module _ |
| 229 | + (u : arithmetic-sequence-ℚ⁺) |
| 230 | + where |
| 231 | +
|
| 232 | + abstract |
| 233 | + leq-succ-seq-arithmetic-sequence-ℚ⁺ : |
| 234 | + (n : ℕ) → |
| 235 | + leq-ℚ⁺ |
| 236 | + ( seq-arithmetic-sequence-ℚ⁺ u n) |
| 237 | + ( seq-arithmetic-sequence-ℚ⁺ u (succ-ℕ n)) |
| 238 | + leq-succ-seq-arithmetic-sequence-ℚ⁺ n = |
| 239 | + leq-le-ℚ⁺ |
| 240 | + { seq-arithmetic-sequence-ℚ⁺ u n} |
| 241 | + { seq-arithmetic-sequence-ℚ⁺ u (succ-ℕ n)} |
| 242 | + ( le-succ-seq-arithmetic-sequence-ℚ⁺ u n) |
| 243 | +
|
| 244 | + is-increasing-seq-arithmetic-sequence-ℚ⁺ : |
| 245 | + is-increasing-sequence-Poset |
| 246 | + ( poset-ℚ⁺) |
| 247 | + ( seq-arithmetic-sequence-ℚ⁺ u) |
| 248 | + is-increasing-seq-arithmetic-sequence-ℚ⁺ = |
| 249 | + is-increasing-leq-succ-sequence-Poset |
| 250 | + ( poset-ℚ⁺) |
| 251 | + ( seq-arithmetic-sequence-ℚ⁺ u) |
| 252 | + ( leq-succ-seq-arithmetic-sequence-ℚ⁺) |
| 253 | +``` |
| 254 | + |
| 255 | +### The terms of an arithmetic sequence of positive rational numbers are greater than or equal to its initial term |
| 256 | + |
| 257 | +```agda |
| 258 | +module _ |
| 259 | + (u : arithmetic-sequence-ℚ⁺) |
| 260 | + where |
| 261 | +
|
| 262 | + abstract |
| 263 | + leq-initial-arithmetic-sequence-ℚ⁺ : |
| 264 | + (n : ℕ) → |
| 265 | + leq-ℚ⁺ |
| 266 | + ( initial-term-arithmetic-sequence-ℚ⁺ u) |
| 267 | + ( seq-arithmetic-sequence-ℚ⁺ u n) |
| 268 | + leq-initial-arithmetic-sequence-ℚ⁺ zero-ℕ = |
| 269 | + refl-leq-ℚ (rational-ℚ⁺ (initial-term-arithmetic-sequence-ℚ⁺ u)) |
| 270 | + leq-initial-arithmetic-sequence-ℚ⁺ (succ-ℕ n) = |
| 271 | + leq-le-ℚ⁺ |
| 272 | + { initial-term-arithmetic-sequence-ℚ⁺ u} |
| 273 | + { seq-arithmetic-sequence-ℚ⁺ u (succ-ℕ n)} |
| 274 | + ( concatenate-leq-le-ℚ |
| 275 | + ( rational-ℚ⁺ (initial-term-arithmetic-sequence-ℚ⁺ u)) |
| 276 | + ( rational-ℚ⁺ (seq-arithmetic-sequence-ℚ⁺ u n)) |
| 277 | + ( rational-ℚ⁺ (seq-arithmetic-sequence-ℚ⁺ u (succ-ℕ n))) |
| 278 | + ( leq-initial-arithmetic-sequence-ℚ⁺ n) |
| 279 | + ( le-succ-seq-arithmetic-sequence-ℚ⁺ u n)) |
| 280 | +``` |
| 281 | + |
| 282 | +## See also |
| 283 | + |
| 284 | +- [Geometric sequences in ℚ⁺](elementary-number-theory.geometric-sequences-positive-rational-numbers.md): |
| 285 | + arithmetic sequences in the **multiplicative** semigroup of ℚ⁺; |
| 286 | +- [Bernoulli's inequality in ℚ⁺](elementary-number-theory.bernoullis-inequality-positive-rational-numbers.md): |
| 287 | + comparison between arithmetic and geometric sequences in ℚ⁺. |
| 288 | + |
| 289 | +## External links |
| 290 | + |
| 291 | +- [Arithmetic progressions](https://en.wikipedia.org/wiki/Arithmetic_progression) |
| 292 | + at Wikipedia |
0 commit comments