fact
stringlengths 6
3.84k
| type
stringclasses 11
values | library
stringclasses 32
values | imports
listlengths 1
14
| filename
stringlengths 20
95
| symbolic_name
stringlengths 1
90
| docstring
stringlengths 7
20k
⌀ |
|---|---|---|---|---|---|---|
instZero : Zero (FreeAlgebra R X) where zero := Quot.mk _ 0
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instZero
| null |
instOne : One (FreeAlgebra R X) where one := Quot.mk _ 1
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instOne
| null |
instAdd : Add (FreeAlgebra R X) where
add := Quot.map₂ HAdd.hAdd (fun _ _ _ ↦ Rel.add_compat_right) fun _ _ _ ↦ Rel.add_compat_left
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instAdd
| null |
instMul : Mul (FreeAlgebra R X) where
mul := Quot.map₂ HMul.hMul (fun _ _ _ ↦ Rel.mul_compat_right) fun _ _ _ ↦ Rel.mul_compat_left
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instMul
| null |
private mk_mul (x y : Pre R X) :
Quot.mk (Rel R X) (x * y) = (HMul.hMul (self := instHMul (α := FreeAlgebra R X))
(Quot.mk (Rel R X) x) (Quot.mk (Rel R X) y)) :=
rfl
/-! Build the semiring structure. We do this one piece at a time as this is convenient for proving
the `nsmul` fields. -/
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
mk_mul
| null |
instMonoidWithZero : MonoidWithZero (FreeAlgebra R X) where
mul_assoc := by
rintro ⟨⟩ ⟨⟩ ⟨⟩
exact Quot.sound Rel.mul_assoc
one := Quot.mk _ 1
one_mul := by
rintro ⟨⟩
exact Quot.sound Rel.one_mul
mul_one := by
rintro ⟨⟩
exact Quot.sound Rel.mul_one
zero_mul := by
rintro ⟨⟩
exact Quot.sound Rel.zero_mul
mul_zero := by
rintro ⟨⟩
exact Quot.sound Rel.mul_zero
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instMonoidWithZero
| null |
instDistrib : Distrib (FreeAlgebra R X) where
left_distrib := by
rintro ⟨⟩ ⟨⟩ ⟨⟩
exact Quot.sound Rel.left_distrib
right_distrib := by
rintro ⟨⟩ ⟨⟩ ⟨⟩
exact Quot.sound Rel.right_distrib
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instDistrib
| null |
instAddCommMonoid : AddCommMonoid (FreeAlgebra R X) where
add_assoc := by
rintro ⟨⟩ ⟨⟩ ⟨⟩
exact Quot.sound Rel.add_assoc
zero_add := by
rintro ⟨⟩
exact Quot.sound Rel.zero_add
add_zero := by
rintro ⟨⟩
change Quot.mk _ _ = _
rw [Quot.sound Rel.add_comm, Quot.sound Rel.zero_add]
add_comm := by
rintro ⟨⟩ ⟨⟩
exact Quot.sound Rel.add_comm
nsmul := (· • ·)
nsmul_zero := by
rintro ⟨⟩
change Quot.mk _ (_ * _) = _
rw [map_zero]
exact Quot.sound Rel.zero_mul
nsmul_succ n := by
rintro ⟨a⟩
dsimp only [HSMul.hSMul, instSMul, Quot.map]
rw [map_add, map_one, mk_mul, mk_mul, ← add_one_mul (_ : FreeAlgebra R X)]
congr 1
exact Quot.sound Rel.add_scalar
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instAddCommMonoid
| null |
instAlgebra {A} [CommSemiring A] [Algebra R A] : Algebra R (FreeAlgebra A X) where
algebraMap := ({
toFun := fun r => Quot.mk _ r
map_one' := rfl
map_mul' := fun _ _ => Quot.sound Rel.mul_scalar
map_zero' := rfl
map_add' := fun _ _ => Quot.sound Rel.add_scalar } : A →+* FreeAlgebra A X).comp
(algebraMap R A)
commutes' _ := by
rintro ⟨⟩
exact Quot.sound Rel.central_scalar
smul_def' _ _ := rfl
variable (S : Type) [CommSemiring S] in
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instAlgebra
| null |
private liftAux (f : X → A) : FreeAlgebra R X →ₐ[R] A where
toFun a :=
Quot.liftOn a (liftFun _ _ f) fun a b h ↦ by
induction h
· exact (algebraMap R A).map_add _ _
· exact (algebraMap R A).map_mul _ _
· apply Algebra.commutes
· change _ + _ + _ = _ + (_ + _)
rw [add_assoc]
· change _ + _ = _ + _
rw [add_comm]
· change algebraMap _ _ _ + liftFun R X f _ = liftFun R X f _
simp
· change _ * _ * _ = _ * (_ * _)
rw [mul_assoc]
· change algebraMap _ _ _ * liftFun R X f _ = liftFun R X f _
simp
· change liftFun R X f _ * algebraMap _ _ _ = liftFun R X f _
simp
· change _ * (_ + _) = _ * _ + _ * _
rw [left_distrib]
· change (_ + _) * _ = _ * _ + _ * _
rw [right_distrib]
· change algebraMap _ _ _ * _ = algebraMap _ _ _
simp
· change _ * algebraMap _ _ _ = algebraMap _ _ _
simp
repeat
change liftFun R X f _ + liftFun R X f _ = _
simp only [*]
rfl
repeat
change liftFun R X f _ * liftFun R X f _ = _
simp only [*]
rfl
map_one' := by
change algebraMap _ _ _ = _
simp
map_mul' := by
rintro ⟨⟩ ⟨⟩
rfl
map_zero' := by
change algebraMap _ _ _ = _
simp
map_add' := by
rintro ⟨⟩ ⟨⟩
rfl
commutes' := by tauto
|
def
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
liftAux
|
The canonical function `X → FreeAlgebra R X`.
-/
irreducible_def ι : X → FreeAlgebra R X := fun m ↦ Quot.mk _ m
@[simp]
theorem quot_mk_eq_ι (m : X) : Quot.mk (FreeAlgebra.Rel R X) m = ι R m := by rw [ι_def]
variable {A : Type*} [Semiring A] [Algebra R A]
/-- Internal definition used to define `lift`
|
@[irreducible]
lift : (X → A) ≃ (FreeAlgebra R X →ₐ[R] A) :=
{ toFun := liftAux R
invFun := fun F ↦ F ∘ ι R
left_inv := fun f ↦ by
ext
simp only [Function.comp_apply, ι_def]
rfl
right_inv := fun F ↦ by
ext t
rcases t with ⟨x⟩
induction x with
| of =>
change ((F : FreeAlgebra R X → A) ∘ ι R) _ = _
simp only [Function.comp_apply, ι_def]
| ofScalar x =>
change algebraMap _ _ x = F (algebraMap _ _ x)
rw [AlgHom.commutes F _]
| add a b ha hb =>
let fa : FreeAlgebra R X := Quot.mk (Rel R X) a
let fb : FreeAlgebra R X := Quot.mk (Rel R X) b
change liftAux R (F ∘ ι R) (fa + fb) = F (fa + fb)
rw [map_add, map_add, ha, hb]
| mul a b ha hb =>
let fa : FreeAlgebra R X := Quot.mk (Rel R X) a
let fb : FreeAlgebra R X := Quot.mk (Rel R X) b
change liftAux R (F ∘ ι R) (fa * fb) = F (fa * fb)
rw [map_mul, map_mul, ha, hb] }
@[simp]
|
def
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
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 `FreeAlgebra R X → A`.
|
liftAux_eq (f : X → A) : liftAux R f = lift R f := by
rw [lift]
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
liftAux_eq
| null |
lift_symm_apply (F : FreeAlgebra R X →ₐ[R] A) : (lift R).symm F = F ∘ ι R := by
rw [lift]
rfl
variable {R}
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
lift_symm_apply
| null |
ι_comp_lift (f : X → A) : (lift R f : FreeAlgebra R X → A) ∘ ι R = f := by
ext
rw [Function.comp_apply, ι_def, lift]
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
ι_comp_lift
| null |
lift_ι_apply (f : X → A) (x) : lift R f (ι R x) = f x := by
rw [ι_def, lift]
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
lift_ι_apply
| null |
lift_unique (f : X → A) (g : FreeAlgebra R X →ₐ[R] A) :
(g : FreeAlgebra R X → A) ∘ ι R = f ↔ g = lift R f := by
rw [← (lift R).symm_apply_eq, lift]
rfl
/-!
Since we have set the basic definitions as `@[Irreducible]`, from this point onwards one
should only use the universal properties of the free algebra, and consider the actual implementation
as a quotient of an inductive type as completely hidden. -/
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
lift_unique
| null |
lift_comp_ι (g : FreeAlgebra R X →ₐ[R] A) :
lift R ((g : FreeAlgebra R X → A) ∘ ι R) = g := by
rw [← lift_symm_apply]
exact (lift R).apply_symm_apply g
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
lift_comp_ι
| null |
@[ext high]
hom_ext {f g : FreeAlgebra R X →ₐ[R] A}
(w : (f : FreeAlgebra R X → A) ∘ ι R = (g : FreeAlgebra R X → A) ∘ ι R) : f = g := by
rw [← lift_symm_apply, ← lift_symm_apply] at w
exact (lift R).symm.injective w
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
hom_ext
|
See note [partially-applied ext lemmas].
|
noncomputable equivMonoidAlgebraFreeMonoid :
FreeAlgebra R X ≃ₐ[R] MonoidAlgebra R (FreeMonoid X) :=
AlgEquiv.ofAlgHom (lift R fun x ↦ (MonoidAlgebra.of R (FreeMonoid X)) (FreeMonoid.of x))
((MonoidAlgebra.lift R (FreeMonoid X) (FreeAlgebra R X)) (FreeMonoid.lift (ι R)))
(by
apply MonoidAlgebra.algHom_ext; intro x
refine FreeMonoid.recOn x ?_ ?_
· simp
rfl
· intro x y ih
simp at ih
simp [ih])
(by
ext
simp)
|
def
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
equivMonoidAlgebraFreeMonoid
|
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.
|
instNoZeroDivisors [NoZeroDivisors R] : NoZeroDivisors (FreeAlgebra R X) :=
equivMonoidAlgebraFreeMonoid.toMulEquiv.noZeroDivisors
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instNoZeroDivisors
|
`FreeAlgebra R X` is nontrivial when `R` is. -/
instance [Nontrivial R] : Nontrivial (FreeAlgebra R X) :=
equivMonoidAlgebraFreeMonoid.surjective.nontrivial
/-- `FreeAlgebra R X` has no zero-divisors when `R` has no zero-divisors.
|
instIsDomain {R X} [CommRing R] [IsDomain R] : IsDomain (FreeAlgebra R X) :=
NoZeroDivisors.to_isDomain _
|
instance
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
instIsDomain
|
`FreeAlgebra R X` is a domain when `R` is an integral domain.
|
algebraMapInv : FreeAlgebra R X →ₐ[R] R :=
lift R (0 : X → R)
|
def
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
algebraMapInv
|
The left-inverse of `algebraMap`.
|
algebraMap_leftInverse :
Function.LeftInverse algebraMapInv (algebraMap R <| FreeAlgebra R X) := fun x ↦ by
simp [algebraMapInv]
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
algebraMap_leftInverse
| null |
algebraMap_inj (x y : R) :
algebraMap R (FreeAlgebra R X) x = algebraMap R (FreeAlgebra R X) y ↔ x = y :=
algebraMap_leftInverse.injective.eq_iff
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
algebraMap_inj
| null |
algebraMap_eq_zero_iff (x : R) : algebraMap R (FreeAlgebra R X) x = 0 ↔ x = 0 :=
map_eq_zero_iff (algebraMap _ _) algebraMap_leftInverse.injective
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
algebraMap_eq_zero_iff
| null |
algebraMap_eq_one_iff (x : R) : algebraMap R (FreeAlgebra R X) x = 1 ↔ x = 1 :=
map_eq_one_iff (algebraMap _ _) algebraMap_leftInverse.injective
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
algebraMap_eq_one_iff
| null |
ι_injective [Nontrivial R] : Function.Injective (ι R : X → FreeAlgebra R X) :=
fun x y hoxy ↦
by_contradiction <| by
classical exact fun hxy : x ≠ y ↦
let f : FreeAlgebra R X →ₐ[R] R := lift R fun z ↦ if x = z then (1 : R) else 0
have hfx1 : f (ι R x) = 1 := (lift_ι_apply _ _).trans <| if_pos rfl
have hfy1 : f (ι R y) = 1 := hoxy ▸ hfx1
have hfy0 : f (ι R y) = 0 := (lift_ι_apply _ _).trans <| if_neg hxy
one_ne_zero <| hfy1.symm.trans hfy0
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
ι_injective
| null |
ι_inj [Nontrivial R] (x y : X) : ι R x = ι R y ↔ x = y :=
ι_injective.eq_iff
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
ι_inj
| null |
ι_ne_algebraMap [Nontrivial R] (x : X) (r : R) : ι R x ≠ algebraMap R _ r := fun h ↦ by
let f0 : FreeAlgebra R X →ₐ[R] R := lift R 0
let f1 : FreeAlgebra R X →ₐ[R] R := lift R 1
have hf0 : f0 (ι R x) = 0 := lift_ι_apply _ _
have hf1 : f1 (ι R x) = 1 := lift_ι_apply _ _
rw [h, f0.commutes, Algebra.algebraMap_self_apply] at hf0
rw [h, f1.commutes, Algebra.algebraMap_self_apply] at hf1
exact zero_ne_one (hf0.symm.trans hf1)
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
ι_ne_algebraMap
| null |
ι_ne_zero [Nontrivial R] (x : X) : ι R x ≠ 0 :=
ι_ne_algebraMap x 0
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
ι_ne_zero
| null |
ι_ne_one [Nontrivial R] (x : X) : ι R x ≠ 1 :=
ι_ne_algebraMap x 1
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
ι_ne_one
| null |
@[elab_as_elim, induction_eliminator]
induction {motive : FreeAlgebra R X → Prop}
(grade0 : ∀ r, motive (algebraMap R (FreeAlgebra R X) r)) (grade1 : ∀ x, motive (ι R x))
(mul : ∀ a b, motive a → motive b → motive (a * b))
(add : ∀ a b, motive a → motive b → motive (a + b))
(a : FreeAlgebra R X) : motive a := by
let s : Subalgebra R (FreeAlgebra R X) :=
{ carrier := motive
mul_mem' := mul _ _
add_mem' := add _ _
algebraMap_mem' := grade0 }
let of : X → s := Subtype.coind (ι R) grade1
have of_id : AlgHom.id R (FreeAlgebra R X) = s.val.comp (lift R of) := by
ext
simp [of, Subtype.coind]
suffices a = lift R of a by
rw [this]
exact Subtype.prop (lift R of a)
simp [AlgHom.ext_iff] at of_id
exact of_id a
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
induction
|
An induction principle for the free algebra.
If `C` holds for the `algebraMap` of `r : R` into `FreeAlgebra R X`, the `ι` of `x : X`, and is
preserved under addition and multiplication, then it holds for all of `FreeAlgebra R X`.
|
adjoin_range_ι : Algebra.adjoin R (Set.range (ι R : X → FreeAlgebra R X)) = ⊤ := by
set S := Algebra.adjoin R (Set.range (ι R : X → FreeAlgebra R X))
refine top_unique fun x hx => ?_; clear hx
induction x with
| grade0 => exact S.algebraMap_mem _
| add x y hx hy => exact S.add_mem hx hy
| mul x y hx hy => exact S.mul_mem hx hy
| grade1 x => exact Algebra.subset_adjoin (Set.mem_range_self _)
variable {A : Type*} [Semiring A] [Algebra R A]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
adjoin_range_ι
| null |
_root_.Algebra.adjoin_range_eq_range_freeAlgebra_lift (f : X → A) :
Algebra.adjoin R (Set.range f) = (FreeAlgebra.lift R f).range := by
simp only [← Algebra.map_top, ← adjoin_range_ι, AlgHom.map_adjoin, ← Set.range_comp,
Function.comp_def, lift_ι_apply]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
_root_.Algebra.adjoin_range_eq_range_freeAlgebra_lift
|
Noncommutative version of `Algebra.adjoin_range_eq_range_aeval`.
|
_root_.Algebra.adjoin_eq_range_freeAlgebra_lift (s : Set A) :
Algebra.adjoin R s = (FreeAlgebra.lift R ((↑) : s → A)).range := by
rw [← Algebra.adjoin_range_eq_range_freeAlgebra_lift, Subtype.range_coe]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Algebra.Subalgebra.Basic",
"Mathlib.Algebra.Algebra.Subalgebra.Lattice",
"Mathlib.Algebra.FreeMonoid.UniqueProds",
"Mathlib.Algebra.MonoidAlgebra.Basic",
"Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors"
] |
Mathlib/Algebra/FreeAlgebra.lean
|
_root_.Algebra.adjoin_eq_range_freeAlgebra_lift
|
Noncommutative version of `Algebra.adjoin_range_eq_range`.
|
FreeNonUnitalNonAssocAlgebra :=
MonoidAlgebra R (FreeMagma X)
|
abbrev
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
FreeNonUnitalNonAssocAlgebra
|
If `α` is a type, and `R` is a semiring, then `FreeNonUnitalNonAssocAlgebra R α` is the free
non-unital non-associative `R`-algebra generated by `α`.
This is an `R`-algebra equipped with a function
`FreeNonUnitalNonAssocAlgebra.of R : α → FreeNonUnitalNonAssocAlgebra R α` which has
the following universal property: if `A` is any `R`-algebra, and `f : α → A` is any function,
then this function is the composite of `FreeNonUnitalNonAssocAlgebra.of R`
and a unique non-unital `R`-algebra homomorphism
`FreeNonUnitalNonAssocAlgebra.lift R f : FreeNonUnitalNonAssocAlgebra R α →ₙₐ[R] A`.
A typical element of `FreeNonUnitalNonAssocAlgebra R α` is an `R`-linear combination of
nonempty formal (non-commutative, non-associative) products of elements of `α`.
For example if `x` and `y` are terms of type `α` and
`a`, `b` are terms of type `R` then `(3 * a * a) • (x * (y * x)) + (2 * b + 1) • (y * x)` is a
"typical" element of `FreeNonUnitalNonAssocAlgebra R α`.
|
of : X → FreeNonUnitalNonAssocAlgebra R X :=
MonoidAlgebra.ofMagma R _ ∘ FreeMagma.of
variable {A : Type w} [NonUnitalNonAssocSemiring A]
variable [Module R A] [IsScalarTower R A A] [SMulCommClass R A A]
|
def
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
of
|
The embedding of `X` into the free algebra with coefficients in `R`.
|
lift : (X → A) ≃ (FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) :=
FreeMagma.lift.trans (MonoidAlgebra.liftMagma R)
@[simp]
|
def
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
lift
|
The functor `X ↦ FreeNonUnitalNonAssocAlgebra 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.
|
lift_symm_apply (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) :
(lift R).symm F = F ∘ of R := rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
lift_symm_apply
| null |
of_comp_lift (f : X → A) : lift R f ∘ of R = f :=
(lift R).left_inv f
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
of_comp_lift
| null |
lift_unique (f : X → A) (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) :
F ∘ of R = f ↔ F = lift R f :=
(lift R).symm_apply_eq
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
lift_unique
| null |
lift_of_apply (f : X → A) (x) : lift R f (of R x) = f x :=
congr_fun (of_comp_lift _ f) x
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
lift_of_apply
| null |
lift_comp_of (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) : lift R (F ∘ of R) = F :=
(lift R).apply_symm_apply F
@[ext]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
lift_comp_of
| null |
hom_ext {F₁ F₂ : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A}
(h : ∀ x, F₁ (of R x) = F₂ (of R x)) : F₁ = F₂ :=
(lift R).symm.injective <| funext h
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Free",
"Mathlib.Algebra.MonoidAlgebra.Basic"
] |
Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean
|
hom_ext
| null |
GradedMonoid (A : ι → Type*) :=
Sigma A
|
def
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradedMonoid
|
A type alias of sigma types for graded monoids.
|
mk {A : ι → Type*} : ∀ i, A i → GradedMonoid A :=
Sigma.mk
/-! ### Actions -/
|
def
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
mk
|
Construct an element of a graded monoid.
|
GOne [Zero ι] where
/-- The term `one` of grade 0 -/
one : A 0
|
class
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GOne
|
If `R` acts on each `A i`, then it acts on `GradedMonoid A` via the `.2` projection. -/
instance [∀ i, SMul α (A i)] : SMul α (GradedMonoid A) where
smul r g := GradedMonoid.mk g.1 (r • g.2)
@[simp] theorem fst_smul [∀ i, SMul α (A i)] (a : α) (x : GradedMonoid A) :
(a • x).fst = x.fst := rfl
@[simp] theorem snd_smul [∀ i, SMul α (A i)] (a : α) (x : GradedMonoid A) :
(a • x).snd = a • x.snd := rfl
theorem smul_mk [∀ i, SMul α (A i)] {i} (c : α) (a : A i) :
c • mk i a = mk i (c • a) :=
rfl
instance [∀ i, SMul α (A i)] [∀ i, SMul β (A i)]
[∀ i, SMulCommClass α β (A i)] :
SMulCommClass α β (GradedMonoid A) where
smul_comm a b g := Sigma.ext rfl <| heq_of_eq <| smul_comm a b g.2
instance [SMul α β] [∀ i, SMul α (A i)] [∀ i, SMul β (A i)]
[∀ i, IsScalarTower α β (A i)] :
IsScalarTower α β (GradedMonoid A) where
smul_assoc a b g := Sigma.ext rfl <| heq_of_eq <| smul_assoc a b g.2
instance [Monoid α] [∀ i, MulAction α (A i)] :
MulAction α (GradedMonoid A) where
one_smul g := Sigma.ext rfl <| heq_of_eq <| one_smul _ g.2
mul_smul r₁ r₂ g := Sigma.ext rfl <| heq_of_eq <| mul_smul r₁ r₂ g.2
end actions
/-! ### Typeclasses -/
section Defs
variable (A : ι → Type*)
/-- A graded version of `One`, which must be of grade 0.
|
GOne.toOne [Zero ι] [GOne A] : One (GradedMonoid A) :=
⟨⟨_, GOne.one⟩⟩
@[simp] theorem fst_one [Zero ι] [GOne A] : (1 : GradedMonoid A).fst = 0 := rfl
@[simp] theorem snd_one [Zero ι] [GOne A] : (1 : GradedMonoid A).snd = GOne.one := rfl
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GOne.toOne
|
`GOne` implies `One (GradedMonoid A)`
|
GMul [Add ι] where
/-- The homogeneous multiplication map `mul` -/
mul {i j} : A i → A j → A (i + j)
|
class
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GMul
|
A graded version of `Mul`. Multiplication combines grades additively, like
`AddMonoidAlgebra`.
|
GMul.toMul [Add ι] [GMul A] : Mul (GradedMonoid A) :=
⟨fun x y : GradedMonoid A => ⟨_, GMul.mul x.snd y.snd⟩⟩
@[simp] theorem fst_mul [Add ι] [GMul A] (x y : GradedMonoid A) :
(x * y).fst = x.fst + y.fst := rfl
@[simp] theorem snd_mul [Add ι] [GMul A] (x y : GradedMonoid A) :
(x * y).snd = GMul.mul x.snd y.snd := rfl
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GMul.toMul
|
`GMul` implies `Mul (GradedMonoid A)`.
|
mk_mul_mk [Add ι] [GMul A] {i j} (a : A i) (b : A j) :
mk i a * mk j b = mk (i + j) (GMul.mul a b) :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
mk_mul_mk
| null |
gnpowRec : ∀ (n : ℕ) {i}, A i → A (n • i)
| 0, i, _ => cast (congr_arg A (zero_nsmul i).symm) GOne.one
| n + 1, i, a => cast (congr_arg A (succ_nsmul i n).symm) (GMul.mul (gnpowRec _ a) a)
@[simp]
|
def
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
gnpowRec
|
A default implementation of power on a graded monoid, like `npowRec`.
`GMonoid.gnpow` should be used instead.
|
gnpowRec_zero (a : GradedMonoid A) : GradedMonoid.mk _ (gnpowRec 0 a.snd) = 1 :=
Sigma.ext (zero_nsmul _) (heq_of_cast_eq _ rfl).symm
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
gnpowRec_zero
| null |
gnpowRec_succ (n : ℕ) (a : GradedMonoid A) :
(GradedMonoid.mk _ <| gnpowRec n.succ a.snd) = ⟨_, gnpowRec n a.snd⟩ * a :=
Sigma.ext (succ_nsmul _ _) (heq_of_cast_eq _ rfl).symm
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
gnpowRec_succ
| null |
GMonoid [AddMonoid ι] extends GMul A, GOne A where
/-- Multiplication by `one` on the left is the identity -/
one_mul (a : GradedMonoid A) : 1 * a = a
/-- Multiplication by `one` on the right is the identity -/
mul_one (a : GradedMonoid A) : a * 1 = a
/-- Multiplication is associative -/
mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
/-- Optional field to allow definitional control of natural powers -/
gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
/-- The zeroth power will yield 1 -/
gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
apply_gmonoid_gnpowRec_zero_tac
/-- Successor powers behave as expected -/
gnpow_succ' :
∀ (n : ℕ) (a : GradedMonoid A),
(GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
apply_gmonoid_gnpowRec_succ_tac
|
class
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GMonoid
|
A tactic to for use as an optional value for `GMonoid.gnpow_zero'`. -/
macro "apply_gmonoid_gnpowRec_zero_tac" : tactic => `(tactic| apply GMonoid.gnpowRec_zero)
/-- A tactic to for use as an optional value for `GMonoid.gnpow_succ'`. -/
macro "apply_gmonoid_gnpowRec_succ_tac" : tactic => `(tactic| apply GMonoid.gnpowRec_succ)
/-- A graded version of `Monoid`
Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid.
|
GMonoid.toMonoid [AddMonoid ι] [GMonoid A] : Monoid (GradedMonoid A) where
one := 1
mul := (· * ·)
npow n a := GradedMonoid.mk _ (GMonoid.gnpow n a.snd)
npow_zero a := GMonoid.gnpow_zero' a
npow_succ n a := GMonoid.gnpow_succ' n a
one_mul := GMonoid.one_mul
mul_one := GMonoid.mul_one
mul_assoc := GMonoid.mul_assoc
@[simp] theorem fst_pow [AddMonoid ι] [GMonoid A] (x : GradedMonoid A) (n : ℕ) :
(x ^ n).fst = n • x.fst := rfl
@[simp] theorem snd_pow [AddMonoid ι] [GMonoid A] (x : GradedMonoid A) (n : ℕ) :
(x ^ n).snd = GMonoid.gnpow n x.snd := rfl
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GMonoid.toMonoid
|
`GMonoid` implies a `Monoid (GradedMonoid A)`.
|
mk_pow [AddMonoid ι] [GMonoid A] {i} (a : A i) (n : ℕ) :
mk i a ^ n = mk (n • i) (GMonoid.gnpow _ a) := rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
mk_pow
| null |
GCommMonoid [AddCommMonoid ι] extends GMonoid A where
/-- Multiplication is commutative -/
mul_comm (a : GradedMonoid A) (b : GradedMonoid A) : a * b = b * a
|
class
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GCommMonoid
|
A graded version of `CommMonoid`.
|
GCommMonoid.toCommMonoid [AddCommMonoid ι] [GCommMonoid A] : CommMonoid (GradedMonoid A) :=
{ GMonoid.toMonoid A with mul_comm := GCommMonoid.mul_comm }
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GCommMonoid.toCommMonoid
|
`GCommMonoid` implies a `CommMonoid (GradedMonoid A)`, although this is only used as an
instance locally to define notation in `gmonoid` and similar typeclasses.
|
@[nolint unusedArguments]
GradeZero.one : One (A 0) :=
⟨GOne.one⟩
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradeZero.one
|
`1 : A 0` is the value provided in `GOne.one`.
|
GradeZero.smul (i : ι) : SMul (A 0) (A i) where
smul x y := @Eq.rec ι (0+i) (fun a _ => A a) (GMul.mul x y) i (zero_add i)
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradeZero.smul
|
`(•) : A 0 → A i → A i` is the value provided in `GradedMonoid.GMul.mul`, composed with
an `Eq.rec` to turn `A (0 + i)` into `A i`.
|
GradeZero.mul : Mul (A 0) where mul := (· • ·)
variable {A}
@[simp]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradeZero.mul
|
`(*) : A 0 → A 0 → A 0` is the value provided in `GradedMonoid.GMul.mul`, composed with
an `Eq.rec` to turn `A (0 + 0)` into `A 0`.
|
mk_zero_smul {i} (a : A 0) (b : A i) : mk _ (a • b) = mk _ a * mk _ b :=
Sigma.ext (zero_add _).symm <| eqRec_heq _ _
@[scoped simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
mk_zero_smul
| null |
GradeZero.smul_eq_mul (a b : A 0) : a • b = a * b :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradeZero.smul_eq_mul
| null |
@[simp]
mk_zero_pow (a : A 0) (n : ℕ) : mk _ (a ^ n) = mk _ a ^ n :=
Sigma.ext (nsmul_zero n).symm <| eqRec_heq _ _
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
mk_zero_pow
| null |
GradeZero.monoid : Monoid (A 0) :=
Function.Injective.monoid (mk 0) sigma_mk_injective rfl mk_zero_smul mk_zero_pow
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradeZero.monoid
|
The `Monoid` structure derived from `GMonoid A`.
|
GradeZero.commMonoid : CommMonoid (A 0) :=
Function.Injective.commMonoid (mk 0) sigma_mk_injective rfl mk_zero_smul mk_zero_pow
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradeZero.commMonoid
|
The `CommMonoid` structure derived from `GCommMonoid A`.
|
mkZeroMonoidHom : A 0 →* GradedMonoid A where
toFun := mk 0
map_one' := rfl
map_mul' := mk_zero_smul
|
def
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
mkZeroMonoidHom
|
`GradedMonoid.mk 0` is a `MonoidHom`, using the `GradedMonoid.GradeZero.monoid` structure.
|
GradeZero.mulAction {i} : MulAction (A 0) (A i) :=
letI := MulAction.compHom (GradedMonoid A) (mkZeroMonoidHom A)
Function.Injective.mulAction (mk i) sigma_mk_injective mk_zero_smul
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradeZero.mulAction
|
Each grade `A i` derives an `A 0`-action structure from `GMonoid A`.
|
List.dProdIndex (l : List α) (fι : α → ι) : ι :=
l.foldr (fun i b => fι i + b) 0
@[simp]
|
def
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
List.dProdIndex
|
The index used by `List.dProd`. Propositionally this is equal to `(l.map fι).Sum`, but
definitionally it needs to have a different form to avoid introducing `Eq.rec`s in `List.dProd`.
|
List.dProdIndex_nil (fι : α → ι) : ([] : List α).dProdIndex fι = 0 :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
List.dProdIndex_nil
| null |
List.dProdIndex_cons (a : α) (l : List α) (fι : α → ι) :
(a :: l).dProdIndex fι = fι a + l.dProdIndex fι :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
List.dProdIndex_cons
| null |
List.dProdIndex_eq_map_sum (l : List α) (fι : α → ι) :
l.dProdIndex fι = (l.map fι).sum := by
match l with
| [] => simp
| head::tail => simp [List.dProdIndex_eq_map_sum tail fι]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
List.dProdIndex_eq_map_sum
| null |
List.dProd (l : List α) (fι : α → ι) (fA : ∀ a, A (fι a)) : A (l.dProdIndex fι) :=
l.foldrRecOn _ GradedMonoid.GOne.one fun _ x a _ => GradedMonoid.GMul.mul (fA a) x
@[simp]
|
def
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
List.dProd
|
A dependent product for graded monoids represented by the indexed family of types `A i`.
This is a dependent version of `(l.map fA).prod`.
For a list `l : List α`, this computes the product of `fA a` over `a`, where each `fA` is of type
`A (fι a)`.
|
List.dProd_nil (fι : α → ι) (fA : ∀ a, A (fι a)) :
(List.nil : List α).dProd fι fA = GradedMonoid.GOne.one :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
List.dProd_nil
| null |
List.dProd_cons (fι : α → ι) (fA : ∀ a, A (fι a)) (a : α) (l : List α) :
(a :: l).dProd fι fA = (GradedMonoid.GMul.mul (fA a) (l.dProd fι fA) :) :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
List.dProd_cons
| null |
GradedMonoid.mk_list_dProd (l : List α) (fι : α → ι) (fA : ∀ a, A (fι a)) :
GradedMonoid.mk _ (l.dProd fι fA) = (l.map fun a => GradedMonoid.mk (fι a) (fA a)).prod := by
match l with
| [] => simp only [List.dProdIndex_nil, List.dProd_nil, List.map_nil, List.prod_nil]; rfl
| head::tail =>
simp [← GradedMonoid.mk_list_dProd tail _ _, GradedMonoid.mk_mul_mk, List.prod_cons]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradedMonoid.mk_list_dProd
| null |
GradedMonoid.list_prod_map_eq_dProd (l : List α) (f : α → GradedMonoid A) :
(l.map f).prod = GradedMonoid.mk _ (l.dProd (fun i => (f i).1) fun i => (f i).2) := by
rw [GradedMonoid.mk_list_dProd, GradedMonoid.mk]
simp_rw [Sigma.eta]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradedMonoid.list_prod_map_eq_dProd
|
A variant of `GradedMonoid.mk_list_dProd` for rewriting in the other direction.
|
GradedMonoid.list_prod_ofFn_eq_dProd {n : ℕ} (f : Fin n → GradedMonoid A) :
(List.ofFn f).prod =
GradedMonoid.mk _ ((List.finRange n).dProd (fun i => (f i).1) fun i => (f i).2) := by
rw [List.ofFn_eq_map, GradedMonoid.list_prod_map_eq_dProd]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
GradedMonoid.list_prod_ofFn_eq_dProd
| null |
@[simps one]
One.gOne [Zero ι] [One R] : GradedMonoid.GOne fun _ : ι => R where one := 1
@[simps mul]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
One.gOne
| null |
Mul.gMul [Add ι] [Mul R] : GradedMonoid.GMul fun _ : ι => R where mul x y := x * y
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
Mul.gMul
| null |
@[simps gnpow]
Monoid.gMonoid [AddMonoid ι] [Monoid R] : GradedMonoid.GMonoid fun _ : ι => R :=
{ One.gOne ι with
mul := fun x y => x * y
one_mul := fun _ => Sigma.ext (zero_add _) (heq_of_eq (one_mul _))
mul_one := fun _ => Sigma.ext (add_zero _) (heq_of_eq (mul_one _))
mul_assoc := fun _ _ _ => Sigma.ext (add_assoc _ _ _) (heq_of_eq (mul_assoc _ _ _))
gnpow := fun n _ a => a ^ n
gnpow_zero' := fun _ => Sigma.ext (zero_nsmul _) (heq_of_eq (Monoid.npow_zero _))
gnpow_succ' := fun _ ⟨_, _⟩ => Sigma.ext (succ_nsmul _ _) (heq_of_eq (Monoid.npow_succ _ _)) }
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
Monoid.gMonoid
|
If all grades are the same type and themselves form a monoid, then there is a trivial grading
structure.
|
CommMonoid.gCommMonoid [AddCommMonoid ι] [CommMonoid R] :
GradedMonoid.GCommMonoid fun _ : ι => R :=
{ Monoid.gMonoid ι with
mul_comm := fun _ _ => Sigma.ext (add_comm _ _) (heq_of_eq (mul_comm _ _)) }
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
CommMonoid.gCommMonoid
|
If all grades are the same type and themselves form a commutative monoid, then there is a
trivial grading structure.
|
@[simp]
List.dProd_monoid {α} [AddMonoid ι] [Monoid R] (l : List α) (fι : α → ι) (fA : α → R) :
@List.dProd _ _ (fun _ : ι => R) _ _ l fι fA = (l.map fA).prod := by
match l with
| [] =>
rw [List.dProd_nil, List.map_nil, List.prod_nil]
rfl
| head::tail =>
rw [List.dProd_cons, List.map_cons, List.prod_cons, List.dProd_monoid tail _ _]
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
List.dProd_monoid
|
When all the indexed types are the same, the dependent product is just the regular product.
|
SetLike.GradedOne {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S) : Prop where
/-- One has grade zero -/
one_mem : (1 : R) ∈ A 0
|
class
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.GradedOne
|
A version of `GradedMonoid.GOne` for internally graded objects.
|
SetLike.one_mem_graded {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S)
[SetLike.GradedOne A] : (1 : R) ∈ A 0 :=
SetLike.GradedOne.one_mem
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.one_mem_graded
| null |
SetLike.gOne {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S)
[SetLike.GradedOne A] : GradedMonoid.GOne fun i => A i where
one := ⟨1, SetLike.one_mem_graded _⟩
@[simp]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.gOne
| null |
SetLike.coe_gOne {S : Type*} [SetLike S R] [One R] [Zero ι] (A : ι → S)
[SetLike.GradedOne A] : ↑(@GradedMonoid.GOne.one _ (fun i => A i) _ _) = (1 : R) :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.coe_gOne
| null |
SetLike.GradedMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S) : Prop where
/-- Multiplication is homogeneous -/
mul_mem : ∀ ⦃i j⦄ {gi gj}, gi ∈ A i → gj ∈ A j → gi * gj ∈ A (i + j)
|
class
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.GradedMul
|
A version of `GradedMonoid.ghas_one` for internally graded objects.
|
SetLike.mul_mem_graded {S : Type*} [SetLike S R] [Mul R] [Add ι] {A : ι → S}
[SetLike.GradedMul A] ⦃i j⦄ {gi gj} (hi : gi ∈ A i) (hj : gj ∈ A j) : gi * gj ∈ A (i + j) :=
SetLike.GradedMul.mul_mem hi hj
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.mul_mem_graded
| null |
SetLike.gMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S)
[SetLike.GradedMul A] : GradedMonoid.GMul fun i => A i where
mul := fun a b => ⟨(a * b : R), SetLike.mul_mem_graded a.prop b.prop⟩
@[simp]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.gMul
| null |
SetLike.coe_gMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S)
[SetLike.GradedMul A] {i j : ι} (x : A i) (y : A j) :
↑(@GradedMonoid.GMul.mul _ (fun i => A i) _ _ _ _ x y) = (x * y : R) :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.coe_gMul
| null |
SetLike.GradedMonoid {S : Type*} [SetLike S R] [Monoid R] [AddMonoid ι] (A : ι → S) : Prop
extends SetLike.GradedOne A, SetLike.GradedMul A
|
class
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.GradedMonoid
|
A version of `GradedMonoid.GMonoid` for internally graded objects.
|
@[simps]
submonoid : Submonoid R where
carrier := A 0
mul_mem' ha hb := add_zero (0 : ι) ▸ SetLike.mul_mem_graded ha hb
one_mem' := SetLike.one_mem_graded A
|
def
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
submonoid
|
The submonoid `A 0` of `R`.
|
instMonoid : Monoid (A 0) := inferInstanceAs <| Monoid (GradeZero.submonoid A)
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
instMonoid
|
The monoid `A 0` inherited from `R` in the presence of `SetLike.GradedMonoid A`.
|
instCommMonoid
{R S : Type*} [SetLike S R] [CommMonoid R]
{A : ι → S} [SetLike.GradedMonoid A] :
CommMonoid (A 0) :=
inferInstanceAs <| CommMonoid (GradeZero.submonoid A)
@[simp, norm_cast] theorem coe_one : ↑(1 : A 0) = (1 : R) := rfl
@[simp, norm_cast] theorem coe_mul (a b : A 0) : ↑(a * b) = (↑a * ↑b : R) := rfl
@[simp, norm_cast] theorem coe_pow (a : A 0) (n : ℕ) : ↑(a ^ n) = (↑a : R) ^ n := rfl
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
instCommMonoid
|
The commutative monoid `A 0` inherited from `R` in the presence of `SetLike.GradedMonoid A`.
|
pow_mem_graded (n : ℕ) {r : R} {i : ι} (h : r ∈ A i) : r ^ n ∈ A (n • i) := by
match n with
| 0 =>
rw [pow_zero, zero_nsmul]
exact one_mem_graded _
| n + 1 =>
rw [pow_succ', succ_nsmul']
exact mul_mem_graded h (pow_mem_graded n h)
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
pow_mem_graded
| null |
list_prod_map_mem_graded {ι'} (l : List ι') (i : ι' → ι) (r : ι' → R)
(h : ∀ j ∈ l, r j ∈ A (i j)) : (l.map r).prod ∈ A (l.map i).sum := by
match l with
| [] =>
rw [List.map_nil, List.map_nil, List.prod_nil, List.sum_nil]
exact one_mem_graded _
| head::tail =>
rw [List.map_cons, List.map_cons, List.prod_cons, List.sum_cons]
exact
mul_mem_graded (h _ List.mem_cons_self)
(list_prod_map_mem_graded tail _ _ fun j hj => h _ <| List.mem_cons_of_mem _ hj)
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
list_prod_map_mem_graded
| null |
list_prod_ofFn_mem_graded {n} (i : Fin n → ι) (r : Fin n → R) (h : ∀ j, r j ∈ A (i j)) :
(List.ofFn r).prod ∈ A (List.ofFn i).sum := by
rw [List.ofFn_eq_map, List.ofFn_eq_map]
exact list_prod_map_mem_graded _ _ _ fun _ _ => h _
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
list_prod_ofFn_mem_graded
| null |
SetLike.gMonoid {S : Type*} [SetLike S R] [Monoid R] [AddMonoid ι] (A : ι → S)
[SetLike.GradedMonoid A] : GradedMonoid.GMonoid fun i => A i :=
{ SetLike.gOne A,
SetLike.gMul A with
one_mul := fun ⟨_, _, _⟩ => Sigma.subtype_ext (zero_add _) (one_mul _)
mul_one := fun ⟨_, _, _⟩ => Sigma.subtype_ext (add_zero _) (mul_one _)
mul_assoc := fun ⟨_, _, _⟩ ⟨_, _, _⟩ ⟨_, _, _⟩ =>
Sigma.subtype_ext (add_assoc _ _ _) (mul_assoc _ _ _)
gnpow := fun n _ a => ⟨(a:R)^n, SetLike.pow_mem_graded n a.prop⟩
gnpow_zero' := fun _ => Sigma.subtype_ext (zero_nsmul _) (pow_zero _)
gnpow_succ' := fun _ _ => Sigma.subtype_ext (succ_nsmul _ _) (pow_succ _ _) }
@[simp]
|
instance
|
Algebra
|
[
"Mathlib.Algebra.BigOperators.Group.List.Lemmas",
"Mathlib.Algebra.Group.Action.Hom",
"Mathlib.Algebra.Group.Submonoid.Defs",
"Mathlib.Data.List.FinRange",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Data.Sigma.Basic",
"Lean.Elab.Tactic",
"Mathlib.Algebra.BigOperators.Group.Finset.Basic"
] |
Mathlib/Algebra/GradedMonoid.lean
|
SetLike.gMonoid
|
Build a `GMonoid` instance for a collection of subobjects.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.