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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lift_comp_of' (f : free_magma α →ₙ* β) : lift (f ∘ of) = f :=
lift.apply_symm_apply f | lift_comp_of' (f : free_magma α →ₙ* β) : lift (f ∘ of) = f | lift.apply_symm_apply f | lemma | free_magma.lift_comp_of' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"lift"
] | null | 110 | 111 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map (f : α → β) : free_magma α →ₙ* free_magma β := lift (of ∘ f) | map (f : α → β) : free_magma α →ₙ* free_magma β | lift (of ∘ f) | def | free_magma.map | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"lift"
] | The unique magma homomorphism `free_magma α →ₙ* free_magma β` that sends
each `of x` to `of (f x)`. | 121 | 123 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_of (x) : map f (of x) = of (f x) := rfl | map_of (x) : map f (of x) = of (f x) | rfl | lemma | free_magma.map_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | null | 125 | 125 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: monad free_magma :=
{ pure := λ _, of,
bind := λ _ _ x f, lift f x } | : monad free_magma | { pure := λ _, of,
bind := λ _ _ x f, lift f x } | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"lift"
] | null | 133 | 136 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
rec_on_pure {C : free_magma α → Sort l} (x)
(ih1 : ∀ x, C (pure x)) (ih2 : ∀ x y, C x → C y → C (x * y)) :
C x :=
free_magma.rec_on_mul x ih1 ih2 | rec_on_pure {C : free_magma α → Sort l} (x)
(ih1 : ∀ x, C (pure x)) (ih2 : ∀ x y, C x → C y → C (x * y)) :
C x | free_magma.rec_on_mul x ih1 ih2 | def | free_magma.rec_on_pure | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"free_magma.rec_on_mul"
] | Recursor on `free_magma` using `pure` instead of `of`. | 139 | 143 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_pure (f : α → β) (x) : (f <$> pure x : free_magma β) = pure (f x) := rfl | map_pure (f : α → β) (x) : (f <$> pure x : free_magma β) = pure (f x) | rfl | lemma | free_magma.map_pure | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 145 | 146 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_mul' (f : α → β) (x y : free_magma α) : (f <$> (x * y)) = (f <$> x * f <$> y) := rfl | map_mul' (f : α → β) (x y : free_magma α) : (f <$> (x * y)) = (f <$> x * f <$> y) | rfl | lemma | free_magma.map_mul' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 148 | 149 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
pure_bind (f : α → free_magma β) (x) : (pure x >>= f) = f x := rfl | pure_bind (f : α → free_magma β) (x) : (pure x >>= f) = f x | rfl | lemma | free_magma.pure_bind | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 151 | 152 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_bind (f : α → free_magma β) (x y : free_magma α) :
(x * y >>= f) = ((x >>= f) * (y >>= f)) := rfl | mul_bind (f : α → free_magma β) (x y : free_magma α) :
(x * y >>= f) = ((x >>= f) * (y >>= f)) | rfl | lemma | free_magma.mul_bind | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 154 | 156 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
pure_seq {α β : Type u} {f : α → β} {x : free_magma α} : pure f <*> x = f <$> x := rfl | pure_seq {α β : Type u} {f : α → β} {x : free_magma α} : pure f <*> x = f <$> x | rfl | lemma | free_magma.pure_seq | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 158 | 159 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_seq {α β : Type u} {f g : free_magma (α → β)} {x : free_magma α} :
(f * g) <*> x = (f <*> x) * (g <*> x) := rfl | mul_seq {α β : Type u} {f g : free_magma (α → β)} {x : free_magma α} :
(f * g) <*> x = (f <*> x) * (g <*> x) | rfl | lemma | free_magma.mul_seq | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 161 | 163 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: is_lawful_monad free_magma.{u} :=
{ pure_bind := λ _ _ _ _, rfl,
bind_assoc := λ α β γ x f g, free_magma.rec_on_pure x (λ x, rfl)
(λ x y ih1 ih2, by rw [mul_bind, mul_bind, mul_bind, ih1, ih2]),
id_map := λ α x, free_magma.rec_on_pure x (λ _, rfl)
(λ x y ih1 ih2, by rw [map_mul', ih1, ih2]) } | : is_lawful_monad free_magma.{u} | { pure_bind := λ _ _ _ _, rfl,
bind_assoc := λ α β γ x f g, free_magma.rec_on_pure x (λ x, rfl)
(λ x y ih1 ih2, by rw [mul_bind, mul_bind, mul_bind, ih1, ih2]),
id_map := λ α x, free_magma.rec_on_pure x (λ _, rfl)
(λ x y ih1 ih2, by rw [map_mul', ih1, ih2]) } | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"bind_assoc",
"free_magma.rec_on_pure"
] | null | 165 | 171 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
free_magma.traverse {m : Type u → Type u} [applicative m] {α β : Type u}
(F : α → m β) :
free_magma α → m (free_magma β)
| (free_magma.of x) := free_magma.of <$> F x
| (x * y) := (*) <$> x.traverse <*> y.traverse | free_magma.traverse {m : Type u → Type u} [applicative m] {α β : Type u}
(F : α → m β) :
free_magma α → m (free_magma β)
| (free_magma.of x) | free_magma.of <$> F x
| (x * y) := (*) <$> x.traverse <*> y.traverse | def | free_magma.traverse | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | `free_magma` is traversable. | 178 | 182 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
free_add_magma.traverse {m : Type u → Type u} [applicative m] {α β : Type u}
(F : α → m β) :
free_add_magma α → m (free_add_magma β)
| (free_add_magma.of x) := free_add_magma.of <$> F x
| (x + y) := (+) <$> x.traverse <*> y.traverse | free_add_magma.traverse {m : Type u → Type u} [applicative m] {α β : Type u}
(F : α → m β) :
free_add_magma α → m (free_add_magma β)
| (free_add_magma.of x) | free_add_magma.of <$> F x
| (x + y) := (+) <$> x.traverse <*> y.traverse | def | free_add_magma.traverse | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_add_magma"
] | `free_add_magma` is traversable. | 185 | 189 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: traversable free_magma := ⟨@free_magma.traverse⟩ | : traversable free_magma | ⟨@free_magma.traverse⟩ | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"traversable"
] | null | 201 | 202 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
traverse_pure (x) : traverse F (pure x : free_magma α) = pure <$> F x := rfl | traverse_pure (x) : traverse F (pure x : free_magma α) = pure <$> F x | rfl | lemma | free_magma.traverse_pure | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 206 | 207 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
traverse_pure' : traverse F ∘ pure = λ x, (pure <$> F x : m (free_magma β)) := rfl | traverse_pure' : traverse F ∘ pure = λ x, (pure <$> F x : m (free_magma β)) | rfl | lemma | free_magma.traverse_pure' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 209 | 210 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
traverse_mul (x y : free_magma α) :
traverse F (x * y) = (*) <$> traverse F x <*> traverse F y := rfl | traverse_mul (x y : free_magma α) :
traverse F (x * y) = (*) <$> traverse F x <*> traverse F y | rfl | lemma | free_magma.traverse_mul | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 212 | 214 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
traverse_mul' :
function.comp (traverse F) ∘ @has_mul.mul (free_magma α) _ =
λ x y, (*) <$> traverse F x <*> traverse F y := rfl | traverse_mul' :
function.comp (traverse F) ∘ @has_mul.mul (free_magma α) _ =
λ x y, (*) <$> traverse F x <*> traverse F y | rfl | lemma | free_magma.traverse_mul' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 216 | 219 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
traverse_eq (x) : free_magma.traverse F x = traverse F x := rfl | traverse_eq (x) : free_magma.traverse F x = traverse F x | rfl | lemma | free_magma.traverse_eq | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma.traverse"
] | null | 221 | 222 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_map_seq (x y : free_magma α) :
((*) <$> x <*> y : id (free_magma α)) = (x * y : free_magma α) := rfl | mul_map_seq (x y : free_magma α) :
((*) <$> x <*> y : id (free_magma α)) = (x * y : free_magma α) | rfl | lemma | free_magma.mul_map_seq | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 224 | 226 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: is_lawful_traversable free_magma.{u} :=
{ id_traverse := λ α x, free_magma.rec_on_pure x (λ x, rfl)
(λ x y ih1 ih2, by rw [traverse_mul, ih1, ih2, mul_map_seq]),
comp_traverse := λ F G hf1 hg1 hf2 hg2 α β γ f g x, free_magma.rec_on_pure x
(λ x, by resetI; simp only [traverse_pure, traverse_pure'] with funct... | : is_lawful_traversable free_magma.{u} | { id_traverse := λ α x, free_magma.rec_on_pure x (λ x, rfl)
(λ x y ih1 ih2, by rw [traverse_mul, ih1, ih2, mul_map_seq]),
comp_traverse := λ F G hf1 hg1 hf2 hg2 α β γ f g x, free_magma.rec_on_pure x
(λ x, by resetI; simp only [traverse_pure, traverse_pure'] with functor_norm)
(λ x y ih1 ih2, by resetI; rw... | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma.rec_on_pure",
"is_lawful_traversable"
] | null | 228 | 241 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
free_magma.repr {α : Type u} [has_repr α] : free_magma α → string
| (free_magma.of x) := repr x
| (x * y) := "( " ++ x.repr ++ " * " ++ y.repr ++ " )" | free_magma.repr {α : Type u} [has_repr α] : free_magma α → string
| (free_magma.of x) | repr x
| (x * y) := "( " ++ x.repr ++ " * " ++ y.repr ++ " )" | def | free_magma.repr | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | Representation of an element of a free magma. | 248 | 250 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
free_add_magma.repr {α : Type u} [has_repr α] : free_add_magma α → string
| (free_add_magma.of x) := repr x
| (x + y) := "( " ++ x.repr ++ " + " ++ y.repr ++ " )" | free_add_magma.repr {α : Type u} [has_repr α] : free_add_magma α → string
| (free_add_magma.of x) | repr x
| (x + y) := "( " ++ x.repr ++ " + " ++ y.repr ++ " )" | def | free_add_magma.repr | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_add_magma"
] | Representation of an element of a free additive magma. | 253 | 255 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
{α : Type u} [has_repr α] : has_repr (free_magma α) := ⟨free_magma.repr⟩ | {α : Type u} [has_repr α] : has_repr (free_magma α) | ⟨free_magma.repr⟩ | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | null | 259 | 260 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
free_magma.length {α : Type u} : free_magma α → ℕ
| (free_magma.of x) := 1
| (x * y) := x.length + y.length | free_magma.length {α : Type u} : free_magma α → ℕ
| (free_magma.of x) | 1
| (x * y) := x.length + y.length | def | free_magma.length | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma"
] | Length of an element of a free magma. | 263 | 265 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
free_add_magma.length {α : Type u} : free_add_magma α → ℕ
| (free_add_magma.of x) := 1
| (x + y) := x.length + y.length | free_add_magma.length {α : Type u} : free_add_magma α → ℕ
| (free_add_magma.of x) | 1
| (x + y) := x.length + y.length | def | free_add_magma.length | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_add_magma"
] | Length of an element of a free additive magma. | 268 | 270 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
add_magma.assoc_rel (α : Type u) [has_add α] : α → α → Prop
| intro : ∀ x y z, add_magma.assoc_rel ((x + y) + z) (x + (y + z))
| left : ∀ w x y z, add_magma.assoc_rel (w + ((x + y) + z)) (w + (x + (y + z))) | add_magma.assoc_rel (α : Type u) [has_add α] : α → α → Prop
| intro : ∀ x y z, add_magma.assoc_rel ((x + y) + z) (x + (y + z))
| left : ∀ w x y z, add_magma.assoc_rel (w + ((x + y) + z)) (w + (x + (y + z))) | inductive | add_magma.assoc_rel | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | Associativity relations for an additive magma. | 275 | 277 | false | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
magma.assoc_rel (α : Type u) [has_mul α] : α → α → Prop
| intro : ∀ x y z, magma.assoc_rel ((x * y) * z) (x * (y * z))
| left : ∀ w x y z, magma.assoc_rel (w * ((x * y) * z)) (w * (x * (y * z))) | magma.assoc_rel (α : Type u) [has_mul α] : α → α → Prop
| intro : ∀ x y z, magma.assoc_rel ((x * y) * z) (x * (y * z))
| left : ∀ w x y z, magma.assoc_rel (w * ((x * y) * z)) (w * (x * (y * z))) | inductive | magma.assoc_rel | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | Associativity relations for a magma. | 280 | 283 | false | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
assoc_quotient (α : Type u) [has_mul α] : Type u := quot $ assoc_rel α | assoc_quotient (α : Type u) [has_mul α] : Type u | quot $ assoc_rel α | def | magma.assoc_quotient | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | Semigroup quotient of a magma. | 288 | 289 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
quot_mk_assoc (x y z : α) : quot.mk (assoc_rel α) (x * y * z) = quot.mk _ (x * (y * z)) :=
quot.sound (assoc_rel.intro _ _ _) | quot_mk_assoc (x y z : α) : quot.mk (assoc_rel α) (x * y * z) = quot.mk _ (x * (y * z)) | quot.sound (assoc_rel.intro _ _ _) | lemma | magma.assoc_quotient.quot_mk_assoc | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | null | 295 | 297 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
quot_mk_assoc_left (x y z w : α) :
quot.mk (assoc_rel α) (x * (y * z * w)) = quot.mk _ (x * (y * (z * w))) :=
quot.sound (assoc_rel.left _ _ _ _) | quot_mk_assoc_left (x y z w : α) :
quot.mk (assoc_rel α) (x * (y * z * w)) = quot.mk _ (x * (y * (z * w))) | quot.sound (assoc_rel.left _ _ _ _) | lemma | magma.assoc_quotient.quot_mk_assoc_left | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | null | 299 | 302 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: semigroup (assoc_quotient α) :=
{ mul := λ x y,
begin
refine quot.lift_on₂ x y (λ x y, quot.mk _ (x * y)) _ _,
{ rintro a b₁ b₂ (⟨c, d, e⟩ | ⟨c, d, e, f⟩); simp only,
{ exact quot_mk_assoc_left _ _ _ _ },
{ rw [← quot_mk_assoc, quot_mk_assoc_left, quot_mk_assoc] } },
{ rintro a₁ ... | : semigroup (assoc_quotient α) | { mul := λ x y,
begin
refine quot.lift_on₂ x y (λ x y, quot.mk _ (x * y)) _ _,
{ rintro a b₁ b₂ (⟨c, d, e⟩ | ⟨c, d, e, f⟩); simp only,
{ exact quot_mk_assoc_left _ _ _ _ },
{ rw [← quot_mk_assoc, quot_mk_assoc_left, quot_mk_assoc] } },
{ rintro a₁ a₂ b (⟨c, d, e⟩ | ⟨c, d, e, f⟩); s... | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"mul_assoc",
"quot.induction_on₃",
"quot.lift_on₂",
"semigroup"
] | null | 304 | 317 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
of : α →ₙ* assoc_quotient α := ⟨quot.mk _, λ x y, rfl⟩ | of : α →ₙ* assoc_quotient α | ⟨quot.mk _, λ x y, rfl⟩ | def | magma.assoc_quotient.of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | Embedding from magma to its free semigroup. | 320 | 321 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
[inhabited α] : inhabited (assoc_quotient α) := ⟨of default⟩ | [inhabited α] : inhabited (assoc_quotient α) | ⟨of default⟩ | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | null | 323 | 324 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
induction_on {C : assoc_quotient α → Prop} (x : assoc_quotient α)
(ih : ∀ x, C (of x)) : C x :=
quot.induction_on x ih | induction_on {C : assoc_quotient α → Prop} (x : assoc_quotient α)
(ih : ∀ x, C (of x)) : C x | quot.induction_on x ih | lemma | magma.assoc_quotient.induction_on | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"ih"
] | null | 326 | 329 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
hom_ext {f g : assoc_quotient α →ₙ* β} (h : f.comp of = g.comp of) : f = g :=
fun_like.ext _ _ $ λ x, assoc_quotient.induction_on x $ fun_like.congr_fun h | hom_ext {f g : assoc_quotient α →ₙ* β} (h : f.comp of = g.comp of) : f = g | fun_like.ext _ _ $ λ x, assoc_quotient.induction_on x $ fun_like.congr_fun h | lemma | magma.assoc_quotient.hom_ext | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"fun_like.congr_fun",
"fun_like.ext",
"hom_ext"
] | null | 335 | 337 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift : (α →ₙ* β) ≃ (assoc_quotient α →ₙ* β) :=
{ to_fun := λ f,
{ to_fun := λ x, quot.lift_on x f $
by rintros a b (⟨c, d, e⟩ | ⟨c, d, e, f⟩); simp only [map_mul, mul_assoc],
map_mul' := λ x y, quot.induction_on₂ x y (map_mul f) },
inv_fun := λ f, f.comp of,
left_inv := λ f, fun_like.ext _ _ $ λ x... | lift : (α →ₙ* β) ≃ (assoc_quotient α →ₙ* β) | { to_fun := λ f,
{ to_fun := λ x, quot.lift_on x f $
by rintros a b (⟨c, d, e⟩ | ⟨c, d, e, f⟩); simp only [map_mul, mul_assoc],
map_mul' := λ x y, quot.induction_on₂ x y (map_mul f) },
inv_fun := λ f, f.comp of,
left_inv := λ f, fun_like.ext _ _ $ λ x, rfl,
right_inv := λ f, hom_ext $ fun_like.e... | def | magma.assoc_quotient.lift | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"fun_like.ext",
"hom_ext",
"inv_fun",
"lift",
"map_mul",
"mul_assoc",
"quot.induction_on₂"
] | Lifts a magma homomorphism `α → β` to a semigroup homomorphism `magma.assoc_quotient α → β`
given a semigroup `β`. | 341 | 350 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift_of (x : α) : lift f (of x) = f x := rfl | lift_of (x : α) : lift f (of x) = f x | rfl | lemma | magma.assoc_quotient.lift_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"lift"
] | null | 352 | 352 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift_comp_of : (lift f).comp of = f := lift.symm_apply_apply f | lift_comp_of : (lift f).comp of = f | lift.symm_apply_apply f | lemma | magma.assoc_quotient.lift_comp_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"lift"
] | null | 354 | 354 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift_comp_of' (f : assoc_quotient α →ₙ* β) :
lift (f.comp of) = f :=
lift.apply_symm_apply f | lift_comp_of' (f : assoc_quotient α →ₙ* β) :
lift (f.comp of) = f | lift.apply_symm_apply f | lemma | magma.assoc_quotient.lift_comp_of' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"lift"
] | null | 356 | 358 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map : assoc_quotient α →ₙ* assoc_quotient β := lift (of.comp f) | map : assoc_quotient α →ₙ* assoc_quotient β | lift (of.comp f) | def | magma.assoc_quotient.map | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"lift"
] | From a magma homomorphism `α →ₙ* β` to a semigroup homomorphism
`magma.assoc_quotient α →ₙ* magma.assoc_quotient β`. | 366 | 368 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_of (x) : map f (of x) = of (f x) := rfl | map_of (x) : map f (of x) = of (f x) | rfl | lemma | magma.assoc_quotient.map_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | null | 370 | 370 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
free_add_semigroup (α : Type u) := (head : α) (tail : list α) | free_add_semigroup (α : Type u) | (head : α) (tail : list α) | structure | free_add_semigroup | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | Free additive semigroup over a given alphabet. | 377 | 377 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
free_semigroup (α : Type u) := (head : α) (tail : list α) | free_semigroup (α : Type u) | (head : α) (tail : list α) | structure | free_semigroup | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | Free semigroup over a given alphabet. | 380 | 380 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: semigroup (free_semigroup α) :=
{ mul := λ L1 L2, ⟨L1.1, L1.2 ++ L2.1 :: L2.2⟩,
mul_assoc := λ L1 L2 L3, ext _ _ rfl $ list.append_assoc _ _ _ } | : semigroup (free_semigroup α) | { mul := λ L1 L2, ⟨L1.1, L1.2 ++ L2.1 :: L2.2⟩,
mul_assoc := λ L1 L2 L3, ext _ _ rfl $ list.append_assoc _ _ _ } | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"mul_assoc",
"semigroup"
] | null | 386 | 389 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
head_mul (x y : free_semigroup α) : (x * y).1 = x.1 := rfl | head_mul (x y : free_semigroup α) : (x * y).1 = x.1 | rfl | lemma | free_semigroup.head_mul | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 391 | 391 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
tail_mul (x y : free_semigroup α) : (x * y).2 = x.2 ++ (y.1 :: y.2) :=
rfl | tail_mul (x y : free_semigroup α) : (x * y).2 = x.2 ++ (y.1 :: y.2) | rfl | lemma | free_semigroup.tail_mul | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 393 | 394 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mk_mul_mk (x y : α) (L1 L2 : list α) :
mk x L1 * mk y L2 = mk x (L1 ++ y :: L2) := rfl | mk_mul_mk (x y : α) (L1 L2 : list α) :
mk x L1 * mk y L2 = mk x (L1 ++ y :: L2) | rfl | lemma | free_semigroup.mk_mul_mk | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | null | 396 | 397 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of (x : α) : free_semigroup α := ⟨x, []⟩ | of (x : α) : free_semigroup α | ⟨x, []⟩ | def | free_semigroup.of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | The embedding `α → free_semigroup α`. | 400 | 401 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
length (x : free_semigroup α) : ℕ := x.tail.length + 1 | length (x : free_semigroup α) : ℕ | x.tail.length + 1 | def | free_semigroup.length | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | Length of an element of free semigroup. | 404 | 405 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
length_mul (x y : free_semigroup α) :
(x * y).length = x.length + y.length :=
by simp [length, ← add_assoc, add_right_comm] | length_mul (x y : free_semigroup α) :
(x * y).length = x.length + y.length | by simp [length, ← add_assoc, add_right_comm] | lemma | free_semigroup.length_mul | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 407 | 409 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
length_of (x : α) : (of x).length = 1 := rfl | length_of (x : α) : (of x).length = 1 | rfl | lemma | free_semigroup.length_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | null | 411 | 411 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
[inhabited α] : inhabited (free_semigroup α) := ⟨of default⟩ | [inhabited α] : inhabited (free_semigroup α) | ⟨of default⟩ | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 413 | 413 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
rec_on_mul {C : free_semigroup α → Sort l} (x)
(ih1 : ∀ x, C (of x)) (ih2 : ∀ x y, C (of x) → C y → C (of x * y)) :
C x :=
free_semigroup.rec_on x $ λ f s, list.rec_on s ih1 (λ hd tl ih f, ih2 f ⟨hd, tl⟩ (ih1 f) (ih hd)) f | rec_on_mul {C : free_semigroup α → Sort l} (x)
(ih1 : ∀ x, C (of x)) (ih2 : ∀ x y, C (of x) → C y → C (of x * y)) :
C x | free_semigroup.rec_on x $ λ f s, list.rec_on s ih1 (λ hd tl ih f, ih2 f ⟨hd, tl⟩ (ih1 f) (ih hd)) f | def | free_semigroup.rec_on_mul | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"ih"
] | Recursor for free semigroup using `of` and `*`. | 416 | 420 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
hom_ext {β : Type v} [has_mul β] {f g : free_semigroup α →ₙ* β} (h : f ∘ of = g ∘ of) :
f = g :=
fun_like.ext _ _ $ λ x, free_semigroup.rec_on_mul x (congr_fun h) $
λ x y hx hy, by simp only [map_mul, *] | hom_ext {β : Type v} [has_mul β] {f g : free_semigroup α →ₙ* β} (h : f ∘ of = g ∘ of) :
f = g | fun_like.ext _ _ $ λ x, free_semigroup.rec_on_mul x (congr_fun h) $
λ x y hx hy, by simp only [map_mul, *] | lemma | free_semigroup.hom_ext | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"free_semigroup.rec_on_mul",
"fun_like.ext",
"hom_ext",
"map_mul"
] | null | 422 | 426 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift : (α → β) ≃ (free_semigroup α →ₙ* β) :=
{ to_fun := λ f,
{ to_fun := λ x, x.2.foldl (λ a b, a * f b) (f x.1),
map_mul' := λ x y, by simp only [head_mul, tail_mul, ← list.foldl_map f, list.foldl_append,
list.foldl_cons, list.foldl_assoc] },
inv_fun := λ f, f ∘ of,
left_inv := λ f, rfl,
right... | lift : (α → β) ≃ (free_semigroup α →ₙ* β) | { to_fun := λ f,
{ to_fun := λ x, x.2.foldl (λ a b, a * f b) (f x.1),
map_mul' := λ x y, by simp only [head_mul, tail_mul, ← list.foldl_map f, list.foldl_append,
list.foldl_cons, list.foldl_assoc] },
inv_fun := λ f, f ∘ of,
left_inv := λ f, rfl,
right_inv := λ f, hom_ext rfl } | def | free_semigroup.lift | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"hom_ext",
"inv_fun",
"lift",
"list.foldl_append",
"list.foldl_assoc",
"list.foldl_cons",
"list.foldl_map"
] | Lifts a function `α → β` to a semigroup homomorphism `free_semigroup α → β` given
a semigroup `β`. | 434 | 443 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift_of (x : α) : lift f (of x) = f x := rfl | lift_of (x : α) : lift f (of x) = f x | rfl | lemma | free_semigroup.lift_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"lift"
] | null | 445 | 445 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift_comp_of : lift f ∘ of = f := rfl | lift_comp_of : lift f ∘ of = f | rfl | lemma | free_semigroup.lift_comp_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"lift"
] | null | 446 | 446 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift_comp_of' (f : free_semigroup α →ₙ* β) : lift (f ∘ of) = f :=
hom_ext rfl | lift_comp_of' (f : free_semigroup α →ₙ* β) : lift (f ∘ of) = f | hom_ext rfl | lemma | free_semigroup.lift_comp_of' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"hom_ext",
"lift"
] | null | 448 | 449 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift_of_mul (x y) : lift f (of x * y) = f x * lift f y :=
by rw [map_mul, lift_of] | lift_of_mul (x y) : lift f (of x * y) = f x * lift f y | by rw [map_mul, lift_of] | lemma | free_semigroup.lift_of_mul | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"lift",
"map_mul"
] | null | 451 | 452 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map : free_semigroup α →ₙ* free_semigroup β :=
lift $ of ∘ f | map : free_semigroup α →ₙ* free_semigroup β | lift $ of ∘ f | def | free_semigroup.map | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"lift"
] | The unique semigroup homomorphism that sends `of x` to `of (f x)`. | 461 | 463 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_of (x) : map f (of x) = of (f x) := rfl | map_of (x) : map f (of x) = of (f x) | rfl | lemma | free_semigroup.map_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [] | null | 465 | 465 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
length_map (x) : (map f x).length = x.length :=
free_semigroup.rec_on_mul x (λ x, rfl) $ λ x y hx hy, by simp only [map_mul, length_mul, *] | length_map (x) : (map f x).length = x.length | free_semigroup.rec_on_mul x (λ x, rfl) $ λ x y hx hy, by simp only [map_mul, length_mul, *] | lemma | free_semigroup.length_map | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup.rec_on_mul",
"map_mul"
] | null | 467 | 468 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: monad free_semigroup :=
{ pure := λ _, of,
bind := λ _ _ x f, lift f x } | : monad free_semigroup | { pure := λ _, of,
bind := λ _ _ x f, lift f x } | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"lift"
] | null | 476 | 479 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
rec_on_pure {C : free_semigroup α → Sort l} (x)
(ih1 : ∀ x, C (pure x)) (ih2 : ∀ x y, C (pure x) → C y → C (pure x * y)) :
C x :=
free_semigroup.rec_on_mul x ih1 ih2 | rec_on_pure {C : free_semigroup α → Sort l} (x)
(ih1 : ∀ x, C (pure x)) (ih2 : ∀ x y, C (pure x) → C y → C (pure x * y)) :
C x | free_semigroup.rec_on_mul x ih1 ih2 | def | free_semigroup.rec_on_pure | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"free_semigroup.rec_on_mul"
] | Recursor that uses `pure` instead of `of`. | 482 | 486 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_pure (f : α → β) (x) : (f <$> pure x : free_semigroup β) = pure (f x) := rfl | map_pure (f : α → β) (x) : (f <$> pure x : free_semigroup β) = pure (f x) | rfl | lemma | free_semigroup.map_pure | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 488 | 489 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
map_mul' (f : α → β) (x y : free_semigroup α) :
(f <$> (x * y)) = (f <$> x * f <$> y) :=
map_mul (map f) _ _ | map_mul' (f : α → β) (x y : free_semigroup α) :
(f <$> (x * y)) = (f <$> x * f <$> y) | map_mul (map f) _ _ | lemma | free_semigroup.map_mul' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"map_mul"
] | null | 491 | 494 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
pure_bind (f : α → free_semigroup β) (x) :
(pure x >>= f) = f x := rfl | pure_bind (f : α → free_semigroup β) (x) :
(pure x >>= f) = f x | rfl | lemma | free_semigroup.pure_bind | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 496 | 497 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_bind (f : α → free_semigroup β) (x y : free_semigroup α) :
(x * y >>= f) = ((x >>= f) * (y >>= f)) :=
map_mul (lift f) _ _ | mul_bind (f : α → free_semigroup β) (x y : free_semigroup α) :
(x * y >>= f) = ((x >>= f) * (y >>= f)) | map_mul (lift f) _ _ | lemma | free_semigroup.mul_bind | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"lift",
"map_mul"
] | null | 499 | 502 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
pure_seq {f : α → β} {x : free_semigroup α} :
pure f <*> x = f <$> x := rfl | pure_seq {f : α → β} {x : free_semigroup α} :
pure f <*> x = f <$> x | rfl | lemma | free_semigroup.pure_seq | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 504 | 505 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_seq {f g : free_semigroup (α → β)} {x : free_semigroup α} :
(f * g) <*> x = (f <*> x) * (g <*> x) :=
mul_bind _ _ _ | mul_seq {f g : free_semigroup (α → β)} {x : free_semigroup α} :
(f * g) <*> x = (f <*> x) * (g <*> x) | mul_bind _ _ _ | lemma | free_semigroup.mul_seq | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 507 | 510 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: is_lawful_monad free_semigroup.{u} :=
{ pure_bind := λ _ _ _ _, rfl,
bind_assoc := λ α β γ x f g, rec_on_pure x (λ x, rfl)
(λ x y ih1 ih2, by rw [mul_bind, mul_bind, mul_bind, ih1, ih2]),
id_map := λ α x, rec_on_pure x (λ _, rfl) (λ x y ih1 ih2, by rw [map_mul', ih1, ih2]) } | : is_lawful_monad free_semigroup.{u} | { pure_bind := λ _ _ _ _, rfl,
bind_assoc := λ α β γ x f g, rec_on_pure x (λ x, rfl)
(λ x y ih1 ih2, by rw [mul_bind, mul_bind, mul_bind, ih1, ih2]),
id_map := λ α x, rec_on_pure x (λ _, rfl) (λ x y ih1 ih2, by rw [map_mul', ih1, ih2]) } | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"bind_assoc"
] | null | 512 | 517 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
traverse {m : Type u → Type u} [applicative m]
{α β : Type u} (F : α → m β) (x : free_semigroup α) : m (free_semigroup β) :=
rec_on_pure x (λ x, pure <$> F x) (λ x y ihx ihy, (*) <$> ihx <*> ihy) | traverse {m : Type u → Type u} [applicative m]
{α β : Type u} (F : α → m β) (x : free_semigroup α) : m (free_semigroup β) | rec_on_pure x (λ x, pure <$> F x) (λ x y ihx ihy, (*) <$> ihx <*> ihy) | def | free_semigroup.traverse | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | `free_semigroup` is traversable. | 520 | 523 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: traversable free_semigroup := ⟨@free_semigroup.traverse⟩ | : traversable free_semigroup | ⟨@free_semigroup.traverse⟩ | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"traversable"
] | null | 525 | 526 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
traverse_pure (x) :traverse F (pure x : free_semigroup α) = pure <$> F x := rfl | traverse_pure (x) :traverse F (pure x : free_semigroup α) = pure <$> F x | rfl | lemma | free_semigroup.traverse_pure | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 530 | 531 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
traverse_pure' : traverse F ∘ pure = λ x, (pure <$> F x : m (free_semigroup β)) := rfl | traverse_pure' : traverse F ∘ pure = λ x, (pure <$> F x : m (free_semigroup β)) | rfl | lemma | free_semigroup.traverse_pure' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 532 | 533 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
traverse_mul (x y : free_semigroup α) :
traverse F (x * y) = (*) <$> traverse F x <*> traverse F y :=
let ⟨x, L1⟩ := x, ⟨y, L2⟩ := y in
list.rec_on L1 (λ x, rfl) (λ hd tl ih x,
show (*) <$> pure <$> F x <*> traverse F ((mk hd tl) * (mk y L2)) =
(*) <$> ((*) <$> pure <$> F x <*> traverse F (mk hd tl)) <*> traverse... | traverse_mul (x y : free_semigroup α) :
traverse F (x * y) = (*) <$> traverse F x <*> traverse F y | let ⟨x, L1⟩ := x, ⟨y, L2⟩ := y in
list.rec_on L1 (λ x, rfl) (λ hd tl ih x,
show (*) <$> pure <$> F x <*> traverse F ((mk hd tl) * (mk y L2)) =
(*) <$> ((*) <$> pure <$> F x <*> traverse F (mk hd tl)) <*> traverse F (mk y L2),
by rw ih; simp only [(∘), (mul_assoc _ _ _).symm] with functor_norm) x | lemma | free_semigroup.traverse_mul | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup",
"ih",
"mul_assoc"
] | null | 537 | 543 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
traverse_mul' :
function.comp (traverse F) ∘ @has_mul.mul (free_semigroup α) _ =
λ x y, (*) <$> traverse F x <*> traverse F y :=
funext $ λ x, funext $ λ y, traverse_mul F x y | traverse_mul' :
function.comp (traverse F) ∘ @has_mul.mul (free_semigroup α) _ =
λ x y, (*) <$> traverse F x <*> traverse F y | funext $ λ x, funext $ λ y, traverse_mul F x y | lemma | free_semigroup.traverse_mul' | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 545 | 548 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
traverse_eq (x) : free_semigroup.traverse F x = traverse F x := rfl | traverse_eq (x) : free_semigroup.traverse F x = traverse F x | rfl | lemma | free_semigroup.traverse_eq | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup.traverse"
] | null | 551 | 551 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
mul_map_seq (x y : free_semigroup α) :
((*) <$> x <*> y : id (free_semigroup α)) = (x * y : free_semigroup α) := rfl | mul_map_seq (x y : free_semigroup α) :
((*) <$> x <*> y : id (free_semigroup α)) = (x * y : free_semigroup α) | rfl | lemma | free_semigroup.mul_map_seq | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup"
] | null | 553 | 554 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
: is_lawful_traversable free_semigroup.{u} :=
{ id_traverse := λ α x, free_semigroup.rec_on_mul x (λ x, rfl)
(λ x y ih1 ih2, by rw [traverse_mul, ih1, ih2, mul_map_seq]),
comp_traverse := λ F G hf1 hg1 hf2 hg2 α β γ f g x, rec_on_pure x
(λ x, by resetI; simp only [traverse_pure, traverse_pure'] with functor_n... | : is_lawful_traversable free_semigroup.{u} | { id_traverse := λ α x, free_semigroup.rec_on_mul x (λ x, rfl)
(λ x y ih1 ih2, by rw [traverse_mul, ih1, ih2, mul_map_seq]),
comp_traverse := λ F G hf1 hg1 hf2 hg2 α β γ f g x, rec_on_pure x
(λ x, by resetI; simp only [traverse_pure, traverse_pure'] with functor_norm)
(λ x y ih1 ih2, by resetI; rw [traver... | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup.rec_on_mul",
"is_lawful_traversable"
] | null | 556 | 569 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
[decidable_eq α] : decidable_eq (free_semigroup α) :=
λ x y, decidable_of_iff' _ (ext_iff _ _) | [decidable_eq α] : decidable_eq (free_semigroup α) | λ x y, decidable_of_iff' _ (ext_iff _ _) | instance | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"decidable_of_iff'",
"free_semigroup"
] | null | 573 | 575 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
to_free_semigroup : free_magma α →ₙ* free_semigroup α := free_magma.lift free_semigroup.of | to_free_semigroup : free_magma α →ₙ* free_semigroup α | free_magma.lift free_semigroup.of | def | free_magma.to_free_semigroup | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"free_magma.lift",
"free_semigroup",
"free_semigroup.of"
] | The canonical multiplicative morphism from `free_magma α` to `free_semigroup α`. | 584 | 585 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_free_semigroup_of (x : α) :
to_free_semigroup (of x) = free_semigroup.of x :=
rfl | to_free_semigroup_of (x : α) :
to_free_semigroup (of x) = free_semigroup.of x | rfl | lemma | free_magma.to_free_semigroup_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup.of"
] | null | 587 | 589 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_free_semigroup_comp_of :
@to_free_semigroup α ∘ of = free_semigroup.of :=
rfl | to_free_semigroup_comp_of :
@to_free_semigroup α ∘ of = free_semigroup.of | rfl | lemma | free_magma.to_free_semigroup_comp_of | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup.of"
] | null | 591 | 593 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_free_semigroup_comp_map (f : α → β) :
to_free_semigroup.comp (map f) = (free_semigroup.map f).comp to_free_semigroup :=
by { ext1, refl } | to_free_semigroup_comp_map (f : α → β) :
to_free_semigroup.comp (map f) = (free_semigroup.map f).comp to_free_semigroup | by { ext1, refl } | lemma | free_magma.to_free_semigroup_comp_map | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_semigroup.map"
] | null | 595 | 597 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
to_free_semigroup_map (f : α → β) (x : free_magma α) :
(map f x).to_free_semigroup = free_semigroup.map f x.to_free_semigroup :=
fun_like.congr_fun (to_free_semigroup_comp_map f) x | to_free_semigroup_map (f : α → β) (x : free_magma α) :
(map f x).to_free_semigroup = free_semigroup.map f x.to_free_semigroup | fun_like.congr_fun (to_free_semigroup_comp_map f) x | lemma | free_magma.to_free_semigroup_map | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"free_semigroup.map",
"fun_like.congr_fun"
] | null | 599 | 601 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
length_to_free_semigroup (x : free_magma α) :
x.to_free_semigroup.length = x.length :=
free_magma.rec_on_mul x (λ x, rfl) $ λ x y hx hy,
by rw [map_mul, free_semigroup.length_mul, length, hx, hy] | length_to_free_semigroup (x : free_magma α) :
x.to_free_semigroup.length = x.length | free_magma.rec_on_mul x (λ x, rfl) $ λ x y hx hy,
by rw [map_mul, free_semigroup.length_mul, length, hx, hy] | lemma | free_magma.length_to_free_semigroup | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"free_magma.rec_on_mul",
"free_semigroup.length_mul",
"map_mul"
] | null | 603 | 606 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
free_magma_assoc_quotient_equiv (α : Type u) :
magma.assoc_quotient (free_magma α) ≃* free_semigroup α :=
(magma.assoc_quotient.lift free_magma.to_free_semigroup).to_mul_equiv
(free_semigroup.lift (magma.assoc_quotient.of ∘ free_magma.of))
(by { ext, refl }) (by { ext1, refl }) | free_magma_assoc_quotient_equiv (α : Type u) :
magma.assoc_quotient (free_magma α) ≃* free_semigroup α | (magma.assoc_quotient.lift free_magma.to_free_semigroup).to_mul_equiv
(free_semigroup.lift (magma.assoc_quotient.of ∘ free_magma.of))
(by { ext, refl }) (by { ext1, refl }) | def | free_magma_assoc_quotient_equiv | algebra | src/algebra/free.lean | [
"algebra.hom.group",
"algebra.hom.equiv.basic",
"control.applicative",
"control.traversable.basic",
"logic.equiv.defs",
"data.list.basic"
] | [
"free_magma",
"free_magma.to_free_semigroup",
"free_semigroup",
"free_semigroup.lift",
"magma.assoc_quotient",
"magma.assoc_quotient.lift",
"magma.assoc_quotient.of"
] | Isomorphism between `magma.assoc_quotient (free_magma α)` and `free_semigroup α`. | 611 | 617 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
pre
| of : X → pre
| of_scalar : R → pre
| add : pre → pre → pre
| mul : pre → pre → pre | pre
| of : X → pre
| of_scalar : R → pre
| add : pre → pre → pre
| mul : pre → pre → pre | inductive | free_algebra.pre | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [] | This inductive type is used to express representatives of the free algebra. | 59 | 63 | false | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
: inhabited (pre R X) := ⟨of_scalar 0⟩ | : inhabited (pre R X) | ⟨of_scalar 0⟩ | instance | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [] | null | 67 | 67 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
has_coe_generator : has_coe X (pre R X) := ⟨of⟩ | has_coe_generator : has_coe X (pre R X) | ⟨of⟩ | def | free_algebra.pre.has_coe_generator | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [] | Coercion from `X` to `pre R X`. Note: Used for notation only. | 71 | 71 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
has_coe_semiring : has_coe R (pre R X) := ⟨of_scalar⟩ | has_coe_semiring : has_coe R (pre R X) | ⟨of_scalar⟩ | def | free_algebra.pre.has_coe_semiring | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [] | Coercion from `R` to `pre R X`. Note: Used for notation only. | 73 | 73 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
has_mul : has_mul (pre R X) := ⟨mul⟩ | has_mul : has_mul (pre R X) | ⟨mul⟩ | def | free_algebra.pre.has_mul | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [] | Multiplication in `pre R X` defined as `pre.mul`. Note: Used for notation only. | 75 | 75 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
has_add : has_add (pre R X) := ⟨add⟩ | has_add : has_add (pre R X) | ⟨add⟩ | def | free_algebra.pre.has_add | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [] | Addition in `pre R X` defined as `pre.add`. Note: Used for notation only. | 77 | 77 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
has_zero : has_zero (pre R X) := ⟨of_scalar 0⟩ | has_zero : has_zero (pre R X) | ⟨of_scalar 0⟩ | def | free_algebra.pre.has_zero | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [] | Zero in `pre R X` defined as the image of `0` from `R`. Note: Used for notation only. | 79 | 79 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
has_one : has_one (pre R X) := ⟨of_scalar 1⟩ | has_one : has_one (pre R X) | ⟨of_scalar 1⟩ | def | free_algebra.pre.has_one | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [] | One in `pre R X` defined as the image of `1` from `R`. Note: Used for notation only. | 81 | 81 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
has_smul : has_smul R (pre R X) := ⟨λ r m, mul (of_scalar r) m⟩ | has_smul : has_smul R (pre R X) | ⟨λ r m, mul (of_scalar r) m⟩ | def | free_algebra.pre.has_smul | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [
"has_smul"
] | Scalar multiplication defined as multiplication by the image of elements from `R`.
Note: Used for notation only. | 86 | 86 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
lift_fun {A : Type*} [semiring A] [algebra R A] (f : X → A) : pre R X → A :=
λ t, pre.rec_on t f (algebra_map _ _) (λ _ _, (+)) (λ _ _, (*)) | lift_fun {A : Type*} [semiring A] [algebra R A] (f : X → A) : pre R X → A | λ t, pre.rec_on t f (algebra_map _ _) (λ _ _, (+)) (λ _ _, (*)) | def | free_algebra.lift_fun | algebra | src/algebra/free_algebra.lean | [
"algebra.algebra.subalgebra.basic",
"algebra.monoid_algebra.basic"
] | [
"algebra",
"algebra_map",
"semiring"
] | Given a function from `X` to an `R`-algebra `A`, `lift_fun` provides a lift of `f` to a function
from `pre R X` to `A`. This is mainly used in the construction of `free_algebra.lift`. | 98 | 99 | true | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.