{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-}
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Powerset
open import Cubical.Algebra.CommRing
open import Cubical.Relation.Nullary.Base
open import Cubical.Data.Sigma
open import Cubical.Data.Nat
open import Cubical.Data.Vec hiding (foldr; map)
open import Cubical.Data.List
open import AFF2024.Basics
open import AFF2024.Algebra.Basics
module AFF2024.AlgebraicSets.Basics {β : Level} (Rβ¦@(R , Rstr) : CommRing β) where
open CommRingStr Rstr
πΈ : β β Type β
πΈ n = Vec R n
module _ {n : β} where
πΈβΏ-isSet : isSet (πΈ n)
πΈβΏ-isSet = VecPath.isOfHLevelVec 0 _ is-set
Vβ : MultivariatePoly Rβ¦ n β β (πΈ n)
Vβ f = Ξ» xs β (evalT f xs β‘ 0r) , is-set _ _
V : List (MultivariatePoly Rβ¦ n) β β (πΈ n)
V fs = foldr _βͺ_ β
(map Vβ fs)
IsAlgebraic : β (πΈ n) β Type (β-suc β)
IsAlgebraic M = β[ fs β List (MultivariatePoly Rβ¦ n) ] M β‘ V fs
Idl : β (πΈ n) β β (MultivariatePoly Rβ¦ n)
Idl M = Ξ» f β ((x : πΈ n) β x β M β evalT f x β‘ 0r) , Ξ» r s i x p β is-set _ _ (r x p) (s x p) i