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.
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: