June 1, 2022
Proposition Logic # Proposition # 命题: 描述性语句,要么真,要么假
Conditional Statements # 条件语句
if p, then q, i.e. \(p \rightarrow q\)
推理规则 # 例如:
假设 p 为 true 时 p 能推出 q,那么 q 为 true
即: \((p\land(p \rightarrow q)) \rightarrow q\)
p
\(p \rightarrow q\) (条件语句)
\(\therefore q\)
Argument Form # 推理方式,论证方式
May 28, 2022
算法正确性证明 # 算法正确:对每一个正确输入,都能得到正确的解
证明步骤 # 证明程序终止时,能获得正确的解,(部分正确) 证明程序始终会终止 初始断言: 程序输入值具有的属性;结果断言: 程序输出值具有的属性
Hoare triple: p{S}q
if p true and S terminates, q true, then S is partially correct
May 28, 2022
整除 # \(a \ | \ b\): 即如果 \(a, b, c \in \mathbb{Z}, a \neq 0, \exists c(ac = b)\) ,则说明 a 能整除 b,a 为 b 的因子或除数;
反之,若 \(\nexists c\),则 \( a \nmid b\),即 a 不能整除 b
Division Algorithm # 假设 \(a \in \mathbb{Z}, d \in \mathbb{Z^+}\) , 存在唯一的 \( q, r \in \mathbb{Z} , 0 \leq r < d \), 使 \( a = dq + r\)
...