swh:1:snp:aeaf3dbb58f5be84b565e73b5ade1503ee8cb6d6
Raw File
Tip revision: b6407e0f026cf5491ca5ed0a35ea5cf316ebe8ca authored by Anish Tondwalkar on 21 May 2021, 03:15:25 UTC
formatted for submission
Tip revision: b6407e0
mochi-d2.fst
module D2

assume val choice : bool

val app : #n:int -> f:(x:int{n <= x} -> int) -> u:int{n <= u} -> int
let rec app #n f x = if choice then app f (x + 1) else f x

val check : x:int -> u:int{x <= u} -> int
let check x y = if x <= y then 1 else (assert False; 2)

val main : int -> int
let main i = app (check i) i
back to top