diff --git a/README.md b/README.md index 66089f8..a8d905e 100644 --- a/README.md +++ b/README.md @@ -25,25 +25,31 @@ A **solver**, **prover**, **verifier**, **augmentor**. # News -- [2024.05.24] We release updated version InternLM2-Math-Plus with 4 sizes and state-of-the-art performances including 1.8B, 7B, 20B, and 8x22B. We improve informal math reasoning performance (chain-of-thought and code-intepreter) and formal math reasoning performance (LEAN 4 translation and LEAN 4 theorem proving) significantly. -- [2024.02.10] We add tech reports and citation reference. +- [2024.10.22] We release **InternLM2.5-Step-Prover** policy and critic models with 14k proves found in Lean-Workbook. [🤗Dataset](https://huggingface.co/datasets/internlm/Lean-Workbook) [🤗Policy-model](https://huggingface.co/internlm/internlm2_5-step-prover) [🤗Critic-model](https://huggingface.co/internlm/internlm2_5-step-prover-critic) [📑 Paper](https://arxiv.org/abs/2410.15700) +- [2024.07.25] We release **Lean-Github** and **InternLM2-Step-Prover** with 29K theorems compiled from 100+ Lean 4 repos and a 7B models fine-tuned on Lean-Github and Lean-Workbook with SOTA performance on MiniF2F-test (54.5%), ProofNet (18.1%), and Putnam (5 problems). [🤗Dataset](https://huggingface.co/datasets/internlm/Lean-Github) [🤗Model](https://huggingface.co/internlm/internlm2-step-prover) [📑 Paper](https://arxiv.org/abs/2407.17227) [📖 README](https://github.com/InternLM/InternLM-Math/blob/main/lean-github/README.md) +- [2024.06.06] We release **Lean-Workbook** with 57K math problems formalized in Lean 4 with 5K searched proof for autoformalization and auto theorem proving. [🤗Dataset](https://huggingface.co/datasets/internlm/Lean-Workbook) [📑 Paper](https://arxiv.org/abs/2406.03847) +- [2024.05.24] We release updated version **InternLM2-Math-Plus** with 4 sizes and state-of-the-art performances including 1.8B, 7B, 20B, and 8x22B. We improve informal math reasoning performance (chain-of-thought and code-interpreter) and formal math reasoning performance (LEAN 4 translation and LEAN 4 theorem proving) significantly. +- [2024.02.10] We add tech reports and citation references. - [2024.01.31] We add MiniF2F results with evaluation codes! -- [2024.01.29] We add checkpoints from ModelScope. Update results about majority voting and Code Intepreter. Tech report is on the way! +- [2024.01.29] We add checkpoints from ModelScope. Update results about majority voting and Code Interpreter. Tech report is on the way! - [2024.01.26] We add checkpoints from OpenXLab, which ease Chinese users to download! # InternLM2-Math-Plus -## Download +## Checkpoints -| Model | Model Type | Transformers(HF) | Release Date | -| --------------------------- | ---------- | -------------------------------------------------------------------------------------------- |------------ | -| **InternLM2-Math-Plus-1.8B** | Chat | 🤗[internlm/internlm2-math-plus-1_8b](https://huggingface.co/internlm/internlm2-math-plus-1_8b/) | 2024-05-27 | -| **InternLM2-Math-Plus-7B** | Chat | 🤗[internlm/internlm2-math-plus-7b](https://huggingface.co/internlm/internlm2-math-plus-7b/) | 2024-05-27 | -| **InternLM2-Math-Plus-20B** | Chat | 🤗[internlm/internlm2-math-plus-20b](https://huggingface.co/internlm/internlm2-math-plus-20b/) | 2024-05-27 | -| **InternLM2-Math-Plus-Mixtral8x22B** | Chat | 🤗[internlm/internlm2-math-plus-mixtral8x22b](https://huggingface.co/internlm/internlm2-math-plus-mixtral8x22b/) | 2024-05-27 | +| Model | Model Type | Transformers(HF) | ModelScope | Release Date | +| ------------------------------------ | ---------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | +| **InternLM2-Math-Plus-1.8B** | Chat | 🤗[internlm/internlm2-math-plus-1_8b](https://huggingface.co/internlm/internlm2-math-plus-1_8b/) | [Shanghai_AI_Laboratory/internlm2-math-plus-1_8b](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-plus-1_8b/summary) | 2024-05-27 | +| **InternLM2-Math-Plus-7B** | Chat | 🤗[internlm/internlm2-math-plus-7b](https://huggingface.co/internlm/internlm2-math-plus-7b/) | [Shanghai_AI_Laboratory/internlm2-math-plus-7b](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-plus-7b/summary) | 2024-05-27 | +| **InternLM2-Math-Plus-20B** | Chat | 🤗[internlm/internlm2-math-plus-20b](https://huggingface.co/internlm/internlm2-math-plus-20b/) | [Shanghai_AI_Laboratory/internlm2-math-plus-20b](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-plus-20b/summary) | 2024-05-27 | +| **InternLM2-Math-Plus-Mixtral8x22B** | Chat | 🤗[internlm/internlm2-math-plus-mixtral8x22b](https://huggingface.co/internlm/internlm2-math-plus-mixtral8x22b/) | [Shanghai_AI_Laboratory/internlm2-math-plus-mixtral8x22b](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm2-math-plus-mixtral8x22b/summary) | 2024-05-27 | ## Formal Math Reasoning -We evaluate the performance of InternLM2-Math-Plus on formal math reasoning benchmark MiniF2F-test. The evaluation setting is same as Llemma with LEAN 4. +We evaluate the performance of InternLM2-Math-Plus on formal math reasoning benchmark MiniF2F-test. The evaluation setting is same as Llemma with LEAN 4. + +> This is how to reproduce our performance on [MiniF2F](minif2f/README.md). + | Models | MiniF2F-test | | -------------------------------- | ------------ | | ReProver | 26.5 | @@ -61,6 +67,9 @@ We evaluate the performance of InternLM2-Math-Plus on formal math reasoning benc ## Informal Math Reasoning We evaluate the performance of InternLM2-Math-Plus on informal math reasoning benchmark MATH and GSM8K. InternLM2-Math-Plus-1.8B outperforms MiniCPM-2B in the smallest size setting. InternLM2-Math-Plus-7B outperforms Deepseek-Math-7B-RL which is the state-of-the-art math reasoning open source model. InternLM2-Math-Plus-Mixtral8x22B achieves 68.5 on MATH (with Python) and 91.8 on GSM8K. + +> For tool-calling inference and evaluation, please see the [agent section](agent/). + | Model | MATH | MATH-Python | GSM8K | | -------------------------------- | -------- | ----------- | -------- | | MiniCPM-2B | 10.2 | - | 53.8 | @@ -94,7 +103,7 @@ We also evaluate models on [MathBench-A](https://github.com/open-compass/MathBen | InternLM2-Math-Plus-1.8B | 43.0 | 43.3 | 25.4 | 18.9 | 4.7 | 27.1 | -# Introduction +# Introduction (For InternLM2-Math) - **7B and 20B Chinese and English Math LMs with better than ChatGPT performances.** InternLM2-Math are continued pretrained from InternLM2-Base with ~100B high quality math-related tokens and SFT with ~2M bilingual math supervised data. We apply minhash and exact number match to decontaminate possible test set leakage. - **Add Lean as a support language for math problem solving and math theorem proving.** We are exploring combining Lean 3 with InternLM-Math for verifiable math reasoning. InternLM-Math can generate Lean codes for simple math reasoning tasks like GSM8K or provide possible proof tactics based on Lean states. - **Also can be viewed as a reward model, which supports the Outcome/Process/Lean Reward Model.** We supervise InternLM2-Math with various types of reward modeling data, to make InternLM2-Math can also verify chain-of-thought processes. We also add the ability to convert a chain-of-thought process into Lean 3 code. @@ -281,4 +290,30 @@ Our model is still under development and will be upgraded. There are some possib archivePrefix={arXiv}, primaryClass={cs.CL} } +@misc{ying2024lean, + title={Lean Workbook: A large-scale Lean problem set formalized from natural language math problems}, + author={Huaiyuan Ying and Zijian Wu and Yihan Geng and Jiayu Wang and Dahua Lin and Kai Chen}, + year={2024}, + eprint={2406.03847}, + archivePrefix={arXiv}, + primaryClass={cs.CL} +} +@misc{wu2024leangithubcompilinggithublean, + title={LEAN-GitHub: Compiling GitHub LEAN repositories for a versatile LEAN prover}, + author={Zijian Wu and Jiayu Wang and Dahua Lin and Kai Chen}, + year={2024}, + eprint={2407.17227}, + archivePrefix={arXiv}, + primaryClass={cs.AI}, + url={https://arxiv.org/abs/2407.17227}, +} +@misc{wu2024internlm25stepproveradvancingautomatedtheorem, + title={InternLM2.5-StepProver: Advancing Automated Theorem Proving via Expert Iteration on Large-Scale LEAN Problems}, + author={Zijian Wu and Suozhi Huang and Zhejian Zhou and Huaiyuan Ying and Jiayu Wang and Dahua Lin and Kai Chen}, + year={2024}, + eprint={2410.15700}, + archivePrefix={arXiv}, + primaryClass={cs.AI}, + url={https://arxiv.org/abs/2410.15700}, +} ``` diff --git a/agent/README.md b/agent/README.md new file mode 100644 index 0000000..29aa6e1 --- /dev/null +++ b/agent/README.md @@ -0,0 +1,81 @@ +# InternLM-Math Agent + +The performance of InternLM-Math could be lifted by external tools. We provide an example using [Lagent](https://github.com/InternLM/lagent) to build agents interacting with the code interpreter to solve MATH problems. + +## Setup + +Install the extra dependencies + +```sh +pip install -r requirements.txt +``` + +## Usages + +Run the following script to perform inference and evaluation on MATH test. + + +```sh +python math_agent.py \ + --backend=lmdeploy \ # For HuggingFace models: hf + --model_path=internlm/internlm2-math-plus-1_8b \ + --tp=1 \ + --temperature=1.0 \ + --top_k=1 \ + --output_path=math_lmdeploy.jsonl \ + --do_eval +``` + +`output_path` is a jsonl format file to save the inference results. Each line is like + +```json +{ + "problem": "The point $(a, b)$ lies on the line with the equation $3x + 2y = 12.$ When $a = 4$, what is the value of $b$?", + "level": "Level 2", + "type": "Algebra", + "solution": "We plug in $x = 4$: \\begin{align*}\n3(4) + 2y &= 12\\\\\n12 + 2y &= 12\\\\\ny &= 0.\n\\end{align*}\n\nTherefore, $b = \\boxed{0}$.", + "idx": 41, + "query": "The point $(a, b)$ lies on the line with the equation $3x + 2y = 12.$ When $a = 4$, what is the value of $b$?", + "gt": "0", + "pred": [ + "0" + ], + "steps": [ + { + "role": "language", + "content": "To find the value of $b$ when $a = 4$ for the line with the equation $3x + 2y = 12$, we can substitute $a = 4$ into the equation and solve for $b$. This will give us the coordinates of the point $(a, b)$ on the line.\n\nLet's start by substituting $a = 4$ into the equation and solving for $b$." + }, + { + "role": "tool", + "content": { + "name": "IPythonInteractiveManager", + "parameters": { + "command": "```python\nfrom sympy import symbols, Eq, solve\n\n# Define symbols\na, b = symbols('a b')\n\n# Given equation of the line\nequation = Eq(3*a + 2*b, 12)\n\n# Substitute a = 4 into the equation\nsubstituted_equation = equation.subs(a, 4)\n\n# Solve for b\nsolution = solve(substituted_equation, b)\n\nsolution[0]\n```" + } + }, + "name": "interpreter" + }, + { + "role": "environment", + "content": "0", + "name": "interpreter" + }, + { + "role": "language", + "content": "After substituting $a = 4$ into the equation and solving for $b$, we find that $b = 0$. Therefore, the value of $b$ when $a = 4$ for the given line is $\\boxed{0}$." + } + ], + "error": null +} +``` + +Once it is prepared, just skip the inference stage as follows. + +```bash +python math_agent.py \ + --output_path=math_lmdeploy.jsonl \ + --no-do_infer \ + --do_eval +``` + +Please refer to [`math_agent.py`](math_agent.py) for more information about the arguments. \ No newline at end of file diff --git a/agent/math_agent.py b/agent/math_agent.py new file mode 100644 index 0000000..9660d89 --- /dev/null +++ b/agent/math_agent.py @@ -0,0 +1,696 @@ +# flake8: noqa +# isort: skip_file + +# This logic is modified from ToRA: +# - https://github.com/microsoft/ToRA +# +# Copyright (c) Microsoft Corporation. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE + +import argparse +import multiprocessing +import os +import re +import sys +import traceback +from math import isclose, ceil +from typing import Union + +import jsonlines +import numpy as np +from datasets import load_dataset +from lagent import (INTERNLM2_META, ActionExecutor, HFTransformer, + Internlm2Agent, Internlm2Protocol, LMDeployPipeline, + IPythonInteractiveManager) +from pebble import ProcessPool +from sympy import N, simplify +from sympy.parsing.latex import parse_latex +from sympy.parsing.sympy_parser import parse_expr +from tqdm import tqdm + +# --------------------- modify the system prompt as needed --------------------- +DEFAULT_PROMPT = ( + 'Integrate step-by-step reasoning and Python code to solve math problems ' + 'using the following guidelines:\n' + '- Analyze the question and write jupyter code to solve the problem;\n' + r"- Present the final result in LaTeX using a '\boxed{{}}' without any " + 'units. \n') +# ------------------------------------------------------------------------------ + + +def parse_args(): + parser = argparse.ArgumentParser(description='Math Code Interpreter') + parser.add_argument( + '--backend', + type=str, + default='lmdeploy', + help='Which inference framework to use.', + choices=['lmdeploy', 'hf']) + parser.add_argument( + '--model_path', + type=str, + default='internlm/internlm2-chat-7b', + help='Path or name to the model, could be HuggingFace model specifier.' + ) + parser.add_argument( + '--output_path', + type=str, + required=True, + help='Path to save inference results to, should be a `jsonl` file') + parser.add_argument( + '--batch_size', + type=int, + default=100, + help='Agent inference batch size') + parser.add_argument( + '--max_turn', + type=int, + default=5, + help= + 'Maximum number of interaction rounds between the agent and environment' + ) + parser.add_argument( + '--tp', + type=int, + default=1, + help='Number of tensor parallelism. It may be required in LMDelpoy.') + parser.add_argument( + '--temperature', + type=float, + default=0.1, + help='Temperature in next token prediction') + parser.add_argument( + '--top_p', + type=float, + default=0.8, + help='Parameter for Top-P Sampling.') + parser.add_argument( + '--top_k', type=int, default=40, help='Parameter for Top-K Sampling.') + parser.add_argument( + '--stop_words', + type=str, + default=['<|action_end|>', '<|im_end|>'], + action='append', + help='Stop words') + parser.add_argument( + '--max_new_tokens', + type=int, + default=512, + help='Number of maximum generated tokens.') + parser.add_argument( + '--do_infer', + default=True, + action=argparse.BooleanOptionalAction, # python > 3.8 + help='Whether to launch model inference.') + # parser.add_argument( + # '--no-do_infer', + # dest='do_infer', + # action='store_false', + # help='Disable the inference.' + # ) + parser.add_argument( + '--do_eval', + default=False, + action='store_true', + help='Whether to evaluate the inference results.') + parser.add_argument( + '--overwrite', + default=False, + action='store_true', + help='Whether to overwrite the existing result file') + return parser.parse_args() + + +def _fix_fracs(string): + substrs = string.split('\\frac') + new_str = substrs[0] + if len(substrs) > 1: + substrs = substrs[1:] + for substr in substrs: + new_str += '\\frac' + if len(substr) > 0 and substr[0] == '{': + new_str += substr + else: + try: + assert len(substr) >= 2 + except Exception: + return string + a = substr[0] + b = substr[1] + if b != '{': + if len(substr) > 2: + post_substr = substr[2:] + new_str += '{' + a + '}{' + b + '}' + post_substr + else: + new_str += '{' + a + '}{' + b + '}' + else: + if len(substr) > 2: + post_substr = substr[2:] + new_str += '{' + a + '}' + b + post_substr + else: + new_str += '{' + a + '}' + b + string = new_str + return string + + +def _fix_a_slash_b(string): + if len(string.split('/')) != 2: + return string + a = string.split('/')[0] + b = string.split('/')[1] + try: + if 'sqrt' not in a: + a = int(a) + if 'sqrt' not in b: + b = int(b) + assert string == '{}/{}'.format(a, b) + new_string = '\\frac{' + str(a) + '}{' + str(b) + '}' + return new_string + except Exception: + return string + + +def _fix_sqrt(string): + _string = re.sub(r'\\sqrt(\w+)', r'\\sqrt{\1}', string) + return _string + + +def strip_string(string): + string = str(string).strip() + # linebreaks + string = string.replace('\n', '') + + # right "." + string = string.rstrip('.') + + # remove inverse spaces + string = string.replace('\\!', '') + string = string.replace('\\ ', '') + + # replace \\ with \ + string = string.replace('\\\\', '\\') + string = string.replace('\\\\', '\\') + + # replace tfrac and dfrac with frac + string = string.replace('tfrac', 'frac') + string = string.replace('dfrac', 'frac') + + # remove \left and \right + string = string.replace('\\left', '') + string = string.replace('\\right', '') + + # Remove unit: miles, dollars if after is not none + _string = re.sub(r'\\text{.*?}$', '', string).strip() + if _string != '' and _string != string: + # print("Warning: unit not removed: '{}' -> '{}'".format(string, _string)) + string = _string + + # Remove circ (degrees) + string = string.replace('^{\\circ}', '') + string = string.replace('^\\circ', '') + + # remove dollar signs + string = string.replace('\\$', '') + string = string.replace('$', '') + + string = string.replace('\\text', '') + string = string.replace('x\\in', '') + + # remove percentage + string = string.replace('\\%', '') + string = string.replace('\%', '') + string = string.replace('%', '') + + # " 0." equivalent to " ." and "{0." equivalent to "{." Alternatively, add "0" if "." is the start of the string + string = string.replace(' .', ' 0.') + string = string.replace('{.', '{0.') + + # cdot + string = string.replace('\\cdot', '') + + # inf + string = string.replace('infinity', '\\infty') + if '\\infty' not in string: + string = string.replace('inf', '\\infty') + string = string.replace('+\\inity', '\\infty') + + # and + string = string.replace('and', '') + string = string.replace('\\mathbf', '') + + # use regex to remove \mbox{...} + string = re.sub(r'\\mbox{.*?}', '', string) + + # quote + string.replace("'", '') + string.replace('"', '') + + # i, j + if 'j' in string and 'i' not in string: + string = string.replace('j', 'i') + + # replace a.000b where b is not number or b is end, with ab, use regex + string = re.sub(r'(\d+)\.0+([^\d])', r'\1\2', string) + string = re.sub(r'(\d+)\.0+$', r'\1', string) + + # if empty, return empty string + if len(string) == 0: + return string + if string[0] == '.': + string = '0' + string + + # to consider: get rid of e.g. "k = " or "q = " at beginning + if len(string.split('=')) == 2: + if len(string.split('=')[0]) <= 2: + string = string.split('=')[1] + + string = _fix_sqrt(string) + string = string.replace(' ', '') + + # \frac1b or \frac12 --> \frac{1}{b} and \frac{1}{2}, etc. Even works with \frac1{72} (but not \frac{72}1). Also does a/b --> \\frac{a}{b} + string = _fix_fracs(string) + + # NOTE: X/Y changed to \frac{X}{Y} in dataset, but in simple cases fix in case the model output is X/Y + string = _fix_a_slash_b(string) + + return string + + +def last_boxed_only_string(string): + idx = string.rfind('\\boxed') + if idx < 0: + idx = string.rfind('\\fbox') + if idx < 0: + return None + + i = idx + right_brace_idx = None + num_left_braces_open = 0 + while i < len(string): + if string[i] == '{': + num_left_braces_open += 1 + if string[i] == '}': + num_left_braces_open -= 1 + if num_left_braces_open == 0: + right_brace_idx = i + break + i += 1 + + if right_brace_idx is None: + retval = None + else: + retval = string[idx:right_brace_idx + 1] + + return retval + + +def extract_answer(pred_str: str, execute: bool = False) -> str: + if re.search('\boxed|boxed', pred_str): + answer = re.split('\boxed|boxed', pred_str)[-1] + if len(answer) == 0: + return '' + elif (answer[0] == '{'): + stack = 1 + a = '' + for c in answer[1:]: + if (c == '{'): + stack += 1 + a += c + elif (c == '}'): + stack -= 1 + if (stack == 0): break + a += c + else: + a += c + else: + a = answer.split('$')[0].strip() + elif re.search('[Tt]he (final )?answer is:?', pred_str): + a = re.split('[Tt]he (final )?answer is:?', + pred_str)[-1].strip().rstrip('.') + elif pred_str.startswith('```python') and execute: + # fall back to program + from lagent import get_tool + + a = get_tool('IPythonInteractive').exec(pred_str).value or '' + else: # use the last number + pred = re.findall(r'-?\d*\.?\d+', pred_str.replace(',', '')) + if len(pred) >= 1: + a = pred[-1] + else: + a = '' + # multiple lines + pred = a.split('\n')[0] + if pred != '' and pred[0] == ':': + pred = pred[1:] + if pred != '' and pred[-1] == '.': + pred = pred[:-1] + if pred != '' and pred[-1] == '/': + pred = pred[:-1] + pred = strip_string(pred) + return pred + + +def is_digit(s): + try: + float(str(s).replace(',', '')) + return True + except ValueError: + return False + + +def math_equal( + prediction: Union[bool, float, str], + reference: Union[float, str], + include_percentage: bool = True, + is_close: bool = True, + tolerance: float = 1e-4, + timeout: bool = False, +) -> bool: + """Exact match of math if and only if: + + 1. numerical equal: both can convert to float and are equal + 2. symbolic equal: both can convert to sympy expression and are equal + """ + try: # 1. numerical equal + if is_digit(prediction) and is_digit(reference): + prediction = float(str(prediction).replace(',', '')) + reference = float(str(reference).replace(',', '')) + # number questions + if include_percentage: + gt_result = [reference / 100, reference, reference * 100] + else: + gt_result = [reference] + for item in gt_result: + try: + if is_close: + if isclose(item, prediction, rel_tol=tolerance): + return True + else: + if item == prediction: + return True + except Exception: + continue + return False + except Exception: + pass + + if not prediction and prediction not in [0, False]: + return False + + # 2. symbolic equal + reference = str(reference).strip() + prediction = str(prediction).strip() + + ## deal with [], (), {} + pred_str, ref_str = prediction, reference + if (prediction.startswith('[') and prediction.endswith(']') + and not reference.startswith('(')) or ( + prediction.startswith('(') and prediction.endswith(')') + and not reference.startswith('[')): + pred_str = pred_str.strip('[]()') + ref_str = ref_str.strip('[]()') + for s in ['{', '}', '(', ')']: + ref_str = ref_str.replace(s, '') + pred_str = pred_str.replace(s, '') + if pred_str == ref_str: + return True + + ## [a, b] vs. [c, d], return a==c and b==d + if ((prediction.startswith('[') and prediction.endswith(']')) and + (reference.startswith('[') and reference.endswith(']')) + or (prediction.startswith('(') and prediction.endswith(')')) and + (reference.startswith('(') and reference.endswith(')'))): + pred_parts = prediction[1:-1].split(',') + ref_parts = reference[1:-1].split(',') + if len(pred_parts) == len(ref_parts): + if all([ + math_equal(pred_parts[i], ref_parts[i], include_percentage, + is_close) for i in range(len(pred_parts)) + ]): + return True + + # symbolic equal with sympy + if timeout: + if call_with_timeout(symbolic_equal_process, prediction, reference): + return True + else: + if symbolic_equal(prediction, reference): + return True + + return False + + +def math_equal_process(param): + return math_equal(param[-2], param[-1]) + + +def symbolic_equal(a, b): + + def _parse(s): + for f in [parse_latex, parse_expr]: + try: + return f(s) + except Exception: + pass + return s + + a = _parse(a) + b = _parse(b) + + try: + if simplify(a - b) == 0: + return True + except Exception: + pass + + try: + if isclose(N(a), N(b), rel_tol=1e-3): + return True + except Exception: + pass + return False + + +def symbolic_equal_process(a, b, output_queue): + result = symbolic_equal(a, b) + output_queue.put(result) + + +def call_with_timeout(func, *args, timeout=1, **kwargs): + output_queue = multiprocessing.Queue() + process_args = args + (output_queue, ) + process = multiprocessing.Process( + target=func, args=process_args, kwargs=kwargs) + process.start() + process.join(timeout) + + if process.is_alive(): + process.terminate() + process.join() + return False + + return output_queue.get() + + +def init_agent(backend: str, max_turn: int, model_path: str, tp: int, + **kwargs): + if backend == 'lmdeploy': + from lmdeploy import TurbomindEngineConfig + model = LMDeployPipeline( + path=model_path, + model_name='internlm2-chat', + meta_template=INTERNLM2_META, + pipeline_cfg=dict(backend_config=TurbomindEngineConfig(tp=tp)), + **kwargs) + elif backend == 'hf': + model = HFTransformer( + path=model_path, meta_template=INTERNLM2_META, **kwargs) + else: + raise NotImplementedError + + agent = Internlm2Agent( + llm=model, + protocol=Internlm2Protocol( + meta_prompt=None, interpreter_prompt=DEFAULT_PROMPT), + interpreter_executor=ActionExecutor(actions=[ + IPythonInteractiveManager( + max_workers=200, + ci_lock=os.path.join( + os.path.dirname(__file__), '.ipython.lock')) + ]), + max_turn=max_turn) + return agent + + +def predict(args): + + def process(d, k): + d['idx'] = k + d['query'] = d['problem'] + gt = extract_answer(d['solution']) + if '\\boxed{90\\text{ square\nunits}}' in d['solution']: + gt = '90' + elif '$6$ is our answer' in d['solution']: + gt = '6' + elif gt.startswith('x\\in'): + gt = gt[len('x\\in'):] + gt = strip_string(gt) + d['gt'] = gt + d['pred'], d['steps'] = [], [] + d['error'] = None + return d + + dataset = load_dataset('lighteval/MATH', split='test').map(process, True) + agent = init_agent( + backend=args.backend, + max_turn=args.max_turn, + model_path=args.model_path, + tp=args.tp, + temperature=args.temperature, + stop_words=args.stop_words, + top_p=args.top_p, + top_k=args.top_k, + max_new_tokens=args.max_new_tokens, + ) + num_batches = ceil(len(dataset) / args.batch_size) + with jsonlines.open(args.output_path, 'w', flush=True) as f: + for i in tqdm(range(num_batches)): + batch = dataset.select( + range(i * args.batch_size, + min((i + 1) * args.batch_size, len(dataset)))) + try: + rets = agent.batch_chat(batch['query']) + for item, ret in zip(batch, rets): + item['steps'] = ret.inner_steps + last = item['steps'][-1] + item['pred'].append( + extract_answer(last['content']) if last['role'] == + 'language' else '😭') + f.write(item) + except Exception as e: + err = str(traceback.format_exc()) + print(f'Processing batch data error: {e}\n{err}') + for item in batch: + item['error'] = err + f.write(item) + finally: + agent._interpreter_executor.actions[ + 'IPythonInteractiveManager'].reset() + + +def evaluate(args): + samples = [sample for sample in jsonlines.open(args.output_path)] + scores = [] + timeout_cnt = 0 + with ProcessPool() as pool: + future = pool.map( + math_equal_process, + [(idx, pred, sample['gt']) for idx, sample in enumerate(samples) + for pred in sample['pred']], + timeout=20, + ) + iterator = future.result() + with tqdm(total=len(samples), desc='Evaluate') as progress_bar: + while True: + try: + result = next(iterator) + scores.append(result) + except StopIteration: + break + except TimeoutError as error: + print(error) + scores.append(False) + timeout_cnt += 1 + except Exception as error: + print(error.__traceback__) + scores.append(False) + # sys.exit() + progress_bar.update(1) + + idx = 0 + score_mat = [] + for sample in samples: + sample['score'] = scores[idx:idx + len(sample['pred'])] + assert len(sample['score']) == len(sample['pred']) + score_mat.append(sample['score']) + idx += len(sample['pred']) + + max_len = max([len(s) for s in score_mat]) + + for i, s in enumerate(score_mat): + if len(s) < max_len: + score_mat[i] = s + [s[-1]] * (max_len - len(s)) # pad + + # output mean of each column of scores + col_means = np.array(score_mat).mean(axis=0) + mean_score = list(np.round(col_means * 100, decimals=1)) + + result_str = f'Num samples: {len(samples)}\n' \ + f'Num scores: {len(scores)}\n' \ + f'Sum scores: {sum(scores)}\n' \ + f'Timeout samples: {timeout_cnt}\n' \ + f"Empty samples: {len([s for s in samples if not s['pred'][-1]])}\n" \ + f'Mean score: {mean_score}\n' + + # each type score + if 'type' in samples[0]: + type_scores = {} + for sample in samples: + if sample['type'] not in type_scores: + type_scores[sample['type']] = [] + type_scores[sample['type']].append(sample['score'][-1]) + type_scores = { + k: np.round(np.array(v).mean() * 100, decimals=1) + for k, v in type_scores.items() + } + type_scores = { + k: v + for k, v in sorted(type_scores.items(), key=lambda item: item[0]) + } + result_str += f'Type scores: {type_scores}\n' + + print(result_str) + + +if __name__ == '__main__': + args = parse_args() + if args.do_infer and os.path.exists( + args.output_path) and not args.overwrite: + args.do_infer = False + print(f'File {args.output_path} already exists. ' + f'Please add the `--overwrite` flag if needed.') + if args.do_infer: + predict(args) + if args.do_eval: + if not args.do_infer: + evaluate(args) + else: + import subprocess + + res = subprocess.run( + [ + sys.executable, __file__, '--output_path', + args.output_path, '--no-do_infer', '--do_eval' + ], + capture_output=True, + text=True, + check=True, + ) + print(res.stdout) diff --git a/agent/requirements.txt b/agent/requirements.txt new file mode 100644 index 0000000..602fda4 --- /dev/null +++ b/agent/requirements.txt @@ -0,0 +1,10 @@ +lmdeploy>=0.2.2 +datasets +tqdm +numpy +pebble +jsonlines +sympy==1.12 +antlr4-python3-runtime==4.11.0 +lagent @ git+https://github.com/InternLM/lagent@main +einops \ No newline at end of file diff --git a/eval/pretrain/minif2f/README.md b/eval/pretrain/minif2f/README.md deleted file mode 100644 index 6b37cbc..0000000 --- a/eval/pretrain/minif2f/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# `InternMath2` formal2formal - -Scripts for the Lean formal2formal (tactic prediction) experiments. Adapted from -[`llemma`_formal2formal](https://github.com/wellecks/llemma_formal2formal). - - -#### Setup -Install Python packages: -``` -pip install -r requirements.txt -``` - -Install Lean: -``` -# from https://leanprover-community.github.io/install/linux.html -# After running this command, select (2), then `nightly`, then `y`: -curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -source $HOME/.elan/env -lake -``` - -Configure LeanDojo: -``` -export CONTAINER="native" -``` - -Patch vllm - -Currently vllm doesn't officially support `internLM2`. Adaptations from the vllm community can be found here [#2666](https://github.com/vllm-project/vllm/pull/2666) [#2527](https://github.com/vllm-project/vllm/pull/2527). - - -#### Run -See `scripts` - -#### Compute metrics - -First unzip `output.zip` to get the detailed evaluation results. Then the metrics can be computed. - -```bash -python compute_metrics.py -==> - -internLM2-7b_minif2f_test 0.30327868852459017 74 244 -internLM2-20b_minif2f_test 0.29508196721311475 72 244 -``` diff --git a/eval/pretrain/minif2f/output.zip b/eval/pretrain/minif2f/output.zip deleted file mode 100644 index 7846d7a..0000000 Binary files a/eval/pretrain/minif2f/output.zip and /dev/null differ diff --git a/eval/pretrain/minif2f/requirements.txt b/eval/pretrain/minif2f/requirements.txt deleted file mode 100644 index eff20c0..0000000 --- a/eval/pretrain/minif2f/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -lean-dojo==1.1.2 -torch==2.1.2 -transformers==4.37.1 -vllm==0.2.7 \ No newline at end of file diff --git a/lean-github/README.md b/lean-github/README.md new file mode 100644 index 0000000..f1d6a43 --- /dev/null +++ b/lean-github/README.md @@ -0,0 +1,93 @@ +# InternLM-Step-Prover + +
+ + +
+
+ InternLM-Math + + + HOT + + +
+
+ +A state-of-the-art LEAN4 step prover. + +[💻 Github](https://github.com/InternLM/InternLM-Math) [📊Dataset](https://huggingface.co/datasets/internlm/Lean-Github) +
+ +InternLM-Step-Prover is a 7B language model trained on Lean-Github and multiple sythesis datasets. InternLM-Step-Prover achieves state-of-the-art performances on MiniF2F, ProofNet, and Putnam math benchmarks, showing its formal math proving ability in multiple domains. + +# Dialogue Example +``` +### Input Example +DECL MyNat.mul_pow +GOAL a b n : N +⊢ (a * b) ^ n = a ^ n * b ^ n +### Output Example +PROOFSTEP induction n with t Ht +``` + +# Performance + +## MiniF2F +| Method | Model size | Pass | miniF2F-valid | miniF2F-test | +|--------|------------|------|---------------|--------------| +| **Whole-Proof Generation Methods** | +| GPT-4-turbo 0409 | - | 64 | 25.4% | 23.0% | +| DeepSeekMath-Base | 7B | 128 | 25.4% | 27.5% | +| DeepSeek-Prover | 7B | 1 | - | 30.0% | +| | | 64 | - | 46.3% | +| | | 128 | - | 46.3% | +| | | 8192 | - | 48.8% | +| | | 65536 | - | 50.0% | +| | | cumulative | *60.2%* | *52.0%* | +| TheoremLlama | - | cumulative | 36.5% | 33.6% | +| **Tree Search Methods** | +| COPRA (GPT-3.5) | - | 1 | - | 9.0% | +| COPRA (GPT-4) | - | 1 | - | 26.6% | +| DSP(Isabelle) | 540B | 100 | 42.6% | 38.9% | +| Proof Artifact Co-Training | 837M | 1 | 23.9% | 24.6% | +| | | 8 | 29.3% | 29.2% | +| ReProver | 229M | 1 | - | 25.0% | +| Llemma | 7B | 1 | 26.2% | 26.2% | +| Llemma | 34B | 1 | 27.9% | 25.8% | +| Curriculum Learning | 837M | 1 | 33.6% | 29.6% | +| | | 8 | 41.2% | 34.5% | +| | | 64 | 47.3% | 36.6% | +| Hypertree Proof Search | 600M | cumulative | 58.6% | - | +| | | 64 | - | 41.0% | +| Lean-STaR | 7B | 64 | - | 46.3% | +| InternLM2-Math | 7B | 1 | 29.9% | 30.3% | +| InternLM2-Math-Plus | 7B | 1 | - | 43.4% | +| InternLM2-Step-Prover | 7B | 1 | 59.8% | 48.8% | +| InternLM2-Step-Prover | 7B | 64 | **63.9%** | **54.5%** | + +## Proofnet & Putnam +| Method | Model size | Pass | result | +|--------|------------|------|--------| +| **ProofNet benchmark** | +| ReProver | 229M | 1 | 13.8% | +| InternLM2-Step-Prover | 7B | 1 | **18.1%** | +| **Putnam benchmark** | +| GPT-4 | - | 10 | 1/640 | +| COPRA (GPT-4) | - | 10 | 1/640 | +| DSP(Isabelle) | 540B | 10 | 4/640 | +| ReProver | 229M | 1 | 0/640 | +| InternLM2-Step-Prover | 7B | 1 | **5/640** | + +# Citation and Tech Report +``` +@misc{wu2024leangithubcompilinggithublean, + title={LEAN-GitHub: Compiling GitHub LEAN repositories for a versatile LEAN prover}, + author={Zijian Wu and Jiayu Wang and Dahua Lin and Kai Chen}, + year={2024}, + eprint={2407.17227}, + archivePrefix={arXiv}, + primaryClass={cs.AI}, + url={https://arxiv.org/abs/2407.17227}, +} +``` diff --git a/leanworkbook/Workbook_main.jpg b/leanworkbook/Workbook_main.jpg new file mode 100644 index 0000000..fa98816 Binary files /dev/null and b/leanworkbook/Workbook_main.jpg differ diff --git a/leanworkbook/header.lean b/leanworkbook/header.lean new file mode 100644 index 0000000..661dc80 --- /dev/null +++ b/leanworkbook/header.lean @@ -0,0 +1,104 @@ +import Mathlib.Algebra.Algebra.Basic +import Mathlib.Algebra.Order.Floor +import Mathlib.Algebra.Associated +import Mathlib.Algebra.BigOperators.Basic + +import Mathlib.Algebra.BigOperators.Pi +import Mathlib.Algebra.GeomSum +import Mathlib.Algebra.Group.Pi.Basic +import Mathlib.Algebra.Group.Pi.Lemmas +import Mathlib.Algebra.Group.Commute.Basic +import Mathlib.Algebra.Group.Commute.Defs +import Mathlib.Algebra.Group.Commute.Hom +import Mathlib.Algebra.Group.Commute.Units +import Mathlib.Algebra.GroupPower.Basic +import Mathlib.Algebra.GroupPower.Identities +import Mathlib.Algebra.Order.Floor +import Mathlib.Algebra.QuadraticDiscriminant +import Mathlib.Algebra.Ring.Basic +import Mathlib.Analysis.MeanInequalitiesPow +import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent +import Mathlib.Analysis.NormedSpace.Basic +import Mathlib.Analysis.SpecialFunctions.Log.Basic +import Mathlib.Analysis.SpecialFunctions.Log.Base +import Mathlib.Combinatorics.SimpleGraph.Basic +import Mathlib.Data.Complex.Basic +import Mathlib.Data.Complex.Exponential +import Mathlib.Data.Finset.Basic +import Mathlib.Data.Fintype.Card + +import Mathlib.Data.Int.GCD +import Mathlib.Data.Int.ModEq +import Mathlib.Data.Int.Parity +import Mathlib.Data.List.Intervals +import Mathlib.Data.List.Palindrome +import Mathlib.Data.Multiset.Basic + +import Mathlib.Data.Nat.Choose.Basic +import Mathlib.Data.Nat.Digits +import Mathlib.Data.Nat.Factorial.Basic +import Mathlib.Data.Nat.Fib.Basic +import Mathlib.Data.Nat.Fib.Zeckendorf +import Mathlib.Data.Nat.ModEq +import Mathlib.Data.Nat.Multiplicity +import Mathlib.Data.Nat.Parity +import Mathlib.Data.Nat.Prime +import Mathlib.Data.PNat.Basic +import Mathlib.Data.PNat.Prime + +import Mathlib.Data.Rat.BigOperators +import Mathlib.Data.Rat.Cast.CharZero +import Mathlib.Data.Rat.Cast.Defs +import Mathlib.Data.Rat.Cast.Lemmas +import Mathlib.Data.Rat.Cast.Order +import Mathlib.Data.Rat.Defs +import Mathlib.Data.Rat.Denumerable +import Mathlib.Data.Rat.Encodable +import Mathlib.Data.Rat.Field +import Mathlib.Data.Rat.Floor +import Mathlib.Data.Rat.Init +import Mathlib.Data.Rat.Lemmas +import Mathlib.Data.Rat.Order +import Mathlib.Data.Rat.Sqrt + +import Mathlib.Data.Rat.Star +import Mathlib.Data.Real.Basic +import Mathlib.Data.ENNReal.Basic +import Mathlib.Data.ENNReal.Inv +import Mathlib.Data.ENNReal.Operations +import Mathlib.Data.ENNReal.Real +import Mathlib.Data.Real.ENatENNReal +import Mathlib.Data.Real.Irrational +import Mathlib.Data.Real.NNReal +import Mathlib.Data.Real.Sqrt + +import Mathlib.Data.Set.Finite +import Mathlib.Data.Sym.Sym2 +import Mathlib.Data.ZMod.Basic +import Mathlib.Dynamics.FixedPoints.Basic + +import Mathlib.LinearAlgebra.AffineSpace.AffineMap +import Mathlib.LinearAlgebra.AffineSpace.Independent +import Mathlib.LinearAlgebra.AffineSpace.Ordered +import Mathlib.LinearAlgebra.FiniteDimensional +import Mathlib.Logic.Equiv.Basic + +import Mathlib.Order.Filter.Basic + +import Mathlib.Order.WellFounded +import Mathlib.Topology.Basic +import Mathlib.Topology.Instances.NNReal + +import Mathlib.Data.ZMod.Basic +import Mathlib.RingTheory.Int.Basic + + +import Aesop +import ProofWidgets +open BigOperators + +open Nat + +open Real + +open Rat diff --git a/leanworkbook/inference_backtranslate.py b/leanworkbook/inference_backtranslate.py new file mode 100644 index 0000000..a52a9c0 --- /dev/null +++ b/leanworkbook/inference_backtranslate.py @@ -0,0 +1,155 @@ +import argparse +import json +import os +from tqdm import tqdm +from vllm import LLM, SamplingParams +import numpy as numpy +from transformers import AutoTokenizer + +def run_eval( + model_path, + model_id, + questions, + answer_file, + max_new_token, + temperature, + tp_size, +): + + + print(os.environ["CUDA_VISIBLE_DEVICES"]) + + tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False, trust_remote_code=True) + special_tokens_dict = dict() + if tokenizer.pad_token is None: + special_tokens_dict["pad_token"] = '' + if tokenizer.eos_token is None: + special_tokens_dict["eos_token"] = '' + if tokenizer.bos_token is None: + special_tokens_dict["bos_token"] = '' + if tokenizer.unk_token is None: + special_tokens_dict["unk_token"] = '' + if len(special_tokens_dict) > 0 and model_path.find('Qwen') == -1: + tokenizer.add_special_tokens(special_tokens_dict) + + print(f"RANK: {os.environ['RANK']} | NUM_REPLICAS: {os.environ['WORLD_SIZE']} | DEVICE {os.environ['CUDA_VISIBLE_DEVICES']}") + print(f"Output to {answer_file}") + print(f"Num Questions: {len(questions)}") + print(f"TP: {tp_size}") + device = 'cuda:' + os.environ['RANK'] + + + try: + model = LLM(model=model_path, tensor_parallel_size=tp_size, trust_remote_code=True, dtype="bfloat16") + except RecursionError: + model = LLM(model=model_path, tokenizer_mode='slow', tensor_parallel_size=tp_size, trust_remote_code=True, dtype="bfloat16") + + sampling_params = SamplingParams(temperature=temperature, max_tokens=max_new_token, stop=['[UNUSED_TOKEN_146]', '[UNUSED_TOKEN_145]']) + + def get_query(example): + output = example['theorem'] + output = '[UNUSED_TOKEN_146]user\nConvert the formal statement into natural language:\n```lean\n'+output+'\n```[UNUSED_TOKEN_145]\n[UNUSED_TOKEN_146]assistant\n' + + return output + + prompts = [get_query(example) for example in questions] + + prompt_id_map = {prompt: idx for idx, prompt in enumerate(prompts)} + + outputs = model.generate(prompts, sampling_params) + print(prompts[0]) + for _, output in enumerate(outputs): + output_ids = output.outputs[0].token_ids + question = questions[prompt_id_map[output.prompt]] + + output = model.get_tokenizer().decode( + output_ids, + spaces_between_special_tokens=False, + ) + + for special_token in model.get_tokenizer().special_tokens_map.values(): + if isinstance(special_token, list): + for special_tok in special_token: + output = output.replace(special_tok, "") + else: + output = output.replace(special_token, "") + output = output.strip() + + question['back_translate'] = output.replace('[UNUSED_TOKEN_145]','') + question['generator'] = model_id + + # Dump answers + os.makedirs(os.path.dirname(answer_file), exist_ok=True) + with open(os.path.expanduser(answer_file), "a") as fout: + fout.write(json.dumps(question, ensure_ascii=False) + "\n") + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "--model-path", + type=str, + required=True, + help="The path to the weights. This can be a local folder or a Hugging Face repo ID.", + ) + + parser.add_argument( + "--question-file", + type=str, + default=None, + help="The name of the benchmark question set.", + ) + parser.add_argument( + "--answer-file", + type=str, + default=None, + help="The output answer file.", + ) + parser.add_argument( + "--max-new-token", + type=int, + default=1024, + help="The maximum number of new generated tokens.", + ) + parser.add_argument( + "--temperature", + type=float, + default=0.7, + ) + parser.add_argument( + "--repeat_times", + type=int, + default=1, + ) + + args = parser.parse_args() + os.environ["CUDA_VISIBLE_DEVICES"] = str(os.environ['RANK']) + + with open(args.question_file, 'r') as f: + questions = [json.loads(item) for item in f.readlines()] + + if args.repeat_times > 1: + questions = questions * args.repeat_times + + if 'WORLD_SIZE' in os.environ and int(os.environ['WORLD_SIZE']) > 1: + num_replicas = int(os.environ['WORLD_SIZE']) + rank = int(os.environ['RANK']) + + tp_size = 1 + device = ','.join([str(i) for i in range(rank*tp_size, (rank+1)*tp_size)]) + print(num_replicas, rank, tp_size, device) + + total_size = len(questions) + questions = questions[rank:total_size:num_replicas] + args.answer_file = args.answer_file.replace(".jsonl", f"_{rank}.jsonl") + else: + tp_size = 1 + + run_eval( + args.model_path, + args.model_path, + questions, + args.answer_file, + args.max_new_token, + args.temperature, + tp_size, + ) diff --git a/leanworkbook/inference_nli.py b/leanworkbook/inference_nli.py new file mode 100644 index 0000000..43d2b92 --- /dev/null +++ b/leanworkbook/inference_nli.py @@ -0,0 +1,165 @@ +import argparse +import json +import os +from tqdm import tqdm +from vllm import LLM, SamplingParams +import numpy as numpy +from transformers import AutoTokenizer + +def run_eval( + model_path, + model_id, + questions, + answer_file, + max_new_token, + temperature, + tp_size, +): + + + print(os.environ["CUDA_VISIBLE_DEVICES"]) + + tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False, trust_remote_code=True) + special_tokens_dict = dict() + if tokenizer.pad_token is None: + special_tokens_dict["pad_token"] = '' + if tokenizer.eos_token is None: + special_tokens_dict["eos_token"] = '' + if tokenizer.bos_token is None: + special_tokens_dict["bos_token"] = '' + if tokenizer.unk_token is None: + special_tokens_dict["unk_token"] = '' + if len(special_tokens_dict) > 0 and model_path.find('Qwen') == -1: + tokenizer.add_special_tokens(special_tokens_dict) + + print(f"RANK: {os.environ['RANK']} | NUM_REPLICAS: {os.environ['WORLD_SIZE']} | DEVICE {os.environ['CUDA_VISIBLE_DEVICES']}") + print(f"Output to {answer_file}") + print(f"Num Questions: {len(questions)}") + print(f"TP: {tp_size}") + device = 'cuda:' + os.environ['RANK'] + + try: + model = LLM(model=model_path, tensor_parallel_size=tp_size, trust_remote_code=True, dtype="bfloat16") + except RecursionError: + model = LLM(model=model_path, tokenizer_mode='slow', tensor_parallel_size=tp_size, trust_remote_code=True, dtype="bfloat16") + + sampling_params = SamplingParams(temperature=temperature, max_tokens=max_new_token, stop=['[UNUSED_TOKEN_146]', '[UNUSED_TOKEN_145]']) + + def get_query(example): + sys_prompt = 'Please check following two math problems is same or different? Please consider each statement in two problems, they are different if any statement is different. Please point out any different you found. Please reply **same** or **different** at the final sentence with bold format.' + problem_origin = example['problem'] + probelm_back = example['back_translate'] + prompt = 'Problem 1:\n' + problem_origin + '\nProblem 2:\n' + probelm_back + + messages = [ + {"role": "system", "content": sys_prompt}, + {"role": "user", "content": prompt} + ] + text = tokenizer.apply_chat_template( + messages, + tokenize=False, + add_generation_prompt=True + ) + return text + + prompts = [get_query(example) for example in questions] + + prompt_id_map = {prompt: idx for idx, prompt in enumerate(prompts)} + + outputs = model.generate(prompts, sampling_params) + + for _, output in enumerate(outputs): + output_ids = output.outputs[0].token_ids + question = questions[prompt_id_map[output.prompt]] + + output = model.get_tokenizer().decode( + output_ids, + spaces_between_special_tokens=False, + ) + + for special_token in model.get_tokenizer().special_tokens_map.values(): + if isinstance(special_token, list): + for special_tok in special_token: + output = output.replace(special_tok, "") + else: + output = output.replace(special_token, "") + output = output.strip() + + question['nli_output'] = output + question['generator_nli'] = model_id + + # Dump answers + os.makedirs(os.path.dirname(answer_file), exist_ok=True) + with open(os.path.expanduser(answer_file), "a") as fout: + fout.write(json.dumps(question, ensure_ascii=False) + "\n") + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "--model-path", + type=str, + required=True, + help="The path to the weights. This can be a local folder or a Hugging Face repo ID.", + ) + + parser.add_argument( + "--question-file", + type=str, + default=None, + help="The name of the benchmark question set.", + ) + parser.add_argument( + "--answer-file", + type=str, + default=None, + help="The output answer file.", + ) + parser.add_argument( + "--max-new-token", + type=int, + default=1024, + help="The maximum number of new generated tokens.", + ) + parser.add_argument( + "--temperature", + type=float, + default=0.7, + ) + parser.add_argument( + "--repeat_times", + type=int, + default=1, + ) + + args = parser.parse_args() + os.environ["CUDA_VISIBLE_DEVICES"] = str(os.environ['RANK']) + + with open(args.question_file, 'r') as f: + questions = [json.loads(item) for item in f.readlines()] + + if args.repeat_times > 1: + questions = questions * args.repeat_times + + if 'WORLD_SIZE' in os.environ and int(os.environ['WORLD_SIZE']) > 1: + num_replicas = int(os.environ['WORLD_SIZE']) + rank = int(os.environ['RANK']) + + tp_size = 1 + device = ','.join([str(i) for i in range(rank*tp_size, (rank+1)*tp_size)]) + print(num_replicas, rank, tp_size, device) + + total_size = len(questions) + questions = questions[rank:total_size:num_replicas] + args.answer_file = args.answer_file.replace(".jsonl", f"_{rank}.jsonl") + else: + tp_size = 1 + + run_eval( + args.model_path, + args.model_path, + questions, + args.answer_file, + args.max_new_token, + args.temperature, + tp_size, + ) diff --git a/leanworkbook/inference_translate_answer.py b/leanworkbook/inference_translate_answer.py new file mode 100644 index 0000000..b6aefee --- /dev/null +++ b/leanworkbook/inference_translate_answer.py @@ -0,0 +1,156 @@ +import argparse +import json +import os +import torch +from tqdm import tqdm +from vllm import LLM, SamplingParams +import numpy as numpy +from transformers import AutoTokenizer + +def run_eval( + model_path, + model_id, + questions, + answer_file, + max_new_token, + temperature, + tp_size, +): + print('##################'+str(torch.cuda.is_available())) + #os.environ["CUDA_VISIBLE_DEVICES"] = str(os.environ['RANK']) + print(os.environ["CUDA_VISIBLE_DEVICES"]) + + tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False, trust_remote_code=True) + special_tokens_dict = dict() + if tokenizer.pad_token is None: + special_tokens_dict["pad_token"] = '' + if tokenizer.eos_token is None: + special_tokens_dict["eos_token"] = '' + if tokenizer.bos_token is None: + special_tokens_dict["bos_token"] = '' + if tokenizer.unk_token is None: + special_tokens_dict["unk_token"] = '' + if len(special_tokens_dict) > 0 and model_path.find('Qwen') == -1: + tokenizer.add_special_tokens(special_tokens_dict) + + print(f"RANK: {os.environ['RANK']} | NUM_REPLICAS: {os.environ['WORLD_SIZE']} | DEVICE {os.environ['CUDA_VISIBLE_DEVICES']}") + print(f"Output to {answer_file}") + print(f"Num Questions: {len(questions)}") + print(f"TP: {tp_size}") + device = 'cuda:' + os.environ['RANK'] + + try: + model = LLM(model=model_path, tensor_parallel_size=tp_size, trust_remote_code=True, dtype="bfloat16") + except RecursionError: + model = LLM(model=model_path, tokenizer_mode='slow', tensor_parallel_size=tp_size, trust_remote_code=True, dtype="bfloat16") + + sampling_params = SamplingParams(temperature=temperature, max_tokens=max_new_token, stop=['[UNUSED_TOKEN_146]', '[UNUSED_TOKEN_145]', 'by', 'sorry']) + + def get_query(example): + if 'answer' in example and 'prove' not in example['problem'].split(' ') and 'Prove' not in example['problem'].split(' ') and example['answer'] != '' and len(example['answer']) <= 30: + return "[UNUSED_TOKEN_146]user\nConvert following problem into LEAN 4:\n" + str(example['problem']) + "Show that it is " + str(example['answer']) + "[UNUSED_TOKEN_145]\n[UNUSED_TOKEN_146]assistant\nHere is the formal statement in LEAN 4:\n```lean\ntheorem" + else: + return "[UNUSED_TOKEN_146]user\nConvert following problem into LEAN 4:\n" + str(example['problem']) + "[UNUSED_TOKEN_145]\n[UNUSED_TOKEN_146]assistant\nHere is the formal statement in LEAN 4:\n```lean\ntheorem" + + prompts = [get_query(example) for example in questions] + + prompt_id_map = {prompt: idx for idx, prompt in enumerate(prompts)} + + outputs = model.generate(prompts, sampling_params) + + for _, output in enumerate(outputs): + output_ids = output.outputs[0].token_ids + question = questions[prompt_id_map[output.prompt]] + + output = model.get_tokenizer().decode( + output_ids, + spaces_between_special_tokens=False, + ) + + for special_token in model.get_tokenizer().special_tokens_map.values(): + if isinstance(special_token, list): + for special_tok in special_token: + output = output.replace(special_tok, "") + else: + output = output.replace(special_token, "") + output = output.strip() + + question['output'] = output + question['generator'] = model_id + + # Dump answers + os.makedirs(os.path.dirname(answer_file), exist_ok=True) + with open(os.path.expanduser(answer_file), "a") as fout: + fout.write(json.dumps(question, ensure_ascii=False) + "\n") + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "--model-path", + type=str, + required=True, + help="The path to the weights. This can be a local folder or a Hugging Face repo ID.", + ) + + parser.add_argument( + "--question-file", + type=str, + default=None, + help="The name of the benchmark question set.", + ) + parser.add_argument( + "--answer-file", + type=str, + default=None, + help="The output answer file.", + ) + parser.add_argument( + "--max-new-token", + type=int, + default=1024, + help="The maximum number of new generated tokens.", + ) + parser.add_argument( + "--temperature", + type=float, + default=0.7, + ) + parser.add_argument( + "--repeat_times", + type=int, + default=1, + ) + + args = parser.parse_args() + os.environ["CUDA_VISIBLE_DEVICES"] = str(os.environ['RANK']) + + with open(args.question_file, 'r') as f: + questions = [json.loads(item) for item in f.readlines()] + + if args.repeat_times > 1: + questions = questions * args.repeat_times + + if 'WORLD_SIZE' in os.environ and int(os.environ['WORLD_SIZE']) > 1: + num_replicas = int(os.environ['WORLD_SIZE']) + rank = int(os.environ['RANK']) + + tp_size = 1 + device = ','.join([str(i) for i in range(rank*tp_size, (rank+1)*tp_size)]) + + print(num_replicas, rank, tp_size, device) + + total_size = len(questions) + questions = questions[rank:total_size:num_replicas] + args.answer_file = args.answer_file.replace(".jsonl", f"_{rank}.jsonl") + else: + tp_size = 1 + + run_eval( + args.model_path, + args.model_path, + questions, + args.answer_file, + args.max_new_token, + args.temperature, + tp_size, + ) diff --git a/leanworkbook/readme.md b/leanworkbook/readme.md new file mode 100644 index 0000000..3afc594 --- /dev/null +++ b/leanworkbook/readme.md @@ -0,0 +1,52 @@ +# Lean Workbook +We release Lean-Workbook with 57K math problems formalized in Lean 4 with 5K searched proof for autoformalization and auto theorem proving. [🤗Dataset](https://huggingface.co/datasets/internlm/Lean-Workbook) + +![image](Workbook_main.jpg) + +Find import header in **header.lean**, use Lean v4.7.0. + +# Translate your natural language problem + +``` +torchrun --nproc-per-node=$NUMBER --master_port $PORT --rdzv-backend=c10d inference_translate_answer.py \ + --model-path "$MODEL_PATH" \ + --max-new-token 1000 \ + --temperature 0.01 \ + --repeat_times 1 \ + --question-file "$QUESTION_JSONL_FILE" \ + --answer-file "$OUTPUT_FILE_PATH" +``` + +Note that the python file will automatically create the output path. Your data jsonl file should use the same key as in our published datasets. + +# Running backtranslate or NLI +``` +torchrun --nproc-per-node=$NUMBER --master_port $PORT --rdzv-backend=c10d inference_backtranslate.py \ + --model-path "$MODEL_PATH" \ + --max-new-token 1000 \ + --temperature 0.01 \ + --repeat_times 1 \ + --question-file "$Translate_OUTPUT_FILE_PATH" \ + --answer-file "$BT_OUTPUT_FILE_PATH" + +torchrun --nproc-per-node=$NUMBER --master_port $PORT --rdzv-backend=c10d inference_nli.py \ + --model-path "QWEN_MODEL_PATH" \ + --max-new-token 1000 \ + --temperature 0.01 \ + --repeat_times 1 \ + --question-file "$BT_OUTPUT_FILE_PATH" \ + --answer-file "$NLI_OUTPUT_FILE_PATH" +``` +If the NLI output contains same, then it passes the NLI test. + +# Citation +``` +@misc{ying2024lean, + title={Lean Workbook: A large-scale Lean problem set formalized from natural language math problems}, + author={Huaiyuan Ying and Zijian Wu and Yihan Geng and Jiayu Wang and Dahua Lin and Kai Chen}, + year={2024}, + eprint={2406.03847}, + archivePrefix={arXiv}, + primaryClass={cs.CL} +} +``` diff --git a/eval/pretrain/minif2f/LICENSE b/minif2f/LICENSE similarity index 100% rename from eval/pretrain/minif2f/LICENSE rename to minif2f/LICENSE diff --git a/minif2f/README.md b/minif2f/README.md new file mode 100644 index 0000000..c9a2a35 --- /dev/null +++ b/minif2f/README.md @@ -0,0 +1,34 @@ +# `InternLM-Math` MiniF2F performance reproduce + +Scripts for the Lean formal2formal (tactic prediction) experiments. Adapted from +[llemma-formal2formal](https://github.com/wellecks/llemma_formal2formal). + + +#### Setup +Install Python packages: +``` +pip install -r requirements.txt +``` + +Install Lean: +``` +# from https://leanprover-community.github.io/install/linux.html +# After running this command, select (2), then `nightly`, then `y`: +curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh +source $HOME/.elan/env +lake +``` + +Configure LeanDojo: +``` +export CONTAINER="native" +``` + +#### Run +``` +cd scripts +bash eval_internLM2-plus_7b.sh +``` + +#### About Lean4 version +The scripts fetch MiniF2F from [https://github.com/rah4927/lean-dojo-mew], which uses leanprover/lean4:nightly-2023-08-19. To use newer versions of Lean4, slight modifications may be needed. We provide a version of MiniF2F that works with leanprover/lean4:v4.7.0 at [https://github.com/wzj423/lean-dojo-mew]. To use a custom source for the MiniF2F dataset, change the `url` and `commit` fields in the minif2f/data/minif2f.jsonl file. diff --git a/eval/pretrain/minif2f/compute_metrics.py b/minif2f/compute_metrics.py similarity index 81% rename from eval/pretrain/minif2f/compute_metrics.py rename to minif2f/compute_metrics.py index d504bb5..3e2c47b 100644 --- a/eval/pretrain/minif2f/compute_metrics.py +++ b/minif2f/compute_metrics.py @@ -3,7 +3,10 @@ for setting in [ 'internLM2-7b_minif2f_test', - 'internLM2-20b_minif2f_test' + 'internLM2-20b_minif2f_test', + 'internLM2-plus-7b_minif2f_test', + 'internLM2-plus-20b_minif2f_test' + ]: fs = [json.load(open(x)) for x in glob.glob('./output/%s/*.json' % setting)] n = 0 diff --git a/minif2f/data/minif2f-lean4.7.0.jsonl b/minif2f/data/minif2f-lean4.7.0.jsonl new file mode 100644 index 0000000..4592ddb --- /dev/null +++ b/minif2f/data/minif2f-lean4.7.0.jsonl @@ -0,0 +1,488 @@ +{"full_name": "amc12a_2019_p21", "statement": "theorem amc12a_2019_p21 (z : \u2102) (h\u2080 : z = (1 + Complex.I) / Real.sqrt 2) :\n ((\u2211 k : \u2124 in Finset.Icc 1 12, z ^ k ^ 2) * (\u2211 k : \u2124 in Finset.Icc 1 12, 1 / z ^ k ^ 2)) = 36", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2015_p10", "statement": "theorem amc12a_2015_p10 (x y : \u2124) (h\u2080 : 0 < y) (h\u2081 : y < x) (h\u2082 : x + y + x * y = 80) : x = 26", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2008_p8", "statement": "theorem amc12a_2008_p8 (x y : \u211d) (h\u2080 : 0 < x \u2227 0 < y) (h\u2081 : y ^ 3 = 1)\n (h\u2082 : 6 * x ^ 2 = 2 * (6 * y ^ 2)) : x ^ 3 = 2 * Real.sqrt 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_182", "statement": "theorem mathd_algebra_182 (y : \u2102) : 7 * (3 * y + 2) = 21 * y + 14", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1984_p5", "statement": "theorem aime_1984_p5 (a b : \u211d) (h\u2080 : Real.logb 8 a + Real.logb 4 (b ^ 2) = 5)\n (h\u2081 : Real.logb 8 b + Real.logb 4 (a ^ 2) = 7) : a * b = 512", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_780", "statement": "theorem mathd_numbertheory_780 (m x : \u2115) (h\u2080 : 10 \u2264 m) (h\u2081 : m \u2264 99) (h\u2082 : 6 * x % m = 1)\n (h\u2083 : (x - 6 ^ 2) % m = 0) : m = 43", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_116", "statement": "theorem mathd_algebra_116 (k x : \u211d) (h\u2080 : x = (13 - Real.sqrt 131) / 4)\n (h\u2081 : 2 * x ^ 2 - 13 * x + k = 0) : k = 19 / 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_13", "statement": "theorem mathd_numbertheory_13 (u v : \u2115) (S : Set \u2115)\n (h\u2080 : \u2200 n : \u2115, n \u2208 S \u2194 0 < n \u2227 14 * n % 100 = 46) (h\u2081 : IsLeast S u)\n (h\u2082 : IsLeast (S \\ {u}) v) : (u + v : \u211a) / 2 = 64", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_169", "statement": "theorem mathd_numbertheory_169 : Nat.gcd 20! 200000 = 40000", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2009_p9", "statement": "theorem amc12a_2009_p9 (a b c : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f (x + 3) = 3 * x ^ 2 + 7 * x + 4)\n (h\u2081 : \u2200 x, f x = a * x ^ 2 + b * x + c) : a + b + c = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2019_p9", "statement": "theorem amc12a_2019_p9 (a : \u2115 \u2192 \u211a) (h\u2080 : a 1 = 1) (h\u2081 : a 2 = 3 / 7)\n (h\u2082 : \u2200 n, a (n + 2) = a n * a (n + 1) / (2 * a n - a (n + 1))) :\n \u2191(a 2019).den + (a 2019).num = 8078", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_13", "statement": "theorem mathd_algebra_13 (a b : \u211d)\n (h\u2080 : \u2200 x, x - 3 \u2260 0 \u2227 x - 5 \u2260 0 \u2192 4 * x / (x ^ 2 - 8 * x + 15) = a / (x - 3) + b / (x - 5)) :\n a = -6 \u2227 b = 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "induction_sum2kp1npqsqm1", "statement": "theorem induction_sum2kp1npqsqm1 (n : \u2115) :\n (\u2211 k in Finset.range n, 2 * k + 3) = (n + 1) ^ 2 - 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1991_p6", "statement": "theorem aime_1991_p6 (r : \u211d) (h\u2080 : (\u2211 k in Finset.Icc (19 : \u2115) 91, Int.floor (r + k / 100)) = 546) :\n Int.floor (100 * r) = 743", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_149", "statement": "theorem mathd_numbertheory_149 :\n (\u2211 k in Finset.filter (fun x => x % 8 = 5 \u2227 x % 6 = 3) (Finset.range 50), k) = 66", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1984_p2", "statement": "theorem imo_1984_p2 (a b : \u2115) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : \u00ac7 \u2223 a) (h\u2082 : \u00ac7 \u2223 b) (h\u2083 : \u00ac7 \u2223 a + b)\n (h\u2084 : 7 ^ 7 \u2223 (a + b) ^ 7 - a ^ 7 - b ^ 7) : 19 \u2264 a + b", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2008_p4", "statement": "theorem amc12a_2008_p4 : (\u220f k in Finset.Icc (1 : \u2115) 501, ((4 : \u211d) * k + 4) / (4 * k)) = 502", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_2006_p6", "statement": "theorem imo_2006_p6 (a b c : \u211d) :\n a * b * (a ^ 2 - b ^ 2) + b * c * (b ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2) \u2264\n 9 * Real.sqrt 2 / 32 * (a ^ 2 + b ^ 2 + c ^ 2) ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_462", "statement": "theorem mathd_algebra_462 : ((1 : \u211a) / 2 + 1 / 3) * (1 / 2 - 1 / 3) = 5 / 36", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1964_p1_2", "statement": "theorem imo_1964_p1_2 (n : \u2115) : \u00ac7 \u2223 2 ^ n + 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_221", "statement": "theorem mathd_numbertheory_221 (S : Finset \u2115)\n (h\u2080 : \u2200 x : \u2115, x \u2208 S \u2194 0 < x \u2227 x < 1000 \u2227 x.divisors.card = 3) : S.card = 11", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_64", "statement": "theorem mathd_numbertheory_64 : IsLeast { x : \u2115 | 30 * x \u2261 42 [MOD 47] } 39", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1987_p4", "statement": "theorem imo_1987_p4 (f : \u2115 \u2192 \u2115) : \u2203 n, f (f n) \u2260 n + 1987", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_33", "statement": "theorem mathd_numbertheory_33 (n : \u2115) (h\u2080 : n < 398) (h\u2081 : n * 7 % 398 = 1) : n = 57", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12_2001_p9", "statement": "theorem amc12_2001_p9 (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x > 0, \u2200 y > 0, f (x * y) = f x / y) (h\u2081 : f 500 = 3) :\n f 600 = 5 / 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1965_p1", "statement": "theorem imo_1965_p1 (x : \u211d) (h\u2080 : 0 \u2264 x) (h\u2081 : x \u2264 2 * \u03c0)\n (h\u2082 :\n 2 * Real.cos x \u2264 abs (Real.sqrt (1 + Real.sin (2 * x)) - Real.sqrt (1 - Real.sin (2 * x))))\n (h\u2083 : abs (Real.sqrt (1 + Real.sin (2 * x)) - Real.sqrt (1 - Real.sin (2 * x))) \u2264 Real.sqrt 2) :\n \u03c0 / 4 \u2264 x \u2227 x \u2264 7 * \u03c0 / 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_48", "statement": "theorem mathd_numbertheory_48 (b : \u2115) (h\u2080 : 0 < b) (h\u2081 : 3 * b ^ 2 + 2 * b + 1 = 57) : b = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "numbertheory_sqmod4in01d", "statement": "theorem numbertheory_sqmod4in01d (a : \u2124) : a ^ 2 % 4 = 0 \u2228 a ^ 2 % 4 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_466", "statement": "theorem mathd_numbertheory_466 : (\u2211 k in Finset.range 11, k) % 9 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_48", "statement": "theorem mathd_algebra_48 (q e : \u2102) (h\u2080 : q = 9 - 4 * Complex.I) (h\u2081 : e = -3 - 4 * Complex.I) :\n q - e = 12", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12_2000_p15", "statement": "theorem amc12_2000_p15 (f : \u2102 \u2192 \u2102) (h\u2080 : \u2200 x, f (x / 3) = x ^ 2 + x + 1)\n (h\u2081 : Fintype (f \u207b\u00b9' {7})) : (\u2211 y in (f \u207b\u00b9' {7}).toFinset, y / 3) = -1 / 9", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_132", "statement": "theorem mathd_numbertheory_132 : 2004 % 12 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2009_p5", "statement": "theorem amc12a_2009_p5 (x : \u211d) (h\u2080 : x ^ 3 - (x + 1) * (x - 1) * x = 5) : x ^ 3 = 125", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_188", "statement": "theorem mathd_numbertheory_188 : Nat.gcd 180 168 = 12", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_224", "statement": "theorem mathd_algebra_224 (S : Finset \u2115)\n (h\u2080 : \u2200 n : \u2115, n \u2208 S \u2194 Real.sqrt n < 7 / 2 \u2227 2 < Real.sqrt n) : S.card = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "induction_divisibility_3divnto3m2n", "statement": "theorem induction_divisibility_3divnto3m2n (n : \u2115) : 3 \u2223 n ^ 3 + 2 * n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "induction_sum_1oktkp1", "statement": "theorem induction_sum_1oktkp1 (n : \u2115) :\n (\u2211 k in Finset.range n, (1 : \u211d) / ((k + 1) * (k + 2))) = n / (n + 1)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_32", "statement": "theorem mathd_numbertheory_32 (S : Finset \u2115) (h\u2080 : \u2200 n : \u2115, n \u2208 S \u2194 n \u2223 36) : (\u2211 k in S, k) = 91", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_422", "statement": "theorem mathd_algebra_422 (x : \u211d) (\u03c3 : Equiv \u211d \u211d) (h\u2080 : \u2200 x, \u03c3.1 x = 5 * x - 12)\n (h\u2081 : \u03c3.1 (x + 1) = \u03c3.2 x) : x = 47 / 24", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2002_p11", "statement": "theorem amc12b_2002_p11 (a b : \u2115) (h\u2080 : Nat.Prime a) (h\u2081 : Nat.Prime b) (h\u2082 : Nat.Prime (a + b))\n (h\u2083 : Nat.Prime (a - b)) : Nat.Prime (a + b + (a - b + (a + b)))", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_73", "statement": "theorem mathd_algebra_73 (p q r x : \u2102) (h\u2080 : (x - p) * (x - q) = (r - p) * (r - q)) (h\u2081 : x \u2260 r) :\n x = p + q - r", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_109", "statement": "theorem mathd_numbertheory_109 (v : \u2115 \u2192 \u2115) (h\u2080 : \u2200 n, v n = 2 * n - 1) :\n (\u2211 k in Finset.Icc 1 100, v k) % 7 = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_xmysqpymzsqpzmxsqeqxyz_xpypzp6dvdx3y3z3", "statement": "theorem algebra_xmysqpymzsqpzmxsqeqxyz_xpypzp6dvdx3y3z3 (x y z : \u2124)\n (h\u2080 : (x - y) ^ 2 + (y - z) ^ 2 + (z - x) ^ 2 = x * y * z) :\n x + y + z + 6 \u2223 x ^ 3 + y ^ 3 + z ^ 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1962_p4", "statement": "theorem imo_1962_p4 (S : Set \u211d)\n (h\u2080 : S = { x : \u211d | Real.cos x ^ 2 + Real.cos (2 * x) ^ 2 + Real.cos (3 * x) ^ 2 = 1 }) :\n S =\n { x : \u211d |\n \u2203 m : \u2124,\n x = \u03c0 / 2 + m * \u03c0 \u2228\n x = \u03c0 / 4 + m * \u03c0 / 2 \u2228 x = \u03c0 / 6 + m * \u03c0 / 6 \u2228 x = 5 * \u03c0 / 6 + m * \u03c0 / 6 }", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_236", "statement": "theorem mathd_numbertheory_236 : 1999 ^ 2000 % 5 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_24", "statement": "theorem mathd_numbertheory_24 : (\u2211 k in Finset.Icc 1 9, 11 ^ k) % 100 = 59", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_amgm_prod1toneq1_sum1tongeqn", "statement": "theorem algebra_amgm_prod1toneq1_sum1tongeqn (a : \u2115 \u2192 NNReal) (n : \u2115)\n (h\u2080 : Finset.prod (Finset.range n) a = 1) : Finset.sum (Finset.range n) a \u2265 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_101", "statement": "theorem mathd_algebra_101 (x : \u211d) (h\u2080 : x ^ 2 - 5 * x - 4 \u2264 10) : x \u2265 -2 \u2227 x \u2264 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_257", "statement": "theorem mathd_numbertheory_257 (x : \u2115) (h\u2080 : 1 \u2264 x \u2227 x \u2264 100)\n (h\u2081 : 77 \u2223 (\u2211 k in Finset.range 101, k) - x) : x = 45", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12_2000_p5", "statement": "theorem amc12_2000_p5 (x p : \u211d) (h\u2080 : x < 2) (h\u2081 : abs (x - 2) = p) : x - p = 2 - 2 * p", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_547", "statement": "theorem mathd_algebra_547 (x y : \u211d) (h\u2080 : x = 5) (h\u2081 : y = 2) : Real.sqrt (x ^ 3 - 2 ^ y) = 11", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_200", "statement": "theorem mathd_numbertheory_200 : 139 % 11 = 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_510", "statement": "theorem mathd_algebra_510 (x y : \u211d) (h\u2080 : x + y = 13) (h\u2081 : x * y = 24) :\n Real.sqrt (x ^ 2 + y ^ 2) = 11", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_140", "statement": "theorem mathd_algebra_140 (a b c : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c)\n (h\u2081 : \u2200 x, 24 * x ^ 2 - 19 * x - 35 = (a * x - 5) * (2 * (b * x) + c)) : a * b - 3 * c = -9", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_455", "statement": "theorem mathd_algebra_455 (x : \u211d) (h\u2080 : 2 * (2 * (2 * (2 * x))) = 48) : x = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_45", "statement": "theorem mathd_numbertheory_45 : Nat.gcd 6432 132 + 11 = 23", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1994_p4", "statement": "theorem aime_1994_p4 (n : \u2115) (h\u2080 : 0 < n)\n (h\u2080 : (\u2211 k in Finset.Icc 1 n, Int.floor (Real.logb 2 k)) = 1994) : n = 312", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_739", "statement": "theorem mathd_numbertheory_739 : 9! % 10 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_245", "statement": "theorem mathd_algebra_245 (x : \u211d) (h\u2080 : x \u2260 0) :\n (4 / x)\u207b\u00b9 * (3 * x ^ 3 / x) ^ 2 * (1 / (2 * x))\u207b\u00b9 ^ 3 = 18 * x ^ 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_apb4leq8ta4pb4", "statement": "theorem algebra_apb4leq8ta4pb4 (a b : \u211d) (h\u2080 : 0 < a \u2227 0 < b) : (a + b) ^ 4 \u2264 8 * (a ^ 4 + b ^ 4)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_28", "statement": "theorem mathd_algebra_28 (c : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = 2 * x ^ 2 + 5 * x + c)\n (h\u2081 : \u2203 x, f x \u2264 0) : c \u2264 25 / 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_543", "statement": "theorem mathd_numbertheory_543 : (\u2211 k in Nat.divisors (30 ^ 4), 1) - 2 = 123", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_480", "statement": "theorem mathd_algebra_480 (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x < 0, f x = -x ^ 2 - 1)\n (h\u2081 : \u2200 x, 0 \u2264 x \u2227 x < 4 \u2192 f x = 2) (h\u2082 : \u2200 x \u2265 4, f x = Real.sqrt x) : f \u03c0 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_69", "statement": "theorem mathd_algebra_69 (rows seats : \u2115) (h\u2080 : rows * seats = 450)\n (h\u2081 : (rows + 5) * (seats - 3) = 450) : rows = 25", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_433", "statement": "theorem mathd_algebra_433 (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = 3 * Real.sqrt (2 * x - 7) - 8) : f 8 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_126", "statement": "theorem mathd_algebra_126 (x y : \u211d) (h\u2080 : 2 * 3 = x - 9) (h\u2081 : 2 * -5 = y + 1) : x = 15 \u2227 y = -11", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aimeII_2020_p6", "statement": "theorem aimeII_2020_p6 (t : \u2115 \u2192 \u211a) (h\u2080 : t 1 = 20) (h\u2081 : t 2 = 21)\n (h\u2082 : \u2200 n \u2265 3, t n = (5 * t (n - 1) + 1) / (25 * t (n - 2))) :\n \u2191(t 2020).den + (t 2020).num = 626", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2008_p2", "statement": "theorem amc12a_2008_p2 (x : \u211d) (h\u2080 : x * (1 / 2 + 2 / 3) = 1) : x = 6 / 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_35", "statement": "theorem mathd_algebra_35 (p q : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, p x = 2 - x ^ 2)\n (h\u2081 : \u2200 (x) (_ : x \u2260 0), q x = 6 / x) : p (q 2) = -7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_amgm_faxinrrp2msqrt2geq2mxm1div2x", "statement": "theorem algebra_amgm_faxinrrp2msqrt2geq2mxm1div2x :\n \u2200 x > 0, 2 - Real.sqrt 2 \u2265 2 - x - 1 / (2 * x)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_335", "statement": "theorem mathd_numbertheory_335 (n : \u2115) (h\u2080 : n % 7 = 5) : 5 * n % 7 = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_35", "statement": "theorem mathd_numbertheory_35 (S : Finset \u2115) (h\u2080 : \u2200 n : \u2115, n \u2223 Nat.sqrt 196) :\n (\u2211 k in S, k) = 24", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2021_p7", "statement": "theorem amc12a_2021_p7 (x y : \u211d) : 1 \u2264 (x * y - 1) ^ 2 + (x + y) ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_327", "statement": "theorem mathd_algebra_327 (a : \u211d) (h\u2080 : 1 / 5 * abs (9 + 2 * a) < 1) : -7 < a \u2227 a < -2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1984_p15", "statement": "theorem aime_1984_p15 (x y z w : \u211d)\n (h\u2080 :\n x ^ 2 / (2 ^ 2 - 1) + y ^ 2 / (2 ^ 2 - 3 ^ 2) + z ^ 2 / (2 ^ 2 - 5 ^ 2) +\n w ^ 2 / (2 ^ 2 - 7 ^ 2) =\n 1)\n (h\u2081 :\n x ^ 2 / (4 ^ 2 - 1) + y ^ 2 / (4 ^ 2 - 3 ^ 2) + z ^ 2 / (4 ^ 2 - 5 ^ 2) +\n w ^ 2 / (4 ^ 2 - 7 ^ 2) =\n 1)\n (h\u2082 :\n x ^ 2 / (6 ^ 2 - 1) + y ^ 2 / (6 ^ 2 - 3 ^ 2) + z ^ 2 / (6 ^ 2 - 5 ^ 2) +\n w ^ 2 / (6 ^ 2 - 7 ^ 2) =\n 1)\n (h\u2083 :\n x ^ 2 / (8 ^ 2 - 1) + y ^ 2 / (8 ^ 2 - 3 ^ 2) + z ^ 2 / (8 ^ 2 - 5 ^ 2) +\n w ^ 2 / (8 ^ 2 - 7 ^ 2) =\n 1) :\n x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2 = 36", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_amgm_sqrtxymulxmyeqxpy_xpygeq4", "statement": "theorem algebra_amgm_sqrtxymulxmyeqxpy_xpygeq4 (x y : \u211d) (h\u2080 : 0 < x \u2227 0 < y) (h\u2081 : y \u2264 x)\n (h\u2082 : Real.sqrt (x * y) * (x - y) = x + y) : x + y \u2265 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2002_p21", "statement": "theorem amc12a_2002_p21 (u : \u2115 \u2192 \u2115) (h\u2080 : u 0 = 4) (h\u2081 : u 1 = 7)\n (h\u2082 : \u2200 n \u2265 2, u (n + 2) = (u n + u (n + 1)) % 10) :\n \u2200 n, (\u2211 k in Finset.range n, u k) > 10000 \u2192 1999 \u2264 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_192", "statement": "theorem mathd_algebra_192 (q e d : \u2102) (h\u2080 : q = 11 - 5 * Complex.I) (h\u2081 : e = 11 + 5 * Complex.I)\n (h\u2082 : d = 2 * Complex.I) : q * e * d = 292 * Complex.I", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2002_p6", "statement": "theorem amc12b_2002_p6 (a b : \u211d) (h\u2080 : a \u2260 0 \u2227 b \u2260 0)\n (h\u2081 : \u2200 x, x ^ 2 + a * x + b = (x - a) * (x - b)) : a = 1 \u2227 b = -2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_102", "statement": "theorem mathd_numbertheory_102 : 2 ^ 8 % 5 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2010_p22", "statement": "theorem amc12a_2010_p22 (x : \u211d) : 49 \u2264 \u2211 k:\u2124 in Finset.Icc 1 119, abs (\u2191k * x - 1)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_81", "statement": "theorem mathd_numbertheory_81 : 71 % 3 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_155", "statement": "theorem mathd_numbertheory_155 :\n Finset.card (Finset.filter (fun x => x % 19 = 7) (Finset.Icc 100 999)) = 48", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1978_p5", "statement": "theorem imo_1978_p5 (n : \u2115) (a : \u2115 \u2192 \u2115) (h\u2080 : Function.Injective a) (h\u2081 : a 0 = 0) (h\u2082 : 0 < n) :\n (\u2211 k in Finset.Icc 1 n, (1 : \u211d) / k) \u2264 \u2211 k in Finset.Icc 1 n, a k / k ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2017_p7", "statement": "theorem amc12a_2017_p7 (f : \u2115 \u2192 \u211d) (h\u2080 : f 1 = 2) (h\u2081 : \u2200 n, 1 < n \u2227 Even n \u2192 f n = f (n - 1) + 1)\n (h\u2082 : \u2200 n, 1 < n \u2227 Odd n \u2192 f n = f (n - 2) + 2) : f 2017 = 2018", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_42", "statement": "theorem mathd_numbertheory_42 (S : Set \u2115) (u v : \u2115) (h\u2080 : \u2200 a : \u2115, a \u2208 S \u2194 0 < a \u2227 27 * a % 40 = 17)\n (h\u2081 : IsLeast S u) (h\u2082 : IsLeast (S \\ {u}) v) : u + v = 62", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_110", "statement": "theorem mathd_algebra_110 (q e : \u2102) (h\u2080 : q = 2 - 2 * Complex.I) (h\u2081 : e = 5 + 5 * Complex.I) :\n q * e = 20", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2021_p21", "statement": "theorem amc12b_2021_p21 (S : Finset \u211d)\n (h\u2080 : \u2200 x : \u211d, x \u2208 S \u2194 0 < x \u2227 x ^ (2 : \u211d) ^ Real.sqrt 2 = Real.sqrt 2 ^ (2 : \u211d) ^ x) :\n (\u21912 \u2264 \u2211 k in S, k) \u2227 (\u2211 k in S, k) < 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_405", "statement": "theorem mathd_algebra_405 (S : Finset \u2115) (h\u2080 : \u2200 x, x \u2208 S \u2194 0 < x \u2227 x ^ 2 + 4 * x + 4 < 20) :\n S.card = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "numbertheory_sumkmulnckeqnmul2pownm1", "statement": "theorem numbertheory_sumkmulnckeqnmul2pownm1 (n : \u2115) (h\u2080 : 0 < n) :\n (\u2211 k in Finset.Icc 1 n, k * Nat.choose n k) = n * 2 ^ (n - 1)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_393", "statement": "theorem mathd_algebra_393 (\u03c3 : Equiv \u211d \u211d) (h\u2080 : \u2200 x, \u03c3.1 x = 4 * x ^ 3 + 1) : \u03c3.2 33 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2004_p3", "statement": "theorem amc12b_2004_p3 (x y : \u2115) (h\u2080 : 2 ^ x * 3 ^ y = 1296) : x + y = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_303", "statement": "theorem mathd_numbertheory_303 (S : Finset \u2115)\n (h\u2080 : \u2200 n : \u2115, n \u2208 S \u2194 2 \u2264 n \u2227 171 \u2261 80 [MOD n] \u2227 468 \u2261 13 [MOD n]) : (\u2211 k in S, k) = 111", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_151", "statement": "theorem mathd_algebra_151 : Int.ceil (Real.sqrt 27) - Int.floor (Real.sqrt 26) = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2011_p18", "statement": "theorem amc12a_2011_p18 (x y : \u211d) (h\u2080 : abs (x + y) + abs (x - y) = 2) :\n x ^ 2 - 6 * x + y ^ 2 \u2264 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_15", "statement": "theorem mathd_algebra_15 (s : \u2115 \u2192 \u2115 \u2192 \u2115)\n (h\u2080 : \u2200 a b, 0 < a \u2227 0 < b \u2192 s a b = a ^ (b : \u2115) + b ^ (a : \u2115)) : s 2 6 = 100", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_211", "statement": "theorem mathd_numbertheory_211 :\n Finset.card (Finset.filter (fun n => 6 \u2223 4 * \u2191n - (2 : \u2124)) (Finset.range 60)) = 20", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_640", "statement": "theorem mathd_numbertheory_640 : (91145 + 91146 + 91147 + 91148) % 4 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2003_p6", "statement": "theorem amc12b_2003_p6 (a r : \u211d) (u : \u2115 \u2192 \u211d) (h\u2080 : \u2200 k, u k = a * r ^ k) (h\u2081 : u 1 = 2)\n (h\u2082 : u 3 = 6) : u 0 = 2 / Real.sqrt 3 \u2228 u 0 = -(2 / Real.sqrt 3)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_2rootsintpoly_am10tap11eqasqpam110", "statement": "theorem algebra_2rootsintpoly_am10tap11eqasqpam110 (a : \u2102) :\n (a - 10) * (a + 11) = a ^ 2 + a - 110", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1991_p1", "statement": "theorem aime_1991_p1 (x y : \u2115) (h\u2080 : 0 < x \u2227 0 < y) (h\u2081 : x * y + (x + y) = 71)\n (h\u2082 : x ^ 2 * y + x * y ^ 2 = 880) : x ^ 2 + y ^ 2 = 146", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_43", "statement": "theorem mathd_algebra_43 (a b : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = a * x + b) (h\u2081 : f 7 = 4)\n (h\u2082 : f 6 = 3) : f 3 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1988_p6", "statement": "theorem imo_1988_p6 (a b : \u2115) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : a * b + 1 \u2223 a ^ 2 + b ^ 2) :\n \u2203 x : \u2115, (x ^ 2 : \u211d) = (a ^ 2 + b ^ 2) / (a * b + 1)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1996_p5", "statement": "theorem aime_1996_p5 (a b c r s t : \u211d) (f g : \u211d \u2192 \u211d)\n (h\u2080 : \u2200 x, f x = x ^ 3 + 3 * x ^ 2 + 4 * x - 11) (h\u2081 : \u2200 x, g x = x ^ 3 + r * x ^ 2 + s * x + t)\n (h\u2082 : f a = 0) (h\u2083 : f b = 0) (h\u2084 : f c = 0) (h\u2085 : g (a + b) = 0) (h\u2086 : g (b + c) = 0)\n (h\u2087 : g (c + a) = 0) (h\u2088 : List.Pairwise (\u00b7 \u2260 \u00b7) [a, b, c]) : t = 23", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_55", "statement": "theorem mathd_algebra_55 (q p : \u211d) (h\u2080 : q = 2 - 4 + 6 - 8 + 10 - 12 + 14)\n (h\u2081 : p = 3 - 6 + 9 - 12 + 15 - 18 + 21) : q / p = 2 / 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_sqineq_2at2pclta2c2p41pc", "statement": "theorem algebra_sqineq_2at2pclta2c2p41pc (a c : \u211d) :\n 2 * a * (2 + c) \u2264 a ^ 2 + c ^ 2 + 4 * (1 + c)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_43", "statement": "theorem mathd_numbertheory_43 : IsGreatest { n : \u2115 | 15 ^ n \u2223 942! } 233", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_214", "statement": "theorem mathd_algebra_214 (a : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = a * (x - 2) ^ 2 + 3) (h\u2081 : f 4 = 4) :\n f 6 = 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_96", "statement": "theorem mathd_algebra_96 (x y z a : \u211d) (h\u2080 : 0 < x \u2227 0 < y \u2227 0 < z)\n (h\u2081 : Real.log x - Real.log y = a) (h\u2082 : Real.log y - Real.log z = 15)\n (h\u2083 : Real.log z - Real.log x = -7) : a = -8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12_2001_p2", "statement": "theorem amc12_2001_p2 (a b n : \u2115) (h\u2080 : 1 \u2264 a \u2227 a \u2264 9) (h\u2081 : 0 \u2264 b \u2227 b \u2264 9) (h\u2082 : n = 10 * a + b)\n (h\u2083 : n = a * b + a + b) : b = 9", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_185", "statement": "theorem mathd_algebra_185 (s : Finset \u2124) (f : \u2124 \u2192 \u2124) (h\u2080 : \u2200 x, f x = abs (x + 4))\n (h\u2081 : \u2200 x, x \u2208 s \u2194 f x < 9) : s.card = 17", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_binomnegdiscrineq_10alt28asqp1", "statement": "theorem algebra_binomnegdiscrineq_10alt28asqp1 (a : \u211d) : 10 * a \u2264 28 * a ^ 2 + 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_284", "statement": "theorem mathd_numbertheory_284 (a b : \u2115) (h\u2080 : 1 \u2264 a \u2227 a \u2264 9 \u2227 b \u2264 9)\n (h\u2081 : 10 * a + b = 2 * (a + b)) : 10 * a + b = 18", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2009_p2", "statement": "theorem amc12a_2009_p2 : 1 + 1 / (1 + 1 / (1 + 1)) = (5 : \u211a) / 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_709", "statement": "theorem mathd_numbertheory_709 (n : \u2115) (h\u2080 : 0 < n) (h\u2081 : Finset.card (Nat.divisors (2 * n)) = 28)\n (h\u2082 : Finset.card (Nat.divisors (3 * n)) = 30) : Finset.card (Nat.divisors (6 * n)) = 35", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2013_p8", "statement": "theorem amc12a_2013_p8 (x y : \u211d) (h\u2080 : x \u2260 0) (h\u2081 : y \u2260 0) (h\u2082 : x \u2260 y)\n (h\u2083 : x + 2 / x = y + 2 / y) : x * y = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_461", "statement": "theorem mathd_numbertheory_461 (n : \u2115)\n (h\u2080 : n = Finset.card (Finset.filter (fun x => Nat.gcd x 8 = 1) (Finset.Icc 1 7))) :\n 3 ^ n % 8 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_59", "statement": "theorem mathd_algebra_59 (b : \u211d) (h\u2080 : (4 : \u211d) ^ b + 2 ^ 3 = 12) : b = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_234", "statement": "theorem mathd_algebra_234 (d : \u211d) (h\u2080 : 27 / 125 * d = 9 / 25) : 3 / 5 * d ^ 3 = 25 / 9", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1973_p3", "statement": "theorem imo_1973_p3 (a b : \u211d) (h\u2080 : \u2203 x, x ^ 4 + a * x ^ 3 + b * x ^ 2 + a * x + 1 = 0) :\n 4 / 5 \u2264 a ^ 2 + b ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2020_p5", "statement": "theorem amc12b_2020_p5 (a b : \u2115) (h\u2080 : (5 : \u211a) / 8 * b = 2 / 3 * a + 7)\n (h\u2081 : (b : \u211a) - 5 / 8 * b = a - 2 / 3 * a + 7) : a = 42", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "numbertheory_sqmod3in01d", "statement": "theorem numbertheory_sqmod3in01d (a : \u2124) : a ^ 2 % 3 = 0 \u2228 a ^ 2 % 3 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_131", "statement": "theorem mathd_algebra_131 (a b : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = 2 * x ^ 2 - 7 * x + 2)\n (h\u2081 : f a = 0) (h\u2082 : f b = 0) (h\u2083 : a \u2260 b) : 1 / (a - 1) + 1 / (b - 1) = -1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2003_p17", "statement": "theorem amc12b_2003_p17 (x y : \u211d) (h\u2080 : 0 < x \u2227 0 < y) (h\u2081 : Real.log (x * y ^ 3) = 1)\n (h\u2082 : Real.log (x ^ 2 * y) = 1) : Real.log (x * y) = 3 / 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_536", "statement": "theorem mathd_algebra_536 : \u21913! * ((2 : \u211d) ^ 3 + Real.sqrt 9) / 2 = (33 : \u211d)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_22", "statement": "theorem mathd_algebra_22 : Real.logb (5 ^ 2) (5 ^ 4) = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "numbertheory_xsqpysqintdenomeq", "statement": "theorem numbertheory_xsqpysqintdenomeq (x y : \u211a) (h\u2080 : (x ^ 2 + y ^ 2).den = 1) : x.den = y.den", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aimeII_2001_p3", "statement": "theorem aimeII_2001_p3 (x : \u2115 \u2192 \u2124) (h\u2080 : x 1 = 211) (h\u2082 : x 2 = 375) (h\u2083 : x 3 = 420)\n (h\u2084 : x 4 = 523) (h\u2086 : \u2200 n \u2265 5, x n = x (n - 1) - x (n - 2) + x (n - 3) - x (n - 4)) :\n x 531 + x 753 + x 975 = 898", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_22", "statement": "theorem mathd_numbertheory_22 (b : \u2115) (h\u2080 : b < 10)\n (h\u2081 : Nat.sqrt (10 * b + 6) * Nat.sqrt (10 * b + 6) = 10 * b + 6) : b = 3 \u2228 b = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1987_p8", "statement": "theorem aime_1987_p8 :\n IsGreatest { n : \u2115 | 0 < n \u2227 \u2203! k : \u2115, (8 : \u211d) / 15 < n / (n + k) \u2227 (n : \u211d) / (n + k) < 7 / 13 }\n 112", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_136", "statement": "theorem mathd_numbertheory_136 (n : \u2115) (h\u2080 : 123 * n + 17 = 39500) : n = 321", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12_2000_p11", "statement": "theorem amc12_2000_p11 (a b : \u211d) (h\u2080 : a \u2260 0 \u2227 b \u2260 0) (h\u2081 : a * b = a - b) :\n a / b + b / a - a * b = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2003_p9", "statement": "theorem amc12b_2003_p9 (a b : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = a * x + b) (h\u2081 : f 6 - f 2 = 12) :\n f 12 - f 2 = 30", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_2complexrootspoly_xsqp49eqxp7itxpn7i", "statement": "theorem algebra_2complexrootspoly_xsqp49eqxp7itxpn7i (x : \u2102) :\n x ^ 2 + 49 = (x + 7 * Complex.I) * (x + -7 * Complex.I)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_198", "statement": "theorem mathd_numbertheory_198 : 5 ^ 2005 % 100 = 25", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_149", "statement": "theorem mathd_algebra_149 (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x < -5, f x = x ^ 2 + 5)\n (h\u2081 : \u2200 x \u2265 -5, f x = 3 * x - 8) (h\u2082 : Fintype (f \u207b\u00b9' {10})) :\n (\u2211 k in (f \u207b\u00b9' {10}).toFinset, k) = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_132", "statement": "theorem mathd_algebra_132 (x : \u211d) (f g : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = x + 2) (h\u2081 : \u2200 x, g x = x ^ 2)\n (h\u2082 : f (g x) = g (f x)) : x = -1 / 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_37", "statement": "theorem mathd_numbertheory_37 : Nat.lcm 9999 100001 = 90900909", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1983_p9", "statement": "theorem aime_1983_p9 (x : \u211d) (h\u2080 : 0 < x \u2227 x < Real.pi) :\n 12 \u2264 (9 * (x ^ 2 * Real.sin x ^ 2) + 4) / (x * Real.sin x)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_37", "statement": "theorem mathd_algebra_37 (x y : \u211d) (h\u2080 : x + y = 7) (h\u2081 : 3 * x + y = 45) : x ^ 2 - y ^ 2 = 217", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_458", "statement": "theorem mathd_numbertheory_458 (n : \u2115) (h\u2080 : n % 8 = 7) : n % 4 = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2008_p15", "statement": "theorem amc12a_2008_p15 (k : \u2115) (h\u2080 : k = 2008 ^ 2 + 2 ^ 2008) : (k ^ 2 + 2 ^ k) % 10 = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_301", "statement": "theorem mathd_numbertheory_301 (j : \u2115) (h\u2080 : 0 < j) : 3 * (7 * \u2191j + 3) % 7 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2009_p15", "statement": "theorem amc12a_2009_p15 (n : \u2115) (h\u2080 : 0 < n)\n (h\u2081 : (\u2211 k in Finset.Icc 1 n, \u2191k * Complex.I ^ k) = 48 + 49 * Complex.I) : n = 97", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_sqineq_36azm9asqle36zsq", "statement": "theorem algebra_sqineq_36azm9asqle36zsq (z a : \u211d) : 36 * (a * z) - 9 * a ^ 2 \u2264 36 * z ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2013_p7", "statement": "theorem amc12a_2013_p7 (s : \u2115 \u2192 \u211d) (h\u2080 : \u2200 n, s (n + 2) = s (n + 1) + s n) (h\u2081 : s 9 = 110)\n (h\u2082 : s 7 = 42) : s 4 = 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_104", "statement": "theorem mathd_algebra_104 (x : \u211d) (h\u2080 : 125 / 8 = x / 12) : x = 375 / 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_252", "statement": "theorem mathd_numbertheory_252 : 7! % 23 = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2020_p21", "statement": "theorem amc12a_2020_p21 (S : Finset \u2115)\n (h\u2080 : \u2200 n : \u2115, n \u2208 S \u2194 5 \u2223 n \u2227 Nat.lcm 5! n = 5 * Nat.gcd 10! n) : S.card = 48", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_493", "statement": "theorem mathd_algebra_493 (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = x ^ 2 - 4 * Real.sqrt x + 1) :\n f (f 4) = 70", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "numbertheory_nckeqnm1ckpnm1ckm1", "statement": "theorem numbertheory_nckeqnm1ckpnm1ckm1 (n k : \u2115) (h\u2080 : 0 < n \u2227 0 < k) (h\u2081 : k \u2264 n) :\n Nat.choose n k = Nat.choose (n - 1) k + Nat.choose (n - 1) (k - 1)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_3rootspoly_amdtamctambeqnasqmbpctapcbtdpasqmbpctapcbta", "statement": "theorem algebra_3rootspoly_amdtamctambeqnasqmbpctapcbtdpasqmbpctapcbta (b c d a : \u2102) :\n (a - d) * (a - c) * (a - b) =\n -((a ^ 2 - (b + c) * a + c * b) * d) + (a ^ 2 - (b + c) * a + c * b) * a", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_403", "statement": "theorem mathd_numbertheory_403 : (\u2211 k in Nat.properDivisors 198, k) = 270", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_190", "statement": "theorem mathd_algebra_190 : ((3 : \u211d) / 8 + 7 / 8) / (4 / 5) = 25 / 16", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_269", "statement": "theorem mathd_numbertheory_269 : (2005 ^ 2 + 2005 ^ 0 + 2005 ^ 0 + 2005 ^ 5) % 100 = 52", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1990_p2", "statement": "theorem aime_1990_p2 :\n (52 + 6 * Real.sqrt 43) ^ ((3 : \u211d) / 2) - (52 - 6 * Real.sqrt 43) ^ ((3 : \u211d) / 2) = 828", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_101", "statement": "theorem mathd_numbertheory_101 : 17 * 18 % 4 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_sqineq_4bap1lt4bsqpap1sq", "statement": "theorem algebra_sqineq_4bap1lt4bsqpap1sq (a b : \u211d) : 4 * b * (a + 1) \u2264 4 * b ^ 2 + (a + 1) ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_156", "statement": "theorem mathd_numbertheory_156 (n : \u2115) (h\u2080 : 0 < n) : Nat.gcd (n + 7) (2 * n + 1) \u2264 13", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_451", "statement": "theorem mathd_algebra_451 (\u03c3 : Equiv \u211d \u211d) (h\u2080 : \u03c3.2 (-15) = 0) (h\u2081 : \u03c3.2 0 = 3) (h\u2082 : \u03c3.2 3 = 9)\n (h\u2083 : \u03c3.2 9 = 20) : \u03c3.1 (\u03c3.1 9) = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_144", "statement": "theorem mathd_algebra_144 (a b c d : \u2115) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c \u2227 0 < d) (h\u2080 : (c : \u2124) - b = d)\n (h\u2081 : (b : \u2124) - a = d) (h\u2082 : a + b + c = 60) (h\u2083 : a + b > c) : d < 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_282", "statement": "theorem mathd_algebra_282 (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x : \u211d, \u00ac (Irrational x) \u2192 f x = abs (Int.floor x))\n (h\u2081 : \u2200 x, Irrational x \u2192 f x = (Int.ceil x) ^ 2) :\n f (8 ^ (1 / 3)) + f (-Real.pi) + f (Real.sqrt 50) + f (9 / 2) = 79", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_410", "statement": "theorem mathd_algebra_410 (x y : \u211d) (h\u2080 : y = x ^ 2 - 6 * x + 13) : 4 \u2264 y", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_232", "statement": "theorem mathd_numbertheory_232 (x y z : ZMod 31) (h\u2080 : x = 3\u207b\u00b9) (h\u2081 : y = 5\u207b\u00b9)\n (h\u2082 : z = (x + y)\u207b\u00b9) : z = 29", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_77", "statement": "theorem mathd_algebra_77 (a b : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : a \u2260 0 \u2227 b \u2260 0) (h\u2081 : a \u2260 b)\n (h\u2082 : \u2200 x, f x = x ^ 2 + a * x + b) (h\u2083 : f a = 0) (h\u2084 : f b = 0) : a = 1 \u2227 b = -2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1974_p5", "statement": "theorem imo_1974_p5 (a b c d s : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c \u2227 0 < d)\n (h\u2081 : s = a / (a + b + d) + b / (a + b + c) + c / (b + c + d) + d / (a + c + d)) :\n 1 < s \u2227 s < 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1988_p3", "statement": "theorem aime_1988_p3 (x : \u211d) (h\u2080 : 0 < x)\n (h\u2081 : Real.logb 2 (Real.logb 8 x) = Real.logb 8 (Real.logb 2 x)) : Real.logb 2 x ^ 2 = 27", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_530", "statement": "theorem mathd_numbertheory_530 (n k : \u2115) (h\u2080 : 0 < n \u2227 0 < k) (h\u2080 : (n : \u211d) / k < 6)\n (h\u2081 : (5 : \u211d) < n / k) : 22 \u2264 Nat.lcm n k / Nat.gcd n k", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_109", "statement": "theorem mathd_algebra_109 (a b : \u211d) (h\u2080 : 3 * a + 2 * b = 12) (h\u2081 : a = 4) : b = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1967_p3", "statement": "theorem imo_1967_p3 (k m n : \u2115) (c : \u2115 \u2192 \u2115) (h\u2080 : 0 < k \u2227 0 < m \u2227 0 < n)\n (h\u2081 : \u2200 s, c s = s * (s + 1)) (h\u2082 : Nat.Prime (k + m + 1)) (h\u2083 : n + 1 < k + m + 1) :\n (\u220f i in Finset.Icc 1 n, c i) \u2223 \u220f i in Finset.Icc 1 n, c (m + i) - c k", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_11", "statement": "theorem mathd_algebra_11 (a b : \u211d) (h\u2080 : a \u2260 b) (h\u2081 : a \u2260 2 * b)\n (h\u2082 : (4 * a + 3 * b) / (a - 2 * b) = 5) : (a + 11 * b) / (a - b) = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2003_p1", "statement": "theorem amc12a_2003_p1 (u v : \u2115 \u2192 \u2115) (h\u2080 : \u2200 n, u n = 2 * n + 2) (h\u2081 : \u2200 n, v n = 2 * n + 1) :\n ((\u2211 k in Finset.range 2003, u k) - \u2211 k in Finset.range 2003, v k) = 2003", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "numbertheory_aneqprodakp4_anmsqrtanp1eq2", "statement": "theorem numbertheory_aneqprodakp4_anmsqrtanp1eq2 (a : \u2115 \u2192 \u211d) (h\u2080 : a 0 = 1)\n (h\u2081 : \u2200 n, a (n + 1) = (\u220f k in Finset.range (n + 1), a k) + 4) :\n \u2200 n \u2265 1, a n - Real.sqrt (a (n + 1)) = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_2rootspoly_apatapbeq2asqp2ab", "statement": "theorem algebra_2rootspoly_apatapbeq2asqp2ab (a b : \u2102) :\n (a + a) * (a + b) = 2 * a ^ 2 + 2 * (a * b)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "induction_sum_odd", "statement": "theorem induction_sum_odd (n : \u2115) : (\u2211 k in Finset.range n, 2 * k) + 1 = n ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_568", "statement": "theorem mathd_algebra_568 (a : \u211d) :\n (a - 1) * (a + 1) * (a + 2) - (a - 2) * (a + 1) = a ^ 3 + a ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_616", "statement": "theorem mathd_algebra_616 (f g : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = x ^ 3 + 2 * x + 1)\n (h\u2081 : \u2200 x, g x = x - 1) : f (g 1) = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_690", "statement": "theorem mathd_numbertheory_690 :\n IsLeast { a : \u2115 | 0 < a \u2227 a \u2261 2 [MOD 3] \u2227 a \u2261 4 [MOD 5] \u2227 a \u2261 6 [MOD 7] \u2227 a \u2261 8 [MOD 9] } 314", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2016_p2", "statement": "theorem amc12a_2016_p2 (x : \u211d) (h\u2080 : (10 : \u211d) ^ x * 100 ^ (2 * x) = 1000 ^ 5) : x = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_405", "statement": "theorem mathd_numbertheory_405 (a b c : \u2115) (t : \u2115 \u2192 \u2115) (h\u2080 : t 0 = 0) (h\u2081 : t 1 = 1)\n (h\u2082 : \u2200 n > 1, t n = t (n - 2) + t (n - 1)) (h\u2083 : a \u2261 5 [MOD 16]) (h\u2084 : b \u2261 10 [MOD 16])\n (h\u2085 : c \u2261 15 [MOD 16]) : (t a + t b + t c) % 7 = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_110", "statement": "theorem mathd_numbertheory_110 (a b : \u2115) (h\u2080 : 0 < a \u2227 0 < b \u2227 b \u2264 a) (h\u2081 : (a + b) % 10 = 2)\n (h\u2082 : (2 * a + b) % 10 = 1) : (a - b) % 10 = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2003_p25", "statement": "theorem amc12a_2003_p25 (a b : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : 0 < b)\n (h\u2081 : \u2200 x, f x = Real.sqrt (a * x ^ 2 + b * x)) (h\u2082 : { x | 0 \u2264 f x } = f '' { x | 0 \u2264 f x }) :\n a = 0 \u2228 a = -4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2010_p10", "statement": "theorem amc12a_2010_p10 (p q : \u211d) (a : \u2115 \u2192 \u211d) (h\u2080 : \u2200 n, a (n + 2) - a (n + 1) = a (n + 1) - a n)\n (h\u2081 : a 1 = p) (h\u2082 : a 2 = 9) (h\u2083 : a 3 = 3 * p - q) (h\u2084 : a 4 = 3 * p + q) : a 2010 = 8041", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_509", "statement": "theorem mathd_algebra_509 :\n Real.sqrt ((5 / Real.sqrt 80 + Real.sqrt 845 / 9 + Real.sqrt 45) / Real.sqrt 5) = 13 / 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_159", "statement": "theorem mathd_algebra_159 (b : \u211d) (f : \u211d \u2192 \u211d)\n (h\u2080 : \u2200 x, f x = 3 * x ^ 4 - 7 * x ^ 3 + 2 * x ^ 2 - b * x + 1) (h\u2081 : f 1 = 1) : b = -2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1997_p11", "statement": "theorem aime_1997_p11 (x : \u211d)\n (h\u2080 :\n x =\n (\u2211 n in Finset.Icc (1 : \u2115) 44, Real.cos (n * \u03c0 / 180)) /\n \u2211 n in Finset.Icc (1 : \u2115) 44, Real.sin (n * \u03c0 / 180)) :\n Int.floor (100 * x) = 241", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aimeI_2000_p7", "statement": "theorem aimeI_2000_p7 (x y z : \u211d) (m : \u211a) (h\u2080 : 0 < x \u2227 0 < y \u2227 0 < z) (h\u2081 : x * y * z = 1)\n (h\u2082 : x + 1 / z = 5) (h\u2083 : y + 1 / x = 29) (h\u2084 : z + 1 / y = m) (h\u2085 : 0 < m) :\n \u2191m.den + m.num = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "aime_1988_p4", "statement": "theorem aime_1988_p4 (n : \u2115) (a : \u2115 \u2192 \u211d) (h\u2080 : \u2200 n, abs (a n) < 1)\n (h\u2081 : (\u2211 k in Finset.range n, abs (a k)) = 19 + abs (\u2211 k in Finset.range n, a k)) : 20 \u2264 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "induction_divisibility_9div10tonm1", "statement": "theorem induction_divisibility_9div10tonm1 (n : \u2115) (h\u2080 : 0 < n) : 9 \u2223 10 ^ n - 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_126", "statement": "theorem mathd_numbertheory_126 (x a : \u2115) (h\u2080 : 0 < x \u2227 0 < a) (h\u2081 : Nat.gcd a 40 = x + 3)\n (h\u2082 : Nat.lcm a 40 = x * (x + 3))\n (h\u2083 : \u2200 b : \u2115, 0 < b \u2192 Nat.gcd b 40 = x + 3 \u2227 Nat.lcm b 40 = x * (x + 3) \u2192 a \u2264 b) : a = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_323", "statement": "theorem mathd_algebra_323 (\u03c3 : Equiv \u211d \u211d) (h : \u2200 x, \u03c3.1 x = x ^ 3 - 8) : \u03c3.2 (\u03c3.1 (\u03c3.2 19)) = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_421", "statement": "theorem mathd_algebra_421 (a b c d : \u211d) (h\u2080 : b = a ^ 2 + 4 * a + 6)\n (h\u2081 : b = 1 / 2 * a ^ 2 + a + 6) (h\u2082 : d = c ^ 2 + 4 * c + 6) (h\u2083 : d = 1 / 2 * c ^ 2 + c + 6)\n (h\u2084 : a < c) : c - a = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1987_p6", "statement": "theorem imo_1987_p6 (p : \u2115) (f : \u2115 \u2192 \u2115) (h\u2080 : \u2200 x, f x = x ^ 2 + x + p)\n (h\u2080 : \u2200 k : \u2115, k \u2264 Nat.floor (Real.sqrt (p / 3)) \u2192 Nat.Prime (f k)) :\n \u2200 i \u2264 p - 2, Nat.Prime (f i)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2009_p25", "statement": "theorem amc12a_2009_p25 (a : \u2115 \u2192 \u211d) (h\u2080 : a 1 = 1) (h\u2081 : a 2 = 1 / Real.sqrt 3)\n (h\u2082 : \u2200 n, 1 \u2264 n \u2192 a (n + 2) = (a n + a (n + 1)) / (1 - a n * a (n + 1))) : abs (a 2009) = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1961_p1", "statement": "theorem imo_1961_p1 (x y z a b : \u211d) (h\u2080 : 0 < x \u2227 0 < y \u2227 0 < z) (h\u2081 : x \u2260 y) (h\u2082 : y \u2260 z)\n (h\u2083 : z \u2260 x) (h\u2084 : x + y + z = a) (h\u2085 : x ^ 2 + y ^ 2 + z ^ 2 = b ^ 2) (h\u2086 : x * y = z ^ 2) :\n 0 < a \u2227 b ^ 2 < a ^ 2 \u2227 a ^ 2 < 3 * b ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_31", "statement": "theorem mathd_algebra_31 (x : NNReal) (u : \u2115 \u2192 NNReal) (h\u2080 : \u2200 n, u (n + 1) = NNReal.sqrt (x + u n))\n (h\u2081 : Filter.Tendsto u Filter.atTop (\ud835\udcdd 9)) : 9 = NNReal.sqrt (x + 9)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_manipexpr_apbeq2cceqiacpbceqm2", "statement": "theorem algebra_manipexpr_apbeq2cceqiacpbceqm2 (a b c : \u2102) (h\u2080 : a + b = 2 * c)\n (h\u2081 : c = Complex.I) : a * c + b * c = -2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_370", "statement": "theorem mathd_numbertheory_370 (n : \u2115) (h\u2080 : n % 7 = 3) : (2 * n + 1) % 7 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_437", "statement": "theorem mathd_algebra_437 (x y : \u211d) (n : \u2124) (h\u2080 : x ^ 3 = -45) (h\u2081 : y ^ 3 = -101) (h\u2082 : x < n)\n (h\u2083 : \u2191n < y) : n = -4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1966_p5", "statement": "theorem imo_1966_p5 (x a : \u2115 \u2192 \u211d) (h\u2080 : a 1 \u2260 a 2) (h\u2081 : a 1 \u2260 a 3) (h\u2082 : a 1 \u2260 a 4)\n (h\u2083 : a 2 \u2260 a 3) (h\u2084 : a 2 \u2260 a 4) (h\u2085 : a 3 \u2260 a 4) (h\u2086 : a 1 > a 2) (h\u2087 : a 2 > a 3)\n (h\u2088 : a 3 > a 4)\n (h\u2089 : abs (a 1 - a 2) * x 2 + abs (a 1 - a 3) * x 3 + abs (a 1 - a 4) * x 4 = 1)\n (h\u2081\u2080 : abs (a 2 - a 1) * x 1 + abs (a 2 - a 3) * x 3 + abs (a 2 - a 4) * x 4 = 1)\n (h\u2081\u2081 : abs (a 3 - a 1) * x 1 + abs (a 3 - a 2) * x 2 + abs (a 3 - a 4) * x 4 = 1)\n (h\u2081\u2082 : abs (a 4 - a 1) * x 1 + abs (a 4 - a 2) * x 2 + abs (a 4 - a 3) * x 3 = 1) :\n x 2 = 0 \u2227 x 3 = 0 \u2227 x 1 = 1 / abs (a 1 - a 4) \u2227 x 4 = 1 / abs (a 1 - a 4)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_89", "statement": "theorem mathd_algebra_89 (b : \u211d) (h\u2080 : b \u2260 0) :\n (7 * b ^ 3) ^ 2 * (4 * b ^ 2) ^ (-(3 : \u2124)) = 49 / 64", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1966_p4", "statement": "theorem imo_1966_p4 (n : \u2115) (x : \u211d) (h\u2080 : \u2200 k : \u2115, 0 < k \u2192 \u2200 m : \u2124, x \u2260 m * \u03c0 / 2 ^ k)\n (h\u2081 : 0 < n) :\n (\u2211 k in Finset.Icc 1 n, 1 / Real.sin (2 ^ k * x)) = 1 / Real.tan x - 1 / Real.tan (2 ^ n * x)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_67", "statement": "theorem mathd_algebra_67 (f g : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = 5 * x + 3) (h\u2081 : \u2200 x, g x = x ^ 2 - 2) :\n g (f (-1)) = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_326", "statement": "theorem mathd_numbertheory_326 (n : \u2115) (h\u2080 : (\u2191n - 1) * \u2191n * (\u2191n + 1) = (720 : \u2124)) : n + 1 = 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "induction_divisibility_3div2tooddnp1", "statement": "theorem induction_divisibility_3div2tooddnp1 (n : \u2115) : 3 \u2223 2 ^ (2 * n + 1) + 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_123", "statement": "theorem mathd_algebra_123 (a b : \u2115) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : a + b = 20) (h\u2082 : a = 3 * b) :\n a - b = 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_2varlineareq_xpeeq7_2xpeeq3_eeq11_xeqn4", "statement": "theorem algebra_2varlineareq_xpeeq7_2xpeeq3_eeq11_xeqn4 (x e : \u2102) (h\u2080 : x + e = 7)\n (h\u2081 : 2 * x + e = 3) : e = 11 \u2227 x = -4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1993_p5", "statement": "theorem imo_1993_p5 : \u2203 f : \u2115 \u2192 \u2115, f 1 = 2 \u2227 \u2200 n, f (f n) = f n + n \u2227 \u2200 n, f n < f (n + 1)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "numbertheory_prmdvsneqnsqmodpeq0", "statement": "theorem numbertheory_prmdvsneqnsqmodpeq0 (n : \u2124) (p : \u2115) (h\u2080 : Nat.Prime p) :\n \u2191p \u2223 n \u2194 n ^ 2 % p = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1964_p1_1", "statement": "theorem imo_1964_p1_1 (n : \u2115) (h\u2080 : 7 \u2223 2 ^ n - 1) : 3 \u2223 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1990_p3", "statement": "theorem imo_1990_p3 (n : \u2115) (h\u2080 : 2 \u2264 n) (h\u2081 : n ^ 2 \u2223 2 ^ n + 1) : n = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "induction_ineq_nsqlefactn", "statement": "theorem induction_ineq_nsqlefactn (n : \u2115) (h\u2080 : 4 \u2264 n) : n ^ 2 \u2264 n !", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_30", "statement": "theorem mathd_numbertheory_30 :\n (33818 ^ 2 + 33819 ^ 2 + 33820 ^ 2 + 33821 ^ 2 + 33822 ^ 2) % 17 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_267", "statement": "theorem mathd_algebra_267 (x : \u211d) (h\u2080 : x \u2260 1) (h\u2081 : x \u2260 -2)\n (h\u2082 : (x + 1) / (x - 1) = (x - 2) / (x + 2)) : x = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_961", "statement": "theorem mathd_numbertheory_961 : 2003 % 11 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "induction_seq_mul2pnp1", "statement": "theorem induction_seq_mul2pnp1 (n : \u2115) (u : \u2115 \u2192 \u2115) (h\u2080 : u 0 = 0)\n (h\u2081 : \u2200 n, u (n + 1) = 2 * u n + (n + 1)) : u n = 2 ^ (n + 1) - (n + 2)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2002_p12", "statement": "theorem amc12a_2002_p12 (f : \u211d \u2192 \u211d) (k : \u211d) (a b : \u2115) (h\u2080 : \u2200 x, f x = x ^ 2 - 63 * x + k)\n (h\u2081 : f a = 0 \u2227 f b = 0) (h\u2082 : a \u2260 b) (h\u2083 : Nat.Prime a \u2227 Nat.Prime b) : k = 122", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_manipexpr_2erprsqpesqeqnrpnesq", "statement": "theorem algebra_manipexpr_2erprsqpesqeqnrpnesq (e r : \u2102) :\n 2 * (e * r) + (e ^ 2 + r ^ 2) = (-r + -e) ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_119", "statement": "theorem mathd_algebra_119 (d e : \u211d) (h\u2080 : 2 * d = 17 * e - 8) (h\u2081 : 2 * e = d - 9) : e = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2020_p13", "statement": "theorem amc12a_2020_p13 (a b c : \u2115) (n : NNReal) (h\u2080 : n \u2260 1) (h\u2081 : 1 < a \u2227 1 < b \u2227 1 < c)\n (h\u2082 : (n * (n * n ^ (1 / c)) ^ (1 / b)) ^ (1 / a) = (n ^ 25) ^ (1 / 36)) : b = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1977_p5", "statement": "theorem imo_1977_p5 (a b q r : \u2115) (h\u2080 : r < a + b) (h\u2081 : a ^ 2 + b ^ 2 = (a + b) * q + r)\n (h\u2082 : q ^ 2 + r = 1977) :\n abs ((a : \u2124) - 22) = 15 \u2227 abs ((b : \u2124) - 22) = 28 \u2228\n abs ((a : \u2124) - 22) = 28 \u2227 abs ((b : \u2124) - 22) = 15", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "numbertheory_2dvd4expn", "statement": "theorem numbertheory_2dvd4expn (n : \u2115) (h\u2080 : n \u2260 0) : 2 \u2223 4 ^ n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2010_p11", "statement": "theorem amc12a_2010_p11 (x b : \u211d) (h\u2080 : 0 < b) (h\u2081 : (7 : \u211d) ^ (x + 7) = 8 ^ x)\n (h\u2082 : x = Real.logb b (7 ^ 7)) : b = 8 / 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2003_p24", "statement": "theorem amc12a_2003_p24 :\n IsGreatest { y : \u211d | \u2203 a b : \u211d, 1 < b \u2227 b \u2264 a \u2227 y = Real.logb a (a / b) + Real.logb b (b / a) }\n 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2002_p1", "statement": "theorem amc12a_2002_p1 (f : \u2102 \u2192 \u2102) (h\u2080 : \u2200 x, f x = (2 * x + 3) * (x - 4) + (2 * x + 3) * (x - 6))\n (h\u2081 : Fintype (f \u207b\u00b9' {0})) : (\u2211 y in (f \u207b\u00b9' {0}).toFinset, y) = 7 / 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_206", "statement": "theorem mathd_algebra_206 (a b : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = x ^ 2 + a * x + b) (h\u2081 : 2 * a \u2260 b)\n (h\u2082 : f (2 * a) = 0) (h\u2083 : f b = 0) : a + b = -1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_92", "statement": "theorem mathd_numbertheory_92 (n : \u2115) (h\u2080 : 5 * n % 17 = 8) : n % 17 = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_482", "statement": "theorem mathd_algebra_482 (m n : \u2115) (k : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : Nat.Prime m) (h\u2081 : Nat.Prime n)\n (h\u2082 : \u2200 x, f x = x ^ 2 - 12 * x + k) (h\u2083 : f m = 0) (h\u2084 : f n = 0) (h\u2085 : m \u2260 n) : k = 35", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12b_2002_p3", "statement": "theorem amc12b_2002_p3 (S : Finset \u2115)\n -- note: we use (n^2 + 2 - 3 * n) over (n^2 - 3 * n + 2) because nat subtraction truncates the latter at 1 and 2\n (h\u2080 : \u2200 n : \u2115, n \u2208 S \u2194 0 < n \u2227 Nat.Prime (n ^ 2 + 2 - 3 * n)) :\n S.card = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_668", "statement": "theorem mathd_numbertheory_668 (l r : ZMod 7) (h\u2080 : l = (2 + 3)\u207b\u00b9) (h\u2081 : r = 2\u207b\u00b9 + 3\u207b\u00b9) :\n l - r = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_251", "statement": "theorem mathd_algebra_251 (x : \u211d) (h\u2080 : x \u2260 0) (h\u2081 : 3 + 1 / x = 7 / x) : x = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_84", "statement": "theorem mathd_numbertheory_84 : Int.floor ((9 : \u211d) / 160 * 100) = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_412", "statement": "theorem mathd_numbertheory_412 (x y : \u2115) (h\u2080 : x % 19 = 4) (h\u2081 : y % 19 = 7) :\n (x + 1) ^ 2 * (y + 5) ^ 3 % 19 = 13", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_181", "statement": "theorem mathd_algebra_181 (n : \u211d) (h\u2080 : n \u2260 3) (h\u2081 : (n + 5) / (n - 3) = 2) : n = 11", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2016_p3", "statement": "theorem amc12a_2016_p3 (f : \u211d \u2192 \u211d \u2192 \u211d)\n (h\u2080 : \u2200 x, \u2200 (y) (_ : y \u2260 0), f x y = x - y * Int.floor (x / y)) :\n f (3 / 8) (-(2 / 5)) = -(1 / 40)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_247", "statement": "theorem mathd_algebra_247 (t s : \u211d) (n : \u2124) (h\u2080 : t = 2 * s - s ^ 2) (h\u2081 : s = n ^ 2 - 2 ^ n + 1)\n (n) (_ : n = 3) : t = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_sqineq_2unitcircatblt1", "statement": "theorem algebra_sqineq_2unitcircatblt1 (a b : \u211d) (h\u2080 : a ^ 2 + b ^ 2 = 2) : a * b \u2264 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_629", "statement": "theorem mathd_numbertheory_629 : IsLeast { t : \u2115 | 0 < t \u2227 Nat.lcm 12 t ^ 3 = (12 * t) ^ 2 } 18", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "amc12a_2017_p2", "statement": "theorem amc12a_2017_p2 (x y : \u211d) (h\u2080 : x \u2260 0) (h\u2081 : y \u2260 0) (h\u2082 : x + y = 4 * (x * y)) :\n 1 / x + 1 / y = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "algebra_amgm_sumasqdivbsqgeqsumbdiva", "statement": "theorem algebra_amgm_sumasqdivbsqgeqsumbdiva (a b c : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c) :\n a ^ 2 / b ^ 2 + b ^ 2 / c ^ 2 + c ^ 2 / a ^ 2 \u2265 b / a + c / b + a / c", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_numbertheory_202", "statement": "theorem mathd_numbertheory_202 : (19 ^ 19 + 99 ^ 99) % 10 = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "imo_1979_p1", "statement": "theorem imo_1979_p1 (p q : \u2115) (h\u2080 : 0 < q)\n (h\u2081 : (\u2211 k in Finset.Icc (1 : \u2115) 1319, (-1) ^ (k + 1) * ((1 : \u211d) / k)) = p / q) : 1979 \u2223 p", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_51", "statement": "theorem mathd_algebra_51 (a b : \u211d) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : a + b = 35) (h\u2082 : a = 2 / 5 * b) :\n b - a = 15", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_10", "statement": "theorem mathd_algebra_10 : abs ((120 : \u211d) / 100 * 30 - 130 / 100 * 20) = 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Validation.lean", "split": "valid"} +{"full_name": "mathd_algebra_478", "statement": "theorem mathd_algebra_478 (b h v : \u211d) (h\u2080 : 0 < b \u2227 0 < h \u2227 0 < v) (h\u2081 : v = 1 / 3 * (b * h))\n (h\u2082 : b = 30) (h\u2083 : h = 13 / 2) : v = 65", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "numbertheory_4x3m7y3neq2003", "statement": "theorem numbertheory_4x3m7y3neq2003 (x y : \u2124) : 4 * x ^ 3 - 7 * y ^ 3 \u2260 2003", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1983_p1", "statement": "theorem aime_1983_p1 (x y z w : \u2115) (ht : 1 < x \u2227 1 < y \u2227 1 < z) (hw : 0 \u2264 w)\n (h0 : Real.log w / Real.log x = 24) (h1 : Real.log w / Real.log y = 40)\n (h2 : Real.log w / Real.log (x * y * z) = 12) : Real.log w / Real.log z = 60", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12_2001_p5", "statement": "theorem amc12_2001_p5 :\n Finset.prod (Finset.filter (fun x => \u00acEven x) (Finset.range 10000)) (id : \u2115 \u2192 \u2115) =\n 10000! / (2 ^ 5000 * 5000!)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_141", "statement": "theorem mathd_algebra_141 (a b : \u211d) (h\u2081 : a * b = 180) (h\u2082 : 2 * (a + b) = 54) :\n a ^ 2 + b ^ 2 = 369", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_3", "statement": "theorem mathd_numbertheory_3 : (\u2211 x in Finset.range 10, (x + 1) ^ 2) % 10 = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1969_p2", "statement": "theorem imo_1969_p2 (m n : \u211d) (k : \u2115) (a : \u2115 \u2192 \u211d) (y : \u211d \u2192 \u211d) (h\u2080 : 0 < k)\n (h\u2081 : \u2200 x, y x = \u2211 i in Finset.range k, Real.cos (a i + x) / 2 ^ i) (h\u2082 : y m = 0)\n (h\u2083 : y n = 0) : \u2203 t : \u2124, m - n = t * \u03c0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_209", "statement": "theorem mathd_algebra_209 (\u03c3 : Equiv \u211d \u211d) (h\u2080 : \u03c3.2 2 = 10) (h\u2081 : \u03c3.2 10 = 1) (h\u2082 : \u03c3.2 1 = 2) :\n \u03c3.1 (\u03c3.1 10) = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_1124", "statement": "theorem mathd_numbertheory_1124 (n : \u2115) (h\u2080 : n \u2264 9) (h\u2081 : 18 \u2223 374 * 10 + n) : n = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1983_p6", "statement": "theorem imo_1983_p6 (a b c : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c) (h\u2081 : c < a + b) (h\u2082 : b < a + c)\n (h\u2083 : a < b + c) : 0 \u2264 a ^ 2 * b * (a - b) + b ^ 2 * c * (b - c) + c ^ 2 * a * (c - a)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_237", "statement": "theorem mathd_numbertheory_237 : (\u2211 k in Finset.range 101, k) % 6 = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_33", "statement": "theorem mathd_algebra_33 (x y z : \u211d) (h\u2080 : x \u2260 0) (h\u2081 : 2 * x = 5 * y) (h\u2082 : 7 * y = 10 * z) :\n z / x = 7 / 25", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2021_p3", "statement": "theorem amc12b_2021_p3 (x : \u211d) (h\u2080 : 2 + 1 / (1 + 1 / (2 + 2 / (3 + x))) = 144 / 53) : x = 3 / 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_299", "statement": "theorem mathd_numbertheory_299 : 1 * 3 * 5 * 7 * 9 * 11 * 13 % 10 = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2020_p2", "statement": "theorem amc12b_2020_p2 :\n (100 ^ 2 - 7 ^ 2 : \u211d) / (70 ^ 2 - 11 ^ 2) * ((70 - 11) * (70 + 11) / ((100 - 7) * (100 + 7))) =\n 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_sqineq_unitcircatbpabsamblt1", "statement": "theorem algebra_sqineq_unitcircatbpabsamblt1 (a b : \u211d) (h\u2080 : a ^ 2 + b ^ 2 = 1) :\n a * b + abs (a - b) \u2264 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1977_p6", "statement": "theorem imo_1977_p6 (f : \u2115 \u2192 \u2115) (h\u2080 : \u2200 n, 0 < f n) (h\u2081 : \u2200 n, 0 < n \u2192 f (f n) < f (n + 1)) :\n \u2200 n, 0 < n \u2192 f n = n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_419", "statement": "theorem mathd_algebra_419 (a b : \u211d) (h\u2080 : a = -1) (h\u2081 : b = 5) : -a - b ^ 2 + 3 * (a * b) = -39", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2020_p10", "statement": "theorem amc12a_2020_p10 (n : \u2115) (h\u2080 : 0 < n)\n (h\u2081 : Real.logb 2 (Real.logb 16 n) = Real.logb 4 (Real.logb 4 n)) :\n (Nat.digits 10 n).sum = 13", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1960_p2", "statement": "theorem imo_1960_p2 (x : \u211d) (h\u2080 : 0 \u2264 1 + 2 * x) (h\u2081 : (1 - Real.sqrt (1 + 2 * x)) ^ 2 \u2260 0)\n (h\u2082 : 4 * x ^ 2 / (1 - Real.sqrt (1 + 2 * x)) ^ 2 < 2 * x + 9) : -(1 / 2) \u2264 x \u2227 x < 45 / 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_427", "statement": "theorem mathd_numbertheory_427 (a : \u2115) (h\u2080 : a = \u2211 k in Nat.divisors 500, k) :\n (\u2211 k in Finset.filter (fun x => Nat.Prime x) (Nat.divisors a), k) = 25", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "numbertheory_x5neqy2p4", "statement": "theorem numbertheory_x5neqy2p4 (x y : \u2124) : x ^ 5 \u2260 y ^ 2 + 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imosl_2007_algebra_p6", "statement": "theorem imosl_2007_algebra_p6 (a : \u2115 \u2192 NNReal) (h\u2080 : (\u2211 x in Finset.range 100, a (x + 1) ^ 2) = 1) :\n (\u2211 x in Finset.range 99, a (x + 1) ^ 2 * a (x + 2)) + a 100 ^ 2 * a 1 < 12 / 25", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_398", "statement": "theorem mathd_algebra_398 (a b c : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c) (h\u2081 : 9 * b = 20 * c)\n (h\u2082 : 7 * a = 4 * b) : 63 * a = 80 * c", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1963_p5", "statement": "theorem imo_1963_p5 : Real.cos (\u03c0 / 7) - Real.cos (2 * \u03c0 / 7) + Real.cos (3 * \u03c0 / 7) = 1 / 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_430", "statement": "theorem mathd_numbertheory_430 (a b c : \u2115) (h\u2080 : 1 \u2264 a \u2227 a \u2264 9) (h\u2081 : 1 \u2264 b \u2227 b \u2264 9)\n (h\u2082 : 1 \u2264 c \u2227 c \u2264 9) (h\u2083 : a \u2260 b) (h\u2084 : a \u2260 c) (h\u2085 : b \u2260 c) (h\u2086 : a + b = c)\n (h\u2087 : 10 * a + a - b = 2 * c) (h\u2088 : c * b = 10 * a + a + a) : a + b + c = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_459", "statement": "theorem mathd_algebra_459 (a b c d : \u211a) (h\u2080 : 3 * a = b + c + d) (h\u2081 : 4 * b = a + c + d)\n (h\u2082 : 2 * c = a + b + d) (h\u2083 : 8 * a + 10 * b + 6 * c = 24) : \u2191d.den + d.num = 28", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "induction_12dvd4expnp1p20", "statement": "theorem induction_12dvd4expnp1p20 (n : \u2115) : 12 \u2223 4 ^ (n + 1) + 20", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_320", "statement": "theorem mathd_algebra_320 (x : \u211d) (a b c : \u2115) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c \u2227 0 \u2264 x)\n (h\u2081 : 2 * x ^ 2 = 4 * x + 9) (h\u2082 : x = (a + Real.sqrt b) / c) (h\u2083 : c = 2) : a + b + c = 26", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_137", "statement": "theorem mathd_algebra_137 (x : \u2115) (h\u2080 : \u2191x + (4 : \u211d) / (100 : \u211d) * \u2191x = 598) : x = 575", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1997_p5", "statement": "theorem imo_1997_p5 (x y : \u2115) (h\u2080 : 0 < x \u2227 0 < y) (h\u2081 : x ^ y ^ 2 = y ^ x) :\n (x, y) = (1, 1) \u2228 (x, y) = (16, 2) \u2228 (x, y) = (27, 3)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_277", "statement": "theorem mathd_numbertheory_277 (m n : \u2115) (h\u2080 : Nat.gcd m n = 6) (h\u2081 : Nat.lcm m n = 126) :\n 60 \u2264 m + n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_559", "statement": "theorem mathd_numbertheory_559 (x y : \u2115) (h\u2080 : x % 3 = 2) (h\u2081 : y % 5 = 4) (h\u2082 : x % 10 = y % 10) :\n 14 \u2264 x", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_160", "statement": "theorem mathd_algebra_160 (n x : \u211d) (h\u2080 : n + x = 97) (h\u2081 : n + 5 * x = 265) : n + 2 * x = 139", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_24", "statement": "theorem mathd_algebra_24 (x : \u211d) (h\u2080 : x / 50 = 40) : x = 2000", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_176", "statement": "theorem mathd_algebra_176 (x : \u211d) : (x + 1) ^ 2 * x = x ^ 3 + 2 * x ^ 2 + x", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "induction_nfactltnexpnm1ngt3", "statement": "theorem induction_nfactltnexpnm1ngt3 (n : \u2115) (h\u2080 : 3 \u2264 n) : n ! < n ^ (n - 1)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_208", "statement": "theorem mathd_algebra_208 : Real.sqrt 1000000 - 1000000 ^ ((1 : \u211d) / 3) = 900", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_353", "statement": "theorem mathd_numbertheory_353 (s : \u2115) (h\u2080 : s = \u2211 k in Finset.Icc 2010 4018, k) : s % 2009 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "numbertheory_notequiv2i2jasqbsqdiv8", "statement": "theorem numbertheory_notequiv2i2jasqbsqdiv8 :\n \u00ac\u2200 a b : \u2124, (\u2203 i j, a = 2 * i \u2227 b = 2 * j) \u2194 \u2203 k, a ^ 2 + b ^ 2 = 8 * k", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_156", "statement": "theorem mathd_algebra_156 (x y : \u211d) (f g : \u211d \u2192 \u211d) (h\u2080 : \u2200 t, f t = t ^ 4)\n (h\u2081 : \u2200 t, g t = 5 * t ^ 2 - 6) (h\u2082 : f x = g x) (h\u2083 : f y = g y) (h\u2084 : x ^ 2 < y ^ 2) :\n y ^ 2 - x ^ 2 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_12", "statement": "theorem mathd_numbertheory_12 :\n Finset.card (Finset.filter (fun x => 20 \u2223 x) (Finset.Icc 15 85)) = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_345", "statement": "theorem mathd_numbertheory_345 : (2000 + 2001 + 2002 + 2003 + 2004 + 2005 + 2006) % 7 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_447", "statement": "theorem mathd_numbertheory_447 :\n (\u2211 k in Finset.filter (fun x => 3 \u2223 x) (Finset.Icc 1 49), k % 10) = 78", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_328", "statement": "theorem mathd_numbertheory_328 : 5 ^ 999999 % 7 = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_451", "statement": "theorem mathd_numbertheory_451 (S : Finset \u2115)\n (h\u2080 :\n \u2200 n : \u2115,\n n \u2208 S \u2194\n 2010 \u2264 n \u2227 n \u2264 2019 \u2227 \u2203 m, (Nat.divisors m).card = 4 \u2227 (\u2211 p in Nat.divisors m, p) = n) :\n (\u2211 k in S, k) = 2016", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1997_p9", "statement": "theorem aime_1997_p9 (a : \u211d) (h\u2080 : 0 < a)\n (h\u2081 : 1 / a - Int.floor (1 / a) = a ^ 2 - Int.floor (a ^ 2)) (h\u2082 : 2 < a ^ 2) (h\u2083 : a ^ 2 < 3) :\n a ^ 12 - 144 * (1 / a) = 233", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_sqineq_at2malt1", "statement": "theorem algebra_sqineq_at2malt1 (a : \u211d) : a * (2 - a) \u2264 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_apbmpcneq0_aeq0anbeq0anceq0", "statement": "theorem algebra_apbmpcneq0_aeq0anbeq0anceq0 (a b c : \u211a) (m n : \u211d) (h\u2080 : 0 < m \u2227 0 < n)\n (h\u2081 : m ^ 3 = 2) (h\u2082 : n ^ 3 = 4) (h\u2083 : (a : \u211d) + b * m + c * n = 0) : a = 0 \u2227 b = 0 \u2227 c = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_171", "statement": "theorem mathd_algebra_171 (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = 5 * x + 4) : f 1 = 9", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_227", "statement": "theorem mathd_numbertheory_227 (x y n : \u2115+) (h\u2080 : \u2191x / (4 : \u211d) + y / 6 = (x + y) / n) : n = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_188", "statement": "theorem mathd_algebra_188 (\u03c3 : Equiv \u211d \u211d) (h : \u03c3.1 2 = \u03c3.2 2) : \u03c3.1 (\u03c3.1 2) = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_765", "statement": "theorem mathd_numbertheory_765 (x : \u2124) (h\u2080 : x < 0) (h\u2081 : 24 * x % 1199 = 15) : x \u2264 -449", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1959_p1", "statement": "theorem imo_1959_p1 (n : \u2115) (h\u2080 : 0 < n) : Nat.gcd (21 * n + 4) (14 * n + 3) = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_175", "statement": "theorem mathd_numbertheory_175 : 2 ^ 2010 % 10 = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "induction_sumkexp3eqsumksq", "statement": "theorem induction_sumkexp3eqsumksq (n : \u2115) :\n (\u2211 k in Finset.range n, k ^ 3) = (\u2211 k in Finset.range n, k) ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "numbertheory_fxeq4powxp6powxp9powx_f2powmdvdf2pown", "statement": "theorem numbertheory_fxeq4powxp6powxp9powx_f2powmdvdf2pown (m n : \u2115) (f : \u2115 \u2192 \u2115)\n (h\u2080 : \u2200 x, f x = 4 ^ x + 6 ^ x + 9 ^ x) (h\u2081 : 0 < m \u2227 0 < n) (h\u2082 : m \u2264 n) :\n f (2 ^ m) \u2223 f (2 ^ n)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1992_p1", "statement": "theorem imo_1992_p1 (p q r : \u2124) (h\u2080 : 1 < p \u2227 p < q \u2227 q < r)\n (h\u2081 : (p - 1) * (q - 1) * (r - 1) \u2223 p * q * r - 1) :\n (p, q, r) = (2, 4, 8) \u2228 (p, q, r) = (3, 5, 15)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1982_p1", "statement": "theorem imo_1982_p1 (f : \u2115 \u2192 \u2115)\n (h\u2080 : \u2200 m n, 0 < m \u2227 0 < n \u2192 f (m + n) - f m - f n = 0 \u2228 f (m + n) - f m - f n = 1)\n (h\u2081 : f 2 = 0) (h\u2082 : 0 < f 3) (h\u2083 : f 9999 = 3333) : f 1982 = 660", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1987_p5", "statement": "theorem aime_1987_p5 (x y : \u2124) (h\u2080 : y ^ 2 + 3 * (x ^ 2 * y ^ 2) = 30 * x ^ 2 + 517) :\n 3 * (x ^ 2 * y ^ 2) = 588", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_346", "statement": "theorem mathd_algebra_346 (f g : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = 2 * x - 3) (h\u2081 : \u2200 x, g x = x + 1) :\n g (f 5 - 1) = 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_487", "statement": "theorem mathd_algebra_487 (a b c d : \u211d) (h\u2080 : b = a ^ 2) (h\u2081 : a + b = 1) (h\u2082 : d = c ^ 2)\n (h\u2083 : c + d = 1) (h\u2084 : a \u2260 c) : Real.sqrt ((a - c) ^ 2 + (b - d) ^ 2) = Real.sqrt 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_728", "statement": "theorem mathd_numbertheory_728 : (29 ^ 13 - 5 ^ 13) % 7 = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_184", "statement": "theorem mathd_algebra_184 (a b : NNReal) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : a ^ 2 = 6 * b)\n (h\u2082 : a ^ 2 = 54 / b) : a = 3 * NNReal.sqrt 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_552", "statement": "theorem mathd_numbertheory_552 (f g h : \u2115+ \u2192 \u2115) (h\u2080 : \u2200 x, f x = 12 * x + 7)\n (h\u2081 : \u2200 x, g x = 5 * x + 2) (h\u2082 : \u2200 x, h x = Nat.gcd (f x) (g x)) (h\u2083 : Fintype (Set.range h)) :\n (\u2211 k in (Set.range h).toFinset, k) = 12", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2021_p9", "statement": "theorem amc12b_2021_p9 :\n Real.log 80 / Real.log 2 / (Real.log 2 / Real.log 40) -\n Real.log 160 / Real.log 2 / (Real.log 2 / Real.log 20) =\n 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1994_p3", "statement": "theorem aime_1994_p3 (x : \u2124) (f : \u2124 \u2192 \u2124) (h0 : f x + f (x - 1) = x ^ 2) (h1 : f 19 = 94) :\n f 94 % 1000 = 561", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_44", "statement": "theorem mathd_algebra_44 (s t : \u211d) (h\u2080 : s = 9 - 2 * t) (h\u2081 : t = 3 * s + 1) : s = 1 \u2227 t = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_215", "statement": "theorem mathd_algebra_215 (S : Finset \u211d) (h\u2080 : \u2200 x : \u211d, x \u2208 S \u2194 (x + 3) ^ 2 = 121) :\n (\u2211 k in S, k) = -6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_293", "statement": "theorem mathd_numbertheory_293 (n : \u2115) (h\u2080 : n \u2264 9) (h\u2081 : 11 \u2223 20 * 100 + 10 * n + 7) : n = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_769", "statement": "theorem mathd_numbertheory_769 : (129 ^ 34 + 96 ^ 38) % 11 = 9", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_452", "statement": "theorem mathd_algebra_452 (a : \u2115 \u2192 \u211d) (h\u2080 : \u2200 n, a (n + 2) - a (n + 1) = a (n + 1) - a n)\n (h\u2081 : a 1 = 2 / 3) (h\u2082 : a 9 = 4 / 5) : a 5 = 11 / 15", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_5", "statement": "theorem mathd_numbertheory_5 (n : \u2115) (h\u2080 : 10 \u2264 n) (h\u2081 : \u2203 x, x ^ 2 = n) (h\u2082 : \u2203 t, t ^ 3 = n) :\n 64 \u2264 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_207", "statement": "theorem mathd_numbertheory_207 : 8 * 9 ^ 2 + 5 * 9 + 2 = 695", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_342", "statement": "theorem mathd_numbertheory_342 : 54 % 6 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_483", "statement": "theorem mathd_numbertheory_483 (a : \u2115 \u2192 \u2115) (h\u2080 : a 1 = 1) (h\u2081 : a 2 = 1)\n (h\u2082 : \u2200 n, a (n + 2) = a (n + 1) + a n) : a 100 % 4 = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2020_p21", "statement": "theorem amc12b_2020_p21 (S : Finset \u2115)\n (h\u2080 : \u2200 n : \u2115, n \u2208 S \u2194 0 < n \u2227 (\u2191n + (1000 : \u211d)) / 70 = Int.floor (Real.sqrt n)) : S.card = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2003_p5", "statement": "theorem amc12a_2003_p5 (A M C : \u2115) (h\u2080 : A \u2264 9 \u2227 M \u2264 9 \u2227 C \u2264 9)\n (h\u2081 : Nat.ofDigits 10 [0, 1, C, M, A] + Nat.ofDigits 10 [2, 1, C, M, A] = 123422) :\n A + M + C = 14", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_495", "statement": "theorem mathd_numbertheory_495 (a b : \u2115) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : a % 10 = 2) (h\u2082 : b % 10 = 4)\n (h\u2083 : Nat.gcd a b = 6) : 108 \u2264 Nat.lcm a b", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_296", "statement": "theorem mathd_algebra_296 : abs ((3491 - 60) * (3491 + 60) - 3491 ^ 2 : \u2124) = 3600", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_abpbcpcageq3_sumaonsqrtapbgeq3onsqrt2", "statement": "theorem algebra_abpbcpcageq3_sumaonsqrtapbgeq3onsqrt2 (a b c : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c)\n (h\u2081 : 3 \u2264 a * b + b * c + c * a) :\n 3 / Real.sqrt 2 \u2264 a / Real.sqrt (a + b) + b / Real.sqrt (b + c) + c / Real.sqrt (c + a)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_2varlineareq_fp3zeq11_3tfm1m5zeqn68_feqn10_zeq7", "statement": "theorem algebra_2varlineareq_fp3zeq11_3tfm1m5zeqn68_feqn10_zeq7 (f z : \u2102) (h\u2080 : f + 3 * z = 11)\n (h\u2081 : 3 * (f - 1) - 5 * z = -68) : f = -10 \u2227 z = 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_247", "statement": "theorem mathd_numbertheory_247 (n : \u2115) (h\u2080 : 3 * n % 2 = 11) : n % 11 = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "induction_pord1p1on2powklt5on2", "statement": "theorem induction_pord1p1on2powklt5on2 (n : \u2115) (h\u2080 : 0 < n) :\n (\u220f k in Finset.Icc 1 n, 1 + (1 : \u211d) / 2 ^ k) < 5 / 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_107", "statement": "theorem mathd_algebra_107 (x y : \u211d) (h\u2080 : x ^ 2 + 8 * x + y ^ 2 - 6 * y = 0) :\n (x + 4) ^ 2 + (y - 3) ^ 2 = 5 ^ 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "numbertheory_2pownm1prime_nprime", "statement": "theorem numbertheory_2pownm1prime_nprime (n : \u2115) (h\u2080 : 0 < n) (h\u2081 : Nat.Prime (2 ^ n - 1)) :\n Nat.Prime n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_412", "statement": "theorem mathd_algebra_412 (x y : \u211d) (h\u2080 : x + y = 25) (h\u2081 : x - y = 11) : x = 18", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2013_p4", "statement": "theorem amc12a_2013_p4 : (2 ^ 2014 + 2 ^ 2012) / (2 ^ 2014 - 2 ^ 2012) = (5 : \u211d) / 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_392", "statement": "theorem mathd_algebra_392 (n : \u2115) (h\u2080 : Even n)\n (h\u2081 : (\u2191n - 2) ^ 2 + \u2191n ^ 2 + (\u2191n + 2) ^ 2 = (12296 : \u2115)) :\n (\u2191n - 2) * \u2191n * (\u2191n + 2) / 8 = (32736 : \u2115)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_314", "statement": "theorem mathd_numbertheory_314 (r n : \u2115) (h\u2080 : r = 1342 % 13) (h\u2081 : 0 < n) (h\u2082 : 1342 \u2223 n)\n (h\u2083 : n % 13 < r) : 6710 \u2264 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "induction_prod1p1onk3le3m1onn", "statement": "theorem induction_prod1p1onk3le3m1onn (n : \u2115) (h\u2080 : 0 < n) :\n (\u220f k in Finset.Icc 1 n, 1 + (1 : \u211d) / k ^ 3) \u2264 (3 : \u211d) - 1 / \u2191n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_343", "statement": "theorem mathd_numbertheory_343 : (\u220f k in Finset.range 6, 2 * k + 1) % 10 = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_756", "statement": "theorem mathd_algebra_756 (a b : \u211d) (h\u2080 : (2 : \u211d) ^ a = 32) (h\u2081 : a ^ b = 125) : b ^ a = 243", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2002_p7", "statement": "theorem amc12b_2002_p7 (a b c : \u2115) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c) (h\u2081 : b = a + 1) (h\u2082 : c = b + 1)\n (h\u2083 : a * b * c = 8 * (a + b + c)) : a ^ 2 + (b ^ 2 + c ^ 2) = 77", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_80", "statement": "theorem mathd_algebra_80 (x : \u211d) (h\u2080 : x \u2260 -1) (h\u2081 : (x - 9) / (x + 1) = 2) : x = -11", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_457", "statement": "theorem mathd_numbertheory_457 (n : \u2115) (h\u2080 : 0 < n) (h\u2081 : 80325 \u2223 n !) : 17 \u2264 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12_2000_p12", "statement": "theorem amc12_2000_p12 (a m c : \u2115) (h\u2080 : a + m + c = 12) :\n a * m * c + a * m + m * c + a * c \u2264 112", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_135", "statement": "theorem mathd_numbertheory_135 (n A B C : \u2115) (h\u2080 : n = 3 ^ 17 + 3 ^ 10) (h\u2081 : 11 \u2223 n + 1)\n (h\u2082 : [A, B, C].Pairwise (\u00b7 \u2260 \u00b7)) (h\u2083 : {A, B, C} \u2282 Finset.Icc 0 9) (h\u2084 : Odd A \u2227 Odd C)\n (h\u2085 : \u00ac3 \u2223 B) (h\u2086 : Nat.digits 10 n = [B, A, B, C, C, A, C, B, A]) :\n 100 * A + 10 * B + C = 129", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_275", "statement": "theorem mathd_algebra_275 (x : \u211d) (h : ((11 : \u211d) ^ (1 / 4)) ^ (3 * x - 3) = 1 / 5) :\n ((11 : \u211d) ^ (1 / 4)) ^ (6 * x + 2) = 121 / 25", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_388", "statement": "theorem mathd_algebra_388 (x y z : \u211d) (h\u2080 : 3 * x + 4 * y - 12 * z = 10)\n (h\u2081 : -2 * x - 3 * y + 9 * z = -4) : x = 14", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2020_p7", "statement": "theorem amc12a_2020_p7 (a : \u2115 \u2192 \u2115) (h\u2080 : a 0 ^ 3 = 1) (h\u2081 : a 1 ^ 3 = 8) (h\u2082 : a 2 ^ 3 = 27)\n (h\u2083 : a 3 ^ 3 = 64) (h\u2084 : a 4 ^ 3 = 125) (h\u2085 : a 5 ^ 3 = 216) (h\u2086 : a 6 ^ 3 = 343) :\n \u2191(\u2211 k in Finset.range 7, 6 * a k ^ 2) - \u2191(2 * \u2211 k in Finset.range 6, a k ^ 2) = (658 : \u2124)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1981_p6", "statement": "theorem imo_1981_p6 (f : \u2115 \u2192 \u2115 \u2192 \u2115) (h\u2080 : \u2200 y, f 0 y = y + 1) (h\u2081 : \u2200 x, f (x + 1) 0 = f x 1)\n (h\u2082 : \u2200 x y, f (x + 1) (y + 1) = f x (f (x + 1) y)) : \u2200 y, f 4 (y + 1) = 2 ^ (f 4 y + 3) - 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_263", "statement": "theorem mathd_algebra_263 (y : \u211d) (h\u2080 : 0 \u2264 19 + 3 * y) (h\u2081 : Real.sqrt (19 + 3 * y) = 7) :\n y = 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_34", "statement": "theorem mathd_numbertheory_34 (x : \u2115) (h\u2080 : x < 100) (h\u2081 : x * 9 % 100 = 1) : x = 89", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_764", "statement": "theorem mathd_numbertheory_764 (p : \u2115) (h\u2080 : Nat.Prime p) (h\u2081 : 7 \u2264 p) :\n (\u2211 k in Finset.Icc 1 (p - 2), (k : ZMod p)\u207b\u00b9 * ((k : ZMod p) + 1)\u207b\u00b9) = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2021_p4", "statement": "theorem amc12b_2021_p4 (m a : \u2115) (h\u2080 : 0 < m \u2227 0 < a) (h\u2081 : \u2191m / \u2191a = (3 : \u211d) / 4) :\n (84 * \u2191m + 70 * \u2191a) / (\u2191m + \u2191a) = (76 : \u211d)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1962_p2", "statement": "theorem imo_1962_p2 (x : \u211d) (h\u2080 : 0 \u2264 3 - x) (h\u2081 : 0 \u2264 x + 1)\n (h\u2082 : 1 / 2 < Real.sqrt (3 - x) - Real.sqrt (x + 1)) : -1 \u2264 x \u2227 x < 1 - Real.sqrt 31 / 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_170", "statement": "theorem mathd_algebra_170 (S : Finset \u2124) (h\u2080 : \u2200 n : \u2124, n \u2208 S \u2194 abs (n - 2) \u2264 5 + 6 / 10) :\n S.card = 11", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_432", "statement": "theorem mathd_algebra_432 (x : \u211d) : (x + 3) * (2 * x - 6) = 2 * x ^ 2 - 18", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_598", "statement": "theorem mathd_algebra_598 (a b c d : \u211d) (h\u2081 : (4 : \u211d) ^ a = 5) (h\u2082 : (5 : \u211d) ^ b = 6)\n (h\u2083 : (6 : \u211d) ^ c = 7) (h\u2084 : (7 : \u211d) ^ d = 8) : a * b * c * d = 3 / 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_bleqa_apbon2msqrtableqambsqon8b", "statement": "theorem algebra_bleqa_apbon2msqrtableqambsqon8b (a b : \u211d) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : b \u2264 a) :\n (a + b) / 2 - Real.sqrt (a * b) \u2264 (a - b) ^ 2 / (8 * b)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_276", "statement": "theorem mathd_algebra_276 (a b : \u2124)\n (h\u2080 : \u2200 x : \u211d, 10 * x ^ 2 - x - 24 = (a * x - 8) * (b * x + 3)) : a * b + b = 12", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p14", "statement": "theorem amc12a_2021_p14 :\n ((\u2211 k:\u2124 in Finset.Icc 1 20, Real.logb (5 ^ k) (3 ^ k ^ 2)) *\n \u2211 k:\u2124 in Finset.Icc 1 100, Real.logb (9 ^ k) (25 ^ k)) =\n 21000", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_sum1onsqrt2to1onsqrt10000lt198", "statement": "theorem algebra_sum1onsqrt2to1onsqrt10000lt198 :\n (\u2211 k in Finset.Icc (2 : \u2115) 10000, 1 / Real.sqrt k) < 198", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_618", "statement": "theorem mathd_numbertheory_618 (n : \u2115) (p : \u2115 \u2192 \u2115) (h\u2080 : \u2200 x, p x = x ^ 2 - x + 41)\n (h\u2081 : 1 < Nat.gcd (p n) (p (n + 1))) : 41 \u2264 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2020_p4", "statement": "theorem amc12a_2020_p4 (S : Finset \u2115)\n (h\u2080 : \u2200 n : \u2115, n \u2208 S \u2194 1000 \u2264 n \u2227 n \u2264 9999 \u2227 (\u2200 d : \u2115, d \u2208 Nat.digits 10 n \u2192 Even d) \u2227 5 \u2223 n) :\n S.card = 100", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2020_p6", "statement": "theorem amc12b_2020_p6 (n : \u2115) (h\u2080 : 9 \u2264 n) : \u2203 x : \u2115, (x : \u211d) ^ 2 = ((n + 2)! - (n + 1)!) / n !", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_435", "statement": "theorem mathd_numbertheory_435 (k : \u2115) (h\u2080 : 0 < k) (h\u2081 : \u2200 n, Nat.gcd (6 * n + k) (6 * n + 3) = 1)\n (h\u2082 : \u2200 n, Nat.gcd (6 * n + k) (6 * n + 2) = 1) (h\u2083 : \u2200 n, Nat.gcd (6 * n + k) (6 * n + 1) = 1) :\n 5 \u2264 k", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_others_exirrpowirrrat", "statement": "theorem algebra_others_exirrpowirrrat : \u2203 a b : \u211d, (Irrational a) \u2227 (Irrational b) \u2227 \u00ac(Irrational (a ^ b))", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_427", "statement": "theorem mathd_algebra_427 (x y z : \u211d) (h\u2080 : 3 * x + y = 17) (h\u2081 : 5 * y + z = 14)\n (h\u2082 : 3 * x + 5 * z = 41) : x + y + z = 12", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_76", "statement": "theorem mathd_algebra_76 (f : \u2124 \u2192 \u2124) (h\u2080 : \u2200 n, Odd n \u2192 f n = n ^ 2)\n (h\u2081 : \u2200 n, Even n \u2192 f n = n ^ 2 - 4 * n - 1) : f 4 = -1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_99", "statement": "theorem mathd_numbertheory_99 (n : \u2115) (h\u2080 : 2 * n % 47 = 15) : n % 47 = 31", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_9onxpypzleqsum2onxpy", "statement": "theorem algebra_9onxpypzleqsum2onxpy (x y z : \u211d) (h\u2080 : 0 < x \u2227 0 < y \u2227 0 < z) :\n 9 / (x + y + z) \u2264 2 / (x + y) + 2 / (y + z) + 2 / (z + x)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_233", "statement": "theorem mathd_numbertheory_233 (b : ZMod (11 ^ 2)) (h\u2080 : b = 24\u207b\u00b9) : b = 116", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_absapbon1pabsapbleqsumabsaon1pabsa", "statement": "theorem algebra_absapbon1pabsapbleqsumabsaon1pabsa (a b : \u211d) :\n abs (a + b) / (1 + abs (a + b)) \u2264 abs a / (1 + abs a) + abs b / (1 + abs b)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1984_p6", "statement": "theorem imo_1984_p6 (a b c d k m : \u2115) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c \u2227 0 < d)\n (h\u2081 : Odd a \u2227 Odd b \u2227 Odd c \u2227 Odd d) (h\u2082 : a < b \u2227 b < c \u2227 c < d) (h\u2083 : a * d = b * c)\n (h\u2084 : a + d = 2 ^ k) (h\u2085 : b + c = 2 ^ m) : a = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_2001_p6", "statement": "theorem imo_2001_p6 (a b c d : \u2115) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c \u2227 0 < d) (h\u2081 : d < c) (h\u2082 : c < b)\n (h\u2083 : b < a) (h\u2084 : a * c + b * d = (b + d + a - c) * (b + d + c - a)) :\n \u00acNat.Prime (a * b + c * d)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_321", "statement": "theorem mathd_numbertheory_321 (n : ZMod 1399) (h\u2081 : n = 160\u207b\u00b9) : n = 1058", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_17", "statement": "theorem mathd_algebra_17 (a : \u211d)\n (h\u2080 : Real.sqrt (4 + Real.sqrt (16 + 16 * a)) + Real.sqrt (1 + Real.sqrt (1 + a)) = 6) :\n a = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_153", "statement": "theorem mathd_algebra_153 (n : \u211d) (h\u2080 : n = 1 / 3) :\n Int.floor (10 * n) + Int.floor (100 * n) + Int.floor (1000 * n) + Int.floor (10000 * n) =\n 3702", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_sqineq_unitcircatbpamblt1", "statement": "theorem algebra_sqineq_unitcircatbpamblt1 (a b : \u211d) (h\u2080 : a ^ 2 + b ^ 2 = 1) :\n a * b + (a - b) \u2264 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p18", "statement": "theorem amc12a_2021_p18 (f : \u211a \u2192 \u211d) (h\u2080 : \u2200 x > 0, \u2200 y > 0, f (x * y) = f x + f y)\n (h\u2081 : \u2200 p, Nat.Prime p \u2192 f p = p) : f (25 /. 11) < 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_329", "statement": "theorem mathd_algebra_329 (x y : \u211d) (h\u2080 : 3 * y = x) (h\u2081 : 2 * x + 5 * y = 11) : x + y = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "induction_pprime_pdvdapowpma", "statement": "theorem induction_pprime_pdvdapowpma (p a : \u2115) (h\u2080 : 0 < a) (h\u2081 : Nat.Prime p) : p \u2223 a ^ p - a", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p9", "statement": "theorem amc12a_2021_p9 : (\u220f k in Finset.range 7, 2 ^ 2 ^ k + 3 ^ 2 ^ k) = 3 ^ 128 - 2 ^ 128", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1984_p1", "statement": "theorem aime_1984_p1 (u : \u2115 \u2192 \u211a) (h\u2080 : \u2200 n, u (n + 1) = u n + 1)\n (h\u2081 : (\u2211 k in Finset.range 98, u k.succ) = 137) :\n (\u2211 k in Finset.range 49, u (2 * k.succ)) = 93", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p22", "statement": "theorem amc12a_2021_p22 (a b c : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = x ^ 3 + a * x ^ 2 + b * x + c)\n (h\u2081 :\n f \u207b\u00b9' {0} =\n {Real.cos (2 * Real.pi / 7), Real.cos (4 * Real.pi / 7), Real.cos (6 * Real.pi / 7)}) :\n a * b * c = 1 / 32", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_229", "statement": "theorem mathd_numbertheory_229 : 5 ^ 30 % 7 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_100", "statement": "theorem mathd_numbertheory_100 (n : \u2115) (h\u2080 : 0 < n) (h\u2081 : Nat.gcd n 40 = 10)\n (h\u2082 : Nat.lcm n 40 = 280) : n = 70", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_313", "statement": "theorem mathd_algebra_313 (v i z : \u2102) (h\u2080 : v = i * z) (h\u2081 : v = 1 + Complex.I)\n (h\u2082 : z = 2 - Complex.I) : i = 1 / 5 + 3 / 5 * Complex.I", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2002_p4", "statement": "theorem amc12b_2002_p4 (n : \u2115) (h\u2080 : 0 < n) (h\u2081 : (1 /. 2 + 1 /. 3 + 1 /. 7 + 1 /. \u2191n).den = 1) :\n n = 42", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2002_p6", "statement": "theorem amc12a_2002_p6 (n : \u2115) (h\u2080 : 0 < n) : \u2203 m, m > n \u2227 \u2203 p, m * p \u2264 m + p", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2003_p23", "statement": "theorem amc12a_2003_p23 (S : Finset \u2115)\n (h\u2080 : \u2200 k : \u2115, k \u2208 S \u2194 0 < k \u2227 (k * k : \u2115) \u2223 \u220f i in Finset.Icc 1 9, i !) : S.card = 672", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_129", "statement": "theorem mathd_algebra_129 (a : \u211d) (h\u2080 : a \u2260 0) (h\u2081 : 8\u207b\u00b9 / 4\u207b\u00b9 - a\u207b\u00b9 = 1) : a = -2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2021_p18", "statement": "theorem amc12b_2021_p18 (z : \u2102)\n (h\u2080 : 12 * Complex.normSq z = 2 * Complex.normSq (z + 2) + Complex.normSq (z ^ 2 + 1) + 31) :\n z + 6 / z = -2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_484", "statement": "theorem mathd_algebra_484 : Real.log 27 / Real.log 3 = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_551", "statement": "theorem mathd_numbertheory_551 : 1529 % 6 = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_304", "statement": "theorem mathd_algebra_304 : 91 ^ 2 = 8281", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p8", "statement": "theorem amc12a_2021_p8 (d : \u2115 \u2192 \u2115) (h\u2080 : d 0 = 0) (h\u2081 : d 1 = 0) (h\u2082 : d 2 = 1)\n (h\u2083 : \u2200 n \u2265 3, d n = d (n - 1) + d (n - 3)) : Even (d 2021) \u2227 Odd (d 2022) \u2227 Even (d 2023)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_ineq_nto1onlt2m1on", "statement": "theorem algebra_ineq_nto1onlt2m1on (n : \u2115) : (n : \u211d) ^ ((1 : \u211d) / n) < 2 - 1 / n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2002_p19", "statement": "theorem amc12b_2002_p19 (a b c : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c) (h\u2081 : a * (b + c) = 152)\n (h\u2082 : b * (c + a) = 162) (h\u2083 : c * (a + b) = 170) : a * b * c = 720", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_341", "statement": "theorem mathd_numbertheory_341 (a b c : \u2115) (h\u2080 : a \u2264 9 \u2227 b \u2264 9 \u2227 c \u2264 9)\n (h\u2081 : Nat.digits 10 (5 ^ 100 % 1000) = [c, b, a]) : a + b + c = 13", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_711", "statement": "theorem mathd_numbertheory_711 (m n : \u2115) (h\u2080 : 0 < m \u2227 0 < n) (h\u2081 : Nat.gcd m n = 8)\n (h\u2082 : Nat.lcm m n = 112) : 72 \u2264 m + n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2020_p22", "statement": "theorem amc12b_2020_p22 (t : \u211d) : (2 ^ t - 3 * t) * t / 4 ^ t \u2264 1 / 12", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_113", "statement": "theorem mathd_algebra_113 (x : \u211d) : x ^ 2 - 14 * x + 3 \u2265 7 ^ 2 - 14 * 7 + 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2020_p9", "statement": "theorem amc12a_2020_p9 (S : Finset \u211d)\n (h\u2080 : \u2200 x : \u211d, x \u2208 S \u2194 0 \u2264 x \u2227 x \u2264 2 * Real.pi \u2227 Real.tan (2 * x) = Real.cos (x / 2)) :\n S.card = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12_2000_p1", "statement": "theorem amc12_2000_p1 (i m o : \u2115) (h\u2080 : i \u2260 m \u2227 m \u2260 o \u2227 o \u2260 i) (h\u2081 : i * m * o = 2001) :\n i + m + o \u2264 671", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p19", "statement": "theorem amc12a_2021_p19 (S : Finset \u211d)\n (h\u2080 :\n \u2200 x : \u211d,\n x \u2208 S \u2194\n 0 \u2264 x \u2227\n x \u2264 Real.pi \u2227\n Real.sin (Real.pi / 2 * Real.cos x) = Real.cos (Real.pi / 2 * Real.sin x)) :\n S.card = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_amgm_sumasqdivbgeqsuma", "statement": "theorem algebra_amgm_sumasqdivbgeqsuma (a b c d : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c \u2227 0 < d) :\n a ^ 2 / b + b ^ 2 / c + c ^ 2 / d + d ^ 2 / a \u2265 a + b + c + d", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_212", "statement": "theorem mathd_numbertheory_212 : 16 ^ 17 * 17 ^ 18 * 18 ^ 19 % 10 = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_320", "statement": "theorem mathd_numbertheory_320 (n : \u2115) (h\u2080 : n < 101) (h\u2081 : 101 \u2223 123456 - n) : n = 34", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_125", "statement": "theorem mathd_algebra_125 (x y : \u2115) (h\u2080 : 0 < x \u2227 0 < y) (h\u2081 : 5 * x = y)\n (h\u2082 : \u2191x - (3 : \u2124) + (y - (3 : \u2124)) = 30) : x = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "induction_1pxpownlt1pnx", "statement": "theorem induction_1pxpownlt1pnx (x : \u211d) (n : \u2115) (h\u2080 : -1 < x) (h\u2081 : 0 < n) :\n 1 + \u2191n * x \u2264 (1 + x) ^ (n : \u2115)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_148", "statement": "theorem mathd_algebra_148 (c : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = c * x ^ 3 - 9 * x + 3)\n (h\u2081 : f 2 = 9) : c = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2019_p12", "statement": "theorem amc12a_2019_p12 (x y : \u211d) (h\u2080 : x \u2260 1 \u2227 y \u2260 1)\n (h\u2081 : Real.log x / Real.log 2 = Real.log 16 / Real.log y) (h\u2082 : x * y = 64) :\n (Real.log (x / y) / Real.log 2) ^ 2 = 20", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "induction_11div10tonmn1ton", "statement": "theorem induction_11div10tonmn1ton (n : \u2115) : 11 \u2223 10 ^ n - (-1 : \u2124) ^ n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_amgm_sum1toneqn_prod1tonleq1", "statement": "theorem algebra_amgm_sum1toneqn_prod1tonleq1 (a : \u2115 \u2192 NNReal) (n : \u2115)\n (h\u2080 : (\u2211 x in Finset.range n, a x) = n) : (\u220f x in Finset.range n, a x) \u2264 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1985_p6", "statement": "theorem imo_1985_p6 (f : \u2115 \u2192 NNReal \u2192 \u211d) (h\u2080 : \u2200 x, f 1 x = x)\n (h\u2081 : \u2200 x n, f (n + 1) x = f n x * (f n x + 1 / n)) :\n \u2203! a, \u2200 n, 0 < n \u2192 0 < f n a \u2227 f n a < f (n + 1) a \u2227 f (n + 1) a < 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2020_p15", "statement": "theorem amc12a_2020_p15 (a b : \u2102) (h\u2080 : a ^ 3 - 8 = 0) (h\u2081 : b ^ 3 - 8 * b ^ 2 - 8 * b + 64 = 0) :\n Complex.abs (a - b) \u2264 2 * Real.sqrt 21", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_332", "statement": "theorem mathd_algebra_332 (x y : \u211d) (h\u2080 : (x + y) / 2 = 7) (h\u2081 : Real.sqrt (x * y) = Real.sqrt 19) :\n x ^ 2 + y ^ 2 = 158", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_cubrtrp1oncubrtreq3_rcubp1onrcubeq5778", "statement": "theorem algebra_cubrtrp1oncubrtreq3_rcubp1onrcubeq5778 (r : \u211d)\n (h\u2080 : r ^ ((1 : \u211d) / 3) + 1 / r ^ ((1 : \u211d) / 3) = 3) : r ^ 3 + 1 / r ^ 3 = 5778", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_293", "statement": "theorem mathd_algebra_293 (x : NNReal) :\n Real.sqrt (60 * x) * Real.sqrt (12 * x) * Real.sqrt (63 * x) = 36 * x * Real.sqrt (35 * x)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_440", "statement": "theorem mathd_algebra_440 (x : \u211d) (h\u2080 : 3 / 2 / 3 = x / 10) : x = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_254", "statement": "theorem mathd_numbertheory_254 : (239 + 174 + 83) % 10 = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12_2000_p6", "statement": "theorem amc12_2000_p6 (p q : \u2115) (h\u2080 : Nat.Prime p \u2227 Nat.Prime q) (h\u2081 : 4 \u2264 p \u2227 p \u2264 18)\n (h\u2082 : 4 \u2264 q \u2227 q \u2264 18) : p * q - (p + q) \u2260 194", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1988_p8", "statement": "theorem aime_1988_p8 (f : \u2115 \u2192 \u2115 \u2192 \u211d) (h\u2080 : \u2200 x, 0 < x \u2192 f x x = x)\n (h\u2081 : \u2200 x y, 0 < x \u2227 0 < y \u2192 f x y = f y x)\n (h\u2082 : \u2200 x y, 0 < x \u2227 0 < y \u2192 (\u2191x + \u2191y) * f x y = y * f x (x + y)) : f 14 52 = 364", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_114", "statement": "theorem mathd_algebra_114 (a : \u211d) (h\u2080 : a = 8) :\n (16 * (a ^ 2) ^ ((1 : \u211d) / 3)) ^ ((1 : \u211d) / 3) = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_2019_p1", "statement": "theorem imo_2019_p1 (f : \u2124 \u2192 \u2124) :\n (\u2200 a b, f (2 * a) + 2 * f b = f (f (a + b))) \u2194 \u2200 z, f z = 0 \u2228 \u2203 c, \u2200 z, f z = 2 * z + c", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_513", "statement": "theorem mathd_algebra_513 (a b : \u211d) (h\u2080 : 3 * a + 2 * b = 5) (h\u2081 : a + b = 2) : a = 1 \u2227 b = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_143", "statement": "theorem mathd_algebra_143 (f g : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = x + 1) (h\u2081 : \u2200 x, g x = x ^ 2 + 3) :\n f (g 2) = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_354", "statement": "theorem mathd_algebra_354 (a d : \u211d) (h\u2080 : a + 6 * d = 30) (h\u2081 : a + 10 * d = 60) :\n a + 20 * d = 135", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1984_p7", "statement": "theorem aime_1984_p7 (f : \u2124 \u2192 \u2124) (h\u2080 : \u2200 n, 1000 \u2264 n \u2192 f n = n - 3)\n (h\u2081 : \u2200 n, n < 1000 \u2192 f n = f (f (n + 5))) : f 84 = 997", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_246", "statement": "theorem mathd_algebra_246 (a b : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 x, f x = a * x ^ 4 - b * x ^ 2 + x + 5)\n (h\u2082 : f (-3) = 2) : f 3 = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1983_p3", "statement": "theorem aime_1983_p3 (f : \u211d \u2192 \u211d)\n (h\u2080 : \u2200 x, f x = x ^ 2 + (18 * x + 30) - 2 * Real.sqrt (x ^ 2 + (18 * x + 45)))\n (h\u2081 : Fintype (f \u207b\u00b9' {0})) : (\u220f x in (f \u207b\u00b9' {0}).toFinset, x) = 20", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "numbertheory_3pow2pownm1mod2pownp3eq2pownp2", "statement": "theorem numbertheory_3pow2pownm1mod2pownp3eq2pownp2 (n : \u2115) (h\u2080 : 0 < n) :\n (3 ^ 2 ^ n - 1) % 2 ^ (n + 3) = 2 ^ (n + 2)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_85", "statement": "theorem mathd_numbertheory_85 : 1 * 3 ^ 3 + 2 * 3 ^ 2 + 2 * 3 + 2 = 53", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12_2001_p21", "statement": "theorem amc12_2001_p21 (a b c d : \u2115) (h\u2080 : a * b * c * d = 8!) (h\u2081 : a * b + a + b = 524)\n (h\u2082 : b * c + b + c = 146) (h\u2083 : c * d + c + d = 104) : \u2191a - \u2191d = (10 : \u2124)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_239", "statement": "theorem mathd_numbertheory_239 : (\u2211 k in Finset.Icc 1 12, k) % 4 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2002_p2", "statement": "theorem amc12b_2002_p2 (x : \u2124) (h\u2080 : x = 4) :\n (3 * x - 2) * (4 * x + 1) - (3 * x - 2) * (4 * x) + 1 = 11", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_196", "statement": "theorem mathd_algebra_196 (S : Finset \u211d) (h\u2080 : \u2200 x : \u211d, x \u2208 S \u2194 abs (2 - x) = 3) :\n (\u2211 k in S, k) = 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_342", "statement": "theorem mathd_algebra_342 (a d : \u211d) (h\u2080 : (\u2211 k in Finset.range 5, a + k * d) = 70)\n (h\u2081 : (\u2211 k in Finset.range 10, a + k * d) = 210) : a = 42 / 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_517", "statement": "theorem mathd_numbertheory_517 : 121 * 122 * 123 % 4 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2009_p7", "statement": "theorem amc12a_2009_p7 (x : \u211d) (n : \u2115) (a : \u2115 \u2192 \u211d)\n (h\u2081 : \u2200 m, a (m + 1) - a m = a (m + 2) - a (m + 1)) (h\u2082 : a 1 = 2 * x - 3)\n (h\u2083 : a 2 = 5 * x - 11) (h\u2084 : a 3 = 3 * x + 1) (h\u2085 : a n = 2009) : n = 502", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_270", "statement": "theorem mathd_algebra_270 (f : \u211d \u2192 \u211d) (h\u2080 : \u2200 (x) (_ : x \u2260 -2), f x = 1 / (x + 2)) :\n f (f 1) = 3 / 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p12", "statement": "theorem amc12a_2021_p12 (a b c d : \u211d) (f : \u2102 \u2192 \u2102)\n (h\u2080 : \u2200 z, f z = z ^ 6 - 10 * z ^ 5 + a * z ^ 4 + b * z ^ 3 + c * z ^ 2 + d * z + 16)\n (h\u2081 : \u2200 z, f z = 0 \u2192 z.im = 0 \u2227 0 < z.re \u2227 \u2191(Int.floor z.re) = z.re) : b = -88", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_362", "statement": "theorem mathd_algebra_362 (a b : \u211d) (h\u2080 : a ^ 2 * b ^ 3 = 32 / 27) (h\u2081 : a / b ^ 3 = 27 / 4) :\n a + b = 8 / 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_521", "statement": "theorem mathd_numbertheory_521 (m n : \u2115) (h\u2080 : Even m) (h\u2081 : Even n) (h\u2082 : m - n = 2)\n (h\u2083 : m * n = 288) : m = 18", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2002_p13", "statement": "theorem amc12a_2002_p13 (a b : \u211d) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : a \u2260 b) (h\u2082 : abs (a - 1 / a) = 1)\n (h\u2083 : abs (b - 1 / b) = 1) : a + b = Real.sqrt 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1964_p2", "statement": "theorem imo_1964_p2 (a b c : \u211d) (h\u2080 : 0 < a \u2227 0 < b \u2227 0 < c) (h\u2081 : c < a + b) (h\u2082 : b < a + c)\n (h\u2083 : a < b + c) :\n a ^ 2 * (b + c - a) + b ^ 2 * (c + a - b) + c ^ 2 * (a + b - c) \u2264 3 * a * b * c", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_289", "statement": "theorem mathd_algebra_289 (k t m n : \u2115) (h\u2080 : Nat.Prime m \u2227 Nat.Prime n) (h\u2081 : t < k)\n (h\u2082 : k ^ 2 - m * k + n = 0) (h\u2083 : t ^ 2 - m * t + n = 0) :\n m ^ n + n ^ m + k ^ t + t ^ k = 20", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p3", "statement": "theorem amc12a_2021_p3 (x y : \u2115) (h\u2080 : x + y = 17402) (h\u2081 : 10 \u2223 x) (h\u2082 : x / 10 = y) :\n \u2191x - \u2191y = (14238 : \u2124)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2008_p25", "statement": "theorem amc12a_2008_p25 (a b : \u2115 \u2192 \u211d) (h\u2080 : \u2200 n, a (n + 1) = Real.sqrt 3 * a n - b n)\n (h\u2081 : \u2200 n, b (n + 1) = Real.sqrt 3 * b n + a n) (h\u2082 : a 100 = 2) (h\u2083 : b 100 = 4) :\n a 1 + b 1 = 1 / 2 ^ 98", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_apbpceq2_abpbcpcaeq1_aleq1on3anbleq1ancleq4on3", "statement": "theorem algebra_apbpceq2_abpbcpcaeq1_aleq1on3anbleq1ancleq4on3 (a b c : \u211d) (h\u2080 : a \u2264 b \u2227 b \u2264 c)\n (h\u2081 : a + b + c = 2) (h\u2082 : a * b + b * c + c * a = 1) :\n 0 \u2264 a \u2227 a \u2264 1 / 3 \u2227 1 / 3 \u2264 b \u2227 b \u2264 1 \u2227 1 \u2264 c \u2227 c \u2264 4 / 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_66", "statement": "theorem mathd_numbertheory_66 : 194 % 11 = 7", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2021_p1", "statement": "theorem amc12b_2021_p1 (S : Finset \u2124) (h\u2080 : \u2200 x : \u2124, x \u2208 S \u2194 \u2191(abs x) < 3 * Real.pi) :\n S.card = 19", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_apbon2pownleqapownpbpowon2", "statement": "theorem algebra_apbon2pownleqapownpbpowon2 (a b : \u211d) (n : \u2115) (h\u2080 : 0 < a \u2227 0 < b) (h\u2081 : 0 < n) :\n ((a + b) / 2) ^ n \u2264 (a ^ n + b ^ n) / 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1968_p5_1", "statement": "theorem imo_1968_p5_1 (a : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : 0 < a)\n (h\u2081 : \u2200 x, f (x + a) = 1 / 2 + Real.sqrt (f x - f x ^ 2)) : \u2203 b > 0, \u2200 x, f (x + b) = f x", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1990_p15", "statement": "theorem aime_1990_p15 (a b x y : \u211d) (h\u2080 : a * x + b * y = 3) (h\u2081 : a * x ^ 2 + b * y ^ 2 = 7)\n (h\u2082 : a * x ^ 3 + b * y ^ 3 = 16) (h\u2083 : a * x ^ 4 + b * y ^ 4 = 42) :\n a * x ^ 5 + b * y ^ 5 = 20", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_235", "statement": "theorem mathd_numbertheory_235 : (29 * 79 + 31 * 81) % 10 = 2", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2020_p13", "statement": "theorem amc12b_2020_p13 :\n Real.sqrt (Real.log 6 / Real.log 2 + Real.log 6 / Real.log 3) =\n Real.sqrt (Real.log 3 / Real.log 2) + Real.sqrt (Real.log 2 / Real.log 3)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12b_2021_p13", "statement": "theorem amc12b_2021_p13 (S : Finset \u211d)\n (h\u2080 :\n \u2200 x : \u211d, x \u2208 S \u2194 0 < x \u2227 x \u2264 2 * Real.pi \u2227 1 - 3 * Real.sin x + 5 * Real.cos (3 * x) = 0) :\n S.card = 6", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_234", "statement": "theorem mathd_numbertheory_234 (a b : \u2115) (h\u2080 : 1 \u2264 a \u2227 a \u2264 9 \u2227 b \u2264 9)\n (h\u2081 : (10 * a + b) ^ 3 = 912673) : a + b = 16", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "numbertheory_aoddbdiv4asqpbsqmod8eq1", "statement": "theorem numbertheory_aoddbdiv4asqpbsqmod8eq1 (a : \u2124) (b : \u2115) (h\u2080 : Odd a) (h\u2081 : 4 \u2223 b) :\n (a ^ 2 + (b ^ 2 : \u2115)) % 8 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_222", "statement": "theorem mathd_numbertheory_222 (b : \u2115) (h\u2080 : Nat.lcm 120 b = 3720) (h\u2081 : Nat.gcd 120 b = 8) :\n b = 248", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1999_p11", "statement": "theorem aime_1999_p11 (m : \u211a) (h\u2080 : 0 < m)\n (h\u2081 : (\u2211 k in Finset.Icc (1 : \u2115) 35, Real.sin (5 * k * \u03c0 / 180)) = Real.tan (m * \u03c0 / 180))\n (h\u2082 : (m.num : \u211d) / m.den < 90) : \u2191m.den + m.num = 177", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_359", "statement": "theorem mathd_algebra_359 (y : \u211d) (h\u2080 : y + 6 + y = 2 * 12) : y = 9", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1965_p2", "statement": "theorem imo_1965_p2 (x y z : \u211d) (a : \u2115 \u2192 \u211d) (h\u2080 : 0 < a 0 \u2227 0 < a 4 \u2227 0 < a 8)\n (h\u2081 : a 1 < 0 \u2227 a 2 < 0) (h\u2082 : a 3 < 0 \u2227 a 5 < 0) (h\u2083 : a 6 < 0 \u2227 a 7 < 0)\n (h\u2084 : 0 < a 0 + a 1 + a 2) (h\u2085 : 0 < a 3 + a 4 + a 5) (h\u2086 : 0 < a 6 + a 7 + a 8)\n (h\u2087 : a 0 * x + a 1 * y + a 2 * z = 0) (h\u2088 : a 3 * x + a 4 * y + a 5 * z = 0)\n (h\u2089 : a 6 * x + a 7 * y + a 8 * z = 0) : x = 0 \u2227 y = 0 \u2227 z = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_288", "statement": "theorem mathd_algebra_288 (x y : \u211d) (n : NNReal) (h\u2080 : x < 0 \u2227 y < 0) (h\u2081 : abs y = 6)\n (h\u2082 : Real.sqrt ((x - 8) ^ 2 + (y - 3) ^ 2) = 15)\n (h\u2083 : Real.sqrt (x ^ 2 + y ^ 2) = Real.sqrt n) : n = 52", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_127", "statement": "theorem mathd_numbertheory_127 : (\u2211 k in Finset.range 101, 2 ^ k) % 7 = 3", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "imo_1974_p3", "statement": "theorem imo_1974_p3 (n : \u2115) :\n \u00ac5 \u2223 \u2211 k in Finset.range (n + 1), Nat.choose (2 * n + 1) (2 * k + 1) * 2 ^ (3 * k)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1991_p9", "statement": "theorem aime_1991_p9 (x : \u211d) (m : \u211a) (h\u2080 : 1 / Real.cos x + Real.tan x = 22 / 7)\n (h\u2081 : 1 / Real.sin x + 1 / Real.tan x = m) : \u2191m.den + m.num = 44", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2009_p6", "statement": "theorem amc12a_2009_p6 (m n p q : \u211d) (h\u2080 : p = 2 ^ m) (h\u2081 : q = 3 ^ n) :\n p ^ (2 * n) * q ^ m = 12 ^ (m * n)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_158", "statement": "theorem mathd_algebra_158 (a : \u2115) (h\u2080 : Even a)\n (h\u2081 : \u2191(\u2211 k in Finset.range 8, 2 * k + 1) - \u2191(\u2211 k in Finset.range 5, a + 2 * k) = (4 : \u2124)) :\n a = 8", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "algebra_absxm1pabsxpabsxp1eqxp2_0leqxleq1", "statement": "theorem algebra_absxm1pabsxpabsxp1eqxp2_0leqxleq1 (x : \u211d)\n (h\u2080 : abs (x - 1) + abs x + abs (x + 1) = x + 2) : 0 \u2264 x \u2227 x \u2264 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1990_p4", "statement": "theorem aime_1990_p4 (x : \u211d) (h\u2080 : 0 < x) (h\u2081 : x ^ 2 - 10 * x - 29 \u2260 0)\n (h\u2082 : x ^ 2 - 10 * x - 45 \u2260 0) (h\u2083 : x ^ 2 - 10 * x - 69 \u2260 0)\n (h\u2084 : 1 / (x ^ 2 - 10 * x - 29) + 1 / (x ^ 2 - 10 * x - 45) - 2 / (x ^ 2 - 10 * x - 69) = 0) :\n x = 13", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_541", "statement": "theorem mathd_numbertheory_541 (m n : \u2115) (h\u2080 : 1 < m) (h\u2081 : 1 < n) (h\u2082 : m * n = 2005) :\n m + n = 406", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_314", "statement": "theorem mathd_algebra_314 (n : \u2115) (h\u2080 : n = 11) : (1 / 4) ^ (n + 1) * 2 ^ (2 * n) = 1 / 4", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12_2000_p20", "statement": "theorem amc12_2000_p20 (x y z : \u211d) (h\u2080 : 0 < x \u2227 0 < y \u2227 0 < z) (h\u2081 : x + 1 / y = 4)\n (h\u2082 : y + 1 / z = 1) (h\u2083 : z + 1 / x = 7 / 3) : x * y * z = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_302", "statement": "theorem mathd_algebra_302 : (Complex.I / 2) ^ 2 = -(1 / 4)", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1983_p2", "statement": "theorem aime_1983_p2 (x p : \u211d) (f : \u211d \u2192 \u211d) (h\u2080 : 0 < p \u2227 p < 15) (h\u2081 : p \u2264 x \u2227 x \u2264 15)\n (h\u2082 : f x = abs (x - p) + abs (x - 15) + abs (x - p - 15)) : 15 \u2264 f x", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_139", "statement": "theorem mathd_algebra_139 (s : \u211d \u2192 \u211d \u2192 \u211d)\n (h\u2080 : \u2200 (x) (_ : x \u2260 0), \u2200 (y) (_ : y \u2260 0), s x y = (1 / y - 1 / x) / (x - y)) :\n s 3 11 = 1 / 33", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2021_p25", "statement": "theorem amc12a_2021_p25 (N : \u2115) (f : \u2115 \u2192 \u211d)\n (h\u2080 : \u2200 n, 0 < n \u2192 f n = (Nat.divisors n).card / n ^ ((1 : \u211d) / 3))\n (h\u2081 : \u2200 (n) (_ : n \u2260 N), 0 < n \u2192 f n < f N) : (Nat.digits 10 N).sum = 9", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "amc12a_2020_p25", "statement": "theorem amc12a_2020_p25 (a : \u211a) (S : Finset \u211d)\n (h\u2080 : \u2200 x : \u211d, x \u2208 S \u2194 \u2191\u230ax\u230b * (x - \u2191\u230ax\u230b) = \u2191a * x ^ 2) (h\u2081 : (\u2211 k in S, k) = 420) :\n \u2191a.den + a.num = 929", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_150", "statement": "theorem mathd_numbertheory_150 (n : \u2115) (h\u2080 : \u00acNat.Prime (7 + 30 * n)) : 6 \u2264 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1989_p8", "statement": "theorem aime_1989_p8 (a b c d e f g : \u211d)\n (h\u2080 : a + 4 * b + 9 * c + 16 * d + 25 * e + 36 * f + 49 * g = 1)\n (h\u2081 : 4 * a + 9 * b + 16 * c + 25 * d + 36 * e + 49 * f + 64 * g = 12)\n (h\u2082 : 9 * a + 16 * b + 25 * c + 36 * d + 49 * e + 64 * f + 81 * g = 123) :\n 16 * a + 25 * b + 36 * c + 49 * d + 64 * e + 81 * f + 100 * g = 334", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_296", "statement": "theorem mathd_numbertheory_296 (n : \u2115) (h\u2080 : 2 \u2264 n) (h\u2081 : \u2203 x, x ^ 3 = n) (h\u2082 : \u2203 t, t ^ 4 = n) :\n 4096 \u2264 n", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_142", "statement": "theorem mathd_algebra_142 (m b : \u211d) (h\u2080 : m * 7 + b = -1) (h\u2081 : m * -1 + b = 7) : m + b = 5", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "numbertheory_exk2powkeqapb2mulbpa2_aeq1", "statement": "theorem numbertheory_exk2powkeqapb2mulbpa2_aeq1 (a b : \u2115) (h\u2080 : 0 < a \u2227 0 < b)\n (h\u2081 : \u2203 k > 0, 2 ^ k = (a + b ^ 2) * (b + a ^ 2)) : a = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_400", "statement": "theorem mathd_algebra_400 (x : \u211d) (h\u2080 : 5 + 500 / 100 * 10 = 110 / 100 * x) : x = 50", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "aime_1995_p7", "statement": "theorem aime_1995_p7 (k m n : \u2115) (t : \u211d) (h\u2080 : 0 < k \u2227 0 < m \u2227 0 < n) (h\u2081 : Nat.gcd m n = 1)\n (h\u2082 : (1 + Real.sin t) * (1 + Real.cos t) = 5 / 4)\n (h\u2083 : (1 - Real.sin t) * (1 - Real.cos t) = m / n - Real.sqrt k) : k + m + n = 27", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_185", "statement": "theorem mathd_numbertheory_185 (n : \u2115) (h\u2080 : n % 5 = 3) : 2 * n % 5 = 1", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_441", "statement": "theorem mathd_algebra_441 (x : \u211d) (h\u2080 : x \u2260 0) :\n 12 / (x * x) * (x ^ 4 / (14 * x)) * (35 / (3 * x)) = 10", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_numbertheory_582", "statement": "theorem mathd_numbertheory_582 (n : \u2115) (h\u2080 : 0 < n) (h\u2081 : 3 \u2223 n) :\n (n + 4 + (n + 6) + (n + 8)) % 9 = 0", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} +{"full_name": "mathd_algebra_338", "statement": "theorem mathd_algebra_338 (a b c : \u211d) (h\u2080 : 3 * a + b + c = -3) (h\u2081 : a + 3 * b + c = 9)\n (h\u2082 : a + b + 3 * c = 19) : a * b * c = -56", "url": "https://github.com/wzj423/lean-dojo-mew", "commit": "1ef4e4cac9dd370b7be6d648ce135a06aa6fce5f", "file_path": "MiniF2F/Test.lean", "split": "test"} diff --git a/eval/pretrain/minif2f/data/minif2f.jsonl b/minif2f/data/minif2f.jsonl similarity index 100% rename from eval/pretrain/minif2f/data/minif2f.jsonl rename to minif2f/data/minif2f.jsonl diff --git a/minif2f/output.zip b/minif2f/output.zip new file mode 100644 index 0000000..6e43084 Binary files /dev/null and b/minif2f/output.zip differ diff --git a/minif2f/proofsearch_internLM2-StepProver.py b/minif2f/proofsearch_internLM2-StepProver.py new file mode 100644 index 0000000..bcaf0c9 --- /dev/null +++ b/minif2f/proofsearch_internLM2-StepProver.py @@ -0,0 +1,338 @@ +# Lean proof search with LeanDojo interaction +# Author: Sean Welleck +import json, os +import heapq +import subprocess +import time +import transformers +import vllm +from datetime import datetime +from lean_dojo import * +from pathlib import Path +from tqdm import tqdm, trange + +os.environ['TOKENIZERS_PARALLELISM'] = 'false' + + +def chat_template_to_prompt(prompt_list): + result = "" + total_step = len(prompt_list) + for i, message in enumerate(prompt_list): + result += ('<|im_start|>' + message['role'] + + '\n' + message['content']) + if i+1 != total_step: + result += '<|im_end|>\n' + elif message['role'] == 'user': + result += '<|im_end|>\n<|im_start|>assistant\n' + return result + +def prompt_style_internlm_chat_stepprover_extractor(result:str): + START_STR="PROOFSTEP " + if result.startswith(START_STR): + result=result[len(START_STR):] + return result + +def _prompt_function(theorem, state): + input_template = ( f"DECL {theorem.full_name}\n" + f"GOAL {state}\n" + ) + prompt = [{"role": "user", "content": input_template}] + return prompt + + +def generate_vllm(prompt, model, tokenizer, temperatures, num_samples, stop, max_tokens=256): + if not isinstance(prompt, str): + prompt = chat_template_to_prompt(prompt) + texts, scores = [], [] + for temperature in temperatures: + params = vllm.SamplingParams( + n=num_samples, + temperature=temperature, + use_beam_search=temperature==0.0, + max_tokens=max_tokens, + stop=stop, + length_penalty=0.0 if temperature==0.0 else 1.0, + logprobs=True, + ) + outputs = model.generate([prompt], params, use_tqdm=False) + if len(outputs) == 0: + return [], [] + for output in outputs[0].outputs: + text = output.text.replace(tokenizer.eos_token, '') + score = output.cumulative_logprob/max(len(output.token_ids), 1) + texts.append(text) + scores.append(score) + + texts = list(map(prompt_style_internlm_chat_stepprover_extractor,texts)) + texts, scores = _unique_sorted(texts, scores) + return texts, scores + + +def _unique_sorted(texts, scores): + texts_ = [] + scores_ = [] + for t, s in sorted(zip(texts, scores), key=lambda x: -x[1]): + if t not in texts_: + texts_.append(t) + scores_.append(s) + return texts_, scores_ + + +def _tactic_state(state): + if isinstance(state, TacticState): + ts = state.pp + else: + ts = state.unsolved_tactic_state + return ts + + + +def best_first_search( + theorem, + model, + tokenizer, + max_iters, + temperatures, + num_samples, + prompt_fn, + timeout=600, + early_stop=False, + max_tokens=256 +) -> dict: + """Best first search.""" + attempt_results = [] + try: + with Dojo(theorem, hard_timeout=timeout,additional_imports=["Mathlib.Tactic"]) as (dojo, init_state): + + start = time.time() + proof_finished = False + queue = [(0.0, [], init_state, [])] + visited = dict() + + for iteration in trange(max_iters): + if len(queue) == 0 or proof_finished: + break + + total_score, steps, state, trace = heapq.heappop(queue) + ts = _tactic_state(state) + visited[ts] = visited.get(ts,0)+1 + # State de-duplication needs re-compile Lean 4, whose code will be released soon. + # Here we are tolerating duplicated states, should not impact performance on miniF2F. + + step_cands, step_scores = generate_vllm( + prompt_fn(theorem, ts), + model, + tokenizer, + temperatures, + num_samples, + stop=['<|im_end|>',], + max_tokens=max_tokens + ) + step_cands = [s.strip() for s in step_cands] + + for step, score in zip(step_cands, step_scores): + result = dojo.run_tac(state, step) + step_trace = { + "tactic": step, + "state_before": _tactic_state(state) + } + if isinstance(result, ProofFinished): + attempt_results.append({ + 'theorem': theorem.full_name, + 'proof': steps + [step], + 'score': total_score - score, + 'success': True, + 'failure_reason': '', + 'trace': trace + [step_trace], + 'temperature': temperatures, + 'elapsed': start - time.time(), + 'iteration': iteration + }) + if early_stop: + return attempt_results + proof_finished = True + break + elif isinstance(result, TacticState): + if visited.get(_tactic_state(result),0) <= 1: #_tactic_state(result) not in visited: + # Score is negative log probability summed across steps + visited[_tactic_state(result)] = visited.get(_tactic_state(result),0) + 1 + new_score = (total_score - score) + heapq.heappush( + queue, (new_score, steps+[step], result, trace+[step_trace]) + ) + except (DojoInitError, DojoHardTimeoutError, DojoCrashError, subprocess.CalledProcessError) as e: + if len(attempt_results) == 0: + attempt_results.append({ + 'theorem': theorem.full_name, + 'success': False, + 'failure_reason': type(e).__name__ + }) + + if len(attempt_results) == 0: + attempt_results.append({ + 'theorem': theorem.full_name, + 'success': False, + 'failure_reason': 'SearchEnded' + }) + + return attempt_results + + +def _save(model_name, results, args_dict, output_dir, shard): + Path(output_dir).mkdir(parents=True, exist_ok=True) + output_file = os.path.join( + output_dir, + 'results__%s__%s.json' % (model_name.replace('/', '_'), shard) + ) + with open(output_file, 'w') as f: + json.dump({ + 'results': results, + 'args': args_dict + }, f, indent=4) + print(output_file) + + +def _load_model(model_name, tp_degree): + model = vllm.LLM( + model=model_name, + tensor_parallel_size=tp_degree, + dtype='float16', + max_num_batched_tokens=32768, + trust_remote_code=True, + enforce_eager=True + ) + tokenizer = transformers.AutoTokenizer.from_pretrained(model_name,trust_remote_code=True) + return model, tokenizer + + +def _load_data(dataset_name, dataset_path): + if 'minif2f' in dataset_name: + data = [] + with open(dataset_path) as f: + for line in f.readlines(): + data_ = json.loads(line) + data.append(data_) + + if 'valid' in dataset_name: + data = [x for x in data if x['split'] == 'valid'] + else: + data = [x for x in data if x['split'] == 'test'] + repo = LeanGitRepo(data[0]['url'], data[0]['commit']) + else: + raise NotImplementedError(dataset_name) + + return repo, data + + +def print_stats(results): + print(len([x for x in results if x['success']]) / len(results)) + print("# successes: ", len([x for x in results if x['success']]), sep="\t") + +import pathlib +from pathlib import Path +def resume_from(results_filename, data, model_name, shard): + results_path = Path(results_filename) + if results_path.is_dir(): + results_path = results_path / ('results__%s__%s.json' % (model_name.replace('/', '_'), shard)) + if results_path.exists(): + results = json.load(open(results_path))['results'] + data = data[len(results):] + print("=== Resuming from %d" % (len(results))) + return results, data + else: + return [],data + + +def make_output_dir(output_dir): + dt = datetime.now().strftime("%d-%m-%Y-%H-%M") + output_dir = os.path.join(output_dir, dt) + Path(output_dir).mkdir(parents=True, exist_ok=True) + return output_dir + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument( + '--model-name', + choices=[ + 'internlm/internlm2-math-base-7b', + "internlm/internlm2-math-base-20b", + "internlm/internlm2-math-plus-7b", + "internlm/internlm2-math-plus-20b", + "internlm/internlm2-step-prover" + ], + required=True + ) + parser.add_argument( + '--dataset-name', + default='minif2f-test', + choices=['minif2f-valid', 'minif2f-test'] + ) + parser.add_argument('--shard', type=int, required=True) + parser.add_argument('--resume-from', type=str, default=None) + parser.add_argument('--dataset-path', default='data/minif2f-lean4.7.0.jsonl') + parser.add_argument('--output-dir', default='output/minif2f') + parser.add_argument('--early-stop', action='store_true') + parser.add_argument('--tp-degree', type=int, default=1) + parser.add_argument('--num-shards', type=int, default=8) + parser.add_argument('--max-iters', type=int, default=100) + parser.add_argument('--timeout', type=int, default=1200) + parser.add_argument('--num-examples', type=int, default=-1) + parser.add_argument('--num-samples', type=int, default=32) + parser.add_argument('--clear-process-hours', type=int, default=3) + parser.add_argument('--temperatures', type=float, nargs='+', default=[0.0]) + args = parser.parse_args() + model, tokenizer = _load_model(args.model_name, args.tp_degree) + output_dir = make_output_dir(args.output_dir) + + repo, data = _load_data(args.dataset_name, args.dataset_path) + shard_size = len(data) // args.num_shards + data = data[args.shard*shard_size:(args.shard+1)*shard_size] if args.num_shards > 1+ args.shard else data[args.shard*shard_size:] + print("Shard size: %d" % (len(data))) + + if args.resume_from is not None: + results, data = resume_from(args.resume_from, data, args.model_name,args.shard) + else: + results = [] + + start = time.time() + for example in tqdm(data, total=len(data)): + file_path = example['file_path'] + theorem_name = example['full_name'] + theorem = Theorem(repo, file_path, theorem_name) + attempt_results = best_first_search( + theorem, model, tokenizer, + max_iters=args.max_iters, + prompt_fn=_prompt_function, + temperatures=args.temperatures, + num_samples=args.num_samples, + timeout=args.timeout, + early_stop=args.early_stop + ) + + result = { + 'attempt_results': attempt_results, + 'success': any([x['success'] for x in attempt_results]), + 'example': example + } + + results.append(result) + + _save( + model_name=args.model_name, + results=results, + args_dict=args.__dict__, + output_dir=output_dir, + shard=args.shard + ) + print_stats(results) + # The proof search occasionally leaves Lean processes open. As a workaround, + # we periodically kill all Lean processes. Note that this may cause a proof search failure. + if args.shard == 0: + hours = 60*60*args.clear_process_hours + if time.time() - start > hours: + print("=== Killing active leanprover processes to mitigate leak") + os.system("ps aux | grep leanprover | awk '{print $2}' | xargs kill -9") + start = time.time() diff --git a/minif2f/proofsearch_internLM2-plus.py b/minif2f/proofsearch_internLM2-plus.py new file mode 100644 index 0000000..2adf796 --- /dev/null +++ b/minif2f/proofsearch_internLM2-plus.py @@ -0,0 +1,335 @@ +# Lean proof search with LeanDojo interaction +# Author: Sean Welleck +import json, os +import heapq +import subprocess +import time +import transformers +import vllm +from datetime import datetime +from lean_dojo import * +from pathlib import Path +from tqdm import tqdm, trange + +os.environ['TOKENIZERS_PARALLELISM'] = 'false' + + +def chat_template_to_prompt(prompt_list): + result = "" + total_step = len(prompt_list) + for i, message in enumerate(prompt_list): + result += ('<|im_start|>' + message['role'] + + '\n' + message['content']) + if i+1 != total_step: + result += '<|im_end|>\n' + elif message['role'] == 'user': + result += '<|im_end|>\n<|im_start|>assistant\n' + return result + +def prompt_style_internlm_chat_0522_extractor(result:str): + START_STR="Here is the predicted next tactic:\n```lean\n" + END_STR="\n```" + if result.startswith(START_STR): + result=result[len(START_STR):] + if result.endswith(END_STR): + result=result[:-len(END_STR)] + return result + +def generate_vllm(prompt, model, tokenizer, temperatures, num_samples, stop, max_tokens=256): + if not isinstance(prompt, str): + prompt = chat_template_to_prompt(prompt) + texts, scores = [], [] + for temperature in temperatures: + params = vllm.SamplingParams( + n=num_samples, + temperature=temperature, + use_beam_search=temperature==0.0, + max_tokens=max_tokens, + stop=stop, + length_penalty=0.0 + ) + outputs = model.generate([prompt], params, use_tqdm=False) + if len(outputs) == 0: + return [], [] + for output in outputs[0].outputs: + text = output.text.replace(tokenizer.eos_token, '') + score = output.cumulative_logprob/max(len(output.token_ids), 1) + texts.append(text) + scores.append(score) + + texts = list(map(prompt_style_internlm_chat_0522_extractor,texts)) + texts, scores = _unique_sorted(texts, scores) + return texts, scores + + +def _unique_sorted(texts, scores): + texts_ = [] + scores_ = [] + for t, s in sorted(zip(texts, scores), key=lambda x: -x[1]): + if t not in texts_: + texts_.append(t) + scores_.append(s) + return texts_, scores_ + + +def _tactic_state(state): + if isinstance(state, TacticState): + ts = state.pp + else: + ts = state.unsolved_tactic_state + return ts + + +def _prompt_fewshot(state): + prompt = f"My LEAN 4 state is:\n```lean\n" + state + \ + "```\nPlease predict a possible tactic to help me prove the theorem." + prompt = [{"role": "user", "content": prompt}] + return prompt + + +def best_first_search( + theorem, + model, + tokenizer, + max_iters, + temperatures, + num_samples, + prompt_fn, + timeout=600, + early_stop=False, + max_tokens=256 +) -> dict: + """Best first search.""" + attempt_results = [] + try: + with Dojo(theorem, hard_timeout=timeout,additional_imports=["Mathlib.Tactic"]) as (dojo, init_state): + + start = time.time() + proof_finished = False + queue = [(0.0, [], init_state, [])] + visited = dict() + + for iteration in trange(max_iters): + if len(queue) == 0 or proof_finished: + break + + total_score, steps, state, trace = heapq.heappop(queue) + ts = _tactic_state(state) + visited[ts] = visited.get(ts,0)+1 + + step_cands, step_scores = generate_vllm( + prompt_fn(ts), + model, + tokenizer, + temperatures, + num_samples, + stop=['<|im_end|>',], + max_tokens=max_tokens + ) + step_cands = [s.strip() for s in step_cands] + + for step, score in zip(step_cands, step_scores): + result = dojo.run_tac(state, step) + step_trace = { + "tactic": step, + "state_before": _tactic_state(state) + } + if isinstance(result, ProofFinished): + attempt_results.append({ + 'theorem': theorem.full_name, + 'proof': steps + [step], + 'score': total_score - score, + 'success': True, + 'failure_reason': '', + 'trace': trace + [step_trace], + 'temperature': temperatures, + 'elapsed': start - time.time(), + 'iteration': iteration + }) + if early_stop: + return attempt_results + proof_finished = True + break + elif isinstance(result, TacticState): + if visited.get(_tactic_state(result),0) <= 1: #_tactic_state(result) not in visited: + # Score is negative log probability summed across steps + visited[_tactic_state(result)] = visited.get(_tactic_state(result),0) + 1 + new_score = (total_score - score) + heapq.heappush( + queue, (new_score, steps+[step], result, trace+[step_trace]) + ) + except (DojoInitError, DojoHardTimeoutError, DojoCrashError, subprocess.CalledProcessError) as e: + if len(attempt_results) == 0: + attempt_results.append({ + 'theorem': theorem.full_name, + 'success': False, + 'failure_reason': type(e).__name__ + }) + + if len(attempt_results) == 0: + attempt_results.append({ + 'theorem': theorem.full_name, + 'success': False, + 'failure_reason': 'SearchEnded' + }) + + return attempt_results + + +def _save(model_name, results, args_dict, output_dir, shard): + Path(output_dir).mkdir(parents=True, exist_ok=True) + output_file = os.path.join( + output_dir, + 'results__%s__%s.json' % (model_name.replace('/', '_'), shard) + ) + with open(output_file, 'w') as f: + json.dump({ + 'results': results, + 'args': args_dict + }, f, indent=4) + print(output_file) + + +def _load_model(model_name, tp_degree): + model = vllm.LLM( + model=model_name, + tensor_parallel_size=tp_degree, + dtype='bfloat16', + max_num_batched_tokens=32768, + trust_remote_code=True, + enforce_eager=True + ) + tokenizer = transformers.AutoTokenizer.from_pretrained(model_name,trust_remote_code=True) + return model, tokenizer + + +def _load_data(dataset_name, dataset_path): + if 'minif2f' in dataset_name: + data = [] + with open(dataset_path) as f: + for line in f.readlines(): + data_ = json.loads(line) + data.append(data_) + + if 'valid' in dataset_name: + data = [x for x in data if x['split'] == 'valid'] + else: + data = [x for x in data if x['split'] == 'test'] + repo = LeanGitRepo(data[0]['url'], data[0]['commit']) + else: + raise NotImplementedError(dataset_name) + + return repo, data + + +def print_stats(results): + print(len([x for x in results if x['success']]) / len(results)) + print("# successes: ", len([x for x in results if x['success']]), sep="\t") + +import pathlib +from pathlib import Path +def resume_from(results_filename, data, model_name, shard): + results_path = Path(results_filename) + if results_path.is_dir(): + results_path = results_path / ('results__%s__%s.json' % (model_name.replace('/', '_'), shard)) + if results_path.exists(): + results = json.load(open(results_path))['results'] + data = data[len(results):] + print("=== Resuming from %d" % (len(results))) + return results, data + else: + return [],data + + +def make_output_dir(output_dir): + dt = datetime.now().strftime("%d-%m-%Y-%H-%M") + output_dir = os.path.join(output_dir, dt) + Path(output_dir).mkdir(parents=True, exist_ok=True) + return output_dir + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument( + '--model-name', + choices=[ + 'internlm/internlm2-math-base-7b', + "internlm/internlm2-math-base-20b", + "internlm/internlm2-math-plus-7b", + "internlm/internlm2-math-plus-20b" + ], + required=True + ) + parser.add_argument( + '--dataset-name', + default='minif2f-test', + choices=['minif2f-valid', 'minif2f-test'] + ) + parser.add_argument('--shard', type=int, required=True) + parser.add_argument('--resume-from', type=str, default=None) + parser.add_argument('--dataset-path', default='data/minif2f-lean4.7.0.jsonl') + parser.add_argument('--output-dir', default='output/minif2f') + parser.add_argument('--early-stop', action='store_true') + parser.add_argument('--tp-degree', type=int, default=1) + parser.add_argument('--num-shards', type=int, default=8) + parser.add_argument('--max-iters', type=int, default=100) + parser.add_argument('--timeout', type=int, default=1200) + parser.add_argument('--num-examples', type=int, default=-1) + parser.add_argument('--num-samples', type=int, default=32) + parser.add_argument('--clear-process-hours', type=int, default=3) + parser.add_argument('--temperatures', type=float, nargs='+', default=[0.0]) + args = parser.parse_args() + model, tokenizer = _load_model(args.model_name, args.tp_degree) + output_dir = make_output_dir(args.output_dir) + + repo, data = _load_data(args.dataset_name, args.dataset_path) + shard_size = len(data) // args.num_shards + data = data[args.shard*shard_size:(args.shard+1)*shard_size] if args.num_shards > 1+ args.shard else data[args.shard*shard_size:] + print("Shard size: %d" % (len(data))) + + if args.resume_from is not None: + results, data = resume_from(args.resume_from, data, args.model_name,args.shard) + else: + results = [] + + start = time.time() + for example in tqdm(data, total=len(data)): + file_path = example['file_path'] + theorem_name = example['full_name'] + theorem = Theorem(repo, file_path, theorem_name) + attempt_results = best_first_search( + theorem, model, tokenizer, + max_iters=args.max_iters, + prompt_fn=_prompt_fewshot, + temperatures=args.temperatures, + num_samples=args.num_samples, + timeout=args.timeout, + early_stop=args.early_stop + ) + + result = { + 'attempt_results': attempt_results, + 'success': any([x['success'] for x in attempt_results]), + 'example': example + } + + results.append(result) + + _save( + model_name=args.model_name, + results=results, + args_dict=args.__dict__, + output_dir=output_dir, + shard=args.shard + ) + print_stats(results) + # The proof search occasionally leaves Lean processes open. As a workaround, + # we periodically kill all Lean processes. Note that this may cause a proof search failure. + if args.shard == 0: + hours = 60*60*args.clear_process_hours + if time.time() - start > hours: + print("=== Killing active leanprover processes to mitigate leak") + os.system("ps aux | grep leanprover | awk '{print $2}' | xargs kill -9") + start = time.time() diff --git a/minif2f/proofsearch_internLM2.5-StepProver.py b/minif2f/proofsearch_internLM2.5-StepProver.py new file mode 100644 index 0000000..70a6ee9 --- /dev/null +++ b/minif2f/proofsearch_internLM2.5-StepProver.py @@ -0,0 +1,330 @@ +# Lean proof search with LeanDojo interaction +# Author: Sean Welleck +import json, os +import heapq +import subprocess +import time +import transformers +import vllm +from datetime import datetime +from lean_dojo import * +from pathlib import Path +from tqdm import tqdm, trange + +os.environ['TOKENIZERS_PARALLELISM'] = 'false' + + +def chat_template_to_prompt(prompt_list): + result = "" + total_step = len(prompt_list) + for i, message in enumerate(prompt_list): + result += ('<|im_start|>' + message['role'] + + '\n' + message['content']) + if i+1 != total_step: + result += '<|im_end|>\n' + elif message['role'] == 'user': + result += '<|im_end|>\n<|im_start|>assistant\n' + return result + +def prompt_style_internlm_chat_stepprover_extractor(result:str): + return result + +def _prompt_function(theorem, state, proof_before=""): + input_template = ( f"---\nNAME: {theorem.full_name}\n\n" + # f"---\nFILE:{theorem.file_path}\n\n" + f"---\nPROOF_BEFORE: {proof_before}\n\n" + f"---\nSTATE_BEFORE: {state}\n\n" + f"---\nTACTIC: " + ) + prompt = [{"role": "user", "content": input_template}] + return prompt + +def generate_vllm(prompt, model, tokenizer, temperatures, num_samples, stop, max_tokens=256): + if not isinstance(prompt, str): + prompt = chat_template_to_prompt(prompt) + texts, scores = [], [] + for temperature in temperatures: + params = vllm.SamplingParams( + n=num_samples, + temperature=temperature, + use_beam_search=temperature==0.0, + max_tokens=max_tokens, + stop=stop, + length_penalty=0.0 if temperature==0.0 else 1.0, + logprobs=True, + ) + outputs = model.generate([prompt], params, use_tqdm=False) + if len(outputs) == 0: + return [], [] + for output in outputs[0].outputs: + text = output.text.replace(tokenizer.eos_token, '') + score = output.cumulative_logprob/max(len(output.token_ids), 1) + texts.append(text) + scores.append(score) + + texts = list(map(prompt_style_internlm_chat_stepprover_extractor,texts)) + texts, scores = _unique_sorted(texts, scores) + return texts, scores + + +def _unique_sorted(texts, scores): + texts_ = [] + scores_ = [] + for t, s in sorted(zip(texts, scores), key=lambda x: -x[1]): + if t not in texts_: + texts_.append(t) + scores_.append(s) + return texts_, scores_ + + +def _tactic_state(state): + if isinstance(state, TacticState): + ts = state.pp + else: + ts = state.unsolved_tactic_state + return ts + + + +def best_first_search( + theorem, + model, + tokenizer, + max_iters, + temperatures, + num_samples, + prompt_fn, + timeout=600, + early_stop=False, + max_tokens=256 +) -> dict: + """Best first search.""" + attempt_results = [] + try: + with Dojo(theorem, hard_timeout=timeout,additional_imports=["Mathlib.Tactic"]) as (dojo, init_state): + + start = time.time() + proof_finished = False + queue = [(0.0, [], init_state, [])] + visited = dict() + + for iteration in trange(max_iters): + if len(queue) == 0 or proof_finished: + break + + total_score, steps, state, trace = heapq.heappop(queue) + ts = _tactic_state(state) + visited[ts] = visited.get(ts,0)+1 + # State de-duplication needs re-compile Lean 4, whose code will be released soon. + # Here we are tolerating duplicated states, should not impact performance on miniF2F. + proof_before = "\n".join(steps) + step_cands, step_scores = generate_vllm( + prompt_fn(theorem, ts, proof_before), + model, + tokenizer, + temperatures, + num_samples, + stop=['<|im_end|>',], + max_tokens=max_tokens + ) + step_cands = [s.strip() for s in step_cands] + + for step, score in zip(step_cands, step_scores): + result = dojo.run_tac(state, step) + step_trace = { + "tactic": step, + "state_before": _tactic_state(state) + } + if isinstance(result, ProofFinished): + attempt_results.append({ + 'theorem': theorem.full_name, + 'proof': steps + [step], + 'score': total_score - score, + 'success': True, + 'failure_reason': '', + 'trace': trace + [step_trace], + 'temperature': temperatures, + 'elapsed': start - time.time(), + 'iteration': iteration + }) + if early_stop: + return attempt_results + proof_finished = True + break + elif isinstance(result, TacticState): + if visited.get(_tactic_state(result),0) <= 1: #_tactic_state(result) not in visited: + # Score is negative log probability summed across steps + visited[_tactic_state(result)] = visited.get(_tactic_state(result),0) + 1 + new_score = (total_score - score) + heapq.heappush( + queue, (new_score, steps+[step], result, trace+[step_trace]) + ) + except (DojoInitError, DojoHardTimeoutError, DojoCrashError, subprocess.CalledProcessError) as e: + if len(attempt_results) == 0: + attempt_results.append({ + 'theorem': theorem.full_name, + 'success': False, + 'failure_reason': type(e).__name__ + }) + + if len(attempt_results) == 0: + attempt_results.append({ + 'theorem': theorem.full_name, + 'success': False, + 'failure_reason': 'SearchEnded' + }) + + return attempt_results + + +def _save(model_name, results, args_dict, output_dir, shard): + Path(output_dir).mkdir(parents=True, exist_ok=True) + output_file = os.path.join( + output_dir, + 'results__%s__%s.json' % (model_name.replace('/', '_'), shard) + ) + with open(output_file, 'w') as f: + json.dump({ + 'results': results, + 'args': args_dict + }, f, indent=4) + print(output_file) + + +def _load_model(model_name, tp_degree): + model = vllm.LLM( + model=model_name, + tensor_parallel_size=tp_degree, + dtype='float16', + max_num_batched_tokens=32768, + trust_remote_code=True, + enforce_eager=True + ) + tokenizer = transformers.AutoTokenizer.from_pretrained(model_name,trust_remote_code=True) + return model, tokenizer + + +def _load_data(dataset_name, dataset_path): + if 'minif2f' in dataset_name: + data = [] + with open(dataset_path) as f: + for line in f.readlines(): + data_ = json.loads(line) + data.append(data_) + + if 'valid' in dataset_name: + data = [x for x in data if x['split'] == 'valid'] + else: + data = [x for x in data if x['split'] == 'test'] + repo = LeanGitRepo(data[0]['url'], data[0]['commit']) + else: + raise NotImplementedError(dataset_name) + + return repo, data + + +def print_stats(results): + print(len([x for x in results if x['success']]) / len(results)) + print("# successes: ", len([x for x in results if x['success']]), sep="\t") + +import pathlib +from pathlib import Path +def resume_from(results_filename, data, model_name, shard): + results_path = Path(results_filename) + if results_path.is_dir(): + results_path = results_path / ('results__%s__%s.json' % (model_name.replace('/', '_'), shard)) + if results_path.exists(): + results = json.load(open(results_path))['results'] + data = data[len(results):] + print("=== Resuming from %d" % (len(results))) + return results, data + else: + return [],data + + +def make_output_dir(output_dir): + dt = datetime.now().strftime("%d-%m-%Y-%H-%M") + output_dir = os.path.join(output_dir, dt) + Path(output_dir).mkdir(parents=True, exist_ok=True) + return output_dir + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument( + '--model-name', + required=True + ) + parser.add_argument( + '--dataset-name', + default='minif2f-test', + choices=['minif2f-valid', 'minif2f-test'] + ) + parser.add_argument('--shard', type=int, required=True) + parser.add_argument('--resume-from', type=str, default=None) + parser.add_argument('--dataset-path', default='data/minif2f-lean4.7.0.jsonl') + parser.add_argument('--output-dir', default='output/minif2f') + parser.add_argument('--early-stop', action='store_true') + parser.add_argument('--tp-degree', type=int, default=1) + parser.add_argument('--num-shards', type=int, default=8) + parser.add_argument('--max-iters', type=int, default=100) + parser.add_argument('--timeout', type=int, default=1200) + parser.add_argument('--num-examples', type=int, default=-1) + parser.add_argument('--num-samples', type=int, default=32) + parser.add_argument('--clear-process-hours', type=int, default=3) + parser.add_argument('--temperatures', type=float, nargs='+', default=[0.0]) + args = parser.parse_args() + model, tokenizer = _load_model(args.model_name, args.tp_degree) + output_dir = make_output_dir(args.output_dir) + + repo, data = _load_data(args.dataset_name, args.dataset_path) + shard_size = len(data) // args.num_shards + data = data[args.shard*shard_size:(args.shard+1)*shard_size] if args.num_shards > 1+ args.shard else data[args.shard*shard_size:] + print("Shard size: %d" % (len(data))) + + if args.resume_from is not None: + results, data = resume_from(args.resume_from, data, args.model_name,args.shard) + else: + results = [] + + start = time.time() + for example in tqdm(data, total=len(data)): + file_path = example['file_path'] + theorem_name = example['full_name'] + theorem = Theorem(repo, file_path, theorem_name) + attempt_results = best_first_search( + theorem, model, tokenizer, + max_iters=args.max_iters, + prompt_fn=_prompt_function, + temperatures=args.temperatures, + num_samples=args.num_samples, + timeout=args.timeout, + early_stop=args.early_stop + ) + + result = { + 'attempt_results': attempt_results, + 'success': any([x['success'] for x in attempt_results]), + 'example': example + } + + results.append(result) + + _save( + model_name=args.model_name, + results=results, + args_dict=args.__dict__, + output_dir=output_dir, + shard=args.shard + ) + print_stats(results) + # The proof search occasionally leaves Lean processes open. As a workaround, + # we periodically kill all Lean processes. Note that this may cause a proof search failure. + if args.shard == 0: + hours = 60*60*args.clear_process_hours + if time.time() - start > hours: + print("=== Killing active leanprover processes to mitigate leak") + os.system("ps aux | grep leanprover | awk '{print $2}' | xargs kill -9") + start = time.time() diff --git a/eval/pretrain/minif2f/proofsearch_internLM2.py b/minif2f/proofsearch_internLM2.py similarity index 100% rename from eval/pretrain/minif2f/proofsearch_internLM2.py rename to minif2f/proofsearch_internLM2.py diff --git a/minif2f/requirements.txt b/minif2f/requirements.txt new file mode 100644 index 0000000..fd4d9d6 --- /dev/null +++ b/minif2f/requirements.txt @@ -0,0 +1,4 @@ +lean-dojo==1.7.0 +torch==2.2.1 +transformers==4.40.1 +vllm==0.4.1 diff --git a/minif2f/scripts/eval_internLM2-plus_20b.sh b/minif2f/scripts/eval_internLM2-plus_20b.sh new file mode 100755 index 0000000..0af6ce6 --- /dev/null +++ b/minif2f/scripts/eval_internLM2-plus_20b.sh @@ -0,0 +1,21 @@ +MAX_ITERS=100 +NUM_SAMPLES=32 +TEMPERATURES="0.0" +TIMEOUT=600 +NUM_SHARDS=8 +DATASET="minif2f-test" +DATA="data/minif2f.jsonl" + +MODEL="internlm/internlm2-math-plus-20b" +NAME="internLM2-plus-20b" + +OUTPUT_DIR="output/${NAME}_minif2f_test" +mkdir -p logs +for SHARD in 0 1 2 3 4 5 6 7 +do + CUDA_VISIBLE_DEVICES=${SHARD} python proofsearch_internLM2-plus.py --dataset-name ${DATASET} \ + --temperatures ${TEMPERATURES} --timeout ${TIMEOUT} --num-shards ${NUM_SHARDS} \ + --shard ${SHARD} --model-name ${MODEL} --max-iters ${MAX_ITERS} --dataset-path ${DATA} \ + --num-samples ${NUM_SAMPLES} --early-stop --output-dir ${OUTPUT_DIR} \ + &> logs/${NAME}_shard${SHARD}.out & +done \ No newline at end of file diff --git a/minif2f/scripts/eval_internLM2-plus_7b.sh b/minif2f/scripts/eval_internLM2-plus_7b.sh new file mode 100755 index 0000000..6d575f4 --- /dev/null +++ b/minif2f/scripts/eval_internLM2-plus_7b.sh @@ -0,0 +1,21 @@ +MAX_ITERS=100 +NUM_SAMPLES=32 +TEMPERATURES="0.0" +TIMEOUT=600 +NUM_SHARDS=8 +DATASET="minif2f-test" +DATA="data/minif2f.jsonl" + +MODEL="internlm/internlm2-math-plus-7b" +NAME="internLM2-plus-7b" + +OUTPUT_DIR="output/${NAME}_minif2f_test" +mkdir -p logs +for SHARD in 0 1 2 3 4 5 6 7 +do + CUDA_VISIBLE_DEVICES=${SHARD} python proofsearch_internLM2-plus.py --dataset-name ${DATASET} \ + --temperatures ${TEMPERATURES} --timeout ${TIMEOUT} --num-shards ${NUM_SHARDS} \ + --shard ${SHARD} --model-name ${MODEL} --max-iters ${MAX_ITERS} --dataset-path ${DATA} \ + --num-samples ${NUM_SAMPLES} --early-stop --output-dir ${OUTPUT_DIR} \ + &> logs/${NAME}_shard${SHARD}.out & +done \ No newline at end of file diff --git a/minif2f/scripts/eval_internLM2-step-prover.sh b/minif2f/scripts/eval_internLM2-step-prover.sh new file mode 100755 index 0000000..c4266ec --- /dev/null +++ b/minif2f/scripts/eval_internLM2-step-prover.sh @@ -0,0 +1,23 @@ +MAX_ITERS=4000 +NUM_SAMPLES=32 + +TEMPERATURES="0.0" # For pass@1 test, beam-search(t=0.0) is often the most performant choice. If pass@32 is wanted, change temperature to 0.7 or 0.9. + +TIMEOUT=1500 +NUM_SHARDS=8 +DATASET="minif2f-test" +DATA="data/minif2f-lean4.7.0.jsonl" + +MODEL="internlm/internlm2-step-prover" +NAME="internLM2-step-prover" + +OUTPUT_DIR="output/${NAME}_minif2f_test" +mkdir -p logs +for SHARD in 0 1 2 3 4 5 6 7 +do + CUDA_VISIBLE_DEVICES=${SHARD} python proofsearch_internLM2-plus.py --dataset-name ${DATASET} \ + --temperatures ${TEMPERATURES} --timeout ${TIMEOUT} --num-shards ${NUM_SHARDS} \ + --shard ${SHARD} --model-name ${MODEL} --max-iters ${MAX_ITERS} --dataset-path ${DATA} \ + --num-samples ${NUM_SAMPLES} --early-stop --output-dir ${OUTPUT_DIR} \ + &> logs/${NAME}_shard${SHARD}.out & +done \ No newline at end of file diff --git a/eval/pretrain/minif2f/scripts/eval_internLM2_20b.sh b/minif2f/scripts/eval_internLM2_20b.sh similarity index 100% rename from eval/pretrain/minif2f/scripts/eval_internLM2_20b.sh rename to minif2f/scripts/eval_internLM2_20b.sh diff --git a/eval/pretrain/minif2f/scripts/eval_internLM2_7b.sh b/minif2f/scripts/eval_internLM2_7b.sh similarity index 100% rename from eval/pretrain/minif2f/scripts/eval_internLM2_7b.sh rename to minif2f/scripts/eval_internLM2_7b.sh