mirror of
https://github.com/Smaug123/agdaproofs
synced 2025-10-12 07:08:40 +00:00
Lots of refactoring towards partially-ordered ring R (#109)
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user