Update README.md
Browse files
README.md
CHANGED
|
@@ -50,40 +50,3 @@ output = model.generate(text, sampling_params=sampling_params)
|
|
| 50 |
output_text = output[0].outputs[0].text
|
| 51 |
print(output_text)
|
| 52 |
```
|
| 53 |
-
|
| 54 |
-
# Lemmas usage
|
| 55 |
-
|
| 56 |
-
You can provide lemmas to the model to assist its reasoning, and it uses them as tools to help construct or guide the formal proof of the theorem.
|
| 57 |
-
|
| 58 |
-
```python
|
| 59 |
-
problem = "What is the smallest positive integer $t$ such that there exist integers $x_{1}, x_{2}, \\ldots, x_{t}$ with $$ x_{1}^{3}+x_{2}^{3}+\\cdots+x_{t}^{3}=2002^{2002} ? $$"
|
| 60 |
-
formal_statement = """import Mathlib
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
lemma lemma_1 (x : ℤ) : x^3 ≡ 0 [ZMOD 9] ∨ x^3 ≡ 1 [ZMOD 9] ∨ x^3 ≡ 8 [ZMOD 9] := by
|
| 64 |
-
have h1 : x % 9 = 0 ∨ x % 9 = 1 ∨ x % 9 = 2 ∨ x % 9 = 3 ∨ x % 9 = 4 ∨ x % 9 = 5 ∨ x % 9 = 6 ∨ x % 9 = 7 ∨ x % 9 = 8 := by
|
| 65 |
-
omega
|
| 66 |
-
rcases h1 with (h1 | h1 | h1 | h1 | h1 | h1 | h1 | h1 | h1) <;> simp [Int.ModEq, pow_three, Int.add_emod, Int.mul_emod, h1, Int.sub_emod]
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
theorem number_theory_25102 :
|
| 70 |
-
IsLeast {t : ℕ | 0 < t ∧ ∃ x : Fin t → ℤ, ∑ i : Fin t, (x i)^3 = 2002^2002} 4 := by
|
| 71 |
-
|
| 72 |
-
"""
|
| 73 |
-
prompt = "Think about and solve the following problem step by step in Lean 4."
|
| 74 |
-
prompt += f"\n# Problem:{problem}"""
|
| 75 |
-
prompt += f"\n# Formal statement:\n```lean4\n{formal_statement}\n```\n"
|
| 76 |
-
messages = [
|
| 77 |
-
{"role": "system", "content": "You are an expert in mathematics and Lean 4."},
|
| 78 |
-
{"role": "user", "content": prompt}
|
| 79 |
-
]
|
| 80 |
-
text = tokenizer.apply_chat_template(
|
| 81 |
-
messages,
|
| 82 |
-
tokenize=False,
|
| 83 |
-
add_generation_prompt=True
|
| 84 |
-
)
|
| 85 |
-
sampling_params = SamplingParams(temperature=0.6, top_p=0.95, max_tokens=8096)
|
| 86 |
-
output = model.generate(text, sampling_params=sampling_params)
|
| 87 |
-
output_text = output[0].outputs[0].text
|
| 88 |
-
print(output_text)
|
| 89 |
-
```
|
|
|
|
| 50 |
output_text = output[0].outputs[0].text
|
| 51 |
print(output_text)
|
| 52 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|