-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathatom.xml
More file actions
376 lines (376 loc) · 34.1 KB
/
Copy pathatom.xml
File metadata and controls
376 lines (376 loc) · 34.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<author>
<name>magicliang</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<id>https://magicliang.github.io/</id>
<link href="https://magicliang.github.io/" rel="alternate"/>
<link href="https://magicliang.github.io/atom.xml" rel="self"/>
<rights>All rights reserved 2026, magicliang</rights>
<subtitle>一切都是守株待兔,如切如磋,如琢如磨。I am just joking.</subtitle>
<title>守株阁</title>
<updated>2026-08-13T11:29:53.758Z</updated>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="AI" scheme="https://magicliang.github.io/categories/AI/"/>
<category term="Agentic Coding" scheme="https://magicliang.github.io/tags/Agentic-Coding/"/>
<category term="Claude Code" scheme="https://magicliang.github.io/tags/Claude-Code/"/>
<category term="AI Agent" scheme="https://magicliang.github.io/tags/AI-Agent/"/>
<category term="OpenCode" scheme="https://magicliang.github.io/tags/OpenCode/"/>
<category term="oh-my-claudecode" scheme="https://magicliang.github.io/tags/oh-my-claudecode/"/>
<category term="oh-my-openagent" scheme="https://magicliang.github.io/tags/oh-my-openagent/"/>
<category term="多 Agent 编排" scheme="https://magicliang.github.io/tags/%E5%A4%9A-Agent-%E7%BC%96%E6%8E%92/"/>
<category term="开发工具shift+tab" scheme="https://magicliang.github.io/tags/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7shift-tab/"/>
<id>https://magicliang.github.io/2026/08/13/oh-my-claudecode-vs-oh-my-openagent-%E6%B7%B1%E5%BA%A6%E5%AF%B9%E6%AF%94%E4%B8%8E%E5%AE%9E%E7%94%A8%E6%95%99%E7%A8%8B/</id>
<link href="https://magicliang.github.io/2026/08/13/oh-my-claudecode-vs-oh-my-openagent-%E6%B7%B1%E5%BA%A6%E5%AF%B9%E6%AF%94%E4%B8%8E%E5%AE%9E%E7%94%A8%E6%95%99%E7%A8%8B/"/>
<published>2026-08-13T12:00:00.000Z</published>
<summary>
<![CDATA[<p>2026 年的 AI 编程工具生态中,单模型 CLI 已不再是终点。围绕 Claude Code 和 OpenCode 两大基座平台,不仅各自拥有原生的多 Agent 并行能力,还分别涌现出 <strong>oh-my-claudecode(OMC)</strong> 和 <strong>oh-my-openagent(OmO)</strong> 两个编排插件。</p>
<p>本文的 OmO 部分以 2026 年 8 月 13 日能够核验的稳定版 <code>v4.19.4</code> 为基线。GitHub 同期已经出现 <code>v5.0.0-beta.7</code>,但它仍是预发布版,不能拿来替代稳定版说明。</p>
<p>项目在 <code>v3.11.0</code> 更名为 oh-my-openagent,仓库也迁到了 <code>code-yeongyu/oh-my-openagent</code>。命名迁移尚未把所有历史痕迹抹平:<code>v4.19.4</code> 的 <code>package.json</code> 仍以 <code>oh-my-opencode</code> 发布,同时提供 <code>oh-my-openagent</code>、<code>omo</code> 等命令别名。文章统一用新品牌名 OmO;安装与诊断命令使用新别名,涉及包元数据时保留旧包名,避免把兼容期写成已经彻底结束。</p>
<p><img src="agent-orchestration-cover.svg" alt="OMC 与 OmO 的 Agent 编排生态总览"></p>]]>
</summary>
<title>oh-my-claudecode vs oh-my-openagent:两大 Agent 编排框架深度对比与实用教程</title>
<updated>2026-08-13T11:29:53.758Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-03-Universe-%E4%B8%8E%E7%B1%BB%E5%9E%8B%E5%B1%82%E7%BA%A7%E5%AE%9E%E6%88%98/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-03-Universe-%E4%B8%8E%E7%B1%BB%E5%9E%8B%E5%B1%82%E7%BA%A7%E5%AE%9E%E6%88%98/"/>
<published>2026-08-09T03:20:00.000Z</published>
<summary>
<![CDATA[<p>Lean 4 的类型系统里有一个经常被初学者忽视的维度:每个类型本身也有类型,类型的类型称为 universe(宇宙)。忽视这一维度,往往导致一类难以直觉理解的报错——类型不匹配、universe 不一致、无法做大消除。本篇聚焦 universe 层级的实际操作,包括 <code>Prop</code> 与 <code>Type u</code> 的区别、universe 多态定义、以及常见 universe 错误的诊断方法。</p>
<p>前置阅读:本系列 <a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-01-Lake-%E9%A1%B9%E7%9B%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E4%BE%9D%E8%B5%96%E7%AE%A1%E7%90%86/">01 Lake 项目结构与依赖管理</a> 和 <a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-02-Term-mode-%E4%B8%8E-Tactic-mode-%E7%9A%84%E5%88%87%E6%8D%A2%E5%BF%83%E6%B3%95/">02 Term-mode 与 Tactic-mode 的切换心法</a>;形式化方法系列 <a href="../2026-05-26-%E5%87%86%E5%A4%87-Lean-4-%E5%AE%9E%E9%AA%8C%E7%8E%AF%E5%A2%83/">准备 Lean 4 实验环境</a>。</p>]]>
</summary>
<title>深入 Lean 03:Universe 与类型层级实战</title>
<updated>2026-08-13T11:29:53.755Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-18-Lean-4-%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B%E6%80%BB%E7%BB%93%E4%B8%8E%E8%B7%AF%E7%BA%BF%E5%9B%BE/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-18-Lean-4-%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B%E6%80%BB%E7%BB%93%E4%B8%8E%E8%B7%AF%E7%BA%BF%E5%9B%BE/"/>
<published>2026-08-09T03:18:00.000Z</published>
<summary>
<![CDATA[<p>本篇回顾系列的整体脉络,指出从当前知识基线出发的进阶路线,并以一个综合验证项目作为收束。</p>
<h2 id="系列脉络回顾">系列脉络回顾</h2>
<p>第 01-03 篇建立工具链基础:Lake 项目结构与依赖管理(01)、term-mode 与]]>
</summary>
<title>深入 Lean 18:Lean 4 证明工程总结与路线图</title>
<updated>2026-08-13T11:29:53.758Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-17-%E5%8F%AF%E6%89%A7%E8%A1%8C%E4%BB%A3%E7%A0%81%E4%B8%8E-FFI/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-17-%E5%8F%AF%E6%89%A7%E8%A1%8C%E4%BB%A3%E7%A0%81%E4%B8%8E-FFI/"/>
<published>2026-08-09T03:17:00.000Z</published>
<summary>
<![CDATA[<p>Lean 4 同时承担定理证明器与通用程序设计语言两种角色。前十六篇聚焦逻辑与证明工程;本篇转向可执行端:从 <code>#eval</code> 求值,到 <code>lake build</code> 编译本地二进制,再到通过 FFI 调用 C/Rust 代码,最后讨论影响运行期性能的属性与编译选项。</p>]]>
</summary>
<title>深入 Lean 17:可执行代码与 FFI</title>
<updated>2026-08-13T11:29:53.758Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-16-%E7%94%A8-Aesop-%E5%86%99%E5%A3%B0%E6%98%8E%E5%BC%8F%E8%87%AA%E5%8A%A8%E5%8C%96/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-16-%E7%94%A8-Aesop-%E5%86%99%E5%A3%B0%E6%98%8E%E5%BC%8F%E8%87%AA%E5%8A%A8%E5%8C%96/"/>
<published>2026-08-09T03:16:00.000Z</published>
<summary>
<![CDATA[<p>手动证明每一步的好处是透明可控,坏处是重复劳动积累。Aesop(Automated Extensible Search for Obvious Proofs)是 Lean 4 / Mathlib4 的声明式自动化框架:用户注册规则集,Aesop]]>
</summary>
<title>深入 Lean 16:用 Aesop 写声明式自动化</title>
<updated>2026-08-13T11:29:53.757Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-15-%E7%BC%96%E5%86%99-elaborator-%E4%B8%8E-command/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-15-%E7%BC%96%E5%86%99-elaborator-%E4%B8%8E-command/"/>
<published>2026-08-09T03:15:00.000Z</published>
<summary>
<![CDATA[<p>第 14 篇展示了 tactic 如何操作 <code>MVarId</code> 和 <code>Expr</code>。本篇向上走一层:<code>elab</code> 不仅能定义 tactic,还能定义 term elaborator 和顶层]]>
</summary>
<title>深入 Lean 15:编写 elaborator 与 command</title>
<updated>2026-08-13T11:29:53.757Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-14-%E5%85%83%E7%BC%96%E7%A8%8B%E6%A8%A1%E5%9E%8B/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-14-%E5%85%83%E7%BC%96%E7%A8%8B%E6%A8%A1%E5%9E%8B/"/>
<published>2026-08-09T03:14:00.000Z</published>
<summary>
<![CDATA[<p>Lean 4 的 tactic 不是黑盒——每个 tactic 本质上是一段操作证明状态的程序。本篇拆解这套元编程基础设施:<code>Expr</code> 是表达式的内存表示,<code>MVarId</code>]]>
</summary>
<title>深入 Lean 14:元编程模型:Expr/MVarId/MetaM</title>
<updated>2026-08-13T11:29:53.757Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-13-%E6%9C%89%E9%99%90%E7%BB%84%E5%90%88%E4%B8%8E%E6%95%B0%E8%AE%BA%E7%89%87%E6%AE%B5/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-13-%E6%9C%89%E9%99%90%E7%BB%84%E5%90%88%E4%B8%8E%E6%95%B0%E8%AE%BA%E7%89%87%E6%AE%B5/"/>
<published>2026-08-09T03:13:00.000Z</published>
<summary>
<![CDATA[<p>Mathlib4 提供了一套完整的有限集合与大算子(BigOperators)机制,使得组合数学和初等数论的形式化证明可以在接近数学原文的符号层面进行。<code>Finset</code> 表示有限集合,<code>Fintype</code> 约束类型的有限性,<code>BigOperators</code> 引入求和与连乘的紧凑记号,<code>Nat.Prime</code> 与 <code>Nat.factors</code> 覆盖自然数素数理论的基本引理。本篇在此基础上,进一步介绍 <code>decide</code> tactic 在有限域穷举中的作用,以及 <code>Decidable</code> 类型类的内部逻辑。</p>
<p>前置阅读:<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-02-Term-mode-%E4%B8%8E-Tactic-mode-%E5%88%87%E6%8D%A2%E5%BF%83%E6%B3%95/">02 Term-mode 与 Tactic-mode 切换心法</a>(tactic 基础);<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-04-%E6%A0%B8%E5%BF%83-tactic-%E7%B2%BE%E8%AE%B2/">04 核心 tactic 精讲</a>(<code>rfl</code>、<code>ring</code>、<code>omega</code> 等基础 tactic);<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-05-simp-%E4%B8%8E-norm_num/">05 simp 与 norm_num</a>(自动化 tactic)。</p>]]>
</summary>
<title>深入 Lean 13:有限组合与数论片段</title>
<updated>2026-08-13T11:29:53.757Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-12-%E6%8B%93%E6%89%91%E4%B8%8E%E5%88%86%E6%9E%90%E5%9F%BA%E7%A1%80%E7%BB%93%E6%9E%84%E5%AF%BC%E8%A7%88/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-12-%E6%8B%93%E6%89%91%E4%B8%8E%E5%88%86%E6%9E%90%E5%9F%BA%E7%A1%80%E7%BB%93%E6%9E%84%E5%AF%BC%E8%A7%88/"/>
<published>2026-08-09T03:12:00.000Z</published>
<summary>
<![CDATA[<p>Mathlib 的分析库以 <code>Filter</code> 为核心抽象,在此之上叠加拓扑、度量和赋范结构,统一表达极限、连续、收敛等概念。理解这套分层设计,是读懂 Mathlib 分析证明的前提。本篇梳理 <code>Filter</code>、<code>TopologicalSpace</code>、<code>MetricSpace</code> 和 <code>NormedSpace</code> 四层结构的定义方式和证明惯用法,并通过具体可运行代码展示各层之间的关联。</p>
<p>前置阅读:本系列 <a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-09-Mathlib-%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7/">09 Mathlib 搜索技巧</a>、<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-10-%E7%B1%BB%E5%9E%8B%E7%B1%BB%E5%B1%82%E6%AC%A1/">10 类型类层次</a>、<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-11-%E5%9C%A8-Mathlib-%E4%B8%8A%E8%AF%81%E4%B8%80%E4%B8%AA%E5%B0%8F%E5%AE%9A%E7%90%86/">11 在 Mathlib 上证一个小定理</a>。</p>]]>
</summary>
<title>深入 Lean 12:拓扑与分析基础结构导览</title>
<updated>2026-08-13T11:29:53.757Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-11-%E5%9C%A8-Mathlib-%E4%B8%8A%E8%AF%81%E4%B8%80%E4%B8%AA%E5%B0%8F%E5%AE%9A%E7%90%86/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-11-%E5%9C%A8-Mathlib-%E4%B8%8A%E8%AF%81%E4%B8%80%E4%B8%AA%E5%B0%8F%E5%AE%9A%E7%90%86/"/>
<published>2026-08-09T03:11:00.000Z</published>
<summary>
<![CDATA[<p>向 Mathlib 贡献一条引理,从选题到合并大约需要经历六个阶段:确认缺口、搜索已有引理、写证明、通过本地 lint、跑通 CI、完成 PR 审核。本文以一个具体的 <code>List</code> 辅助引理为例,完整走一遍这条路径。</p>]]>
</summary>
<title>深入 Lean 11:在 Mathlib 上证一个小定理</title>
<updated>2026-08-13T11:29:53.756Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-02-Term-mode-%E4%B8%8E-Tactic-mode-%E5%88%87%E6%8D%A2%E5%BF%83%E6%B3%95/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-02-Term-mode-%E4%B8%8E-Tactic-mode-%E5%88%87%E6%8D%A2%E5%BF%83%E6%B3%95/"/>
<published>2026-08-09T03:10:00.000Z</published>
<summary>
<![CDATA[<p>Lean 4 提供两种写证明的语法面:term mode 直接给出构造该类型的项;tactic mode 通过一系列指令逐步缩减未完成的目标。两者在语义上等价——任何 tactic 证明最终都被 elaboration 翻译成一个 term,类型检查器只检查 term 层。选择哪种写法是风格决策,但这个决策在实践中有明确的倾向规则。</p>
<p>本篇是"深入 Lean"系列第 02 篇。系列前置知识见《在 Lean 4 中证明经典命题》,该篇已展示了两种模式的基本对照;本篇专注于切换判断本身:什么情况下 term mode 更短、更清晰,什么情况下 tactic mode 更易读、更可维护,以及两种模式如何在同一个证明里混合使用。</p>]]>
</summary>
<title>深入 Lean 02:Term-mode 与 Tactic-mode 切换心法</title>
<updated>2026-08-13T11:29:53.755Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-10-%E7%B1%BB%E5%9E%8B%E7%B1%BB%E5%B1%82%E6%AC%A1/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-10-%E7%B1%BB%E5%9E%8B%E7%B1%BB%E5%B1%82%E6%AC%A1/"/>
<published>2026-08-09T03:10:00.000Z</published>
<summary>
<![CDATA[<p>Lean 4 的类型类机制是整个 Mathlib 代数层次的基础设施。从 <code>Monoid</code> 到 <code>Field</code> 的继承链、instance 搜索的 backtracking 算法、以及钻石问题的处理方式,这些设计决策共同决定了 Mathlib 4 能否在百万行规模下保持一致性。本篇专注于类型类层次本身:<code>class</code>/<code>instance</code>/<code>extends</code> 三个关键字的语义、Mathlib 代数 hierarchy 的组织方式、instance 搜索的调试手段,以及如何编写自定义类型类并纳入现有层次。</p>]]>
</summary>
<title>深入 Lean 10:类型类层次:从 Monoid 到 Field</title>
<updated>2026-08-13T11:29:53.756Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-09-Mathlib-%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-09-Mathlib-%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7/"/>
<published>2026-08-09T03:09:00.000Z</published>
<summary>
<![CDATA[<p>Mathlib4 截至 2024 年末已收录超过 16 万条定理、引理和定义。面对这个规模,手工翻阅文档或凭经验猜名字的效率极低。Lean 4 工具链和 Mathlib 生态提供了一套完整的搜索机制:从编辑器内的 <code>exact?</code>、<code>apply?</code>、<code>rw?</code>、<code>simp?</code>,到浏览器端的 Loogle 和 Moogle——每种工具针对不同的查询意图。掌握这套机制是高效使用 Mathlib 的基本工作方式。</p>
<p>本篇是"深入 Lean"系列第 09 篇。前置阅读:<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-04-%E6%A0%B8%E5%BF%83-tactic-%E7%B2%BE%E8%AE%B2/">04 核心 tactic 精讲</a>(<code>exact</code>/<code>apply</code>/<code>rw</code> 的语义)、<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-05-simp-%E4%B8%8E-norm_num/">05 simp 与 norm_num</a>(simp 引擎工作原理)、<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-02-Term-mode-%E4%B8%8E-Tactic-mode-%E5%88%87%E6%8D%A2%E5%BF%83%E6%B3%95/">02 Term-mode 与 Tactic-mode 切换心法</a>(两种证明模式的区别)。</p>]]>
</summary>
<title>深入 Lean 09:Mathlib 搜索技巧</title>
<updated>2026-08-13T11:29:53.756Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-08-%E8%87%AA%E5%AE%9A%E4%B9%89-tactic-%E4%B8%8E%E5%AE%8F/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-08-%E8%87%AA%E5%AE%9A%E4%B9%89-tactic-%E4%B8%8E%E5%AE%8F/"/>
<published>2026-08-09T03:08:00.000Z</published>
<summary>
<![CDATA[<p>Lean 4 的 tactic 框架不是封闭的黑盒——整个 tactic 集合本身就是用 Lean 4 写成的,对用户完全开放扩展。<code>syntax</code>、<code>macro</code>、<code>elab</code> 三个关键字构成了这套元编程机制的核心,分别对应语法解析层、宏展开层、精化(elaboration)层。理解这三层的职责边界,就能在合适的抽象层次上定义自己的 tactic,而不是绕道求助 <code>sorry</code> 或重复编写机械的组合步骤。</p>
<p>本篇是"深入 Lean"系列第 08 篇。前置阅读:<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-02-Term-mode-%E4%B8%8E-Tactic-mode-%E5%88%87%E6%8D%A2%E5%BF%83%E6%B3%95/">02 Term-mode 与 Tactic-mode 切换心法</a>(tactic 基本操作),<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-03-Universe-%E4%B8%8E%E7%B1%BB%E5%9E%8B%E5%B1%82%E7%BA%A7%E5%AE%9E%E6%88%98/">03 Universe 与类型层级实战</a>(<code>Sort</code>/<code>Type</code>/<code>Prop</code> 区分)。</p>]]>
</summary>
<title>深入 Lean 08:自定义 tactic 与宏</title>
<updated>2026-08-13T11:29:53.756Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-07-conv-%E4%B8%8E-calc/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-07-conv-%E4%B8%8E-calc/"/>
<published>2026-08-09T03:07:00.000Z</published>
<summary>
<![CDATA[<p><code>rw</code> 按从左到右的顺序匹配第一个符合的子项并替换,<code>simp</code> 则对所有可匹配位置做化简。两者在精度上处于两个极端:一个只打第一枪,一个全部扫射。实际证明中经常需要介于两者之间的操作——精确指定重写位置。Lean 4 提供了]]>
</summary>
<title>深入 Lean 07:conv 与 calc</title>
<updated>2026-08-13T11:29:53.756Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-06-%E7%AE%97%E6%9C%AF%E8%87%AA%E5%8A%A8%E5%8C%96/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-06-%E7%AE%97%E6%9C%AF%E8%87%AA%E5%8A%A8%E5%8C%96/"/>
<published>2026-08-09T03:06:00.000Z</published>
<summary>
<![CDATA[<p>在形式化方法系列的前几篇中,从类型论基础(01)、目标窗口与 tactic 交互模型(02)到 Gallina 核心语法(03)、基础 tactic 全景(04)以及搜索与自动化(05),关注点始终落在"如何与 Lean]]>
</summary>
<title>深入 Lean 06:omega/linarith/positivity/polyrith:算术自动化</title>
<updated>2026-08-13T11:29:53.756Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-05-simp-%E4%B8%8E-norm_num/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-05-simp-%E4%B8%8E-norm_num/"/>
<published>2026-08-09T03:05:00.000Z</published>
<summary>
<![CDATA[<p><code>simp</code> 和 <code>norm_num</code> 是 Lean 4 / Mathlib4 中使用频率最高的两个自动化 tactic。<code>simp</code> 是一个基于重写规则集合的项化简引擎,<code>norm_num</code> 是一个针对数值表达式的可判定算术归一化器。理解这两个 tactic 的工作原理,对于写出既正确又可维护的 Mathlib 风格证明至关重要。</p>
<p>前置阅读:本系列 <a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-02-Term-mode-%E4%B8%8E-Tactic-mode-%E5%88%87%E6%8D%A2%E5%BF%83%E6%B3%95/">02 Term-mode 与 Tactic-mode 切换心法</a> 讲解了 tactic 块的基本结构;<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-03-Universe-%E4%B8%8E%E7%B1%BB%E5%9E%8B%E5%B1%82%E7%BA%A7%E5%AE%9E%E6%88%98/">03 Universe 与类型层级实战</a> 阐述了 <code>Prop</code> 与 <code>Type</code> 的区别——这些背景在理解 <code>simp</code> 的化简对象范围时用得上。</p>]]>
</summary>
<title>深入 Lean 05:simp 与 norm_num</title>
<updated>2026-08-13T11:29:53.755Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-04-%E6%A0%B8%E5%BF%83-tactic-%E7%B2%BE%E8%AE%B2/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-04-%E6%A0%B8%E5%BF%83-tactic-%E7%B2%BE%E8%AE%B2/"/>
<published>2026-08-09T03:04:00.000Z</published>
<summary>
<![CDATA[<p>Lean 4 的 tactic mode 把证明分解成一系列目标变换步骤。每条 tactic 接收当前的目标状态(一组待证的 <code>⊢</code> 句),修改它,产生零个或多个新目标。当所有目标消除完毕,证明关闭。七条核心 tactic——<code>intro</code>、<code>apply</code>、<code>exact</code>、<code>constructor</code>、<code>cases</code>、<code>induction</code>、<code>simp</code>——覆盖了命题逻辑和结构归纳证明的绝大部分场景,各自有精确的语义模型和目标变换规则。</p>
<p>前置阅读:本系列 <a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-01-Lake-%E9%A1%B9%E7%9B%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E4%BE%9D%E8%B5%96%E7%AE%A1%E7%90%86/">01 Lake 项目结构与依赖管理</a>、<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-02-Term-mode-%E4%B8%8E-Tactic-mode-%E5%88%87%E6%8D%A2%E5%BF%83%E6%B3%95/">02 Term-mode 与 Tactic-mode 切换心法</a>、<a href="../2026-08-09-%E6%B7%B1%E5%85%A5-Lean-03-Universe-%E4%B8%8E%E7%B1%BB%E5%9E%8B%E5%B1%82%E7%BA%A7%E5%AE%9E%E6%88%98/">03 Universe 与类型层级实战</a>;形式化方法系列 <a href="../2026-05-26-%E5%9C%A8-Lean-4-%E4%B8%AD%E8%AF%81%E6%98%8E%E7%BB%8F%E5%85%B8%E5%91%BD%E9%A2%98/">在 Lean 4 中证明经典命题</a>。</p>]]>
</summary>
<title>深入 Lean 04:核心 tactic 精讲</title>
<updated>2026-08-13T11:29:53.755Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="系统设计" scheme="https://magicliang.github.io/categories/%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1/"/>
<category term="Agent" scheme="https://magicliang.github.io/tags/Agent/"/>
<category term="多智能体" scheme="https://magicliang.github.io/tags/%E5%A4%9A%E6%99%BA%E8%83%BD%E4%BD%93/"/>
<category term="知识图谱" scheme="https://magicliang.github.io/tags/%E7%9F%A5%E8%AF%86%E5%9B%BE%E8%B0%B1/"/>
<category term="LangGraph" scheme="https://magicliang.github.io/tags/LangGraph/"/>
<category term="DAG" scheme="https://magicliang.github.io/tags/DAG/"/>
<category term="Graph Engineering" scheme="https://magicliang.github.io/tags/Graph-Engineering/"/>
<id>https://magicliang.github.io/2026/08/09/Coding-Agent-%E9%A2%86%E5%9F%9F%E7%9A%84-Graph-Engineering%E2%80%94%E2%80%94%E5%BD%93%E5%9B%BE%E5%B7%A5%E7%A8%8B%E9%81%87%E4%B8%8A%E6%99%BA%E8%83%BD%E4%BD%93%E7%BC%96%E6%8E%92/</id>
<link href="https://magicliang.github.io/2026/08/09/Coding-Agent-%E9%A2%86%E5%9F%9F%E7%9A%84-Graph-Engineering%E2%80%94%E2%80%94%E5%BD%93%E5%9B%BE%E5%B7%A5%E7%A8%8B%E9%81%87%E4%B8%8A%E6%99%BA%E8%83%BD%E4%BD%93%E7%BC%96%E6%8E%92/"/>
<published>2026-08-09T03:00:00.000Z</published>
<summary>
<![CDATA[<p>图工程有两重含义。《深入图工程》讨论的是以图数据为中心的系统工程——图数据库、图计算引擎、知识图谱。本文讨论第二重:当 Coding Agent 系统本身成为一个图结构的工程制品时,传统图工程的哪些原理可以复用,哪些问题是全新的。</p>
<p>2024-2026]]>
</summary>
<title>Coding Agent 领域的 Graph Engineering——当图工程遇上智能体编排</title>
<updated>2026-08-13T11:29:53.752Z</updated>
</entry>
<entry>
<author>
<name>magicliang</name>
</author>
<category term="计算理论" scheme="https://magicliang.github.io/categories/%E8%AE%A1%E7%AE%97%E7%90%86%E8%AE%BA/"/>
<category term="形式化方法" scheme="https://magicliang.github.io/tags/%E5%BD%A2%E5%BC%8F%E5%8C%96%E6%96%B9%E6%B3%95/"/>
<category term="Lean" scheme="https://magicliang.github.io/tags/Lean/"/>
<category term="证明工程" scheme="https://magicliang.github.io/tags/%E8%AF%81%E6%98%8E%E5%B7%A5%E7%A8%8B/"/>
<id>https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-01-Lake-%E9%A1%B9%E7%9B%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E4%BE%9D%E8%B5%96%E7%AE%A1%E7%90%86/</id>
<link href="https://magicliang.github.io/2026/08/09/%E6%B7%B1%E5%85%A5-Lean-01-Lake-%E9%A1%B9%E7%9B%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E4%BE%9D%E8%B5%96%E7%AE%A1%E7%90%86/"/>
<published>2026-08-09T03:00:00.000Z</published>
<summary>
<![CDATA[<p>Lake 是 Lean 4 的官方构建系统与包管理器,随 <code>lean</code> 工具链一同分发。形式化方法系列的第 07-08 篇已覆盖 <code>elan</code> 安装与 <code>lake new</code> 起手骨架;本篇从那个骨架向前推进,聚焦生产级项目需要的部分:toolchain 锁定、Mathlib4 依赖引入、<code>lake-manifest.json</code> 版本固定、多目标 lakefile 设计,以及可直接套用的 GitHub Actions CI 配置。</p>]]>
</summary>
<title>深入 Lean 01:Lake 项目结构与依赖管理</title>
<updated>2026-08-13T11:29:53.755Z</updated>
</entry>
</feed>