mirror of
https://github.com/anoma/juvix.git
synced 2024-12-11 08:25:46 +03:00
[ tests ] added example about ordinals
This commit is contained in:
parent
02c17c1d1f
commit
7f501de774
@ -61,5 +61,5 @@ instance Pretty Rel where
|
||||
|
||||
instance Pretty Rel' where
|
||||
pretty r = case r of
|
||||
REq -> pretty ("∼" :: Text)
|
||||
REq -> pretty ("=" :: Text)
|
||||
RLe -> pretty ("≺" :: Text)
|
||||
|
@ -88,4 +88,19 @@ aux A (cons _ x xs) ls := cons A x (aux A xs ls);
|
||||
flat A (nil _) := nil A;
|
||||
flat A (cons _ x xs) := aux A x xs;
|
||||
|
||||
inductive Ord {
|
||||
ZOrd : Ord;
|
||||
SOrd : Ord -> Ord;
|
||||
Lim : (ℕ -> Ord) -> Ord;
|
||||
};
|
||||
|
||||
addord : Ord -> Ord -> Ord;
|
||||
aux-addord : (ℕ -> Ord) -> Ord -> (ℕ -> Ord);
|
||||
|
||||
addord (Zord) y := y;
|
||||
addord (SOrd x) y := SOrd (addord x y);
|
||||
addord (Lim f) y := Lim (aux-addord f y);
|
||||
-- where
|
||||
aux-addord f y z := addord (f z) y;
|
||||
|
||||
end;
|
Loading…
Reference in New Issue
Block a user