{-# OPTIONS --safe #-}
module Cubical.Algebra.DirectSum.DirectSumFun.Base where

open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels

open import Cubical.Data.Nat renaming (_+_ to _+n_ ; _·_ to _·n_)
open import Cubical.Data.Nat.Order
open import Cubical.Data.Sigma

open import Cubical.HITs.PropositionalTruncation as PT

open import Cubical.Algebra.AbGroup

private variable
   : Level

open AbGroupStr

-----------------------------------------------------------------------------
-- Definition

AlmostNullProof : (G :   Type )  (Gstr : (n : )  AbGroupStr (G n))
                   (f : (n : )  G n)  (k : )  Type 
AlmostNullProof G Gstr f k = (n : )  k < n  f n  0g (Gstr n)

AlmostNull : (G :   Type )  (Gstr : (n : )  AbGroupStr (G n))
              (f : (n : )  G n)  Type 
AlmostNull G Gstr f = Σ[ k   ] AlmostNullProof G Gstr f k

AlmostNullP : (G :   Type )  (Gstr : (n : )  AbGroupStr (G n))
              (f : (n : )  G n)  Type 
AlmostNullP G Gstr f =  (AlmostNull G Gstr f) ∥₁

⊕Fun : (G :   Type )  (Gstr : (n : )  AbGroupStr (G n))  Type 
⊕Fun G Gstr = Σ[ f  ((n : )  G n) ] AlmostNullP G Gstr f