fact stringlengths 6 14.3k | statement stringlengths 1 2.88k | proof stringlengths 0 13.9k | type stringclasses 12
values | symbolic_name stringlengths 0 131 | library stringclasses 417
values | filename stringlengths 17 80 | imports listlengths 0 16 | deps listlengths 0 64 | docstring stringlengths 8 10.2k ⌀ | line_start int64 6 4.24k | line_end int64 7 4.25k | has_proof bool 2
classes | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
invertible_one [monoid α] : invertible (1 : α) :=
⟨1, mul_one _, one_mul _⟩ | invertible_one [monoid α] : invertible (1 : α) | ⟨1, mul_one _, one_mul _⟩ | def | invertible_one | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"monoid",
"mul_one",
"one_mul"
] | `1` is the inverse of itself | 165 | 166 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_one [monoid α] [invertible (1 : α)] : ⅟(1 : α) = 1 :=
inv_of_eq_right_inv (mul_one _) | inv_of_one [monoid α] [invertible (1 : α)] : ⅟(1 : α) = 1 | inv_of_eq_right_inv (mul_one _) | lemma | inv_of_one | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_eq_right_inv",
"invertible",
"monoid",
"mul_one"
] | null | 168 | 169 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_neg [has_mul α] [has_one α] [has_distrib_neg α] (a : α) [invertible a] :
invertible (-a) := ⟨-⅟a, by simp, by simp ⟩ | invertible_neg [has_mul α] [has_one α] [has_distrib_neg α] (a : α) [invertible a] :
invertible (-a) | ⟨-⅟a, by simp, by simp ⟩ | def | invertible_neg | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"has_distrib_neg",
"invertible"
] | `-⅟a` is the inverse of `-a` | 172 | 173 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_neg [monoid α] [has_distrib_neg α] (a : α) [invertible a] [invertible (-a)] :
⅟(-a) = -⅟a :=
inv_of_eq_right_inv (by simp) | inv_of_neg [monoid α] [has_distrib_neg α] (a : α) [invertible a] [invertible (-a)] :
⅟(-a) = -⅟a | inv_of_eq_right_inv (by simp) | lemma | inv_of_neg | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"has_distrib_neg",
"inv_of_eq_right_inv",
"invertible",
"monoid"
] | null | 175 | 177 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
one_sub_inv_of_two [ring α] [invertible (2:α)] : 1 - (⅟2:α) = ⅟2 :=
(is_unit_of_invertible (2:α)).mul_right_inj.1 $
by rw [mul_sub, mul_inv_of_self, mul_one, bit0, add_sub_cancel] | one_sub_inv_of_two [ring α] [invertible (2:α)] : 1 - (⅟2:α) = ⅟2 | (is_unit_of_invertible (2:α)).mul_right_inj.1 $
by rw [mul_sub, mul_inv_of_self, mul_one, bit0, add_sub_cancel] | lemma | one_sub_inv_of_two | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"is_unit_of_invertible",
"mul_inv_of_self",
"mul_one",
"ring"
] | null | 179 | 181 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_two_add_inv_of_two [non_assoc_semiring α] [invertible (2 : α)] :
(⅟2 : α) + (⅟2 : α) = 1 :=
by rw [←two_mul, mul_inv_of_self] | inv_of_two_add_inv_of_two [non_assoc_semiring α] [invertible (2 : α)] :
(⅟2 : α) + (⅟2 : α) = 1 | by rw [←two_mul, mul_inv_of_self] | lemma | inv_of_two_add_inv_of_two | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"mul_inv_of_self",
"non_assoc_semiring"
] | null | 183 | 185 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_inv_of [has_one α] [has_mul α] {a : α} [invertible a] : invertible (⅟a) :=
⟨ a, mul_inv_of_self a, inv_of_mul_self a ⟩ | invertible_inv_of [has_one α] [has_mul α] {a : α} [invertible a] : invertible (⅟a) | ⟨ a, mul_inv_of_self a, inv_of_mul_self a ⟩ | instance | invertible_inv_of | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"invertible",
"mul_inv_of_self"
] | `a` is the inverse of `⅟a`. | 188 | 189 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_inv_of [monoid α] (a : α) [invertible a] [invertible (⅟a)] : ⅟(⅟a) = a :=
inv_of_eq_right_inv (inv_of_mul_self _) | inv_of_inv_of [monoid α] (a : α) [invertible a] [invertible (⅟a)] : ⅟(⅟a) = a | inv_of_eq_right_inv (inv_of_mul_self _) | lemma | inv_of_inv_of | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_eq_right_inv",
"inv_of_mul_self",
"invertible",
"monoid"
] | null | 191 | 192 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_inj [monoid α] {a b : α} [invertible a] [invertible b] :
⅟ a = ⅟ b ↔ a = b :=
⟨invertible_unique _ _, invertible_unique _ _⟩ | inv_of_inj [monoid α] {a b : α} [invertible a] [invertible b] :
⅟ a = ⅟ b ↔ a = b | ⟨invertible_unique _ _, invertible_unique _ _⟩ | lemma | inv_of_inj | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"invertible_unique",
"monoid"
] | null | 194 | 196 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_mul [monoid α] (a b : α) [invertible a] [invertible b] : invertible (a * b) :=
⟨ ⅟b * ⅟a, by simp [←mul_assoc], by simp [←mul_assoc] ⟩ | invertible_mul [monoid α] (a b : α) [invertible a] [invertible b] : invertible (a * b) | ⟨ ⅟b * ⅟a, by simp [←mul_assoc], by simp [←mul_assoc] ⟩ | def | invertible_mul | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"monoid"
] | `⅟b * ⅟a` is the inverse of `a * b` | 199 | 200 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_mul [monoid α] (a b : α) [invertible a] [invertible b] [invertible (a * b)] :
⅟(a * b) = ⅟b * ⅟a :=
inv_of_eq_right_inv (by simp [←mul_assoc]) | inv_of_mul [monoid α] (a b : α) [invertible a] [invertible b] [invertible (a * b)] :
⅟(a * b) = ⅟b * ⅟a | inv_of_eq_right_inv (by simp [←mul_assoc]) | lemma | inv_of_mul | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_eq_right_inv",
"invertible",
"monoid"
] | null | 202 | 204 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible.mul [monoid α] {a b : α} (ha : invertible a) (hb : invertible b) :
invertible (a * b) :=
invertible_mul _ _ | invertible.mul [monoid α] {a b : α} (ha : invertible a) (hb : invertible b) :
invertible (a * b) | invertible_mul _ _ | def | invertible.mul | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"invertible_mul",
"monoid"
] | A copy of `invertible_mul` for dot notation. | 207 | 209 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
commute.inv_of_right [monoid α] {a b : α} [invertible b] (h : commute a b) :
commute a (⅟b) :=
calc a * (⅟b) = (⅟b) * (b * a * (⅟b)) : by simp [mul_assoc]
... = (⅟b) * (a * b * ((⅟b))) : by rw h.eq
... = (⅟b) * a : by simp [mul_assoc] | commute.inv_of_right [monoid α] {a b : α} [invertible b] (h : commute a b) :
commute a (⅟b) | calc a * (⅟b) = (⅟b) * (b * a * (⅟b)) : by simp [mul_assoc]
... = (⅟b) * (a * b * ((⅟b))) : by rw h.eq
... = (⅟b) * a : by simp [mul_assoc] | theorem | commute.inv_of_right | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"commute",
"invertible",
"monoid",
"mul_assoc"
] | null | 211 | 215 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
commute.inv_of_left [monoid α] {a b : α} [invertible b] (h : commute b a) :
commute (⅟b) a :=
calc (⅟b) * a = (⅟b) * (a * b * (⅟b)) : by simp [mul_assoc]
... = (⅟b) * (b * a * (⅟b)) : by rw h.eq
... = a * (⅟b) : by simp [mul_assoc] | commute.inv_of_left [monoid α] {a b : α} [invertible b] (h : commute b a) :
commute (⅟b) a | calc (⅟b) * a = (⅟b) * (a * b * (⅟b)) : by simp [mul_assoc]
... = (⅟b) * (b * a * (⅟b)) : by rw h.eq
... = a * (⅟b) : by simp [mul_assoc] | theorem | commute.inv_of_left | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"commute",
"invertible",
"monoid",
"mul_assoc"
] | null | 217 | 221 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
commute_inv_of {M : Type*} [has_one M] [has_mul M] (m : M) [invertible m] :
commute m (⅟m) :=
calc m * ⅟m = 1 : mul_inv_of_self m
... = ⅟ m * m : (inv_of_mul_self m).symm | commute_inv_of {M : Type*} [has_one M] [has_mul M] (m : M) [invertible m] :
commute m (⅟m) | calc m * ⅟m = 1 : mul_inv_of_self m
... = ⅟ m * m : (inv_of_mul_self m).symm | lemma | commute_inv_of | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"commute",
"inv_of_mul_self",
"invertible",
"mul_inv_of_self"
] | null | 223 | 226 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nonzero_of_invertible [mul_zero_one_class α] (a : α) [nontrivial α] [invertible a] : a ≠ 0 :=
λ ha, zero_ne_one $ calc 0 = ⅟a * a : by simp [ha]
... = 1 : inv_of_mul_self a | nonzero_of_invertible [mul_zero_one_class α] (a : α) [nontrivial α] [invertible a] : a ≠ 0 | λ ha, zero_ne_one $ calc 0 = ⅟a * a : by simp [ha]
... = 1 : inv_of_mul_self a | lemma | nonzero_of_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"invertible",
"mul_zero_one_class",
"nontrivial",
"zero_ne_one"
] | null | 228 | 230 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible.ne_zero [mul_zero_one_class α] [nontrivial α] (a : α)
[invertible a] : ne_zero a := ⟨nonzero_of_invertible a⟩ | invertible.ne_zero [mul_zero_one_class α] [nontrivial α] (a : α)
[invertible a] : ne_zero a | ⟨nonzero_of_invertible a⟩ | instance | invertible.ne_zero | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"mul_zero_one_class",
"ne_zero",
"nontrivial"
] | null | 232 | 233 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_of_invertible_mul (a b : α) [invertible a] [invertible (a * b)] :
invertible b :=
{ inv_of := ⅟(a * b) * a,
inv_of_mul_self := by rw [mul_assoc, inv_of_mul_self],
mul_inv_of_self := by rw [←(is_unit_of_invertible a).mul_right_inj, ←mul_assoc, ←mul_assoc,
mul_inv_of_self, mul_one, one_mul] } | invertible_of_invertible_mul (a b : α) [invertible a] [invertible (a * b)] :
invertible b | { inv_of := ⅟(a * b) * a,
inv_of_mul_self := by rw [mul_assoc, inv_of_mul_self],
mul_inv_of_self := by rw [←(is_unit_of_invertible a).mul_right_inj, ←mul_assoc, ←mul_assoc,
mul_inv_of_self, mul_one, one_mul] } | def | invertible_of_invertible_mul | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"invertible",
"is_unit_of_invertible",
"mul_assoc",
"mul_inv_of_self",
"mul_one",
"mul_right_inj",
"one_mul"
] | This is the `invertible` version of `units.is_unit_units_mul` | 239 | 244 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_of_mul_invertible (a b : α) [invertible (a * b)] [invertible b] :
invertible a :=
{ inv_of := b * ⅟(a * b),
inv_of_mul_self := by rw [←(is_unit_of_invertible b).mul_left_inj, mul_assoc, mul_assoc,
inv_of_mul_self, mul_one, one_mul],
mul_inv_of_self := by rw [←mul_assoc, mul_inv_of_self] } | invertible_of_mul_invertible (a b : α) [invertible (a * b)] [invertible b] :
invertible a | { inv_of := b * ⅟(a * b),
inv_of_mul_self := by rw [←(is_unit_of_invertible b).mul_left_inj, mul_assoc, mul_assoc,
inv_of_mul_self, mul_one, one_mul],
mul_inv_of_self := by rw [←mul_assoc, mul_inv_of_self] } | def | invertible_of_mul_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"invertible",
"is_unit_of_invertible",
"mul_assoc",
"mul_inv_of_self",
"mul_left_inj",
"mul_one",
"one_mul"
] | This is the `invertible` version of `units.is_unit_mul_units` | 247 | 252 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible.mul_left {a : α} (ha : invertible a) (b : α) :
invertible b ≃ invertible (a * b) :=
{ to_fun := λ hb, by exactI invertible_mul a b,
inv_fun := λ hab, by exactI invertible_of_invertible_mul a _,
left_inv := λ hb, subsingleton.elim _ _,
right_inv := λ hab, subsingleton.elim _ _, } | invertible.mul_left {a : α} (ha : invertible a) (b : α) :
invertible b ≃ invertible (a * b) | { to_fun := λ hb, by exactI invertible_mul a b,
inv_fun := λ hab, by exactI invertible_of_invertible_mul a _,
left_inv := λ hb, subsingleton.elim _ _,
right_inv := λ hab, subsingleton.elim _ _, } | def | invertible.mul_left | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_fun",
"invertible",
"invertible_mul",
"invertible_of_invertible_mul"
] | `invertible_of_invertible_mul` and `invertible_mul` as an equivalence. | 255 | 260 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible.mul_right (a : α) {b : α} (ha : invertible b) :
invertible a ≃ invertible (a * b) :=
{ to_fun := λ hb, by exactI invertible_mul a b,
inv_fun := λ hab, by exactI invertible_of_mul_invertible _ b,
left_inv := λ hb, subsingleton.elim _ _,
right_inv := λ hab, subsingleton.elim _ _, } | invertible.mul_right (a : α) {b : α} (ha : invertible b) :
invertible a ≃ invertible (a * b) | { to_fun := λ hb, by exactI invertible_mul a b,
inv_fun := λ hab, by exactI invertible_of_mul_invertible _ b,
left_inv := λ hb, subsingleton.elim _ _,
right_inv := λ hab, subsingleton.elim _ _, } | def | invertible.mul_right | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_fun",
"invertible",
"invertible_mul",
"invertible_of_mul_invertible"
] | `invertible_of_mul_invertible` and `invertible_mul` as an equivalence. | 263 | 268 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
ring.inverse_invertible (x : α) [invertible x] : ring.inverse x = ⅟x :=
ring.inverse_unit (unit_of_invertible _) | ring.inverse_invertible (x : α) [invertible x] : ring.inverse x = ⅟x | ring.inverse_unit (unit_of_invertible _) | lemma | ring.inverse_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"ring.inverse",
"ring.inverse_unit",
"unit_of_invertible"
] | A variant of `ring.inverse_unit`. | 276 | 277 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_of_nonzero {a : α} (h : a ≠ 0) : invertible a :=
⟨ a⁻¹, inv_mul_cancel h, mul_inv_cancel h ⟩ | invertible_of_nonzero {a : α} (h : a ≠ 0) : invertible a | ⟨ a⁻¹, inv_mul_cancel h, mul_inv_cancel h ⟩ | def | invertible_of_nonzero | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_mul_cancel",
"invertible",
"mul_inv_cancel"
] | `a⁻¹` is an inverse of `a` if `a ≠ 0` | 286 | 287 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_eq_inv (a : α) [invertible a] : ⅟a = a⁻¹ :=
inv_of_eq_right_inv (mul_inv_cancel (nonzero_of_invertible a)) | inv_of_eq_inv (a : α) [invertible a] : ⅟a = a⁻¹ | inv_of_eq_right_inv (mul_inv_cancel (nonzero_of_invertible a)) | lemma | inv_of_eq_inv | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_eq_right_inv",
"invertible",
"mul_inv_cancel",
"nonzero_of_invertible"
] | null | 289 | 290 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_mul_cancel_of_invertible (a : α) [invertible a] : a⁻¹ * a = 1 :=
inv_mul_cancel (nonzero_of_invertible a) | inv_mul_cancel_of_invertible (a : α) [invertible a] : a⁻¹ * a = 1 | inv_mul_cancel (nonzero_of_invertible a) | lemma | inv_mul_cancel_of_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_mul_cancel",
"invertible",
"nonzero_of_invertible"
] | null | 292 | 293 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_inv_cancel_of_invertible (a : α) [invertible a] : a * a⁻¹ = 1 :=
mul_inv_cancel (nonzero_of_invertible a) | mul_inv_cancel_of_invertible (a : α) [invertible a] : a * a⁻¹ = 1 | mul_inv_cancel (nonzero_of_invertible a) | lemma | mul_inv_cancel_of_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"mul_inv_cancel",
"nonzero_of_invertible"
] | null | 295 | 296 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
div_mul_cancel_of_invertible (a b : α) [invertible b] : a / b * b = a :=
div_mul_cancel a (nonzero_of_invertible b) | div_mul_cancel_of_invertible (a b : α) [invertible b] : a / b * b = a | div_mul_cancel a (nonzero_of_invertible b) | lemma | div_mul_cancel_of_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"div_mul_cancel",
"invertible",
"nonzero_of_invertible"
] | null | 298 | 299 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_div_cancel_of_invertible (a b : α) [invertible b] : a * b / b = a :=
mul_div_cancel a (nonzero_of_invertible b) | mul_div_cancel_of_invertible (a b : α) [invertible b] : a * b / b = a | mul_div_cancel a (nonzero_of_invertible b) | lemma | mul_div_cancel_of_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"mul_div_cancel",
"nonzero_of_invertible"
] | null | 301 | 302 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
div_self_of_invertible (a : α) [invertible a] : a / a = 1 :=
div_self (nonzero_of_invertible a) | div_self_of_invertible (a : α) [invertible a] : a / a = 1 | div_self (nonzero_of_invertible a) | lemma | div_self_of_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"div_self",
"invertible",
"nonzero_of_invertible"
] | null | 304 | 305 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_div (a b : α) [invertible a] [invertible b] : invertible (a / b) :=
⟨b / a, by simp [←mul_div_assoc], by simp [←mul_div_assoc]⟩ | invertible_div (a b : α) [invertible a] [invertible b] : invertible (a / b) | ⟨b / a, by simp [←mul_div_assoc], by simp [←mul_div_assoc]⟩ | def | invertible_div | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible"
] | `b / a` is the inverse of `a / b` | 308 | 309 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_div (a b : α) [invertible a] [invertible b] [invertible (a / b)] :
⅟(a / b) = b / a :=
inv_of_eq_right_inv (by simp [←mul_div_assoc]) | inv_of_div (a b : α) [invertible a] [invertible b] [invertible (a / b)] :
⅟(a / b) = b / a | inv_of_eq_right_inv (by simp [←mul_div_assoc]) | lemma | inv_of_div | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_eq_right_inv",
"invertible"
] | null | 311 | 313 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_inv {a : α} [invertible a] : invertible (a⁻¹) :=
⟨ a, by simp, by simp ⟩ | invertible_inv {a : α} [invertible a] : invertible (a⁻¹) | ⟨ a, by simp, by simp ⟩ | def | invertible_inv | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible"
] | `a` is the inverse of `a⁻¹` | 316 | 317 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible.map {R : Type*} {S : Type*} {F : Type*} [mul_one_class R] [mul_one_class S]
[monoid_hom_class F R S] (f : F) (r : R) [invertible r] :
invertible (f r) :=
{ inv_of := f (⅟r),
inv_of_mul_self := by rw [←map_mul, inv_of_mul_self, map_one],
mul_inv_of_self := by rw [←map_mul, mul_inv_of_self, map_one] } | invertible.map {R : Type*} {S : Type*} {F : Type*} [mul_one_class R] [mul_one_class S]
[monoid_hom_class F R S] (f : F) (r : R) [invertible r] :
invertible (f r) | { inv_of := f (⅟r),
inv_of_mul_self := by rw [←map_mul, inv_of_mul_self, map_one],
mul_inv_of_self := by rw [←map_mul, mul_inv_of_self, map_one] } | def | invertible.map | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"invertible",
"map_one",
"monoid_hom_class",
"mul_inv_of_self",
"mul_one_class"
] | Monoid homs preserve invertibility. | 322 | 327 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_inv_of {R : Type*} {S : Type*} {F : Type*} [mul_one_class R] [monoid S]
[monoid_hom_class F R S] (f : F) (r : R) [invertible r] [invertible (f r)] :
f (⅟r) = ⅟(f r) :=
by { letI := invertible.map f r, convert rfl } | map_inv_of {R : Type*} {S : Type*} {F : Type*} [mul_one_class R] [monoid S]
[monoid_hom_class F R S] (f : F) (r : R) [invertible r] [invertible (f r)] :
f (⅟r) = ⅟(f r) | by { letI := invertible.map f r, convert rfl } | lemma | map_inv_of | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"invertible.map",
"monoid",
"monoid_hom_class",
"mul_one_class"
] | Note that the `invertible (f r)` argument can be satisfied by using `letI := invertible.map f r`
before applying this lemma. | 331 | 334 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible.of_left_inverse {R : Type*} {S : Type*} {G : Type*}
[mul_one_class R] [mul_one_class S] [monoid_hom_class G S R]
(f : R → S) (g : G) (r : R) (h : function.left_inverse g f) [invertible (f r)] :
invertible r :=
(invertible.map g (f r)).copy _ (h r).symm | invertible.of_left_inverse {R : Type*} {S : Type*} {G : Type*}
[mul_one_class R] [mul_one_class S] [monoid_hom_class G S R]
(f : R → S) (g : G) (r : R) (h : function.left_inverse g f) [invertible (f r)] :
invertible r | (invertible.map g (f r)).copy _ (h r).symm | def | invertible.of_left_inverse | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"invertible.map",
"monoid_hom_class",
"mul_one_class"
] | If a function `f : R → S` has a left-inverse that is a monoid hom,
then `r : R` is invertible if `f r` is.
The inverse is computed as `g (⅟(f r))` | 340 | 345 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible_equiv_of_left_inverse {R : Type*} {S : Type*} {F G : Type*}
[monoid R] [monoid S] [monoid_hom_class F R S] [monoid_hom_class G S R]
(f : F) (g : G) (r : R) (h : function.left_inverse g f) :
invertible (f r) ≃ invertible r :=
{ to_fun := λ _, by exactI invertible.of_left_inverse f _ _ h,
inv_fun := λ ... | invertible_equiv_of_left_inverse {R : Type*} {S : Type*} {F G : Type*}
[monoid R] [monoid S] [monoid_hom_class F R S] [monoid_hom_class G S R]
(f : F) (g : G) (r : R) (h : function.left_inverse g f) :
invertible (f r) ≃ invertible r | { to_fun := λ _, by exactI invertible.of_left_inverse f _ _ h,
inv_fun := λ _, by exactI invertible.map f _,
left_inv := λ x, subsingleton.elim _ _,
right_inv := λ x, subsingleton.elim _ _ } | def | invertible_equiv_of_left_inverse | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_fun",
"invertible",
"invertible.map",
"invertible.of_left_inverse",
"monoid",
"monoid_hom_class"
] | Invertibility on either side of a monoid hom with a left-inverse is equivalent. | 348 | 356 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow : Prop :=
∃ (p : R) (k : ℕ), prime p ∧ 0 < k ∧ p ^ k = n | is_prime_pow : Prop | ∃ (p : R) (k : ℕ), prime p ∧ 0 < k ∧ p ^ k = n | def | is_prime_pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"prime"
] | `n` is a prime power if there is a prime `p` and a positive natural `k` such that `n` can be
written as `p^k`. | 22 | 23 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow_def :
is_prime_pow n ↔ ∃ (p : R) (k : ℕ), prime p ∧ 0 < k ∧ p ^ k = n := iff.rfl | is_prime_pow_def :
is_prime_pow n ↔ ∃ (p : R) (k : ℕ), prime p ∧ 0 < k ∧ p ^ k = n | iff.rfl | lemma | is_prime_pow_def | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"prime"
] | null | 25 | 26 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow_iff_pow_succ :
is_prime_pow n ↔ ∃ (p : R) (k : ℕ), prime p ∧ p ^ (k + 1) = n :=
(is_prime_pow_def _).trans
⟨λ ⟨p, k, hp, hk, hn⟩, ⟨_, _, hp, by rwa [nat.sub_add_cancel hk]⟩,
λ ⟨p, k, hp, hn⟩, ⟨_, _, hp, nat.succ_pos', hn⟩⟩ | is_prime_pow_iff_pow_succ :
is_prime_pow n ↔ ∃ (p : R) (k : ℕ), prime p ∧ p ^ (k + 1) = n | (is_prime_pow_def _).trans
⟨λ ⟨p, k, hp, hk, hn⟩, ⟨_, _, hp, by rwa [nat.sub_add_cancel hk]⟩,
λ ⟨p, k, hp, hn⟩, ⟨_, _, hp, nat.succ_pos', hn⟩⟩ | lemma | is_prime_pow_iff_pow_succ | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"is_prime_pow_def",
"nat.succ_pos'",
"prime"
] | An equivalent definition for prime powers: `n` is a prime power iff there is a prime `p` and a
natural `k` such that `n` can be written as `p^(k+1)`. | 30 | 34 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
not_is_prime_pow_zero [no_zero_divisors R] :
¬ is_prime_pow (0 : R) :=
begin
simp only [is_prime_pow_def, not_exists, not_and', and_imp],
intros x n hn hx,
rw pow_eq_zero hx,
simp,
end | not_is_prime_pow_zero [no_zero_divisors R] :
¬ is_prime_pow (0 : R) | begin
simp only [is_prime_pow_def, not_exists, not_and', and_imp],
intros x n hn hx,
rw pow_eq_zero hx,
simp,
end | lemma | not_is_prime_pow_zero | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"and_imp",
"is_prime_pow",
"is_prime_pow_def",
"no_zero_divisors",
"not_and'",
"not_exists",
"pow_eq_zero"
] | null | 36 | 43 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow.not_unit {n : R} (h : is_prime_pow n) : ¬is_unit n :=
let ⟨p, k, hp, hk, hn⟩ := h in hn ▸ (is_unit_pow_iff hk.ne').not.mpr hp.not_unit | is_prime_pow.not_unit {n : R} (h : is_prime_pow n) : ¬is_unit n | let ⟨p, k, hp, hk, hn⟩ := h in hn ▸ (is_unit_pow_iff hk.ne').not.mpr hp.not_unit | lemma | is_prime_pow.not_unit | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"is_unit",
"is_unit_pow_iff"
] | null | 45 | 46 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_unit.not_is_prime_pow {n : R} (h : is_unit n) : ¬is_prime_pow n :=
λ h', h'.not_unit h | is_unit.not_is_prime_pow {n : R} (h : is_unit n) : ¬is_prime_pow n | λ h', h'.not_unit h | lemma | is_unit.not_is_prime_pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"is_unit"
] | null | 48 | 49 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
not_is_prime_pow_one : ¬ is_prime_pow (1 : R) := is_unit_one.not_is_prime_pow | not_is_prime_pow_one : ¬ is_prime_pow (1 : R) | is_unit_one.not_is_prime_pow | lemma | not_is_prime_pow_one | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow"
] | null | 51 | 51 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
prime.is_prime_pow {p : R} (hp : prime p) : is_prime_pow p :=
⟨p, 1, hp, zero_lt_one, by simp⟩ | prime.is_prime_pow {p : R} (hp : prime p) : is_prime_pow p | ⟨p, 1, hp, zero_lt_one, by simp⟩ | lemma | prime.is_prime_pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"prime",
"zero_lt_one"
] | null | 53 | 54 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow.pow {n : R} (hn : is_prime_pow n)
{k : ℕ} (hk : k ≠ 0) : is_prime_pow (n ^ k) :=
let ⟨p, k', hp, hk', hn⟩ := hn in ⟨p, k * k', hp, mul_pos hk.bot_lt hk', by rw [pow_mul', hn]⟩ | is_prime_pow.pow {n : R} (hn : is_prime_pow n)
{k : ℕ} (hk : k ≠ 0) : is_prime_pow (n ^ k) | let ⟨p, k', hp, hk', hn⟩ := hn in ⟨p, k * k', hp, mul_pos hk.bot_lt hk', by rw [pow_mul', hn]⟩ | lemma | is_prime_pow.pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"pow_mul'"
] | null | 56 | 58 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow.ne_zero [no_zero_divisors R] {n : R} (h : is_prime_pow n) : n ≠ 0 :=
λ t, eq.rec not_is_prime_pow_zero t.symm h | is_prime_pow.ne_zero [no_zero_divisors R] {n : R} (h : is_prime_pow n) : n ≠ 0 | λ t, eq.rec not_is_prime_pow_zero t.symm h | theorem | is_prime_pow.ne_zero | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"no_zero_divisors",
"not_is_prime_pow_zero"
] | null | 60 | 61 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow.ne_one {n : R} (h : is_prime_pow n) : n ≠ 1 :=
λ t, eq.rec not_is_prime_pow_one t.symm h | is_prime_pow.ne_one {n : R} (h : is_prime_pow n) : n ≠ 1 | λ t, eq.rec not_is_prime_pow_one t.symm h | lemma | is_prime_pow.ne_one | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"not_is_prime_pow_one"
] | null | 63 | 64 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow_nat_iff (n : ℕ) :
is_prime_pow n ↔ ∃ (p k : ℕ), nat.prime p ∧ 0 < k ∧ p ^ k = n :=
by simp only [is_prime_pow_def, nat.prime_iff] | is_prime_pow_nat_iff (n : ℕ) :
is_prime_pow n ↔ ∃ (p k : ℕ), nat.prime p ∧ 0 < k ∧ p ^ k = n | by simp only [is_prime_pow_def, nat.prime_iff] | lemma | is_prime_pow_nat_iff | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"is_prime_pow_def",
"nat.prime",
"nat.prime_iff"
] | null | 68 | 70 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat.prime.is_prime_pow {p : ℕ} (hp : p.prime) : is_prime_pow p := hp.prime.is_prime_pow | nat.prime.is_prime_pow {p : ℕ} (hp : p.prime) : is_prime_pow p | hp.prime.is_prime_pow | lemma | nat.prime.is_prime_pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow"
] | null | 72 | 72 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow_nat_iff_bounded (n : ℕ) :
is_prime_pow n ↔ ∃ (p : ℕ), p ≤ n ∧ ∃ (k : ℕ), k ≤ n ∧ p.prime ∧ 0 < k ∧ p ^ k = n :=
begin
rw is_prime_pow_nat_iff,
refine iff.symm ⟨λ ⟨p, _, k, _, hp, hk, hn⟩, ⟨p, k, hp, hk, hn⟩, _⟩,
rintro ⟨p, k, hp, hk, rfl⟩,
refine ⟨p, _, k, (nat.lt_pow_self hp.one_lt _).le, hp, hk... | is_prime_pow_nat_iff_bounded (n : ℕ) :
is_prime_pow n ↔ ∃ (p : ℕ), p ≤ n ∧ ∃ (k : ℕ), k ≤ n ∧ p.prime ∧ 0 < k ∧ p ^ k = n | begin
rw is_prime_pow_nat_iff,
refine iff.symm ⟨λ ⟨p, _, k, _, hp, hk, hn⟩, ⟨p, k, hp, hk, hn⟩, _⟩,
rintro ⟨p, k, hp, hk, rfl⟩,
refine ⟨p, _, k, (nat.lt_pow_self hp.one_lt _).le, hp, hk, rfl⟩,
simpa using nat.pow_le_pow_of_le_right hp.pos hk,
end | lemma | is_prime_pow_nat_iff_bounded | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"is_prime_pow_nat_iff",
"nat.lt_pow_self",
"nat.pow_le_pow_of_le_right"
] | null | 74 | 82 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
{n : ℕ} : decidable (is_prime_pow n) :=
decidable_of_iff' _ (is_prime_pow_nat_iff_bounded n) | {n : ℕ} : decidable (is_prime_pow n) | decidable_of_iff' _ (is_prime_pow_nat_iff_bounded n) | instance | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"decidable_of_iff'",
"is_prime_pow",
"is_prime_pow_nat_iff_bounded"
] | null | 84 | 85 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_prime_pow.dvd {n m : ℕ} (hn : is_prime_pow n) (hm : m ∣ n) (hm₁ : m ≠ 1) :
is_prime_pow m :=
begin
rw is_prime_pow_nat_iff at hn ⊢,
rcases hn with ⟨p, k, hp, hk, rfl⟩,
obtain ⟨i, hik, rfl⟩ := (nat.dvd_prime_pow hp).1 hm,
refine ⟨p, i, hp, _, rfl⟩,
apply nat.pos_of_ne_zero,
rintro rfl,
simpa using hm₁... | is_prime_pow.dvd {n m : ℕ} (hn : is_prime_pow n) (hm : m ∣ n) (hm₁ : m ≠ 1) :
is_prime_pow m | begin
rw is_prime_pow_nat_iff at hn ⊢,
rcases hn with ⟨p, k, hp, hk, rfl⟩,
obtain ⟨i, hik, rfl⟩ := (nat.dvd_prime_pow hp).1 hm,
refine ⟨p, i, hp, _, rfl⟩,
apply nat.pos_of_ne_zero,
rintro rfl,
simpa using hm₁,
end | lemma | is_prime_pow.dvd | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"is_prime_pow_nat_iff",
"nat.dvd_prime_pow"
] | null | 87 | 97 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nat.disjoint_divisors_filter_prime_pow {a b : ℕ} (hab : a.coprime b) :
disjoint (a.divisors.filter is_prime_pow) (b.divisors.filter is_prime_pow) :=
begin
simp only [finset.disjoint_left, finset.mem_filter, and_imp, nat.mem_divisors, not_and],
rintro n han ha hn hbn hb -,
exact hn.ne_one (nat.eq_one_of_dvd_copr... | nat.disjoint_divisors_filter_prime_pow {a b : ℕ} (hab : a.coprime b) :
disjoint (a.divisors.filter is_prime_pow) (b.divisors.filter is_prime_pow) | begin
simp only [finset.disjoint_left, finset.mem_filter, and_imp, nat.mem_divisors, not_and],
rintro n han ha hn hbn hb -,
exact hn.ne_one (nat.eq_one_of_dvd_coprimes hab han hbn),
end | lemma | nat.disjoint_divisors_filter_prime_pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"and_imp",
"disjoint",
"finset.disjoint_left",
"finset.mem_filter",
"is_prime_pow",
"nat.eq_one_of_dvd_coprimes",
"nat.mem_divisors",
"not_and"
] | null | 99 | 105 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow.two_le : ∀ {n : ℕ}, is_prime_pow n → 2 ≤ n
| 0 h := (not_is_prime_pow_zero h).elim
| 1 h := (not_is_prime_pow_one h).elim
| (n+2) _ := le_add_self | is_prime_pow.two_le : ∀ {n : ℕ}, is_prime_pow n → 2 ≤ n
| 0 h | (not_is_prime_pow_zero h).elim
| 1 h := (not_is_prime_pow_one h).elim
| (n+2) _ := le_add_self | lemma | is_prime_pow.two_le | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"not_is_prime_pow_one",
"not_is_prime_pow_zero"
] | null | 107 | 110 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow.pos {n : ℕ} (hn : is_prime_pow n) : 0 < n := pos_of_gt hn.two_le | is_prime_pow.pos {n : ℕ} (hn : is_prime_pow n) : 0 < n | pos_of_gt hn.two_le | theorem | is_prime_pow.pos | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"pos_of_gt"
] | null | 112 | 112 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_prime_pow.one_lt {n : ℕ} (h : is_prime_pow n) : 1 < n := h.two_le | is_prime_pow.one_lt {n : ℕ} (h : is_prime_pow n) : 1 < n | h.two_le | theorem | is_prime_pow.one_lt | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow"
] | null | 114 | 114 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
linear_recurrence (α : Type*) [comm_semiring α] := (order : ℕ) (coeffs : fin order → α) | linear_recurrence (α : Type*) [comm_semiring α] | (order : ℕ) (coeffs : fin order → α) | structure | linear_recurrence | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"comm_semiring"
] | A "linear recurrence relation" over a commutative semiring is given by its
order `n` and `n` coefficients. | 47 | 47 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
(α : Type*) [comm_semiring α] : inhabited (linear_recurrence α) :=
⟨⟨0, default⟩⟩ | (α : Type*) [comm_semiring α] : inhabited (linear_recurrence α) | ⟨⟨0, default⟩⟩ | instance | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"comm_semiring",
"linear_recurrence"
] | null | 49 | 50 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_solution (u : ℕ → α) :=
∀ n, u (n + E.order) = ∑ i, E.coeffs i * u (n + i) | is_solution (u : ℕ → α) | ∀ n, u (n + E.order) = ∑ i, E.coeffs i * u (n + i) | def | linear_recurrence.is_solution | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [] | We say that a sequence `u` is solution of `linear_recurrence order coeffs` when we have
`u (n + order) = ∑ i : fin order, coeffs i * u (n + i)` for any `n`. | 60 | 61 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mk_sol (init : fin E.order → α) : ℕ → α
| n := if h : n < E.order then init ⟨n, h⟩ else
∑ k : fin E.order,
have n - E.order + k < n :=
begin
rw [add_comm, ← add_tsub_assoc_of_le (not_lt.mp h), tsub_lt_iff_left],
{ exact add_lt_add_right k.is_lt n },
{ convert add_le_add (zero_le (k : ℕ)) (no... | mk_sol (init : fin E.order → α) : ℕ → α
| n | if h : n < E.order then init ⟨n, h⟩ else
∑ k : fin E.order,
have n - E.order + k < n :=
begin
rw [add_comm, ← add_tsub_assoc_of_le (not_lt.mp h), tsub_lt_iff_left],
{ exact add_lt_add_right k.is_lt n },
{ convert add_le_add (zero_le (k : ℕ)) (not_lt.mp h),
simp only [zero_add] }
... | def | linear_recurrence.mk_sol | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"add_tsub_assoc_of_le",
"tsub_lt_iff_left"
] | A solution of a `linear_recurrence` which satisfies certain initial conditions.
We will prove this is the only such solution. | 65 | 75 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_sol_mk_sol (init : fin E.order → α) : E.is_solution (E.mk_sol init) :=
λ n, by rw mk_sol; simp | is_sol_mk_sol (init : fin E.order → α) : E.is_solution (E.mk_sol init) | λ n, by rw mk_sol; simp | lemma | linear_recurrence.is_sol_mk_sol | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [] | `E.mk_sol` indeed gives solutions to `E`. | 78 | 79 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mk_sol_eq_init (init : fin E.order → α) : ∀ n : fin E.order, E.mk_sol init n = init n :=
λ n, by { rw mk_sol, simp only [n.is_lt, dif_pos, fin.mk_coe, fin.eta] } | mk_sol_eq_init (init : fin E.order → α) : ∀ n : fin E.order, E.mk_sol init n = init n | λ n, by { rw mk_sol, simp only [n.is_lt, dif_pos, fin.mk_coe, fin.eta] } | lemma | linear_recurrence.mk_sol_eq_init | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"fin.eta",
"fin.mk_coe"
] | `E.mk_sol init`'s first `E.order` terms are `init`. | 82 | 83 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
eq_mk_of_is_sol_of_eq_init {u : ℕ → α} {init : fin E.order → α}
(h : E.is_solution u) (heq : ∀ n : fin E.order, u n = init n) :
∀ n, u n = E.mk_sol init n
| n := if h' : n < E.order
then by rw mk_sol; simp only [h', dif_pos]; exact_mod_cast heq ⟨n, h'⟩
else begin
rw [mk_sol, ← tsub_add_cancel_of_le (le_of_n... | eq_mk_of_is_sol_of_eq_init {u : ℕ → α} {init : fin E.order → α}
(h : E.is_solution u) (heq : ∀ n : fin E.order, u n = init n) :
∀ n, u n = E.mk_sol init n
| n | if h' : n < E.order
then by rw mk_sol; simp only [h', dif_pos]; exact_mod_cast heq ⟨n, h'⟩
else begin
rw [mk_sol, ← tsub_add_cancel_of_le (le_of_not_lt h'), h (n-E.order)],
simp [h'],
congr' with k,
exact have wf : n - E.order + k < n :=
begin
rw [add_comm, ← add_tsub_assoc_of_le (not_... | lemma | linear_recurrence.eq_mk_of_is_sol_of_eq_init | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"add_tsub_assoc_of_le",
"tsub_add_cancel_of_le",
"tsub_lt_iff_left"
] | If `u` is a solution to `E` and `init` designates its first `E.order` values,
then `∀ n, u n = E.mk_sol init n`. | 87 | 104 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
eq_mk_of_is_sol_of_eq_init' {u : ℕ → α} {init : fin E.order → α}
(h : E.is_solution u) (heq : ∀ n : fin E.order, u n = init n) : u = E.mk_sol init :=
funext (E.eq_mk_of_is_sol_of_eq_init h heq) | eq_mk_of_is_sol_of_eq_init' {u : ℕ → α} {init : fin E.order → α}
(h : E.is_solution u) (heq : ∀ n : fin E.order, u n = init n) : u = E.mk_sol init | funext (E.eq_mk_of_is_sol_of_eq_init h heq) | lemma | linear_recurrence.eq_mk_of_is_sol_of_eq_init' | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [] | If `u` is a solution to `E` and `init` designates its first `E.order` values,
then `u = E.mk_sol init`. This proves that `E.mk_sol init` is the only solution
of `E` whose first `E.order` values are given by `init`. | 109 | 111 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
sol_space : submodule α (ℕ → α) :=
{ carrier := {u | E.is_solution u},
zero_mem' := λ n, by simp,
add_mem' := λ u v hu hv n, by simp [mul_add, sum_add_distrib, hu n, hv n],
smul_mem' := λ a u hu n, by simp [hu n, mul_sum]; congr'; ext; ac_refl } | sol_space : submodule α (ℕ → α) | { carrier := {u | E.is_solution u},
zero_mem' := λ n, by simp,
add_mem' := λ u v hu hv n, by simp [mul_add, sum_add_distrib, hu n, hv n],
smul_mem' := λ a u hu n, by simp [hu n, mul_sum]; congr'; ext; ac_refl } | def | linear_recurrence.sol_space | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"submodule"
] | The space of solutions of `E`, as a `submodule` over `α` of the module `ℕ → α`. | 114 | 118 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_sol_iff_mem_sol_space (u : ℕ → α) : E.is_solution u ↔ u ∈ E.sol_space :=
iff.rfl | is_sol_iff_mem_sol_space (u : ℕ → α) : E.is_solution u ↔ u ∈ E.sol_space | iff.rfl | lemma | linear_recurrence.is_sol_iff_mem_sol_space | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [] | Defining property of the solution space : `u` is a solution
iff it belongs to the solution space. | 122 | 123 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_init :
E.sol_space ≃ₗ[α] (fin E.order → α) :=
{ to_fun := λ u x, (u : ℕ → α) x,
map_add' := λ u v, by { ext, simp },
map_smul' := λ a u, by { ext, simp },
inv_fun := λ u, ⟨E.mk_sol u, E.is_sol_mk_sol u⟩,
left_inv := λ u, by ext n; symmetry; apply E.eq_mk_of_is_sol_of_eq_init u.2; intros k; refl,
right_in... | to_init :
E.sol_space ≃ₗ[α] (fin E.order → α) | { to_fun := λ u x, (u : ℕ → α) x,
map_add' := λ u v, by { ext, simp },
map_smul' := λ a u, by { ext, simp },
inv_fun := λ u, ⟨E.mk_sol u, E.is_sol_mk_sol u⟩,
left_inv := λ u, by ext n; symmetry; apply E.eq_mk_of_is_sol_of_eq_init u.2; intros k; refl,
right_inv := λ u, function.funext_iff.mpr (λ n, E.mk_sol_eq... | def | linear_recurrence.to_init | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"inv_fun"
] | The function that maps a solution `u` of `E` to its first
`E.order` terms as a `linear_equiv`. | 127 | 134 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
sol_eq_of_eq_init (u v : ℕ → α) (hu : E.is_solution u) (hv : E.is_solution v) :
u = v ↔ set.eq_on u v ↑(range E.order) :=
begin
refine iff.intro (λ h x hx, h ▸ rfl) _,
intro h,
set u' : ↥(E.sol_space) := ⟨u, hu⟩,
set v' : ↥(E.sol_space) := ⟨v, hv⟩,
change u'.val = v'.val,
suffices h' : u' = v', from h' ▸ ... | sol_eq_of_eq_init (u v : ℕ → α) (hu : E.is_solution u) (hv : E.is_solution v) :
u = v ↔ set.eq_on u v ↑(range E.order) | begin
refine iff.intro (λ h x hx, h ▸ rfl) _,
intro h,
set u' : ↥(E.sol_space) := ⟨u, hu⟩,
set v' : ↥(E.sol_space) := ⟨v, hv⟩,
change u'.val = v'.val,
suffices h' : u' = v', from h' ▸ rfl,
rw [← E.to_init.to_equiv.apply_eq_iff_eq, linear_equiv.coe_to_equiv],
ext x,
exact_mod_cast h (mem_range.mpr x.2)... | lemma | linear_recurrence.sol_eq_of_eq_init | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"linear_equiv.coe_to_equiv",
"set.eq_on"
] | Two solutions are equal iff they are equal on `range E.order`. | 137 | 149 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
tuple_succ : (fin E.order → α) →ₗ[α] (fin E.order → α) :=
{ to_fun := λ X i, if h : (i : ℕ) + 1 < E.order then X ⟨i+1, h⟩ else (∑ i, E.coeffs i * X i),
map_add' := λ x y,
begin
ext i,
split_ifs ; simp [h, mul_add, sum_add_distrib],
end,
map_smul' := λ x y,
begin
ext i,
split_ifs ... | tuple_succ : (fin E.order → α) →ₗ[α] (fin E.order → α) | { to_fun := λ X i, if h : (i : ℕ) + 1 < E.order then X ⟨i+1, h⟩ else (∑ i, E.coeffs i * X i),
map_add' := λ x y,
begin
ext i,
split_ifs ; simp [h, mul_add, sum_add_distrib],
end,
map_smul' := λ x y,
begin
ext i,
split_ifs ; simp [h, mul_sum],
exact sum_congr rfl (λ x _, by ... | def | linear_recurrence.tuple_succ | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [] | `E.tuple_succ` maps `![s₀, s₁, ..., sₙ]` to `![s₁, ..., sₙ, ∑ (E.coeffs i) * sᵢ]`,
where `n := E.order`. | 157 | 169 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
sol_space_rank : module.rank α E.sol_space = E.order :=
begin
letI := nontrivial_of_invariant_basis_number α,
exact @rank_fin_fun α _ _ E.order ▸ E.to_init.rank_eq
end | sol_space_rank : module.rank α E.sol_space = E.order | begin
letI := nontrivial_of_invariant_basis_number α,
exact @rank_fin_fun α _ _ E.order ▸ E.to_init.rank_eq
end | lemma | linear_recurrence.sol_space_rank | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"module.rank",
"nontrivial_of_invariant_basis_number",
"rank_fin_fun"
] | The dimension of `E.sol_space` is `E.order`. | 180 | 184 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
char_poly : α[X] :=
polynomial.monomial E.order 1 - (∑ i : fin E.order, polynomial.monomial i (E.coeffs i)) | char_poly : α[X] | polynomial.monomial E.order 1 - (∑ i : fin E.order, polynomial.monomial i (E.coeffs i)) | def | linear_recurrence.char_poly | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"polynomial.monomial"
] | The characteristic polynomial of `E` is
`X ^ E.order - ∑ i : fin E.order, (E.coeffs i) * X ^ i`. | 194 | 195 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
geom_sol_iff_root_char_poly (q : α) : E.is_solution (λ n, q^n) ↔ E.char_poly.is_root q :=
begin
rw [char_poly, polynomial.is_root.def, polynomial.eval],
simp only [polynomial.eval₂_finset_sum, one_mul,
ring_hom.id_apply, polynomial.eval₂_monomial, polynomial.eval₂_sub],
split,
{ intro h,
simpa... | geom_sol_iff_root_char_poly (q : α) : E.is_solution (λ n, q^n) ↔ E.char_poly.is_root q | begin
rw [char_poly, polynomial.is_root.def, polynomial.eval],
simp only [polynomial.eval₂_finset_sum, one_mul,
ring_hom.id_apply, polynomial.eval₂_monomial, polynomial.eval₂_sub],
split,
{ intro h,
simpa [sub_eq_zero] using h 0 },
{ intros h n,
simp only [pow_add, sub_eq_zero.mp h, mul_... | lemma | linear_recurrence.geom_sol_iff_root_char_poly | algebra | src/algebra/linear_recurrence.lean | [
"data.polynomial.eval",
"linear_algebra.dimension"
] | [
"one_mul",
"polynomial.eval",
"polynomial.eval₂_finset_sum",
"polynomial.eval₂_monomial",
"polynomial.eval₂_sub",
"polynomial.is_root.def",
"pow_add",
"ring",
"ring_hom.id_apply"
] | The geometric sequence `q^n` is a solution of `E` iff
`q` is a root of `E`'s characteristic polynomial. | 199 | 210 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
modeq (p a b : α) : Prop := ∃ z : ℤ, b - a = z • p | modeq (p a b : α) : Prop | ∃ z : ℤ, b - a = z • p | def | add_comm_group.modeq | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | `a ≡ b [PMOD p]` means that `b` is congruent to `a` modulo `p`.
Equivalently (as shown in `algebra.order.to_interval_mod`), `b` does not lie in the open interval
`(a, a + p)` modulo `p`, or `to_Ico_mod hp a` disagrees with `to_Ioc_mod hp a` at `b`, or
`to_Ico_div hp a` disagrees with `to_Ioc_div hp a` at `b`. | 44 | 44 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
modeq_refl (a : α) : a ≡ a [PMOD p] := ⟨0, by simp⟩ | modeq_refl (a : α) : a ≡ a [PMOD p] | ⟨0, by simp⟩ | lemma | add_comm_group.modeq_refl | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 48 | 48 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
modeq_rfl : a ≡ a [PMOD p] := modeq_refl _ | modeq_rfl : a ≡ a [PMOD p] | modeq_refl _ | lemma | add_comm_group.modeq_rfl | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 50 | 50 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
modeq_comm : a ≡ b [PMOD p] ↔ b ≡ a [PMOD p] :=
(equiv.neg _).exists_congr_left.trans $ by simp [modeq, ←neg_eq_iff_eq_neg] | modeq_comm : a ≡ b [PMOD p] ↔ b ≡ a [PMOD p] | (equiv.neg _).exists_congr_left.trans $ by simp [modeq, ←neg_eq_iff_eq_neg] | lemma | add_comm_group.modeq_comm | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 52 | 53 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
modeq.trans : a ≡ b [PMOD p] → b ≡ c [PMOD p] → a ≡ c [PMOD p] :=
λ ⟨m, hm⟩ ⟨n, hn⟩, ⟨m + n, by simp [add_smul, ←hm, ←hn]⟩ | modeq.trans : a ≡ b [PMOD p] → b ≡ c [PMOD p] → a ≡ c [PMOD p] | λ ⟨m, hm⟩ ⟨n, hn⟩, ⟨m + n, by simp [add_smul, ←hm, ←hn]⟩ | lemma | add_comm_group.modeq.trans | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [
"add_smul"
] | null | 59 | 60 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: is_refl _ (modeq p) := ⟨modeq_refl⟩ | : is_refl _ (modeq p) | ⟨modeq_refl⟩ | instance | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 62 | 62 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
neg_modeq_neg : -a ≡ -b [PMOD p] ↔ a ≡ b [PMOD p] :=
modeq_comm.trans $ by simp [modeq] | neg_modeq_neg : -a ≡ -b [PMOD p] ↔ a ≡ b [PMOD p] | modeq_comm.trans $ by simp [modeq] | lemma | add_comm_group.neg_modeq_neg | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 64 | 65 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
modeq_neg : a ≡ b [PMOD -p] ↔ a ≡ b [PMOD p] :=
modeq_comm.trans $ by simp [modeq, ←neg_eq_iff_eq_neg] | modeq_neg : a ≡ b [PMOD -p] ↔ a ≡ b [PMOD p] | modeq_comm.trans $ by simp [modeq, ←neg_eq_iff_eq_neg] | lemma | add_comm_group.modeq_neg | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 69 | 70 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
modeq_sub (a b : α) : a ≡ b [PMOD b - a] := ⟨1, (one_smul _ _).symm⟩ | modeq_sub (a b : α) : a ≡ b [PMOD b - a] | ⟨1, (one_smul _ _).symm⟩ | lemma | add_comm_group.modeq_sub | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [
"one_smul"
] | null | 74 | 74 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
modeq_zero : a ≡ b [PMOD 0] ↔ a = b := by simp [modeq, sub_eq_zero, eq_comm] | modeq_zero : a ≡ b [PMOD 0] ↔ a = b | by simp [modeq, sub_eq_zero, eq_comm] | lemma | add_comm_group.modeq_zero | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 76 | 76 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
self_modeq_zero : p ≡ 0 [PMOD p] := ⟨-1, by simp⟩ | self_modeq_zero : p ≡ 0 [PMOD p] | ⟨-1, by simp⟩ | lemma | add_comm_group.self_modeq_zero | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 78 | 78 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
zsmul_modeq_zero (z : ℤ) : z • p ≡ 0 [PMOD p] := ⟨-z, by simp⟩ | zsmul_modeq_zero (z : ℤ) : z • p ≡ 0 [PMOD p] | ⟨-z, by simp⟩ | lemma | add_comm_group.zsmul_modeq_zero | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 80 | 80 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
add_zsmul_modeq (z : ℤ) : a + z • p ≡ a [PMOD p] := ⟨-z, by simp⟩ | add_zsmul_modeq (z : ℤ) : a + z • p ≡ a [PMOD p] | ⟨-z, by simp⟩ | lemma | add_comm_group.add_zsmul_modeq | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 81 | 81 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
zsmul_add_modeq (z : ℤ) : z • p + a ≡ a [PMOD p] := ⟨-z, by simp⟩ | zsmul_add_modeq (z : ℤ) : z • p + a ≡ a [PMOD p] | ⟨-z, by simp⟩ | lemma | add_comm_group.zsmul_add_modeq | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 82 | 82 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
add_nsmul_modeq (n : ℕ) : a + n • p ≡ a [PMOD p] := ⟨-n, by simp⟩ | add_nsmul_modeq (n : ℕ) : a + n • p ≡ a [PMOD p] | ⟨-n, by simp⟩ | lemma | add_comm_group.add_nsmul_modeq | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 83 | 83 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nsmul_add_modeq (n : ℕ) : n • p + a ≡ a [PMOD p] := ⟨-n, by simp⟩ | nsmul_add_modeq (n : ℕ) : n • p + a ≡ a [PMOD p] | ⟨-n, by simp⟩ | lemma | add_comm_group.nsmul_add_modeq | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 84 | 84 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
add_zsmul (z : ℤ) : a ≡ b [PMOD p] → a + z • p ≡ b [PMOD p] :=
(add_zsmul_modeq _).trans | add_zsmul (z : ℤ) : a ≡ b [PMOD p] → a + z • p ≡ b [PMOD p] | (add_zsmul_modeq _).trans | lemma | add_comm_group.modeq.add_zsmul | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 88 | 89 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
zsmul_add (z : ℤ) : a ≡ b [PMOD p] → z • p + a ≡ b [PMOD p] :=
(zsmul_add_modeq _).trans | zsmul_add (z : ℤ) : a ≡ b [PMOD p] → z • p + a ≡ b [PMOD p] | (zsmul_add_modeq _).trans | lemma | add_comm_group.modeq.zsmul_add | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 90 | 91 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
add_nsmul (n : ℕ) : a ≡ b [PMOD p] → a + n • p ≡ b [PMOD p] :=
(add_nsmul_modeq _).trans | add_nsmul (n : ℕ) : a ≡ b [PMOD p] → a + n • p ≡ b [PMOD p] | (add_nsmul_modeq _).trans | lemma | add_comm_group.modeq.add_nsmul | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 92 | 93 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nsmul_add (n : ℕ) : a ≡ b [PMOD p] → n • p + a ≡ b [PMOD p] :=
(nsmul_add_modeq _).trans | nsmul_add (n : ℕ) : a ≡ b [PMOD p] → n • p + a ≡ b [PMOD p] | (nsmul_add_modeq _).trans | lemma | add_comm_group.modeq.nsmul_add | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 94 | 95 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_zsmul : a ≡ b [PMOD (z • p)] → a ≡ b [PMOD p] :=
λ ⟨m, hm⟩, ⟨m * z, by rwa [mul_smul]⟩ | of_zsmul : a ≡ b [PMOD (z • p)] → a ≡ b [PMOD p] | λ ⟨m, hm⟩, ⟨m * z, by rwa [mul_smul]⟩ | lemma | add_comm_group.modeq.of_zsmul | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 97 | 98 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_nsmul : a ≡ b [PMOD (n • p)] → a ≡ b [PMOD p] :=
λ ⟨m, hm⟩, ⟨m * n, by rwa [mul_smul, coe_nat_zsmul]⟩ | of_nsmul : a ≡ b [PMOD (n • p)] → a ≡ b [PMOD p] | λ ⟨m, hm⟩, ⟨m * n, by rwa [mul_smul, coe_nat_zsmul]⟩ | lemma | add_comm_group.modeq.of_nsmul | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [] | null | 100 | 101 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
zsmul : a ≡ b [PMOD p] → z • a ≡ z • b [PMOD (z • p)] :=
Exists.imp $ λ m hm, by rw [←smul_sub, hm, smul_comm] | zsmul : a ≡ b [PMOD p] → z • a ≡ z • b [PMOD (z • p)] | Exists.imp $ λ m hm, by rw [←smul_sub, hm, smul_comm] | lemma | add_comm_group.modeq.zsmul | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [
"Exists.imp"
] | null | 103 | 104 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nsmul : a ≡ b [PMOD p] → n • a ≡ n • b [PMOD (n • p)] :=
Exists.imp $ λ m hm, by rw [←smul_sub, hm, smul_comm] | nsmul : a ≡ b [PMOD p] → n • a ≡ n • b [PMOD (n • p)] | Exists.imp $ λ m hm, by rw [←smul_sub, hm, smul_comm] | lemma | add_comm_group.modeq.nsmul | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [
"Exists.imp"
] | null | 106 | 107 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
zsmul_modeq_zsmul [no_zero_smul_divisors ℤ α] (hn : z ≠ 0) :
z • a ≡ z • b [PMOD (z • p)] ↔ a ≡ b [PMOD p] :=
exists_congr $ λ m, by rw [←smul_sub, smul_comm, smul_right_inj hn]; apply_instance | zsmul_modeq_zsmul [no_zero_smul_divisors ℤ α] (hn : z ≠ 0) :
z • a ≡ z • b [PMOD (z • p)] ↔ a ≡ b [PMOD p] | exists_congr $ λ m, by rw [←smul_sub, smul_comm, smul_right_inj hn]; apply_instance | lemma | add_comm_group.zsmul_modeq_zsmul | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [
"no_zero_smul_divisors",
"smul_right_inj"
] | null | 111 | 113 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nsmul_modeq_nsmul [no_zero_smul_divisors ℕ α] (hn : n ≠ 0) :
n • a ≡ n • b [PMOD (n • p)] ↔ a ≡ b [PMOD p] :=
exists_congr $ λ m, by rw [←smul_sub, smul_comm, smul_right_inj hn]; apply_instance | nsmul_modeq_nsmul [no_zero_smul_divisors ℕ α] (hn : n ≠ 0) :
n • a ≡ n • b [PMOD (n • p)] ↔ a ≡ b [PMOD p] | exists_congr $ λ m, by rw [←smul_sub, smul_comm, smul_right_inj hn]; apply_instance | lemma | add_comm_group.nsmul_modeq_nsmul | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [
"no_zero_smul_divisors",
"smul_right_inj"
] | null | 115 | 117 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
add_iff_left :
a₁ ≡ b₁ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₂ ≡ b₂ [PMOD p]) :=
λ ⟨m, hm⟩, (equiv.add_left m).symm.exists_congr_left.trans $
by simpa [add_sub_add_comm, hm, add_smul] | add_iff_left :
a₁ ≡ b₁ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₂ ≡ b₂ [PMOD p]) | λ ⟨m, hm⟩, (equiv.add_left m).symm.exists_congr_left.trans $
by simpa [add_sub_add_comm, hm, add_smul] | lemma | add_comm_group.modeq.add_iff_left | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [
"add_smul"
] | null | 124 | 127 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
add_iff_right :
a₂ ≡ b₂ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₁ ≡ b₁ [PMOD p]) :=
λ ⟨m, hm⟩, (equiv.add_right m).symm.exists_congr_left.trans $
by simpa [add_sub_add_comm, hm, add_smul] | add_iff_right :
a₂ ≡ b₂ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₁ ≡ b₁ [PMOD p]) | λ ⟨m, hm⟩, (equiv.add_right m).symm.exists_congr_left.trans $
by simpa [add_sub_add_comm, hm, add_smul] | lemma | add_comm_group.modeq.add_iff_right | algebra | src/algebra/modeq.lean | [
"data.int.modeq",
"group_theory.quotient_group"
] | [
"add_smul"
] | null | 129 | 132 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.