Skip to content

Commit

Permalink
feat(algebra/subalgebra): two equal subalgebras are equivalent (#7590)
Browse files Browse the repository at this point in the history
This extends `linear_equiv.of_eq` to an `alg_equiv` between two `subalgebra`s.

[Zulip discussion starts around here](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/towers.20of.20algebras/near/238452076)



Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
  • Loading branch information
Vierkantor and Vierkantor committed May 16, 2021
1 parent 4d909f4 commit 632783d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/algebra/algebra/subalgebra.lean
Expand Up @@ -598,6 +598,29 @@ instance : unique (subalgebra R R) :=
end
.. algebra.subalgebra.inhabited }

/-- Two subalgebras that are equal are also equivalent as algebras.
This is the `subalgebra` version of `linear_equiv.of_eq` and `equiv.set.of_eq`. -/
@[simps apply]
def equiv_of_eq (S T : subalgebra R A) (h : S = T) : S ≃ₐ[R] T :=
{ to_fun := λ x, ⟨x, h ▸ x.2⟩,
inv_fun := λ x, ⟨x, h.symm ▸ x.2⟩,
map_mul' := λ _ _, rfl,
commutes' := λ _, rfl,
.. linear_equiv.of_eq _ _ (congr_arg to_submodule h) }

@[simp] lemma equiv_of_eq_symm (S T : subalgebra R A) (h : S = T) :
(equiv_of_eq S T h).symm = equiv_of_eq T S h.symm :=
rfl

@[simp] lemma equiv_of_eq_rfl (S : subalgebra R A) :
equiv_of_eq S S rfl = alg_equiv.refl :=
by { ext, refl }

@[simp] lemma equiv_of_eq_trans (S T U : subalgebra R A) (hST : S = T) (hTU : T = U) :
(equiv_of_eq S T hST).trans (equiv_of_eq T U hTU) = equiv_of_eq S U (trans hST hTU) :=
rfl

end subalgebra

section nat
Expand Down

0 comments on commit 632783d

Please sign in to comment.