-
Notifications
You must be signed in to change notification settings - Fork 253
Modular arithmetic in terms of ideals #2729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new Kernel file looks nice.
Would you want some help to get this further along? |
Yes, actually. I've been working on a module for the special case of ideals of the ring of integers, and I've been struggling to prove that (for a non-zero modulus) it's finite, which I think it important for the "yes this is modular arithmetic as you know it" feel. I'll post a WIP commit shortly |
Ok, once my students make further progress on the ones they are currently working on, I'll get them to look at this. |
Some errors thrown up by checking with
|
@jamesmckinna I've merged in master, are those two errors fixed now? |
ι : RawGroup.Carrier N → Carrier | ||
ι-monomorphism : IsGroupMonomorphism N rawGroup ι | ||
-- every element of N commutes in G | ||
normal : ∀ n g → ∃[ n′ ] g ∙ ι n ∙ g ⁻¹ ≈ ι n′ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... I was a bit surprised that this was an 'easier' formulation than
normal : ∀ n g → ∃[ n′ ] g ∙ ι n ∙ g ⁻¹ ≈ ι n′ | |
normal : ∀ n g → ∃[ n′ ] g ∙ ι n ≈ ι n′ ∙ g |
which I wondered as to whether
- it would be easier/smoother to show gives rise to an equivalence relation on the quotient?
- it would generalise (better) to
Loop
,Quasigroup
or evenMagma
/Semigroup
? - for commutative operation, every subgroup is automatically
normal
...
Cf. comments elsewhere from @JacquesCarette about defining 'ideal' via 'sink'...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote the definition I did because I went to the Wikipedia page for "normal subgroup" and translated the definition in the opening paragraph into Agda.
Your definition does seem to be equivalent, and somehow nicer. I'm a little worried that it's somehow "detached" from traditional definitions, but I don't think it's far removed enough for that to be a blocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elsewhere I think that @JacquesCarette has commented on not (necessarily) letting 'traditional' definitions be our guide, with his citation of 'Post-Modern Algebra' as a rational reconstruction which perhaps avoids the... drawbacks... of 'tradition'.
x * r * a ≈⟨ *-assoc x r a ⟩ | ||
x * (r * a) ≈⟨ *-congˡ (*-comm r a) ⟩ | ||
x * (a * r) ≈⟨ *-assoc x a r ⟨ | ||
x * a * r ∎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of argument occurs in Algebra.Properties.CommutativeSemigroup
, and might usefully be re-used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed - the lines you highlighted are exactly xy∙z≈x∙zy
from that module, specialized for multiplication. See my comment here: #2765 (comment) but this doesn't need to wait for that to be dealt with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(And yes: improving Algebra.Properties.Ring
and its ancestors should also get done! cf. #2804 )
x * a * r ∎ | ||
} | ||
} | ||
; injective = λ p → p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
; injective = λ p → p | |
; injective = id |
???
infix 0 _by_ | ||
|
||
data _≋_ (x y : Carrier) : Set (c ⊔ ℓ ⊔ c′) where | ||
_by_ : ∀ g → x // y ≈ ι g → x ≋ y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly to the type of NormalSubgroup.normal
, is it 'easier' to write
_by_ : ∀ g → x // y ≈ ι g → x ≋ y | |
_by_ : ∀ g → x ≈ ι g ∙ y → x ≋ y |
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yielding:
≋-refl : Reflexive _≋_
≋-refl {x} = N.ε by begin
x ≈⟨ identityˡ _ ⟨
ε ∙ x ≈⟨ ∙-congʳ (ι.ε-homo) ⟨
ι N.ε ∙ x ∎
≋-sym : Symmetric _≋_
≋-sym {x} {y} (g by x≈ιg∙y) = g N.⁻¹ by begin
y ≈⟨ y≈x\\z _ _ _ (sym x≈ιg∙y) ⟩
ι g ⁻¹ ∙ x ≈⟨ ∙-congʳ (ι.⁻¹-homo g) ⟨
ι (g N.⁻¹) ∙ x ∎
≋-trans : Transitive _≋_
≋-trans {x} {y} {z} (g by x≈ιg∙y) (h by y≈ιh∙z) = g N.∙ h by begin
x ≈⟨ x≈ιg∙y ⟩
ι g ∙ y ≈⟨ ∙-congˡ y≈ιh∙z ⟩
ι g ∙ (ι h ∙ z) ≈⟨ assoc _ _ _ ⟨
ι g ∙ ι h ∙ z ≈⟨ ∙-congʳ (ι.∙-homo g h) ⟨
ι (g N.∙ h) ∙ z ∎
and thus being admissible in any Quasigroup
Monoid
(an associative Loop
is a group)? (Well, refl
and trans
at least...)
Indeed, these are properties (modulo ι
) of the abstract Divisibility
relations on Magma
and their properties... as structure is successively enriched to Semigroup
(for trans
) and Monoid
(for refl
)! So we should add Group
divisibility to inherit those, with sym
becoming provable...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a shame that the iota means I can't reuse the divisibility machinery...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and I'm not sure we're quite ready to embrace the least common generalisation of the two... but one day perhaps!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code duplication with divisibility shouldn't be a blocker - I think your suggestion is a good one and I'll modify the code accordingly.
module _ .{{_ : NonZero m}} where | ||
|
||
from-% : ∀ {x y} → x % m ≡ y % m → x ≋ y | ||
from-% {x} {y} x%m≡y%m = x / m - y / m by begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much of this argument recapitulates concretely reasoning steps already used abstractly in CRT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or better (?): on my revised account of equality in the quotient:
module ℤ/mℤ = Ring quotientRing
-- todo:
-- * chinese remainder theorem specialized to integers
-- * finiteness: for non-zero
module _ .{{_ : NonZero m}} where
module _ z where
private
z%m = + (z % m)
z/m = z / m
z≋z%m : z ≋ z%m
z≋z%m = z/m by begin
z ≡⟨ a≡a%n+[a/n]*n z m ⟩
z%m + z/m * m ≡⟨ +-comm z%m (z/m * m) ⟩
z/m * m + z%m ∎
where open ≡-Reasoning
from-% : ∀ {x y} → x % m ≡ y % m → x ≋ y
from-% {x} {y} x%m≡y%m = begin
x ≈⟨ z≋z%m x ⟩
+ (x % m) ≈⟨ ℤ/mℤ.reflexive (≡.cong +_ x%m≡y%m) ⟩
+ (y % m) ≈⟨ z≋z%m y ⟨
y ∎
where open ≈-Reasoning ℤ/mℤ.setoid
This kind of argument can doubtless be generalised: z ≋ π z
in the quotient, for any such, while π z ≡ z % m
for the particular case ℤ/mℤ
? UPDATED: er, no, sadly, actual reasoning is required wrt the boundedness, it seems.
≈⇒≋ {x} {y} x≈y = N.ε by begin | ||
x // y ≈⟨ x≈y⇒x∙y⁻¹≈ε x≈y ⟩ | ||
ε ≈⟨ ι.ε-homo ⟨ | ||
ι N.ε ∎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly
≈⇒≋ {x} {y} x≈y = N.ε by begin
x ≈⟨ x≈y ⟩
y ≈⟨ identityˡ _ ⟨
ε ∙ y ≈⟨ ∙-congʳ (ι.ε-homo) ⟨
ι N.ε ∙ y ∎
Have suggested some possible refactorings to make the constructions/lemmas more reusable, and to be able to reuse |
So for the 'ALT' version of open import Algebra.Bundles using (Group; RawGroup)
module Algebra.NormalSubgroupALT {c ℓ} (G : Group c ℓ) where
open import Algebra.Structures using (IsGroup)
open import Algebra.Morphism.Structures
import Algebra.Morphism.GroupMonomorphism as GM
open import Data.Product.Base
open import Level using (suc; _⊔_)
private
module G = Group G
open G using (_≈_; _∙_)
record NormalSubgroup c′ ℓ′ : Set (c ⊔ ℓ ⊔ suc (c′ ⊔ ℓ′)) where
-- firstly: N is a subgroup of G
field
N : RawGroup c′ ℓ′
module N = RawGroup N
field
ι : N.Carrier → G.Carrier
ι-monomorphism : IsGroupMonomorphism N G.rawGroup ι
module ι = IsGroupMonomorphism ι-monomorphism
isGroup : IsGroup N._≈_ N._∙_ N.ε N._⁻¹
isGroup = GM.isGroup ι-monomorphism G.isGroup
group : Group _ _
group = record { isGroup = isGroup }
-- secondly: every element of N commutes in G
field
normal : ∀ n g → ∃[ n′ ] g ∙ ι n ≈ ι n′ ∙ g |
... and for open import Algebra.Bundles using (Group; RawGroup)
open import Algebra.NormalSubgroupALT using (NormalSubgroup)
module Algebra.Construct.Quotient.GroupALT
{c ℓ} (G : Group c ℓ) {c′ ℓ′} (N : NormalSubgroup G c′ ℓ′) where
open import Algebra.Morphism.Structures
open import Algebra.Structures using (IsGroup)
open import Data.Product.Base
open import Level using (_⊔_)
open import Relation.Binary.Core using (_⇒_)
open import Relation.Binary.Definitions using (Reflexive; Symmetric; Transitive)
open import Relation.Binary.Structures using (IsEquivalence)
import Algebra.Definitions as AlgDefs
import Relation.Binary.Reasoning.Setoid as ≈-Reasoning
open import Algebra.Properties.Group G
private
module G = Group G
open G using (_≈_; _∙_; ε; _⁻¹)
open import Algebra.Properties.Monoid G.monoid
module N = NormalSubgroup N
open N using (ι; normal; module N)
open ≈-Reasoning G.setoid
infix 0 _by_
data _≋_ (x y : G.Carrier) : Set (c ⊔ ℓ ⊔ c′) where
_by_ : ∀ n → x ≈ ι n ∙ y → x ≋ y
quotientRawGroup : RawGroup _ _
quotientRawGroup = record { _≈_ = _≋_ ; _∙_ = _∙_ ; ε = ε ; _⁻¹ = _⁻¹ }
≈⇒≋ : _≈_ ⇒ _≋_
≈⇒≋ {x} {y} x≈y = N.ε by begin
x ≈⟨ x≈y ⟩
y ≈⟨ G.identityˡ _ ⟨
ε ∙ y ≈⟨ G.∙-congʳ (ι.ε-homo) ⟨
ι N.ε ∙ y ∎
≋-refl : Reflexive _≋_
≋-refl {x} = ≈⇒≋ G.refl
≋-sym : Symmetric _≋_
≋-sym {x} {y} (g by x≈ιg∙y) = g N.⁻¹ by begin
y ≈⟨ y≈x\\z _ _ _ (G.sym x≈ιg∙y) ⟩
ι g ⁻¹ ∙ x ≈⟨ G.∙-congʳ (ι.⁻¹-homo g) ⟨
ι (g N.⁻¹) ∙ x ∎
≋-trans : Transitive _≋_
≋-trans {x} {y} {z} (g by x≈ιg∙y) (h by y≈ιh∙z) = g N.∙ h by begin
x ≈⟨ x≈ιg∙y ⟩
ι g ∙ y ≈⟨ G.∙-congˡ y≈ιh∙z ⟩
ι g ∙ (ι h ∙ z) ≈⟨ G.assoc _ _ _ ⟨
ι g ∙ ι h ∙ z ≈⟨ G.∙-congʳ (ι.∙-homo g h) ⟨
ι (g N.∙ h) ∙ z ∎
≋-isEquivalence : IsEquivalence _≋_
≋-isEquivalence = record
{ refl = ≋-refl
; sym = ≋-sym
; trans = ≋-trans
}
open AlgDefs _≋_
≋-∙-cong : Congruent₂ _∙_
≋-∙-cong {x} {y} {u} {v} (g by x≈ιg∙y) (h by u≈ιh∙v) =
let k , y∙ιh≈ιk∙y = normal h y in g N.∙ k by begin
x ∙ u ≈⟨ G.∙-cong x≈ιg∙y u≈ιh∙v ⟩
(ι g ∙ y) ∙ (ι h ∙ v) ≈⟨ uv≈w⇒xu∙vy≈x∙wy y∙ιh≈ιk∙y _ _ ⟩
ι g ∙ ((ι k ∙ y) ∙ v) ≈⟨ G.assoc _ _ _ ⟨
ι g ∙ (ι k ∙ y) ∙ v ≈⟨ G.∙-congʳ (G.assoc _ _ _) ⟨
ι g ∙ ι k ∙ y ∙ v ≈⟨ G.assoc _ _ _ ⟩
(ι g ∙ ι k) ∙ (y ∙ v) ≈⟨ G.∙-congʳ (ι.∙-homo g k) ⟨
ι (g N.∙ k) ∙ (y ∙ v) ∎
≋-⁻¹-cong : Congruent₁ _⁻¹
≋-⁻¹-cong {x} {y} (g by x≈ιg∙y) =
let h , y⁻¹∙ιg⁻¹≈ιh∙y⁻¹ = normal (g N.⁻¹) (y ⁻¹)
in h by begin
x ⁻¹ ≈⟨ G.⁻¹-cong x≈ιg∙y ⟩
(ι g ∙ y) ⁻¹ ≈⟨ ⁻¹-anti-homo-∙ _ _ ⟩
y ⁻¹ ∙ ι g ⁻¹ ≈⟨ G.∙-congˡ (ι.⁻¹-homo _) ⟨
y ⁻¹ ∙ ι (g N.⁻¹) ≈⟨ y⁻¹∙ιg⁻¹≈ιh∙y⁻¹ ⟩
ι h ∙ y ⁻¹ ∎
quotientIsGroup : IsGroup _≋_ _∙_ ε _⁻¹
quotientIsGroup = record
{ isMonoid = record
{ isSemigroup = record
{ isMagma = record
{ isEquivalence = ≋-isEquivalence
; ∙-cong = ≋-∙-cong
}
; assoc = λ x y z → ≈⇒≋ (G.assoc x y z)
}
; identity = record
{ fst = λ x → ≈⇒≋ (G.identityˡ x)
; snd = λ x → ≈⇒≋ (G.identityʳ x)
}
}
; inverse = record
{ fst = λ x → ≈⇒≋ (G.inverseˡ x)
; snd = λ x → ≈⇒≋ (G.inverseʳ x)
}
; ⁻¹-cong = ≋-⁻¹-cong
}
quotientGroup : Group c (c ⊔ ℓ ⊔ c′)
quotientGroup = record { isGroup = quotientIsGroup }
module _/_ = Group quotientGroup
η : G.Carrier → _/_.Carrier
η x = x -- because we do all the work in the relation
η-isHomomorphism : IsGroupHomomorphism G.rawGroup quotientRawGroup η
η-isHomomorphism = record
{ isMonoidHomomorphism = record
{ isMagmaHomomorphism = record
{ isRelHomomorphism = record
{ cong = ≈⇒≋
}
; homo = λ _ _ → ≋-refl
}
; ε-homo = ≋-refl
}
; ⁻¹-homo = λ _ → ≋-refl
} In each case, feel free to adapt as you see fit. (I'm almost tempted to inline Also: |
N-isGroup : IsGroup N._≈_ N._∙_ N.ε N._⁻¹ | ||
N-isGroup = GM.isGroup ι-monomorphism isGroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there also be a Group
defined?
N-isGroup : IsGroup N._≈_ N._∙_ N.ε N._⁻¹ | |
N-isGroup = GM.isGroup ι-monomorphism isGroup | |
N-isGroup : IsGroup N._≈_ N._∙_ N.ε N._⁻¹ | |
N-isGroup = GM.isGroup ι-monomorphism isGroup | |
N-group : Group _ _ | |
N-group = record { isGroup = N-isgroup } |
plus: what should be exported public
ly from this module?
And for ≋-*-cong : Congruent₂ _*_
≋-*-cong {x} {y} {u} {v} (j by x≈ιj+y) (k by u≈ιk+v) = j I.*ᵣ u I.+ᴹ y I.*ₗ k by begin
x * u ≈⟨ *-congʳ x≈ιj+y ⟩
(ι j + y) * u ≈⟨ distribʳ _ _ _ ⟩
ι j * u + y * u ≈⟨ +-congˡ (*-congˡ u≈ιk+v) ⟩
ι j * u + y * (ι k + v) ≈⟨ +-congˡ (distribˡ _ _ _) ⟩
ι j * u + (y * ι k + y * v) ≈⟨ +-assoc _ _ _ ⟨
(ι j * u + y * ι k) + y * v ≈⟨ +-congʳ (+-cong (ι.*ᵣ-homo u j) (ι.*ₗ-homo y k)) ⟨
ι (j I.*ᵣ u) + ι (y I.*ₗ k) + y * v ≈⟨ +-congʳ (ι.+ᴹ-homo (j I.*ᵣ u) (y I.*ₗ k)) ⟨
ι (j I.*ᵣ u I.+ᴹ y I.*ₗ k) + y * v ∎ |
Suggested refactoring for
|
; 0# = 0# | ||
; 1# = 1# | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should insert here that the quotient map on the underlying additive subgroup of the module in fact extends to a ring homomorphism from R
to R / I
...
... which given that the underlying map is id
is pretty easy by hand.
I think (while travelling) this should be generalized to ideals over modules, rather than just rings. This shouldn't need much change to the code. |
I had the chance to give this a go, and ran into an obstacle. For |
Not sure you need the generalisations at this stage? |
_≋?_ with ℕ.nonZero? ∣ m ∣ | ||
... | yes p = _≋?′_ {{p}} | ||
... | no ¬p = {!!} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... with the modified definition of _≋_
:
_≋?_ with ℕ.nonZero? ∣ m ∣ | |
... | yes p = _≋?′_ {{p}} | |
... | no ¬p = {!!} | |
_≋?_ : Decidable _≋_ | |
_≋?_ with ∣ m ∣ ℕ.≟ 0 | |
... | yes |m|≡0 = λ x y → map′ ≡⇒≋ ≋⇒≡ (x ≟ y) | |
where | |
open ≡-Reasoning | |
≡⇒≋ : _≡_ ⇒ _≋_ | |
≡⇒≋ {x = x} {y = y} x≡y = +0 by begin | |
x ≡⟨ x≡y ⟩ | |
y ≡⟨ +-identityˡ y ⟨ | |
+0 + y ≡⟨⟩ | |
+0 * +0 + y ∎ | |
≋⇒≡ : _≋_ ⇒ _≡_ | |
≋⇒≡ {x = x} {y = y} (k by x≡k0+y) = begin | |
x ≡⟨ x≡k0+y ⟩ | |
k * m + y ≡⟨ ≡.cong (λ m → k * m + y) (∣i∣≡0⇒i≡0 |m|≡0) ⟩ | |
k * +0 + y ≡⟨ ≡.cong (_+ y) (*-comm k +0) ⟩ | |
+0 * k + y ≡⟨ +-identityˡ y ⟩ | |
y ∎ | |
... | no m≢0 = _≋?′_ {{ℕ.≢-nonZero m≢0}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... where the argument for the case m≡0
could/should be generalised for arbitrary Ring
, with the machinery (∣i∣≡0⇒i≡0 |m|≡0)
being all that's then needed to aplly it for the Integer
case...
to-% {x} {y} (k by x-y≡km) = {!!} | ||
where | ||
open ≡-Reasoning | ||
lemma : x % m ⊖ y % m ≡ (k - (x / m) + (y / m)) * m | ||
lemma = begin | ||
x % m ⊖ y % m ≡⟨ m-n≡m⊖n (x % m) (y % m) ⟨ | ||
+ (x % m) - + (y % m) ≡⟨ {!!} ⟩ | ||
(k - (x / m) + (y / m)) * m ∎ | ||
|
||
bound : ∣ x % m ⊖ y % m ∣ ℕ.< ∣ m ∣ | ||
bound = {!!} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to-% {x} {y} (k by x-y≡km) = {!!} | |
where | |
open ≡-Reasoning | |
lemma : x % m ⊖ y % m ≡ (k - (x / m) + (y / m)) * m | |
lemma = begin | |
x % m ⊖ y % m ≡⟨ m-n≡m⊖n (x % m) (y % m) ⟨ | |
+ (x % m) - + (y % m) ≡⟨ {!!} ⟩ | |
(k - (x / m) + (y / m)) * m ∎ | |
bound : ∣ x % m ⊖ y % m ∣ ℕ.< ∣ m ∣ | |
bound = {!!} | |
to-% {x} {y} x≋y | |
using x%m ← x % m | |
using y%m ← y % m | |
with k by x%m≡km+y%m ← (let open ≈-Reasoning ℤ/mℤ.setoid in begin | |
+ x%m ≈⟨ z≋z%m x ⟨ | |
x ≈⟨ x≋y ⟩ | |
y ≈⟨ z≋z%m y ⟩ | |
+ y%m ∎) | |
= begin | |
x%m ≡⟨ ℕ.m<n⇒m%n≡m (n%d<d x m) ⟨ | |
x%m ℕ.% ∣ m ∣ ≡⟨⟩ | |
(+ x%m) % m ≡⟨ ≡.cong (_% m) x%m≡km+y%m ⟩ | |
(k * m + (+ y%m)) % m ≡⟨ [km+n]%m≡n%m k (+ y%m) ⟩ | |
(+ y%m) % m ≡⟨⟩ | |
y%m ℕ.% ∣ m ∣ ≡⟨ ℕ.m<n⇒m%n≡m (n%d<d y m) ⟩ | |
y%m ∎ | |
where | |
open ≡-Reasoning | |
[km+n]%m≡n%m : ∀ k n → (k * m + n) % m ≡ n % m | |
[km+n]%m≡n%m k n = {!!} |
where this last lemma is the 'obvious' extension of Data.Nat.DivMod.[m+kn]%n≡m%n
to Integer
... but is still ... irritating to have to prove directly from first principles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd hoped I could simplify this further, but ran out of energy! Hopefully your holiday has re-energised you!
Yet another alternative definition of data _≋_ (x y : Carrier) : Set (c ⊔ ℓ ⊔ c′) where namely, to symmetrise wrt multiplication by elements of the normal subgroup, ie record _≋_ (x y : G.Carrier) : Set (c ⊔ ℓ ⊔ c′) where
field
{l} {r} : _
[ιl]x≈[ιr]y : ι l ∙ x G.≈ ι r ∙ y on the basis that this mirrors the revised ('symmetrised') definition of Transitivity is a bit harder to prove, but I wonder if this might overall enjoy a smoother development? Or else refactor as a lemma/view expressing the decomposition? |
Opening this PR to share my WIP. I've got a messy proof of the Chinese remainder theorem for arbitrary rings, but in porting it from my standalone library to this I've somehow made some parameters not infer properly