Step by step simplification in coq?

后端 未结 2 618
时光取名叫无心
时光取名叫无心 2020-12-16 02:28

Is there a way to simplify one step at a time?

Say you have f1 (f2 x) both of which can be simplified in turn via a single simpl, is it pos

2条回答
  •  隐瞒了意图╮
    2020-12-16 02:54

    We can turn simplification for pred off, simplify its argument and turn it back on:

    Theorem pred_length : forall n : nat, forall l : list nat,
      pred (length (n :: l)) = length l.
    Proof.
      intros.
      Arguments pred : simpl never.    (* do not unfold pred *)
      simpl.
      Arguments pred : simpl nomatch.  (* unfold if extra simplification is possible *)
      simpl.
      reflexivity.
    Qed.
    

    See §8.7.4 of the Reference Manual for more details.

提交回复
热议问题