{-# OPTIONS --safe #-}
module Cubical.Algebra.AbGroup.Instances.Pi where

open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Algebra.AbGroup
open import Cubical.Algebra.Group.Instances.Pi
open import Cubical.Algebra.AbGroup.Instances.Int

module _ { ℓ' : Level} {X : Type } (G : X  AbGroup ℓ') where
  ΠAbGroup : AbGroup (ℓ-max  ℓ')
  ΠAbGroup = Group→AbGroup (ΠGroup  x  AbGroup→Group (G x)))
              λ f g i x  IsAbGroup.+Comm (AbGroupStr.isAbGroup (G x .snd)) (f x) (g x) i

ΠℤAbGroup :  {} (A : Type )  AbGroup 
ΠℤAbGroup A = ΠAbGroup {X = A} λ _  ℤAbGroup