Skip to content

Commit ded7464

Browse files
committed
Explain more magic in hierarchies chapter.
1 parent edaa663 commit ded7464

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MIL/C07_Hierarchies/S01_Basics.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ play this game, first because in practice this does not make any ring instance e
462462
also because Mathlib's algebraic hierarchy goes through semirings which are like rings but without
463463
opposites so that the proof below does not work for them. What we gain here, besides a nice exercise
464464
if you have never seen it, is an example of building an instance using the syntax that allows
465-
to provide a parent structure and some extra fields.
465+
to provide a parent structure as an instance parameter and then supply the extra fields.
466+
Here the `Ring₃ R` argument supplies anything `AddCommGroup₃ R` wants except for `add_comm`.
466467
BOTH: -/
467468

468469
-- QUOTE:
@@ -473,8 +474,7 @@ class Ring₃ (R : Type) extends AddGroup₃ R, Monoid₃ R, MulZeroClass R wher
473474
right_distrib : ∀ a b c : R, (a + b) * c = a * c + b * c
474475

475476
instance {R : Type} [Ring₃ R] : AddCommGroup₃ R :=
476-
{ Ring₃.toAddGroup₃ with
477-
add_comm := by
477+
{ add_comm := by
478478
/- EXAMPLES:
479479
sorry }
480480
SOLUTIONS: -/

0 commit comments

Comments
 (0)