File size: 87,379 Bytes
b6a1ce8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
[
  {
    "id": "combibench_apmo_1991_p2",
    "source": "CombiBench",
    "problem_nl": "Suppose there are 997 points given in a plane. If every two points are joined by a line segment with its midpoint coloured in red, show that there are at least 1991 red points in the plane.",
    "lean_code": "theorem apmo_1991_p2 (points : Fin 997 β†’ ℝ Γ— ℝ) : (red_points points).card β‰₯ 1991 := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "distinctness_missing"
    ],
    "meta_tags": [],
    "gold_explanation": "If points are not distinct, the bound fails (e.g., all points equal), but the NL assumes distinct points."
  },
  {
    "id": "combibench_apmo_2023_p1",
    "source": "CombiBench",
    "problem_nl": "Let $n \\geq 5$ be an integer. Consider $n$ squares with side lengths $1,2, \\ldots, n$, respectively. The squares are arranged in the plane with their sides parallel to the $x$ and $y$ axes. Suppose that no two squares touch, except possibly at their vertices.\\nShow that it is possible to arrange these squares in a way such that every square touches exactly two other squares.",
    "lean_code": "theorem apmo_2023_p1 (n : β„•) (h_n: n β‰₯ 5) :\n    βˆƒ position: Fin n β†’ ℝ Γ— ℝ,\n    (βˆ€ n1 n2 : Fin n, n1 β‰  n2 β†’ Β¬ touches_interior_or_edge ⟨position n1, n1 + 1⟩ ⟨position n2, n2 + 1⟩)\n    ∧ βˆ€m : Fin n, βˆƒ l k, m β‰  l ∧ m β‰  k ∧ l β‰  k\n      ∧ touches ⟨position m, m + 1⟩ ⟨position l, l + 1⟩\n      ∧ touches ⟨position m, m + 1⟩ ⟨position k, k + 1⟩\n      ∧ (βˆ€ j : Fin n, j βˆ‰ [m, l, k] β†’ Β¬ touches ⟨position m, m + 1⟩ ⟨position j, j + 1⟩) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "formalization_error"
    ],
    "error_tags": [
      "encoding_issue",
      "goal_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "The notion of 'touch / touch only at vertices' and the way 'exactly two touches' is counted appears under-specified/possibly mis-modeled; hard to verify without the definitions of touches*."
  },
  {
    "id": "combibench_balticway_2015_p7",
    "source": "CombiBench",
    "problem_nl": "There are 100 members in a ladies' club. Each lady has had tea (in private) with exactly 56 of the other members of the club. The Board, consisting of the 50 most distinguished ladies, have all had tea with one another. Prove that the entire club may be split into two groups in such a way that, within each group, any lady has had tea with any other.",
    "lean_code": "theorem balticway_2015_p7 (had_tea: SimpleGraph (Ladies)) [DecidableRel had_tea.Adj]\n    (h_had_tea_with_56: βˆ€ l : Ladies, had_tea.degree l = 56)\n    (h_board: βˆƒ board : Finset Ladies, board.card = 50 ∧ (βˆ€ l1 l2: board, had_tea.Adj l1 l2)) :\n    βˆƒ group1 group2: Finset Ladies,\n      group1 βˆͺ group2 = Finset.univ\n      ∧ Disjoint group1 group2\n      ∧ (βˆ€ l1 l2: group1, had_tea.Adj l1 l2)\n      ∧ (βˆ€ l1 l2: group2, had_tea.Adj l1 l2) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "library_usage_error"
    ],
    "meta_tags": [
      "tooling_error"
    ],
    "gold_explanation": "βˆ€ l1 l2 : board is ill-typed and does not express a clique; IsClique matches NL."
  },
  {
    "id": "combibench_brualdi_ch10_34",
    "source": "CombiBench",
    "problem_nl": "Let $t$ be a positive integer. Prove that, if there exists a Steiner triple system of index 1 having $v$ varieties, then there exists a Steiner triple system having $v^{t}$ varieties.",
    "lean_code": "theorem brualdi_ch10_34 (t v : β„•) (ht : t > 1): Nonempty (SteinerTripleSystemOfIndOne 2 3 v) β†’\n    Nonempty (SteinerTripleSystemOfIndOne 2 3 (v ^ t)) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "incorrect_spec",
      "encoding_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "NL says 'STS of index 1 β‡’ STS (some index) on v^t'; original conclusion stays in 'index 1' and assumption t>1 vs 'positive integer' is unclear without STS definitions."
  },
  {
    "id": "combibench_brualdi_ch10_60",
    "source": "CombiBench",
    "problem_nl": "Prove that a symmetric, idempotent Latin square has odd order.",
    "lean_code": "theorem brualdi_ch10_60 {n : β„•} (L : LatinSquare n) :\n    IsIdempotentElem L.1 ∧ L.1.IsSymm β†’ Odd n := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "base_case_missing",
      "library_usage_error"
    ],
    "meta_tags": [],
    "gold_explanation": "NL assumes positive order and idempotence on the diagonal; original predicate name is unclear and no positivity guard was present."
  },
  {
    "id": "combibench_brualdi_ch11_5",
    "source": "CombiBench",
    "problem_nl": "Use the pigeonhole principle to prove that a graph of order n β‰₯ 2 always has two vertices of the same degree.",
    "lean_code": "theorem brualdi_ch11_5 {V : Type*} (n : β„•) (h_n: n β‰₯ 2) (G : SimpleGraph (Fin n)) [DecidableRel G.Adj] :\n    βˆƒ v1 v2, v1 β‰  v2 ∧ G.degree v1 = G.degree v2 := by sorry",
    "expected_verdict": "NO",
    "error_primary": null,
    "error_secondary": [],
    "error_tags": [],
    "meta_tags": [
      "unused_parameter",
      "code_style_issue"
    ],
    "gold_explanation": "Removal of an unused type parameter is refactor-only; original statement was still correct."
  },
  {
    "id": "combibench_brualdi_ch14_26",
    "source": "CombiBench",
    "problem_nl": "How many different necklaces are there that contain four red and three blue beads?",
    "lean_code": "structure PreNecklaces where\n  c : Fin 7 β†’ Fin 2\n  deriving Fintype",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "NL requires exactly four red and three blue beads, but the original structure had no count constraint. Note: the proposed fix with βˆƒ S, S.card = 4 only enforces at-least-4-red, not exactly-4-red."
  },
  {
    "id": "combibench_brualdi_ch1_5",
    "source": "CombiBench",
    "problem_nl": "Find the number of different perfect covers of a 3-by-4 chessboard by dominoes.",
    "lean_code": "theorem brualdi_ch1_5 : Fintype.card PerfectCover = brualdi_ch1_5_solution := by sorry",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "type_mismatch",
      "encoding_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "Refactor to explicit domino modeling and specialization; original already fixed board size, so correctness is unclear."
  },
  {
    "id": "combibench_brualdi_ch2_36",
    "source": "CombiBench",
    "problem_nl": "Determine the total number of combinations (of any size) of a multiset of objects of $k$ different types with finite repetition numbers $n_1, n_2, \\ldots, n_k$, respectively.",
    "lean_code": "theorem brualdi_ch2_36 {k : β„•} (n : Fin k β†’ β„•) (sols : Finset (Fin k β†’ β„•)) (h_sols : βˆ€ f, f ∈ sols ↔ (βˆ€ i, f i ≀ n i)) : sols.card = ((fun n => (βˆ‘ i : Fin k, (n i + 1))) : (Fin k β†’ β„•) β†’ β„•) n := by sorry",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "wrong_operator"
    ],
    "meta_tags": [],
    "gold_explanation": "The number of combinations of a multiset with repetition bounds n_i is the product ∏(n_i+1), not the sum βˆ‘(n_i+1). Sum gives wrong answer for any k>1."
  },
  {
    "id": "combibench_brualdi_ch2_6",
    "source": "CombiBench",
    "problem_nl": "How many integers greater than 5400 have both of the following properties? (a) The digits are distinct. (b) The digits 2 and 7 do not occur.",
    "lean_code": "theorem brualdi_ch2_6 (s : Finset β„•)\n    (hs0 : βˆ€ n ∈ s, n > 5400)\n    (hs1 : βˆ€ n ∈ s, (Nat.digits 10 n).Nodup)\n    (hs2 : βˆ€ n ∈ s, 2 βˆ‰ (Nat.digits 10 n) ∧ 7 βˆ‰ (Nat.digits 10 n)) :\n    s.card = brualdi_ch2_6_solution := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Before only required s subset of valid integers, so s.card is not determined; need iff."
  },
  {
    "id": "combibench_brualdi_ch3_18",
    "source": "CombiBench",
    "problem_nl": "Prove that of any five points chosen within a square of side length 2 , there are two whose distance apart is at most $\\sqrt{2}$.",
    "lean_code": "theorem brualdi_ch3_18\n    (points : Fin 5 β†’ Set.Icc (0 : ℝ) 2 Γ— Set.Icc (0 : ℝ) 2) :\n    βˆƒ i j, i β‰  j ∧ Dist.dist (points i) (points j) ≀ √2 := by sorry",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "type_mismatch",
      "paper_vs_lean_semantics"
    ],
    "meta_tags": [
      "tooling_error"
    ],
    "gold_explanation": "Original used Set.Icc Γ— Set.Icc which is ill-typed. Also ℝ×ℝ would have wrong metric (sup not Euclidean). EuclideanSpace is correct. Expert confirmed (Joseph Myers)."
  },
  {
    "id": "combibench_brualdi_ch4_35",
    "source": "CombiBench",
    "problem_nl": "The complement $\\bar{A}$ of an $r$-subset $A$ of $\\{1,2, \\ldots, n\\}$ is the $(n-r)$-subset of $\\{1,2, \\ldots, n\\}$, consisting of all those elements that do not belong to $A$. Let $M=\\binom{n}{r}$, the number of $r$-subsets and, at the same time, the number of $(n-r)$ subsets of $\\{1,2, \\ldots, n\\}$. Prove that, if $A_{1}, A_{2}, A_{3}, \\ldots, A_{M}$ are the $r$-subsets in lexicographic order, then $\\overline{A_{M}}, \\ldots, \\overline{A_{3}}, \\overline{A_{2}}, \\overline{A_{1}}$ are the $(n-r)$-subsets in lexicographic order.",
    "lean_code": "theorem brualdi_ch4_35 (r n M : β„•) (hM : M = ((@Finset.univ (Fin n)).powersetCount r).card)\n    (A : Fin M β†’ (Finset.powersetCount r (@Finset.univ (Fin M) _))) :\n    βˆ€ i j, (List.Lex (fun x1 x2 : Fin M => x1 ≀ x2)\n    (Finset.sort (Β· ≀ Β·) (A i)) (Finset.sort (Β· ≀ Β·) (A j))) β†’\n    (List.Lex (fun x1 x2 : Fin M => x1 ≀ x2)\n    (Finset.sort (Β· ≀ Β·) (A j)ᢜ) (Finset.sort (Β· ≀ Β·) (A i)ᢜ)) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [],
    "error_tags": [
      "type_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Statement is about r-subsets of {1..n}, but before used Fin M elements and lex order on M, so the domain is wrong."
  },
  {
    "id": "combibench_brualdi_ch4_59",
    "source": "CombiBench",
    "problem_nl": "Let $n \\geq 2$ be an integer. Prove that the total number of inversions of all $n$ ! permutations of $1,2, \\ldots, n$ equals $\\frac{1}{2} n!\\binom{n}{2}=n!\\frac{n(n-1)}{4}$ (Hint: Pair up the permutations so that the number of inversions in each pair is $\\frac{n(n-1)}{2}$.)",
    "lean_code": "def invNum {n : β„•} (Οƒ : Equiv.Perm (Fin n)) : β„• :=\n  βˆ‘ x ∈ Equiv.Perm.finPairsLT n, if Οƒ x.fst ≀ Οƒ x.snd then 0 else 1",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "wrong_operator"
    ],
    "meta_tags": [],
    "gold_explanation": "Before counted inversions (pairs where Οƒ(i) > Οƒ(j) for i < j). After counts non-inversions. Both give same sum over all permutations due to symmetry, so theorem remains correct either way."
  },
  {
    "id": "combibench_brualdi_ch4_9",
    "source": "CombiBench",
    "problem_nl": "Show that the largest number of inversions of a permutation of ${1, 2, ... , n}$ equals $\\frac{n(n -1)}{2}$.",
    "lean_code": "def invNum {n : β„•} (Οƒ : Equiv.Perm (Fin n)) : β„• :=\n  βˆ‘ x ∈ Equiv.Perm.finPairsLT n, if Οƒ x.fst ≀ Οƒ x.snd then 0 else 1",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "wrong_operator"
    ],
    "meta_tags": [],
    "gold_explanation": "Before counted inversions, after counts non-inversions. Both give same maximum n(n-1)/2 (reverse perm has max inversions = identity has max non-inversions), so theorem correct either way."
  },
  {
    "id": "combibench_brualdi_ch6_9",
    "source": "CombiBench",
    "problem_nl": "Determine the number of integral solutions of the equation $x_{1}+x_{2}+x_{3}+x_{4}=20$ that satisfy $1 \\leq x_{1} \\leq 6,0 \\leq x_{2} \\leq 7,4 \\leq x_{3} \\leq 8,2 \\leq x_{4} \\leq 6$.",
    "lean_code": "theorem brualdi_ch6_9 : {x : Fin 4 β†’ β„• | x 0 ∈ Icc 1 6 ∧ x 1 ∈ Icc 0 7 ∧\n    x 2 ∈ Icc 4 8 ∧ x 3 ∈ Icc 2 6}.ncard = brualdi_ch6_9_solution := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Missing constraint x1+x2+x3+x4=20; before counts all tuples in bounds."
  },
  {
    "id": "combibench_brualdi_ch9_13",
    "source": "CombiBench",
    "problem_nl": "Let $A$ be a matrix with $n$ columns, with integer entries taken from the set $S=\\{1,2, \\ldots, k\\}$. Assume that each integer $i$ in $S$ occurs exactly $n r_{i}$ times in $A$, where $r_{i}$ is an integer. Prove that it is possible to permute the entries in each row of $A$ to obtain a matrix $B$ in which each integer $i$ in $S$ appears $r_{i}$ times in each column.",
    "lean_code": "theorem brualdi_ch9_13 (n m : β„•) (k : β„•+) (A : Matrix (Fin m) (Fin n) β„•)\n    (hA : βˆ€ i j, A i j ∈ Finset.Icc 1 k.1) :\n    βˆƒ (rΟƒ : Fin m β†’ Equiv.Perm (Fin n)), βˆ€ j : Fin n, βˆ€ i ∈ Set.Icc 1 k.1,\n    (βˆ‘ x : Fin m, if A x ((rΟƒ x).symm j) = x then 1 else 0) * n =\n    (βˆ‘ x : Fin m, βˆ‘ y : Fin n, if A x y = i then 1 else 0) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [
      "quantifier_indexing_mismatch",
      "formalization_error"
    ],
    "error_tags": [
      "missing_hypothesis",
      "variable_mismatch",
      "goal_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Before omits the nr_i counting hypothesis and compares A x ... to x instead of i; it does not encode the NL statement."
  },
  {
    "id": "combibench_egmo_2022_p5",
    "source": "CombiBench",
    "problem_nl": "For all positive integers n, k, let f(n, 2k) be the number of ways an n Γ— 2k board can be fully covered by nk dominoes of size 2 Γ— 1. Find all positive integers n such that for every positive integer k, the number f(n, 2k) is odd.",
    "lean_code": "structure PerfectCover (n k : β„•) where\n  d_set : Finset (Domino n k)\n  d_card : d_set.card = n * k\n  covers : βˆ€ i : Fin n Γ— Fin (2 * k), βˆƒ d ∈ d_set, i ∈ d.carrier",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "encoding_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "PerfectCover uses Finset of labeled Dominos and distinguishes two squares of each domino. Count is multiplied by (nk)!Β·2^(nk). Problem asks when count is odd, so this bug matters. Expert confirmed (Joseph Myers)."
  },
  {
    "id": "combibench_hackmath_3",
    "source": "CombiBench",
    "problem_nl": "How many four-digit numbers can be formed from the numbers 3 5 8 9 if they are not allowed to be repeated?",
    "lean_code": "theorem hackmath_3 (sol : Finset β„•)\n    (h_sol : βˆ€ s ∈ sol, 1000 ≀ s ∧ s ≀ 9999 ∧ (Nat.digits 10 s).toFinset = {3, 5, 8, 9}) :\n    sol.card = hackmath_3_solution := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Before only required sol subset of valid numbers, so sol.card is not fixed; need iff."
  },
  {
    "id": "combibench_hackmath_4",
    "source": "CombiBench",
    "problem_nl": "How many people must be in a group for at least two of them to be born in the same month?",
    "lean_code": "theorem hackmath_4 : IsLeast {n | βˆ€ f : Fin n β†’ Fin 12, βˆƒ a b, f a = f b} hackmath_4_solution := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "distinctness_missing"
    ],
    "meta_tags": [],
    "gold_explanation": "Without a β‰  b, the pigeonhole condition is trivially satisfied by taking a=b, so the least n is wrong."
  },
  {
    "id": "combibench_hackmath_8",
    "source": "CombiBench",
    "problem_nl": "A ferry with a capacity of 10 people takes a group of 13 men and 7 women across a river. Find the number of ways in which the group may be taken across the if all women go on the first group.",
    "lean_code": "theorem hackmath_8 (sols : Finset ((Fin 13 β†’ Fin 2) Γ— (Fin 7 β†’ Fin 2)))\n    (h_women : βˆ€ f ∈ sols, βˆ€ i, f.2 i = 0)\n    (h_sols : βˆ€ f, f ∈ sols ↔ βˆ€ k, ((List.ofFn f.1).count k  + (List.ofFn f.2).count k = 10)) :\n    sols.card = hackmath_8_solution := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Women constraint was outside the membership iff, so sols could be any subset; NL needs the exact set."
  },
  {
    "id": "combibench_imo_2000_p4",
    "source": "CombiBench",
    "problem_nl": "A magician has one hundred cards numbered $1$ to $100$. He puts them into three boxes, a red one, a white one and a blue one, so that each box contains at least one card. A member of the audience selects two of the three boxes, chooses one card from each and announces the sum of the numbers on the chosen cards. Given this sum, the magician identifies the box from which no card has been chosen. How many ways are there to put all the cards into the boxes so that this trick always works? (Two ways are considered different if at least one card is put into a different box.)",
    "lean_code": "theorem imo_2000_p4 (good_allocations : Finset Allocation)\n    (h : βˆ€ f ∈ good_allocations, βˆƒ (t : Trick), trick_works f t) :\n    good_allocations.card = imo_2000_p4_solution := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [
      "domain_mismatch"
    ],
    "error_tags": [
      "missing_hypothesis",
      "incomplete_spec",
      "domain_of_variables_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Cards should be 1..100 and good_allocations should be exactly surjective allocations with a working trick; before is underconstrained and off by domain."
  },
  {
    "id": "combibench_imo_2005_p6",
    "source": "CombiBench",
    "problem_nl": "In a mathematical competition, in which 6 problems were posed to the participants, every two of these problems were solved by more than 2/5 of the contestants. Moreover, no contestant solved all the 6 problems. Show that there are at least 2 contestants who solved exactly 5 problems each.",
    "lean_code": "theorem imo_2005_p6 {participants : Type} [Fintype participants] [DecidableEq participants]\n    (solved : Fin 6 β†’ Finset participants)\n    (h : βˆ€ i j, i β‰  j β†’ (solved i ∩ solved j).card > (2 * Fintype.card participants : ℝ) / 5)\n    (h' : βˆ€ i, (solved i).card < Fintype.card participants) :\n    βˆƒ s : Finset participants, s.card β‰₯ 2 ∧\n    (βˆ€ i ∈ s, βˆƒ p : Finset (Fin 6), p.card = 5 ∧ βˆ€ j, j ∈ p ↔ i ∈ solved j) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [],
    "error_tags": [
      "quantifier_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "NL says each participant missed at least one problem; original only said each problem had someone who missed it."
  },
  {
    "id": "combibench_imo_2010_p5",
    "source": "CombiBench",
    "problem_nl": "Each of the six boxes $B_1$, $B_2$, $B_3$, $B_4$, $B_5$, $B_6$ initially contains one coin. The following operations are allowed: Type 1) Choose a non-empty box $B_j$, $1\\leq j \\leq 5$, remove one coin from $B_j$ and add two coins to $B_{j+1}$; Type 2) Choose a non-empty box $B_k$, $1\\leq k \\leq 4$, remove one coin from $B_k$ and swap the contents (maybe empty) of the boxes $B_{k+1}$ and $B_{k+2}$. Determine if there exists a finite sequence of operations of the allowed types, such that the five boxes $B_1$, $B_2$, $B_3$, $B_4$, $B_5$ become empty, while box $B_6$ contains exactly $2010^{2010^{2010}}$ coins.",
    "lean_code": "def op22 : Boxes β†’ Boxes\n  | ⟨b1, b2, b3, b4, b5, b6⟩ => ⟨b1, b2 - 4, b4, b3, b5, b6⟩",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "wrong_constant"
    ],
    "meta_tags": [],
    "gold_explanation": "Type-1 operation removes one coin, but op22 subtracted 4; constant was wrong."
  },
  {
    "id": "combibench_imo_2014_p2",
    "source": "CombiBench",
    "problem_nl": "Let $n\\ge2$ be an integer. Consider an $n\\times n$ chessboard consisting of $n^2$ unit squares. A configuration of $n$ rooks on this board is $\\textit{peaceful}$ if every row and every column contains exactly one rook. Find the greatest positive integer $k$ such that, for each peaceful configuration of $n$ rooks, there is a $k\\times k$ square which does not contain a rook on any of its $k^2$ squares.",
    "lean_code": "theorem imo_2014_p2 (n : β„•) (hn : n β‰₯ 2) :\n    IsGreatest {(k : β„•) | (k > 0) ∧ βˆ€ r : peaceful_rooks n, βˆƒ i j : Fin n,\n    i.val + k - 1 < n ∧ i.val + k - 1 < n ∧\n    βˆ€ m n, m.val < k ∧ n.val < k ∧ r.carrier (i + m) (j + n) = false}\n    (imo_2014_p2_solution n) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "formalization_error",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "connective_mismatch",
      "variable_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Original required m<k ∧ n<k for all m,n, which is impossible; implication matches NL. Also had duplicated i.val + k - 1 < n where second should be j.val."
  },
  {
    "id": "combibench_imo_2014_p6",
    "source": "CombiBench",
    "problem_nl": "A set of lines in the plane is in general position if no two are parallel and no three pass through the same point. A set of lines in general position cuts the plane into regions, some of which have finite area; we call these its finite regions. Prove that for all sufficiently large n, in any set of n lines in general position it is possible to colour at least √n of the lines blue in such a way that none of its finite regions has a completely blue boundary.",
    "lean_code": "def finite_regions (S : Set (ℝ Γ— ℝ)) (L : Finset (ℝ Γ— ℝ Γ— ℝ)) : Prop :=\n  S.Nonempty ∧ Bornology.IsBounded S ∧\n  βˆ€ l ∈ L, (βˆ€ p ∈ S, on_line p l) ∨ (βˆ€ p ∈ S, same_side_of_line p l)",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "encoding_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "finite_regions is true for any singleton point, making the theorem trivially false. Should define actual finite regions created by the line arrangement. Expert confirmed (Joseph Myers)."
  },
  {
    "id": "combibench_imo_2015_p1",
    "source": "CombiBench",
    "problem_nl": "We say that a finite set $\\mathcal{S}$ in the plane is balanced if, for any two different points $A$, $B$ in $\\mathcal{S}$, there is a point $C$ in $\\mathcal{S}$ such that $AC=BC$. We say that $\\mathcal{S}$ is centre-free if for any three points $A$, $B$, $C$ in $\\mathcal{S}$, there is no point $P$ in $\\mathcal{S}$ such that $PA=PB=PC$. (1) Show that for all integers $n\\geq 3$, there exists a balanced set consisting of $n$ points. (1) Determine all integers $n\\geq 3$ for which there exists a balanced centre-free set consisting of $n$ points.",
    "lean_code": "theorem imo_2015_p1 : (βˆ€ n β‰₯ 3, βˆƒ (S : Finset (ℝ Γ— ℝ)), balanced S ∧ S.card = n) ∧\n    {n | n β‰₯ 3 ∧ (βˆƒ (S : Finset (ℝ Γ— ℝ)), balanced S ∧ centre_free S ∧ S.card = n)} =\n    imo_2015_p1_solution := by sorry",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "type_mismatch",
      "paper_vs_lean_semantics"
    ],
    "meta_tags": [],
    "gold_explanation": "ℝ Γ— ℝ uses sup/L∞ metric in Mathlib, not Euclidean. For balanced/centre-free sets with distance conditions, this fundamentally changes the problem. Expert confirmed (Joseph Myers)."
  },
  {
    "id": "combibench_imo_2017_p3",
    "source": "CombiBench",
    "problem_nl": "A hunter and an invisible rabbit play a game in the Euclidean plane. The rabbit's starting point, $A_0$, and the hunter's starting point, $B_0$, are the same. After $n-1$ rounds of the game, the rabbit is at point $A_{n-1}$ and the hunter is at point $B_{n-1}$. In the nth round of the game, three things occur in order. (i) The rabbit moves invisibly to a point $A_n$ such that the distance between $A_{n-1}$ and $A_n$ is exactly 1. (ii) A tracking device reports a point $P_n$ to the hunter. The only guarantee provided by the tracking device is that the distance between $P_n$ and $A_n$ is at most 1. (iii) The hunter moves visibly to a point $B_n$ such that the distance between $B_{n-1}$ and $B_n$ is exactly 1. Is it always possible, no matter how the rabbit moves, and no matter what points are reported by the tracking device, for the hunter to choose her moves so that after $10^9$ rounds she can ensure that the distance between her and the rabbit is at most 100?",
    "lean_code": "theorem imo_2017_p3 (start : ℝ Γ— ℝ) : imo_2017_p3_solution =\n    βˆ€ (A : β„• β†’ (Fin 2 β†’ ℝ)), A 0 = ![start.1, start.2] β†’ βˆ€ n, dist (A n) (A (n + 1)) = 1 β†’\n    (βˆƒ (P : β„• β†’ (Fin 2 β†’ ℝ)), βˆ€ n > 0, dist (P n) (A n) ≀ 1) β†’\n    (βˆƒ (B : β„• β†’ (Fin 2 β†’ ℝ)), B 0 = ![start.1, start.2] ∧ βˆ€ n, dist (B n) (B (n + 1)) = 1 ∧\n    dist (A (10 ^ 9)) (B (10 ^9)) ≀ 100) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "type_mismatch",
      "paper_vs_lean_semantics"
    ],
    "meta_tags": [],
    "gold_explanation": "ℝ Γ— ℝ uses sup/L∞ metric in Mathlib, not Euclidean. Hunter/rabbit game with 'distance exactly 1' has different meaning with wrong metric. Expert confirmed (Joseph Myers)."
  },
  {
    "id": "combibench_imo_2017_p5",
    "source": "CombiBench",
    "problem_nl": "An integer $N \\ge 2$ is given. A collection of $N(N + 1)$ soccer players, no two of whom are of the same height, stand in a row. Sir Alex wants to remove $N(N - 1)$ players from this row leaving a new row of $2N$ players in which the following $N$ conditions hold: ($1$) no one stands between the two tallest players, ($2$) no one stands between the third and fourth tallest players, $\\cdots$ ($N$) no one stands between the two shortest players. Show that this is always possible.",
    "lean_code": "theorem imo_2017_p5 (N : β„•) (h_N : N β‰₯ 2) (height : Perm (Fin (N * (N + 1)))) :\n    βˆƒ kept : Fin (2 * N) β†ͺo Fin (N * (N + 1)),\n    βˆ€ i j, Even #{l | height (kept l) < height (kept i)} β†’\n      (βˆ€ k, height (kept i) < height (kept k) ↔ height (kept j) ≀ height (kept k)) β†’\n      (βˆ€ k, kept i < kept k ↔ kept j ≀ kept k) ∨ (βˆ€ k, kept j < kept k ↔ kept i ≀ kept k) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "formalization_error"
    ],
    "error_tags": [
      "encoding_issue",
      "goal_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Original ordering condition replaced with count-of-shorter/no-between constraint; unclear which matches NL."
  },
  {
    "id": "combibench_imo_2018_p3",
    "source": "CombiBench",
    "problem_nl": "An anti-Pascal triangle is an equilateral triangular array of numbers such that, except for the numbers in the bottom row, each number is the absolute value of the difference of the two numbers immediately below it. For example, the following is an anti-Pascal triangle with four rows which contains every integer from $1$ to $10$ \\[4\\]\\[2\\quad 6\\]\\[5\\quad 7 \\quad 1\\] \\[8\\quad 3 \\quad 10 \\quad 9\\] Does there exist an anti-Pascal triangle with $2018$ rows which contains every integer from $1$ to $1 + 2 + 3 + \\dots + 2018$?",
    "lean_code": "theorem imo_2018_p3 : imo_2018_p3_solution = βˆƒ l, IsAntiPascal l ∧\n    List.range' 1 (βˆ‘ i ∈ Finset.Icc 1 2018, i) = List.insertionSort (Β· ≀ Β·) (List.flatten l) := by",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "encoding_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "Triangle representation changed from lists to indexed function; likely modeling fix but not clearly wrong."
  },
  {
    "id": "combibench_imo_2018_p4",
    "source": "CombiBench",
    "problem_nl": "A site is any point (x, y) in the plane such that x and y are both positive integers less than or equal to 20. Amy and Ben take turns placing stones. On her turn, Amy places a red stone such that the distance between any two red stones is not equal to √5. Find the greatest K such that Amy can ensure she places at least K red stones.",
    "lean_code": "-- Site defined as subset of ℝ Γ— ℝ\n-- Problem: ℝ Γ— ℝ uses sup/L∞ metric in Mathlib, not Euclidean\n-- dist((1,0), (2,1)) = max(1,1) = 1 with sup metric\n-- dist((1,0), (2,1)) = √(1Β²+1Β²) = √2 with Euclidean\n-- The \"distance √5\" condition has wrong meaning!",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "type_mismatch",
      "paper_vs_lean_semantics"
    ],
    "meta_tags": [],
    "gold_explanation": "ℝ×ℝ (Prod) uses sup/L∞ metric in Mathlib. The problem requires Euclidean distance for 'distance not equal to √5' (knight's move). With sup metric, √5 distance means something completely different. Expert confirmed (Joseph Myers)."
  },
  {
    "id": "combibench_imo_2023_p5",
    "source": "CombiBench",
    "problem_nl": "A Japanese triangle consists of 1 + 2 + ... + n circles arranged in an equilateral triangular shape such that for each i = 1, 2, ..., n, the ith row contains exactly i circles. Each circle is colored red or blue. A ninja path starts from a top-row circle and in each step goes to one of the two circles immediately below. Find the greatest k such that in each Japanese triangle there is a ninja path containing at least k red circles.",
    "lean_code": "def triangleGraph (n : β„•+) : Digraph (Index n) where\n  Adj p q :=\n    p.atBottomLeft q ∨ p.atBottomRight q ∨\n    q.atBottomLeft p ∨ q.atBottomRight p",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "encoding_issue",
      "wrong_constant"
    ],
    "meta_tags": [],
    "gold_explanation": "Digraph edges go both up and down, but ninja paths must go down only. Also Real.log is natural log, not logβ‚‚ as needed. Expert confirmed (Joseph Myers)."
  },
  {
    "id": "combibench_imosl_2011_c6",
    "source": "CombiBench",
    "problem_nl": "Let $n$ be a positive integer and let $W=\\ldots x_{-1} x_{0} x_{1} x_{2} \\ldots$ be an infinite periodic word consisting of the letters $a$ and $b$. Suppose that the minimal period $N$ of $W$ is greater than $2^{n}$. A finite nonempty word $U$ is said to appear in $W$ if there exist indices $k \\leq \\ell$ such that $U=x_{k} x_{k+1} \\ldots x_{\\ell}$. A finite word $U$ is called ubiquitous if the four words $U a, U b, a U$, and $b U$ all appear in $W$. Prove that there are at least $n$ ubiquitous finite nonempty words.",
    "lean_code": "theorem imosl_2011_c6 (W : β„€ β†’ Fin 2) (n : β„•+) (N : β„•) (hN : 2 ^ n.1 < N)\n    (hW : Function.Periodic W N) (hW' : βˆ€ N' < N, Β¬ Function.Periodic W N') :\n    βˆƒ (x : Fin n β†ͺ (Ξ£ k, Fin k β†’ Fin 2)), (βˆ€ i, (x i).1 β‰  0) ∧ (βˆ€ i, ubiquitous W (x i)) := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "Period 0 always makes a function periodic, so forbidding all N'<N including 0 makes the premise impossible."
  },
  {
    "id": "combibench_imosl_2015_c6",
    "source": "CombiBench",
    "problem_nl": "Let $S$ be a nonempty set of positive integers. We say that a positive integer $n$ is clean if it has a unique representation as a sum of an odd number of distinct elements from $S$. Prove that there exist infinitely many positive integers that are not clean.",
    "lean_code": "theorem imosl_2015_c6 (S : Set β„•+) : βˆ€ (N : β„•), βˆƒ (m : β„•), N < m ∧ Β¬ clean S m := by sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "NL assumes S nonempty; original allowed empty S (statement may still hold), so mismatch is unclear."
  },
  {
    "id": "combibench_usamo_2000_p4",
    "source": "CombiBench",
    "problem_nl": "Find the smallest positive integer $n$ such that if $n$ squares of a $1000 \\times 1000$ chessboard are colored, then there will exist three colored squares whose centers form a right triangle with sides parallel to the edges of the board.",
    "lean_code": "theorem usamo_2000_p4 : IsLeast colored_card usamo_2000_p4_solution.1 := by sorry",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [],
    "error_tags": [
      "quantifier_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "NL requires all size-n colorings force a right triangle; original only required existence of one such coloring."
  },
  {
    "id": "formalmath_aime_all_2013_II_1",
    "source": "FormalMath",
    "problem_nl": "Time is converted to metric system: 10 metric hours per day, 100 metric minutes per hour. A person wants to wake at the equivalent of 6:36 AM. Find 100A+10B+C where A:BC is the metric time.",
    "lean_code": "import Mathlib.Tactic\n\ntheorem aime_all_2013_II_1 (A B C : β„•) (hβ‚€ : 0 ≀ A ∧ A < 10) (h₁ : 0 ≀ B ∧ B < 10)\n    (hβ‚‚ : 0 ≀ C ∧ C < 10) (h₃ : (6 * 100 + 36) * 10 / (24 * 60) = 100 * A + 10 * B + C) :\n    100 * A + 10 * B + C = 275 := by",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "misuse_of_concept",
      "wrong_constant"
    ],
    "meta_tags": [],
    "gold_explanation": "Uses Nat division so 6360/1440 truncates to 4; also uses 6*100+36 instead of 6*60+36 for 6:36 AM. Hypothesis can force 100A+10B+C=4, not 275."
  },
  {
    "id": "formalmath_aime_all_2017_I_10",
    "source": "FormalMath",
    "problem_nl": "Let z be the UNIQUE complex number with properties that (z₃-z₁)/(zβ‚‚-z₁)Β·(z-zβ‚‚)/(z-z₃) is real and Im(z) is greatest possible. Find Re(z).",
    "lean_code": "import Mathlib\n\ntheorem aime_all_2017_I_10 (z1 z2 z3 z : β„‚) ... (hzz : βˆƒ r : ℝ, ...) (hzim : βˆ€ z', ... β†’ z.im β‰₯ z'.im) : z.re = 56 := by",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "NL specifies a unique maximizer z; the Lean statement (as sketched) does not encode unique existence (βˆƒ!) / a uniqueness hypothesis, only properties of a given z."
  },
  {
    "id": "formalmath_olymid-ref-base_3054",
    "source": "FormalMath",
    "problem_nl": "Find all positive integers k and n such that k⁴ + n² is divisible by 7^k - 3^n. Prove that the answer is: (k, n) = (2, 4)",
    "lean_code": "import Mathlib\n\ntheorem olymid_ref_base_3054 (k n : β„•) :\n    k > 0 ∧ n > 0 ∧ 7^k - 3^n ∣ k^4 + n^2 ↔ (k = 2 ∧ n = 4) := by",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [],
    "error_tags": [
      "truncation_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "In β„•, 7^k - 3^n truncates to 0 when 3^n > 7^k; at (2,4) denominator becomes 0, so '0 ∣ 32' is false and the claimed ↔ fails."
  },
  {
    "id": "formalmath_olymid-ref-base_4847",
    "source": "FormalMath",
    "problem_nl": "Let t=2016 and p=ln 2. Evaluate βˆ‘_{k=1}^∞ (1 - βˆ‘_{n=0}^{k-1} e^{-t}t^n/n!) (1-p)^{k-1} p",
    "lean_code": "import Mathlib\n\nopen Real\n\ntheorem olymid_ref_base_4847 (t : ℝ) (p : ℝ) (ht : t = 2016) (hp : p = log 2) :\n    βˆ‘' k : β„•, ((1 - βˆ‘ n in Finset.range k, exp (-t) * t ^ n / Nat.factorial n) * (1 - p) ^ (k - 1) * p) =\n    1 - (1 / 2) ^ 2016 := by",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [],
    "error_tags": [
      "indexing_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "NL sums k=1..∞ but Lean uses βˆ‘' k : β„• starting at k=0, adding an extra k=0 term (and k-1 is Nat subtraction, so at k=0 it becomes 0, not βˆ’1)."
  },
  {
    "id": "formalmath_olymid-ref-base_5274",
    "source": "FormalMath",
    "problem_nl": "Find the smallest positive integer n for which 1!2!β‹―(n-1)! > n!Β²",
    "lean_code": "import Mathlib\n\nopen Nat BigOperators\n\ntheorem olymid_ref_base_5274 :\n    IsLeast {n : β„• | 0 < n ∧ ∏ i in Finset.Icc 1 (n - 1), i ! > (n !) ^ 2} 8 := by",
    "expected_verdict": "NO",
    "error_primary": null,
    "error_secondary": [],
    "error_tags": [],
    "meta_tags": [],
    "gold_explanation": "This appears correctly encoded: product over Icc 1 (n-1) is 1!β‹―(nβˆ’1)!, n>0 is enforced, and 8 is indeed the smallest n satisfying the inequality."
  },
  {
    "id": "formalmath_olymid-ref-base_6282",
    "source": "FormalMath",
    "problem_nl": "Let n β‰₯ 3. Let a_1 < a_2 < ... < a_n be positive reals with a_{n+1} = a_1. Prove βˆ‘_{k=1}^n (a_k/a_{k+1}) > βˆ‘_{k=1}^n (a_{k+1}/a_k).",
    "lean_code": "import Mathlib\n\nopen Real\n\ntheorem olymid_ref_base_6282 {n : β„•} (hn : 3 ≀ n) (a : Fin (n + 1) β†’ ℝ)\n    (ha : StrictMono a) (hpos : βˆ€ i, 0 < a i) (han : a n = a 0) :\n    βˆ‘ k, a k / a (k + 1) > βˆ‘ k, a (k + 1) / a k := by",
    "expected_verdict": "YES",
    "error_primary": "formalization_error",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "premise_translation_error",
      "indexing_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "StrictMono a on Fin(n+1) implies a 0 < … < a n, but also assumes a n = a 0; premises become inconsistent and mis-encode the cyclic condition a_{n+1}=a_1."
  },
  {
    "id": "formalmath_olymid-ref-base_8963",
    "source": "FormalMath",
    "problem_nl": "The Fibonacci numbers F_0, F_1, F_2, ... are defined by F_0=0, F_1=1, F_{n+1}=F_n+F_{n-1}. Given n β‰₯ 2, find the smallest size of a set S of INTEGERS such that for every k=2,...,n there exist x,y ∈ S with x-y=F_k.",
    "lean_code": "import Mathlib\n\ndef fib (n : β„•) : β„• := match n with\n| 0 => 0\n| 1 => 1\n| n + 2 => fib (n + 1) + fib n\n\ntheorem olymid_ref_base_8963 (n : β„•) (hn : 2 ≀ n) :\n    IsLeast {k | βˆƒ S : Finset β„•, S.card = k ∧ βˆ€ k ∈ Finset.Icc 2 n, βˆƒ x ∈ S, βˆƒ y ∈ S, x - y = fib k} (Nat.ceil (n / 2) + 1) := by",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [],
    "error_tags": [
      "type_mismatch",
      "truncation_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "NL needs a set of integers and differences xβˆ’y with sign; Lean uses Finset β„• and Nat subtraction x-y, which can't represent negative differences and truncates when y>x."
  },
  {
    "id": "formalmath_olymid_ref_base_2137",
    "source": "FormalMath",
    "problem_nl": "Let a₁,...,a₂₀₁₉ be positive integers. Prove: βˆƒ real x such that aα΅’ = ⌊ixβŒ‹ for all i ∈ {1,...,2019} iff for all i,j with i+j ≀ 2019, aα΅’ + aβ±Ό ≀ aα΅’β‚Šβ±Ό ≀ aα΅’ + aβ±Ό + 1.",
    "lean_code": "import Mathlib\n\ntheorem olymid_ref_base_2137 (a : Fin 2019 β†’ β„€) (ha : βˆ€ i, 0 < a i) :\n    (βˆƒ x : ℝ, βˆ€ i, a i = ⌊i * xβŒ‹) ↔\n    (βˆ€ i j, i + j ≀ 2019 β†’ a i + a j ≀ a (i + j) ∧ a (i + j) ≀ a i + a j + 1) := by",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "domain_of_variables_mismatch",
      "indexing_mismatch",
      "bound_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Uses Fin 2019 indices (includes 0, wraps on addition) but NL uses 1..2019 with ordinary addition; i=0 forces ⌊0*xβŒ‹=0 contradicting positivity, and (i+j) in Fin wraps mod 2019 rather than staying ≀2019."
  },
  {
    "id": "formalmath_omni_theorem_131",
    "source": "FormalMath",
    "problem_nl": "What is the smallest integer n, greater than one, for which the root-mean-square of the first n positive integers is an integer? The RMS is defined as sqrt((a_1Β² + ... + a_nΒ²)/n).",
    "lean_code": "import Mathlib\n\nopen Real\n\nnoncomputable def sumOfSquares (n : β„•) : β„• := βˆ‘ k in Finset.Icc 1 n, k ^ 2\n\ntheorem omni_theorem_131 :\n    IsLeast {n | 1 < n ∧ βˆƒ k : β„€, sqrt (sumOfSquares n / n) = k} 337 := by",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "misuse_of_concept"
    ],
    "meta_tags": [],
    "gold_explanation": "RMS needs real division sqrt((βˆ‘k^2)/n), but Lean computes Nat division sumOfSquares n / n first (truncates) then coerces to ℝ for sqrt."
  },
  {
    "id": "formalmath_omni_theorem_1586",
    "source": "FormalMath",
    "problem_nl": "Let {a_n}_{nβ‰₯1} be arithmetic and {g_n}_{nβ‰₯1} be geometric such that first four terms of {a_n+g_n} are 0,0,1,0. Find the 10th term.",
    "lean_code": "import Mathlib\n\ntheorem omni_theorem_1586 (a g : β„• β†’ ℝ) (ha : βˆƒ d, βˆ€ n, a n = a 1 + d * (n - 1))\n    (hg : βˆƒ r, βˆ€ n, g n = g 1 * r ^ (n - 1)) (h : a 1 + g 1 = 0) (h' : a 2 + g 2 = 0)\n    (h'' : a 3 + g 3 = 1) (h''' : a 4 + g 4 = 0) :\n    a 10 + g 10 = -54 := by",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [],
    "error_tags": [
      "domain_of_variables_mismatch",
      "truncation_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "Sequences are intended for nβ‰₯1, but ha/hg quantify βˆ€ n:β„• with (n-1) using Nat subtraction; at n=0 this forces a0=a1 and g0=g1, adding unintended constraints."
  },
  {
    "id": "formalmath_omni_theorem_2830",
    "source": "FormalMath",
    "problem_nl": "Find quadratic polynomials f(x) = axΒ² + bx + c where a,b,c are positive integers, p<q are primes, f(p)=f(q)=17, f(p+q)=47. Find sum of f(pq) mod 100.",
    "lean_code": "import Mathlib\n\ntheorem omni_theorem_2830 :\n    (βˆ‘αΆ  x ∈ {x | βˆƒ a b c p q : β„•, a > 0 ∧ p.Prime ∧ q.Prime ∧ p < q ∧ x = a * (p * q) ^ 2 + b * (p * q) + c ∧\n      a * p ^ 2 + b * p + c = 17 ∧ a * q ^ 2 + b * q + c = 17 ∧ a * (p + q) ^ 2 + b * (p + q) + c = 47}, x) % 100 = 71 := by",
    "expected_verdict": "YES",
    "error_primary": "problem_statement_error",
    "error_secondary": [],
    "error_tags": [
      "unprovable_problem"
    ],
    "meta_tags": [],
    "gold_explanation": "As written ('a,b,c are positive integers'), the constraints force b = βˆ’a(p+q) < 0, so no solutions exist; likely the NL intended b to be an integer (not necessarily positive)."
  },
  {
    "id": "formalmath_omni_theorem_2926",
    "source": "FormalMath",
    "problem_nl": "What is the smallest integer that can be placed in the box so that 1/2 < β–‘/9? Prove that the answer is: 5",
    "lean_code": "import Mathlib\n\ntheorem omni_theorem_2926 : IsLeast {n | 1 / 2 < n / 9} 5 := by",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "misuse_of_concept"
    ],
    "meta_tags": [],
    "gold_explanation": "Inferred type is β„•, so 1/2=0 and n/9 is Nat division; predicate becomes 0 < n/9, whose least solution is 9, not 5."
  },
  {
    "id": "formalmath_omni_theorem_4006",
    "source": "FormalMath",
    "problem_nl": "Let S(n) be the sum of the digits of the positive integer n. Find all n such that S(n)(S(n)-1) = n-1. Prove that the answer is: n ∈ {1, 13, 43, 91, 157}",
    "lean_code": "import Mathlib\n\ndef S : β„• β†’ β„•\n| n => (Nat.digits 10 n).sum\n\ntheorem omni_theorem_4006 {n : β„•} :\n    (S n) * (S n - 1) = n - 1 ↔ n = 1 ∨ n = 13 ∨ n = 43 ∨ n = 91 ∨ n = 157 := by",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "base_case_missing"
    ],
    "meta_tags": [],
    "gold_explanation": "NL says positive n, but Lean allows n=0; then (S 0)*(S 0 - 1)=0=(0-1) in β„•, so LHS true while RHS 'n∈{1,13,43,91,157}' is false."
  },
  {
    "id": "formalmath_quantitative_reasoning_zh_blue_41",
    "source": "FormalMath",
    "problem_nl": "Given M = {x | x = aΒ² + 1, a ∈ β„•*}, N = {x | x = bΒ² - 4b + 5, b ∈ β„•*}, prove M ⊊ N. The proof shows 1 ∈ N (at b=2: 4-8+5=1) but 1 βˆ‰ M.",
    "lean_code": "import Mathlib\n\ntheorem quantitative_reasoning_zh_blue_41 :\n  {x : β„• | βˆƒ a : β„•, 0 < a ∧ x = a^2 + 1} βŠ‚ {x : β„• | βˆƒ b : β„•, 0 < b ∧ x = b^2 - 4 * b + 5} := by",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "truncation_issue",
      "encoding_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "b^2 - 4*b + 5 is computed in β„• with truncating subtraction; the NL witness b=2 gives 1, but Lean gives 5, so N is not the intended set."
  },
  {
    "id": "formalmath_quantitative_reasoning_zh_blue_891",
    "source": "FormalMath",
    "problem_nl": "Given 0 ≀ x_0 < 1, the sequence {x_n} satisfies x_{n+1} = 2x_n - 1 if 1/2 ≀ x_n < 1, else x_{n+1} = 2x_n if 0 ≀ x_n < 1/2. If x_5 = x_0, how many such sequences exist? Answer: 31",
    "lean_code": "import Mathlib\n\nopen Real\nopen scoped BigOperators\n\ntheorem quantitative_reasoning_zh_blue_891 :\n  Set.ncard {x : β„• β†’ ℝ | βˆƒ x0 : ℝ, 0 ≀ x0 ∧ x0 < 1 ∧\n    (βˆ€ n : β„•, x (n + 1) = if 1 / 2 ≀ x n ∧ x n < 1 then 2 * x n - 1 else 2 * x n) ∧\n    x 5 = x0} = 31 := by",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Does not enforce x 0 = x0 and does not maintain the invariant x n ∈ [0,1); the piecewise recurrence is only correct under those missing constraints."
  },
  {
    "id": "formalmath_theorem_proving_zh_blue_548",
    "source": "FormalMath",
    "problem_nl": "Find the maximum cardinality of a set S of positive integers ≀100 such that for any two distinct elements a,b ∈ S: (1) there exists c ∈ S with gcd(a,c)=1 and gcd(b,c)=1, and (2) there exists d ∈ S with dβ‰ a, dβ‰ b, gcd(a,d)>1, gcd(b,d)>1. Solution proves |S|_max = 72.",
    "lean_code": "import Mathlib\n\ntheorem algebra_587982 :\n    IsGreatest {n | βˆƒ S : Finset β„•, S.card = n ∧\n      (βˆ€ x ∈ S, x ≀ 100) ∧\n      (βˆ€ a ∈ S, βˆ€ b ∈ S, a β‰  b β†’ βˆƒ c ∈ S, Nat.gcd a c = 1 ∧ Nat.gcd b c = 1) ∧\n      (βˆ€ a ∈ S, βˆ€ b ∈ S, a β‰  b β†’ βˆƒ d ∈ S, d β‰  a ∧ d β‰  b ∧ Nat.gcd a d > 1 ∧ Nat.gcd b d > 1)} 54 := by",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "wrong_constant"
    ],
    "meta_tags": [
      "answer_handling_mismatch"
    ],
    "gold_explanation": "Lean claims the maximum is 54, but the provided solution text claims |S|_max = 72; the constant in IsGreatest is wrong."
  },
  {
    "id": "formalmath_theorem_proving_zh_blue_614",
    "source": "FormalMath",
    "problem_nl": "If the sequence {a_n} satisfies that for any n ∈ β„•*, βˆ‘_{d|n} a_d = 2^n, prove that n | a_n.",
    "lean_code": "import Mathlib\n\ntheorem algebra_56552 {a : β„• β†’ β„•} (ha : βˆ€ n, βˆ‘ d in n.divisors, a d = 2 ^ n) :\n    βˆ€ n, n ∣ a n := by",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "base_case_missing"
    ],
    "meta_tags": [],
    "gold_explanation": "NL quantifies nβˆˆβ„•* but Lean has βˆ€ n including 0; Nat.divisors 0 is empty in Mathlib, so ha 0 would require 0=2^0=1 (inconsistent), making the theorem vacuous."
  },
  {
    "id": "formalmath_theorem_proving_zh_blue_671",
    "source": "FormalMath",
    "problem_nl": "Let F be a finite set of integers satisfying: (1) for any x ∈ F, there exist y,z ∈ F with x = y + z; (2) there exists n ∈ β„•* such that for any 1 ≀ k ≀ n and any x_1,...,x_k ∈ F, we have βˆ‘x_i β‰  0. Prove |F| β‰₯ 2n + 2.",
    "lean_code": "import Mathlib\n\ntheorem theorem_proving_zh_blue_671 {F : Finset β„€} (hF : βˆ€ x ∈ F, βˆƒ y z, x = y + z)\n    (hn : βˆƒ n : β„•, 0 < n ∧ βˆ€ k ∈ Finset.Icc 1 n, βˆ€ x : Fin k β†’ β„€,\n      (βˆ€ i, x i ∈ F) β†’ βˆ‘ i, x i β‰  0) :\n    F.card β‰₯ 2 * n + 2 := by",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [
      "specification_error"
    ],
    "error_tags": [
      "variable_mismatch",
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Conclusion uses free n not bound by the βˆƒn in hn; also hF forgets to require y,z ∈ F (it only states βˆƒ y z with x=y+z)."
  },
  {
    "id": "formalmath_theorem_proving_zh_blue_681",
    "source": "FormalMath",
    "problem_nl": "Let f(m,n) satisfy f(1,n) = f(m,1) = 1 (m,n ∈ β„•*), and when m,n β‰₯ 2, f(m,n) ≀ f(m,n-1) + f(m-1,n). Prove f(m,n) ≀ C(m+n-2, m-1).",
    "lean_code": "import Mathlib\n\ntheorem algebra_539172 {f : β„• β†’ β„• β†’ β„•}\n    (h₁ : βˆ€ n, f 1 n = 1) (hβ‚‚ : βˆ€ m, f m 1 = 1)\n    (h₃ : βˆ€ m n, 2 ≀ m β†’ 2 ≀ n β†’ f m n ≀ f m (n - 1) + f (m - 1) n) :\n    βˆ€ m n, f m n ≀ (m + n - 2).choose (m - 1) := by",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "NL is for m,nβˆˆβ„•* but Lean concludes βˆ€ m n without positivity constraints; this introduces m=0 or n=0 cases where (m+n-2).choose(m-1) and n-1 style terms are not the intended spec."
  },
  {
    "id": "formalmath_u-math_684",
    "source": "FormalMath",
    "problem_nl": "An epidemiological study of the spread of a certain influenza strain that hit a small school population found that the total number of students, P, who contracted the flu t days after it broke out is given by the model P = tΒ² - 12t + 180, where 1 ≀ t ≀ 6. Find the day that 160 students had the flu.",
    "lean_code": "import Mathlib\n\ntheorem u_math_684 (t : β„•) (ht : 1 ≀ t ∧ t ≀ 6) :\n    let P := t ^ 2 - 12 * t + 180\n    P = 160 ↔ t = 2 := by",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [],
    "error_tags": [
      "truncation_issue"
    ],
    "meta_tags": [],
    "gold_explanation": "Uses β„• subtraction in t^2 - 12*t; at t=2, (4-24) truncates to 0 so P=180, not 160, so the ↔ fails."
  },
  {
    "id": "formalmath_u-math_921",
    "source": "FormalMath",
    "problem_nl": "Compute the integral: ∫ -1/(3·sin(x/3)⁢) dx. Answer involves +C.",
    "lean_code": "import Mathlib\n\ntheorem u_math_921 : ∫ x, -1 / (3 * sin (x / 3) ^ 6) =\n    cos (x / 3) / (5 * sin (x / 3) ^ 5) -\n    4 / 15 * (-cos (x / 3) / sin (x / 3) ^ 3 - 2 / tan (x / 3)) + C := by",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "misuse_of_concept",
      "variable_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Lean's '∫ x, …' is a definite integral (not an antiderivative), and the RHS contains free x and free C (autoImplicit/scope bug), so it does not represent '+C' indefinite integration."
  },
  {
    "id": "formalmath_u-math_945",
    "source": "FormalMath",
    "problem_nl": "Compute the integral: ∫ 10/sin(4x)^6 dx",
    "lean_code": "import Mathlib\n\nopen Real Set\nopen scoped BigOperators\n\ntheorem u_math_945 : ∫ x, 10 / sin (4 * x) ^ 6 =\n    - (cot (4 * x)) ^ 5 / 2 - 5 / 2 * cot (4 * x) - 5 / 3 * (cot (4 * x)) ^ 3 + C := by",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "misuse_of_concept",
      "variable_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Same calculus issue: '∫ x, …' is a definite integral, and the RHS contains free x and free C, so it does not formalize an indefinite integral '+C'."
  },
  {
    "id": "proofnet_artin_exercise_11_4_6b",
    "source": "ProofNet",
    "problem_nl": "Prove that $x^2+1$ is irreducible in $\\mathbb{F}_7$",
    "lean_code": "theorem exercise_11_4_6b {F : Type*} [Field F] [Fintype F] (hF : card F = 31) :\n  Irreducible (X ^ 3 - 9 : Polynomial F) := sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [
      "formalization_error"
    ],
    "error_tags": [
      "incorrect_spec",
      "goal_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Original assumes card F = 31 and proves Irreducible (X^3-9), but NL is about F_7 and x^2+1."
  },
  {
    "id": "proofnet_axler_exercise_3_8",
    "source": "ProofNet",
    "problem_nl": "Suppose that $V$ is finite dimensional and that $T \\in \\mathcal{L}(V, W)$. Prove that there exists a subspace $U$ of $V$ such that $U \\cap \\operatorname{null} T=\\{0\\}$ and range $T=\\{T u: u \\in U\\}$.",
    "lean_code": "theorem exercise_3_8 {F V W : Type*} [AddCommGroup V]\n  [AddCommGroup W] [Field F] [Module F V] [Module F W]\n  (L : V β†’β‚—[F] W) :\n  βˆƒ U : Submodule F V, U βŠ“ (ker L) = βŠ₯ ∧\n  (range L = range (domRestrict L U)) := sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "NL assumes V is finite-dimensional, but original Lean omits [FiniteDimensional F V]."
  },
  {
    "id": "proofnet_axler_exercise_6_16",
    "source": "ProofNet",
    "problem_nl": "Suppose $U$ is a subspace of $V$. Prove that $U^{\\perp}=\\{0\\}$ if and only if $U=V$",
    "lean_code": "theorem exercise_6_16 {K V : Type*} [RCLike K] [NormedAddCommGroup V] [InnerProductSpace K V]\n  {U : Submodule K V} :\n  U.orthogonal = βŠ₯  ↔ U = ⊀ := sorry",
    "expected_verdict": "NO",
    "error_primary": null,
    "error_secondary": [],
    "error_tags": [],
    "meta_tags": [],
    "gold_explanation": "No semantic issue: U.orthogonal = bot iff U = top matches 'U^perp = {0} iff U=V'."
  },
  {
    "id": "proofnet_axler_exercise_6_3",
    "source": "ProofNet",
    "problem_nl": "Prove that $\\left(\\sum_{j=1}^{n} a_{j} b_{j}\\right)^{2} \\leq\\left(\\sum_{j=1}^{n} j a_{j}{ }^{2}\\right)\\left(\\sum_{j=1}^{n} \\frac{b_{j}{ }^{2}}{j}\\right)$ for all real numbers $a_{1}, \\ldots, a_{n}$ and $b_{1}, \\ldots, b_{n}$.",
    "lean_code": "theorem exercise_6_3 {n : β„•} (a b : Fin n β†’ ℝ) :\n  (βˆ‘ i, a i * b i) ^ 2 ≀ (βˆ‘ i : Fin n, i * a i ^ 2) * (βˆ‘ i, b i ^ 2 / i) := sorry",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [],
    "error_tags": [
      "indexing_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "NL sums j=1..n; original uses i:Fin n (0..n-1), so weights use i not (i+1) and introduces division by i=0."
  },
  {
    "id": "proofnet_dummit_foote_exercise_4_5_13",
    "source": "ProofNet",
    "problem_nl": "Prove that a group of order 56 has a normal Sylow $p$-subgroup for some prime $p$ dividing its order.",
    "lean_code": "theorem exercise_4_5_13 {G : Type*} [Group G] [Fintype G]\n  (hG : card G = 56) :\n  βˆƒ (p : β„•) (P : Sylow p G), P.Normal := sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Same as 4_5_14: missing p.Prime and p | card G; otherwise trivial p=1-style witnesses are allowed."
  },
  {
    "id": "proofnet_dummit_foote_exercise_4_5_14",
    "source": "ProofNet",
    "problem_nl": "Prove that a group of order 312 has a normal Sylow $p$-subgroup for some prime $p$ dividing its order.",
    "lean_code": "theorem exercise_4_5_14 {G : Type*} [Group G] [Fintype G]\n  (hG : card G = 312) :\n  βˆƒ (p : β„•) (P : Sylow p G), P.Normal := sorry",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Original misses the constraints 'p is prime' and 'p | |G|'; otherwise p=1 gives a trivial normal Sylow 1-subgroup-style witness."
  },
  {
    "id": "proofnet_herstein_exercise_2_2_5",
    "source": "ProofNet",
    "problem_nl": "Let $G$ be a group in which $(a b)^{3}=a^{3} b^{3}$ and $(a b)^{5}=a^{5} b^{5}$ for all $a, b \\in G$. Show that $G$ is abelian.",
    "lean_code": "def exercise_2_2_5 {G : Type*} [Group G]\n  (h : βˆ€ (a b : G), (a * b) ^ 3 = a ^ 3 * b ^ 3 ∧ (a * b) ^ 5 = a ^ 5 * b ^ 5) :\n  CommGroup G := sorry",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "paper_vs_lean_semantics"
    ],
    "meta_tags": [],
    "gold_explanation": "Conclusion 'CommGroup G' can mean existence of some commutative group structure on the type G, not commutativity of the given [Group G] multiplication; NL needs forall a b, a*b=b*a."
  },
  {
    "id": "proofnet_herstein_exercise_2_8_15",
    "source": "ProofNet",
    "problem_nl": "Prove that if $p > q$ are two primes such that $q \\mid p - 1$, then any two nonabelian groups of order $pq$ are isomorphic.",
    "lean_code": "def exercise_2_8_15 {G H: Type*} [Fintype G] [Group G] [Fintype H]\n  [Group H] {p q : β„•} (hp : Nat.Prime p) (hq : Nat.Prime q)\n  (h : p > q) (h1 : q ∣ p - 1) (hG : card G = p*q) (hH : card G = p*q) :\n  G ≃* H := sorry",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [
      "specification_error"
    ],
    "error_tags": [
      "variable_mismatch",
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "Original typo uses hH : card G = p*q instead of card H; also missing 'G nonabelian' and 'H nonabelian' hypotheses required by NL."
  },
  {
    "id": "proofnet_ireland_rosen_exercise_2_4",
    "source": "ProofNet",
    "problem_nl": "If $n$ is a positive integer such that $n \\equiv 7 \\pmod{8}$, show that $n$ is not a sum of three squares.",
    "lean_code": "theorem exercise_2_4 {n : β„•} (hn : n % 8 = 7) :\n  Β¬βˆƒ (a b c : β„€), n = a^2 + b^2 + c^2 := sorry",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [],
    "error_tags": [
      "type_mismatch"
    ],
    "meta_tags": [
      "tooling_error"
    ],
    "gold_explanation": "Original equates n:N with a^2+b^2+c^2:Z; needs explicit cast (n:Z). Likely does not typecheck as written."
  },
  {
    "id": "proofnet_ireland_rosen_exercise_4_11",
    "source": "ProofNet",
    "problem_nl": "Prove that $1^{k}+2^{k}+\\cdots+(p-1)^{k} \\equiv 0(p)$ if $p-1 \\nmid k$ and $-1(p)$ if $p-1 \\mid k$.",
    "lean_code": "theorem exercise_4_11 {p : β„•} (hp : p.Prime) (k s: β„•)\n  (s := βˆ‘ n : Fin p, (n : β„•) ^ k) :\n  ((Β¬ p - 1 ∣ k) β†’ s ≑ 0 [MOD p]) ∧ (p - 1 ∣ k β†’ s ≑ 0 [MOD p]) := sorry",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [
      "definition_mismatch"
    ],
    "error_tags": [
      "indexing_mismatch",
      "wrong_constant"
    ],
    "meta_tags": [],
    "gold_explanation": "Original sums over Fin p (includes 0, excludes 1-indexing) and states the divisible case is =0, but NL says it should be = -1 (mod p)."
  },
  {
    "id": "proofnet_munkres_exercise_38_6",
    "source": "ProofNet",
    "problem_nl": "Let $X$ be completely regular. Show that $X$ is connected if and only if the Stone-Čech compactification of $X$ is connected.",
    "lean_code": "theorem exercise_38_6 {X : Type*}\n  (X : Type*) [TopologicalSpace X] [RegularSpace X]\n  (h : βˆ€ x A, IsClosed A ∧ Β¬ x ∈ A β†’\n  βˆƒ (f : X β†’ I), Continuous f ∧ f x = (1 : I) ∧ f '' A = {0}) :\n  IsConnected (univ : Set X) ↔ IsConnected (univ : Set (StoneCech X)) := sorry",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "encoding_issue"
    ],
    "meta_tags": [
      "code_style_issue"
    ],
    "gold_explanation": "Original 'completely regular' hypothesis uses f '' A = {0}, which fails for A=empty (image is empty), so the encoding is wrong/vacuous; also has redundant/shadowed X binder."
  },
  {
    "id": "proofnet_rudin_exercise_2_28",
    "source": "ProofNet",
    "problem_nl": "Prove that every closed set in a separable metric space is the union of a (possibly empty) perfect set and a set which is at most countable.",
    "lean_code": "theorem exercise_2_28 (X : Type*) [MetricSpace X] [SeparableSpace X]\n  (A : Set X) (hA : IsClosed A) :\n  βˆƒ P₁ Pβ‚‚ : Set X, A = P₁ βˆͺ Pβ‚‚ ∧ IsPerfect P₁ ∧ Set.Countable Pβ‚‚ := sorry",
    "expected_verdict": "NO",
    "error_primary": null,
    "error_secondary": [],
    "error_tags": [],
    "meta_tags": [],
    "gold_explanation": "No semantic issue: statement matches NL (perfect set + countable set decomposition of closed sets in separable metric spaces)."
  },
  {
    "id": "proofnet_rudin_exercise_3_21",
    "source": "ProofNet",
    "problem_nl": "If $\\left\\{E_{n}\\right\\}$ is a sequence of closed nonempty and bounded sets in a complete metric space $X$, if $E_{n} \\supset E_{n+1}$, and if $\\lim _{n \\rightarrow \\infty} \\operatorname{diam} E_{n}=0,$ then $\\bigcap_{1}^{\\infty} E_{n}$ consists of exactly one point.",
    "lean_code": "theorem exercise_3_21\n  {X : Type*} [MetricSpace X] [CompleteSpace X]\n  (E : β„• β†’ Set X)\n  (hEcl : βˆ€ n, IsClosed (E n))\n  (hEne : βˆ€ n, (E n).Nonempty)\n  (hEbdd : βˆ€ n, Bornology.IsBounded (E n))\n  (hE : βˆ€ n, E n βŠ‡ E (n + 1))\n  (hE' : Tendsto (Ξ» n => Metric.diam (E n)) atTop (𝓝 0)) :\n  βˆƒ a, Set.iInter E = {a} := sorry",
    "expected_verdict": "NO",
    "error_primary": null,
    "error_secondary": [],
    "error_tags": [],
    "meta_tags": [],
    "gold_explanation": "No semantic issue: standard Cantor intersection theorem variant is correctly expressed."
  },
  {
    "id": "proverbench_aime_2024ii_p13",
    "source": "ProverBench",
    "problem_nl": "Let Ο‰β‰ 1 be a 13th root of unity. Find the remainder when ∏_{k=0}^{12}(2-2Ο‰^k+Ο‰^{2k}) is divided by 1000. Show that it is 321.",
    "lean_code": "import Mathlib\nimport Aesop\n\nset_option maxHeartbeats 0\n\nopen BigOperators Real Nat Topology Rat\n\ntheorem aime_2024ii_p13 (Ο‰ : β„‚) (hβ‚€ : Ο‰ = Complex.exp (2 * ↑Real.pi * Complex.I / 13)) :\n    (∏ k in Finset.range 13, (2 - 2 * Ο‰ ^ k + Ο‰ ^ (2 * k))) % 1000 = 321 := by",
    "expected_verdict": "YES",
    "error_primary": "domain_mismatch",
    "error_secondary": [],
    "error_tags": [
      "type_mismatch"
    ],
    "meta_tags": [
      "tooling_error"
    ],
    "gold_explanation": "Applies % 1000 to a complex-valued product; the intended workflow is: prove the product is an integer N, then take N % 1000. As written it's ill-typed or meaningless."
  },
  {
    "id": "proverbench_calculus__p1",
    "source": "ProverBench",
    "problem_nl": "The integral of \\[(x^3 - 3cosx) dx\\] is \\[\\frac{x^4}{4} - 3sinx + C\\].",
    "lean_code": "import Mathlib\n\n/-\nThe integral of \\[(x^3 - 3cosx) dx\\] is \\[\\frac{x^4}{4} - 3sinx + C\\].\n-/\n\n-- Define the function f(x)\nnoncomputable def f (x : ℝ) : ℝ := x^3 - 3 * Real.cos x\n\n-- Define the integral of f(x)\nnoncomputable def integralf (x : ℝ) : ℝ := (x^4 / 4) - 3 * Real.sin x\n\n-- Theorem statement\n\ntheorem integral_f_eq_integralF_plus_C (x C : ℝ):\n  ∫ x , f x = integralf x + C :=",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "misuse_of_concept",
      "quantifier_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Lean uses ∫ x, f x (a definite integral over ℝ with measure), not an indefinite integral/antiderivative; also C is treated as arbitrary, but the constant of integration should be existential/handled via derivatives."
  },
  {
    "id": "proverbench_calculus__p10",
    "source": "ProverBench",
    "problem_nl": "The integral \\(\\displaystyle \\int \\frac{1}{\\sqrt{81-x^2}}\\,dx\\)\nis equivalent to \\(\\arcsin\\left(\\frac{x}{9}\\right)+C\\).",
    "lean_code": "import Mathlib\n\n/-\nThe integral \\(\\displaystyle \\int \\frac{1}{\\sqrt{81-x^2}}\\,dx\\)\nis equivalent to \\(\\arcsin\\left(\\frac{x}{9}\\right)+C\\).\n-/\n\nopen Real\n\n\ntheorem integral_of_one_over_sqrt_eighty_one_minus_x_squared (x C : ℝ):\n  ∫ x, 1 / sqrt (81 - x^2) = arcsin (x / 9) + C :=",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "misuse_of_concept",
      "quantifier_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Mis-models an indefinite integral as a definite integral; C is treated as an arbitrary parameter rather than part of an antiderivative characterization."
  },
  {
    "id": "proverbench_calculus__p12",
    "source": "ProverBench",
    "problem_nl": "The integral of \\(\\displaystyle \\frac{1}{x^2-9}\\,dx\\) is equal to \\(\\frac{1}{6}\\ln\\left|\\frac{x-3}{x+3}\\right|+C\\).",
    "lean_code": "import Mathlib\n\n/-\nThe integral of \\(\\displaystyle \\frac{1}{x^2-9}\\,dx\\) is equal to \\(\\frac{1}{6}\\ln\\left|\\frac{x-3}{x+3}\\right|+C\\).\n-/\n\nopen Real\n\n\ntheorem integral_of_rational_function_with_log :\n  βˆ€ (x : ℝ), x β‰  3 ∧ x β‰  -3 β†’\n  (∫ (dx : ℝ), 1 / (x^2 - 9)) = (1 / 6) * log (abs ((x - 3) / (x + 3))) + C :=",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "misuse_of_concept",
      "variable_mismatch"
    ],
    "meta_tags": [
      "autoimplicit_bug"
    ],
    "gold_explanation": "C is unbound; also the integral is over dx but the integrand doesn't depend on dx (it depends on x), so it's not an antiderivative statement and is semantically wrong."
  },
  {
    "id": "proverbench_calculus__p14",
    "source": "ProverBench",
    "problem_nl": "The value of the integral ∭_D e^{xΒ²+yΒ²} dV where D is bounded by planes y=0, z=0, y=x, and paraboloid z=4-xΒ²-yΒ² is (e^4-5)Ο€/8.",
    "lean_code": "import Mathlib\n\nopen MeasureTheory\n\nvariable {D : Type} [MeasurableSpace D] [MeasureSpace D]\nvariable (D : Set (Fin 3 β†’ ℝ))\n\ntheorem integral_value_over_region (D : Set (Fin 3 β†’ ℝ))\n  (hD : D = {p : Fin 3 β†’ ℝ | p 2 β‰₯ 0 ∧ p 3 β‰₯ 0 ∧ p 2 ≀ p 1 ∧ p 3 ≀ 4 - p 1^2 - p 2^2}) :\n  let integrand := fun p : Fin 3 β†’ ℝ => Real.exp (p 1^2 + p 2^2)\n  ∫ p in D, integrand p = (Real.exp 4 - 5) * Ο€ / 8 :=",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [],
    "error_tags": [
      "indexing_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Uses p 3 with p : Fin 3 β†’ ℝ; in Lean (3 : Fin 3) = 0, so 'p 3' is actually p 0, breaking the intended coordinate constraints for the 3D region."
  },
  {
    "id": "proverbench_calculus__p15",
    "source": "ProverBench",
    "problem_nl": "Prove that \\(\\displaystyle \\lim_{x\\to 0}\\frac{1-\\cos x}{x^2}=\\frac12\\).",
    "lean_code": "import Mathlib\n\n/-\nProve that \\(\\displaystyle \\lim_{x\\to 0}\\frac{1-\\cos x}{x^2}=\\frac12\\).\n-/\n\nopen Filter Topology\n\n\n/-- Version 1: Using explicit domain restriction -/\ntheorem limit_of_cosine_difference_quotient :\n  Β¬ (Tendsto (fun x => if x β‰  0 then (1 - Real.cos x) / x^2 else 1/2) (𝓝 0) (𝓝 (1/2)) ) :=",
    "expected_verdict": "YES",
    "error_primary": "formalization_error",
    "error_secondary": [],
    "error_tags": [
      "connective_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "The Lean statement negates the limit (Β¬ Tendsto ...), while the NL statement asserts the limit equals 1/2."
  },
  {
    "id": "proverbench_calculus__p17",
    "source": "ProverBench",
    "problem_nl": "The integral \\(\\int \\frac{1}{\\cos^2 x} \\, dx\\) equals to \\(\\tan x + C\\).",
    "lean_code": "import Mathlib\n\n/-\nThe integral \\(\\int \\frac{1}{\\cos^2 x} \\, dx\\) equals to \\(\\tan x + C\\).\n-/\n\n-- Define the constant C for the integration constant\nvariable (C : ℝ)\n\n-- Theorem: The indefinite integral of 1/cos^2(x) with respect to x is tan(x) + C.\n\ntheorem integral_of_one_over_cos_sq (x : ℝ) :\n∫ (x : ℝ), 1 / (Real.cos x ^ 2) = Real.tan x + C :=",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "misuse_of_concept",
      "quantifier_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Indefinite integral is mis-modeled as ∫ x, ... (definite integral), and '+ C' is encoded as an arbitrary parameter rather than antiderivative up to a constant."
  },
  {
    "id": "proverbench_calculus__p3",
    "source": "ProverBench",
    "problem_nl": "The local maximum of the function f(x)=x^4/4 - x^3/3 - 2x^2 + 4x + 5 on the interval [-3,3] is 41/4 and is attained at x=3, and the local minimum is -13/3 and it is attained for x=-2.",
    "lean_code": "import Mathlib\n\nnoncomputable def f (x : ℝ) : ℝ := x^4 / 4 - x^3 / 3 - 2 * x^2 + 4 * x + 5\n\ntheorem extrema_on_interval :\n  Β¬ ((βˆƒ x : ℝ, x ∈ Set.Icc (-3) 3 ∧ (βˆ€ y ∈ Set.Icc (-3) 3, f y ≀ f x) ∧ f x = 41/4 ∧ x = 3) ∧\n  (βˆƒ z : ℝ, z ∈ Set.Icc (-3) 3 ∧ (βˆ€ y ∈ Set.Icc (-3) 3, f z ≀ f y) ∧ f z = - 13 / 3 ∧ z = -2)) :=",
    "expected_verdict": "YES",
    "error_primary": "formalization_error",
    "error_secondary": [],
    "error_tags": [
      "connective_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "The Lean statement is negated (Β¬(...)) but NL asserts the extrema claims are true; it proves the opposite."
  },
  {
    "id": "proverbench_calculus__p5",
    "source": "ProverBench",
    "problem_nl": "The integral of \\(\\int \\frac{1}{x^2+1} \\, dx\\) is \\(\\arctan x + C\\).",
    "lean_code": "import Mathlib\n\n/-\nThe integral of \\(\\int \\frac{1}{x^2+1} \\, dx\\) is \\(\\arctan x + C\\).\n-/\n\nopen Real\n\nnoncomputable def f (x:ℝ ):ℝ := 1 / (x^2 + 1)\n\n\ntheorem integral_of_inv_sq_plus_one (x C: ℝ) :\n  ∫ x , f x  = arctan x + C :=",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "misuse_of_concept",
      "quantifier_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Indefinite integral '= arctan x + C' is not expressed by ∫ x, f x = ...; C is treated as arbitrary rather than handled via derivative/βˆƒ constant."
  },
  {
    "id": "proverbench_calculus__p8",
    "source": "ProverBench",
    "problem_nl": "The surface integral ∬_G (xΒ²+yΒ²+2z) dS, where G is the part of the paraboloid z=7-xΒ²-yΒ² that lies above the xy-plane is equal to (957√29-47)/20 Ο€.",
    "lean_code": "import Mathlib\n\nvariable {G : Set (ℝ Γ— ℝ Γ— ℝ)} (hG : G = {p : ℝ Γ— ℝ Γ— ℝ | p.2.2 = 7 - p.1^2 - p.2.1^2 ∧ p.2.2 β‰₯ 0})\n\ntheorem paraboloid_integral_value :\n∫ (x : ℝ) in Set.Icc (-Real.sqrt 7) (Real.sqrt 7), ∫ (y : ℝ) in Set.Icc (-Real.sqrt (7 - x^2)) (Real.sqrt (7 - x^2)),\n(x^2 + y^2 + 2*(7 - x^2 - y^2)) = (957 * Real.sqrt 29 - 47) / 20 * Ο€ :=",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [],
    "error_tags": [
      "misuse_of_concept"
    ],
    "meta_tags": [],
    "gold_explanation": "NL asks for surface integral ∬ f dS but Lean computes double integral ∬ f dA. Missing surface element √(1 + (βˆ‚z/βˆ‚x)Β² + (βˆ‚z/βˆ‚y)Β²) = √(1 + 4xΒ² + 4yΒ²)."
  },
  {
    "id": "proverbench_calculus__p9",
    "source": "ProverBench",
    "problem_nl": "The integral of \\(\\sin^3 x\\cos^{6}x\\,dx\\) is equal to \\(-\\frac{\\cos^7 x}{7} + \\frac{\\cos^9 x}{9} + C\\).",
    "lean_code": "import Mathlib\n\n/-\nThe integral of \\(\\sin^3 x\\cos^{6}x\\,dx\\) is equal to \\(-\\frac{\\cos^7 x}{7} + \\frac{\\cos^9 x}{9} + C\\).\n-/\n\n\ntheorem integral_sin_cube_cos_six_power (x : ℝ) :\n  ∫ (x : ℝ), Real.sin x ^ 3 * Real.cos x ^ 6 = -(Real.cos x ^ 7 / 7) + Real.cos x ^ 9 / 9 + C :=",
    "expected_verdict": "YES",
    "error_primary": "definition_mismatch",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "misuse_of_concept",
      "variable_mismatch"
    ],
    "meta_tags": [
      "autoimplicit_bug"
    ],
    "gold_explanation": "Uses ∫ x, ... as a definite integral, and C is free/unbound in the statement (scope/autoImplicit issue)."
  },
  {
    "id": "proverbench_elementary_algebra__p1",
    "source": "ProverBench",
    "problem_nl": "For a polynomial \\(P\\) of degree \\(n\\) where \\(P(i)\\) equals the remainder of \\(i\\) modulo 2 for each \\(i=0,1,\\dots,n\\),\n\\(P(n+1)\\) is 1 if \\(n\\) is even and 0 if \\(n\\) is odd.",
    "lean_code": "import Mathlib\n\n/-\nFor a polynomial \\(P\\) of degree \\(n\\) where \\(P(i)\\) equals the remainder of \\(i\\) modulo 2 for each \\(i=0,1,\\dots,n\\),\n\\(P(n+1)\\) is 1 if \\(n\\) is even and 0 if \\(n\\) is odd.\n-/\n\nvariable {P : Polynomial β„€} {n : β„•} (hP : βˆ€ i ∈ Finset.range (n + 1), P.eval (i : β„€) = i % 2)\n\n\ntheorem polynomial_parity_evaluation :\n  (n % 2 = 0 β†’ P.eval ((n + 1) : β„€) = 1) ∧ (n % 2 β‰  0 β†’ P.eval ((n + 1) : β„€) = 0) :=",
    "expected_verdict": "YES",
    "error_primary": "problem_statement_error",
    "error_secondary": [
      "specification_error"
    ],
    "error_tags": [
      "unprovable_problem",
      "incomplete_spec"
    ],
    "meta_tags": [],
    "gold_explanation": "Even with degree = n, the claimed parity value at n+1 is not generally true over β„€ (fails for n=0, n=1, n=2); also Lean statement omits the degree constraint entirely."
  },
  {
    "id": "proverbench_elementary_algebra__p15",
    "source": "ProverBench",
    "problem_nl": "Prove that if the difference of two consecutive cubes is nΒ², n ∈ β„•, then 2n-1 is a square.",
    "lean_code": "import Mathlib\n\nvariable (n : β„•)\n\ntheorem consecutive_cubes_difference_implies_square :\n  ( (n + 1) ^ 3 - n ^ 3 = n ^ 2 ) β†’ βˆƒ k : β„•, k ^ 2 = 2 * n - 1 :=",
    "expected_verdict": "YES",
    "error_primary": "formalization_error",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "premise_translation_error",
      "variable_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Uses same variable n for both the cube index and the square. NL says 'difference of two consecutive cubes is nΒ²' meaning (m+1)Β³ - mΒ³ = nΒ² for some m. Correct formalization needs separate variables. Current premise is never satisfiable for n ∈ β„•, making theorem vacuously true."
  },
  {
    "id": "proverbench_elementary_algebra__p19",
    "source": "ProverBench",
    "problem_nl": "Proves the inequality: aΒ²(s-a) + bΒ²(s-b) + cΒ²(s-c) ≀ (3/2)abc where a, b, c are real numbers.",
    "lean_code": "import Mathlib\n\ntheorem inequality_statement {a b c s : ℝ} :\n  a^2 * (s - a) + b^2 * (s - b) + c^2 * (s - c) ≀ (3/2) * a * b * c :=",
    "expected_verdict": "YES",
    "error_primary": "problem_statement_error",
    "error_secondary": [
      "specification_error"
    ],
    "error_tags": [
      "incomplete_statement",
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "Both NL and Lean are missing the constraint that s = (a+b+c)/2 (semi-perimeter). The NL problem statement is incomplete - this inequality only holds when s is the semi-perimeter. Without this constraint, the statement is FALSE. Counterexample: a=b=c=1, s=100 gives LHS=297 > RHS=1.5."
  },
  {
    "id": "proverbench_linear_algebra__p13_1",
    "source": "ProverBench",
    "problem_nl": "Let T: Z Γ— Z β†’ Z be a linear function satisfying T(1, 0) = 3 and T(0, 1) = -5. Then for all (x, y) ∈ Z Γ— Z, T(x, y) = 3x - 5y.",
    "lean_code": "import Mathlib\n\n/-\nLet T: Z Γ— Z β†’ Z be a linear function satisfying T(1, 0) = 3 and T(0, 1) = -5. Then for all (x, y) ∈ Z Γ— Z, T(x, y) = 3x - 5y.\n-/\n\nopen Int AddMonoidHom\n\nvariable (T : β„€ Γ— β„€ β†’+ β„€)\n\naxiom T10 : T (1, 0) = 3\n\naxiom T01 : T (0, 1) = -5\n\n\nlemma T_expression : βˆ€ (x y : β„€), T (x, y) = 3 * x - 5 * y :=",
    "expected_verdict": "YES",
    "error_primary": "formalization_error",
    "error_secondary": [],
    "error_tags": [
      "premise_translation_error"
    ],
    "meta_tags": [
      "unsound_axiom"
    ],
    "gold_explanation": "Constraints T(1,0)=3 and T(0,1)=-5 were introduced as global axioms (effectively for all T), rather than hypotheses about a specific T; this makes the context inconsistent (e.g. T=0)."
  },
  {
    "id": "proverbench_linear_algebra__p13_2",
    "source": "ProverBench",
    "problem_nl": "Let T: Z Γ— Z β†’ Z be a linear function satisfying T(1, 0) = 3 and T(0, 1) = -5. Then for all (x, y) ∈ Z Γ— Z, T(x, y) = 3x - 5y.",
    "lean_code": "import Mathlib\n\n/-\nLet T: Z Γ— Z β†’ Z be a linear function satisfying T(1, 0) = 3 and T(0, 1) = -5. Then for all (x, y) ∈ Z Γ— Z, T(x, y) = 3x - 5y.\n-/\n\nopen Int AddMonoidHom\n\nvariable (T : β„€ Γ— β„€ β†’+ β„€)\n\naxiom T10 : T (1, 0) = 3\n\naxiom T01 : T (0, 1) = -5\n\naxiom T_expression : βˆ€ (x y : β„€), T (x, y) = 3 * x - 5 * y\n\n\ntheorem T_value (x y : β„€) : T (x, y) = 3 * x - 5 * y :=",
    "expected_verdict": "YES",
    "error_primary": "formalization_error",
    "error_secondary": [],
    "error_tags": [
      "premise_translation_error"
    ],
    "meta_tags": [
      "unsound_axiom"
    ],
    "gold_explanation": "Same issue as p13_1: axioms assert properties for all T and even directly assert the conclusion, making the theorem trivial/unsound rather than a conditional statement."
  },
  {
    "id": "proverbench_number_theory__p16",
    "source": "ProverBench",
    "problem_nl": "The smallest possible value for n in a library with n books, where if books are arranged in boxes with 7 books in each box, then 5 books remain, if arranged with 9 books in each box, then 3 books remain, and if arranged with 11 books in each box, then 7 books remain, is 579.",
    "lean_code": "import Mathlib\n\ntheorem smallest_library_books_value {n : β„•}\n  (h1 : n % 7 = 5) (h2 : n % 9 = 3) (h3 : n % 11 = 7) :\n  n = 579 :=",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "Missing minimality constraint. The theorem claims ALL n satisfying the CRT conditions equal 579, but n = 1272 (= 579 + lcm(7,9,11)) also satisfies h1, h2, h3 and 1272 β‰  579. Should add hypothesis that n is the smallest such n."
  },
  {
    "id": "proverbench_number_theory__p2",
    "source": "ProverBench",
    "problem_nl": "For the equation x² + y² - 1 = 4xy its general solution in the integers is given by x + u√3 = (2 + √3)^n, where u is the substitute for y - 2x.",
    "lean_code": "import Mathlib\n\ntheorem general_solution_quadratic_equation (x y : β„€) (u : β„€) (n : β„•) :\n  x^2 + y^2 - 1 = 4 * x * y β†’ x + u * Real.sqrt 3 = (2 + Real.sqrt 3)^n := sorry",
    "expected_verdict": "YES",
    "error_primary": "problem_statement_error",
    "error_secondary": [
      "specification_error",
      "domain_mismatch"
    ],
    "error_tags": [
      "unprovable_problem",
      "missing_hypothesis",
      "type_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "NL/formula is wrong as written (the Pell reduction gives u^2-3x^2=1 so the standard form is u + x√3 = (2+√3)^n); also missing u = y - 2x; Lean mixes β„€ variables with ℝ sqrt without proper spec/casts."
  },
  {
    "id": "proverbench_number_theory__p26",
    "source": "ProverBench",
    "problem_nl": "For any real number \\(\\alpha\\), there exist infinitely many pairs of positive integers \\((p, q)\\) such that \\(\\left|\\alpha - \\frac{p}{q}\\right| < \\frac{1}{q^2}\\)",
    "lean_code": "import Mathlib\n\n/-\nFor any real number \\(\\alpha\\), there exist infinitely many pairs of positive integers \\((p, q)\\) such that \\(\\left|\\alpha - \\frac{p}{q}\\right| < \\frac{1}{q^2}\\)\n-/\n\n\ntheorem infinitely_many_positive_integer_pairs_for_real_approximation (Ξ± : ℝ) :\n  βˆƒ (p q : β„•) (h : q > 0), βˆ€ (n : β„•), n > 0 β†’ βˆƒ (p_n q_n : β„•) (h_n : q_n > 0),\n  |Ξ± - (p_n : ℝ) / q_n| < 1 / q_n^2 :=",
    "expected_verdict": "YES",
    "error_primary": "problem_statement_error",
    "error_secondary": [
      "quantifier_indexing_mismatch"
    ],
    "error_tags": [
      "unprovable_problem",
      "quantifier_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "As stated with p,q positive, the NL claim fails for negative Ξ± (e.g. Ξ± = -2); the Lean quantifier structure also doesn't encode 'infinitely many distinct pairs' or unbounded q. Variables p,q are unused (bound then ignored)."
  },
  {
    "id": "proverbench_number_theory__p27",
    "source": "ProverBench",
    "problem_nl": "Prove that \\(4kxy-1\\) does not divide the number \\(x^m+y^n\\) for any positive integers \\(x,y,k,m,n\\).",
    "lean_code": "import Mathlib\n\n/-\nProve that \\(4kxy-1\\) does not divide the number \\(x^m+y^n\\) for any positive integers \\(x,y,k,m,n\\).\n-/\n\n\ntheorem no_division {x y k m n : PNat}\n  (h : βˆƒ z : PNat, (x : β„•)^(m : β„•) + (y : β„•)^(n : β„•) = z) :\n  Β¬((4 * k * x * y - 1) ∣ z) :=",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [],
    "error_tags": [
      "variable_mismatch"
    ],
    "meta_tags": [
      "autoimplicit_bug"
    ],
    "gold_explanation": "z in the divisibility conclusion is not bound to the z from the βˆƒ-hypothesis (autoImplicit-style scope bug), making the statement meaningless/false."
  },
  {
    "id": "proverbench_number_theory__p28",
    "source": "ProverBench",
    "problem_nl": "Let \\(p\\) be a prime number and \\( N=\\prod _{k=1}^{p-1}(k^2+1)\\). The remainder of \\(N\\) upon division by \\(p\\) is 4 if \\(p\\) is congruent to 3 modulo 4, and 0 if \\(p\\) is congruent to 1 modulo 4.",
    "lean_code": "import Mathlib\n\n/-\nLet \\(p\\) be a prime number and \\( N=\\prod _{k=1}^{p-1}(k^2+1)\\). The remainder of \\(N\\) upon division by \\(p\\) is 4 if \\(p\\) is congruent to 3 modulo 4, and 0 if \\(p\\) is congruent to 1 modulo 4.\n-/\n\nopen Finset\n\n\ntheorem prime_remainder_theorem (p : β„•) (hp : Prime p) :\n  let N := (range (p - 1)).prod (Ξ» k => k^2 + 1);\n  if p % 4 = 3 then N % p = 4 else N % p = 0 :=",
    "expected_verdict": "YES",
    "error_primary": "quantifier_indexing_mismatch",
    "error_secondary": [
      "specification_error"
    ],
    "error_tags": [
      "indexing_mismatch",
      "missing_hypothesis"
    ],
    "meta_tags": [],
    "gold_explanation": "range (p-1) indexes k=0..p-2, not 1..p-1 as NL specifies; additionally 'remainder = 4' should be encoded as N % p = 4 % p (or require p>4), otherwise p=3 breaks literal remainder equality."
  },
  {
    "id": "proverbench_number_theory__p6",
    "source": "ProverBench",
    "problem_nl": "The solutions for the equation xΒ² - dyΒ² = 1 in the set of rational numbers, for a given integer d, are x = (dtΒ² + 1)/(dtΒ² - 1) and y = 2t/(dtΒ² - 1) where t ∈ β„š.",
    "lean_code": "import Mathlib\n\nvariable (d : β„€)\n\ntheorem rational_solutions_of_pell_equation (t : β„š) :\n  βˆƒ (x y : β„š), x = (d * t^2 + 1) / (d * t^2 - 1) ∧ y = 2 * t / (d * t^2 - 1) ∧ x^2 - d * y^2 = 1 :=",
    "expected_verdict": "YES",
    "error_primary": "specification_error",
    "error_secondary": [],
    "error_tags": [
      "incomplete_spec",
      "division_by_zero_risk"
    ],
    "meta_tags": [],
    "gold_explanation": "Only proves 'for each t, the formulas give a solution' (one direction); NL reads like a full characterization of all rational solutions (↔). Also denominator d*t^2-1 can be 0, which needs an explicit guard in a faithful spec."
  },
  {
    "id": "proverbench_number_theory__p7",
    "source": "ProverBench",
    "problem_nl": "Exactly one of the equations xΒ² - pyΒ² = Β±2 has an integral solution where p is a prime of the form 4k + 3.",
    "lean_code": "import Mathlib\n\nvariable {p : β„€} (hp : Prime p) (hpForm : p % 4 = 3)\n\ntheorem exactly_one_has_integral_solution:\n  (βˆƒ (x y : β„€), x^2 - p * y^2 = 2) ∨ (βˆƒ (x y : β„€), x^2 - p * y^2 = -2) ∧\n  Β¬((βˆƒ (x y : β„€), x^2 - p * y^2 = 2) ∧ (βˆƒ (x y : β„€), x^2 - p * y^2 = -2)) :=",
    "expected_verdict": "YES",
    "error_primary": "formalization_error",
    "error_secondary": [],
    "error_tags": [
      "connective_mismatch"
    ],
    "meta_tags": [],
    "gold_explanation": "Due to precedence, Lean parses A ∨ (B ∧ ¬(A ∧ B)) instead of (A ∨ B) ∧ ¬(A ∧ B); that weakens 'exactly one'."
  }
]