You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Isabelle文本中引用lemma/theorem/corollary的名称?

Isabelle引用定理/引理名称而非内容的解决方法
  • 直接使用@{thm_name <目标名称>}这个document antiquotation就能满足所有需求:
    • 编译PDF时会显示对应的定理、引理或推论的名称
    • IDE中支持Ctrl点击跳转至目标声明的定义位置
    • 重命名目标实体时,引用会自动同步更新,彻底避免手动输入名称带来的维护问题

完整示例代码:

theory Scratch
  imports Main
begin

lemma lemma_name: "stuff = stuff" by simp

text‹As we have proven in fact @{thm_name lemma_name}, stuff is stuff.›

end

编译后的PDF会显示:As we have proven in fact lemma_name, stuff is stuff.,完全符合预期。

另外,@{thm_name}不仅适用于lemma,对theorem、corollary这类定理型实体也同样生效。

内容的提问来源于stack exchange,提问作者corny

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 11:50:31