/-
Copyright (c) 2020 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
module
public import Mathlib.Algebra.RingQuot
public import Mathlib.Algebra.Star.Basic
set_option doc.verso true
set_option doc.verso.suggestions false
/-!
# The \*-ring structure on suitable quotients of a \*-ring.
-/
public section
namespace RingQuot
universe u
variable {R : Type u} [Semiring R] (r : R → R → Prop)
section StarRing
variable [StarRing R]
set_option linter.style.whitespace false in -- manual alignment is not recognised
theorem Rel.star (hr : ∀ a b, r a b → r (star a) (star b))
⦃a b : R⦄ (h : Rel r a b) : Rel r (star a) (star b) := by
induction h with
| of h => exact Rel.of (hr _ _ h)
| add_left _ h => rw [star_add, star_add]
exact Rel.add_left h
| mul_left _ h => rw [star_mul, star_mul]
exact Rel.mul_right h
| mul_right _ h => rw [star_mul, star_mul]
exact Rel.mul_left h
private def star' (hr : ∀ a b, r a b → r (star a) (star b)) : RingQuot r → RingQuot r
| ⟨a⟩ => ⟨Quot.map (star : R → R) (Rel.star r hr) a⟩
private theorem star'_quot (hr : ∀ a b, r a b → r (star a) (star b)) {a} :
(star' r hr ⟨Quot.mk _ a⟩ : RingQuot r) = ⟨Quot.mk _ (star a)⟩ := rfl
/-- Transfer a `StarRing` instance through a quotient, if the quotient is invariant to `star` -/
@[instance_reducible]
def starRing {R : Type u} [Semiring R] [StarRing R] (r : R → R → Prop)
(hr : ∀ a b, r a b → r (star a) (star b)) : StarRing (RingQuot r) where
star := star' r hr
star_involutive := by
rintro ⟨⟨⟩⟩
simp [star'_quot]
star_mul := by
rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩
simp [star'_quot, mul_quot, star_mul]
star_add := by
rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩
simp [star'_quot, add_quot, star_add]
end StarRing
end RingQuot
¤ Dauer der Verarbeitung: 0.4 Sekunden
¤
*© Formatika GbR, Deutschland