@@ -6,17 +6,19 @@ Authors: Kenny Lau, Yury Kudryashov
6
6
import data.matrix.basic
7
7
import linear_algebra.tensor_product
8
8
import algebra.commute
9
+ import data.equiv.ring
9
10
10
11
/-!
11
12
# Algebra over Commutative Semiring (under category)
12
13
13
14
In this file we define algebra over commutative (semi)rings, algebra homomorphisms `alg_hom`,
14
- and `subalgebra`s. We also define usual operations on `alg_hom`s (`id`, `comp`) and subalgebras
15
- (`map`, `comap`).
15
+ algebra equivalences `alg_equiv`, and `subalgebra`s. We also define usual operations on `alg_hom`s
16
+ (`id`, `comp`) and subalgebras (` map`, `comap`).
16
17
17
18
## Notations
18
19
19
20
* `A →ₐ[R] B` : `R`-algebra homomorphism from `A` to `B`.
21
+ * `A ≃ₐ[R] B` : `R`-algebra equivalence from `A` to `B`.
20
22
-/
21
23
noncomputable theory
22
24
@@ -335,6 +337,92 @@ ext $ λ x, show φ₁.to_linear_map x = φ₂.to_linear_map x, by rw H
335
337
336
338
end alg_hom
337
339
340
+ set_option old_structure_cmd true
341
+ /-- An equivalence of algebras is an equivalence of rings commuting with the actions of scalars. -/
342
+ structure alg_equiv (R : Type u) (A : Type v) (B : Type w)
343
+ [comm_semiring R] [semiring A] [semiring B] [algebra R A] [algebra R B]
344
+ extends A ≃ B, A ≃* B, A ≃+ B, A ≃+* B :=
345
+ (commutes' : ∀ r : R, to_fun (algebra_map R A r) = algebra_map R B r)
346
+
347
+ attribute [nolint doc_blame] alg_equiv.to_ring_equiv
348
+ attribute [nolint doc_blame] alg_equiv.to_equiv
349
+ attribute [nolint doc_blame] alg_equiv.to_add_equiv
350
+ attribute [nolint doc_blame] alg_equiv.to_mul_equiv
351
+
352
+ notation A ` ≃ₐ[`:50 R `] ` A' := alg_equiv R A A'
353
+
354
+ namespace alg_equiv
355
+
356
+ variables {R : Type u} {A₁ : Type v} {A₂ : Type w} {A₃ : Type u₁}
357
+ variables [comm_semiring R] [semiring A₁] [semiring A₂] [semiring A₃]
358
+ variables [algebra R A₁] [algebra R A₂] [algebra R A₃]
359
+
360
+ instance : has_coe_to_fun (A₁ ≃ₐ[R] A₂) := ⟨_, alg_equiv.to_fun⟩
361
+
362
+ instance has_coe_to_ring_equiv : has_coe (A₁ ≃ₐ[R] A₂) (A₁ ≃+* A₂) := ⟨alg_equiv.to_ring_equiv⟩
363
+
364
+ @[simp, norm_cast] lemma coe_ring_equiv (e : A₁ ≃ₐ[R] A₂) : ((e : A₁ ≃+* A₂) : A₁ → A₂) = e := rfl
365
+
366
+ @[simp] lemma map_add (e : A₁ ≃ₐ[R] A₂) : ∀ x y, e (x + y) = e x + e y := e.to_add_equiv.map_add
367
+
368
+ @[simp] lemma map_zero (e : A₁ ≃ₐ[R] A₂) : e 0 = 0 := e.to_add_equiv.map_zero
369
+
370
+ @[simp] lemma map_mul (e : A₁ ≃ₐ[R] A₂) : ∀ x y, e (x * y) = (e x) * (e y) := e.to_mul_equiv.map_mul
371
+
372
+ @[simp] lemma map_one (e : A₁ ≃ₐ[R] A₂) : e 1 = 1 := e.to_mul_equiv.map_one
373
+
374
+ @[simp] lemma commutes (e : A₁ ≃ₐ[R] A₂) : ∀ (r : R), e (algebra_map R A₁ r) = algebra_map R A₂ r :=
375
+ e.commutes'
376
+
377
+ @[simp] lemma map_neg {A₁ : Type v} {A₂ : Type w}
378
+ [ring A₁] [ring A₂] [algebra R A₁] [algebra R A₂] (e : A₁ ≃ₐ[R] A₂) :
379
+ ∀ x, e (-x) = -(e x) := e.to_add_equiv.map_neg
380
+
381
+ @[simp] lemma map_sub {A₁ : Type v} {A₂ : Type w}
382
+ [ring A₁] [ring A₂] [algebra R A₁] [algebra R A₂] (e : A₁ ≃ₐ[R] A₂) :
383
+ ∀ x y, e (x - y) = e x - e y := e.to_add_equiv.map_sub
384
+
385
+ instance has_coe_to_alg_hom : has_coe (A₁ ≃ₐ[R] A₂) (A₁ →ₐ[R] A₂) :=
386
+ ⟨λ e, { map_one' := e.map_one, map_zero' := e.map_zero, ..e }⟩
387
+
388
+ @[simp, norm_cast] lemma coe_to_alg_equiv (e : A₁ ≃ₐ[R] A₂) : ((e : A₁ →ₐ[R] A₂) : A₁ → A₂) = e :=
389
+ rfl
390
+
391
+ lemma injective (e : A₁ ≃ₐ[R] A₂) : function.injective e := e.to_equiv.injective
392
+
393
+ lemma surjective (e : A₁ ≃ₐ[R] A₂) : function.surjective e := e.to_equiv.surjective
394
+
395
+ lemma bijective (e : A₁ ≃ₐ[R] A₂) : function.bijective e := e.to_equiv.bijective
396
+
397
+ instance : has_one (A₁ ≃ₐ[R] A₁) := ⟨{commutes' := λ r, rfl, ..(1 : A₁ ≃+* A₁)}⟩
398
+
399
+ instance : inhabited (A₁ ≃ₐ[R] A₁) := ⟨1 ⟩
400
+
401
+ /-- Algebra equivalences are reflexive. -/
402
+ @[refl]
403
+ def refl : A₁ ≃ₐ[R] A₁ := 1
404
+
405
+ /-- Algebra equivalences are symmetric. -/
406
+ @[symm]
407
+ def symm (e : A₁ ≃ₐ[R] A₂) : A₂ ≃ₐ[R] A₁ :=
408
+ { commutes' := λ r, by { rw ←e.to_ring_equiv.symm_apply_apply (algebra_map R A₁ r), congr,
409
+ change _ = e _, rw e.commutes, },
410
+ ..e.to_ring_equiv.symm, }
411
+
412
+ /-- Algebra equivalences are transitive. -/
413
+ @[trans]
414
+ def trans (e₁ : A₁ ≃ₐ[R] A₂) (e₂ : A₂ ≃ₐ[R] A₃) : A₁ ≃ₐ[R] A₃ :=
415
+ { commutes' := λ r, show e₂.to_fun (e₁.to_fun _) = _, by rw [e₁.commutes', e₂.commutes'],
416
+ ..(e₁.to_ring_equiv.trans e₂.to_ring_equiv), }
417
+
418
+ @[simp] lemma apply_symm_apply (e : A₁ ≃ₐ[R] A₂) : ∀ x, e (e.symm x) = x :=
419
+ e.to_equiv.apply_symm_apply
420
+
421
+ @[simp] lemma symm_apply_apply (e : A₁ ≃ₐ[R] A₂) : ∀ x, e.symm (e x) = x :=
422
+ e.to_equiv.symm_apply_apply
423
+
424
+ end alg_equiv
425
+
338
426
namespace algebra
339
427
340
428
variables (R : Type u) (S : Type v) (A : Type w)
0 commit comments