【发布时间】:2020-02-28 06:15:40
【问题描述】:
我有以下代码: 这是 sorted 的定义:
Fixpoint sorted (l : list nat) :=
match l with
| [] => true
| x::xs => match xs with
| [] => true
| y :: ys => (x <=? y) && (sorted xs)
end
end.
这是插入的定义:
Fixpoint insert (x : nat) (l : list nat) :=
match l with
| [] => [x]
| y::ys => if x <=? y then x :: l
else y :: insert x ys
end.
insert_spec 的定义如下:
Definition insert_spec (x : nat) (l : list nat) :=
sorted l ==> sorted (insert x l).
在 insert_spec 中,“==>”是什么意思?
【问题讨论】:
-
这不是标准符号。知道您从哪里获得此代码会有所帮助。
标签: coq