有没有类似于策略simpl
用于程序不动点的东西?
特别地,如何证明以下平凡语句?
Program Fixpoint bla (n:nat) {measure n} :=
match n with
| 0 => 0
| S n' => S (bla n')
end.
Lemma obvious: forall n, bla n = n.
induction n. reflexivity.
(* I'm stuck here. For a normal fixpoint, I could for instance use
simpl. rewrite IHn. reflexivity. But here, I couldn't find a tactic
transforming bla (S n) to S (bla n).*)
显然,这个玩具示例不需要“程序不动点”,但在更复杂的情况下,我需要手动证明“程序不动点”的终止性。请注意,html标签已保留,无需解释。
bla
声明等式引理:forall n, bla n = match n with | 0 => 0 | S n' => S (bla n') end.
- eponier