Skip to content

Commit 5b6b5d0

Browse files
committed
Use new properties to simplify Real
1 parent 8f965da commit 5b6b5d0

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/Data/Real/Base.agda

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,21 +182,13 @@ isCauchy (square x) ε = B ℕ.⊔ proj₁ (isCauchy x (1/ (b ℚ.+ b) * ε)) ,
182182
b = 1ℚ ℚ.+ ∣ lookup (sequence x) B ∣
183183

184184
instance _ : Positive b
185-
_ = positive $ begin-strict
186-
0ℚ ≤⟨ 0≤∣p∣ (lookup (sequence x) B) ⟩
187-
∣ lookup (sequence x) B ∣ ≡⟨ +-identityˡ ∣ lookup (sequence x) B ∣ ⟨
188-
0ℚ ℚ.+ ∣ lookup (sequence x) B ∣ <⟨ +-monoˡ-< ∣ lookup (sequence x) B ∣ {0ℚ} {1ℚ} (*<* (+<+ (s≤s z≤n))) ⟩
189-
1ℚ ℚ.+ ∣ lookup (sequence x) B ∣ ≡⟨⟩
190-
b ∎
185+
_ = pos+nonNeg⇒pos 1ℚ ∣ lookup (sequence x) B ∣ {{∣-∣-nonNeg (lookup (sequence x) B)}}
191186

192187
instance _ : NonZero b
193188
_ = pos⇒nonZero b
194189

195190
instance _ : Positive (b ℚ.+ b)
196-
_ = positive $ begin-strict
197-
0ℚ ≡⟨⟩
198-
0ℚ ℚ.+ 0ℚ <⟨ +-mono-< (positive⁻¹ b) (positive⁻¹ b) ⟩
199-
b ℚ.+ b ∎
191+
_ = pos+pos⇒pos b b
200192

201193
instance _ : NonZero (b ℚ.+ b)
202194
_ = pos⇒nonZero (b ℚ.+ b)

0 commit comments

Comments
 (0)