lean_dojo.interaction.dojo
- class lean_dojo.interaction.dojo.CommandState(id: int, message: str | None = None)[source]
Bases:
object- id: int
- message: str | None = None
- class lean_dojo.interaction.dojo.Dojo(entry: Theorem | Tuple[LeanGitRepo, Path, int], timeout: int = 600, additional_imports: List[str] = [])[source]
Bases:
objectGym-like environment for programmatic interaction with Lean through tactics or commands.
- additional_imports: List[str]
- entry: Theorem | Tuple[LeanGitRepo, Path, int]
- file_path: Path
- has_timedout: bool = False
- is_crashed: bool = False
- is_successful: bool | None = None
- modified_file: TextIO
- repo: LeanGitRepo
- run_cmd(state: CommandState, command: str) CommandState | LeanError[source]
- run_tac(state: TacticState, tactic: str) TacticState | ProofFinished | LeanError | ProofGivenUp[source]
- property uses_commands: bool
- property uses_tactics: bool
- exception lean_dojo.interaction.dojo.DojoCrashError[source]
Bases:
Exception- property is_out_of_memory: bool
- class lean_dojo.interaction.dojo.ProofFinished(tactic_state_id: int, message: str | None = None)[source]
Bases:
object- message: str | None = None
- tactic_state_id: int