Lean / Reader
Lean reader

SquarePencilMain.lean

34 lines1 declarationsno sorryimports SquarePencil SquarePencilReduction

Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports SquarePencil, SquarePencilReduction, which it does not have: you can read it there, but it will not check. Build the project itself to check it.

  1. import SquarePencil
  2. import SquarePencilReduction
  3. /-!
  4. # Symmetric polynomials generating squares
  5. MathOverflow question 58717. The classification includes the degenerate
  6. solutions with zero linear coefficient, as well as the intended nondegenerate
  7. case discussed in the original question.
  8. -/
  9. namespace SquarePencil
  10. open MvPolynomial
  11. /-- For more than four variables a symmetric linear pencil produces a square
  12. at a variable exactly when its linear coefficient vanishes and its constant
  13. coefficient already is a square. -/
  14. theorem symmetric_square_iff {n : ℕ} (hn : 4 < n) (i₀ : Fin n)
  15. (S₁ S₂ : MvPolynomial (Fin n) ℚ) (h₁ : S₁.IsSymmetric) (h₂ : S₂.IsSymmetric) :
  16. IsSquare (S₁ + X i₀ * S₂) ↔ S₂ = 0 ∧ IsSquare S₁ := by
  17. constructor
  18. · intro h
  19. have he : S₂ = 0 := by
  20. by_contra hnz
  21. obtain ⟨P,hP⟩ := (isSquare_iff_exists_sq _).mp h
  22. obtain ⟨A,B,c,y,z,hB,hc,hy,hz⟩ := exists_five hn i₀ S₁ S₂ P h₁ h₂ hnz hP.symm
  23. exact no_five A B hB c hc y hy z hz
  24. exact ⟨he, by simpa [he] using h⟩
  25. · rintro ⟨rfl,h⟩
  26. simpa using h
  27. #print axioms symmetric_square_iff
  28. end SquarePencil