Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ RUN apt-get update && \
USER vscode
WORKDIR /home/vscode

RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain leanprover/lean4:4.26.0
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain leanprover/lean4:4.27.0-rc1
ENV PATH="/home/vscode/.elan/bin:${PATH}"
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
"editor.formatOnSave": true,
"github.copilot.chat.agent.thinkingTool": true,
"chat.agent.maxRequests": 50,
"chat.tools.autoApprove": true,
"chat.useAgentSkills": true,
"chat.tools.urls.autoApprove": {
"https://lean-lang.org/doc/*": false
},
"chat.tools.terminal.enableAutoApprove": true,
"chat.tools.terminal.autoApprove": {
"lean": true,
"lake": true,
Expand Down
21 changes: 8 additions & 13 deletions AGENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@

## Important Instructions

- Do not add files.
- Do not remove files.
- Do not use `git checkout`and `git reset`.
- Do not use `python` command.
- Do not use `cat` to overwrite a file.
- Do not modify `lakefile.toml`.
- Never use `axiom` and `set_option` for any reason!
- When `lemma` or `thorem` is too long, devide it into multiple `lemma`s.
- Never give up simply because it is complicated or time-consuming; instead, try to implement the missing lemmas step by step.
- Use `$...$` or `$$...$$` for LaTeX math formatting in markdown.
- Use `conj` as complex conjugate when declaring `open ComplexConjugate`.
- Use `simp` when referring `try 'simp' instead of 'simpa'`.
- Never use tabs. Use spaces instead.
- Never modify `lakefile.toml`.
- Never use `python`, `cat`, `git checkout`and `git reset`.
- Never use `sorry`, `admit`, `axiom`, and `set_option` for any reason!
- Fix indentation when referring `expected '{' or indented tactic sequence`.
- Do not use tabs. Use spaces instead.
- Autonomously continue executing the tasks specified in `PLANS.md` until the maximum request limit is reached.
- Use `lean-lsp` mcp server tools when searching Mathlib, analyzing codes, etc.
- Write comments in English.
- Use `$...$` or `$$...$$` for LaTeX math formatting in markdown.
2 changes: 0 additions & 2 deletions Project.lean
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
-- This module serves as the root of the `Project` library.
-- Import modules here that should be built as part of the library.
import Project.Example
4 changes: 1 addition & 3 deletions Project/Example.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ namespace Example
theorem infinitely_many_primes : ∀ n : ℕ, ∃ p : ℕ, n < p ∧ Nat.Prime p := by
intro n
let N := Nat.factorial n + 1
have N_gt_one : 1 < N := by
simp [N]
exact Nat.factorial_pos n
have N_gt_one : 1 < N := Nat.succ_lt_succ (Nat.factorial_pos n)
let p := Nat.minFac N
have N_not_one : N ≠ 1 := Nat.ne_of_gt N_gt_one
have pp : Nat.Prime p := Nat.minFac_prime N_not_one
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# lean-project

```bash
$ lake exe mk_all
No update necessary
$ lake build
Build completed successfully (579 jobs).
ℹ [496/498] Replayed Project.Example
info: Project/Example.lean:29:0: import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Data.Nat.Prime.Defs
info: Project/Example.lean:29:0: `#`-commands, such as '#min_imports', are not allowed in 'Mathlib' [linter.hashCommand]
Build completed successfully (498 jobs).
```

## How to use
Expand Down
24 changes: 12 additions & 12 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "2df2f0150c275ad53cb3c90f7c98ec15a56a1a67",
"rev": "32d24245c7a12ded17325299fd41d412022cd3fe",
"name": "mathlib",
"manifestFile": "lake-manifest.json",
"inputRev": "v4.26.0",
"inputRev": "v4.27.0-rc1",
"inherited": false,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover-community/plausible",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "160af9e8e7d4ae448f3c92edcc5b6a8522453f11",
"rev": "8d3713f36dda48467eb61f8c1c4db89c49a6251a",
"name": "plausible",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand All @@ -25,7 +25,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "3591c3f664ac3719c4c86e4483e21e228707bfa2",
"rev": "19e5f5cc9c21199be466ef99489e3acab370f079",
"name": "LeanSearchClient",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand All @@ -35,7 +35,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "e9f31324f15ead11048b1443e62c5deaddd055d2",
"rev": "4eb26e1a4806b200ddfe5179d0c2a0fae56c54a7",
"name": "importGraph",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand All @@ -45,17 +45,17 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "b4fb2aa5290ebf61bc5f80a5375ba642f0a49192",
"rev": "ef8377f31b5535430b6753a974d685b0019d0681",
"name": "proofwidgets",
"manifestFile": "lake-manifest.json",
"inputRev": "v0.0.83",
"inputRev": "v0.0.84",
"inherited": true,
"configFile": "lakefile.lean"},
{"url": "https://github.com/leanprover-community/aesop",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "2f6d238744c4cb07fdc91240feaf5d4221a27931",
"rev": "fb12f5535c80e40119286d9575c9393562252d21",
"name": "aesop",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
Expand All @@ -65,7 +65,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "9312503909aa8e8bb392530145cc1677a6298574",
"rev": "523ec6fc8062d2f470fdc8de6f822fe89552b5e6",
"name": "Qq",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
Expand All @@ -75,7 +75,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "24241822ef9d3e7f6a3bcc53ad136e12663db8f3",
"rev": "6254bed25866358ce4f841fa5a13b77de04ffbc8",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand All @@ -85,10 +85,10 @@
"type": "git",
"subDir": null,
"scope": "leanprover",
"rev": "933fce7e893f65969714c60cdb4bd8376786044e",
"rev": "726b98c53e2da249c1de768fbbbb5e67bc9cef60",
"name": "Cli",
"manifestFile": "lake-manifest.json",
"inputRev": "v4.26.0",
"inputRev": "v4.27.0-rc1",
"inherited": true,
"configFile": "lakefile.toml"}],
"name": "Project",
Expand Down
9 changes: 7 additions & 2 deletions lakefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ defaultTargets = ["Project"]

[[lean_lib]]
name = "Project"
leanOptions = { warningAsError = true }
leanOptions.warningAsError = true
leanOptions.pp.unicode.fun = true
leanOptions.autoImplicit = false
leanOptions.relaxedAutoImplicit = false
leanOptions.linter.mathlibStandardSet = true
leanOptions.linter.style.longLine = false

[[require]]
name = "mathlib"
scope = "leanprover-community"
rev = "v4.26.0"
rev = "v4.27.0-rc1"
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.26.0
leanprover/lean4:v4.27.0-rc1
88 changes: 44 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@commitlint/config-conventional": "20.2.0",
"commitizen": "4.3.1",
"cz-conventional-changelog": "3.3.0",
"lefthook": "2.0.11"
"lefthook": "2.0.12"
},
"config": {
"commitizen": {
Expand Down