Questions tagged «proof-techniques»

有关证明多个定理的一般方法和技术的问题。当询问单个陈述的证据时,请使用与该证据有关的标签。

2
融合证明,可实现简单的重写系统
假设我们有一种简单的语言,其中包含以下术语: truetrue\mathtt{true} falsefalse\mathtt{false} 如果t1,t2,t3t1,t2,t3t_1,t_2,t_3是项,则ift1thent2elset3ift1thent2elset3\mathtt{if}\: t_1 \:\mathtt{then}\: t_2 \:\mathtt{else}\: t_3 现在假设以下逻辑评估规则: iftruethent2elset3→t2[E-IfTrue]iffalsethent2elset3→t3[E-IfFalse]t1→t′1ift1thent2elset3→ift′1thent2elset3[E-If]iftruethent2elset3→t2[E-IfTrue]iffalsethent2elset3→t3[E-IfFalse]t1→t1′ift1thent2elset3→ift1′thent2elset3[E-If] \begin{gather*} \dfrac{} {\mathtt{if}\: \mathtt{true} \:\mathtt{then}\: t_2 \:\mathtt{else}\: t_3 \to t_2} \text{[E-IfTrue]} \quad \dfrac{} {\mathtt{if}\: \mathtt{false} \:\mathtt{then}\: t_2 \:\mathtt{else}\: t_3 \to t_3} \text{[E-IfFalse]} \\ \dfrac{t_1 \to t_1'} {\mathtt{if}\: t_1 \:\mathtt{then}\: t_2 \:\mathtt{else}\: t_3 \to \mathtt{if}\: t_1' \:\mathtt{then}\: t_2 \:\mathtt{else}\: t_3} …

1
推断优化类型
在工作中,我的任务是推断一些有关动态语言的类型信息。我将语句序列重写为嵌套let表达式,如下所示: return x; Z => x var x; Z => let x = undefined in Z x = y; Z => let x = y in Z if x then T else F; Z => if x then { T; Z } else { F; Z } 由于我从一般类型信息开始,并试图推断出更具体的类型,因此自然的选择是精简类型。例如,条件运算符返回其真假分支类型的并集。在简单的情况下,它效果很好。 但是,在尝试推断以下类型时遇到了障碍: function …
11 programming-languages  logic  type-theory  type-inference  machine-learning  data-mining  clustering  order-theory  reference-request  information-theory  entropy  algorithms  algorithm-analysis  space-complexity  lower-bounds  formal-languages  computability  formal-grammars  context-free  parsing  complexity-theory  time-complexity  terminology  turing-machines  nondeterminism  programming-languages  semantics  operational-semantics  complexity-theory  time-complexity  complexity-theory  reference-request  turing-machines  machine-models  simulation  graphs  probability-theory  data-structures  terminology  distributed-systems  hash-tables  history  terminology  programming-languages  meta-programming  terminology  formal-grammars  compilers  algorithms  search-algorithms  formal-languages  regular-languages  complexity-theory  satisfiability  sat-solvers  factoring  algorithms  randomized-algorithms  streaming-algorithm  in-place  algorithms  numerical-analysis  regular-languages  automata  finite-automata  regular-expressions  algorithms  data-structures  efficiency  coding-theory  algorithms  graph-theory  reference-request  education  books  formal-languages  context-free  proof-techniques  algorithms  graph-theory  greedy-algorithms  matroids  complexity-theory  graph-theory  np-complete  intuition  complexity-theory  np-complete  traveling-salesman  algorithms  graphs  probabilistic-algorithms  weighted-graphs  data-structures  time-complexity  priority-queues  computability  turing-machines  automata  pushdown-automata  algorithms  graphs  binary-trees  algorithms  algorithm-analysis  spanning-trees  terminology  asymptotics  landau-notation  algorithms  graph-theory  network-flow  terminology  computability  undecidability  rice-theorem  algorithms  data-structures  computational-geometry 

2
大师定理不适用?
给定以下递归方程 我们要应用主定理并注意T(n)=2T(n2)+nlognT(n)=2T(n2)+nlog⁡n T(n) = 2T\left(\frac{n}{2}\right)+n\log n nlog2(2)=n.nlog2⁡(2)=n. n^{\log_2(2)} = n. 现在我们检查的前两种情况,即是否ε>0ε>0\varepsilon > 0 或nlogn∈O(n1−ε)nlog⁡n∈O(n1−ε)n\log n \in O(n^{1-\varepsilon}) 。nlogn∈Θ(n)nlog⁡n∈Θ(n)n\log n \in \Theta(n) 这两种情况都不令人满意。因此,我们必须检查第三种情况,即是否 。nlogn∈Ω(n1+ε)nlog⁡n∈Ω(n1+ε)n\log n \in \Omega(n^{1+\varepsilon}) 我认为第三个条件也不满足。但为什么?对于为什么不能在这种情况下应用Master定理,有什么好的解释?

2
在Hoare风格的正确性证明中如何处理数组
在围绕该问题的讨论中,Gilles正确地提到,使用数组的算法的任何正确性证明都必须证明没有越界的数组访问;根据运行时模型,这将导致运行时错误或访问非数组元素。 一种执行这种正确性证明的通用技术(至少在本科生中,可能在自动验证中)是使用Hoare逻辑。我不知道标准规则集包含与数组有关的任何内容;他们似乎仅限于单子变量。 我可以想象添加以下形式的公理 {0≤i<A.length∧P[A[i]/E]} A[i]:=E; {P}{0≤i<A.length∧P[A[i]/E]} A[i]:=E; {P}\qquad \displaystyle \frac{}{\{0 \leq i \lt A.\mathrm{length} \land {P[A[i]/E]} \}\ A[i] := E;\ \{P\}} 但是,我不清楚您将如何处理右侧的数组访问,即在某些语句x:= E中它是否是复杂表达式EEE的一部分。x:=Ex:=Ex := E 如何在Hoare逻辑中对数组访问进行建模,以便可以并且必须证明无效访问的存在以确保程序的正确性? 答案可能假设我们不允许数组元素比其他语句中使用或一些的一部分在,因为这不限制表现; 我们总是可以为临时变量分配所需的值,即写而不是。A[i]:=EA[i]:=EA[i] := EEEEx:=Ex:=Ex := Et:=A[i]; if(t>0)…t:=A[i]; if(t>0)…t := A[i];\ \mathtt{if} ( t > 0 ) \dotsif(A[i]>0)…if(A[i]>0)…\mathtt{if} ( A[i] > 0 )\dots

1
确定性上下文无关语言的激进困境?
常规语言的抽动引理可以用来证明某些语言不是规则的,无上下文语言的抽动引理(连同奥格登的引理)可以用来证明某些语言不是上下文的。 确定性上下文无关语言是否存在激进的困境?也就是说,是否存在类似于泵激引理的引理,可以用来表明语言不是DCFL?我很好奇,因为我所知道的几乎所有证明语言不是DCFL的证明技术都非常复杂,我希望有一种更简单的技术。

2
我们可以通过显示没有验证者来证明它不是一种可计算的枚举吗?
可计算枚举(ce,等同于递归枚举,等同于半判定)集合的定义之一如下: A⊆Σ∗A⊆Σ∗A \subseteq \Sigma^*为Ce当且仅当有一个可判定语言V⊆Σ∗V⊆Σ∗V\subseteq \Sigma^*(被称为校验)ST所有x∈Σ∗x∈Σ∗x\in \Sigma^*, x∈Ax∈Ax\in A当且仅当存在一个y∈Σ∗y∈Σ∗y\in\Sigma^* ST⟨x,y⟩∈V⟨x,y⟩∈V\langle x, y \rangle \in V。 所以一个方式来表明一个语言不是CE是表明,没有可判定验证VVV吧。该方法是否有用以表明实践中不使用语言?

4
证明功能代码正确的常见形式化技术有哪些?
我想为我作为论文一部分编写的Haskell程序的某些部分提供证明。但是到目前为止,我找不到很好的参考书。 格雷厄姆·赫顿(Graham Hutton)的入门书籍《编程在Haskell中编程》(《Google图书》)(我在学习Haskell时就读了)涉及一些推理程序的技巧,例如 方程式推理 使用非重叠模式 列表归纳 在第13章中,但不是很深入。 您是否可以推荐任何书籍或文章,以更详细地概述Haskell或其他功能代码的形式证明技术?


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.