Skip to content

Commit

Permalink
For x y : ℚ, x ≤ y if and only if real-ℚ x ≤ real-ℚ y (#1303)
Browse files Browse the repository at this point in the history
We have the analogue for strict inequality; this one's for nonstrict.
  • Loading branch information
lowasser authored Feb 9, 2025
1 parent 304930a commit 5d2a1c2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/real-numbers/inequality-real-numbers.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ open import elementary-number-theory.rational-numbers
open import elementary-number-theory.strict-inequality-rational-numbers

open import foundation.complements-subtypes
open import foundation.coproduct-types
open import foundation.dependent-pair-types
open import foundation.empty-types
open import foundation.existential-quantification
open import foundation.identity-types
open import foundation.logical-equivalences
Expand Down Expand Up @@ -165,11 +167,20 @@ antisymmetric-leq-Large-Poset ℝ-Large-Poset = antisymmetric-leq-ℝ
ℝ-Poset = poset-Large-Poset ℝ-Large-Poset
```

### The canonical map from rational numbers to the reals preserves inequality
### The canonical map from rational numbers to the reals preserves and reflects inequality

```agda
preserves-leq-real-ℚ : (x y : ℚ) leq-ℚ x y leq-ℝ (real-ℚ x) (real-ℚ y)
preserves-leq-real-ℚ x y x≤y q q<x = concatenate-le-leq-ℚ q x y q<x x≤y

reflects-leq-real-ℚ : (x y : ℚ) leq-ℝ (real-ℚ x) (real-ℚ y) leq-ℚ x y
reflects-leq-real-ℚ x y rx≤ry with decide-le-leq-ℚ y x
... | inl y<x = ex-falso (irreflexive-le-ℚ y (rx≤ry y y<x))
... | inr x≤y = x≤y

iff-leq-real-ℚ : (x y : ℚ) leq-ℚ x y ↔ leq-ℝ (real-ℚ x) (real-ℚ y)
pr1 (iff-leq-real-ℚ x y) = preserves-leq-real-ℚ x y
pr2 (iff-leq-real-ℚ x y) = reflects-leq-real-ℚ x y
```

## References
Expand Down

0 comments on commit 5d2a1c2

Please sign in to comment.