open import GpdCont.SymmetricContainer.Base

module GpdCont.SymmetricContainer.Eval {} (G : SymmetricContainer ) where

open import GpdCont.Prelude
open import GpdCont.Polynomial as Poly using (Polynomial)

open import Cubical.Foundations.HLevels
open import Cubical.Data.Sigma.Properties as Sigma using (map-snd)

open SymmetricContainer G

⟦_⟧ᵗ : Type   Type 
⟦_⟧ᵗ = Polynomial Shape Pos

open Polynomial using (shape ; label) public

opaque
  isGroupoid-⟦_⟧ᵗ :  {X}  isGroupoid X  isGroupoid (⟦_⟧ᵗ X)
  isGroupoid-⟦_⟧ᵗ = Poly.isOfHLevelPolynomial 3 is-groupoid-shape

⟦_⟧ : hGroupoid   hGroupoid 
⟦_⟧ (X , is-groupoid-X) .fst =  X ⟧ᵗ
⟦_⟧ (X , is-groupoid-X) .snd = isGroupoid-⟦_⟧ᵗ is-groupoid-X

⟦-⟧ᵗ-Path :  {X : Type } {p q : ⟦_⟧ᵗ X}
   (shape-path : shape p  shape q)
   (label-path : PathP  i  Pos (shape-path i)  X) (label p) (label q))
   p  q
⟦-⟧ᵗ-Path = Poly.Polynomial≡

⟦-⟧-Path :  {X : hGroupoid } {p q :  ⟦_⟧ X }
   (shape-path : shape p  shape q)
   (label-path : PathP  i  Pos (shape-path i)   X ) (label p ) (label q))
   p  q
⟦-⟧-Path = ⟦-⟧ᵗ-Path

module Map = Poly.Map Shape Pos

⟦_⟧-map :  (X Y : hGroupoid ) (f :  X    Y )   ⟦_⟧ X    ⟦_⟧ Y 
⟦_⟧-map _ _ = Map.map

⟦_⟧-map-id : (X : hGroupoid )  ⟦_⟧-map X X (id  X )  id  ⟦_⟧ X 
⟦_⟧-map-id X = Map.map-id  X 

⟦_⟧-map-comp :  (X Y Z : hGroupoid ) (f :  X    Y ) (g :  Y    Z )  ⟦_⟧-map X Z (g  f)  ⟦_⟧-map Y Z g  ⟦_⟧-map X Y f
⟦_⟧-map-comp _ _ _ = Map.map-comp