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
rel : (pre R X) → (pre R X) → Prop -- force `of_scalar` to be a central semiring morphism | add_scalar {r s : R} : rel ↑(r + s) (↑r + ↑s) | mul_scalar {r s : R} : rel ↑(r * s) (↑r * ↑s) | central_scalar {r : R} {a : pre R X} : rel (r * a) (a * r) -- commutative additive semigroup | add_assoc {a b c : pre R X} : rel (a ...
rel : (pre R X) → (pre R X) → Prop -- force `of_scalar` to be a central semiring morphism | add_scalar {r s : R} : rel ↑(r + s) (↑r + ↑s) | mul_scalar {r s : R} : rel ↑(r * s) (↑r * ↑s) | central_scalar {r : R} {a : pre R X} : rel (r * a) (a * r) -- commutative additive semigroup | add_assoc {a b c : pre R X} : rel (a ...
inductive
free_algebra.rel
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "left_distrib", "mul_assoc", "mul_one", "mul_zero", "one_mul", "rel", "right_distrib", "zero_mul" ]
An inductively defined relation on `pre R X` used to force the initial algebra structure on the associated quotient.
105
128
false
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
free_algebra := quot (free_algebra.rel R X)
free_algebra
quot (free_algebra.rel R X)
def
free_algebra
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra.rel" ]
The free algebra for the type `X` over the commutative semiring `R`.
135
135
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
: semiring (free_algebra R X) := { add := quot.map₂ (+) (λ _ _ _, rel.add_compat_right) (λ _ _ _, rel.add_compat_left), add_assoc := by { rintros ⟨⟩ ⟨⟩ ⟨⟩, exact quot.sound rel.add_assoc }, zero := quot.mk _ 0, zero_add := by { rintro ⟨⟩, exact quot.sound rel.zero_add }, add_zero := begin rintros ⟨⟩, ch...
: semiring (free_algebra R X)
{ add := quot.map₂ (+) (λ _ _ _, rel.add_compat_right) (λ _ _ _, rel.add_compat_left), add_assoc := by { rintros ⟨⟩ ⟨⟩ ⟨⟩, exact quot.sound rel.add_assoc }, zero := quot.mk _ 0, zero_add := by { rintro ⟨⟩, exact quot.sound rel.zero_add }, add_zero := begin rintros ⟨⟩, change quot.mk _ _ = _, rw [quo...
instance
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "left_distrib", "mul_assoc", "mul_one", "mul_zero", "one_mul", "quot.map₂", "right_distrib", "semiring", "zero_mul" ]
null
143
162
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
: inhabited (free_algebra R X) := ⟨0⟩
: inhabited (free_algebra R X)
⟨0⟩
instance
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra" ]
null
164
164
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
: has_smul R (free_algebra R X) := { smul := λ r, quot.map ((*) ↑r) (λ a b, rel.mul_compat_right) }
: has_smul R (free_algebra R X)
{ smul := λ r, quot.map ((*) ↑r) (λ a b, rel.mul_compat_right) }
instance
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "has_smul", "quot.map" ]
null
166
167
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
: algebra R (free_algebra R X) := { to_fun := λ r, quot.mk _ r, map_one' := rfl, map_mul' := λ _ _, quot.sound rel.mul_scalar, map_zero' := rfl, map_add' := λ _ _, quot.sound rel.add_scalar, commutes' := λ _, by { rintros ⟨⟩, exact quot.sound rel.central_scalar }, smul_def' := λ _ _, rfl }
: algebra R (free_algebra R X)
{ to_fun := λ r, quot.mk _ r, map_one' := rfl, map_mul' := λ _ _, quot.sound rel.mul_scalar, map_zero' := rfl, map_add' := λ _ _, quot.sound rel.add_scalar, commutes' := λ _, by { rintros ⟨⟩, exact quot.sound rel.central_scalar }, smul_def' := λ _ _, rfl }
instance
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "algebra", "free_algebra" ]
null
169
176
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
{S : Type*} [comm_ring S] : ring (free_algebra S X) := algebra.semiring_to_ring S
{S : Type*} [comm_ring S] : ring (free_algebra S X)
algebra.semiring_to_ring S
instance
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "algebra.semiring_to_ring", "comm_ring", "free_algebra", "ring" ]
null
178
178
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ι : X → free_algebra R X := λ m, quot.mk _ m
ι : X → free_algebra R X
λ m, quot.mk _ m
def
free_algebra.ι
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra" ]
The canonical function `X → free_algebra R X`.
185
185
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
quot_mk_eq_ι (m : X) : quot.mk (free_algebra.rel R X) m = ι R m := by rw [ι]
quot_mk_eq_ι (m : X) : quot.mk (free_algebra.rel R X) m = ι R m
by rw [ι]
lemma
free_algebra.quot_mk_eq_ι
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra.rel" ]
null
187
188
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_aux (f : X → A) : (free_algebra R X →ₐ[R] A) := { to_fun := λ a, quot.lift_on a (lift_fun _ _ f) $ λ a b h, begin induction h, { exact (algebra_map R A).map_add h_r h_s, }, { exact (algebra_map R A).map_mul h_r h_s }, { apply algebra.commutes }, { change _ + _ + _ = _ + (_ + _), rw add_...
lift_aux (f : X → A) : (free_algebra R X →ₐ[R] A)
{ to_fun := λ a, quot.lift_on a (lift_fun _ _ f) $ λ a b h, begin induction h, { exact (algebra_map R A).map_add h_r h_s, }, { exact (algebra_map R A).map_mul h_r h_s }, { apply algebra.commutes }, { change _ + _ + _ = _ + (_ + _), rw add_assoc }, { change _ + _ = _ + _, rw add_com...
def
free_algebra.lift_aux
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "algebra.commutes", "algebra_map", "free_algebra", "left_distrib", "map_mul", "mul_assoc", "right_distrib" ]
Internal definition used to define `lift`
193
231
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift : (X → A) ≃ (free_algebra R X →ₐ[R] A) := { to_fun := lift_aux R, inv_fun := λ F, F ∘ (ι R), left_inv := λ f, by {ext, rw [ι], refl}, right_inv := λ F, by { ext x, rcases x, induction x, case pre.of : { change ((F : free_algebra R X → A) ∘ (ι R)) _ = _, rw [ι], refl }, case ...
lift : (X → A) ≃ (free_algebra R X →ₐ[R] A)
{ to_fun := lift_aux R, inv_fun := λ F, F ∘ (ι R), left_inv := λ f, by {ext, rw [ι], refl}, right_inv := λ F, by { ext x, rcases x, induction x, case pre.of : { change ((F : free_algebra R X → A) ∘ (ι R)) _ = _, rw [ι], refl }, case pre.of_scalar : { change algebra_map _ _ x ...
def
free_algebra.lift
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "alg_hom.commutes", "alg_hom.map_add", "alg_hom.map_mul", "algebra_map", "free_algebra", "inv_fun", "lift" ]
Given a function `f : X → A` where `A` is an `R`-algebra, `lift R f` is the unique lift of `f` to a morphism of `R`-algebras `free_algebra R X → A`.
237
257
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_aux_eq (f : X → A) : lift_aux R f = lift R f := by { rw [lift], refl }
lift_aux_eq (f : X → A) : lift_aux R f = lift R f
by { rw [lift], refl }
lemma
free_algebra.lift_aux_eq
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "lift" ]
null
259
260
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_symm_apply (F : free_algebra R X →ₐ[R] A) : (lift R).symm F = F ∘ (ι R) := by { rw [lift], refl }
lift_symm_apply (F : free_algebra R X →ₐ[R] A) : (lift R).symm F = F ∘ (ι R)
by { rw [lift], refl }
lemma
free_algebra.lift_symm_apply
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "lift" ]
null
262
264
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ι_comp_lift (f : X → A) : (lift R f : free_algebra R X → A) ∘ (ι R) = f := by { ext, rw [ι, lift], refl }
ι_comp_lift (f : X → A) : (lift R f : free_algebra R X → A) ∘ (ι R) = f
by { ext, rw [ι, lift], refl }
theorem
free_algebra.ι_comp_lift
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "lift" ]
null
268
271
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_ι_apply (f : X → A) (x) : lift R f (ι R x) = f x := by { rw [ι, lift], refl }
lift_ι_apply (f : X → A) (x) : lift R f (ι R x) = f x
by { rw [ι, lift], refl }
theorem
free_algebra.lift_ι_apply
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "lift" ]
null
273
276
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_unique (f : X → A) (g : free_algebra R X →ₐ[R] A) : (g : free_algebra R X → A) ∘ (ι R) = f ↔ g = lift R f := by { rw [← (lift R).symm_apply_eq, lift], refl }
lift_unique (f : X → A) (g : free_algebra R X →ₐ[R] A) : (g : free_algebra R X → A) ∘ (ι R) = f ↔ g = lift R f
by { rw [← (lift R).symm_apply_eq, lift], refl }
theorem
free_algebra.lift_unique
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "lift", "lift_unique" ]
null
278
281
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_comp_ι (g : free_algebra R X →ₐ[R] A) : lift R ((g : free_algebra R X → A) ∘ (ι R)) = g := by { rw ←lift_symm_apply, exact (lift R).apply_symm_apply g }
lift_comp_ι (g : free_algebra R X →ₐ[R] A) : lift R ((g : free_algebra R X → A) ∘ (ι R)) = g
by { rw ←lift_symm_apply, exact (lift R).apply_symm_apply g }
theorem
free_algebra.lift_comp_ι
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "lift" ]
null
292
295
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
hom_ext {f g : free_algebra R X →ₐ[R] A} (w : ((f : free_algebra R X → A) ∘ (ι R)) = ((g : free_algebra R X → A) ∘ (ι R))) : f = g := begin rw [←lift_symm_apply, ←lift_symm_apply] at w, exact (lift R).symm.injective w, end
hom_ext {f g : free_algebra R X →ₐ[R] A} (w : ((f : free_algebra R X → A) ∘ (ι R)) = ((g : free_algebra R X → A) ∘ (ι R))) : f = g
begin rw [←lift_symm_apply, ←lift_symm_apply] at w, exact (lift R).symm.injective w, end
theorem
free_algebra.hom_ext
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "hom_ext", "lift" ]
See note [partially-applied ext lemmas].
298
304
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
equiv_monoid_algebra_free_monoid : free_algebra R X ≃ₐ[R] monoid_algebra R (free_monoid X) := alg_equiv.of_alg_hom (lift R (λ x, (monoid_algebra.of R (free_monoid X)) (free_monoid.of x))) ((monoid_algebra.lift R (free_monoid X) (free_algebra R X)) (free_monoid.lift (ι R))) begin apply monoid_algebra.alg_hom_ext, ...
equiv_monoid_algebra_free_monoid : free_algebra R X ≃ₐ[R] monoid_algebra R (free_monoid X)
alg_equiv.of_alg_hom (lift R (λ x, (monoid_algebra.of R (free_monoid X)) (free_monoid.of x))) ((monoid_algebra.lift R (free_monoid X) (free_algebra R X)) (free_monoid.lift (ι R))) begin apply monoid_algebra.alg_hom_ext, intro x, apply free_monoid.rec_on x, { simp, refl, }, { intros x y ih, simp at ih, simp ...
def
free_algebra.equiv_monoid_algebra_free_monoid
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "alg_equiv.of_alg_hom", "free_algebra", "free_monoid", "free_monoid.lift", "free_monoid.of", "free_monoid.rec_on", "ih", "lift", "monoid_algebra", "monoid_algebra.alg_hom_ext", "monoid_algebra.lift", "monoid_algebra.of" ]
The free algebra on `X` is "just" the monoid algebra on the free monoid on `X`. This would be useful when constructing linear maps out of a free algebra, for example.
312
323
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
[nontrivial R] : nontrivial (free_algebra R X) := equiv_monoid_algebra_free_monoid.surjective.nontrivial
[nontrivial R] : nontrivial (free_algebra R X)
equiv_monoid_algebra_free_monoid.surjective.nontrivial
instance
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "nontrivial" ]
null
325
326
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra_map_inv : free_algebra R X →ₐ[R] R := lift R (0 : X → R)
algebra_map_inv : free_algebra R X →ₐ[R] R
lift R (0 : X → R)
def
free_algebra.algebra_map_inv
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "lift" ]
The left-inverse of `algebra_map`.
331
332
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra_map_left_inverse : function.left_inverse algebra_map_inv (algebra_map R $ free_algebra R X) := λ x, by simp [algebra_map_inv]
algebra_map_left_inverse : function.left_inverse algebra_map_inv (algebra_map R $ free_algebra R X)
λ x, by simp [algebra_map_inv]
lemma
free_algebra.algebra_map_left_inverse
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "algebra_map", "free_algebra" ]
null
334
336
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra_map_inj (x y : R) : algebra_map R (free_algebra R X) x = algebra_map R (free_algebra R X) y ↔ x = y := algebra_map_left_inverse.injective.eq_iff
algebra_map_inj (x y : R) : algebra_map R (free_algebra R X) x = algebra_map R (free_algebra R X) y ↔ x = y
algebra_map_left_inverse.injective.eq_iff
lemma
free_algebra.algebra_map_inj
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "algebra_map", "free_algebra" ]
null
338
340
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra_map_eq_zero_iff (x : R) : algebra_map R (free_algebra R X) x = 0 ↔ x = 0 := map_eq_zero_iff (algebra_map _ _) algebra_map_left_inverse.injective
algebra_map_eq_zero_iff (x : R) : algebra_map R (free_algebra R X) x = 0 ↔ x = 0
map_eq_zero_iff (algebra_map _ _) algebra_map_left_inverse.injective
lemma
free_algebra.algebra_map_eq_zero_iff
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "algebra_map", "free_algebra" ]
null
342
343
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
algebra_map_eq_one_iff (x : R) : algebra_map R (free_algebra R X) x = 1 ↔ x = 1 := map_eq_one_iff (algebra_map _ _) algebra_map_left_inverse.injective
algebra_map_eq_one_iff (x : R) : algebra_map R (free_algebra R X) x = 1 ↔ x = 1
map_eq_one_iff (algebra_map _ _) algebra_map_left_inverse.injective
lemma
free_algebra.algebra_map_eq_one_iff
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "algebra_map", "free_algebra", "map_eq_one_iff" ]
null
345
346
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ι_injective [nontrivial R] : function.injective (ι R : X → free_algebra R X) := λ x y hoxy, classical.by_contradiction $ by classical; exact assume hxy : x ≠ y, let f : free_algebra R X →ₐ[R] R := lift R (λ z, if x = z then (1 : R) else 0) in have hfx1 : f (ι R x) = 1, from (lift_ι_apply _ _).trans $ if_pos rfl...
ι_injective [nontrivial R] : function.injective (ι R : X → free_algebra R X)
λ x y hoxy, classical.by_contradiction $ by classical; exact assume hxy : x ≠ y, let f : free_algebra R X →ₐ[R] R := lift R (λ z, if x = z then (1 : R) else 0) in have hfx1 : f (ι R x) = 1, from (lift_ι_apply _ _).trans $ if_pos rfl, have hfy1 : f (ι R y) = 1, from hoxy ▸ hfx1, have hfy0 : f (ι R y) = 0, fr...
lemma
free_algebra.ι_injective
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "free_algebra", "lift", "nontrivial", "one_ne_zero" ]
null
349
356
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ι_inj [nontrivial R] (x y : X) : ι R x = ι R y ↔ x = y := ι_injective.eq_iff
ι_inj [nontrivial R] (x y : X) : ι R x = ι R y ↔ x = y
ι_injective.eq_iff
lemma
free_algebra.ι_inj
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "nontrivial" ]
null
358
359
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ι_ne_algebra_map [nontrivial R] (x : X) (r : R) : ι R x ≠ algebra_map R _ r := λ h, let f0 : free_algebra R X →ₐ[R] R := lift R 0 in let f1 : free_algebra R X →ₐ[R] R := lift R 1 in have hf0 : f0 (ι R x) = 0, from lift_ι_apply _ _, have hf1 : f1 (ι R x) = 1, from lift_ι_apply _ _, begin rw [h, f0.commutes...
ι_ne_algebra_map [nontrivial R] (x : X) (r : R) : ι R x ≠ algebra_map R _ r
λ h, let f0 : free_algebra R X →ₐ[R] R := lift R 0 in let f1 : free_algebra R X →ₐ[R] R := lift R 1 in have hf0 : f0 (ι R x) = 0, from lift_ι_apply _ _, have hf1 : f1 (ι R x) = 1, from lift_ι_apply _ _, begin rw [h, f0.commutes, algebra.id.map_eq_self] at hf0, rw [h, f1.commutes, algebra.id.map_eq_sel...
lemma
free_algebra.ι_ne_algebra_map
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "algebra.id.map_eq_self", "algebra_map", "free_algebra", "lift", "nontrivial", "zero_ne_one" ]
null
361
371
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ι_ne_zero [nontrivial R] (x : X) : ι R x ≠ 0 := ι_ne_algebra_map x 0
ι_ne_zero [nontrivial R] (x : X) : ι R x ≠ 0
ι_ne_algebra_map x 0
lemma
free_algebra.ι_ne_zero
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "nontrivial" ]
null
373
374
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ι_ne_one [nontrivial R] (x : X) : ι R x ≠ 1 := ι_ne_algebra_map x 1
ι_ne_one [nontrivial R] (x : X) : ι R x ≠ 1
ι_ne_algebra_map x 1
lemma
free_algebra.ι_ne_one
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "nontrivial" ]
null
376
377
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induction {C : free_algebra R X → Prop} (h_grade0 : ∀ r, C (algebra_map R (free_algebra R X) r)) (h_grade1 : ∀ x, C (ι R x)) (h_mul : ∀ a b, C a → C b → C (a * b)) (h_add : ∀ a b, C a → C b → C (a + b)) (a : free_algebra R X) : C a := begin -- the arguments are enough to construct a subalgebra, and a mapp...
induction {C : free_algebra R X → Prop} (h_grade0 : ∀ r, C (algebra_map R (free_algebra R X) r)) (h_grade1 : ∀ x, C (ι R x)) (h_mul : ∀ a b, C a → C b → C (a * b)) (h_add : ∀ a b, C a → C b → C (a + b)) (a : free_algebra R X) : C a
begin -- the arguments are enough to construct a subalgebra, and a mapping into it from X let s : subalgebra R (free_algebra R X) := { carrier := C, mul_mem' := h_mul, add_mem' := h_add, algebra_map_mem' := h_grade0, }, let of : X → s := subtype.coind (ι R) h_grade1, -- the mapping through the sub...
lemma
free_algebra.induction
algebra
src/algebra/free_algebra.lean
[ "algebra.algebra.subalgebra.basic", "algebra.monoid_algebra.basic" ]
[ "alg_hom.ext_iff", "alg_hom.id", "algebra_map", "free_algebra", "lift", "subalgebra", "subtype.coind", "subtype.prop" ]
An induction principle for the free algebra. If `C` holds for the `algebra_map` of `r : R` into `free_algebra R X`, the `ι` of `x : X`, and is preserved under addition and muliplication, then it holds for all of `free_algebra R X`.
392
416
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
free_non_unital_non_assoc_algebra := monoid_algebra R (free_magma X)
free_non_unital_non_assoc_algebra
monoid_algebra R (free_magma X)
abbreviation
free_non_unital_non_assoc_algebra
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "free_magma", "monoid_algebra" ]
The free non-unital, non-associative algebra on the type `X` with coefficients in `R`.
48
48
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of : X → free_non_unital_non_assoc_algebra R X := (monoid_algebra.of_magma R _) ∘ free_magma.of
of : X → free_non_unital_non_assoc_algebra R X
(monoid_algebra.of_magma R _) ∘ free_magma.of
def
free_non_unital_non_assoc_algebra.of
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "free_non_unital_non_assoc_algebra", "monoid_algebra.of_magma" ]
The embedding of `X` into the free algebra with coefficients in `R`.
55
56
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift : (X → A) ≃ (free_non_unital_non_assoc_algebra R X →ₙₐ[R] A) := free_magma.lift.trans (monoid_algebra.lift_magma R)
lift : (X → A) ≃ (free_non_unital_non_assoc_algebra R X →ₙₐ[R] A)
free_magma.lift.trans (monoid_algebra.lift_magma R)
def
free_non_unital_non_assoc_algebra.lift
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "free_non_unital_non_assoc_algebra", "lift", "monoid_algebra.lift_magma" ]
The functor `X ↦ free_non_unital_non_assoc_algebra R X` from the category of types to the category of non-unital, non-associative algebras over `R` is adjoint to the forgetful functor in the other direction.
64
65
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_symm_apply (F : free_non_unital_non_assoc_algebra R X →ₙₐ[R] A) : (lift R).symm F = F ∘ (of R) := rfl
lift_symm_apply (F : free_non_unital_non_assoc_algebra R X →ₙₐ[R] A) : (lift R).symm F = F ∘ (of R)
rfl
lemma
free_non_unital_non_assoc_algebra.lift_symm_apply
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "free_non_unital_non_assoc_algebra", "lift" ]
null
67
69
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_comp_lift (f : X → A) : (lift R f) ∘ (of R) = f := (lift R).left_inv f
of_comp_lift (f : X → A) : (lift R f) ∘ (of R) = f
(lift R).left_inv f
lemma
free_non_unital_non_assoc_algebra.of_comp_lift
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "lift" ]
null
71
72
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_unique (f : X → A) (F : free_non_unital_non_assoc_algebra R X →ₙₐ[R] A) : F ∘ (of R) = f ↔ F = lift R f := (lift R).symm_apply_eq
lift_unique (f : X → A) (F : free_non_unital_non_assoc_algebra R X →ₙₐ[R] A) : F ∘ (of R) = f ↔ F = lift R f
(lift R).symm_apply_eq
lemma
free_non_unital_non_assoc_algebra.lift_unique
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "free_non_unital_non_assoc_algebra", "lift", "lift_unique" ]
null
74
77
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_of_apply (f : X → A) (x) : lift R f (of R x) = f x := congr_fun (of_comp_lift _ f) x
lift_of_apply (f : X → A) (x) : lift R f (of R x) = f x
congr_fun (of_comp_lift _ f) x
lemma
free_non_unital_non_assoc_algebra.lift_of_apply
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "lift" ]
null
79
80
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lift_comp_of (F : free_non_unital_non_assoc_algebra R X →ₙₐ[R] A) : lift R (F ∘ (of R)) = F := (lift R).apply_symm_apply F
lift_comp_of (F : free_non_unital_non_assoc_algebra R X →ₙₐ[R] A) : lift R (F ∘ (of R)) = F
(lift R).apply_symm_apply F
lemma
free_non_unital_non_assoc_algebra.lift_comp_of
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "free_non_unital_non_assoc_algebra", "lift" ]
null
82
84
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
hom_ext {F₁ F₂ : free_non_unital_non_assoc_algebra R X →ₙₐ[R] A} (h : ∀ x, F₁ (of R x) = F₂ (of R x)) : F₁ = F₂ := (lift R).symm.injective $ funext h
hom_ext {F₁ F₂ : free_non_unital_non_assoc_algebra R X →ₙₐ[R] A} (h : ∀ x, F₁ (of R x) = F₂ (of R x)) : F₁ = F₂
(lift R).symm.injective $ funext h
lemma
free_non_unital_non_assoc_algebra.hom_ext
algebra
src/algebra/free_non_unital_non_assoc_algebra.lean
[ "algebra.free", "algebra.monoid_algebra.basic" ]
[ "free_non_unital_non_assoc_algebra", "hom_ext", "lift" ]
null
86
88
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_succ {x : α} {n : ℕ} : ∑ i in range (n + 1), x ^ i = x * ∑ i in range n, x ^ i + 1 := by simp only [mul_sum, ←pow_succ, sum_range_succ', pow_zero]
geom_sum_succ {x : α} {n : ℕ} : ∑ i in range (n + 1), x ^ i = x * ∑ i in range n, x ^ i + 1
by simp only [mul_sum, ←pow_succ, sum_range_succ', pow_zero]
lemma
geom_sum_succ
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "pow_zero" ]
null
43
45
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_succ' {x : α} {n : ℕ} : ∑ i in range (n + 1), x ^ i = x ^ n + ∑ i in range n, x ^ i := (sum_range_succ _ _).trans (add_comm _ _)
geom_sum_succ' {x : α} {n : ℕ} : ∑ i in range (n + 1), x ^ i = x ^ n + ∑ i in range n, x ^ i
(sum_range_succ _ _).trans (add_comm _ _)
lemma
geom_sum_succ'
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[]
null
47
49
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_zero (x : α) : ∑ i in range 0, x ^ i = 0 := rfl
geom_sum_zero (x : α) : ∑ i in range 0, x ^ i = 0
rfl
theorem
geom_sum_zero
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[]
null
51
52
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_one (x : α) : ∑ i in range 1, x ^ i = 1 := by simp [geom_sum_succ']
geom_sum_one (x : α) : ∑ i in range 1, x ^ i = 1
by simp [geom_sum_succ']
theorem
geom_sum_one
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_succ'" ]
null
54
56
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_two {x : α} : ∑ i in range 2, x ^ i = x + 1 := by simp [geom_sum_succ']
geom_sum_two {x : α} : ∑ i in range 2, x ^ i = x + 1
by simp [geom_sum_succ']
lemma
geom_sum_two
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_succ'" ]
null
58
59
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zero_geom_sum : ∀ {n}, ∑ i in range n, (0 : α) ^ i = if n = 0 then 0 else 1 | 0 := by simp | 1 := by simp | (n+2) := by { rw geom_sum_succ', simp [zero_geom_sum] }
zero_geom_sum : ∀ {n}, ∑ i in range n, (0 : α) ^ i = if n = 0 then 0 else 1 | 0
by simp | 1 := by simp | (n+2) := by { rw geom_sum_succ', simp [zero_geom_sum] }
lemma
zero_geom_sum
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_succ'" ]
null
61
64
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
one_geom_sum (n : ℕ) : ∑ i in range n, (1 : α) ^ i = n := by simp
one_geom_sum (n : ℕ) : ∑ i in range n, (1 : α) ^ i = n
by simp
lemma
one_geom_sum
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[]
null
66
67
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
op_geom_sum (x : α) (n : ℕ) : op (∑ i in range n, x ^ i) = ∑ i in range n, (op x) ^ i := by simp
op_geom_sum (x : α) (n : ℕ) : op (∑ i in range n, x ^ i) = ∑ i in range n, (op x) ^ i
by simp
lemma
op_geom_sum
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[]
null
69
71
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
op_geom_sum₂ (x y : α) (n : ℕ) : op (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = ∑ i in range n, (op y) ^ i * ((op x) ^ (n - 1 - i)) := begin simp only [op_sum, op_mul, op_pow], rw ← sum_range_reflect, refine sum_congr rfl (λ j j_in, _), rw [mem_range, nat.lt_iff_add_one_le] at j_in, congr, apply tsu...
op_geom_sum₂ (x y : α) (n : ℕ) : op (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = ∑ i in range n, (op y) ^ i * ((op x) ^ (n - 1 - i))
begin simp only [op_sum, op_mul, op_pow], rw ← sum_range_reflect, refine sum_congr rfl (λ j j_in, _), rw [mem_range, nat.lt_iff_add_one_le] at j_in, congr, apply tsub_tsub_cancel_of_le, exact le_tsub_of_add_le_right j_in end
lemma
op_geom_sum₂
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "le_tsub_of_add_le_right", "nat.lt_iff_add_one_le", "tsub_tsub_cancel_of_le" ]
null
73
84
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum₂_with_one (x : α) (n : ℕ) : ∑ i in range n, x ^ i * (1 ^ (n - 1 - i)) = ∑ i in range n, x ^ i := sum_congr rfl (λ i _, by { rw [one_pow, mul_one] })
geom_sum₂_with_one (x : α) (n : ℕ) : ∑ i in range n, x ^ i * (1 ^ (n - 1 - i)) = ∑ i in range n, x ^ i
sum_congr rfl (λ i _, by { rw [one_pow, mul_one] })
theorem
geom_sum₂_with_one
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "mul_one", "one_pow" ]
null
86
88
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.geom_sum₂_mul_add {x y : α} (h : commute x y) (n : ℕ) : (∑ i in range n, (x + y) ^ i * (y ^ (n - 1 - i))) * x + y ^ n = (x + y) ^ n := begin let f := λ (m i : ℕ), (x + y) ^ i * y ^ (m - 1 - i), change (∑ i in range n, (f n) i) * x + y ^ n = (x + y) ^ n, induction n with n ih, { rw [range_zero, sum_emp...
commute.geom_sum₂_mul_add {x y : α} (h : commute x y) (n : ℕ) : (∑ i in range n, (x + y) ^ i * (y ^ (n - 1 - i))) * x + y ^ n = (x + y) ^ n
begin let f := λ (m i : ℕ), (x + y) ^ i * y ^ (m - 1 - i), change (∑ i in range n, (f n) i) * x + y ^ n = (x + y) ^ n, induction n with n ih, { rw [range_zero, sum_empty, zero_mul, zero_add, pow_zero, pow_zero] }, { have f_last : f (n + 1) n = (x + y) ^ n := by { dsimp [f], rw [← tsub_add_eq_ts...
theorem
commute.geom_sum₂_mul_add
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "add_tsub_cancel_of_le", "add_tsub_cancel_right", "commute", "commute.refl", "ih", "mul_assoc", "mul_one", "pow_succ", "pow_zero", "tsub_add_eq_tsub_tsub", "tsub_self", "zero_mul" ]
$x^n-y^n = (x-y) \sum x^ky^{n-1-k}$ reformulated without `-` signs.
91
117
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
neg_one_geom_sum [ring α] {n : ℕ} : ∑ i in range n, (-1 : α) ^ i = if even n then 0 else 1 := begin induction n with k hk, { simp }, { simp only [geom_sum_succ', nat.even_add_one, hk], split_ifs, { rw [h.neg_one_pow, add_zero] }, { rw [(nat.odd_iff_not_even.2 h).neg_one_pow, neg_add_self] } } end
neg_one_geom_sum [ring α] {n : ℕ} : ∑ i in range n, (-1 : α) ^ i = if even n then 0 else 1
begin induction n with k hk, { simp }, { simp only [geom_sum_succ', nat.even_add_one, hk], split_ifs, { rw [h.neg_one_pow, add_zero] }, { rw [(nat.odd_iff_not_even.2 h).neg_one_pow, neg_add_self] } } end
lemma
neg_one_geom_sum
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_succ'", "nat.even_add_one", "ring" ]
null
121
130
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum₂_self {α : Type*} [comm_ring α] (x : α) (n : ℕ) : ∑ i in range n, x ^ i * (x ^ (n - 1 - i)) = n * x ^ (n-1) := calc ∑ i in finset.range n, x ^ i * x ^ (n - 1 - i) = ∑ i in finset.range n, x ^ (i + (n - 1 - i)) : by simp_rw [← pow_add] ... = ∑ i in finset.range n, x ^ (n - 1) : finset.sum_congr rfl (λ ...
geom_sum₂_self {α : Type*} [comm_ring α] (x : α) (n : ℕ) : ∑ i in range n, x ^ i * (x ^ (n - 1 - i)) = n * x ^ (n-1)
calc ∑ i in finset.range n, x ^ i * x ^ (n - 1 - i) = ∑ i in finset.range n, x ^ (i + (n - 1 - i)) : by simp_rw [← pow_add] ... = ∑ i in finset.range n, x ^ (n - 1) : finset.sum_congr rfl (λ i hi, congr_arg _ $ add_tsub_cancel_of_le $ nat.le_pred_of_lt $ finset.mem_range.1 hi) ... = (finset.range n).card • (x ^ ...
theorem
geom_sum₂_self
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "add_tsub_cancel_of_le", "comm_ring", "finset.card_range", "finset.range", "nat.le_pred_of_lt", "nsmul_eq_mul", "pow_add" ]
null
132
139
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum₂_mul_add [comm_semiring α] (x y : α) (n : ℕ) : (∑ i in range n, (x + y) ^ i * (y ^ (n - 1 - i))) * x + y ^ n = (x + y) ^ n := (commute.all x y).geom_sum₂_mul_add n
geom_sum₂_mul_add [comm_semiring α] (x y : α) (n : ℕ) : (∑ i in range n, (x + y) ^ i * (y ^ (n - 1 - i))) * x + y ^ n = (x + y) ^ n
(commute.all x y).geom_sum₂_mul_add n
theorem
geom_sum₂_mul_add
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "comm_semiring", "commute.all" ]
$x^n-y^n = (x-y) \sum x^ky^{n-1-k}$ reformulated without `-` signs.
142
144
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_mul_add [semiring α] (x : α) (n : ℕ) : (∑ i in range n, (x + 1) ^ i) * x + 1 = (x + 1) ^ n := begin have := (commute.one_right x).geom_sum₂_mul_add n, rw [one_pow, geom_sum₂_with_one] at this, exact this end
geom_sum_mul_add [semiring α] (x : α) (n : ℕ) : (∑ i in range n, (x + 1) ^ i) * x + 1 = (x + 1) ^ n
begin have := (commute.one_right x).geom_sum₂_mul_add n, rw [one_pow, geom_sum₂_with_one] at this, exact this end
theorem
geom_sum_mul_add
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute.one_right", "geom_sum₂_mul_add", "geom_sum₂_with_one", "one_pow", "semiring" ]
null
146
152
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.geom_sum₂_mul [ring α] {x y : α} (h : commute x y) (n : ℕ) : (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) * (x - y) = x ^ n - y ^ n := begin have := (h.sub_left (commute.refl y)).geom_sum₂_mul_add n, rw [sub_add_cancel] at this, rw [← this, add_sub_cancel] end
commute.geom_sum₂_mul [ring α] {x y : α} (h : commute x y) (n : ℕ) : (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) * (x - y) = x ^ n - y ^ n
begin have := (h.sub_left (commute.refl y)).geom_sum₂_mul_add n, rw [sub_add_cancel] at this, rw [← this, add_sub_cancel] end
theorem
commute.geom_sum₂_mul
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute", "commute.refl", "geom_sum₂_mul_add", "ring" ]
null
154
160
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.mul_neg_geom_sum₂ [ring α] {x y : α} (h : commute x y) (n : ℕ) : (y - x) * (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = y ^ n - x ^ n := begin apply op_injective, simp only [op_mul, op_sub, op_geom_sum₂, op_pow], exact (commute.op h.symm).geom_sum₂_mul n end
commute.mul_neg_geom_sum₂ [ring α] {x y : α} (h : commute x y) (n : ℕ) : (y - x) * (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = y ^ n - x ^ n
begin apply op_injective, simp only [op_mul, op_sub, op_geom_sum₂, op_pow], exact (commute.op h.symm).geom_sum₂_mul n end
lemma
commute.mul_neg_geom_sum₂
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute", "commute.op", "geom_sum₂_mul", "op_geom_sum₂", "ring" ]
null
162
168
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.mul_geom_sum₂ [ring α] {x y : α} (h : commute x y) (n : ℕ) : (x - y) * (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = x ^ n - y ^ n := by rw [← neg_sub (y ^ n), ← h.mul_neg_geom_sum₂, ← neg_mul, neg_sub]
commute.mul_geom_sum₂ [ring α] {x y : α} (h : commute x y) (n : ℕ) : (x - y) * (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = x ^ n - y ^ n
by rw [← neg_sub (y ^ n), ← h.mul_neg_geom_sum₂, ← neg_mul, neg_sub]
lemma
commute.mul_geom_sum₂
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute", "neg_mul", "ring" ]
null
170
172
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum₂_mul [comm_ring α] (x y : α) (n : ℕ) : (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) * (x - y) = x ^ n - y ^ n := (commute.all x y).geom_sum₂_mul n
geom_sum₂_mul [comm_ring α] (x y : α) (n : ℕ) : (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) * (x - y) = x ^ n - y ^ n
(commute.all x y).geom_sum₂_mul n
theorem
geom_sum₂_mul
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "comm_ring", "commute.all" ]
null
174
176
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_dvd_pow_sub_pow [comm_ring α] (x y : α) (n : ℕ) : x - y ∣ x ^ n - y ^ n := dvd.intro_left _ (geom_sum₂_mul x y n)
sub_dvd_pow_sub_pow [comm_ring α] (x y : α) (n : ℕ) : x - y ∣ x ^ n - y ^ n
dvd.intro_left _ (geom_sum₂_mul x y n)
theorem
sub_dvd_pow_sub_pow
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "comm_ring", "dvd.intro_left", "geom_sum₂_mul" ]
null
178
179
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nat_sub_dvd_pow_sub_pow (x y n : ℕ) : x - y ∣ x ^ n - y ^ n := begin cases le_or_lt y x with h, { have : y ^ n ≤ x ^ n := nat.pow_le_pow_of_le_left h _, exact_mod_cast sub_dvd_pow_sub_pow (x : ℤ) ↑y n }, { have : x ^ n ≤ y ^ n := nat.pow_le_pow_of_le_left h.le _, exact (nat.sub_eq_zero_of_le this).symm ▸ ...
nat_sub_dvd_pow_sub_pow (x y n : ℕ) : x - y ∣ x ^ n - y ^ n
begin cases le_or_lt y x with h, { have : y ^ n ≤ x ^ n := nat.pow_le_pow_of_le_left h _, exact_mod_cast sub_dvd_pow_sub_pow (x : ℤ) ↑y n }, { have : x ^ n ≤ y ^ n := nat.pow_le_pow_of_le_left h.le _, exact (nat.sub_eq_zero_of_le this).symm ▸ dvd_zero (x - y) } end
theorem
nat_sub_dvd_pow_sub_pow
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "dvd_zero", "nat.pow_le_pow_of_le_left", "sub_dvd_pow_sub_pow" ]
null
181
188
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
odd.add_dvd_pow_add_pow [comm_ring α] (x y : α) {n : ℕ} (h : odd n) : x + y ∣ x ^ n + y ^ n := begin have h₁ := geom_sum₂_mul x (-y) n, rw [odd.neg_pow h y, sub_neg_eq_add, sub_neg_eq_add] at h₁, exact dvd.intro_left _ h₁, end
odd.add_dvd_pow_add_pow [comm_ring α] (x y : α) {n : ℕ} (h : odd n) : x + y ∣ x ^ n + y ^ n
begin have h₁ := geom_sum₂_mul x (-y) n, rw [odd.neg_pow h y, sub_neg_eq_add, sub_neg_eq_add] at h₁, exact dvd.intro_left _ h₁, end
theorem
odd.add_dvd_pow_add_pow
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "comm_ring", "dvd.intro_left", "geom_sum₂_mul", "odd", "odd.neg_pow" ]
null
190
196
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
odd.nat_add_dvd_pow_add_pow (x y : ℕ) {n : ℕ} (h : odd n) : x + y ∣ x ^ n + y ^ n := by exact_mod_cast odd.add_dvd_pow_add_pow (x : ℤ) ↑y h
odd.nat_add_dvd_pow_add_pow (x y : ℕ) {n : ℕ} (h : odd n) : x + y ∣ x ^ n + y ^ n
by exact_mod_cast odd.add_dvd_pow_add_pow (x : ℤ) ↑y h
theorem
odd.nat_add_dvd_pow_add_pow
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "odd", "odd.add_dvd_pow_add_pow" ]
null
198
199
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_mul [ring α] (x : α) (n : ℕ) : (∑ i in range n, x ^ i) * (x - 1) = x ^ n - 1 := begin have := (commute.one_right x).geom_sum₂_mul n, rw [one_pow, geom_sum₂_with_one] at this, exact this end
geom_sum_mul [ring α] (x : α) (n : ℕ) : (∑ i in range n, x ^ i) * (x - 1) = x ^ n - 1
begin have := (commute.one_right x).geom_sum₂_mul n, rw [one_pow, geom_sum₂_with_one] at this, exact this end
theorem
geom_sum_mul
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute.one_right", "geom_sum₂_mul", "geom_sum₂_with_one", "one_pow", "ring" ]
null
201
207
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_geom_sum [ring α] (x : α) (n : ℕ) : (x - 1) * (∑ i in range n, x ^ i) = x ^ n - 1 := op_injective $ by simpa using geom_sum_mul (op x) n
mul_geom_sum [ring α] (x : α) (n : ℕ) : (x - 1) * (∑ i in range n, x ^ i) = x ^ n - 1
op_injective $ by simpa using geom_sum_mul (op x) n
lemma
mul_geom_sum
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_mul", "ring" ]
null
209
211
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_mul_neg [ring α] (x : α) (n : ℕ) : (∑ i in range n, x ^ i) * (1 - x) = 1 - x ^ n := begin have := congr_arg has_neg.neg (geom_sum_mul x n), rw [neg_sub, ← mul_neg, neg_sub] at this, exact this end
geom_sum_mul_neg [ring α] (x : α) (n : ℕ) : (∑ i in range n, x ^ i) * (1 - x) = 1 - x ^ n
begin have := congr_arg has_neg.neg (geom_sum_mul x n), rw [neg_sub, ← mul_neg, neg_sub] at this, exact this end
theorem
geom_sum_mul_neg
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_mul", "mul_neg", "ring" ]
null
213
219
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_neg_geom_sum [ring α] (x : α) (n : ℕ) : (1 - x) * (∑ i in range n, x ^ i) = 1 - x ^ n := op_injective $ by simpa using geom_sum_mul_neg (op x) n
mul_neg_geom_sum [ring α] (x : α) (n : ℕ) : (1 - x) * (∑ i in range n, x ^ i) = 1 - x ^ n
op_injective $ by simpa using geom_sum_mul_neg (op x) n
lemma
mul_neg_geom_sum
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_mul_neg", "ring" ]
null
221
223
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.geom_sum₂_comm {α : Type u} [semiring α] {x y : α} (n : ℕ) (h : commute x y) : ∑ i in range n, x ^ i * y ^ (n - 1 - i) = ∑ i in range n, y ^ i * x ^ (n - 1 - i) := begin cases n, { simp }, simp only [nat.succ_eq_add_one, nat.add_sub_cancel], rw ← finset.sum_flip, refine finset.sum_congr rfl (λ i hi,...
commute.geom_sum₂_comm {α : Type u} [semiring α] {x y : α} (n : ℕ) (h : commute x y) : ∑ i in range n, x ^ i * y ^ (n - 1 - i) = ∑ i in range n, y ^ i * x ^ (n - 1 - i)
begin cases n, { simp }, simp only [nat.succ_eq_add_one, nat.add_sub_cancel], rw ← finset.sum_flip, refine finset.sum_congr rfl (λ i hi, _), simpa [nat.sub_sub_self (nat.succ_le_succ_iff.mp (finset.mem_range.mp hi))] using h.pow_pow _ _ end
lemma
commute.geom_sum₂_comm
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute", "semiring" ]
null
225
234
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum₂_comm {α : Type u} [comm_semiring α] (x y : α) (n : ℕ) : ∑ i in range n, x ^ i * y ^ (n - 1 - i) = ∑ i in range n, y ^ i * x ^ (n - 1 - i) := (commute.all x y).geom_sum₂_comm n
geom_sum₂_comm {α : Type u} [comm_semiring α] (x y : α) (n : ℕ) : ∑ i in range n, x ^ i * y ^ (n - 1 - i) = ∑ i in range n, y ^ i * x ^ (n - 1 - i)
(commute.all x y).geom_sum₂_comm n
lemma
geom_sum₂_comm
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "comm_semiring", "commute.all" ]
null
236
238
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.geom_sum₂ [division_ring α] {x y : α} (h' : commute x y) (h : x ≠ y) (n : ℕ) : (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = (x ^ n - y ^ n) / (x - y) := have x - y ≠ 0, by simp [*, -sub_eq_add_neg, sub_eq_iff_eq_add] at *, by rw [← h'.geom_sum₂_mul, mul_div_cancel _ this]
commute.geom_sum₂ [division_ring α] {x y : α} (h' : commute x y) (h : x ≠ y) (n : ℕ) : (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = (x ^ n - y ^ n) / (x - y)
have x - y ≠ 0, by simp [*, -sub_eq_add_neg, sub_eq_iff_eq_add] at *, by rw [← h'.geom_sum₂_mul, mul_div_cancel _ this]
theorem
commute.geom_sum₂
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute", "division_ring", "mul_div_cancel" ]
null
240
243
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom₂_sum [field α] {x y : α} (h : x ≠ y) (n : ℕ) : (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = (x ^ n - y ^ n) / (x - y) := (commute.all x y).geom_sum₂ h n
geom₂_sum [field α] {x y : α} (h : x ≠ y) (n : ℕ) : (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = (x ^ n - y ^ n) / (x - y)
(commute.all x y).geom_sum₂ h n
theorem
geom₂_sum
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute.all", "field" ]
null
245
247
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_eq [division_ring α] {x : α} (h : x ≠ 1) (n : ℕ) : (∑ i in range n, x ^ i) = (x ^ n - 1) / (x - 1) := have x - 1 ≠ 0, by simp [*, -sub_eq_add_neg, sub_eq_iff_eq_add] at *, by rw [← geom_sum_mul, mul_div_cancel _ this]
geom_sum_eq [division_ring α] {x : α} (h : x ≠ 1) (n : ℕ) : (∑ i in range n, x ^ i) = (x ^ n - 1) / (x - 1)
have x - 1 ≠ 0, by simp [*, -sub_eq_add_neg, sub_eq_iff_eq_add] at *, by rw [← geom_sum_mul, mul_div_cancel _ this]
theorem
geom_sum_eq
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "division_ring", "geom_sum_mul", "mul_div_cancel" ]
null
249
252
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.mul_geom_sum₂_Ico [ring α] {x y : α} (h : commute x y) {m n : ℕ} (hmn : m ≤ n) : (x - y) * (∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i)) = x ^ n - x ^ m * y ^ (n - m) := begin rw [sum_Ico_eq_sub _ hmn], have : ∑ k in range m, x ^ k * y ^ (n - 1 - k) = ∑ k in range m, x ^ k * (y ^ (n - m) * y ^ (m...
commute.mul_geom_sum₂_Ico [ring α] {x y : α} (h : commute x y) {m n : ℕ} (hmn : m ≤ n) : (x - y) * (∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i)) = x ^ n - x ^ m * y ^ (n - m)
begin rw [sum_Ico_eq_sub _ hmn], have : ∑ k in range m, x ^ k * y ^ (n - 1 - k) = ∑ k in range m, x ^ k * (y ^ (n - m) * y ^ (m - 1 - k)), { refine sum_congr rfl (λ j j_in, _), rw ← pow_add, congr, rw [mem_range, nat.lt_iff_add_one_le, add_comm] at j_in, have h' : n - m + (m - (1 + j)) = n - (...
theorem
commute.mul_geom_sum₂_Ico
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "add_tsub_cancel_of_le", "commute", "finset.Ico", "mul_assoc", "nat.lt_iff_add_one_le", "pow_add", "pow_mul_comm", "ring", "tsub_add_eq_tsub_tsub", "tsub_add_tsub_cancel" ]
null
254
273
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.geom_sum₂_succ_eq {α : Type u} [ring α] {x y : α} (h : commute x y) {n : ℕ} : ∑ i in range (n + 1), x ^ i * (y ^ (n - i)) = x ^ n + y * (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) := begin simp_rw [mul_sum, sum_range_succ_comm, tsub_self, pow_zero, mul_one, add_right_inj, ←mul_assoc, (h.symm.pow_r...
commute.geom_sum₂_succ_eq {α : Type u} [ring α] {x y : α} (h : commute x y) {n : ℕ} : ∑ i in range (n + 1), x ^ i * (y ^ (n - i)) = x ^ n + y * (∑ i in range n, x ^ i * (y ^ (n - 1 - i)))
begin simp_rw [mul_sum, sum_range_succ_comm, tsub_self, pow_zero, mul_one, add_right_inj, ←mul_assoc, (h.symm.pow_right _).eq, mul_assoc, ←pow_succ], refine sum_congr rfl (λ i hi, _), suffices : n - 1 - i + 1 = n - i, { rw this }, cases n, { exact absurd (list.mem_range.mp hi) i.not_lt_zero }, { rw [tsu...
theorem
commute.geom_sum₂_succ_eq
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute", "mul_assoc", "mul_one", "nat.le_pred_of_lt", "pow_zero", "ring", "tsub_add_cancel_of_le", "tsub_add_eq_add_tsub", "tsub_self" ]
null
275
288
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum₂_succ_eq {α : Type u} [comm_ring α] (x y : α) {n : ℕ} : ∑ i in range (n + 1), x ^ i * (y ^ (n - i)) = x ^ n + y * (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) := (commute.all x y).geom_sum₂_succ_eq
geom_sum₂_succ_eq {α : Type u} [comm_ring α] (x y : α) {n : ℕ} : ∑ i in range (n + 1), x ^ i * (y ^ (n - i)) = x ^ n + y * (∑ i in range n, x ^ i * (y ^ (n - 1 - i)))
(commute.all x y).geom_sum₂_succ_eq
theorem
geom_sum₂_succ_eq
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "comm_ring", "commute.all" ]
null
290
293
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_geom_sum₂_Ico [comm_ring α] (x y : α) {m n : ℕ} (hmn : m ≤ n) : (x - y) * (∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i)) = x ^ n - x ^ m * y ^ (n - m) := (commute.all x y).mul_geom_sum₂_Ico hmn
mul_geom_sum₂_Ico [comm_ring α] (x y : α) {m n : ℕ} (hmn : m ≤ n) : (x - y) * (∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i)) = x ^ n - x ^ m * y ^ (n - m)
(commute.all x y).mul_geom_sum₂_Ico hmn
theorem
mul_geom_sum₂_Ico
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "comm_ring", "commute.all", "finset.Ico" ]
null
295
297
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.geom_sum₂_Ico_mul [ring α] {x y : α} (h : commute x y) {m n : ℕ} (hmn : m ≤ n) : (∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i)) * (x - y) = x ^ n - y ^ (n - m) * x ^ m := begin apply op_injective, simp only [op_sub, op_mul, op_pow, op_sum], have : ∑ k in Ico m n, op y ^ (n - 1 - k) * op x ^ k =...
commute.geom_sum₂_Ico_mul [ring α] {x y : α} (h : commute x y) {m n : ℕ} (hmn : m ≤ n) : (∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i)) * (x - y) = x ^ n - y ^ (n - m) * x ^ m
begin apply op_injective, simp only [op_sub, op_mul, op_pow, op_sum], have : ∑ k in Ico m n, op y ^ (n - 1 - k) * op x ^ k = ∑ k in Ico m n, op x ^ k * op y ^ (n - 1 - k), { refine sum_congr rfl (λ k k_in, _), apply commute.pow_pow (commute.op h.symm) }, rw this, exact (commute.op h).mul_geom_sum₂_I...
theorem
commute.geom_sum₂_Ico_mul
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute", "commute.op", "commute.pow_pow", "finset.Ico", "mul_geom_sum₂_Ico", "ring" ]
null
299
311
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_Ico_mul [ring α] (x : α) {m n : ℕ} (hmn : m ≤ n) : (∑ i in finset.Ico m n, x ^ i) * (x - 1) = x^n - x^m := by rw [sum_Ico_eq_sub _ hmn, sub_mul, geom_sum_mul, geom_sum_mul, sub_sub_sub_cancel_right]
geom_sum_Ico_mul [ring α] (x : α) {m n : ℕ} (hmn : m ≤ n) : (∑ i in finset.Ico m n, x ^ i) * (x - 1) = x^n - x^m
by rw [sum_Ico_eq_sub _ hmn, sub_mul, geom_sum_mul, geom_sum_mul, sub_sub_sub_cancel_right]
theorem
geom_sum_Ico_mul
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "finset.Ico", "geom_sum_mul", "ring" ]
null
313
316
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_Ico_mul_neg [ring α] (x : α) {m n : ℕ} (hmn : m ≤ n) : (∑ i in finset.Ico m n, x ^ i) * (1 - x) = x^m - x^n := by rw [sum_Ico_eq_sub _ hmn, sub_mul, geom_sum_mul_neg, geom_sum_mul_neg, sub_sub_sub_cancel_left]
geom_sum_Ico_mul_neg [ring α] (x : α) {m n : ℕ} (hmn : m ≤ n) : (∑ i in finset.Ico m n, x ^ i) * (1 - x) = x^m - x^n
by rw [sum_Ico_eq_sub _ hmn, sub_mul, geom_sum_mul_neg, geom_sum_mul_neg, sub_sub_sub_cancel_left]
theorem
geom_sum_Ico_mul_neg
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "finset.Ico", "geom_sum_mul_neg", "ring" ]
null
318
321
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.geom_sum₂_Ico [division_ring α] {x y : α} (h : commute x y) (hxy : x ≠ y) {m n : ℕ} (hmn : m ≤ n) : ∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i) = (x ^ n - y ^ (n - m) * x ^ m ) / (x - y) := have x - y ≠ 0, by simp [*, -sub_eq_add_neg, sub_eq_iff_eq_add] at *, by rw [← h.geom_sum₂_Ico_mul hmn, mul_div_can...
commute.geom_sum₂_Ico [division_ring α] {x y : α} (h : commute x y) (hxy : x ≠ y) {m n : ℕ} (hmn : m ≤ n) : ∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i) = (x ^ n - y ^ (n - m) * x ^ m ) / (x - y)
have x - y ≠ 0, by simp [*, -sub_eq_add_neg, sub_eq_iff_eq_add] at *, by rw [← h.geom_sum₂_Ico_mul hmn, mul_div_cancel _ this]
theorem
commute.geom_sum₂_Ico
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute", "division_ring", "finset.Ico", "mul_div_cancel" ]
null
323
327
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum₂_Ico [field α] {x y : α} (hxy : x ≠ y) {m n : ℕ} (hmn : m ≤ n) : ∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i) = (x ^ n - y ^ (n - m) * x ^ m ) / (x - y) := (commute.all x y).geom_sum₂_Ico hxy hmn
geom_sum₂_Ico [field α] {x y : α} (hxy : x ≠ y) {m n : ℕ} (hmn : m ≤ n) : ∑ i in finset.Ico m n, x ^ i * y ^ (n - 1 - i) = (x ^ n - y ^ (n - m) * x ^ m ) / (x - y)
(commute.all x y).geom_sum₂_Ico hxy hmn
theorem
geom_sum₂_Ico
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "commute.all", "field", "finset.Ico" ]
null
329
331
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_Ico [division_ring α] {x : α} (hx : x ≠ 1) {m n : ℕ} (hmn : m ≤ n) : ∑ i in finset.Ico m n, x ^ i = (x ^ n - x ^ m) / (x - 1) := by simp only [sum_Ico_eq_sub _ hmn, geom_sum_eq hx, div_sub_div_same, sub_sub_sub_cancel_right]
geom_sum_Ico [division_ring α] {x : α} (hx : x ≠ 1) {m n : ℕ} (hmn : m ≤ n) : ∑ i in finset.Ico m n, x ^ i = (x ^ n - x ^ m) / (x - 1)
by simp only [sum_Ico_eq_sub _ hmn, geom_sum_eq hx, div_sub_div_same, sub_sub_sub_cancel_right]
theorem
geom_sum_Ico
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "div_sub_div_same", "division_ring", "finset.Ico", "geom_sum_eq" ]
null
333
336
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_Ico' [division_ring α] {x : α} (hx : x ≠ 1) {m n : ℕ} (hmn : m ≤ n) : ∑ i in finset.Ico m n, x ^ i = (x ^ m - x ^ n) / (1 - x) := by { simp only [geom_sum_Ico hx hmn], convert neg_div_neg_eq (x^m - x^n) (1-x); abel }
geom_sum_Ico' [division_ring α] {x : α} (hx : x ≠ 1) {m n : ℕ} (hmn : m ≤ n) : ∑ i in finset.Ico m n, x ^ i = (x ^ m - x ^ n) / (1 - x)
by { simp only [geom_sum_Ico hx hmn], convert neg_div_neg_eq (x^m - x^n) (1-x); abel }
theorem
geom_sum_Ico'
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "division_ring", "finset.Ico", "geom_sum_Ico", "neg_div_neg_eq" ]
null
338
340
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_Ico_le_of_lt_one [linear_ordered_field α] {x : α} (hx : 0 ≤ x) (h'x : x < 1) {m n : ℕ} : ∑ i in Ico m n, x ^ i ≤ x ^ m / (1 - x) := begin rcases le_or_lt m n with hmn | hmn, { rw geom_sum_Ico' h'x.ne hmn, apply div_le_div (pow_nonneg hx _) _ (sub_pos.2 h'x) le_rfl, simpa using pow_nonneg hx _ }...
geom_sum_Ico_le_of_lt_one [linear_ordered_field α] {x : α} (hx : 0 ≤ x) (h'x : x < 1) {m n : ℕ} : ∑ i in Ico m n, x ^ i ≤ x ^ m / (1 - x)
begin rcases le_or_lt m n with hmn | hmn, { rw geom_sum_Ico' h'x.ne hmn, apply div_le_div (pow_nonneg hx _) _ (sub_pos.2 h'x) le_rfl, simpa using pow_nonneg hx _ }, { rw [Ico_eq_empty, sum_empty], { apply div_nonneg (pow_nonneg hx _), simpa using h'x.le }, { simpa using hmn.le } }, end
lemma
geom_sum_Ico_le_of_lt_one
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "div_le_div", "div_nonneg", "geom_sum_Ico'", "le_rfl", "linear_ordered_field", "pow_nonneg" ]
null
342
354
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_inv [division_ring α] {x : α} (hx1 : x ≠ 1) (hx0 : x ≠ 0) (n : ℕ) : (∑ i in range n, x⁻¹ ^ i) = (x - 1)⁻¹ * (x - x⁻¹ ^ n * x) := have h₁ : x⁻¹ ≠ 1, by rwa [inv_eq_one_div, ne.def, div_eq_iff_mul_eq hx0, one_mul], have h₂ : x⁻¹ - 1 ≠ 0, from mt sub_eq_zero.1 h₁, have h₃ : x - 1 ≠ 0, from mt sub_eq_zero.1 hx1,...
geom_sum_inv [division_ring α] {x : α} (hx1 : x ≠ 1) (hx0 : x ≠ 0) (n : ℕ) : (∑ i in range n, x⁻¹ ^ i) = (x - 1)⁻¹ * (x - x⁻¹ ^ n * x)
have h₁ : x⁻¹ ≠ 1, by rwa [inv_eq_one_div, ne.def, div_eq_iff_mul_eq hx0, one_mul], have h₂ : x⁻¹ - 1 ≠ 0, from mt sub_eq_zero.1 h₁, have h₃ : x - 1 ≠ 0, from mt sub_eq_zero.1 hx1, have h₄ : x * (x ^ n)⁻¹ = (x ^ n)⁻¹ * x := nat.rec_on n (by simp) (λ n h, by rw [pow_succ, mul_inv_rev, ←mul_assoc, h, mul_assoc, mul_i...
lemma
geom_sum_inv
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "div_eq_iff_mul_eq", "division_ring", "geom_sum_eq", "inv_eq_one_div", "inv_mul_cancel", "mul_assoc", "mul_inv_cancel", "mul_inv_rev", "mul_right_inj'", "one_mul", "pow_succ" ]
null
356
370
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ring_hom.map_geom_sum [semiring α] [semiring β] (x : α) (n : ℕ) (f : α →+* β) : f (∑ i in range n, x ^ i) = ∑ i in range n, (f x) ^ i := by simp [f.map_sum]
ring_hom.map_geom_sum [semiring α] [semiring β] (x : α) (n : ℕ) (f : α →+* β) : f (∑ i in range n, x ^ i) = ∑ i in range n, (f x) ^ i
by simp [f.map_sum]
theorem
ring_hom.map_geom_sum
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "semiring" ]
null
374
376
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ring_hom.map_geom_sum₂ [semiring α] [semiring β] (x y : α) (n : ℕ) (f : α →+* β) : f (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = ∑ i in range n, (f x) ^ i * ((f y) ^ (n - 1 - i)) := by simp [f.map_sum]
ring_hom.map_geom_sum₂ [semiring α] [semiring β] (x y : α) (n : ℕ) (f : α →+* β) : f (∑ i in range n, x ^ i * (y ^ (n - 1 - i))) = ∑ i in range n, (f x) ^ i * ((f y) ^ (n - 1 - i))
by simp [f.map_sum]
theorem
ring_hom.map_geom_sum₂
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "semiring" ]
null
378
381
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nat.pred_mul_geom_sum_le (a b n : ℕ) : (b - 1) * ∑ i in range n.succ, a/b^i ≤ a * b - a/b^n := calc (b - 1) * (∑ i in range n.succ, a/b^i) = ∑ i in range n, a/b^(i + 1) * b + a * b - (∑ i in range n, a/b^i + a/b^n) : by rw [tsub_mul, mul_comm, sum_mul, one_mul, sum_range_succ', sum_ran...
nat.pred_mul_geom_sum_le (a b n : ℕ) : (b - 1) * ∑ i in range n.succ, a/b^i ≤ a * b - a/b^n
calc (b - 1) * (∑ i in range n.succ, a/b^i) = ∑ i in range n, a/b^(i + 1) * b + a * b - (∑ i in range n, a/b^i + a/b^n) : by rw [tsub_mul, mul_comm, sum_mul, one_mul, sum_range_succ', sum_range_succ, pow_zero, nat.div_one] ... ≤ ∑ i in range n, a/b^i + a * b - (∑ i in range n, a/b^i + ...
lemma
nat.pred_mul_geom_sum_le
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "add_tsub_add_eq_tsub_left", "mul_comm", "one_mul", "pow_succ'", "pow_zero", "tsub_le_tsub_right", "tsub_mul" ]
null
385
399
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nat.geom_sum_le {b : ℕ} (hb : 2 ≤ b) (a n : ℕ) : ∑ i in range n, a/b^i ≤ a * b/(b - 1) := begin refine (nat.le_div_iff_mul_le $ tsub_pos_of_lt hb).2 _, cases n, { rw [sum_range_zero, zero_mul], exact nat.zero_le _ }, rw mul_comm, exact (nat.pred_mul_geom_sum_le a b n).trans tsub_le_self, end
nat.geom_sum_le {b : ℕ} (hb : 2 ≤ b) (a n : ℕ) : ∑ i in range n, a/b^i ≤ a * b/(b - 1)
begin refine (nat.le_div_iff_mul_le $ tsub_pos_of_lt hb).2 _, cases n, { rw [sum_range_zero, zero_mul], exact nat.zero_le _ }, rw mul_comm, exact (nat.pred_mul_geom_sum_le a b n).trans tsub_le_self, end
lemma
nat.geom_sum_le
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "mul_comm", "nat.pred_mul_geom_sum_le", "tsub_le_self", "tsub_pos_of_lt", "zero_mul" ]
null
401
410
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nat.geom_sum_Ico_le {b : ℕ} (hb : 2 ≤ b) (a n : ℕ) : ∑ i in Ico 1 n, a/b^i ≤ a/(b - 1) := begin cases n, { rw [Ico_eq_empty_of_le (zero_le_one' ℕ), sum_empty], exact nat.zero_le _ }, rw ←add_le_add_iff_left a, calc a + ∑ (i : ℕ) in Ico 1 n.succ, a/b^i = a/b^0 + ∑ (i : ℕ) in Ico 1 n.succ, a/b^i...
nat.geom_sum_Ico_le {b : ℕ} (hb : 2 ≤ b) (a n : ℕ) : ∑ i in Ico 1 n, a/b^i ≤ a/(b - 1)
begin cases n, { rw [Ico_eq_empty_of_le (zero_le_one' ℕ), sum_empty], exact nat.zero_le _ }, rw ←add_le_add_iff_left a, calc a + ∑ (i : ℕ) in Ico 1 n.succ, a/b^i = a/b^0 + ∑ (i : ℕ) in Ico 1 n.succ, a/b^i : by rw [pow_zero, nat.div_one] ... = ∑ i in range n.succ, a/b^i : begin rw [...
lemma
nat.geom_sum_Ico_le
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "add_tsub_cancel_of_le", "mul_one", "nat.geom_sum_le", "pow_zero", "tsub_pos_of_lt", "zero_le_one'" ]
null
412
431
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_pos [strict_ordered_semiring α] (hx : 0 ≤ x) (hn : n ≠ 0) : 0 < ∑ i in range n, x ^ i := sum_pos' (λ k hk, pow_nonneg hx _) ⟨0, mem_range.2 hn.bot_lt, by simp⟩
geom_sum_pos [strict_ordered_semiring α] (hx : 0 ≤ x) (hn : n ≠ 0) : 0 < ∑ i in range n, x ^ i
sum_pos' (λ k hk, pow_nonneg hx _) ⟨0, mem_range.2 hn.bot_lt, by simp⟩
lemma
geom_sum_pos
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "pow_nonneg", "strict_ordered_semiring" ]
null
437
439
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_pos_and_lt_one [strict_ordered_ring α] (hx : x < 0) (hx' : 0 < x + 1) (hn : 1 < n) : 0 < ∑ i in range n, x ^ i ∧ ∑ i in range n, x ^ i < 1 := begin refine nat.le_induction _ _ n (show 2 ≤ n, from hn), { rw geom_sum_two, exact ⟨hx', (add_lt_iff_neg_right _).2 hx⟩ }, clear hn n, intros n hn ihn, ...
geom_sum_pos_and_lt_one [strict_ordered_ring α] (hx : x < 0) (hx' : 0 < x + 1) (hn : 1 < n) : 0 < ∑ i in range n, x ^ i ∧ ∑ i in range n, x ^ i < 1
begin refine nat.le_induction _ _ n (show 2 ≤ n, from hn), { rw geom_sum_two, exact ⟨hx', (add_lt_iff_neg_right _).2 hx⟩ }, clear hn n, intros n hn ihn, rw [geom_sum_succ, add_lt_iff_neg_right, ← neg_lt_iff_pos_add', neg_mul_eq_neg_mul], exact ⟨mul_lt_one_of_nonneg_of_lt_one_left (neg_nonneg.2 hx.le) ...
lemma
geom_sum_pos_and_lt_one
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_succ", "geom_sum_two", "mul_neg_of_neg_of_pos", "nat.le_induction", "neg_mul_eq_neg_mul", "strict_ordered_ring" ]
null
441
452
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_alternating_of_le_neg_one [strict_ordered_ring α] (hx : x + 1 ≤ 0) (n : ℕ) : if even n then ∑ i in range n, x ^ i ≤ 0 else 1 ≤ ∑ i in range n, x ^ i := begin have hx0 : x ≤ 0 := (le_add_of_nonneg_right zero_le_one).trans hx, induction n with n ih, { simp only [even_zero, geom_sum_zero, le_refl] }, si...
geom_sum_alternating_of_le_neg_one [strict_ordered_ring α] (hx : x + 1 ≤ 0) (n : ℕ) : if even n then ∑ i in range n, x ^ i ≤ 0 else 1 ≤ ∑ i in range n, x ^ i
begin have hx0 : x ≤ 0 := (le_add_of_nonneg_right zero_le_one).trans hx, induction n with n ih, { simp only [even_zero, geom_sum_zero, le_refl] }, simp only [nat.even_add_one, geom_sum_succ], split_ifs at ih, { rw [if_neg (not_not_intro h), le_add_iff_nonneg_left], exact mul_nonneg_of_nonpos_of_nonpos h...
lemma
geom_sum_alternating_of_le_neg_one
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_succ", "geom_sum_zero", "ih", "mul_le_mul_of_nonpos_left", "mul_nonneg_of_nonpos_of_nonpos", "mul_one", "nat.even_add_one", "strict_ordered_ring", "zero_le_one" ]
null
454
467
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_alternating_of_lt_neg_one [strict_ordered_ring α] (hx : x + 1 < 0) (hn : 1 < n) : if even n then ∑ i in range n, x ^ i < 0 else 1 < ∑ i in range n, x ^ i := begin have hx0 : x < 0, from ((le_add_iff_nonneg_right _).2 zero_le_one).trans_lt hx, refine nat.le_induction _ _ n (show 2 ≤ n, from hn), { simp...
geom_sum_alternating_of_lt_neg_one [strict_ordered_ring α] (hx : x + 1 < 0) (hn : 1 < n) : if even n then ∑ i in range n, x ^ i < 0 else 1 < ∑ i in range n, x ^ i
begin have hx0 : x < 0, from ((le_add_iff_nonneg_right _).2 zero_le_one).trans_lt hx, refine nat.le_induction _ _ n (show 2 ≤ n, from hn), { simp only [geom_sum_two, hx, true_or, even_bit0, if_true_left_eq_or] }, clear hn n, intros n hn ihn, simp only [nat.even_add_one, geom_sum_succ], by_cases hn' : even...
lemma
geom_sum_alternating_of_lt_neg_one
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "even_bit0", "geom_sum_succ", "geom_sum_two", "mul_lt_mul_of_neg_left", "mul_one", "mul_pos_of_neg_of_neg", "nat.even_add_one", "nat.le_induction", "strict_ordered_ring", "zero_le_one" ]
null
469
485
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_pos' [linear_ordered_ring α] (hx : 0 < x + 1) (hn : n ≠ 0) : 0 < ∑ i in range n, x ^ i := begin obtain _ | _ | n := n, { cases hn rfl }, { simp }, obtain hx' | hx' := lt_or_le x 0, { exact (geom_sum_pos_and_lt_one hx' hx n.one_lt_succ_succ).1 }, { exact geom_sum_pos hx' (by simp only [nat.succ_ne...
geom_sum_pos' [linear_ordered_ring α] (hx : 0 < x + 1) (hn : n ≠ 0) : 0 < ∑ i in range n, x ^ i
begin obtain _ | _ | n := n, { cases hn rfl }, { simp }, obtain hx' | hx' := lt_or_le x 0, { exact (geom_sum_pos_and_lt_one hx' hx n.one_lt_succ_succ).1 }, { exact geom_sum_pos hx' (by simp only [nat.succ_ne_zero, ne.def, not_false_iff]) } end
lemma
geom_sum_pos'
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_pos", "geom_sum_pos_and_lt_one", "linear_ordered_ring" ]
null
487
496
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
odd.geom_sum_pos [linear_ordered_ring α] (h : odd n) : 0 < ∑ i in range n, x ^ i := begin rcases n with (_ | _ | k), { exact ((show ¬ odd 0, from dec_trivial) h).elim }, { simp only [geom_sum_one, zero_lt_one] }, rw nat.odd_iff_not_even at h, rcases lt_trichotomy (x + 1) 0 with hx | hx | hx, { have := geo...
odd.geom_sum_pos [linear_ordered_ring α] (h : odd n) : 0 < ∑ i in range n, x ^ i
begin rcases n with (_ | _ | k), { exact ((show ¬ odd 0, from dec_trivial) h).elim }, { simp only [geom_sum_one, zero_lt_one] }, rw nat.odd_iff_not_even at h, rcases lt_trichotomy (x + 1) 0 with hx | hx | hx, { have := geom_sum_alternating_of_lt_neg_one hx k.one_lt_succ_succ, simp only [h, if_false] at ...
lemma
odd.geom_sum_pos
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_alternating_of_lt_neg_one", "geom_sum_one", "geom_sum_pos'", "linear_ordered_ring", "nat.odd_iff_not_even", "neg_one_geom_sum", "odd", "zero_lt_one" ]
null
498
511
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_pos_iff [linear_ordered_ring α] (hn : n ≠ 0) : 0 < ∑ i in range n, x ^ i ↔ odd n ∨ 0 < x + 1 := begin refine ⟨λ h, _, _⟩, { rw [or_iff_not_imp_left, ←not_le, ←nat.even_iff_not_odd], refine λ hn hx, h.not_le _, simpa [if_pos hn] using geom_sum_alternating_of_le_neg_one hx n }, { rintro (hn | hx'...
geom_sum_pos_iff [linear_ordered_ring α] (hn : n ≠ 0) : 0 < ∑ i in range n, x ^ i ↔ odd n ∨ 0 < x + 1
begin refine ⟨λ h, _, _⟩, { rw [or_iff_not_imp_left, ←not_le, ←nat.even_iff_not_odd], refine λ hn hx, h.not_le _, simpa [if_pos hn] using geom_sum_alternating_of_le_neg_one hx n }, { rintro (hn | hx'), { exact hn.geom_sum_pos }, { exact geom_sum_pos' hx' hn } } end
lemma
geom_sum_pos_iff
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_alternating_of_le_neg_one", "geom_sum_pos'", "linear_ordered_ring", "odd", "or_iff_not_imp_left" ]
null
513
523
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_ne_zero [linear_ordered_ring α] (hx : x ≠ -1) (hn : n ≠ 0) : ∑ i in range n, x ^ i ≠ 0 := begin obtain _ | _ | n := n, { cases hn rfl }, { simp }, rw [ne.def, eq_neg_iff_add_eq_zero, ←ne.def] at hx, obtain h | h := hx.lt_or_lt, { have := geom_sum_alternating_of_lt_neg_one h n.one_lt_succ_succ, ...
geom_sum_ne_zero [linear_ordered_ring α] (hx : x ≠ -1) (hn : n ≠ 0) : ∑ i in range n, x ^ i ≠ 0
begin obtain _ | _ | n := n, { cases hn rfl }, { simp }, rw [ne.def, eq_neg_iff_add_eq_zero, ←ne.def] at hx, obtain h | h := hx.lt_or_lt, { have := geom_sum_alternating_of_lt_neg_one h n.one_lt_succ_succ, split_ifs at this, { exact this.ne }, { exact (zero_lt_one.trans this).ne' } }, { exact (...
lemma
geom_sum_ne_zero
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "geom_sum_alternating_of_lt_neg_one", "geom_sum_pos'", "linear_ordered_ring" ]
null
525
538
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_eq_zero_iff_neg_one [linear_ordered_ring α] (hn : n ≠ 0) : ∑ i in range n, x ^ i = 0 ↔ x = -1 ∧ even n := begin refine ⟨λ h, _, λ ⟨h, hn⟩, by simp only [h, hn, neg_one_geom_sum, if_true]⟩, contrapose! h, obtain rfl | hx := eq_or_ne x (-1), { simp only [h rfl, neg_one_geom_sum, if_false, ne.def, not_f...
geom_sum_eq_zero_iff_neg_one [linear_ordered_ring α] (hn : n ≠ 0) : ∑ i in range n, x ^ i = 0 ↔ x = -1 ∧ even n
begin refine ⟨λ h, _, λ ⟨h, hn⟩, by simp only [h, hn, neg_one_geom_sum, if_true]⟩, contrapose! h, obtain rfl | hx := eq_or_ne x (-1), { simp only [h rfl, neg_one_geom_sum, if_false, ne.def, not_false_iff, one_ne_zero] }, { exact geom_sum_ne_zero hx hn } end
lemma
geom_sum_eq_zero_iff_neg_one
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "eq_or_ne", "geom_sum_ne_zero", "linear_ordered_ring", "neg_one_geom_sum", "one_ne_zero" ]
null
540
548
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_neg_iff [linear_ordered_ring α] (hn : n ≠ 0) : ∑ i in range n, x ^ i < 0 ↔ even n ∧ x + 1 < 0 := by rw [← not_iff_not, not_lt, le_iff_lt_or_eq, eq_comm, or_congr (geom_sum_pos_iff hn) (geom_sum_eq_zero_iff_neg_one hn), nat.odd_iff_not_even, ← add_eq_zero_iff_eq_neg, not_and, not_lt, le_iff_lt_o...
geom_sum_neg_iff [linear_ordered_ring α] (hn : n ≠ 0) : ∑ i in range n, x ^ i < 0 ↔ even n ∧ x + 1 < 0
by rw [← not_iff_not, not_lt, le_iff_lt_or_eq, eq_comm, or_congr (geom_sum_pos_iff hn) (geom_sum_eq_zero_iff_neg_one hn), nat.odd_iff_not_even, ← add_eq_zero_iff_eq_neg, not_and, not_lt, le_iff_lt_or_eq, eq_comm, ← imp_iff_not_or, or_comm, and_comm, decidable.and_or_imp, or_comm]
lemma
geom_sum_neg_iff
algebra
src/algebra/geom_sum.lean
[ "algebra.big_operators.order", "algebra.big_operators.ring", "algebra.big_operators.intervals", "tactic.abel", "data.nat.parity" ]
[ "decidable.and_or_imp", "geom_sum_eq_zero_iff_neg_one", "geom_sum_pos_iff", "imp_iff_not_or", "linear_ordered_ring", "nat.odd_iff_not_even", "not_and", "not_iff_not" ]
null
550
555
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83