@@ -47,6 +47,9 @@ def of (R : Type u) [semiring R] : SemiRing := bundled.of R
47
47
/-- Typecheck a `ring_hom` as a morphism in `SemiRing`. -/
48
48
def of_hom {R S : Type u} [semiring R] [semiring S] (f : R →+* S) : of R ⟶ of S := f
49
49
50
+ @[simp] lemma of_hom_apply {R S : Type u} [semiring R] [semiring S] (f : R →+* S) (x : R) :
51
+ of_hom f x = f x := rfl
52
+
50
53
instance : inhabited SemiRing := ⟨of punit⟩
51
54
52
55
instance (R : SemiRing) : semiring R := R.str
@@ -81,6 +84,9 @@ def of (R : Type u) [ring R] : Ring := bundled.of R
81
84
/-- Typecheck a `ring_hom` as a morphism in `Ring`. -/
82
85
def of_hom {R S : Type u} [ring R] [ring S] (f : R →+* S) : of R ⟶ of S := f
83
86
87
+ @[simp] lemma of_hom_apply {R S : Type u} [ring R] [ring S] (f : R →+* S) (x : R) :
88
+ of_hom f x = f x := rfl
89
+
84
90
instance : inhabited Ring := ⟨of punit⟩
85
91
86
92
instance (R : Ring) : ring R := R.str
@@ -113,6 +119,10 @@ def of (R : Type u) [comm_semiring R] : CommSemiRing := bundled.of R
113
119
/-- Typecheck a `ring_hom` as a morphism in `CommSemiRing`. -/
114
120
def of_hom {R S : Type u} [comm_semiring R] [comm_semiring S] (f : R →+* S) : of R ⟶ of S := f
115
121
122
+ @[simp]
123
+ lemma of_hom_apply {R S : Type u} [comm_semiring R] [comm_semiring S] (f : R →+* S) (x : R) :
124
+ of_hom f x = f x := rfl
125
+
116
126
instance : inhabited CommSemiRing := ⟨of punit⟩
117
127
118
128
instance (R : CommSemiRing) : comm_semiring R := R.str
@@ -146,6 +156,9 @@ def of (R : Type u) [comm_ring R] : CommRing := bundled.of R
146
156
/-- Typecheck a `ring_hom` as a morphism in `CommRing`. -/
147
157
def of_hom {R S : Type u} [comm_ring R] [comm_ring S] (f : R →+* S) : of R ⟶ of S := f
148
158
159
+ @[simp] lemma of_hom_apply {R S : Type u} [comm_ring R] [comm_ring S] (f : R →+* S) (x : R) :
160
+ of_hom f x = f x := rfl
161
+
149
162
instance : inhabited CommRing := ⟨of punit⟩
150
163
151
164
instance (R : CommRing) : comm_ring R := R.str
0 commit comments