Files
agdaproofs/Numbers/Integers/RingStructure/IntegralDomain.agda
2020-01-05 15:06:35 +00:00

19 lines
713 B
Agda
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Numbers.Naturals.Semiring
open import Numbers.Integers.RingStructure.Ring
open import Rings.IntegralDomains.Definition
module Numbers.Integers.RingStructure.IntegralDomain where
intDom : (a b : ) a *Z b nonneg 0 (a nonneg 0 False) (b nonneg 0)
intDom (nonneg zero) (nonneg b) x a!=0 = exFalso (a!=0 x)
intDom (nonneg (succ a)) (nonneg zero) a!=0 _ = refl
intDom (nonneg zero) (negSucc b) pr a!=0 = exFalso (a!=0 pr)
intDom (negSucc a) (nonneg zero) _ _ = refl
IntDom : IntegralDomain Ring
IntegralDomain.intDom IntDom {a} {b} = intDom a b
IntegralDomain.nontrivial IntDom ()