@@ -37,7 +37,7 @@ See the implementation notes for remarks about non-associative and non-unital al
37
37
* `algebra_nat`
38
38
* `algebra_int`
39
39
* `algebra_rat`
40
- * `opposite .algebra`
40
+ * `mul_opposite .algebra`
41
41
* `module.End.algebra`
42
42
43
43
## Notations
@@ -67,6 +67,7 @@ As a result, there are two ways to talk about an `R`-algebra `A` when `A` is a s
67
67
variables [comm_semiring R] [semiring A]
68
68
variables [module R A] [smul_comm_class R A A] [is_scalar_tower R A A]
69
69
```
70
+
70
71
The first approach implies the second via typeclass search; so any lemma stated with the second set
71
72
of arguments will automatically apply to the first set. Typeclass search does not know that the
72
73
second approach implies the first, but this can be shown with:
@@ -87,6 +88,7 @@ all be relaxed independently; for instance, this allows us to:
87
88
* Replace `comm_semiring R` and `module R A` with `comm_group R'` and `distrib_mul_action R' A`,
88
89
which when `R' = units R` lets us talk about the "algebra-like" action of `units R` on an
89
90
`R`-algebra `A`.
91
+
90
92
While `alg_hom R A B` cannot be used in the second approach, `non_unital_alg_hom R A B` still can.
91
93
92
94
You should always use the first approach when working with associative unital algebras, and mimic
@@ -311,7 +313,7 @@ end id
311
313
section prod
312
314
variables (R A B)
313
315
314
- instance : algebra R (A × B) :=
316
+ instance _root_.prod.algebra : algebra R (A × B) :=
315
317
{ commutes' := by { rintro r ⟨a, b⟩, dsimp, rw [commutes r a, commutes r b] },
316
318
smul_def' := by { rintro r ⟨a, b⟩, dsimp, rw [smul_def r a, smul_def r b] },
317
319
.. prod.module,
@@ -1258,7 +1260,7 @@ def to_rat_alg_hom [ring R] [ring S] [algebra ℚ R] [algebra ℚ S] (f : R →+
1258
1260
1259
1261
end ring_hom
1260
1262
1261
- namespace rat
1263
+ section rat
1262
1264
1263
1265
instance algebra_rat {α} [division_ring α] [char_zero α] : algebra ℚ α :=
1264
1266
(rat.cast_hom α).to_algebra' $ λ r x, r.cast_commute x
0 commit comments