{-# OPTIONS --safe --cubical #-} open import Cubical.Foundations.Prelude open import Cubical.Algebra.CommRing open import Cubical.Algebra.CommRing.Ideal open import Cubical.Foundations.Powerset open import Cubical.Data.Nat using (ℕ) open import Cubical.Data.Sum Singleton : {ℓ : Level} {A : Type ℓ} → A → A → Type ℓ Singleton x y = x ≡ y module _ {ℓ : Level} (R' : CommRing ℓ) where private R = fst R' open CommRingStr (snd R') ⊥ : Type ℓ ⊥ = 1r ≡ 0r ¬ : {ℓ' : Level} → Type ℓ' → Type (ℓ-max ℓ ℓ') ¬ A = A → ⊥ data ⟨_⟩∋_ {ℓ' : Level} (M : R → Type ℓ') : R → Type (ℓ-max ℓ ℓ') where lift : (x : R) → M x → ⟨ M ⟩∋ x 0r-closed : ⟨ M ⟩∋ 0r +-closed : {x y : R} → ⟨ M ⟩∋ x → ⟨ M ⟩∋ y → ⟨ M ⟩∋ (x + y) ·-closed : {a x : R} → ⟨ M ⟩∋ x → ⟨ M ⟩∋ (a · x) module _ (E : ℕ → R) where Max : ℕ → Type ℓ Max n = ¬ (⟨ (λ x → Max n x ⊎ Singleton (E n) x) ⟩∋ 1r) → Max (ℕ.suc n) (E n) {- data Gen (I : CommIdeal R') (x : R) : R → Type ℓ where safe : ¬ (1r ∈ {!!}) → Gen I x x -}