@@ -34,6 +34,7 @@ of the proof of Fermat's Last Theorem.
34
34
35
35
We start by reducing the version of Fermat's Last Theorem for positive naturals to
36
36
Lean's version `FermatLastTheorem` of the theorem.
37
+
37
38
-/
38
39
39
40
/-- Fermat's Last Theorem as stated in mathlib (a statement `FermatLastTheorem` about naturals)
@@ -269,7 +270,7 @@ def of_not_FermatLastTheorem_coprime_p_ge_5 {a b c : ℤ} (ha : a ≠ 0) (hb : b
269
270
c := (of_not_FermatLastTheorem.aux₁ a b c).2 .2
270
271
ha0 := by
271
272
unfold of_not_FermatLastTheorem.aux₁
272
- split <;> split <;> try split
273
+ split <;> split <;> try split -- how come `split` doesn't do this all in one go?
273
274
· exact ha
274
275
· rwa [← Int.neg_ne_zero] at ha
275
276
· exact hb
@@ -283,17 +284,20 @@ def of_not_FermatLastTheorem_coprime_p_ge_5 {a b c : ℤ} (ha : a ≠ 0) (hb : b
283
284
hFLT := by
284
285
have negonepow : (-1 : ℤ) ^ p = -1 := by
285
286
rw [neg_one_pow_eq_pow_mod_two]
286
- sorry
287
+ have := Fact.mk hpprime
288
+ rw [Nat.Prime.mod_two_eq_one_iff_ne_two.2 ]
289
+ · simp
290
+ · linarith
287
291
unfold of_not_FermatLastTheorem.aux₁
288
292
split <;> split <;> try split
289
293
· exact h
290
294
· linear_combination (-1 )^p * h
291
295
· linear_combination h
292
296
· linear_combination (-1 )^p * h
293
- · rw [neg_pow c, neg_pow b]
294
- simp
295
- sorry
296
- · sorry
297
+ · rw [neg_pow c, neg_pow b, negonepow ]
298
+ linear_combination h
299
+ · rw [neg_pow a, negonepow]
300
+ linear_combination -h
297
301
hgcdab := sorry
298
302
ha4 := of_not_FermatLastTheorem.aux₁.ha4 b c hab
299
303
hb2 := sorry
@@ -389,12 +393,14 @@ abbrev Qbar := AlgebraicClosure ℚ
389
393
390
394
open WeierstrassCurve
391
395
392
- abbrev p_torsion (P : FreyPackage) : Type := sorry -- (FreyCurve P)⟮Qbar⟯[ p ]
396
+ -- this is wrong, it's the full group of points, not the p-torsion
397
+ abbrev p_torsion (P : FreyPackage) : Type := ((FreyCurve P).toWeierstrassCurve ⟮Qbar⟯) -- need p-torsion
393
398
394
399
variable (P : FreyPackage)
395
400
396
401
instance : AddCommGroup (FreyCurve.p_torsion P) := sorry
397
- instance : Module (ZMod P.p) (FreyCurve.p_torsion P) := sorry
402
+ instance : Module (ZMod P.p) (FreyCurve.p_torsion P) := sorry -- definition above needs to be
403
+ -- fixed before this can be done
398
404
399
405
def mod_p_Galois_representation (P : FreyPackage) :
400
406
Representation (ZMod P.p) (Qbar ≃ₗ[ℚ] Qbar) (FreyCurve.p_torsion P) := sorry
@@ -434,7 +440,7 @@ theorem FreyPackage.false (P : FreyPackage) : False := by
434
440
apply FreyCurve.Wiles_Frey P
435
441
exact FreyCurve.Mazur_Frey P
436
442
437
-
443
+ -- Fermat's Last Theorem is true
438
444
theorem Wiles_Taylor_Wiles : FermatLastTheorem := by
439
445
-- assume FLT is false
440
446
by_contra h
0 commit comments