Lots of refactoring towards partially-ordered ring R (#109)

This commit is contained in:
Patrick Stevens
2020-04-10 19:00:57 +01:00
committed by GitHub
parent 1cff95c652
commit 412edaf4c7
19 changed files with 1015 additions and 778 deletions

View File

@@ -1,4 +1,4 @@
{-# OPTIONS --safe --warning=error #-}
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Numbers.Naturals.Naturals
@@ -10,7 +10,6 @@ open import Rings.Definition
open import Rings.Orders.Total.Definition
open import Rings.Orders.Partial.Definition
open import Fields.Fields
open import Numbers.Primes.PrimeNumbers
open import Setoids.Setoids
open import Setoids.Orders
open import Functions
@@ -28,6 +27,9 @@ open import Fields.FieldOfFractions.Order IntDom OrderedRing
: Set
= fieldOfFractionsSet
Setoid : Setoid
Setoid = fieldOfFractionsSetoid
_+Q_ :
a +Q b = fieldOfFractionsPlus a b
@@ -43,6 +45,9 @@ a *Q b = fieldOfFractionsTimes a b
injectionQ :
injectionQ z = z ,, (nonneg 1 , λ ())
injectionQInjective : Injection injectionQ
injectionQInjective pr = equalityLeft pr
Field : Field Ring
Field = fieldOfFractions

View File

@@ -1,9 +1,11 @@
{-# OPTIONS --warning=error --safe --guardedness #-}
{-# OPTIONS --warning=error --safe --guardedness --without-K #-}
open import Setoids.Orders
open import Setoids.Setoids
open import LogicalFormulae
open import Rings.Definition
open import Numbers.Rationals.Definition
open import Functions
module Numbers.Reals.Definition where
@@ -23,12 +25,20 @@ _+R_ = _+C_
_*R_ :
_*R_ = _*C_
Setoid = cauchyCompletionSetoid
_=R_ : Set
a =R b = Setoid.__ cauchyCompletionSetoid a b
Ring : Ring cauchyCompletionSetoid _+R_ _*R_
Ring = CRing
injectionR :
injectionR = injection
injectionRInjective : Injection injectionR
injectionRInjective = CInjection'
0R :
0R = injection 0Q