diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ae29c8b..5fe1ccf 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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}" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9af9e7f..55cb235 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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, diff --git a/AGENT.md b/AGENT.md index f9bb53f..16b0fb4 100644 --- a/AGENT.md +++ b/AGENT.md @@ -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. diff --git a/Project.lean b/Project.lean index ed54e10..570fa40 100644 --- a/Project.lean +++ b/Project.lean @@ -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 diff --git a/Project/Example.lean b/Project/Example.lean index c167798..e811e87 100644 --- a/Project/Example.lean +++ b/Project/Example.lean @@ -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 diff --git a/README.md b/README.md index 86c2492..102f2b8 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lake-manifest.json b/lake-manifest.json index 65e89ac..508bb5d 100644 --- a/lake-manifest.json +++ b/lake-manifest.json @@ -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", @@ -25,7 +25,7 @@ "type": "git", "subDir": null, "scope": "leanprover-community", - "rev": "3591c3f664ac3719c4c86e4483e21e228707bfa2", + "rev": "19e5f5cc9c21199be466ef99489e3acab370f079", "name": "LeanSearchClient", "manifestFile": "lake-manifest.json", "inputRev": "main", @@ -35,7 +35,7 @@ "type": "git", "subDir": null, "scope": "leanprover-community", - "rev": "e9f31324f15ead11048b1443e62c5deaddd055d2", + "rev": "4eb26e1a4806b200ddfe5179d0c2a0fae56c54a7", "name": "importGraph", "manifestFile": "lake-manifest.json", "inputRev": "main", @@ -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", @@ -65,7 +65,7 @@ "type": "git", "subDir": null, "scope": "leanprover-community", - "rev": "9312503909aa8e8bb392530145cc1677a6298574", + "rev": "523ec6fc8062d2f470fdc8de6f822fe89552b5e6", "name": "Qq", "manifestFile": "lake-manifest.json", "inputRev": "master", @@ -75,7 +75,7 @@ "type": "git", "subDir": null, "scope": "leanprover-community", - "rev": "24241822ef9d3e7f6a3bcc53ad136e12663db8f3", + "rev": "6254bed25866358ce4f841fa5a13b77de04ffbc8", "name": "batteries", "manifestFile": "lake-manifest.json", "inputRev": "main", @@ -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", diff --git a/lakefile.toml b/lakefile.toml index 2c8d1c2..70ece93 100644 --- a/lakefile.toml +++ b/lakefile.toml @@ -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" diff --git a/lean-toolchain b/lean-toolchain index e59446d..bd19bde 100644 --- a/lean-toolchain +++ b/lean-toolchain @@ -1 +1 @@ -leanprover/lean4:v4.26.0 +leanprover/lean4:v4.27.0-rc1 diff --git a/package-lock.json b/package-lock.json index 90feec6..df94e53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,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" } }, "node_modules/@babel/code-frame": { @@ -1607,9 +1607,9 @@ } }, "node_modules/lefthook": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook/-/lefthook-2.0.11.tgz", - "integrity": "sha512-/91k4dt9MRNkzeSr1iMjNi/z8dNuh+XvNfXrWA6PV+M1ZxiNY6uN6bGnr13n+j7N89f4h7YWBhCqhzhK33M5cA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook/-/lefthook-2.0.12.tgz", + "integrity": "sha512-I2FdA9cdnq1icwlNz4RADs7exuqe47q1N9+p2LmcP/WfchWh16mvTB82OAD7w7zK9GxblS9GpF7pASaOSl4c7A==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1617,22 +1617,22 @@ "lefthook": "bin/index.js" }, "optionalDependencies": { - "lefthook-darwin-arm64": "2.0.11", - "lefthook-darwin-x64": "2.0.11", - "lefthook-freebsd-arm64": "2.0.11", - "lefthook-freebsd-x64": "2.0.11", - "lefthook-linux-arm64": "2.0.11", - "lefthook-linux-x64": "2.0.11", - "lefthook-openbsd-arm64": "2.0.11", - "lefthook-openbsd-x64": "2.0.11", - "lefthook-windows-arm64": "2.0.11", - "lefthook-windows-x64": "2.0.11" + "lefthook-darwin-arm64": "2.0.12", + "lefthook-darwin-x64": "2.0.12", + "lefthook-freebsd-arm64": "2.0.12", + "lefthook-freebsd-x64": "2.0.12", + "lefthook-linux-arm64": "2.0.12", + "lefthook-linux-x64": "2.0.12", + "lefthook-openbsd-arm64": "2.0.12", + "lefthook-openbsd-x64": "2.0.12", + "lefthook-windows-arm64": "2.0.12", + "lefthook-windows-x64": "2.0.12" } }, "node_modules/lefthook-darwin-arm64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-darwin-arm64/-/lefthook-darwin-arm64-2.0.11.tgz", - "integrity": "sha512-RfpdcJJQXstdgDiIBDRffncayKiXx+0LyMUCunIxDEO2JMXPpYK2hIdpUU0rkitzptAADchG7u1OXJ31rrtIAA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-darwin-arm64/-/lefthook-darwin-arm64-2.0.12.tgz", + "integrity": "sha512-tuBz1sNLien+nKKb8BDopKjS6EnbXU8rQzhMVBY+bnVfsTiYDfbBr4wo/IzA5TcwoTL/b5somCJhljEw6DvSyg==", "cpu": [ "arm64" ], @@ -1644,9 +1644,9 @@ ] }, "node_modules/lefthook-darwin-x64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-darwin-x64/-/lefthook-darwin-x64-2.0.11.tgz", - "integrity": "sha512-D013UNKQa4FKgpxDMqdaU109U2/Pidtrt9CobQoq8te4eGUglcwxMzuYVTgaYnenz0FgKxSfVaCZsZgwqeMWqA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-darwin-x64/-/lefthook-darwin-x64-2.0.12.tgz", + "integrity": "sha512-FnuUMPPRMJyTEPXg6PotSrFJ8qf8FDLhhD1zLh74D+9Cye5j9n3lcrCQEjXubPT8du/GZLxMBjjffRbcZ8eYDA==", "cpu": [ "x64" ], @@ -1658,9 +1658,9 @@ ] }, "node_modules/lefthook-freebsd-arm64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-freebsd-arm64/-/lefthook-freebsd-arm64-2.0.11.tgz", - "integrity": "sha512-mgfNqG1tiJkCuGNwPG0LEfnAHGJA+Qzl6KidOtX/Zhxmj/sM+6hxiP4LOeEAhCnaZF5kuPtQgbFzShFHc2BK6A==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-freebsd-arm64/-/lefthook-freebsd-arm64-2.0.12.tgz", + "integrity": "sha512-DXElB0qR5e6a8cXkFNYakhwCieypbfh6Y4QG39pzMnLsG03g/nhe093o6owfiUZ4mUFyDM6+0xmy0steOooF2g==", "cpu": [ "arm64" ], @@ -1672,9 +1672,9 @@ ] }, "node_modules/lefthook-freebsd-x64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-freebsd-x64/-/lefthook-freebsd-x64-2.0.11.tgz", - "integrity": "sha512-rnHOlQbJfLGCibr7yHM44kPNgf/tFpEbj/cWVHRhjRdbgYSCAjJk0uKd/EVo3v/vjfId2na0AhWbLvO/aY3wQQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-freebsd-x64/-/lefthook-freebsd-x64-2.0.12.tgz", + "integrity": "sha512-iJN1ZxFeaDi4Fi3b9jcW9wgyNl19LOv2NaVOaAi/tG6mlIn196cmSdXkOA3+943ZbqbdfV9I+bBcIKwneXDA3Q==", "cpu": [ "x64" ], @@ -1686,9 +1686,9 @@ ] }, "node_modules/lefthook-linux-arm64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-linux-arm64/-/lefthook-linux-arm64-2.0.11.tgz", - "integrity": "sha512-1XjDo2/4fM0TbJBwxZh8w+WMOFueg9oYHkryM8vc3vp8wTajdWBazg1K37JIS3FUco3tcOs+eWHQg0ekVjpWoA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-linux-arm64/-/lefthook-linux-arm64-2.0.12.tgz", + "integrity": "sha512-byvmO4Iri6P0COwM8c3lGgeCV3Q0hh1XJpRfrcZDr4Wslq9O63t6J3T6i87oOtY+UjC9pXLl6xGk6hlUcHZ3BQ==", "cpu": [ "arm64" ], @@ -1700,9 +1700,9 @@ ] }, "node_modules/lefthook-linux-x64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-linux-x64/-/lefthook-linux-x64-2.0.11.tgz", - "integrity": "sha512-OKOcfEvozXhO7+y2xgUzvc2kkqfhluql/sjQSzd8Ka+iK3hM4KCfbfgYx9q61Pjr34a0+i03cuH5DF2dlq/rrg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-linux-x64/-/lefthook-linux-x64-2.0.12.tgz", + "integrity": "sha512-KBaiinmf336rA+/dmYs7H7TTeAOByB0CyLA7k8IecTCuaiuKr6ez7ktSjht19poa5G+V0mts4GgEGcx6HViR0w==", "cpu": [ "x64" ], @@ -1714,9 +1714,9 @@ ] }, "node_modules/lefthook-openbsd-arm64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-openbsd-arm64/-/lefthook-openbsd-arm64-2.0.11.tgz", - "integrity": "sha512-n1KEx196M3SKaWVNTQXGgxzBsiYAsdAy6Of6I6TAZwPhG7yoRrKGkQrhOlPgMzYl36udG1Lk4D+mfY9T0oOUYQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-openbsd-arm64/-/lefthook-openbsd-arm64-2.0.12.tgz", + "integrity": "sha512-1QBMXX1UW5rtgC4TB52OKWB7Rz/kCBRB+bKKLT/gDD79aPzLgJANTitQQzgFNIWoa7aM9UvzvIAJzOo6FcFIbg==", "cpu": [ "arm64" ], @@ -1728,9 +1728,9 @@ ] }, "node_modules/lefthook-openbsd-x64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-openbsd-x64/-/lefthook-openbsd-x64-2.0.11.tgz", - "integrity": "sha512-WAEtKpYUVvuJMVLA38IBoaPnTNSiaEzvUYxjTBlYTLHJwn7HC2GG6P1cnvoua8rfxb9/Bfi7C3D3IPa9VmB33Q==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-openbsd-x64/-/lefthook-openbsd-x64-2.0.12.tgz", + "integrity": "sha512-zPcvUzs65GexRA37UHmaZqWuEGSU/zpBaPIY98MybXzzcJfCIf+O0oUQe2riMllwYGvNW0B1y3NOYRziDNe/vA==", "cpu": [ "x64" ], @@ -1742,9 +1742,9 @@ ] }, "node_modules/lefthook-windows-arm64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-windows-arm64/-/lefthook-windows-arm64-2.0.11.tgz", - "integrity": "sha512-HBqW1qfAnmmbpet7gSWatB6H5YIFdGxCqzolMCLwY/0o8oPFiMwdNE5RGp5JMmhZdz/h3XlbaUlIhnxoW8dk5g==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-windows-arm64/-/lefthook-windows-arm64-2.0.12.tgz", + "integrity": "sha512-kgwxguS2GssoHM4SMTp+ArD/Gjg9q5MinD6iI5vSFpuJygD13ZWiXQQfESMHq9y/v1XkD0BdHTJej49dx8P+Vw==", "cpu": [ "arm64" ], @@ -1756,9 +1756,9 @@ ] }, "node_modules/lefthook-windows-x64": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/lefthook-windows-x64/-/lefthook-windows-x64-2.0.11.tgz", - "integrity": "sha512-e5TYmV5cBZfRrhPVFCqjauegLI5CjdAd8exyAbMzGHkiwp3ZK145Su/pntgEP3d+ayS9mpgYPJmXYOSL7WHlyg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/lefthook-windows-x64/-/lefthook-windows-x64-2.0.12.tgz", + "integrity": "sha512-Tf/VtSOtF3rBTc9dzRWROa+HuhqaiIV+Xp+1gzlx5+uCueLM0m87Rz6yd4IN5mL7TrDaNkiRXI3FvjCp0dUE4Q==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index 31ab506..7fe35fd 100644 --- a/package.json +++ b/package.json @@ -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": {