coq tactics 总结

8.3.8   assert ( ident : form )

  1. 引入一个新的假设,便于证明原来的goal。要求先证明刚刚引入的goal
  2. This tactic applies to any goal. assert (H : U) adds a new hypothesis of name H asserting U to the current goal and opens a new subgoal U3. The subgoal U comes first in the list of subgoals remaining to prove.

 

8.9.3   discriminate ident

1.    Let ident be a hypothesis of type term1 = term2,其中termi是通过Inductive定义的,且term1 term2Inductive定义时是匹配不同的分支来构成的,则ident显然是不成立的。

2.       This tactic proves any goal from an absurd hypothesis stating that two structurally different terms of an inductive set are equal. For example, from the hypothesis (S (S O))=(S O) we can derive by absurdity any proposition. Let ident be a hypothesis of type term1 = term 2 in the local context, term1 and term2 being elements of an inductive set. To build the proof, the tactic traverses the normal forms4 of term1 and term2 looking for a couple of subterms u and w (u subterm of the normal form of term1 and w subterm of the normal form of term2), placed at the same positions and whose head symbols are two different constructors. If such a couple of subterms exists, then the proof of the current goal is completed, otherwise the tactic fails.

8.9.4   injection ident

Let  ident: term1=term2. 是一个假设,injection ident把等式两边项中的子项抽取出,如subt1=subt2。转换当前的goal: subt1=subt2->goal.

8.7.2   destruct term

  1. goalfalse时,应用destruct (H1 H2).可以证明该goal。其中H1H2是两个矛盾的假设。
  2. destruct H。其中H: {x=y}+{x<>y}. 应用该策略会把+展开,对应的生成两个新的假设x=y, x<>y,相同的goal
  3. 展开。

 

8.4.1   absurd term

This tactic applies to any goal. The argument term is any proposition P of type Prop. This tactic applies False elimination, that is it deduces the current goal from False, and generates as subgoals ~P and P. It is very useful in proofs by cases, where some cases are impossible. In most cases, P or ~P is one of the hypotheses of the local context.

8.4.2   contradiction

This tactic applies to any goal. The contradiction tactic attempts to find in the current context (after all intros) one which is equivalent to False. It permits to prune irrelevant cases. This tactic is a macro for the tactics sequence intros; elimtype False; assumption.

 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值