@@ -290,6 +290,8 @@ protected def range (φ : A →ₐ[R] B) : subalgebra R B :=
290
290
@[simp] lemma mem_range (φ : A →ₐ[R] B) {y : B} :
291
291
y ∈ φ.range ↔ ∃ x, φ x = y := ring_hom.mem_srange
292
292
293
+ theorem mem_range_self (φ : A →ₐ[R] B) (x : A) : φ x ∈ φ.range := φ.mem_range.2 ⟨x, rfl⟩
294
+
293
295
@[simp] lemma coe_range (φ : A →ₐ[R] B) : (φ.range : set B) = set.range φ :=
294
296
by { ext, rw [subalgebra.mem_coe, mem_range], refl }
295
297
@@ -298,24 +300,22 @@ def cod_restrict (f : A →ₐ[R] B) (S : subalgebra R B) (hf : ∀ x, f x ∈ S
298
300
{ commutes' := λ r, subtype.eq $ f.commutes r,
299
301
.. ring_hom.cod_srestrict (f : A →+* B) S hf }
300
302
303
+ @[simp] lemma val_comp_cod_restrict (f : A →ₐ[R] B) (S : subalgebra R B) (hf : ∀ x, f x ∈ S) :
304
+ S.val.comp (f.cod_restrict S hf) = f :=
305
+ alg_hom.ext $ λ _, rfl
306
+
307
+ @[simp] lemma coe_cod_restrict (f : A →ₐ[R] B) (S : subalgebra R B) (hf : ∀ x, f x ∈ S) (x : A) :
308
+ ↑(f.cod_restrict S hf x) = f x := rfl
309
+
301
310
theorem injective_cod_restrict (f : A →ₐ[R] B) (S : subalgebra R B) (hf : ∀ x, f x ∈ S) :
302
311
function.injective (f.cod_restrict S hf) ↔ function.injective f :=
303
312
⟨λ H x y hxy, H $ subtype.eq hxy, λ H x y hxy, H (congr_arg subtype.val hxy : _)⟩
304
313
305
- /-- Restrict an injective algebra homomorphism to an algebra isomorphism -/
306
- noncomputable def alg_equiv.of_injective (f : A →ₐ[R] B) (hf : function.injective f) :
307
- A ≃ₐ[R] f.range :=
308
- alg_equiv.of_bijective (f.cod_restrict f.range (λ x, f.mem_range.mpr ⟨x, rfl⟩))
309
- ⟨(f.injective_cod_restrict f.range (λ x, f.mem_range.mpr ⟨x, rfl⟩)).mpr hf,
310
- λ x, Exists.cases_on (f.mem_range.mp (subtype.mem x)) (λ y hy, ⟨y, subtype.ext hy⟩)⟩
311
-
312
- @[simp] lemma alg_equiv.of_injective_apply (f : A →ₐ[R] B) (hf : function.injective f) (x : A) :
313
- ↑(alg_equiv.of_injective f hf x) = f x := rfl
314
+ /-- Restrict the codomain of a alg_hom `f` to `f.range`.
314
315
315
- /-- Restrict an algebra homomorphism between fields to an algebra isomorphism -/
316
- noncomputable def alg_equiv.of_injective_field {E F : Type *} [division_ring E] [semiring F]
317
- [nontrivial F] [algebra R E] [algebra R F] (f : E →ₐ[R] F) : E ≃ₐ[R] f.range :=
318
- alg_equiv.of_injective f f.to_ring_hom.injective
316
+ This is the bundled version of `set.range_factorization`. -/
317
+ @[reducible] def range_restrict (f : A →ₐ[R] B) : A →ₐ[R] f.range :=
318
+ f.cod_restrict f.range f.mem_range_self
319
319
320
320
/-- The equalizer of two R-algebra homomorphisms -/
321
321
def equalizer (ϕ ψ : A →ₐ[R] B) : subalgebra R A :=
@@ -341,6 +341,48 @@ def equalizer (ϕ ψ : A →ₐ[R] B) : subalgebra R A :=
341
341
342
342
end alg_hom
343
343
344
+ namespace alg_equiv
345
+
346
+ variables {R : Type u} {A : Type v} {B : Type w}
347
+ variables [comm_semiring R] [semiring A] [semiring B] [algebra R A] [algebra R B]
348
+
349
+ /-- Restrict an algebra homomorphism with a left inverse to an algebra isomorphism to its range.
350
+
351
+ This is a computable alternative to `alg_equiv.of_injective`. -/
352
+ def of_left_inverse
353
+ {g : B → A} {f : A →ₐ[R] B} (h : function.left_inverse g f) :
354
+ A ≃ₐ[R] f.range :=
355
+ { to_fun := f.range_restrict,
356
+ inv_fun := g ∘ f.range.val,
357
+ left_inv := h,
358
+ right_inv := λ x, subtype.ext $
359
+ let ⟨x', hx'⟩ := f.mem_range.mp x.prop in
360
+ show f (g x) = x, by rw [←hx', h x'],
361
+ ..f.range_restrict }
362
+
363
+ @[simp] lemma of_left_inverse_apply
364
+ {g : B → A} {f : A →ₐ[R] B} (h : function.left_inverse g f) (x : A) :
365
+ ↑(of_left_inverse h x) = f x := rfl
366
+
367
+ @[simp] lemma of_left_inverse_symm_apply
368
+ {g : B → A} {f : A →ₐ[R] B} (h : function.left_inverse g f) (x : f.range) :
369
+ (of_left_inverse h).symm x = g x := rfl
370
+
371
+ /-- Restrict an injective algebra homomorphism to an algebra isomorphism -/
372
+ noncomputable def of_injective (f : A →ₐ[R] B) (hf : function.injective f) :
373
+ A ≃ₐ[R] f.range :=
374
+ of_left_inverse (classical.some_spec hf.has_left_inverse)
375
+
376
+ @[simp] lemma of_injective_apply (f : A →ₐ[R] B) (hf : function.injective f) (x : A) :
377
+ ↑(of_injective f hf x) = f x := rfl
378
+
379
+ /-- Restrict an algebra homomorphism between fields to an algebra isomorphism -/
380
+ noncomputable def of_injective_field {E F : Type *} [division_ring E] [semiring F]
381
+ [nontrivial F] [algebra R E] [algebra R F] (f : E →ₐ[R] F) : E ≃ₐ[R] f.range :=
382
+ of_injective f f.to_ring_hom.injective
383
+
384
+ end alg_equiv
385
+
344
386
namespace algebra
345
387
346
388
variables (R : Type u) {A : Type v} {B : Type w}
0 commit comments