Skip to content

Classical.Structures.Group.Power

Indexed products and powers of groups

This is the Classical.Structures.Group.Power module of the Agda Universal Algebra Library.

For an indexed family š’¢ : I → Group α ρ of groups presented as Ī£-typed structures over Sig-Group, this module constructs the indexed direct product āØ…įµš’¢, that is, the group on the product algebra ⨅ of Setoid.Algebras.Products, whose carrier is the function type āˆ€ i → š•Œ[ š‘® i ] with pointwise operations and pointwise equality.

The five group laws transfer coordinatewise by ⊧-P-invar of Setoid.Varieties.Properties (products preserve identities) so no term induction is repeated here.

This construction generalizes the binary product _Ć—įµ_ of Classical.Structures.Group.Product rather than replacing it.1

The power š’¢ ^įµ n is the constant-family product over I = Fin n, so an element of S ^įµ n is literally a map x : Fin n → S, and conditions such as "x is constant on the blocks of a partition of the index set" are stated by comparing values of x at indices, with no tuple bookkeeping.

Besides the product and the power, the module provides

  • pointwise descriptions of the curried operations, (x āŠ— y) i ā‰ˆ x i āˆ™ y i and its companions for ε and ⁻¹;2
  • coordinate projections as homomorphisms, by instantiating the generic ⨅-proj of Setoid.Homomorphisms.Products.

The underlying equivalence of the product is not redefined here.3

{-# OPTIONS --cubical-compatible --exact-split --safe #-}

module Classical.Structures.Group.Power where

open import Agda.Primitive using () renaming ( Set to Type )

-- Imports from the Agda Standard Library ---------------------------------------
open import Data.Fin.Base       using ( Fin )
open import Data.Fin.Patterns   using ( 0F ; 1F )
open import Data.Nat.Base       using ( ā„• )
open import Data.Product        using ( _,_ ; proj₁ ; projā‚‚ )
open import Function            using ( _∘_ )
open import Level               using ( Level ; _āŠ”_ )
open import Relation.Binary     using ( Setoid )

-- Imports from the Agda Universal Algebra Library ------------------------------
open import Classical.Signatures.Group        using  ( Sig-Group ; āˆ™-Op ; ε-Op ; ⁻¹-Op )
open import Classical.Structures.Group.Basic  using  ( Group ; module Group-Op ; _āŠØįµįµ–_ )
open import Classical.Structures.Interpret    using  ( interp-cong )
open import Classical.Theories.Group          using  ( Th-Group )
open import Setoid.Algebras.Basic             using  ( Algebra ; š•Œ[_] ; š”»[_] )
open import Setoid.Algebras.Products          using  ( ⨅ )
open import Setoid.Homomorphisms.Basic        using  ( hom )
open import Setoid.Homomorphisms.Products     using  ( ⨅-proj )
open import Setoid.Varieties.Properties       using  ( ⊧-P-invar )

private variable ι α ρ : Level

The indexed product of a family of groups

GroupFamilyProductš’¢ packages the construction for a fixed family: the product algebra, the transferred satisfaction proof, and the product group. Each group equation holds in ⨅ because it holds in every coordinate; this is ⊧-P-invar applied to the family of satisfaction proofs, one application per equation of Th-Group.

module GroupFamilyProduct {I : Type ι} (š’¢ : I → Group α ρ) where

  private
    š‘® : I → Algebra {š‘† = Sig-Group} α ρ
    š‘® = proj₁ ∘ š’¢

  -- Every group equation transfers to the product, coordinatewise.
  āØ…įµ-⊨ : ⨅ š‘® āŠØįµįµ– Th-Group
  āØ…įµ-⊨ eq = ⊧-P-invar {p = Th-Group eq .proj₁} {q = Th-Group eq .projā‚‚}
              š‘® Ī» i → š’¢ i .projā‚‚ eq

  -- The indexed direct product group.
  āØ…įµ-Group : Group (α āŠ” ι) (ρ āŠ” ι)
  āØ…įµ-Group = ⨅ š‘® , āØ…įµ-⊨

The top-level form, for use at call sites.

āØ…įµ : {I : Type ι} → (I → Group α ρ) → Group (α āŠ” ι) (ρ āŠ” ι)
āØ…įµ = GroupFamilyProduct.āØ…įµ-Group

Powers: the constant-family product

GroupPowerI š’¢ is the product of the constant family at š’¢ (the power š’¢ ^ I) together with the power-specific toolkit: pointwise descriptions of the curried operations and the coordinate projections.

Opening it re-exports the GroupFamilyProduct kit for the constant family, so āØ…įµ-Group names the power group itself.

module GroupPower (I : Type ι) (š’¢ : Group α ρ) where

  open GroupFamilyProduct (Ī» (_ : I) → š’¢) public

  private
    š‘® = š’¢ .proj₁
    š‘®į“µ = āØ…įµ-Group .proj₁

  open Setoid š”»[ š‘® ] using ( _ā‰ˆ_ ; refl )

The curried accessors of Group-Op applied to the power agree, at each coordinate, with the accessors of the base group applied to the coordinate values.4

  open Group-Op š’¢         using ( _āˆ™_ ; ε ; _⁻¹ )
  open Group-Op āØ…įµ-Group  using () renaming ( _āˆ™_ to _āŠ—_ ; ε to e ; _⁻¹ to inv )

  -- The power multiplication is pointwise.
  āŠ—-pointwise : āˆ€ x y i → (x āŠ— y) i ā‰ˆ x i āˆ™ y i
  āŠ—-pointwise x y i = interp-cong š‘® āˆ™-Op Ī» { 0F → refl ; 1F → refl }

  -- The power identity is the constant identity tuple.
  e-pointwise : āˆ€ i → e i ā‰ˆ ε
  e-pointwise i = interp-cong š‘® ε-Op Ī» ()

  -- The power inverse is pointwise.
  inv-pointwise : āˆ€ x i → (inv x) i ā‰ˆ x i ⁻¹
  inv-pointwise x i = interp-cong š‘® ⁻¹-Op Ī» { 0F → refl }

Evaluation at a coordinate is a homomorphism from the power onto the base group — the generic projection of Setoid.Homomorphisms.Products, instantiated at the constant family.

  -- The i-th coordinate projection, as a homomorphism.
  proj-hom : (i : I) → hom š‘®į“µ š‘®
  proj-hom = ⨅-proj Ī» (_ : I) → š‘®

The finite power of a group

The power of a group by a natural number is the constant-family product over Fin n. Since Fin n lives at level zero, the levels of the base group are preserved; in particular the power of a Group 0ā„“ 0ā„“ is again a Group 0ā„“ 0ā„“.

infixl 8 _^įµ_

_^įµ_ : Group α ρ → ā„• → Group α ρ
š’¢ ^įµ n = GroupPower.āØ…įµ-Group (Fin n) š’¢


  1. The binary module deliberately keeps the pair carrier G Ɨ K, which is the form the FLRP fattening arguments consume, whereas the function-typed carrier here is the form Kurzweil's construction consumes. 

  2. This bridges the Fin-tuple Ī·-gap exactly as in the binary module; the curried accessors route arguments through a canonical pair tuple, and Fin-indexed tuples lack Ī· under --cubical-compatible; each bridge is one interp-cong per use. 

  3. Following the planned-Cubical-port discipline, the underlying equivalence of the product is not redefined here; it is the pointwise equivalence of ⨅, so the equality locus to substitute on the eventual port is that of Setoid.Algebras.Products alone. 

  4. They are not definitionally equal, for the same reason as in the binary module: the curried form routes the arguments through a canonical pair tuple, and Fin-indexed tuples lack Ī· under --cubical-compatible; each bridge is one interp-cong