wellecks commited on
Commit
2ec5b5d
·
verified ·
1 Parent(s): 5d988f9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md CHANGED
@@ -1,3 +1,59 @@
1
  ---
2
  license: mit
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - theorem-proving
5
+ - math
6
+ - lean
7
  ---
8
+
9
+ Lean 4 tactic prediction examples extracted from Mathlib.
10
+
11
+
12
+ ### Citation
13
+ ```
14
+ @misc{ntptutorial,
15
+ author = {Sean Welleck},
16
+ title = {Neural theorem proving tutorial},
17
+ year = {2023},
18
+ publisher = {GitHub},
19
+ journal = {GitHub repository},
20
+ howpublished = {\url{https://github.com/wellecks/ntptutorial}},
21
+ }
22
+ ```
23
+
24
+
25
+ ### Version
26
+ Generated using `ntptutorial`'s `llm-training-data` with the following config:
27
+
28
+ ```json
29
+ {
30
+ "repo": "https://github.com/leanprover-community/mathlib4",
31
+ "commit": "cf8e23a62939ed7cc530fbb68e83539730f32f86",
32
+ "lean": "leanprover/lean4:v4.4.0",
33
+ "name": "mathlib",
34
+ "import_file": "Mathlib.lean",
35
+ "imports": ["Mathlib"]
36
+ }
37
+ ```
38
+
39
+ ### Example usage:
40
+
41
+ ```bash
42
+ ds = datasets.load_dataset('wellecks/ntp-lean-mathlib-tactic')
43
+
44
+ print(len(ds['train']))
45
+ # ==> 337162
46
+ ```
47
+
48
+ ### Example (`ds['train'][0]`):
49
+ ```json
50
+ {
51
+ 'state': 'R : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\n⊢ r ∈ annihilator (span R s) ↔ ∀ (n : ↑s), r • ↑n = 0',
52
+ 'srcUpToTactic': '/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau\n-/\nimport Mathlib.Algebra.Algebra.Operations\nimport Mathlib.Algebra.Ring.Equiv\nimport Mathlib.Data.Nat.Choose.Sum\nimport Mathlib.LinearAlgebra.Basis.Bilinear\nimport Mathlib.RingTheory.Coprime.Lemmas\nimport Mathlib.RingTheory.Ideal.Basic\nimport Mathlib.Algebra.GroupWithZero.NonZeroDivisors\n\n#align_import ring_theory.ideal.operations from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74"\n\n/-!\n# More operations on modules and ideals\n-/\n\nuniverse u v w x\n\nopen BigOperators Pointwise\n\nnamespace Submodule\n\nvariable {R : Type u} {M : Type v} {F : Type*} {G : Type*}\n\nsection CommSemiring\n\nvariable [CommSemiring R] [AddCommMonoid M] [Module R M]\n\nopen Pointwise\n\ninstance hasSMul\' : SMul (Ideal R) (Submodule R M) :=\n ⟨Submodule.map₂ (LinearMap.lsmul R M)⟩\n#align submodule.has_smul\' Submodule.hasSMul\'\n\n/-- This duplicates the global `smul_eq_mul`, but doesn\'t have to unfold anywhere near as much to\napply. -/\nprotected theorem _root_.Ideal.smul_eq_mul (I J : Ideal R) : I • J = I * J :=\n rfl\n#align ideal.smul_eq_mul Ideal.smul_eq_mul\n\n/-- `N.annihilator` is the ideal of all elements `r : R` such that `r • N = 0`. -/\ndef annihilator (N : Submodule R M) : Ideal R :=\n LinearMap.ker (LinearMap.lsmul R N)\n#align submodule.annihilator Submodule.annihilator\n\nvariable {I J : Ideal R} {N P : Submodule R M}\n\ntheorem mem_annihilator {r} : r ∈ N.annihilator ↔ ∀ n ∈ N, r • n = (0 : M) :=\n ⟨fun hr n hn => congr_arg Subtype.val (LinearMap.ext_iff.1 (LinearMap.mem_ker.1 hr) ⟨n, hn⟩),\n fun h => LinearMap.mem_ker.2 <| LinearMap.ext fun n => Subtype.eq <| h n.1 n.2⟩\n#align submodule.mem_annihilator Submodule.mem_annihilator\n\ntheorem mem_annihilator\' {r} : r ∈ N.annihilator ↔ N ≤ comap (r • (LinearMap.id : M →ₗ[R] M)) ⊥ :=\n mem_annihilator.trans ⟨fun H n hn => (mem_bot R).2 <| H n hn, fun H _ hn => (mem_bot R).1 <| H hn⟩\n#align submodule.mem_annihilator\' Submodule.mem_annihilator\'\n\ntheorem mem_annihilator_span (s : Set M) (r : R) :\n r ∈ (Submodule.span R s).annihilator ↔ ∀ n : s, r • (n : M) = 0 := by\n ',
53
+ 'nextTactic': 'rw [Submodule.mem_annihilator]',
54
+ 'declUpToTactic': 'theorem mem_annihilator_span (s : Set M) (r : R) :\n r ∈ (Submodule.span R s).annihilator ↔ ∀ n : s, r • (n : M) = 0 := by\n ',
55
+ 'declId': 'Examples.Mathlib.SplitRw.Mathlib_RingTheory_Ideal_Operations.60_0.HxKMH2Rj0L5BSy4',
56
+ 'decl': 'theorem mem_annihilator_span (s : Set M) (r : R) :\n r ∈ (Submodule.span R s).annihilator ↔ ∀ n : s, r • (n : M) = 0 ',
57
+ 'file_tag': 'Mathlib_RingTheory_Ideal_Operations'
58
+ }
59
+ ```