- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 Ltac
中,依赖归纳对我来说似乎不同。并不是。
以下工作正常:
Require Import Coq.Program.Equality.
Goal forall (x:unit) (y:unit), x = y.
intros.
dependent induction x.
dependent induction y.
trivial.
Qed.
dependent induction
这里是矫枉过正,因为
destruct
工作得很好。此外,没有必要将事物命名为
destruct
如果
Ltac
在证明脚本中编辑用于帮助:
Ltac ok :=
match goal with
| [H : unit |- _] => destruct H
end.
Goal forall (x:unit) (y:unit), x = y.
intros.
ok.
ok.
trivial.
Qed.
Ltac
失败时
destruct
被
dependent induction
取代:
Ltac wat :=
match goal with
| [H : unit |- _] => dependent induction H
end.
Goal forall (x:unit) (y:unit), x = y.
intros.
wat.
(*
Error: No matching clauses for match goal
(use "Set Ltac Debug" for more info).
*)
Set Ltac Debug
除了
dependent induction
之外,没有提供其他有用的信息事实上,在
x
上都尝试过和
y
.
dependent induction
在另一个
Ltac
没有匹配,并将其应用于与我实际想要进行归纳的术语相同的术语,一切都会顺利进行:
Ltac go H := let z := fresh in remember H as z; dependent induction z; subst H.
Ltac why :=
match goal with
| [H : unit |- _] => go H
end.
Goal forall (x:unit) (y:unit), x = y.
intros.
why.
why.
trivial.
Qed.
dependent induction
看起来如此依赖上下文?
最佳答案
这确实是一个错误,已于 2015 年 3 月修复。
关于Coq:Ltac 内部的 "dependent induction",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26563666/
Coq 的 Finite_sets 库有一个归纳类型,指定一些系综是有限的: Inductive Finite : Ensemble U -> Prop := | Empty_is_finite :
对自然数的“强”(或“完全”)归纳意味着在证明对 n 的归纳步骤时,您可以假设该性质对任何 k 成立 Theorem strong_induction: forall P : nat -> Prop,
在 Ltac 中,依赖归纳对我来说似乎不同。并不是。 以下工作正常: Require Import Coq.Program.Equality. Goal forall (x:unit) (y:unit
假设我有这样的东西: Inductive SubtypeOf : Gamma -> UnsafeType -> Type -> Set := | SubRefl : forall (gam
我在这个我一直在尝试的证明中使用了函数归纳。据我了解,它本质上允许人们“同时”对递归函数的所有参数执行归纳。 The tactics page指出: The tactic functional ind
我刚刚看到有人用一种不熟悉的语法在 Coq 中定义了 Inductive 类型,如下所示: Inductive nat_tree : Type := | NatLeaf | NatNode of co
我目前正在观看关于算法的 ocw 视频类(class),在第二堂课中我停留在教授通过归纳法证明以下陈述的地方:- n=O(1) proof:- For base case 1=O(1)
我正在尝试使用 Induction连接到我的本地 SQLite 数据库但是我不知道如何建立连接。在以前的 SQLite 客户端中,我只是打开了数据库文件。 我应该将哪些属性放入这些字段?我的数据库只是
我有以下感应式MyVec : import Data.Vect data MyVec: {k: Nat} -> Vect k Nat -> Type where Nil: MyVec [] (
使用归纳法时,我想有假设n = 0和 n = S n'分开案件。 Section x. Variable P : nat -> Prop. Axiom P0: P 0. Axiom PSn
换句话来说:如果我们分别删除归纳和共归纳数据类型使用的终止检查和防护条件,那么归纳/共归纳和修复/cofix之间是否不再有根本区别? 我所说的“根本差异”是指 Coq 核心演算的差异,而不是语法和证明
我正在阅读 CLRS 书籍以了解使用替换方法解决递归问题并找到以下示例: Recurrence, T(n) = 2T(n/2) + n Guess Solution, T(n) = O(n
我正在按照 Rails 教程使用 postgreSQL 设置数据库,因此开发和生产在本地以及部署在 Heroku 上的位置是相同的。到目前为止,一切都很好。我已经设置了用户模型,并且在本地和部署到 h
我是一名优秀的程序员,十分优秀!