一键导入
hm-prove
Help prove a theorem in HashMath. Use when the user wants to construct a proof term, define a theorem, or needs help writing .hm proof code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Help prove a theorem in HashMath. Use when the user wants to construct a proof term, define a theorem, or needs help writing .hm proof code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Type-check HashMath (.hm) source code or files. Use when the user wants to verify that .hm code type-checks correctly.
Search for declarations in the HashMath environment by name pattern. Use when the user wants to find available definitions, theorems, or types.
Run the HashMath test suite. Use when the user wants to run tests, check if examples pass, or verify the type checker.
| name | hm-prove |
| description | Help prove a theorem in HashMath. Use when the user wants to construct a proof term, define a theorem, or needs help writing .hm proof code. |
| user-invocable | true |
| allowed-tools | mcp__hm-mcp__hm_process, mcp__hm-mcp__hm_load_file, mcp__hm-mcp__hm_check, mcp__hm-mcp__hm_eval, mcp__hm-mcp__hm_print, mcp__hm-mcp__hm_env, mcp__hm-mcp__hm_reset, mcp__hm-mcp__hm_read_source, Read, Glob |
| argument-hint | <theorem statement or description> |
You are helping the user prove a theorem in the HashMath proof assistant.
HashMath is a Calculus of Inductive Constructions (CIC) kernel. There are NO tactics — all proofs are explicit proof terms (lambda calculus + recursors).
T has T.rec.
Example: Nat.rec.{1} (fun (_ : Nat) => Nat) base_case step_case nEq.rec.{1} A a (fun (x : A) (_ : Eq A a x) => P x) base_proof b eq_proof#eval normalizes; use it to check computational behaviorProp, use .{1} not .{0} (since Prop : Sort 1)Nat.add recurses on second arg: add (succ X) Y ≠ succ (add X Y) definitionallyLocated in lean/stdlib/. Key modules: Logic.hm, Equality.hm, Nat.hm, List.hm, Bool.hm, Prod.hm, Sum.hm, Option.hm, Unit.hm
hm_reset to start clean.hm_load_file with the project's lean/stdlib/Prelude.hm.hm_process.hm_read_source to understand available lemmas.hm_process to check if it type-checks
d. If it fails, analyze the error and adjusthm_eval to test computational behavior of terms.If the proof doesn't type-check on the first try, that's expected. Read the error message carefully, adjust the proof term, and try again. Common issues: