Zulip Chat Archive

Stream: lean4

Topic: unknown module prefix 'tactic'


Kajani Kaunda (Aug 13 2024 at 15:57):

This following code does not work on both my VS Code + LEan4 setup and https://live.lean-lang.org/

import tactic
def hello := "hello!"
#eval hello

However there is file called tactic.lean in the following folder:
C:\DATA\LEAN\spgf\.lake\packages\mathlib\Mathlib

The error i am getting is:

unknown module prefix 'tactic'
No directory 'tactic' or file 'tactic.olean' in the search path entries:

followed by a list of folders.

is it an environment problem, a lean version problem (3/4), or am I mixing lean 3 constructs in lean 4, or a worse sin ...

Damiano Testa (Aug 13 2024 at 15:59):

Mathlib.Tactic?

Kajani Kaunda (Aug 13 2024 at 15:59):

Damiano Testa said:

Mathlib.Tactic?

not. lower case 't'.
But there is a folder called Mathlib.Tactic. Are they the same?

Eric Wieser (Aug 13 2024 at 16:00):

You are writing Lean 3 code but running it with lean 4

Kajani Kaunda (Aug 13 2024 at 16:01):

Eric Wieser said:

You are writing Lean 3 code but running it with lean 4

Ouch!

Kajani Kaunda (Aug 13 2024 at 16:01):

So what is the equivalent lean 4 code?

Patrick Massot (Aug 13 2024 at 16:02):

You don’t need any import for this code, the last two lines should work.

Kajani Kaunda (Aug 13 2024 at 17:44):

Kajani Kaunda said:

So what is the equivalent lean 4 code?

Thank you.

Kajani Kaunda (Aug 13 2024 at 17:44):

Patrick Massot said:

You don’t need any import for this code, the last two lines should work.

Noted.

Patrick Massot said:

You don’t need any import for this code, the last two lines should work.

Thank you.


Last updated: May 02 2025 at 03:31 UTC