mirror of
https://github.com/anoma/juvix.git
synced 2024-12-01 00:04:58 +03:00
21 lines
329 B
Plaintext
21 lines
329 B
Plaintext
module Ord;
|
||
|
||
import Data.Nat;
|
||
open Data.Nat;
|
||
|
||
type Ord :=
|
||
| ZOrd : Ord
|
||
| SOrd : Ord -> Ord
|
||
| Lim : (ℕ -> Ord) -> Ord;
|
||
|
||
addord : Ord -> Ord -> Ord
|
||
|
||
| Zord y := y
|
||
| (SOrd x) y := SOrd (addord x y)
|
||
| (Lim f) y := Lim (aux-addord f y);
|
||
|
||
aux-addord : (ℕ -> Ord) -> Ord -> ℕ -> Ord
|
||
|
||
| f y z := addord (f z) y;
|
||
|