@@ -25,8 +25,8 @@ open import Relation.Nullary using (yes; no)
25
25
26
26
open import Algebra.Structures {A = Parity} _≡_
27
27
open import Algebra.Definitions {A = Parity} _≡_
28
-
29
- open import Algebra.Consequences.Propositional using (comm+distrˡ⇒distrʳ)
28
+ open import Algebra.Consequences.Propositional
29
+ using (selfInverse⇒involutive; selfInverse⇒injective; comm+distrˡ⇒distrʳ)
30
30
open import Algebra.Morphism.Structures
31
31
32
32
------------------------------------------------------------------------
@@ -52,22 +52,24 @@ _≟_ : DecidableEquality Parity
52
52
------------------------------------------------------------------------
53
53
-- _⁻¹
54
54
55
- p≢p⁻¹ : ∀ p → p ≢ p ⁻¹
56
- p≢p⁻¹ 1ℙ ()
57
- p≢p⁻¹ 0ℙ ()
55
+ -- Algebraic properties of _⁻¹
56
+
57
+ ⁻¹-selfInverse : SelfInverse _⁻¹
58
+ ⁻¹-selfInverse { 1ℙ } { 0ℙ } refl = refl
59
+ ⁻¹-selfInverse { 0ℙ } { 1ℙ } refl = refl
58
60
59
- ⁻¹-inverts : ∀ {p q} → p ⁻¹ ≡ q → q ⁻¹ ≡ p
60
- ⁻¹-inverts { 1ℙ } { 0ℙ } refl = refl
61
- ⁻¹-inverts { 0ℙ } { 1ℙ } refl = refl
61
+ ⁻¹-involutive : Involutive _⁻¹
62
+ ⁻¹-involutive = selfInverse⇒involutive ⁻¹-selfInverse
62
63
63
- ⁻¹-involutive : ∀ p → (p ⁻¹) ⁻¹ ≡ p
64
- ⁻¹-involutive p = ⁻¹-inverts refl
64
+ ⁻¹-injective : Injective _≡_ _≡_ _⁻¹
65
+ ⁻¹-injective = selfInverse⇒injective ⁻¹-selfInverse
65
66
66
- ⁻¹-injective : ∀ {p q} → p ⁻¹ ≡ q ⁻¹ → p ≡ q
67
- ⁻¹-injective {p} {q} eq = begin
68
- p ≡⟨ sym (⁻¹-inverts eq) ⟩
69
- (q ⁻¹) ⁻¹ ≡⟨ ⁻¹-involutive q ⟩
70
- q ∎ where open ≡-Reasoning
67
+ ------------------------------------------------------------------------
68
+ -- other properties of _⁻¹
69
+
70
+ p≢p⁻¹ : ∀ p → p ≢ p ⁻¹
71
+ p≢p⁻¹ 1ℙ ()
72
+ p≢p⁻¹ 0ℙ ()
71
73
72
74
------------------------------------------------------------------------
73
75
-- ⁻¹ and _+_
@@ -480,7 +482,7 @@ toSign-isGroupIsomorphism = record
480
482
481
483
suc-homo-⁻¹ : ∀ n → (parity (suc n)) ⁻¹ ≡ parity n
482
484
suc-homo-⁻¹ zero = refl
483
- suc-homo-⁻¹ (suc n) = ⁻¹-inverts (suc-homo-⁻¹ n)
485
+ suc-homo-⁻¹ (suc n) = ⁻¹-selfInverse (suc-homo-⁻¹ n)
484
486
485
487
-- parity is a _+_ homomorphism
486
488
0 commit comments