群
module group where open import apartness-relation open import monoid open import sigma-type
record GroupStr (S : ApartedSet) : Set where infix 70 _⁻¹ open ApartedSet S field monoid-str : MonoidStr S _⁻¹ : X → X open MonoidStr monoid-str public field linv : ∀ x → x ⁻¹ · x ≈ empty rinv : ∀ x → x · x ⁻¹ ≈ empty -- TODO: resp ⁻¹-pres-∼ : ∀ {x y} → x ∼ y => x ⁻¹ ∼ y ⁻¹
Group : Set₁ Group = Σ ApartedSet GroupStr
module GroupProperties (G : Group) where open ApartedSet (G .fst) open GroupStr (G .snd) move-to-right : ∀ {x y z} → x · y ∼ z => x ∼ z · y ⁻¹ move-to-right {x = x} {y} {z} .fst xy≈z = trans-≈ (trans-≈ (sym-≈ runit) (·-pres-∼ᵣ x .fst (sym-≈ (rinv _)))) k where k : x · (y · y ⁻¹) ≈ z · y ⁻¹ k = trans-≈ (sym-≈ assoc) (·-pres-∼ₗ (y ⁻¹) .fst xy≈z) move-to-right {x = x} {y} {z} .snd x#zy⁻¹ = ·-pres-∼ₗ (y ⁻¹) .snd (#-resp-≈ₗ x#zy⁻¹ (trans-≈ (sym-≈ runit) (trans-≈ (·-pres-∼ᵣ x .fst (sym-≈ (rinv _))) (sym-≈ assoc))))