# 条件证明

条件证明是一种用于推导条件句的证明技术：要证明“如果A，则B”，就暂时假设A，从该假设连同既有前提推导出B，并得出结论A → B，同时解除该假设。该结论只被授权断言B从A及其他前提推出：以Γ表示其余前提，该推导确立的是Γ ⊢ A → B，因此每一个满足Γ的模型都满足A → B。<sup>[1](https://spot.colorado.edu/~forbesg/pdf_files/ModLogCh4.pdf)</sup> 在形式上，在假设A之下对B的推导，在其余未解除的假设下产生A → B；如果所有假设都被解除，该条件句即被直接证明。<sup>[2](https://builds.openlogicproject.org/content/first-order-logic/natural-deduction/natural-deduction.pdf)</sup> 在自然演绎中，该规则被称为条件证明或蕴涵引入（→I）；在公理系统中，同样的内容表现为演绎定理，它是一条元定理而非推理规则。<sup>[3](https://iep.utm.edu/natural-deduction/)</sup>

| 关键事实 | 细节 |
|---|---|
| 规则 | 如果通过假设φ能推导出ψ，则可以推出φ ⇒ ψ（蕴涵引入）。<sup>[4](http://intrologic.stanford.edu/chapters/chapter_05.html)</sup> |
| 相继式形式 | 对任意公式A、B和假设集X：X ⊢ A IMP B 当且仅当 X, A ⊢ B。<sup>[5](https://users.cecs.anu.edu.au/~jks/LogicNotes/implication.html)</sup> |
| 解除 | 解除一个假设是一种许可，而非要求；即使不存在匹配的假设，规则应用也是合法的。<sup>[2](https://builds.openlogicproject.org/content/first-order-logic/natural-deduction/natural-deduction.pdf)</sup> |
| 可靠性 | 如果φ可从未解除的假设Γ推导出，则Γ ⊨ φ；实现条件证明的菲奇系统对完整语言而言既可靠又完全。<sup>[2](https://builds.openlogicproject.org/content/first-order-logic/natural-deduction/natural-deduction.pdf)</sup><sup> • </sup><sup>[4](http://intrologic.stanford.edu/chapters/chapter_05.html)</sup> |
| 起源 | 该方法源于根岑与亚希科夫斯基（1934）的自然演绎演算；根岑著作的英译本后来于1964年发表在《美国哲学季刊》上。<sup>[6](https://logic-teaching.github.io/prop/texts/Gentzen%201969%20-%20Investigations%20into%20Logical%20Deduction.pdf)</sup> |
| 在证明助手中 | 在Lean中，`assume h: A, P`是A → B的一个证明，它解除假设h: A。<sup>[7](https://leanprover.github.io/logic_and_proof_lean3/propositional_logic_in_lean.html)</sup> |
| 主要失败模式 | 未能解除假设，或援引封闭子证明内部的一行，都会使证明无效。<sup>[8](http://philosophy.org.za/uploads_critical_reasoning/Critical_Reasoning_09.pdf)</sup> |

## 工作原理

该推理规则写作→I或⊃I，其形式为

\[ \frac{\Gamma, P \vdash Q}{\Gamma \vdash P \to Q} \; (\to\text{-intro}) \]

自下而上读：要从Γ证明P → Q，只需从Γ连同假设P证明Q。<sup>[9](https://sdiehl.github.io/zero-to-QED/13_proving.html)</sup> 在以行为单位的表述中，若q已在第k行被推出，且p作为假设或前提出现在第j行，则可在其后某一行推出p → q，标注为“j, k → I”。<sup>[1](https://spot.colorado.edu/~forbesg/pdf_files/ModLogCh4.pdf)</sup> 前件p必须是先前某一行实际假设的公式，而不能是从其他前提和假设推导出的公式。<sup>[1](https://spot.colorado.edu/~forbesg/pdf_files/ModLogCh4.pdf)</sup>

解除改变了某一行所依赖的东西。在从前提到结论的步骤中，假设A被从依赖集中移除，并成为该条件句的前件：结论A IMP B只依赖于其余假设X，而子证明的最后一行B则同时还依赖于A。<sup>[5](https://users.cecs.anu.edu.au/~jks/LogicNotes/implication.html)</sup> 开放逻辑项目指出，解除是一种许可而非要求：即使推导中不再有匹配的开放假设，→I的应用也是合法的。<sup>[2](https://builds.openlogicproject.org/content/first-order-logic/natural-deduction/natural-deduction.pdf)</sup>

该规则对应于演绎定理，这是一条重要的元定理，对于缺乏→I作为初始规则的逻辑公理化（希尔伯特式）表述必须加以证明。<sup>[3](https://iep.utm.edu/natural-deduction/)</sup>

## 如何操作

从一组前提对一个结论所作的条件证明，是一个可能嵌套的句子序列，终止于顶层的结论，其中每一步或是一个前提、一个假设，或是应用普通推理规则或条件推理规则的结果。<sup>[4](http://intrologic.stanford.edu/chapters/chapter_05.html)</sup> 操作程序如下：<sup>[10](https://sites.oxy.edu/traiger/logic/primer/chapter6/conditional-proof.html)</sup><sup> • </sup><sup>[11](https://phil240.tamu.edu/LectureNotes/8.4.pdf)</sup>

1. 以一个等于所求条件句前件的假设（条件证明假设，简称CPA）开启一个子证明。
2. 在子证明内部使用系统的普通规则推导出后件。
3. 调用CP（→I）关闭子证明，推出该条件句，并解除该假设。

一条标准启发式：如果你试图证明的语句是一个条件句，就使用CP。<sup>[11](https://phil240.tamu.edu/LectureNotes/8.4.pdf)</sup>

在Lean中，蕴涵引入既表现为项，也表现为策略。只要P证明B（可能使用假设h: A），表达式`assume h: A, P`就是A → B的一个证明。<sup>[7](https://leanprover.github.io/logic_and_proof_lean3/propositional_logic_in_lean.html)</sup> 在策略层面，给定目标P → Q，`intro hp`将hp: P加入上下文并把目标变为Q；相关的`assume e`语法引入一个所述类型的不具名假设。<sup>[12](https://docs.cs22.io/tactics)</sup>

## 起源

条件证明源于自然演绎演算，最初由根岑（1934）和亚希科夫斯基（1934）分别描述，后者是独立提出的；根岑的《逻辑演绎研究》于1934至1935年以德文发表，其英译本《对逻辑演绎的研究》后来于1964年发表在《美国哲学季刊》上。<sup>[6](https://logic-teaching.github.io/prop/texts/Gentzen%201969%20-%20Investigations%20into%20Logical%20Deduction.pdf)</sup> 根岑本人的叙述指出，他“首先打算建立一个尽可能接近实际推理的形式系统”，从而产生了一个“自然演绎演算”（直觉主义的NJ，经典谓词逻辑的NK）。<sup>[6](https://logic-teaching.github.io/prop/texts/Gentzen%201969%20-%20Investigations%20into%20Logical%20Deduction.pdf)</sup> 他的系统受到赫兹的影响。<sup>[3](https://iep.utm.edu/natural-deduction/)</sup> 其动机是为传统证明方法——条件证明、间接证明和分情况证明——提供辩护，这些方法全都基于暂时接受的假设，是对希尔伯特式公理系统人为性的反动，因为在那种系统中，此类操作需要演绎定理。<sup>[3](https://iep.utm.edu/natural-deduction/)</sup>

## 变体

**归谬法**被柯匹描述为条件证明的一个种类：假设所要证明之物的否定，并推导出不一致。<sup>[8](http://philosophy.org.za/uploads_critical_reasoning/Critical_Reasoning_09.pdf)</sup> 在亚希科夫斯基的表述中，归谬法规则从假设中删除一个否定号，这是他由直觉主义逻辑转向经典逻辑的方式；根岑则以NJ和NK两个演算实现了同样的区分。<sup>[13](https://plato.stanford.edu/entries/natural-deduction/)</sup><sup> • </sup><sup>[6](https://logic-teaching.github.io/prop/texts/Gentzen%201969%20-%20Investigations%20into%20Logical%20Deduction.pdf)</sup>

**分情况证明**从若干条件证明构造出一个条件句：要证明P ⟹ Q，先确定若干情况C₁, C₂, …, Cₘ，使其析取C₁ ∨ C₂ ∨ … ∨ Cₘ为真，然后分别给出每个蕴涵（P ∧ Cᵢ）⟹ Q的证明。<sup>[14](https://sites.ualberta.ca/~jsylvest/books/EF/section-proof-methods-cases.html)</sup>

**派生规则与条件重写**推广了这一模式：条件重写规则h: P → a = b只能在其前提P被证明之后使用，因此每次应用都嵌入了一个小小的条件证明。<sup>[15](https://github.com/leanprover/lean4/blob/8c9756b28d64dab099da31a4c09229a9e6a2ef35/src/Lean/Meta/Sym/Simp/Discharger.lean)</sup>

## 应用

除教科书逻辑之外，条件证明还嵌入在证明自动化之中。Lean 4的`Sym.simp`通过一个解除器处理条件重写规则：在应用h: P → a = b时，简化器必须首先证明前提P；默认解除器`dischargeSimpSelf`对边条件递归调用简化器，并带有`maxDischargeDepth`守卫和一个标记使用了局部假设的解除的`contextDependent`标志。<sup>[15](https://github.com/leanprover/lean4/blob/8c9756b28d64dab099da31a4c09229a9e6a2ef35/src/Lean/Meta/Sym/Simp/Discharger.lean)</sup> Isabelle/HOL的条件化简框架提供了若干方法（cs-concl-step、cs-prems-atom-step、cs-intro-step），它们通过引入消解来求解重写规则的边条件，产生由递归应用所解除的新目标。<sup>[16](https://isa-afp.org/browser_info/current/AFP/Conditional_Simplification/document.pdf)</sup>

在验证式推理中，将后置条件Q向后推过双分支条件语句，得到前置条件（B ⇒ P₁）∧（¬B ⇒ P₂），其中P₁和P₂是将Q向上推过两个分支的结果，这是由两个条件蕴涵构成的最弱前置条件计算。<sup>[17](https://www.cs.ucc.ie/~dgb/courses/toc/handout18.pdf)</sup> 条件证明还把未经证明的猜想联系起来，因此对一个猜想的证明会立即蕴涵其他猜想；一个著名的网络是复杂性理论中的NP完全类，其中一个问题的多项式时间解法将蕴涵所有问题的解法。<sup>[18](https://handwiki.org/wiki/Conditional_proof)</sup>

## 局限与替代方案

典型的失败模式是作用域违规。未能解除一个假设会使条件证明无效；一旦作用域线关闭，后续任何一行都不得以该假设或该封闭作用域内的任何一行来辩护（柯匹1979，第58页）。嵌套不当的子证明，即一个假设作用域的行跨越进另一个作用域，也会使证明不正确。<sup>[8](http://philosophy.org.za/uploads_critical_reasoning/Critical_Reasoning_09.pdf)</sup>

条件证明是处理条件句的若干策略之一。p → q的直接证明假设p，并使用推理规则、公理和先前已证的定理来表明q；逆否证明假设¬q并推导出¬p，利用P ⇒ Q与¬Q ⇒ ¬P的等价，这有时更容易；反证法证明其否定的不可满足性，即同时假设p和¬q并推导出矛盾。在许多证明中，必须把若干策略结合起来。<sup>[19](https://www.cs.utexas.edu/~isil/cs311h/lecture-proofs-6up.pdf)</sup><sup> • </sup><sup>[20](https://richardhammack.github.io/DiscreteWSP/Chapter10.pdf)</sup>

## References

1. [Natural Deduction in Sentential Logic (course text)](https://spot.colorado.edu/~forbesg/pdf_files/ModLogCh4.pdf)
2. [Natural Deduction (Open Logic Project, first-order logic)](https://builds.openlogicproject.org/content/first-order-logic/natural-deduction/natural-deduction.pdf)
3. [Natural Deduction | Internet Encyclopedia of Philosophy](https://iep.utm.edu/natural-deduction/)
4. [Introduction to Logic, Chapter 5 (Stanford)](http://intrologic.stanford.edu/chapters/chapter_05.html)
5. [Implication | Logic Notes (ANU)](https://users.cecs.anu.edu.au/~jks/LogicNotes/implication.html)
6. [The Collected Papers of Gerhard Gentzen, Investigations into Logical Deduction (1969 translation)](https://logic-teaching.github.io/prop/texts/Gentzen%201969%20-%20Investigations%20into%20Logical%20Deduction.pdf)
7. [Propositional Logic in Lean, Logic and Proof 3.18.4 documentation](https://leanprover.github.io/logic_and_proof_lean3/propositional_logic_in_lean.html)
8. [Critical Reasoning 09 - Conditional Proofs](http://philosophy.org.za/uploads_critical_reasoning/Critical_Reasoning_09.pdf)
9. [Proofs - From Zero to QED](https://sdiehl.github.io/zero-to-QED/13_proving.html)
10. [Conditional Proof (Occidental College logic primer, ch. 6)](https://sites.oxy.edu/traiger/logic/primer/chapter6/conditional-proof.html)
11. [Phil 240 Lecture Notes 8.4: Conditional Proof (Texas A&M)](https://phil240.tamu.edu/LectureNotes/8.4.pdf)
12. [Tactics | CS 22 Lean Reference](https://docs.cs22.io/tactics)
13. [Natural Deduction Systems in Logic (Stanford Encyclopedia of Philosophy)](https://plato.stanford.edu/entries/natural-deduction/)
14. [Reduction to cases (Sylvestre)](https://sites.ualberta.ca/~jsylvest/books/EF/section-proof-methods-cases.html)
15. [Lean 4 source: src/Lean/Meta/Sym/Simp/Discharger.lean](https://github.com/leanprover/lean4/blob/8c9756b28d64dab099da31a4c09229a9e6a2ef35/src/Lean/Meta/Sym/Simp/Discharger.lean)
16. [Conditional Simplification (CS), Archive of Formal Proofs reference manual](https://isa-afp.org/browser_info/current/AFP/Conditional_Simplification/document.pdf)
17. [Lecture 18 (UCC Theory of Computation handout)](https://www.cs.ucc.ie/~dgb/courses/toc/handout18.pdf)
18. [Conditional proof - HandWiki](https://handwiki.org/wiki/Conditional_proof)
19. [Mathematical Proof Techniques (UT Austin CS311H lecture, Isil Dillig)](https://www.cs.utexas.edu/~isil/cs311h/lecture-proofs-6up.pdf)
20. [Contrapositive Proof (Hammack, Book of Proof, ch. 10)](https://richardhammack.github.io/DiscreteWSP/Chapter10.pdf)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › Formal logic and foundations › Logical calculi and logical syntax › Proof theory › Sequent calculus and natural deduction

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/conditional-proof

English original: https://www.edgepedia.org/conditional-proof
