statement stringlengths 1 2.88k | proof stringlengths 0 13.9k | type stringclasses 10
values | symbolic_name stringlengths 1 131 | library stringclasses 417
values | filename stringlengths 17 80 | imports listlengths 0 16 | deps listlengths 0 64 | docstring stringlengths 0 10.2k | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
one_le_mul_indicator (h : ∀ a ∈ s, 1 ≤ f a) (a : α) : 1 ≤ mul_indicator s f a | one_le_mul_indicator_apply (h a) | lemma | set.one_le_mul_indicator | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_apply_le_one (h : a ∈ s → f a ≤ 1) : mul_indicator s f a ≤ 1 | mul_indicator_apply_le' h (λ _, le_rfl) | lemma | set.mul_indicator_apply_le_one | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"le_rfl"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_le_one (h : ∀ a ∈ s, f a ≤ 1) (a : α) :
mul_indicator s f a ≤ 1 | mul_indicator_apply_le_one (h a) | lemma | set.mul_indicator_le_one | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_le_mul_indicator (h : f a ≤ g a) :
mul_indicator s f a ≤ mul_indicator s g a | mul_indicator_rel_mul_indicator le_rfl (λ _, h) | lemma | set.mul_indicator_le_mul_indicator | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"le_rfl"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_le_mul_indicator_of_subset (h : s ⊆ t) (hf : ∀ a, 1 ≤ f a)
(a : α) :
mul_indicator s f a ≤ mul_indicator t f a | mul_indicator_apply_le' (λ ha, le_mul_indicator_apply (λ _, le_rfl) (λ hat, (hat $ h ha).elim))
(λ ha, one_le_mul_indicator_apply (λ _, hf _)) | lemma | set.mul_indicator_le_mul_indicator_of_subset | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"le_rfl"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_le_self' (hf : ∀ x ∉ s, 1 ≤ f x) : mul_indicator s f ≤ f | mul_indicator_le' (λ _ _, le_rfl) hf | lemma | set.mul_indicator_le_self' | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"le_rfl"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_Union_apply {ι M} [complete_lattice M] [has_one M]
(h1 : (⊥:M) = 1) (s : ι → set α) (f : α → M) (x : α) :
mul_indicator (⋃ i, s i) f x = ⨆ i, mul_indicator (s i) f x | begin
by_cases hx : x ∈ ⋃ i, s i,
{ rw [mul_indicator_of_mem hx],
rw [mem_Union] at hx,
refine le_antisymm _ (supr_le $ λ i, mul_indicator_le_self' (λ x hx, h1 ▸ bot_le) x),
rcases hx with ⟨i, hi⟩,
exact le_supr_of_le i (ge_of_eq $ mul_indicator_of_mem hi _) },
{ rw [mul_indicator_of_not_mem hx],
... | lemma | set.mul_indicator_Union_apply | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"bot_le",
"complete_lattice",
"ge_of_eq",
"le_supr_of_le",
"not_exists",
"supr_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_le_self (s : set α) (f : α → M) :
mul_indicator s f ≤ f | mul_indicator_le_self' $ λ _ _, one_le _ | lemma | set.mul_indicator_le_self | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"one_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_apply_le {a : α} {s : set α} {f g : α → M}
(hfg : a ∈ s → f a ≤ g a) :
mul_indicator s f a ≤ g a | mul_indicator_apply_le' hfg $ λ _, one_le _ | lemma | set.mul_indicator_apply_le | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"one_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_indicator_le {s : set α} {f g : α → M} (hfg : ∀ a ∈ s, f a ≤ g a) :
mul_indicator s f ≤ g | mul_indicator_le' hfg $ λ _ _, one_le _ | lemma | set.mul_indicator_le | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"one_le"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
indicator_le_indicator_nonneg {β} [linear_order β] [has_zero β] (s : set α) (f : α → β) :
s.indicator f ≤ {x | 0 ≤ f x}.indicator f | begin
intro x,
classical,
simp_rw indicator_apply,
split_ifs,
{ exact le_rfl, },
{ exact (not_le.mp h_1).le, },
{ exact h_1, },
{ exact le_rfl, },
end | lemma | set.indicator_le_indicator_nonneg | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"le_rfl"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
indicator_nonpos_le_indicator {β} [linear_order β] [has_zero β] (s : set α) (f : α → β) :
{x | f x ≤ 0}.indicator f ≤ s.indicator f | @indicator_le_indicator_nonneg α βᵒᵈ _ _ s f | lemma | set.indicator_nonpos_le_indicator | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
monoid_hom.map_mul_indicator
{M N : Type*} [mul_one_class M] [mul_one_class N] (f : M →* N)
(s : set α) (g : α → M) (x : α) :
f (s.mul_indicator g x) = s.mul_indicator (f ∘ g) x | congr_fun (set.mul_indicator_comp_of_one f.map_one).symm x | lemma | monoid_hom.map_mul_indicator | algebra | src/algebra/indicator_function.lean | [
"algebra.support"
] | [
"mul_one_class",
"set.mul_indicator_comp_of_one"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
invertible [has_mul α] [has_one α] (a : α) : Type u | (inv_of : α) (inv_of_mul_self : inv_of * a = 1) (mul_inv_of_self : a * inv_of = 1) | class | invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"mul_inv_of_self"
] | `invertible a` gives a two-sided multiplicative inverse of `a`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_mul_self [has_mul α] [has_one α] (a : α) [invertible a] : ⅟a * a = 1 | invertible.inv_of_mul_self | lemma | inv_of_mul_self | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_inv_of_self [has_mul α] [has_one α] (a : α) [invertible a] : a * ⅟a = 1 | invertible.mul_inv_of_self | lemma | mul_inv_of_self | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
inv_of_mul_self_assoc [monoid α] (a b : α) [invertible a] : ⅟a * (a * b) = b | by rw [←mul_assoc, inv_of_mul_self, one_mul] | lemma | inv_of_mul_self_assoc | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"invertible",
"monoid",
"one_mul"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_inv_of_self_assoc [monoid α] (a b : α) [invertible a] : a * (⅟a * b) = b | by rw [←mul_assoc, mul_inv_of_self, one_mul] | lemma | mul_inv_of_self_assoc | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"monoid",
"mul_inv_of_self",
"one_mul"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_inv_of_mul_self_cancel [monoid α] (a b : α) [invertible b] : a * ⅟b * b = a | by simp [mul_assoc] | lemma | mul_inv_of_mul_self_cancel | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"monoid",
"mul_assoc"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mul_mul_inv_of_self_cancel [monoid α] (a b : α) [invertible b] : a * b * ⅟b = a | by simp [mul_assoc] | lemma | mul_mul_inv_of_self_cancel | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"monoid",
"mul_assoc"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
inv_of_eq_right_inv [monoid α] {a b : α} [invertible a] (hac : a * b = 1) : ⅟a = b | left_inv_eq_right_inv (inv_of_mul_self _) hac | lemma | inv_of_eq_right_inv | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"invertible",
"left_inv_eq_right_inv",
"monoid"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
inv_of_eq_left_inv [monoid α] {a b : α} [invertible a] (hac : b * a = 1) : ⅟a = b | (left_inv_eq_right_inv hac (mul_inv_of_self _)).symm | lemma | inv_of_eq_left_inv | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"left_inv_eq_right_inv",
"monoid",
"mul_inv_of_self"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
invertible_unique {α : Type u} [monoid α] (a b : α) [invertible a] [invertible b]
(h : a = b) :
⅟a = ⅟b | by { apply inv_of_eq_right_inv, rw [h, mul_inv_of_self], } | lemma | invertible_unique | 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_inv_of_self"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
invertible.copy' [mul_one_class α] {r : α} (hr : invertible r) (s : α) (si : α)
(hs : s = r) (hsi : si = ⅟r) :
invertible s | { inv_of := si,
inv_of_mul_self := by rw [hs, hsi, inv_of_mul_self],
mul_inv_of_self := by rw [hs, hsi, mul_inv_of_self] } | def | invertible.copy' | 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",
"mul_one_class"
] | If `r` is invertible and `s = r` and `si = ⅟r`, then `s` is invertible with `⅟s = si`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
invertible.copy [mul_one_class α] {r : α} (hr : invertible r) (s : α) (hs : s = r) :
invertible s | hr.copy' _ _ hs rfl | def | invertible.copy | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"mul_one_class"
] | If `r` is invertible and `s = r`, then `s` is invertible. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
unit_of_invertible [monoid α] (a : α) [invertible a] : αˣ | { val := a,
inv := ⅟a,
val_inv := by simp,
inv_val := by simp, } | def | unit_of_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"monoid"
] | An `invertible` element is a unit. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_unit_of_invertible [monoid α] (a : α) [invertible a] : is_unit a | ⟨unit_of_invertible a, rfl⟩ | lemma | is_unit_of_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"is_unit",
"monoid"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
units.invertible [monoid α] (u : αˣ) : invertible (u : α) | { inv_of := ↑(u⁻¹), inv_of_mul_self := u.inv_mul, mul_inv_of_self := u.mul_inv } | def | units.invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_mul_self",
"invertible",
"monoid",
"mul_inv_of_self"
] | Units are invertible in their associated monoid. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_units [monoid α] (u : αˣ) [invertible (u : α)] : ⅟(u : α) = ↑(u⁻¹) | inv_of_eq_right_inv u.mul_inv | lemma | inv_of_units | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"inv_of_eq_right_inv",
"invertible",
"monoid"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_unit.nonempty_invertible [monoid α] {a : α} (h : is_unit a) : nonempty (invertible a) | let ⟨x, hx⟩ := h in ⟨x.invertible.copy _ hx.symm⟩ | lemma | is_unit.nonempty_invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"is_unit",
"monoid"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_unit.invertible [monoid α] {a : α} (h : is_unit a) : invertible a | classical.choice h.nonempty_invertible | def | is_unit.invertible | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"is_unit",
"monoid"
] | Convert `is_unit` to `invertible` using `classical.choice`.
Prefer `casesI h.nonempty_invertible` over `letI := h.invertible` if you want to avoid choice. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
nonempty_invertible_iff_is_unit [monoid α] (a : α) :
nonempty (invertible a) ↔ is_unit a | ⟨nonempty.rec $ @is_unit_of_invertible _ _ _, is_unit.nonempty_invertible⟩ | lemma | nonempty_invertible_iff_is_unit | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"invertible",
"is_unit",
"is_unit_of_invertible",
"monoid"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
invertible_of_group [group α] (a : α) : invertible a | ⟨a⁻¹, inv_mul_self a, mul_inv_self a⟩ | def | invertible_of_group | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"group",
"inv_mul_self",
"invertible",
"mul_inv_self"
] | Each element of a group is invertible. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
inv_of_eq_group_inv [group α] (a : α) [invertible a] : ⅟a = a⁻¹ | inv_of_eq_right_inv (mul_inv_self a) | lemma | inv_of_eq_group_inv | algebra | src/algebra/invertible.lean | [
"algebra.group.units",
"algebra.group_with_zero.units.lemmas",
"algebra.ring.defs"
] | [
"group",
"inv_of_eq_right_inv",
"invertible",
"mul_inv_self"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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 | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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"
] | 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 ⟩ | 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` | 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) | 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"
] | 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] | 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"
] | 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] | 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"
] | 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 ⟩ | 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`. | 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 _) | 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"
] | 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 _ _⟩ | 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"
] | 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] ⟩ | 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` | 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]) | 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"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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. | 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] | 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"
] | 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] | 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"
] | 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 | 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"
] | 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 | 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"
] | 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⟩ | 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"
] | 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] } | 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` | 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] } | 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` | 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 _ _, } | 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. | 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 _ _, } | 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. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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`. | 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 ⟩ | 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` | 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)) | 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"
] | 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) | 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"
] | 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) | 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"
] | 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) | 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"
] | 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) | 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"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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"
] | 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]⟩ | 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` | 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]) | 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"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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⁻¹` | 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] } | 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. | 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 } | 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. | 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 | 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))` | 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 := λ _, 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. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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`. | 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 | lemma | is_prime_pow_def | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"prime"
] | 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⟩⟩ | 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)`. | 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 | 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"
] | 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 | 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"
] | 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 | lemma | is_unit.not_is_prime_pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"is_unit"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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"
] | 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⟩ | lemma | prime.is_prime_pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"prime",
"zero_lt_one"
] | 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]⟩ | lemma | is_prime_pow.pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"pow_mul'"
] | 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 | 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"
] | 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 | 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"
] | 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] | 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"
] | 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 | lemma | nat.prime.is_prime_pow | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow"
] | 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, 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"
] | 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₁,
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"
] | 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_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"
] | 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 | 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"
] | 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 | theorem | is_prime_pow.pos | algebra | src/algebra/is_prime_pow.lean | [
"algebra.associated",
"number_theory.divisors"
] | [
"is_prime_pow",
"pos_of_gt"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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`. | 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 : ℕ)) (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. | 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 | 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`. | 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] } | 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`. | 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_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_l... | 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`. | 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) | 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`. | 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 } | 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 `ℕ → α`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
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. | 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_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`. | 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' ▸ 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`. | 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.