File size: 42,295 Bytes
32b6f1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/-
Copyright (c) 2021 OpenAI. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kunhao Zheng, Stanislas Polu, David Renshaw, OpenAI GPT-f

! This file was ported from Lean 3 source module valid and edited by Kaiyu Yang.
-/
import MiniF2F.Minif2fImport


open BigOperators Real Nat Topology

theorem amc12a_2019_p21 (z : β„‚) (hβ‚€ : z = (1 + Complex.I) / Real.sqrt 2) :
  ((βˆ‘ k : β„€ in Finset.Icc 1 12, z ^ k ^ 2) * (βˆ‘ k : β„€ in Finset.Icc 1 12, 1 / z ^ k ^ 2)) = 36 := by
  sorry

theorem amc12a_2015_p10 (x y : β„€) (hβ‚€ : 0 < y) (h₁ : y < x) (hβ‚‚ : x + y + x * y = 80) : x = 26 := by
  sorry

theorem amc12a_2008_p8 (x y : ℝ) (hβ‚€ : 0 < x ∧ 0 < y) (h₁ : y ^ 3 = 1)
  (hβ‚‚ : 6 * x ^ 2 = 2 * (6 * y ^ 2)) : x ^ 3 = 2 * Real.sqrt 2 := by
  sorry

theorem mathd_algebra_182 (y : β„‚) : 7 * (3 * y + 2) = 21 * y + 14 := by
  -- aesop?
  ring

theorem aime_1984_p5 (a b : ℝ) (hβ‚€ : Real.logb 8 a + Real.logb 4 (b ^ 2) = 5)
  (h₁ : Real.logb 8 b + Real.logb 4 (a ^ 2) = 7) : a * b = 512 := by
  sorry

theorem mathd_numbertheory_780 (m x : β„€) (hβ‚€ : 0 ≀ x) (h₁ : 10 ≀ m ∧ m ≀ 99) (hβ‚‚ : 6 * x % m = 1)
  (h₃ : (x - 6 ^ 2) % m = 0) : m = 43 := by
  sorry

theorem mathd_algebra_116 (k x : ℝ) (hβ‚€ : x = (13 - Real.sqrt 131) / 4)
    (h₁ : 2 * x ^ 2 - 13 * x + k = 0) : k = 19 / 4 := by
  rw [hβ‚€] at h₁
  rw [eq_comm.mp (add_eq_zero_iff_neg_eq.mp h₁)]
  norm_num
  rw [pow_two]
  rw [mul_sub]
  rw [sub_mul, sub_mul]
  rw [Real.mul_self_sqrt _]
  ring
  linarith

theorem mathd_numbertheory_13 (u v : β„•) (S : Set β„•)
  (hβ‚€ : βˆ€ n : β„•, n ∈ S ↔ 0 < n ∧ 14 * n % 100 = 46) (h₁ : IsLeast S u)
  (hβ‚‚ : IsLeast (S \ {u}) v) : (u + v : β„š) / 2 = 64 := by
  sorry

theorem mathd_numbertheory_169 : Nat.gcd 20! 200000 = 40000 := by
  -- aesop?
  apply Eq.refl

theorem amc12a_2009_p9 (a b c : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f (x + 3) = 3 * x ^ 2 + 7 * x + 4)
  (h₁ : βˆ€ x, f x = a * x ^ 2 + b * x + c) : a + b + c = 2 := by
  sorry

theorem amc12a_2019_p9 (a : β„• β†’ β„š) (hβ‚€ : a 1 = 1) (h₁ : a 2 = 3 / 7)
  (hβ‚‚ : βˆ€ n, a (n + 2) = a n * a (n + 1) / (2 * a n - a (n + 1))) :
  ↑(a 2019).den + (a 2019).num = 8078 := by
  sorry

theorem mathd_algebra_13 (a b : ℝ)
  (hβ‚€ : βˆ€ x, x - 3 β‰  0 ∧ x - 5 β‰  0 β†’ 4 * x / (x ^ 2 - 8 * x + 15) = a / (x - 3) + b / (x - 5)) :
  a = -6 ∧ b = 10 := by
  sorry

theorem induction_sum2kp1npqsqm1 (n : β„•) :
  βˆ‘ k in Finset.range n, (2 * k + 3) = (n + 1) ^ 2 - 1 := by
  sorry

theorem aime_1991_p6 (r : ℝ) (hβ‚€ : (βˆ‘ k in Finset.Icc (19 : β„•) 91, Int.floor (r + k / 100)) = 546) :
  Int.floor (100 * r) = 743 := by
  sorry

theorem mathd_numbertheory_149 :
  (βˆ‘ k in Finset.filter (fun x => x % 8 = 5 ∧ x % 6 = 3) (Finset.range 50), k) = 66 := by
  -- aesop?
  apply Eq.refl

theorem imo_1984_p2 (a b : β„€) (hβ‚€ : 0 < a ∧ 0 < b) (h₁ : Β¬7 ∣ a) (hβ‚‚ : Β¬7 ∣ b) (h₃ : Β¬7 ∣ a + b)
  (hβ‚„ : 7 ^ 7 ∣ (a + b) ^ 7 - a ^ 7 - b ^ 7) : 19 ≀ a + b := by
  sorry

theorem amc12a_2008_p4 : (∏ k in Finset.Icc (1 : β„•) 501, ((4 : ℝ) * k + 4) / (4 * k)) = 502 := by
  sorry

theorem imo_2006_p6 (a b c : ℝ) :
  a * b * (a ^ 2 - b ^ 2) + b * c * (b ^ 2 - c ^ 2) + c * a * (c ^ 2 - a ^ 2) ≀
  9 * Real.sqrt 2 / 32 * (a ^ 2 + b ^ 2 + c ^ 2) ^ 2 := by
  sorry

theorem mathd_algebra_462 : ((1 : β„š) / 2 + 1 / 3) * (1 / 2 - 1 / 3) = 5 / 36 := by
  -- aesop?
  simp_all only [one_div]
  norm_num

theorem imo_1964_p1_2 (n : β„•) : Β¬7 ∣ 2 ^ n + 1 := by
  sorry

theorem mathd_numbertheory_221 (S : Finset β„•)
  (hβ‚€ : βˆ€ x : β„•, x ∈ S ↔ 0 < x ∧ x < 1000 ∧ x.divisors.card = 3) : S.card = 11 := by
    sorry

theorem mathd_numbertheory_64 : IsLeast { x : β„• | 30 * x ≑ 42 [MOD 47] } 39 := by
  sorry

theorem imo_1987_p4 (f : β„• β†’ β„•) : βˆƒ n, f (f n) β‰  n + 1987 := by
  sorry

theorem mathd_numbertheory_33 (n : β„•) (hβ‚€ : n < 398) (h₁ : n * 7 % 398 = 1) : n = 57 := by
  sorry

theorem amc12_2001_p9 (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x > 0, βˆ€ y > 0, f (x * y) = f x / y) (h₁ : f 500 = 3) :
    f 600 = 5 / 2 := by
  specialize hβ‚€ 500 _ (6 / 5) _
  Β· linarith
  Β· linarith
  calc
    f 600 = f (500 * (6 / 5)) := by
      congr
      norm_num
    _ = f 500 / (6 / 5) := by rw [hβ‚€]
    _ = 3 / (6 / 5) := by rw [h₁]
    _ = 5 / 2 := by norm_num

-- Solution encoded in theorem statement
theorem imo_1965_p1 (x : ℝ) (hβ‚€ : 0 ≀ x) (h₁ : x ≀ 2 * Ο€)
  (hβ‚‚ : 2 * Real.cos x ≀ abs (Real.sqrt (1 + Real.sin (2 * x)) - Real.sqrt (1 - Real.sin (2 * x))))
  (h₃ : abs (Real.sqrt (1 + Real.sin (2 * x)) - Real.sqrt (1 - Real.sin (2 * x))) ≀ Real.sqrt 2) :
  Ο€ / 4 ≀ x ∧ x ≀ 7 * Ο€ / 4 := by
  sorry

theorem mathd_numbertheory_48 (b : β„•) (hβ‚€ : 0 < b) (h₁ : 3 * b ^ 2 + 2 * b + 1 = 57) : b = 4 := by
  -- aesop?
  simp_all only [succ.injEq]
  apply le_antisymm
  Β· nlinarith
  Β· nlinarith

theorem numbertheory_sqmod4in01d (a : β„€) : a ^ 2 % 4 = 0 ∨ a ^ 2 % 4 = 1 := by
  sorry

theorem mathd_numbertheory_466 : (βˆ‘ k in Finset.range 11, k) % 9 = 1 := by
  -- aesop?
  apply Eq.refl

theorem mathd_algebra_48 (q e : β„‚) (hβ‚€ : q = 9 - 4 * Complex.I) (h₁ : e = -3 - 4 * Complex.I) :
  q - e = 12 := by
  -- aesop?
  aesop_subst [h₁, hβ‚€]
  simp_all only [sub_sub_sub_cancel_right, sub_neg_eq_add]
  norm_num

theorem amc12_2000_p15 (f : β„‚ β†’ β„‚) (hβ‚€ : βˆ€ x, f (x / 3) = x ^ 2 + x + 1)
  (h₁ : Fintype (f ⁻¹' {7})) : (βˆ‘ y in (f ⁻¹' {7}).toFinset, y / 3) = -1 / 9 := by
  sorry

theorem mathd_numbertheory_132 : 2004 % 12 = 0 := by
  -- aesop?
  apply Eq.refl

theorem amc12a_2009_p5 (x : ℝ) (hβ‚€ : x ^ 3 - (x + 1) * (x - 1) * x = 5) : x ^ 3 = 125 := by
  sorry

theorem mathd_numbertheory_188 : Nat.gcd 180 168 = 12 := by
  apply Eq.refl

theorem mathd_algebra_224 (S : Finset β„•)
  (hβ‚€ : βˆ€ n : β„•, n ∈ S ↔ Real.sqrt n < 7 / 2 ∧ 2 < Real.sqrt n) : S.card = 8 := by
  sorry

theorem induction_divisibility_3divnto3m2n (n : β„•) : 3 ∣ n ^ 3 + 2 * n := by
  sorry

theorem induction_sum_1oktkp1 (n : β„•) :
  (βˆ‘ k in Finset.range n, (1 : ℝ) / ((k + 1) * (k + 2))) = n / (n + 1) := by
  sorry

theorem mathd_numbertheory_32 (S : Finset β„•) (hβ‚€ : βˆ€ n : β„•, n ∈ S ↔ n ∣ 36) : (βˆ‘ k in S, k) = 91 := by
  sorry

theorem mathd_algebra_422 (x : ℝ) (Οƒ : Equiv ℝ ℝ) (hβ‚€ : βˆ€ x, Οƒ.1 x = 5 * x - 12)
  (h₁ : Οƒ.1 (x + 1) = Οƒ.2 x) : x = 47 / 24 := by
  sorry

theorem amc12b_2002_p11 (a b : β„•) (hβ‚€ : Nat.Prime a) (h₁ : Nat.Prime b) (hβ‚‚ : Nat.Prime (a + b))
  (h₃ : Nat.Prime (a - b)) : Nat.Prime (a + b + (a - b + (a + b))) := by
  sorry

theorem mathd_algebra_73 (p q r x : β„‚) (hβ‚€ : (x - p) * (x - q) = (r - p) * (r - q)) (h₁ : x β‰  r) :
  x = p + q - r := by
  sorry

theorem mathd_numbertheory_109 (v : β„• β†’ β„•) (hβ‚€ : βˆ€ n, v n = 2 * n - 1) :
  (βˆ‘ k in Finset.Icc 1 100, v k) % 7 = 4 := by
  -- aesop?
  simp_all only [ge_iff_le, gt_iff_lt, lt_one_iff]
  apply Eq.refl

theorem algebra_xmysqpymzsqpzmxsqeqxyz_xpypzp6dvdx3y3z3 (x y z : β„€)
  (hβ‚€ : (x - y) ^ 2 + (y - z) ^ 2 + (z - x) ^ 2 = x * y * z) :
  x + y + z + 6 ∣ x ^ 3 + y ^ 3 + z ^ 3 := by
  sorry

-- Solution encoded in theorem statement.
-- What can be counted as a "solution"? The set of solutions is infinite. Does it have to be computable?
theorem imo_1962_p4 (S : Set ℝ)
    (hβ‚€ : S = { x : ℝ | Real.cos x ^ 2 + Real.cos (2 * x) ^ 2 + Real.cos (3 * x) ^ 2 = 1 }) :
    S =
      { x : ℝ |
        βˆƒ m : β„€,
          x = Ο€ / 2 + m * Ο€ ∨
            x = Ο€ / 4 + m * Ο€ / 2 ∨ x = Ο€ / 6 + m * Ο€ / 6 ∨ x = 5 * Ο€ / 6 + m * Ο€ / 6 } := by
  sorry

theorem mathd_numbertheory_236 : 1999 ^ 2000 % 5 = 1 := by
  -- aesop?
  apply Eq.refl

theorem mathd_numbertheory_24 : (βˆ‘ k in Finset.Icc 1 9, 11 ^ k) % 100 = 59 := by
  -- aesop?
  apply Eq.refl

theorem algebra_amgm_prod1toneq1_sum1tongeqn (a : β„• β†’ NNReal) (n : β„•)
  (hβ‚€ : Finset.prod (Finset.range n) a = 1) : Finset.sum (Finset.range n) a β‰₯ n := by
  sorry

theorem mathd_algebra_101 (x : ℝ) (hβ‚€ : x ^ 2 - 5 * x - 4 ≀ 10) : x β‰₯ -2 ∧ x ≀ 7 := by
  -- aesop?
  simp_all only [rpow_two, tsub_le_iff_right, ge_iff_le]
  apply And.intro
  Β· nlinarith
  Β· nlinarith

theorem mathd_numbertheory_257 (x : β„•) (hβ‚€ : 1 ≀ x ∧ x ≀ 100)
    (h₁ : 77 ∣ (βˆ‘ k in Finset.range 101, k) - x) : x = 45 := by
  sorry

theorem amc12_2000_p5 (x p : ℝ) (hβ‚€ : x < 2) (h₁ : abs (x - 2) = p) : x - p = 2 - 2 * p := by
  suffices abs (x - 2) = -(x - 2) by
    rw [h₁] at this
    linarith
  apply abs_of_neg
  linarith

theorem mathd_algebra_547 (x y : ℝ) (hβ‚€ : x = 5) (h₁ : y = 2) : Real.sqrt (x ^ 3 - 2 ^ y) = 11 := by
  sorry

theorem mathd_numbertheory_200 : 139 % 11 = 7 := by
  -- aesop?
  apply Eq.refl

theorem mathd_algebra_510 (x y : ℝ) (hβ‚€ : x + y = 13) (h₁ : x * y = 24) :
  Real.sqrt (x ^ 2 + y ^ 2) = 11 := by
  sorry

theorem mathd_algebra_140 (a b c : ℝ) (hβ‚€ : 0 < a ∧ 0 < b ∧ 0 < c)
  (h₁ : βˆ€ x, 24 * x ^ 2 - 19 * x - 35 = (a * x - 5) * (2 * (b * x) + c)) : a * b - 3 * c = -9 := by
  sorry

theorem mathd_algebra_455 (x : ℝ) (hβ‚€ : 2 * (2 * (2 * (2 * x))) = 48) : x = 3 := by
  -- aesop?
  linarith

theorem mathd_numbertheory_45 : Nat.gcd 6432 132 + 11 = 23 := by
  -- aesop?
  simp_all only [succ.injEq]
  apply Eq.refl

theorem aime_1994_p4 (n : β„•) (hβ‚€ : 0 < n)
  (hβ‚€ : (βˆ‘ k in Finset.Icc 1 n, Int.floor (Real.logb 2 k)) = 1994) : n = 312 := by
  sorry

theorem mathd_numbertheory_739 : 9! % 10 = 0 := by
  -- aesop?
  apply Eq.refl

theorem mathd_algebra_245 (x : ℝ) (hβ‚€ : x β‰  0) :
  (4 / x)⁻¹ * (3 * x ^ 3 / x) ^ 2 * (1 / (2 * x))⁻¹ ^ 3 = 18 * x ^ 8 := by
  sorry

theorem algebra_apb4leq8ta4pb4 (a b : ℝ) (hβ‚€ : 0 < a ∧ 0 < b) : (a + b) ^ 4 ≀ 8 * (a ^ 4 + b ^ 4) := by
  sorry

theorem mathd_algebra_28 (c : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = 2 * x ^ 2 + 5 * x + c)
  (h₁ : βˆƒ x, f x ≀ 0) : c ≀ 25 / 8 := by
  sorry

theorem mathd_numbertheory_543 : (βˆ‘ k in Nat.divisors (30 ^ 4), 1) - 2 = 123 := by
  sorry  -- simp stucks

theorem mathd_algebra_480 (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x < 0, f x = -x ^ 2 - 1)
  (h₁ : βˆ€ x, 0 ≀ x ∧ x < 4 β†’ f x = 2) (hβ‚‚ : βˆ€ x β‰₯ 4, f x = Real.sqrt x) : f Ο€ = 2 := by
  sorry

theorem mathd_algebra_69 (rows seats : β„•) (hβ‚€ : rows * seats = 450)
  (h₁ : (rows + 5) * (seats - 3) = 450) : rows = 25 := by
  sorry

theorem mathd_algebra_433 (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = 3 * Real.sqrt (2 * x - 7) - 8) : f 8 = 19 := by
  sorry

theorem mathd_algebra_126 (x y : ℝ) (hβ‚€ : 2 * 3 = x - 9) (h₁ : 2 * -5 = y + 1) : x = 15 ∧ y = -11 := by
  -- aesop?
  simp_all only [mul_neg]
  apply And.intro
  Β· linarith
  Β· linarith

theorem aimeII_2020_p6 (t : β„• β†’ β„š) (hβ‚€ : t 1 = 20) (h₁ : t 2 = 21)
  (hβ‚‚ : βˆ€ n β‰₯ 3, t n = (5 * t (n - 1) + 1) / (25 * t (n - 2))) :
  ↑(t 2020).den + (t 2020).num = 626 := by
  sorry

theorem amc12a_2008_p2 (x : ℝ) (hβ‚€ : x * (1 / 2 + 2 / 3) = 1) : x = 6 / 7 := by
  -- aesop?
  simp_all only [one_div]
  linarith

theorem mathd_algebra_35 (p q : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, p x = 2 - x ^ 2)
    (h₁ : βˆ€ x : ℝ, x β‰  0 β†’ q x = 6 / x) : p (q 2) = -7 := by
  -- aesop?
  simp_all only [rpow_two, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, div_pow]
  norm_num

theorem algebra_amgm_faxinrrp2msqrt2geq2mxm1div2x :
  βˆ€ x > 0, 2 - Real.sqrt 2 β‰₯ 2 - x - 1 / (2 * x) := by
  intros x h
  sorry

theorem mathd_numbertheory_335 (n : β„•) (hβ‚€ : n % 7 = 5) : 5 * n % 7 = 4 := by
  rw [Nat.mul_mod, hβ‚€]

theorem mathd_numbertheory_35 (S : Finset β„•) (hβ‚€ : βˆ€ n : β„•, n ∣ Nat.sqrt 196) :
    (βˆ‘ k in S, k) = 24 := by
  sorry

theorem amc12a_2021_p7 (x y : ℝ) : 1 ≀ (x * y - 1) ^ 2 + (x + y) ^ 2 := by
  simp only [sub_eq_add_neg, add_right_comm]
  ring
  nlinarith

theorem mathd_algebra_327 (a : ℝ) (hβ‚€ : 1 / 5 * abs (9 + 2 * a) < 1) : -7 < a ∧ a < -2 := by
  have h₁ := (mul_lt_mul_left (show 0 < (5 : ℝ) by linarith)).mpr hβ‚€
  have hβ‚‚ : abs (9 + 2 * a) < 5 := by linarith
  have h₃ := abs_lt.mp hβ‚‚
  cases' h₃ with h₃ hβ‚„
  constructor <;> nlinarith

theorem aime_1984_p15 (x y z w : ℝ)
    (hβ‚€ :
      x ^ 2 / (2 ^ 2 - 1) + y ^ 2 / (2 ^ 2 - 3 ^ 2) + z ^ 2 / (2 ^ 2 - 5 ^ 2) +
          w ^ 2 / (2 ^ 2 - 7 ^ 2) =
        1)
    (h₁ :
      x ^ 2 / (4 ^ 2 - 1) + y ^ 2 / (4 ^ 2 - 3 ^ 2) + z ^ 2 / (4 ^ 2 - 5 ^ 2) +
          w ^ 2 / (4 ^ 2 - 7 ^ 2) =
        1)
    (hβ‚‚ :
      x ^ 2 / (6 ^ 2 - 1) + y ^ 2 / (6 ^ 2 - 3 ^ 2) + z ^ 2 / (6 ^ 2 - 5 ^ 2) +
          w ^ 2 / (6 ^ 2 - 7 ^ 2) =
        1)
    (h₃ :
      x ^ 2 / (8 ^ 2 - 1) + y ^ 2 / (8 ^ 2 - 3 ^ 2) + z ^ 2 / (8 ^ 2 - 5 ^ 2) +
          w ^ 2 / (8 ^ 2 - 7 ^ 2) =
        1) :
    x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2 = 36 := by
  sorry

theorem algebra_amgm_sqrtxymulxmyeqxpy_xpygeq4 (x y : ℝ) (hβ‚€ : 0 < x ∧ 0 < y) (h₁ : y ≀ x)
  (hβ‚‚ : Real.sqrt (x * y) * (x - y) = x + y) : x + y β‰₯ 4 := by
  sorry

theorem amc12a_2002_p21 (u : β„• β†’ β„•) (hβ‚€ : u 0 = 4) (h₁ : u 1 = 7)
    (hβ‚‚ : βˆ€ n β‰₯ 2, u (n + 2) = (u n + u (n + 1)) % 10) :
    βˆ€ n, (βˆ‘ k in Finset.range n, u k) > 10000 β†’ 1999 ≀ n := by sorry

theorem mathd_algebra_192 (q e d : β„‚) (hβ‚€ : q = 11 - 5 * Complex.I) (h₁ : e = 11 + 5 * Complex.I)
    (hβ‚‚ : d = 2 * Complex.I) : q * e * d = 292 * Complex.I := by
  -- aesop?
  sorry

theorem amc12b_2002_p6 (a b : ℝ) (hβ‚€ : a β‰  0 ∧ b β‰  0)
  (h₁ : βˆ€ x, x ^ 2 + a * x + b = (x - a) * (x - b)) : a = 1 ∧ b = -2 := by
  sorry

theorem mathd_numbertheory_102 : 2 ^ 8 % 5 = 1 := by
  -- aesop?
  apply Eq.refl

theorem amc12a_2010_p22 (x : ℝ) : 49 ≀ βˆ‘ k:β„€ in Finset.Icc 1 119, abs (↑k * x - 1) := by
  sorry

theorem mathd_numbertheory_81 : 71 % 3 = 2 := by
  -- aesop?
  apply Eq.refl

theorem mathd_numbertheory_155 :
  Finset.card (Finset.filter (fun x => x % 19 = 7) (Finset.Icc 100 999)) = 48 := by
  -- aesop?
  apply Eq.refl

theorem imo_1978_p5 (n : β„•) (a : β„• β†’ β„•) (hβ‚€ : Function.Injective a) (h₁ : a 0 = 0) (hβ‚‚ : 0 < n) :
  (βˆ‘ k in Finset.Icc 1 n, (1 : ℝ) / k) ≀ βˆ‘ k in Finset.Icc 1 n, (a k : ℝ) / k ^ 2 := by
  sorry

theorem amc12a_2017_p7 (f : β„• β†’ ℝ) (hβ‚€ : f 1 = 2) (h₁ : βˆ€ n, 1 < n ∧ Even n β†’ f n = f (n - 1) + 1)
  (hβ‚‚ : βˆ€ n, 1 < n ∧ Odd n β†’ f n = f (n - 2) + 2) : f 2017 = 2018 := by
  sorry

theorem mathd_numbertheory_42 (S : Set β„•) (u v : β„•) (hβ‚€ : βˆ€ a : β„•, a ∈ S ↔ 0 < a ∧ 27 * a % 40 = 17)
    (h₁ : IsLeast S u) (hβ‚‚ : IsLeast (S \ {u}) v) : u + v = 62 := by
  sorry

theorem mathd_algebra_110 (q e : β„‚) (hβ‚€ : q = 2 - 2 * Complex.I) (h₁ : e = 5 + 5 * Complex.I) :
    q * e = 20 := by
  -- aesop?
  sorry

theorem amc12b_2021_p21 (S : Finset ℝ)
  (hβ‚€ : βˆ€ x : ℝ, x ∈ S ↔ 0 < x ∧ x ^ (2 : ℝ) ^ Real.sqrt 2 = Real.sqrt 2 ^ (2 : ℝ) ^ x) :
  (↑2 ≀ βˆ‘ k in S, k) ∧ (βˆ‘ k in S, k) < 6 := by
  sorry

theorem mathd_algebra_405 (S : Finset β„•) (hβ‚€ : βˆ€ x, x ∈ S ↔ 0 < x ∧ x ^ 2 + 4 * x + 4 < 20) :
  S.card = 2 := by
  sorry

theorem numbertheory_sumkmulnckeqnmul2pownm1 (n : β„•) (hβ‚€ : 0 < n) :
  (βˆ‘ k in Finset.Icc 1 n, k * Nat.choose n k) = n * 2 ^ (n - 1) := by
  sorry

theorem mathd_algebra_393 (Οƒ : Equiv ℝ ℝ) (hβ‚€ : βˆ€ x, Οƒ.1 x = 4 * x ^ 3 + 1) : Οƒ.2 33 = 2 := by
  -- aesop?
  simp_all only [Equiv.toFun_as_coe, Equiv.invFun_as_coe]
  rw [Οƒ.symm_apply_eq]
  simp_all only
  norm_cast

theorem amc12b_2004_p3 (x y : β„•) (hβ‚€ : 2 ^ x * 3 ^ y = 1296) : x + y = 8 := by
  sorry

theorem mathd_numbertheory_303 (S : Finset β„•)
  (hβ‚€ : βˆ€ n : β„•, n ∈ S ↔ 2 ≀ n ∧ 171 ≑ 80 [MOD n] ∧ 468 ≑ 13 [MOD n]) : (βˆ‘ k in S, k) = 111 := by
  sorry

theorem mathd_algebra_151 : Int.ceil (Real.sqrt 27) - Int.floor (Real.sqrt 26) = 1 := by
  sorry

theorem amc12a_2011_p18 (x y : ℝ) (hβ‚€ : abs (x + y) + abs (x - y) = 2) :
  x ^ 2 - 6 * x + y ^ 2 ≀ 8 := by
  sorry

theorem mathd_algebra_15 (s : β„• β†’ β„• β†’ β„•)
    (hβ‚€ : βˆ€ a b, 0 < a ∧ 0 < b β†’ s a b = a ^ (b : β„•) + b ^ (a : β„•)) : s 2 6 = 100 := by
  -- aesop?
  simp_all only [and_imp, zero_lt_two, zero_lt_succ]
  apply Eq.refl

theorem mathd_numbertheory_211 :
  Finset.card (Finset.filter (fun n => 6 ∣ 4 * ↑n - (2 : β„€)) (Finset.range 60)) = 20 := by
  -- aesop?
  apply Eq.refl

theorem mathd_numbertheory_640 : (91145 + 91146 + 91147 + 91148) % 4 = 2 := by
  -- aesop?
  apply Eq.refl

theorem amc12b_2003_p6 (a r : ℝ) (u : β„• β†’ ℝ) (hβ‚€ : βˆ€ k, u k = a * r ^ k) (h₁ : u 1 = 2)
  (hβ‚‚ : u 3 = 6) : u 0 = 2 / Real.sqrt 3 ∨ u 0 = -(2 / Real.sqrt 3) := by
  sorry

theorem algebra_2rootsintpoly_am10tap11eqasqpam110 (a : β„‚) :
    (a - 10) * (a + 11) = a ^ 2 + a - 110 := by
  -- aesop?
  ring

theorem aime_1991_p1 (x y : β„•) (hβ‚€ : 0 < x ∧ 0 < y) (h₁ : x * y + (x + y) = 71)
  (hβ‚‚ : x ^ 2 * y + x * y ^ 2 = 880) : x ^ 2 + y ^ 2 = 146 := by
  sorry  -- by simp stucks

theorem mathd_algebra_43 (a b : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = a * x + b) (h₁ : f 7 = 4)
  (hβ‚‚ : f 6 = 3) : f 3 = 0 := by
  -- aesop?
  simp_all only
  linarith

theorem imo_1988_p6 (a b : β„•) (hβ‚€ : 0 < a ∧ 0 < b) (h₁ : a * b + 1 ∣ a ^ 2 + b ^ 2) :
  βˆƒ x : β„•, (x ^ 2 : ℝ) = (a ^ 2 + b ^ 2) / (a * b + 1) := by
  sorry

theorem aime_1996_p5 (a b c r s t : ℝ) (f g : ℝ β†’ ℝ)
  (hβ‚€ : βˆ€ x, f x = x ^ 3 + 3 * x ^ 2 + 4 * x - 11) (h₁ : βˆ€ x, g x = x ^ 3 + r * x ^ 2 + s * x + t)
  (hβ‚‚ : f a = 0) (h₃ : f b = 0) (hβ‚„ : f c = 0) (hβ‚… : g (a + b) = 0) (h₆ : g (b + c) = 0)
  (h₇ : g (c + a) = 0) (hβ‚ˆ : List.Pairwise (Β· β‰  Β·) [a, b, c]) : t = 23 := by
  sorry

theorem mathd_algebra_55 (q p : ℝ) (hβ‚€ : q = 2 - 4 + 6 - 8 + 10 - 12 + 14)
  (h₁ : p = 3 - 6 + 9 - 12 + 15 - 18 + 21) : q / p = 2 / 3 := by
  -- aesop?
  aesop_subst [hβ‚€, h₁]
  norm_num

theorem algebra_sqineq_2at2pclta2c2p41pc (a c : ℝ) :
  2 * a * (2 + c) ≀ a ^ 2 + c ^ 2 + 4 * (1 + c) := by
  sorry

theorem mathd_numbertheory_43 : IsGreatest { n : β„• | 15 ^ n ∣ 942! } 233 := by
  sorry

theorem mathd_algebra_214 (a : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = a * (x - 2) ^ 2 + 3) (h₁ : f 4 = 4) :
  f 6 = 7 := by
  -- aesop?
  simp_all only [rpow_two]
  linarith

theorem mathd_algebra_96 (x y z a : ℝ) (hβ‚€ : 0 < x ∧ 0 < y ∧ 0 < z)
  (h₁ : Real.log x - Real.log y = a) (hβ‚‚ : Real.log y - Real.log z = 15)
  (h₃ : Real.log z - Real.log x = -7) : a = -8 := by
  -- aesop?
  aesop_subst h₁
  unhygienic with_reducible aesop_destruct_products
  linarith

theorem amc12_2001_p2 (a b n : β„•) (hβ‚€ : 1 ≀ a ∧ a ≀ 9) (h₁ : 0 ≀ b ∧ b ≀ 9) (hβ‚‚ : n = 10 * a + b)
  (h₃ : n = a * b + a + b) : b = 9 := by
  rw [hβ‚‚] at h₃
  simp at h₃
  have hβ‚„ : 10 * a = (b + 1) * a := by linarith
  simp at hβ‚„
  cases' hβ‚„ with hβ‚… h₆
  linarith
  exfalso
  simp_all [le_refl]

theorem mathd_algebra_185 (s : Finset β„€) (f : β„€ β†’ β„€) (hβ‚€ : βˆ€ x, f x = abs (x + 4))
  (h₁ : βˆ€ x, x ∈ s ↔ f x < 9) : s.card = 17 := by
  sorry

theorem algebra_binomnegdiscrineq_10alt28asqp1 (a : ℝ) : 10 * a ≀ 28 * a ^ 2 + 1 := by
  sorry

theorem mathd_numbertheory_284 (a b : β„•) (hβ‚€ : 1 ≀ a ∧ a ≀ 9 ∧ b ≀ 9)
  (h₁ : 10 * a + b = 2 * (a + b)) : 10 * a + b = 18 := by
  sorry

theorem amc12a_2009_p2 : 1 + 1 / (1 + 1 / (1 + 1)) = (5 : β„š) / 3 := by
  -- aesop?
  simp_all only [one_div]
  norm_num

theorem mathd_numbertheory_709 (n : β„•) (hβ‚€ : 0 < n) (h₁ : Finset.card (Nat.divisors (2 * n)) = 28)
  (hβ‚‚ : Finset.card (Nat.divisors (3 * n)) = 30) : Finset.card (Nat.divisors (6 * n)) = 35 := by
  sorry

theorem amc12a_2013_p8 (x y : ℝ) (hβ‚€ : x β‰  0) (h₁ : y β‰  0) (hβ‚‚ : x β‰  y)
  (h₃ : x + 2 / x = y + 2 / y) : x * y = 2 := by
  sorry

theorem mathd_numbertheory_461 (n : β„•)
  (hβ‚€ : n = Finset.card (Finset.filter (fun x => Nat.gcd x 8 = 1) (Finset.Icc 1 7))) :
  3 ^ n % 8 = 1 := by
  -- aesop?
  aesop_subst hβ‚€
  apply Eq.refl

theorem mathd_algebra_59 (b : ℝ) (hβ‚€ : (4 : ℝ) ^ b + 2 ^ 3 = 12) : b = 1 := by
  sorry

theorem mathd_algebra_234 (d : ℝ) (hβ‚€ : 27 / 125 * d = 9 / 25) : 3 / 5 * d ^ 3 = 25 / 9 := by
  sorry

-- Solution encoded in the theorem statement.
-- The conclusion is too weak.
theorem imo_1973_p3 (a b : ℝ) (hβ‚€ : βˆƒ x, x ^ 4 + a * x ^ 3 + b * x ^ 2 + a * x + 1 = 0) :
  4 / 5 ≀ a ^ 2 + b ^ 2 := by
  sorry

theorem amc12b_2020_p5 (a b : β„•) (hβ‚€ : (5 : β„š) / 8 * b = 2 / 3 * a + 7)
  (h₁ : (b : β„š) - 5 / 8 * b = a - 2 / 3 * a + 7) : a = 42 := by
  sorry

theorem numbertheory_sqmod3in01d (a : β„€) : a ^ 2 % 3 = 0 ∨ a ^ 2 % 3 = 1 := by
  sorry

theorem mathd_algebra_131 (a b : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = 2 * x ^ 2 - 7 * x + 2)
  (h₁ : f a = 0) (hβ‚‚ : f b = 0) (h₃ : a β‰  b) : 1 / (a - 1) + 1 / (b - 1) = -1 := by
  sorry

theorem amc12b_2003_p17 (x y : ℝ) (hβ‚€ : 0 < x ∧ 0 < y) (h₁ : Real.log (x * y ^ 3) = 1)
  (hβ‚‚ : Real.log (x ^ 2 * y) = 1) : Real.log (x * y) = 3 / 5 := by
  sorry

theorem mathd_algebra_536 : ↑3! * ((2 : ℝ) ^ 3 + Real.sqrt 9) / 2 = (33 : ℝ) := by
  sorry

theorem mathd_algebra_22 : Real.logb (5 ^ 2) (5 ^ 4) = 2 := by
  sorry

theorem numbertheory_xsqpysqintdenomeq (x y : β„š) (hβ‚€ : (x ^ 2 + y ^ 2).den = 1) : x.den = y.den := by
  sorry

theorem aimeII_2001_p3 (x : β„• β†’ β„€) (hβ‚€ : x 1 = 211) (hβ‚‚ : x 2 = 375) (h₃ : x 3 = 420)
  (hβ‚„ : x 4 = 523) (h₆ : βˆ€ n β‰₯ 5, x n = x (n - 1) - x (n - 2) + x (n - 3) - x (n - 4)) :
  x 531 + x 753 + x 975 = 898 := by
  sorry

theorem mathd_numbertheory_22 (b : β„•) (hβ‚€ : b < 10)
  (h₁ : Nat.sqrt (10 * b + 6) * Nat.sqrt (10 * b + 6) = 10 * b + 6) : b = 3 ∨ b = 1 := by
  sorry

theorem aime_1987_p8 :
  IsGreatest { n : β„• | 0 < n ∧ βˆƒ! k : β„•, (8 : ℝ) / 15 < n / (n + k) ∧ (n : ℝ) / (n + k) < 7 / 13 } 112 := by
  sorry

theorem mathd_numbertheory_136 (n : β„•) (hβ‚€ : 123 * n + 17 = 39500) : n = 321 := by
  -- aesop?
  simp_all only [succ.injEq]
  linarith

theorem amc12_2000_p11 (a b : ℝ) (hβ‚€ : a β‰  0 ∧ b β‰  0) (h₁ : a * b = a - b) :
    a / b + b / a - a * b = 2 := by
  field_simp [hβ‚€.1, hβ‚€.2]
  simp only [h₁, mul_comm, mul_sub]
  ring

theorem amc12b_2003_p9 (a b : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = a * x + b) (h₁ : f 6 - f 2 = 12) :
    f 12 - f 2 = 30 := by
  -- aesop?
  simp_all only [add_sub_add_right_eq_sub]
  linarith

theorem algebra_2complexrootspoly_xsqp49eqxp7itxpn7i (x : β„‚) :
    x ^ 2 + 49 = (x + 7 * Complex.I) * (x + -7 * Complex.I) := by
  -- aesop?
  simp_all only [Complex.cpow_two, neg_mul]
  ring
  simp_all only [Complex.I_sq, neg_mul, one_mul, sub_neg_eq_add]
  ring

theorem mathd_numbertheory_198 : 5 ^ 2005 % 100 = 25 := by
  -- aesop?
  apply Eq.refl

theorem mathd_algebra_149 (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x < -5, f x = x ^ 2 + 5)
  (h₁ : βˆ€ x β‰₯ -5, f x = 3 * x - 8) (hβ‚‚ : Fintype (f ⁻¹' {10})) :
  (βˆ‘ k in (f ⁻¹' {10}).toFinset, k) = 6 := by
  sorry

theorem mathd_algebra_132 (x : ℝ) (f g : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = x + 2) (h₁ : βˆ€ x, g x = x ^ 2)
  (hβ‚‚ : f (g x) = g (f x)) : x = -1 / 2 := by
  -- aesop?
  simp_all only [rpow_two]
  linarith

theorem mathd_numbertheory_37 : Nat.lcm 9999 100001 = 90900909 := by
  -- aesop?
  apply Eq.refl

theorem aime_1983_p9 (x : ℝ) (hβ‚€ : 0 < x ∧ x < Real.pi) :
  12 ≀ (9 * (x ^ 2 * Real.sin x ^ 2) + 4) / (x * Real.sin x) := by
  sorry

theorem mathd_algebra_37 (x y : ℝ) (hβ‚€ : x + y = 7) (h₁ : 3 * x + y = 45) : x ^ 2 - y ^ 2 = 217 := by
  sorry

theorem mathd_numbertheory_458 (n : β„•) (hβ‚€ : n % 8 = 7) : n % 4 = 3 := by
  sorry

theorem amc12a_2008_p15 (k : β„•) (hβ‚€ : k = 2008 ^ 2 + 2 ^ 2008) : (k ^ 2 + 2 ^ k) % 10 = 6 := by
  sorry

theorem mathd_numbertheory_301 (j : β„•) (hβ‚€ : 0 < j) : 3 * (7 * ↑j + 3) % 7 = 2 := by
  calc
    3 * (7 * ↑j + 3) % 7 = (3 * 3 + 3 * ↑j * 7) % 7 := by ring_nf
    _ = 3 * 3 % 7 := by apply Nat.add_mul_mod_self_right
    _ = 2 := by norm_num


theorem amc12a_2009_p15 (n : β„•) (hβ‚€ : 0 < n)
  (h₁ : (βˆ‘ k in Finset.Icc 1 n, ↑k * Complex.I ^ k) = 48 + 49 * Complex.I) : n = 97 := by
  sorry

theorem algebra_sqineq_36azm9asqle36zsq (z a : ℝ) : 36 * (a * z) - 9 * a ^ 2 ≀ 36 * z ^ 2 := by
  sorry

theorem amc12a_2013_p7 (s : β„• β†’ ℝ) (hβ‚€ : βˆ€ n, s (n + 2) = s (n + 1) + s n) (h₁ : s 9 = 110)
    (hβ‚‚ : s 7 = 42) : s 4 = 10 := by
  -- aesop?
  simp_all only [zero_add]
  linarith

theorem mathd_algebra_104 (x : ℝ) (hβ‚€ : 125 / 8 = x / 12) : x = 375 / 2 := by
  -- aesop?
  linarith

theorem mathd_numbertheory_252 : 7! % 23 = 3 := by
  -- aesop?
  apply Eq.refl

theorem amc12a_2020_p21 (S : Finset β„•)
  (hβ‚€ : βˆ€ n : β„•, n ∈ S ↔ 5 ∣ n ∧ Nat.lcm 5! n = 5 * Nat.gcd 10! n) : S.card = 48 := by
  sorry

theorem mathd_algebra_493 (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = x ^ 2 - 4 * Real.sqrt x + 1) :
    f (f 4) = 70 := by
  sorry

theorem numbertheory_nckeqnm1ckpnm1ckm1 (n k : β„•) (hβ‚€ : 0 < n ∧ 0 < k) (h₁ : k ≀ n) :
  Nat.choose n k = Nat.choose (n - 1) k + Nat.choose (n - 1) (k - 1) := by
  sorry

theorem algebra_3rootspoly_amdtamctambeqnasqmbpctapcbtdpasqmbpctapcbta (b c d a : β„‚) :
    (a - d) * (a - c) * (a - b) =
      -((a ^ 2 - (b + c) * a + c * b) * d) + (a ^ 2 - (b + c) * a + c * b) * a := by
  -- TODO: `aesop` stucks here but `suggest_tactics` works
  ring

theorem mathd_numbertheory_403 : (βˆ‘ k in Nat.properDivisors 198, k) = 270 := by
  -- aesop?
  apply Eq.refl

theorem mathd_algebra_190 : ((3 : ℝ) / 8 + 7 / 8) / (4 / 5) = 25 / 16 := by
  -- aesop?
  norm_num

theorem mathd_numbertheory_269 : (2005 ^ 2 + 2005 ^ 0 + 2005 ^ 0 + 2005 ^ 5) % 100 = 52 := by
  -- aesop?
  simp_all only [_root_.pow_zero]
  apply Eq.refl

theorem aime_1990_p2 :
  (52 + 6 * Real.sqrt 43) ^ ((3 : ℝ) / 2) - (52 - 6 * Real.sqrt 43) ^ ((3 : ℝ) / 2) = 828 := by
  sorry  -- aesop stucks

theorem mathd_numbertheory_101 : 17 * 18 % 4 = 2 := by
  -- aesop?
  apply Eq.refl

theorem algebra_sqineq_4bap1lt4bsqpap1sq (a b : ℝ) : 4 * b * (a + 1) ≀ 4 * b ^ 2 + (a + 1) ^ 2 := by
  sorry

theorem mathd_numbertheory_156 (n : β„•) (hβ‚€ : 0 < n) : Nat.gcd (n + 7) (2 * n + 1) ≀ 13 := by
  sorry

theorem mathd_algebra_451 (Οƒ : Equiv ℝ ℝ) (hβ‚€ : Οƒ.2 (-15) = 0) (h₁ : Οƒ.2 0 = 3) (hβ‚‚ : Οƒ.2 3 = 9)
    (h₃ : Οƒ.2 9 = 20) : Οƒ.1 (Οƒ.1 9) = 0 := by
  simp only [Equiv.invFun_as_coe, eq_comm] at hβ‚€ h₁ hβ‚‚ h₃
  simp only [Equiv.toFun_as_coe]
  rw [← Equiv.apply_eq_iff_eq_symm_apply Οƒ] at hβ‚‚
  rw [← Equiv.apply_eq_iff_eq_symm_apply Οƒ] at h₁
  have hβ‚„ := (Equiv.apply_eq_iff_eq Οƒ).mpr hβ‚‚
  rw [h₁] at hβ‚„
  exact hβ‚„

theorem mathd_algebra_144 (a b c d : β„•) (hβ‚€ : 0 < a ∧ 0 < b ∧ 0 < c ∧ 0 < d) (hβ‚€ : (c : β„€) - b = d)
    (h₁ : (b : β„€) - a = d) (hβ‚‚ : a + b + c = 60) (h₃ : a + b > c) : d < 10 := by
  -- aesop?
  rename_i hβ‚€_1
  simp_all only [gt_iff_lt]
  unhygienic with_reducible aesop_destruct_products
  linarith

theorem mathd_algebra_282 (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x : ℝ, Β¬ (Irrational x) β†’ f x = abs (Int.floor x))
  (h₁ : βˆ€ x, Irrational x β†’ f x = (Int.ceil x) ^ 2) :
  f (8 ^ (1 / 3)) + f (-Real.pi) + f (Real.sqrt 50) + f (9 / 2) = 79 := by
  sorry

theorem mathd_algebra_410 (x y : ℝ) (hβ‚€ : y = x ^ 2 - 6 * x + 13) : 4 ≀ y := by
  sorry

theorem mathd_numbertheory_232 (x y z : ZMod 31) (hβ‚€ : x = 3⁻¹) (h₁ : y = 5⁻¹)
  (hβ‚‚ : z = (x + y)⁻¹) : z = 29 := by
  -- aesop?
  aesop_subst [hβ‚‚, h₁, hβ‚€]
  apply Eq.refl

theorem mathd_algebra_77 (a b : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : a β‰  0 ∧ b β‰  0) (h₁ : a β‰  b)
  (hβ‚‚ : βˆ€ x, f x = x ^ 2 + a * x + b) (h₃ : f a = 0) (hβ‚„ : f b = 0) : a = 1 ∧ b = -2 := by
  sorry

-- Solution encoded in the theorem statement.
-- The conclusion is too weak. It doesn't show s can be any number in [1, 2]
theorem imo_1974_p5 (a b c d s : ℝ) (hβ‚€ : 0 < a ∧ 0 < b ∧ 0 < c ∧ 0 < d)
  (h₁ : s = a / (a + b + d) + b / (a + b + c) + c / (b + c + d) + d / (a + c + d)) :
  1 < s ∧ s < 2 := by
  sorry

theorem aime_1988_p3 (x : ℝ) (hβ‚€ : 0 < x)
  (h₁ : Real.logb 2 (Real.logb 8 x) = Real.logb 8 (Real.logb 2 x)) : Real.logb 2 x ^ 2 = 27 := by
  sorry

theorem mathd_numbertheory_530 (n k : β„•) (hβ‚€ : 0 < n ∧ 0 < k) (hβ‚€ : (n : ℝ) / k < 6)
  (h₁ : (5 : ℝ) < n / k) : 22 ≀ Nat.lcm n k / Nat.gcd n k := by
  sorry

theorem mathd_algebra_109 (a b : ℝ) (hβ‚€ : 3 * a + 2 * b = 12) (h₁ : a = 4) : b = 0 := by
  -- aesop?
  aesop_subst h₁
  linarith

theorem imo_1967_p3 (k m n : β„•) (c : β„• β†’ β„•) (hβ‚€ : 0 < k ∧ 0 < m ∧ 0 < n)
  (h₁ : βˆ€ s, c s = s * (s + 1)) (hβ‚‚ : Nat.Prime (k + m + 1)) (h₃ : n + 1 < k + m + 1) :
  (∏ i in Finset.Icc 1 n, c i) ∣ ∏ i in Finset.Icc 1 n, c (m + i) - c k := by
  sorry

theorem mathd_algebra_11 (a b : ℝ) (hβ‚€ : a β‰  b) (h₁ : a β‰  2 * b)
    (hβ‚‚ : (4 * a + 3 * b) / (a - 2 * b) = 5) : (a + 11 * b) / (a - b) = 2 := by
  sorry

theorem amc12a_2003_p1 (u v : β„• β†’ β„•) (hβ‚€ : βˆ€ n, u n = 2 * n + 2) (h₁ : βˆ€ n, v n = 2 * n + 1) :
    ((βˆ‘ k in Finset.range 2003, u k) - βˆ‘ k in Finset.range 2003, v k) = 2003 := by
  -- aesop?
  simp_all only [ge_iff_le]
  rfl

theorem numbertheory_aneqprodakp4_anmsqrtanp1eq2 (a : β„• β†’ ℝ) (hβ‚€ : a 0 = 1)
  (h₁ : βˆ€ n, a (n + 1) = (∏ k in Finset.range (n + 1), a k) + 4) :
  βˆ€ n β‰₯ 1, a n - Real.sqrt (a (n + 1)) = 2 := by
  sorry

theorem algebra_2rootspoly_apatapbeq2asqp2ab (a b : β„‚) :
    (a + a) * (a + b) = 2 * a ^ 2 + 2 * (a * b) := by
  -- aesop?
  ring

theorem induction_sum_odd (n : β„•) : (βˆ‘ k in Finset.range n, 2 * k) + 1 = n ^ 2 := by
  sorry

theorem mathd_algebra_568 (a : ℝ) :
    (a - 1) * (a + 1) * (a + 2) - (a - 2) * (a + 1) = a ^ 3 + a ^ 2 := by
  -- aesop?
  ring

theorem mathd_algebra_616 (f g : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = x ^ 3 + 2 * x + 1)
    (h₁ : βˆ€ x, g x = x - 1) : f (g 1) = 1 := by
  -- aesop?
  simp_all

theorem mathd_numbertheory_690 :
    IsLeast { a : β„• | 0 < a ∧ a ≑ 2 [MOD 3] ∧ a ≑ 4 [MOD 5] ∧ a ≑ 6 [MOD 7] ∧ a ≑ 8 [MOD 9] } 314 := by
  sorry

theorem amc12a_2016_p2 (x : ℝ) (hβ‚€ : (10 : ℝ) ^ x * 100 ^ (2 * x) = 1000 ^ 5) : x = 3 := by
  sorry

theorem mathd_numbertheory_405 (a b c : β„•) (t : β„• β†’ β„•) (hβ‚€ : t 0 = 0) (h₁ : t 1 = 1)
  (hβ‚‚ : βˆ€ n > 1, t n = t (n - 2) + t (n - 1)) (h₃ : a ≑ 5 [MOD 16]) (hβ‚„ : b ≑ 10 [MOD 16])
  (hβ‚… : c ≑ 15 [MOD 16]) : (t a + t b + t c) % 7 = 5 := by
  sorry

theorem mathd_numbertheory_110 (a b : β„•) (hβ‚€ : 0 < a ∧ 0 < b ∧ b ≀ a) (h₁ : (a + b) % 10 = 2)
  (hβ‚‚ : (2 * a + b) % 10 = 1) : (a - b) % 10 = 6 := by
  sorry

theorem amc12a_2003_p25 (a b : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : 0 < b)
  (h₁ : βˆ€ x, f x = Real.sqrt (a * x ^ 2 + b * x)) (hβ‚‚ : { x | 0 ≀ f x } = f '' { x | 0 ≀ f x }) :
  a = 0 ∨ a = -4 := by
  sorry

theorem amc12a_2010_p10 (p q : ℝ) (a : β„• β†’ ℝ) (hβ‚€ : βˆ€ n, a (n + 2) - a (n + 1) = a (n + 1) - a n)
  (h₁ : a 1 = p) (hβ‚‚ : a 2 = 9) (h₃ : a 3 = 3 * p - q) (hβ‚„ : a 4 = 3 * p + q) : a 2010 = 8041 := by
  sorry

theorem mathd_algebra_509 :
  Real.sqrt ((5 / Real.sqrt 80 + Real.sqrt 845 / 9 + Real.sqrt 45) / Real.sqrt 5) = 13 / 6 := by
  sorry

theorem mathd_algebra_159 (b : ℝ) (f : ℝ β†’ ℝ)
  (hβ‚€ : βˆ€ x, f x = 3 * x ^ 4 - 7 * x ^ 3 + 2 * x ^ 2 - b * x + 1) (h₁ : f 1 = 1) : b = -2 := by
  -- aesop?
  simp_all only [rpow_two, one_rpow, mul_one, one_pow, add_left_eq_self]
  linarith

theorem aime_1997_p11 (x : ℝ)
    (hβ‚€ :
      x =
        (βˆ‘ n in Finset.Icc (1 : β„•) 44, Real.cos (n * Ο€ / 180)) /
          βˆ‘ n in Finset.Icc (1 : β„•) 44, Real.sin (n * Ο€ / 180)) :
    Int.floor (100 * x) = 241 := by
  sorry

theorem aimeI_2000_p7 (x y z : ℝ) (m : β„š) (hβ‚€ : 0 < x ∧ 0 < y ∧ 0 < z) (h₁ : x * y * z = 1)
  (hβ‚‚ : x + 1 / z = 5) (h₃ : y + 1 / x = 29) (hβ‚„ : z + 1 / y = m) (hβ‚… : 0 < m) :
  ↑m.den + m.num = 5 := by
  sorry

theorem aime_1988_p4 (n : β„•) (a : β„• β†’ ℝ) (hβ‚€ : βˆ€ n, abs (a n) < 1)
  (h₁ : (βˆ‘ k in Finset.range n, abs (a k)) = 19 + abs (βˆ‘ k in Finset.range n, a k)) : 20 ≀ n := by
  sorry

theorem induction_divisibility_9div10tonm1 (n : β„•) (hβ‚€ : 0 < n) : 9 ∣ 10 ^ n - 1 := by
  sorry

theorem mathd_numbertheory_126 (x a : β„•) (hβ‚€ : 0 < x ∧ 0 < a) (h₁ : Nat.gcd a 40 = x + 3)
  (hβ‚‚ : Nat.lcm a 40 = x * (x + 3))
  (h₃ : βˆ€ b : β„•, 0 < b β†’ Nat.gcd b 40 = x + 3 ∧ Nat.lcm b 40 = x * (x + 3) β†’ a ≀ b) : a = 8 := by
  sorry

theorem mathd_algebra_323 (Οƒ : Equiv ℝ ℝ) (h : βˆ€ x, Οƒ.1 x = x ^ 3 - 8) : Οƒ.2 (Οƒ.1 (Οƒ.2 19)) = 3 := by
  sorry

theorem mathd_algebra_421 (a b c d : ℝ) (hβ‚€ : b = a ^ 2 + 4 * a + 6)
  (h₁ : b = 1 / 2 * a ^ 2 + a + 6) (hβ‚‚ : d = c ^ 2 + 4 * c + 6) (h₃ : d = 1 / 2 * c ^ 2 + c + 6)
  (hβ‚„ : a < c) : c - a = 6 := by
  sorry

theorem imo_1987_p6 (p : β„•) (f : β„• β†’ β„•) (hβ‚€ : βˆ€ x, f x = x ^ 2 + x + p)
  (hβ‚€ : βˆ€ k : β„•, k ≀ Nat.floor (Real.sqrt (p / 3)) β†’ Nat.Prime (f k)) :
   βˆ€ i ≀ p - 2, Nat.Prime (f i) := by
  sorry

theorem amc12a_2009_p25 (a : β„• β†’ ℝ) (hβ‚€ : a 1 = 1) (h₁ : a 2 = 1 / Real.sqrt 3)
  (hβ‚‚ : βˆ€ n, 1 ≀ n β†’ a (n + 2) = (a n + a (n + 1)) / (1 - a n * a (n + 1))) : abs (a 2009) = 0 := by
  sorry

-- Geometry probem that shouldn't be formalized like this.
theorem imo_1961_p1 (x y z a b : ℝ) (hβ‚€ : 0 < x ∧ 0 < y ∧ 0 < z) (h₁ : x β‰  y) (hβ‚‚ : y β‰  z)
  (h₃ : z β‰  x) (hβ‚„ : x + y + z = a) (hβ‚… : x ^ 2 + y ^ 2 + z ^ 2 = b ^ 2) (h₆ : x * y = z ^ 2) :
  0 < a ∧ b ^ 2 < a ^ 2 ∧ a ^ 2 < 3 * b ^ 2 := by
  sorry  -- aesop stucks

theorem mathd_algebra_31 (x : NNReal) (u : β„• β†’ NNReal) (hβ‚€ : βˆ€ n, u (n + 1) = NNReal.sqrt (x + u n))
  (h₁ : Filter.Tendsto u Filter.atTop (𝓝 9)) : 9 = NNReal.sqrt (x + 9) := by
  sorry

theorem algebra_manipexpr_apbeq2cceqiacpbceqm2 (a b c : β„‚) (hβ‚€ : a + b = 2 * c)
  (h₁ : c = Complex.I) : a * c + b * c = -2 := by
  rw [← add_mul, hβ‚€, h₁, mul_assoc, Complex.I_mul_I]
  ring

theorem mathd_numbertheory_370 (n : β„•) (hβ‚€ : n % 7 = 3) : (2 * n + 1) % 7 = 0 := by
  sorry

theorem mathd_algebra_437 (x y : ℝ) (n : β„€) (hβ‚€ : x ^ 3 = -45) (h₁ : y ^ 3 = -101) (hβ‚‚ : x < n)
  (h₃ : ↑n < y) : n = -4 := by
  sorry

-- Solution encoded in the theorem statement.
-- Conclusion too weak. It doesn't show "if and only if"
theorem imo_1966_p5 (x a : β„• β†’ ℝ) (hβ‚€ : a 1 β‰  a 2) (h₁ : a 1 β‰  a 3) (hβ‚‚ : a 1 β‰  a 4)
  (h₃ : a 2 β‰  a 3) (hβ‚„ : a 2 β‰  a 4) (hβ‚… : a 3 β‰  a 4) (h₆ : a 1 > a 2) (h₇ : a 2 > a 3)
  (hβ‚ˆ : a 3 > a 4)
  (h₉ : abs (a 1 - a 2) * x 2 + abs (a 1 - a 3) * x 3 + abs (a 1 - a 4) * x 4 = 1)
  (h₁₀ : abs (a 2 - a 1) * x 1 + abs (a 2 - a 3) * x 3 + abs (a 2 - a 4) * x 4 = 1)
  (h₁₁ : abs (a 3 - a 1) * x 1 + abs (a 3 - a 2) * x 2 + abs (a 3 - a 4) * x 4 = 1)
  (h₁₂ : abs (a 4 - a 1) * x 1 + abs (a 4 - a 2) * x 2 + abs (a 4 - a 3) * x 3 = 1) :
  x 2 = 0 ∧ x 3 = 0 ∧ x 1 = 1 / abs (a 1 - a 4) ∧ x 4 = 1 / abs (a 1 - a 4) := by
  sorry

theorem mathd_algebra_89 (b : ℝ) (hβ‚€ : b β‰  0) :
  (7 * b ^ 3) ^ 2 * (4 * b ^ 2) ^ (-(3 : β„€)) = 49 / 64 := by
  sorry

theorem imo_1966_p4 (n : β„•) (x : ℝ) (hβ‚€ : βˆ€ k : β„•, 0 < k β†’ βˆ€ m : β„€, x β‰  m * Ο€ / 2 ^ k)
  (h₁ : 0 < n) :
  (βˆ‘ k in Finset.Icc 1 n, 1 / Real.sin (2 ^ k * x)) = 1 / Real.tan x - 1 / Real.tan (2 ^ n * x) := by
  sorry

theorem mathd_algebra_67 (f g : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = 5 * x + 3) (h₁ : βˆ€ x, g x = x ^ 2 - 2) :
    g (f (-1)) = 2 := by
  -- aesop?
  simp_all only [rpow_two, mul_neg, mul_one]
  norm_num

theorem mathd_numbertheory_326 (n : β„€) (hβ‚€ : (n - 1) * n * (n + 1) = 720 ) : n + 1 = 10 := by
  sorry

theorem induction_divisibility_3div2tooddnp1 (n : β„•) : 3 ∣ 2 ^ (2 * n + 1) + 1 := by
  sorry

theorem mathd_algebra_123 (a b : β„•) (hβ‚€ : 0 < a ∧ 0 < b) (h₁ : a + b = 20) (hβ‚‚ : a = 3 * b) :
  a - b = 10 := by
  sorry

theorem algebra_2varlineareq_xpeeq7_2xpeeq3_eeq11_xeqn4 (x e : β„‚) (hβ‚€ : x + e = 7)
  (h₁ : 2 * x + e = 3) : e = 11 ∧ x = -4 := by
  sorry

theorem imo_1993_p5 : βˆƒ f : β„• β†’ β„•, f 1 = 2 ∧ βˆ€ n, f (f n) = f n + n ∧ βˆ€ n, f n < f (n + 1) := by
  sorry

theorem numbertheory_prmdvsneqnsqmodpeq0 (n : β„€) (p : β„•) (hβ‚€ : Nat.Prime p) :
  ↑p ∣ n ↔ n ^ 2 % p = 0 := by
  sorry

theorem imo_1964_p1_1 (n : β„•) (hβ‚€ : 7 ∣ 2 ^ n - 1) : 3 ∣ n := by
  sorry

theorem imo_1990_p3 (n : β„•) (hβ‚€ : 2 ≀ n) (h₁ : n ^ 2 ∣ 2 ^ n + 1) : n = 3 := by
  sorry

theorem induction_ineq_nsqlefactn (n : β„•) (hβ‚€ : 4 ≀ n) : n ^ 2 ≀ n ! := by
  sorry

theorem mathd_numbertheory_30 :
  (33818 ^ 2 + 33819 ^ 2 + 33820 ^ 2 + 33821 ^ 2 + 33822 ^ 2) % 17 = 0 := by
  -- aesop?
  apply Eq.refl

theorem mathd_algebra_267 (x : ℝ) (hβ‚€ : x β‰  1) (h₁ : x β‰  -2)
  (hβ‚‚ : (x + 1) / (x - 1) = (x - 2) / (x + 2)) : x = 0 := by
  sorry

theorem mathd_numbertheory_961 : 2003 % 11 = 1 := by
  -- aesop?
  apply Eq.refl

theorem induction_seq_mul2pnp1 (n : β„•) (u : β„• β†’ β„•) (hβ‚€ : u 0 = 0)
  (h₁ : βˆ€ n, u (n + 1) = 2 * u n + (n + 1)) : u n = 2 ^ (n + 1) - (n + 2) := by
  sorry

theorem amc12a_2002_p12 (f : ℝ β†’ ℝ) (k : ℝ) (a b : β„•) (hβ‚€ : βˆ€ x, f x = x ^ 2 - 63 * x + k)
  (h₁ : f a = 0 ∧ f b = 0) (hβ‚‚ : a β‰  b) (h₃ : Nat.Prime a ∧ Nat.Prime b) : k = 122 := by
  sorry

theorem algebra_manipexpr_2erprsqpesqeqnrpnesq (e r : β„‚) :
  2 * (e * r) + (e ^ 2 + r ^ 2) = (-r + -e) ^ 2 := by
  -- aesop?
  ring

theorem mathd_algebra_119 (d e : ℝ) (hβ‚€ : 2 * d = 17 * e - 8) (h₁ : 2 * e = d - 9) : e = 2 := by
  -- aesop?
  linarith

theorem amc12a_2020_p13 (a b c : β„•) (n : NNReal) (hβ‚€ : n β‰  1) (h₁ : 1 < a ∧ 1 < b ∧ 1 < c)
  (hβ‚‚ : (n * (n * n ^ (1 / c)) ^ (1 / b)) ^ (1 / a) = (n ^ 25) ^ (1 / 36)) : b = 3 := by
  sorry

-- Solution encoded in the theorem statement.
-- The conclusion is too weak. It doesn't prevent other solutions.
theorem imo_1977_p5 (a b q r : β„•) (hβ‚€ : r < a + b) (h₁ : a ^ 2 + b ^ 2 = (a + b) * q + r)
  (hβ‚‚ : q ^ 2 + r = 1977) :
  abs ((a : β„€) - 22) = 15 ∧ abs ((b : β„€) - 22) = 28 ∨
    abs ((a : β„€) - 22) = 28 ∧ abs ((b : β„€) - 22) = 15 := by
  sorry

theorem numbertheory_2dvd4expn (n : β„•) (hβ‚€ : n β‰  0) : 2 ∣ 4 ^ n := by
  revert n hβ‚€
  rintro ⟨k, rfl⟩
  Β· norm_num
  apply dvd_pow
  norm_num

theorem amc12a_2010_p11 (x b : ℝ) (hβ‚€ : 0 < b) (h₁ : (7 : ℝ) ^ (x + 7) = 8 ^ x)
  (hβ‚‚ : x = Real.logb b (7 ^ 7)) : b = 8 / 7 := by
  sorry

theorem amc12a_2003_p24 :
  IsGreatest { y : ℝ | βˆƒ a b : ℝ, 1 < b ∧ b ≀ a ∧ y = Real.logb a (a / b) + Real.logb b (b / a) }
    0 := by
  sorry

theorem amc12a_2002_p1 (f : β„‚ β†’ β„‚) (hβ‚€ : βˆ€ x, f x = (2 * x + 3) * (x - 4) + (2 * x + 3) * (x - 6))
  (h₁ : Fintype (f ⁻¹' {0})) : (βˆ‘ y in (f ⁻¹' {0}).toFinset, y) = 7 / 2 := by
  sorry

theorem mathd_algebra_206 (a b : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : βˆ€ x, f x = x ^ 2 + a * x + b) (h₁ : 2 * a β‰  b)
  (hβ‚‚ : f (2 * a) = 0) (h₃ : f b = 0) : a + b = -1 := by
  sorry

theorem mathd_numbertheory_92 (n : β„•) (hβ‚€ : 5 * n % 17 = 8) : n % 17 = 5 := by
  sorry

theorem mathd_algebra_482 (m n : β„•) (k : ℝ) (f : ℝ β†’ ℝ) (hβ‚€ : Nat.Prime m) (h₁ : Nat.Prime n)
  (hβ‚‚ : βˆ€ x, f x = x ^ 2 - 12 * x + k) (h₃ : f m = 0) (hβ‚„ : f n = 0) (hβ‚… : m β‰  n) : k = 35 := by
  sorry

theorem amc12b_2002_p3 (S : Finset β„•)
  -- note: we use (n^2 + 2 - 3 * n) over (n^2 - 3 * n + 2) because nat subtraction truncates the latter at 1 and 2
  (hβ‚€ : βˆ€ n : β„•, n ∈ S ↔ 0 < n ∧ Nat.Prime (n ^ 2 + 2 - 3 * n)) :
  S.card = 1 := by
  sorry

theorem mathd_numbertheory_668 (l r : ZMod 7) (hβ‚€ : l = (2 + 3)⁻¹) (h₁ : r = 2⁻¹ + 3⁻¹) :
  l - r = 1 := by
  -- aesop?
  aesop_subst [h₁, hβ‚€]
  apply Eq.refl

theorem mathd_algebra_251 (x : ℝ) (hβ‚€ : x β‰  0) (h₁ : 3 + 1 / x = 7 / x) : x = 2 := by
  -- aesop?
  simp_all only [ne_eq, one_div]
  field_simp [hβ‚€] at h₁
  linarith

theorem mathd_numbertheory_84 : Int.floor ((9 : ℝ) / 160 * 100) = 5 := by
  rw [Int.floor_eq_iff]
  constructor
  all_goals norm_num

theorem mathd_numbertheory_412 (x y : β„€) (hβ‚€ : x % 19 = 4) (h₁ : y % 19 = 7) :
  (x + 1) ^ 2 * (y + 5) ^ 3 % 19 = 13 := by
  sorry

theorem mathd_algebra_181 (n : ℝ) (hβ‚€ : n β‰  3) (h₁ : (n + 5) / (n - 3) = 2) : n = 11 := by
  rw [div_eq_iff] at h₁
  linarith
  exact sub_ne_zero.mpr hβ‚€

/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (y Β«expr β‰  Β» 0) -/
theorem amc12a_2016_p3 (f : ℝ β†’ ℝ β†’ ℝ)
  (hβ‚€ : βˆ€ x, βˆ€ (y) (_ : y β‰  0), f x y = x - y * Int.floor (x / y)) :
  f (3 / 8) (-(2 / 5)) = -(1 / 40) := by
  sorry

/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (n Β«expr = Β» 3) -/
theorem mathd_algebra_247 (t s : ℝ) (n : β„€) (hβ‚€ : t = 2 * s - s ^ 2) (h₁ : s = n ^ 2 - 2 ^ n + 1)
  (n) (_ : n = 3) : t = 0 := by
  sorry

theorem algebra_sqineq_2unitcircatblt1 (a b : ℝ) (hβ‚€ : a ^ 2 + b ^ 2 = 2) : a * b ≀ 1 := by
  sorry

theorem mathd_numbertheory_629 : IsLeast { t : β„• | 0 < t ∧ Nat.lcm 12 t ^ 3 = (12 * t) ^ 2 } 18 :=
  by sorry

theorem amc12a_2017_p2 (x y : ℝ) (hβ‚€ : x β‰  0) (h₁ : y β‰  0) (hβ‚‚ : x + y = 4 * (x * y)) :
  1 / x + 1 / y = 4 := by
  -- aesop?
  simp_all only [ne_eq, one_div]
  field_simp
  rwa [add_comm]

theorem algebra_amgm_sumasqdivbsqgeqsumbdiva (a b c : ℝ) (hβ‚€ : 0 < a ∧ 0 < b ∧ 0 < c) :
  a ^ 2 / b ^ 2 + b ^ 2 / c ^ 2 + c ^ 2 / a ^ 2 β‰₯ b / a + c / b + a / c := by
  sorry

theorem mathd_numbertheory_202 : (19 ^ 19 + 99 ^ 99) % 10 = 8 := by
  -- aesop?
  apply Eq.refl

theorem imo_1979_p1 (p q : β„•) (hβ‚€ : 0 < q)
  (h₁ : (βˆ‘ k in Finset.Icc (1 : β„•) 1319, (-1) ^ (k + 1) * ((1 : ℝ) / k)) = p / q) : 1979 ∣ p :=
  sorry

theorem mathd_algebra_51 (a b : ℝ) (hβ‚€ : 0 < a ∧ 0 < b) (h₁ : a + b = 35) (hβ‚‚ : a = 2 / 5 * b) :
    b - a = 15 := by
  -- aesop?
  aesop_subst hβ‚‚
  unhygienic with_reducible aesop_destruct_products
  simp_all only [gt_iff_lt, mul_pos_iff_of_pos_right]
  linarith

theorem mathd_algebra_10 : abs ((120 : ℝ) / 100 * 30 - 130 / 100 * 20) = 10 := by
  -- aesop?
  norm_num