diff --git a/pyproject.toml b/pyproject.toml index 0833849..e07dd2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ requires = [ build-backend = "hatchling.build" [project] name = "itp_interface" -version = "1.1.10" +version = "1.1.11" authors = [ { name="Amitayush Thakur", email="amitayush@utexas.edu" }, ] diff --git a/src/itp_interface/tools/lean4_sync_executor.py b/src/itp_interface/tools/lean4_sync_executor.py index 9d8311f..f3e7ae2 100644 --- a/src/itp_interface/tools/lean4_sync_executor.py +++ b/src/itp_interface/tools/lean4_sync_executor.py @@ -30,8 +30,8 @@ class Lean4SyncExecutor: # We ONLY support proofs which are written in tactic mode i.e. with := syntax theorem_endings = r"(:=|(\|[\S|\s]*=>))" theorem_end_regex = r"(theorem|lemma|example)([\s|\S]*?)(:=|=>)" - theorem_regex = r"((((theorem|lemma)[\s]+([\S]*))|example)([\S|\s]*?)(:=|=>)[\s]*?)[\s]+" - theorem_name_regex = r"(((theorem|lemma)[\s]+([\S]*))|example)" + theorem_regex = r"((((theorem|lemma)[\s]+([^\s:]*))|example)([\S|\s]*?)(:=|=>)[\s]*?)[\s]+" + theorem_name_regex = r"(((theorem|lemma)[\s]+([^\s:]*))|example)" remove_proof_regex = r"([\s|\S]*(:=|\|))[\s|\S]*?" proof_context_separator = "⊢" proof_context_regex = r"((\d+) goals)*([\s|\S]*?)\n\n"