{-# OPTIONS --without-K --safe #-}
open import Polynomial.Parameters
module Polynomial.NormalForm.Definition
{a}
(coeffs : RawCoeff a)
where
open import Polynomial.NormalForm.InjectionIndex
open import Relation.Nullary using (¬_)
open import Level using (_⊔_)
open import Data.Empty using (⊥)
open import Data.Unit using (⊤)
open import Data.Nat using (ℕ; suc; zero)
open import Data.Bool using (T)
open import Data.List.Kleene public
infixl 6 _Δ_
record PowInd {c} (C : Set c) : Set c where
inductive
constructor _Δ_
field
coeff : C
pow : ℕ
open PowInd public
open RawCoeff coeffs
mutual
infixl 6 _Π_
record Poly (n : ℕ) : Set a where
inductive
constructor _Π_
field
{i} : ℕ
flat : FlatPoly i
i≤n : i ≤′ n
data FlatPoly : ℕ → Set a where
Κ : Carrier → FlatPoly zero
Σ : ∀ {n} → (xs : Coeff n +) → .{xn : Norm xs} → FlatPoly (suc n)
Coeff : ℕ → Set a
Coeff n = PowInd (NonZero n)
infixl 6 _≠0
record NonZero (i : ℕ) : Set a where
inductive
constructor _≠0
field
poly : Poly i
.{poly≠0} : ¬ Zero poly
Zero : ∀ {n} → Poly n → Set
Zero (Κ x Π _) = T (Zero-C x)
Zero (Σ _ Π _) = ⊥
Norm : ∀ {i} → Coeff i + → Set
Norm (_ Δ zero & []) = ⊥
Norm (_ Δ zero & ∹ _) = ⊤
Norm (_ Δ suc _ & _) = ⊤
open NonZero public
open Poly public