数学归纳法、逻辑与良基关系
本文把代码省去了,为了更加简单准确
在算法中的应用见
https://www.cnblogs.com/qianxinn/p/15625052.html
数学归纳法
The simplest and most common form of mathematical induction infers that a statement involving a natural number n (that is, an integer n ≥ 0 or 1) holds for all values of n. The proof consists of two steps:
数学归纳法最简单和最常见的形式是推断包含自然数 n(即整数 n ≥ 0 或 1)的陈述对 n 的所有值都成立。证明包括两个步骤:
The initial or base case: prove that the statement holds for 0, or 1.
初始或基本情况:证明该陈述对 0 或 1 成立。
The induction step, inductive step, or step case: prove that for every n, if the statement holds for n, then it holds for n + 1. In other words, assume that the statement holds for some arbitrary natural number n, and prove that the statement holds for n + 1.
归纳步骤、归纳步骤或步骤案例:证明对于每个 n,如果该陈述对 n 成立,则它对 n + 1 成立。换句话说,假设该陈述对某个任意自然数 n 成立,并证明该陈述对 n + 1 成立。
The hypothesis in the inductive step, that the statement holds for a particular n, is called the induction hypothesis or inductive hypothesis. To prove the inductive step, one assumes the induction hypothesis for n and then uses this assumption to prove that the statement holds for n + 1.
归纳步骤中的假设,即该陈述对特定 n 成立,称为归纳假设或归纳假设。为了证明归纳步骤,我们假设 n 的归纳假设,然后使用这一假设来证明该陈述对 n + 1 成立。
Authors who prefer to define natural numbers to begin at 0 use that value in the base case; those who define natural numbers to begin at 1 use that value.
在基本情况下,喜欢将自然数定义为从 0 开始的人使用 0 值;那些将自然数定义为从 1 开始的人使用 1 值。
一阶逻辑和二阶逻辑
在逻辑和数学中,二阶逻辑是一阶逻辑的扩展,而一阶逻辑是命题逻辑的扩展。
First-order logic quantifies only variables that range over individuals (elements of the domain of discourse); second-order logic, in addition, also quantifies over relations. For example, the second-order sentence \({\displaystyle \forall P\,\forall x(Px\lor \neg Px)}\) says that for every formula \(P\) , and every individual \(x\), either \(Px\) is true or not(\(Px\)) is true (this is the law of excluded middle). Second-order logic also includes quantification over sets, functions, and other variables (see section below). Both first-order and second-order logic use the idea of a domain of discourse(论域) (often called simply the "domain" or the "universe"). The domain is a set over which individual elements may be quantified.
一阶逻辑量词仅适用于个体范围内的变量(论域的元素);而二阶逻辑也量化了关系。
First-order logic can quantify over individuals, but not over properties. That is, we can take an atomic sentence like Cube(b) and obtain a quantified sentence by replacing the name with a variable and attaching a quantifier:\(∃x Cube(x)\)。
一阶逻辑可以量化个体,但不能量化属性。也就是说,我们可以取一个像\(Cube(b)\)这样的原子语句,通过将名称替换为一个变量并附加一个量词来得到一个量化的句子:\(∃x Cube(x)\)。
但是我们不能对谓词做同样的事情。也就是说,下面的表达式:\(∃P P(b)\)不是一阶逻辑的句子。但这是一个合法的二阶逻辑语句。
数学归纳法形式化
数学归纳法一般无法形式化,所以算法常常不如数学严谨。
在数学中的二阶逻辑中,可以写出“归纳公理”如下:
\({\displaystyle \forall P{\Bigl (}P(0)\land \forall k{\bigl (}P(k)\to P(k+1){\bigr )}\to \forall n{\bigl (}P(n){\bigr )}{\Bigr )}}\)
其中 P(.) 是涉及一个自然数的谓词的变量,k 和 n 是自然数的变量。
换句话说,基本情况 P(0) 和归纳步骤(即归纳假设 P(k) 暗示 P(k + 1))一起暗示 P(n) 对于任何自然数 n。归纳公理断言从基本情况和归纳步骤推断 P(n) 对任何自然数 n 成立的有效性。
良基关系
In mathematics, a binary relation \(R\) is called well-founded (or wellfounded) on a class \(X\) if every non-empty subset \(S ⊆ X\) has a minimal element with respect to \(R\), that is, an element \(m\) not related by \(sRm\) (for instance, "\(s\) is not smaller than \(m\)") for any \(s ∈ S\). In other words, a relation is well founded if
\({\displaystyle (\forall S\subseteq X)\;[S\neq \emptyset \implies (\exists m\in S)(\forall s\in S)\lnot (sRm)].}\)
一般算法的核心都是算法中具有良基关系的那部分关系。
ChangeLog
- 12月1日 15:09 本文仍将不断更新。二阶逻辑,良基关系以及数学归纳法等地方仍有大量问题。

浙公网安备 33010602011771号