实时读数Live readoutsNUM
- 有理算例 ↔ 经典对照Rational examples ↔ classical comparison
- #print axioms:八项算例 · 实数圆周桥 · 自定义公理#print axioms · eight checks · real circle bridge · custom axiom
- 原始 ↦ 规范 · gcd · 符号 · ‖p‖² · κ(p0, p)raw ↦ canonical · gcd · sign · ‖p‖² · κ(p0, p)
- Ad(p):(x, y, z) ↦Ad(p): (x, y, z) ↦
- 断言 · 整数步数conjunct · integer steps
- x₀ · (j₀, j₁, j₂)x₀ · (j₀, j₁, j₂)
- y · 2 + 2y + (3/2)y² · Sy · 2 + 2y + (3/2)y² · S
- N · cq 与 dp·4N+1 · (c/d)/4N+1N · cq vs dp·4N+1 · (c/d)/4N+1
- 任务 · 声明闭包 OmegaMath ↔ Real · 整数步数task · declarations OmegaMath ↔ Real · integer steps
依据Evidencetrureturing
LEAN ✓三元比较的单位四元数实现:设 C 是集合 M 上的三元比较(转移 tri,读数 κ),不交换(有 x、y、z 使 tri(x, y, z) ≠ tri(z, y, x))、链连通(对每个 ε > 0,任意两点由相邻读数都大于 1 − ε 的有限链相连)、读数可任意接近 0、特征秩为 5(κ 是某个映射 M → ℝ⁵ 的内积)且读取完备(相互读数趋于 1 的序列总有一点,序列与它的读数趋于 1)。则对每个 o ∈ M 存在双射 u : M ≃ 单位四元数,u(o) = 1,且对一切 x、y、z ∈ M,u(tri(x, y, z)) = u(x) u(y)⁻¹ u(z),κ(x, y) = (1 + ⟨u(x), u(y)⟩)/2:The unit-quaternion realization of a ternary comparison: let C be a ternary comparison on a set M (transfer tri, reading κ) that is noncommutative (tri(x, y, z) ≠ tri(z, y, x) for some x, y, z), chain connected (for every ε > 0 any two points are joined by a finite chain whose consecutive readings exceed 1 − ε), touches zero (readings come arbitrarily close to 0), has feature rank 5 (κ is the inner product of some map M → ℝ⁵) and is reading complete (a sequence whose mutual readings tend to 1 has a point with which its readings tend to 1). Then for every o ∈ M there is a bijection u : M ≃ unit quaternions with u(o) = 1 and, for all x, y, z ∈ M, u(tri(x, y, z)) = u(x) u(y)⁻¹ u(z) and κ(x, y) = (1 + ⟨u(x), u(y)⟩)/2: exists_unitQuaternion_equiv
LEAN ✓读数等于一减四分之一弦长平方:对一切单位四元数 a、b,模型的读数 κ(a, b) = (1 + ⟨a, b⟩)/2 满足 κ(a, b) = 1 − dist(a, b)²/4:The reading is one minus a quarter of the squared chord: for all unit quaternions a and b, the reading κ(a, b) = (1 + ⟨a, b⟩)/2 of the model satisfies κ(a, b) = 1 − dist(a, b)²/4: kappa_eq_one_sub_dist_sq
LEAN ✓定基流群分解:设 C 是 M 上的三元比较,o ∈ M;以 x · y = tri(x, o, y) 为乘法、o 为单位元、tri(o, x, o) 为 x 的逆,M 成为群。对一切 x、y、z ∈ M,tri(x, y, z) = x · y⁻¹ · z:The group at a base point: let C be a ternary comparison on M and o ∈ M; with the product x · y = tri(x, o, y), the identity o and the inverse tri(o, x, o) of x, M is a group. For all x, y, z ∈ M, tri(x, y, z) = x · y⁻¹ · z: tri_eq_mul_inv_mul
LEAN ✓射线核就是玻恩概率:κ(x, y) = (1 + ⟨x, y⟩)/2,rayKernel(x, y) = (2κ(x, y) − 1)² + (2κ(x, yi) − 1)²,旋量 ψ(a + bi + cj + dk) = (a + bI, −c + dI) ∈ ℂ²(I 是虚数单位)。对一切单位四元数 x、y:每个四元数 q 有 ψ(qi) = I ψ(q);ψ(x)ψ(x)† 的布洛赫向量依次是 x i x* 的 k、j、i 分量(x* 是共轭);rayKernel(x, y) = |ψ(x)†ψ(y)|²;rayKernel(x, y) = bornProbability(ψ(y)ψ(y)†, ψ(x)ψ(x)†),其中 bornProbability(ρ, P) = Tr(ρP):The ray kernel is the Born probability: κ(x, y) = (1 + ⟨x, y⟩)/2, rayKernel(x, y) = (2κ(x, y) − 1)² + (2κ(x, yi) − 1)², and the spinor is ψ(a + bi + cj + dk) = (a + bI, −c + dI) ∈ ℂ² (I the imaginary unit). For all unit quaternions x and y: ψ(qi) = I ψ(q) for every quaternion q; the Bloch vector of ψ(x)ψ(x)† consists of the k, j, i components of x i x*, in this order (x* the conjugate); rayKernel(x, y) = |ψ(x)†ψ(y)|²; and rayKernel(x, y) = bornProbability(ψ(y)ψ(y)†, ψ(x)ψ(x)†), where bornProbability(ρ, P) = Tr(ρP): rayKernel_eq_bornProbability_spinor
LEAN ✓四元数堆的切比雪夫递推:对每个四元数序列 x0, x1, x2, …,x0、x1 的模方为 1 且对一切 n ≥ 0 有 xn+2 = xn+1 xn* xn+1(x* 是共轭),当且仅当对一切 n ≥ 0,xn 的模方为 1、xn+1 = Un(c)·x1 − Un−1(c)·x0(n = 0 时约定 U−1 = 0)、⟨x0, xn⟩ = Tn(c),其中 c = ⟨x0, x1⟩,Tn、Un 是第一、二类切比雪夫多项式:The Chebyshev recursion of the quaternion heap: for every sequence x0, x1, x2, … of quaternions, x0 and x1 have squared norm 1 and xn+2 = xn+1 xn* xn+1 for every n ≥ 0 (x* the conjugate) if and only if, for every n ≥ 0, xn has squared norm 1, xn+1 = Un(c)·x1 − Un−1(c)·x0 (with U−1 = 0 at n = 0) and ⟨x0, xn⟩ = Tn(c), where c = ⟨x0, x1⟩ and Tn, Un are the Chebyshev polynomials of the first and second kinds: normSq_and_chebyshev
LEAN ✓拉格朗日—格拉姆恒等式:对任意类型 ι、有限集 s ⊂ ι 与 u、v : ι → ℝ,(Σi∈s ui²)(Σi∈s vi²) − (Σi∈s uivi)² = ½ Σi∈s Σj∈s (uivj − ujvi)²:The Lagrange–Gram identity: for every type ι, finite set s ⊂ ι and u, v : ι → ℝ, (Σi∈s ui²)(Σi∈s vi²) − (Σi∈s uivi)² = ½ Σi∈s Σj∈s (uivj − ujvi)²: lagrange_gram_identity
LEAN ✓舒尔补二次型是取得到的最小值:设 m、n 是有限指标集,A 是 m × m 复厄米矩阵,B 是 m × n 复矩阵,C 是 n × n 复正定矩阵,S = A − B C⁻¹ BH。则对每个 x ∈ ℂm,x*S x 是集合 {(x, y)* [A, B; BH, C] (x, y) : y ∈ ℂn} 的最小元(IsLeast:属于该集合,且不大于其中每个元):The Schur quadratic form is an attained minimum: let m and n be finite index sets, A an m × m complex Hermitian matrix, B an m × n complex matrix, C an n × n complex positive definite matrix and S = A − B C⁻¹ BH. Then for every x ∈ ℂm, x*S x is the least element of {(x, y)* [A, B; BH, C] (x, y) : y ∈ ℂn} (IsLeast: it belongs to the set and is at most every element of it): schur_quadratic_is_least
LEAN ✓保格拉姆置换唯一延拓成等距:设 E 是实内积空间,φ : ι → E 的像在 ℝ 上张成 E,σ 是 ι 的置换,且对一切 a、b 有 ⟨φ(σ a), φ(σ b)⟩ = ⟨φ a, φ b⟩。则存在唯一的线性等距同构 U : E ≃ E,使一切 a 满足 U(φ a) = φ(σ a):A Gram-preserving permutation extends to exactly one isometry: let E be a real inner product space, φ : ι → E a family whose range spans E over ℝ, and σ a permutation of ι with ⟨φ(σ a), φ(σ b)⟩ = ⟨φ a, φ b⟩ for all a, b. Then there is exactly one linear isometric equivalence U : E ≃ E with U(φ a) = φ(σ a) for all a: existsUnique_linearIsometryEquiv_of_gram_preserving
LEAN ✓六根整坐标轴的开覆盖:axis 依次为 (1, 2, 0)、(1, −2, 0)、(0, 1, 2)、(0, 1, −2)、(2, 0, 1)、(−2, 0, 1),colori = {x ∈ 实单位二球面 : 5 < 2⟨x, axisi⟩²}。每个 colori 是开集;同一个 colori 里任意两点的内积不等于 0;六个 colori 的并是整个球面:An open cover by six integer axes: the axes are (1, 2, 0), (1, −2, 0), (0, 1, 2), (0, 1, −2), (2, 0, 1), (−2, 0, 1) and colori = {x in the real unit two-sphere : 5 < 2⟨x, axisi⟩²}. Every colori is open; any two points of one colori have inner product ≠ 0; the union of the six colori is the whole sphere: rational_six_axis_open_cover
LEAN ✓既约分母:对自然数 s、r,若 0 < r,则有理数 reduced s r = s/r 的分母等于 r / gcd(s, r):The reduced denominator: for natural numbers s and r with 0 < r, the denominator of the rational number reduced s r = s/r is r / gcd(s, r): reduced_den
LEAN ✓连分数收敛子列表的长度:对每个有理数 x,有限收敛子列表 convergents x 的长度 ≤ 2 · Nat.log 2 (x 的分母) + 1,其中 Nat.log 2 是以 2 为底取下整的对数:The length of the list of convergents: for every rational x, the finite list convergents x has length ≤ 2 · Nat.log 2 (denominator of x) + 1, where Nat.log 2 is the logarithm to base 2 rounded down: convergents_length_log
LEAN ✓素因子剥离给出阶:设 G 是相等可判定的幺半群,x ∈ G,P 是自然数列表,0 < m,xm = 1,且 m 的每个素因子都在 P 里。则 M = stripFactors x P m 满足 0 < M、M ∣ m、xM = 1 且 M = orderOf x:Stripping prime factors gives the order: let G be a monoid with decidable equality, x ∈ G, P a list of natural numbers, 0 < m, xm = 1, and every prime factor of m in P. Then M = stripFactors x P m satisfies 0 < M, M ∣ m, xM = 1 and M = orderOf x: stripFactors_correct
LEAN ✓二进制名称比较的步数界:对一切布尔列表 a、b、output、frame,比较机 compareMachine 从标签 compare 起步(操作栈 a、b,两个备份栈空,输出栈 output,外框栈 frame),在至多 2(|a| + |b|) + 4 步内停机;停机时 a、b 复原,备份栈空,frame 不变,输出栈顶压入 decide (a = b):The step bound of binary name comparison: for all Boolean lists a, b, output and frame, the machine compareMachine started at the label compare (operand stacks a and b, both backup stacks empty, output stack output, frame stack frame) halts within at most 2(|a| + |b|) + 4 steps; at the halt a and b are restored, the backups are empty, frame is unchanged and decide (a = b) is pushed on the output stack: name_compare_run
LEAN ✓整数四分深度预算:rationalQuarterDepth c d p q = Nat.log 4 ((c · q) / (d · p)),内层是自然数除法。对自然数 c、d、p、q、N,若 0 < d、0 < p 且 rationalQuarterDepth c d p q ≤ N,则 c · q < (d · p) · 4N+1:The integer quarter-depth budget: rationalQuarterDepth c d p q = Nat.log 4 ((c · q) / (d · p)), the inner division in natural numbers. For natural numbers c, d, p, q, N with 0 < d, 0 < p and rationalQuarterDepth c d p q ≤ N, c · q < (d · p) · 4N+1: rationalQuarterDepth_integer_sound
LEAN ✓从整数到实数的误差界:对自然数 c、d、p、q、N,若 0 < d、0 < p、0 < q、rationalQuarterDepth c d p q ≤ N,且实数 C ≤ c/d,则 (1/4)N+1 · C < p/q:The error bound carried from integers to reals: for natural numbers c, d, p, q, N with 0 < d, 0 < p, 0 < q and rationalQuarterDepth c d p q ≤ N, and every real C ≤ c/d, (1/4)N+1 · C < p/q: rationalQuarterDepth_real_sound
ARGUED文献结果,未在本书形式化:归纳构造演算见 Coquand 与 Paulin-Mohring(1990),Lean 4 的内核与编译器见 de Moura 与 Ullrich(2021),Lean 的元理论与三条标准公理见 Carneiro(2019),可判定相等推出相等证明唯一见 Hedberg(1998),四平方恒等式见欧拉(1748),有理旋转的四元数参数见罗德里格斯(1840);独立内核 leanchecker、lean4lean、nanoda、con-leche 与比对工具 comparator 的审计口径见正文文献注。
手工推导:除以 gcd 再锁首个非零分量为正,在每条过原点的有理直线上恰选一个本原整四元组,所以 ProjTernion 的规范非零元与 ℚP³ ≅ SO(3, ℚ) 一一对应,不用商类型;κ = ⟨p, q⟩²/(‖p‖²‖q‖²) 与 Ad(p)v = p v p*/‖p‖²(* 是共轭)都只含模方,没有根号,Ad(p) ∈ SO(3, ℚ);‖a b* c‖² = ‖a‖²‖b‖²‖c‖² ≥ 1,所以三元合成不会落到零元组;由 u u* = ‖u‖² 与 ⟨x u* v, y u* v⟩² = ‖u‖⁴‖v‖⁴⟨x, y⟩²,示意接口 OmegaSpace 的六条等式在规范非零子类型 CanonProjTernion 上全称成立,在原始四元组上不成立(反例 (0, 0, 0, 0) 与 (2, 0, 0, 0));κ(p0, (b, a, 0, 0)) = 1/(1 + x²),x = a/b;在 ℚ[η]/(η³) 里 j₀ ≠ 0 的元可逆,1 + x₀² ≥ 1;2 + 2y + (3/2)y² = 4/3 + (3/2)(y + 2/3)²。Literature results, not formalized in this book: the calculus of inductive constructions, Coquand and Paulin-Mohring (1990); the Lean 4 kernel and compiler, de Moura and Ullrich (2021); the metatheory of Lean with its three standard axioms, Carneiro (2019); uniqueness of identity proofs from decidable equality, Hedberg (1998); the four-square identity, Euler (1748); the quaternion parameters of rational rotations, Rodrigues (1840); the audits by the independent kernels leanchecker, lean4lean, nanoda, con-leche and by comparator follow the literature note of the text.
Derived by hand: dividing by the gcd and making the first nonzero entry positive picks exactly one primitive integer quadruple on each rational line through the origin, so the canonical nonzero elements of ProjTernion correspond one to one to ℚP³ ≅ SO(3, ℚ), without a quotient type; κ = ⟨p, q⟩²/(‖p‖²‖q‖²) and Ad(p)v = p v p*/‖p‖² (* the conjugate) hold squared norms only, no root, and Ad(p) ∈ SO(3, ℚ); ‖a b* c‖² = ‖a‖²‖b‖²‖c‖² ≥ 1, so a triad never meets the zero tuple; by u u* = ‖u‖² and ⟨x u* v, y u* v⟩² = ‖u‖⁴‖v‖⁴⟨x, y⟩² the six equations of the illustrative OmegaSpace interface hold for all elements of the subtype CanonProjTernion and fail on raw tuples (counterexamples (0, 0, 0, 0) and (2, 0, 0, 0)); κ(p0, (b, a, 0, 0)) = 1/(1 + x²) with x = a/b; in ℚ[η]/(η³) the elements with j₀ ≠ 0 are invertible, and 1 + x₀² ≥ 1; 2 + 2y + (3/2)y² = 4/3 + (3/2)(y + 2/3)².
MODEL本书的读法与画法:三层架构、“证明即计算”、三条路线与三步路线图都是工程读法;五阶流水线把编译与审计画成五枚棱柱,次序是示意。声明闭包的对照每项任务只取一份证明,换一种证法个数会变。画法:球面上一点代表一条有理直线,高度是 w/‖p‖(它的平方就是 κ(p0, p)),方位角由轴 (x, y, z) 的轴测投影给出;北半球与半条赤道放规范代表,对径点是同一个射影点;射线上的整数点按倍数等距排在球外。外层壳、桥与椭球只示意两层的分工:椭球是 {2x² + 2xy + (3/2)y² = 当前值} 的截面加厚,比例照实。画图本身用了浮点的平方根,读数全部用整数与分数。页面的脚本照 §32.8 的清单重写一遍整数核,不是 Lean 内核;规范子类型上的六条律在页面上只在有限个元上核对。Readings and drawing conventions of this book: the three layers, proof as computation, the three routes and the three-step roadmap are engineering readings; the pipeline draws compiling and auditing as five prisms in an indicative order. The census of declarations takes one proof per task; another proof gives other counts. Drawing: a point of the ball stands for a rational line; its height is w/‖p‖ (the square of it is κ(p0, p)), its azimuth an axonometric projection of the axis (x, y, z); the northern half with half of the equator holds the canonical representatives, and antipodes are one projective point; the integer points of a ray stand outside the ball, evenly spaced by their multiple. The outer shell, the bridge and the ellipsoid only indicate the division of labour: the ellipsoid thickens the section {2x² + 2xy + (3/2)y² = present value}, to scale. The drawing itself uses floating-point roots; the readings use integers and fractions only. The script rewrites the integer core of the listing of §32.8; it is not the Lean kernel, and it checks the six laws on finitely many canonical elements only.
NUM——