mirror of
https://github.com/Smaug123/agdaproofs
synced 2025-10-10 14:18:41 +00:00
Better structure of Rationals (#15)
This commit is contained in:
@@ -13,5 +13,17 @@ open import FieldOfFractions
|
||||
|
||||
module Rationals where
|
||||
|
||||
ℚ : Field'
|
||||
ℚ = encapsulateField (fieldOfFractions ℤIntDom)
|
||||
ℚ : Set
|
||||
ℚ = fieldOfFractionsSet ℤIntDom
|
||||
|
||||
_+Q_ : ℚ → ℚ → ℚ
|
||||
a +Q b = fieldOfFractionsPlus ℤIntDom a b
|
||||
|
||||
_*Q_ : ℚ → ℚ → ℚ
|
||||
a *Q b = fieldOfFractionsTimes ℤIntDom a b
|
||||
|
||||
ℚRing : Ring (fieldOfFractionsSetoid ℤIntDom) _+Q_ _*Q_
|
||||
ℚRing = fieldOfFractionsRing ℤIntDom
|
||||
|
||||
ℚField : Field ℚRing
|
||||
ℚField = fieldOfFractions ℤIntDom
|
||||
|
Reference in New Issue
Block a user