Skip to content

Commit

Permalink
Decide for natural numbers whether x < y or y ≤ x (#1279)
Browse files Browse the repository at this point in the history
The rationals have it, but the naturals don't.
  • Loading branch information
lowasser authored Feb 5, 2025
1 parent cf75821 commit 26f7289
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,15 @@ le-leq-neq-ℕ {succ-ℕ x} {succ-ℕ y} l f =
le-leq-neq-ℕ {x} {y} l (λ p f (ap succ-ℕ p))
```

### For any two natural numbers `x` and `y`, either `x < y` or `y ≤ x`

```agda
decide-le-leq-ℕ : (x y : ℕ) le-ℕ x y + leq-ℕ y x
decide-le-leq-ℕ x zero-ℕ = inr star
decide-le-leq-ℕ zero-ℕ (succ-ℕ _) = inl star
decide-le-leq-ℕ (succ-ℕ x) (succ-ℕ y) = decide-le-leq-ℕ x y
```

### If `1 < x` and `1 < y`, then `1 < xy`

```agda
Expand Down

0 comments on commit 26f7289

Please sign in to comment.