edgepedia

物质世界与数学 / 数学与统计学 / 逻辑与离散数学 / Formal logic and foundations / Logical calculi and logical syntax / Proof theory

综合 · Edgepedia阅读需 8 分钟

直接证明

阅读英文原文

直接证明通过假设命题的前提、经由一条明确的推理链推出结论来确立一个陈述,而不假设其否定或逆否命题。一个命题按其原本陈述的形式被证明的论证称为直接证明;间接证明则确立一个逻辑等价的形式,例如逆否命题,或由该陈述的否定导出荒谬。1形式上,一个命题的证明是一条从一组公理出发、以该命题为终点的逻辑推理链;直接证明则是一个陈述序列,其中每个陈述要么是给定条件,要么由先前的陈述推导而来,最后一个陈述就是结论。2 • 3

关键事实细节
定义性特征命题按其原本陈述的形式被证明,而非某种变形后的等价形式。1
三步图式假设 P P ;从 P P 逻辑地推出 Q Q ;陈述 Q Q 成立。2
核心推理规则肯定前件式,[(p⇒q)∧p]⇒q [(p \Rightarrow q) \wedge p] \Rightarrow q ,以及将蕴涵式首尾相接的三段论法则。4
全称陈述的模式选取一个适当类型的任意对象,然后证明它具有所需的性质。5
形式对应物自然演绎,由根岑(Gentzen)与雅希科夫斯基(Jaśkowski)于1934年各自独立发表,形式化了基于假设的直接推理。6
经典逻辑的告诫反证法(RAA)依赖于排中律,而并非所有逻辑学家都接受排中律;直接证明则不依赖它。7
在证明助手中Lean 4 的 rw、ring、apply、exact 等策略以小步推进、逐步反馈的方式构建直接证明。8

工作原理

对于条件命题 p⇒q p \Rightarrow q ,直接演绎证明的形式是:假设 p p ,建立 p⇒q1⇒q2⇒⋯⇒qn⇒q p \Rightarrow q_{1} \Rightarrow q_{2} \Rightarrow \cdots \Rightarrow q_{n} \Rightarrow q ,再由肯定前件式得出 q q ,并解除假设以获得 p⇒q p \Rightarrow q ;功夫在于构建这条链,而链上的环节往往借助假言三段论连接起来。7肯定前件式立足于重言式 [(p⇒q)∧p]⇒q [(p \Rightarrow q) \wedge p] \Rightarrow q ,三段论法则则从 p⇒q p \Rightarrow q 与 q⇒r q \Rightarrow r 过渡到 p⇒r p \Rightarrow r 。4合法的给定项是假设、先前已确立的定理和定义;合法的推理包括重言等价式、肯定前件式,以及从 ∀x P(x) \forall x\, P(x) 到 P(x0) P(x_{0}) 的例示。3这与间接图式形成对照:逆否法证明 ¬Q⇒¬P \neg Q \Rightarrow \neg P ;反证法假设 ¬P \neg P ,推出 false \mathrm{false} ,在经典逻辑中得出 P P ,而在直觉主义逻辑中同样的论证只能得到 ¬¬P \neg\neg P 。2

操作步骤

对于条件命题 P⇒Q P \Rightarrow Q ,典范结构是:假设步、待证步、推理,以及回顾待证步。5对于 ∀x [P(x)→Q(x)] \forall x\,[P(x) \rightarrow Q(x)] ,准备工作是选取 x x 、假设 P(x) P(x) ,并写出 Q(x) Q(x) 的含义。1任意地选取对象,正是使论证能够推广到所有选择的关键。9双条件命题通过两个独立的直接证明来证明,每个蕴涵方向各一个。5

例题都遵循同一模板:若 n n 为奇数,则 n2 n^{2} 为奇数;若 m=2j−1 m = 2j - 1 与 n=2k−1 n = 2k - 1 为奇数,则 m+n=2(j+k−1) m + n = 2(j + k - 1) 为偶数;以及只要 n n 不是3的倍数,n2−1 n^{2} - 1 就是3的倍数,其证明分 n=3q+1 n = 3q + 1 与 n=3q+2 n = 3q + 2 两种情形。4 • 3 • 4分情况证明立足于 (p1∨⋯∨pn)→q≡(p1→q)∧⋯∧(pn→q) (p_{1} \vee \cdots \vee p_{n}) \rightarrow q \equiv (p_{1} \rightarrow q) \wedge \cdots \wedge (p_{n} \rightarrow q) ,且各情形须穷尽前提。10全称断言需要对任意元素作一般性论证,不能靠一个取值来证明;存在性断言则由一个具体例子证明,反驳则通过 ¬∀x P(x)≡∃x ¬P(x) \neg \forall x\, P(x) \equiv \exists x\, \neg P(x) 与之对应。11

起源

《算术原理:一种新的阐述方法》(Arithmetices principia, nova methodo exposita)给出了逻辑推理的一种形式化,旨在形式地表示算术中的证明。根岑为其1934年的《逻辑推理研究》(Untersuchungen über das logische Schliessen)所陈述的动机是:弗雷格—罗素—希尔伯特式的演绎形式化与实际数学证明中所用的形式相去甚远;自然演绎演算(NJ 为直觉主义,NK 为经典)以及相继式演算 LJ 与 LK 由此引入。自然演绎系统是希尔伯特式公理系统的替代方案。雅希科夫斯基的系统使用条件证明与归谬法,且不需要任何公理,并回答了卢卡西维茨(Łukasiewicz)的问题,即如何把从假设证明到条件证明的步骤变为系统自身的一条规则;而《互联网哲学百科全书》与《斯坦福哲学百科全书》则将二人并列为独立的共同创始者。自然演绎的显著特征是带有临时假设的子证明。一个现代风格的自然演绎系统得以发表,而标准的菲奇(Fitch)图式来自后来的一种表述。12 • 13 • 6 • 14 • 15 • 14 • 16 • 14

变体

根岑的主定理(Hauptsatz)指出,对经典谓词逻辑与直觉主义谓词逻辑而言,每个纯逻辑证明都归约为一个确定的(尽管不唯一的)非迂回的正规形式;今天标准的名称是切消定理。根岑为直觉主义自然演绎证明了正规化,但未对经典情形证明;已发表的正规化证明出现于20世纪60年代。计算式风格把直接证明呈现为由等价关系或序关系连接的公式链;埃兹格·W·迪杰斯特拉(Edsger W. Dijkstra)与卡雷尔·S·斯霍尔滕(Carel S. Scholten)在《谓词演算与程序语义学》(Predicate Calculus and Program Semantics,1990)中描述了这一风格,在这种风格中,等价式通过连接两端的等价公式链来证明,而非分别证明每个蕴涵方向。罗兰·卡尔·巴克豪斯(Roland Carl Backhouse)、瓦尔特·古特曼(Walter Guttmann)与米夏埃尔·温特(Michael Winter)于2024年在《函数式编程杂志》(Journal of Functional Programming)上给出了计算式证明的一种目标导向的阐述。Isabelle/Isar 用 also 与 finally 两个语言要素实现计算式推理,应用混合的 = = /< < /≤ \leq 传递规则,使事实 x≤y x \leq y 与 y<z y < z 得出 x<z x < z 。在 Lean 4 中,rw 用恒等式重写目标,ring 从环公理证明交换环恒等式,apply 将一般蕴涵式的结论与目标匹配,exact 提供一个完整的证明项。13 • 6 • 17 • 18 • 19 • 20 • 8

应用

Lean 基于归纳构造演算,与 Agda、Rocq(原 Coq)和 Matita 同属依赖类型论证明助手。21直接风格的策略证明是这些工具日常使用的基本手段,其可靠性是机械可查的:在 AlphaProof 的环境中,策略产生的证明项不得使用 sorry 占位符且必须类型正确,最终验证检查其是否仅依赖 Lean 的三条内置公理。22由武卡什·查伊卡(Łukasz Czajka)与切扎里·卡利希克(Cezary Kaliszyk)于2018年发表于《自动推理杂志》(Journal of Automated Reasoning)的 CoqHammer,在配有8个CPU的系统上约40秒内证明了 Coq 标准库仿真中40.8%的定理。23这一领域的基准与证明器工作包括 MiniF2F(Zheng、Han 与 Polu,2021,arXiv)、ProofNet(Azerbayev 等,2023,arXiv)、PutnamBench(Tsoukalas 等,2024,arXiv)、Lean Workbook(Ying 等,2024,arXiv)、Draft, Sketch, and Prove(Jiang 等,2022,arXiv)、Seed-Prover 1.5(Chen 等,2025,arXiv)以及 ProofFlow(Cabral 等,2025,arXiv)。24 • 25 • 26 • 27 • 28 • 29 • 30

局限与替代方案

方法选择有一条标准的启发式:直接证明适合前提与结论都以肯定形式陈述、不含否定的条件命题;逆否证明适合两处否定;反证法适合结论被否定而前提未被否定的情形。31RAA 往往比逆否法更高效,因为它同时把 ¬q \neg q 与 p p 用作前提,而且它是证明逆命题或证明至多一个对象具有某性质的常用选择。7教科书的建议是:在直接证明或间接证明可行时避免使用反证法,因为此类证明不够直观,且往往可以改写。2有些结果难以直接处理:幂集定理通过对角线论证把反证法与分情况结合;费马大定理由安德鲁·怀尔斯(Andrew Wiles)于1993年6月宣布、1995年以公认形式发表,所用技巧超出了直接证明的范围。32 • 31

References

  1. A Guide to Proof-Writing (student study guide to Rosen, Discrete Mathematics and Its Applications, 6th ed.)
  2. Proofs (Discrete Structures reading, van Melkebeek, Hasti, Prakriya, UW–Madison)
  3. 2.1 Direct Proofs, An Introduction to Higher Mathematics (Whitman College, online textbook)
  4. 3.02: Direct Proofs (math.libretexts.org)
  5. CS103 Guide to Proofs (Stanford University)
  6. Natural Deduction | Internet Encyclopedia of Philosophy
  7. Methods of mathematics proof (UBC course handout)
  8. Mathematics in Lean
  9. Direct Proofs (Stanford CS103 lecture slides)
  10. 1.3. Proofs, Discrete Structures for Computing (Western University, A. Brandt)
  11. Examples of direct proof and disproof (UIUC CS173 lecture notes)
  12. The Development of Proof Theory (Stanford Encyclopedia of Philosophy)
  13. Investigations into Logical Deduction (Gentzen, English translation with foreword by Paul Bernays)
  14. A History of Natural Deduction and Elementary Logic Textbooks (Francis Jeffry Pelletier)
  15. Indirect proofs and proofs from assumptions (Wilfrid Hodges)
  16. Natural Deduction Systems in Logic (Stanford Encyclopedia of Philosophy)
  17. Edsger W. Dijkstra, Carel S. Scholten (1990). Predicate Calculus and Program Semantics. .
  18. Calculational proofs (Lifschitz)
  19. ROLAND CARL BACKHOUSE, WALTER GUTTMANN, MICHAEL WINTER (2024). An example of goal-directed, calculational proof. Journal of Functional Programming.
  20. Calculational reasoning in Isabelle/Isar (Isabelle documentation)
  21. The Hitchhiker's Guide to Logical Verification (2026 edition)
  22. Olympiad-level formal mathematical reasoning with reinforcement learning (AlphaProof)
  23. Łukasz Czajka, Cezary Kaliszyk (2018). Hammer for Coq: Automation for Dependent Type Theory. Journal of Automated Reasoning.
  24. Zheng, Kunhao, Han, Jesse Michael, Polu, Stanislas (2021). MiniF2F: a cross-system benchmark for formal Olympiad-level mathematics. arXiv (Cornell University).
  25. Azerbayev, Zhangir and colleagues (2023). ProofNet: Autoformalizing and Formally Proving Undergraduate-Level Mathematics. arXiv (Cornell University).
  26. Tsoukalas, George and colleagues (2024). PutnamBench: Evaluating Neural Theorem-Provers on the Putnam Mathematical Competition. arXiv (Cornell University).
  27. Ying, Huaiyuan and colleagues (2024). Lean Workbook: A large-scale Lean problem set formalized from natural language math problems. arXiv (Cornell University).
  28. Jiang, Albert Q. and colleagues (2022). Draft, Sketch, and Prove: Guiding Formal Theorem Provers with Informal Proofs. arXiv (Cornell University).
  29. Chen, Jiangjie and colleagues (2025). Seed-Prover 1.5: Mastering Undergraduate-Level Theorem Proving via Learning from Experience. arXiv (Cornell University).
  30. Cabral, Rafael and colleagues (2025). ProofFlow: A Dependency Graph Approach to Faithful Proof Autoformalization. arXiv (Cornell University).
  31. Review of Proof Methods (Sundstrom open textbook)
  32. Forms of proof (abstractmath.org)

Initially written Sep 29, 2026 · Edited: Oct 15, 2026

© 2026 Biostate AI。依据 Edgepedia Community License,注明出处即可免费使用。 嵌入参考卡片。

报告错误

直接证明

请至少选择一个原因。