You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
6. Get a mathport release with `./download-release.sh $my_choice`, where $mychoice = `nightly-2022-12-13-04` works, **or just**`./download-release.sh` to get the latest one automatically.
14
-
7. Put Lean 3 code in `Oneshot/lean3-in/main.lean`.
15
-
8. Put extra `#align` in `Oneshot/lean4-in/Oneshot.lean`
16
-
9. Run `make oneshot`
11
+
4. Run `lake exe cache get`
12
+
5. Run `make build` (go get some coffee!)
13
+
6. Run `make lean3-source`
14
+
7. Get a mathport release with `./download-release.sh $my_choice`, where $my_choice = `nightly-2022-12-13-04` works, **or just**`./download-release.sh` to get the latest one automatically.
15
+
8. Put Lean 3 code in `Oneshot/lean3-in/main.lean`.
16
+
9. Put extra `#align` in `Oneshot/lean4-in/Oneshot.lean`
17
+
10. Run `make oneshot`
17
18
18
-
After the first run, you only have to repeat steps 7-9, unless you want to update mathlib (step 6) or mathport itself (`git pull` and then steps 4-9).
19
+
After the first run, you only have to repeat steps 8-10, unless you want to update mathlib (step 7) or mathport itself (`git pull` and then steps 4-10).
20
+
21
+
If things work, at the end you should see
22
+
`# output is in Outputs/src/oneshot/Oneshot/Main.lean`.
23
+
You may need to add `import Mathlib.Mathport.Rename` to this file
24
+
before the `#align` commands work.
25
+
Also, all you mathlib imports will say `import Mathbin.XYZ`,
and run `lake build` to obtain the generated `.olean` files.
116
+
and run `lake exe cache get` and then
117
+
`lake build` to obtain the generated `.olean` files.
20
118
21
119
Using these repositories, you can open the synported `.lean` files in VS Code
22
120
to see the current state of output.
23
121
24
122
Alternatively, you can import some or all of the binported `.olean` files
25
123
using e.g.
26
-
```
124
+
125
+
```lean
27
126
import Mathbin.AlgebraicGeometry.Scheme
28
127
29
128
#lookup3 algebraic_geometry.Scheme
30
129
#check AlgebraicGeometry.Scheme
31
130
```
131
+
32
132
(Specifying the `mathlib3port` repository as a Lake dependency in your own
33
133
project should work to enable `import Mathbin.All`.)
34
134
@@ -48,7 +148,10 @@ where `<tag>` is a release from https://github.com/leanprover-community/mathport
48
148
## Running mathport locally
49
149
50
150
See the `Makefile` for usage (it takes several hours to rebuild the mathlib3 port from scratch).
51
-
Basic usage is `make build source predata port`.
151
+
Basic usage is `lake exe cache get` and then `make build source`.
152
+
153
+
After that you can try just `make predata port`,
154
+
but you probably should download artifacts first as described below.
52
155
53
156
We provide artifacts for various stages of the build on the releases page of the `mathport` repository.
54
157
The script `./download-release.sh nightly-YYYY-MM-DD` downloads one of these,
@@ -68,5 +171,3 @@ To port a single file execute `mathport` as follows
68
171
69
172
The directory `Test` contains subdirectories `importLeanBin` and `importMathbin`,
70
173
each containing a `lakefile.lean` that depends on `lean3port` and `mathlib3port`, resp.
71
-
72
-
Mathport also supports a "oneshot" mode, for quick tests. A template is set up in the `Oneshot/` directory. See [`Oneshot/README.md`](Oneshot/README.md).
0 commit comments