Files
agdaproofs/Numbers/Integers/RingStructure/IntegralDomain.agda
2019-11-22 19:52:57 +00:00

24 lines
877 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.Naturals.Multiplication
open import Numbers.Integers.RingStructure.Ring
open import Semirings.Definition
open import Groups.Definition
open import Rings.Definition
open import Setoids.Setoids
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 ()