@@ -3,15 +3,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
3
3
Authors: Scott Morrison, Johannes Hölzl
4
4
5
5
Introduce CommRing -- the category of commutative rings.
6
-
7
- Currently only the basic setup.
8
6
-/
9
7
10
8
import category_theory.instances.monoids
11
9
import category_theory.fully_faithful
12
- import category_theory.adjunction
13
- import data.mv_polynomial
14
10
import algebra.ring
11
+ import data.int.basic
15
12
16
13
universes u v
17
14
@@ -28,7 +25,7 @@ instance concrete_is_ring_hom : concrete_category @is_ring_hom :=
28
25
⟨by introsI α ia; apply_instance,
29
26
by introsI α β γ ia ib ic f g hf hg; apply_instance⟩
30
27
31
- instance Ring_hom_is_ring_hom {R S : Ring} (f : R ⟶ S) : is_ring_hom (f : R → S) := f.2
28
+ instance Ring.hom_is_ring_hom {R S : Ring} (f : R ⟶ S) : is_ring_hom (f : R → S) := f.2
32
29
33
30
/-- The category of commutative rings. -/
34
31
@[reducible] def CommRing : Type (u+1 ) := bundled comm_ring
@@ -91,50 +88,6 @@ instance forget_to_CommMon.faithful : faithful (forget_to_CommMon) := {}
91
88
92
89
example : faithful (forget_to_CommMon ⋙ CommMon.forget_to_Mon) := by apply_instance
93
90
94
- section
95
- open mv_polynomial
96
- local attribute [instance, priority 0 ] subtype.fintype set_fintype classical.prop_decidable
97
-
98
- noncomputable def polynomial : Type u ⥤ CommRing.{u} :=
99
- { obj := λ α, ⟨mv_polynomial α ℤ, by apply_instance⟩,
100
- map := λ α β f, ⟨eval₂ C (X ∘ f), by apply_instance⟩,
101
- map_id' := λ α, subtype.ext.mpr $ funext $ eval₂_eta,
102
- map_comp' := λ α β γ f g, subtype.ext.mpr $ funext $ λ p,
103
- by apply mv_polynomial.induction_on p; intros;
104
- simp only [*, eval₂_add, eval₂_mul, eval₂_C, eval₂_X, comp_val,
105
- eq_self_iff_true, function.comp_app, types_comp] at * }
106
-
107
- @[simp] lemma polynomial_obj_α {α : Type u} :
108
- (polynomial.obj α).α = mv_polynomial α ℤ := rfl
109
-
110
- @[simp] lemma polynomial_map_val {α β : Type u} {f : α → β} :
111
- (CommRing.polynomial.map f).val = eval₂ C (X ∘ f) := rfl
112
-
113
- noncomputable def adj : adjunction polynomial (forget : CommRing ⥤ Type u) :=
114
- adjunction.mk_of_hom_equiv _ _
115
- { hom_equiv := λ α R,
116
- { to_fun := λ f, f ∘ X,
117
- inv_fun := λ f, ⟨eval₂ int.cast f, by apply_instance⟩,
118
- left_inv := λ f, subtype.ext.mpr $ funext $ λ p,
119
- begin
120
- have H0 := λ n, (congr (int.eq_cast' (f.val ∘ C)) (rfl : n = n)).symm,
121
- have H1 := λ p₁ p₂, (@is_ring_hom.map_add _ _ _ _ f.val f.2 p₁ p₂).symm,
122
- have H2 := λ p₁ p₂, (@is_ring_hom.map_mul _ _ _ _ f.val f.2 p₁ p₂).symm,
123
- apply mv_polynomial.induction_on p; intros;
124
- simp only [*, eval₂_add, eval₂_mul, eval₂_C, eval₂_X,
125
- eq_self_iff_true, function.comp_app, hom_coe_app] at *
126
- end ,
127
- right_inv := by tidy },
128
- hom_equiv_naturality_left_symm' := λ X' X Y f g, subtype.ext.mpr $ funext $ λ p,
129
- begin
130
- apply mv_polynomial.induction_on p; intros;
131
- simp only [*, eval₂_mul, eval₂_add, eval₂_C, eval₂_X,
132
- comp_val, equiv.coe_fn_symm_mk, hom_coe_app, polynomial_map_val,
133
- eq_self_iff_true, function.comp_app, add_right_inj, types_comp] at *
134
- end }
135
-
136
- end
137
-
138
91
end CommRing
139
92
140
93
end category_theory.instances
0 commit comments