Lean / Reader
Lean readerSquarePencilMain.lean
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.
import SquarePencilimport SquarePencilReduction/-!# Symmetric polynomials generating squaresMathOverflow question 58717. The classification includes the degeneratesolutions with zero linear coefficient, as well as the intended nondegeneratecase discussed in the original question.-/namespace SquarePencilopen MvPolynomial/-- For more than four variables a symmetric linear pencil produces a squareat a variable exactly when its linear coefficient vanishes and its constantcoefficient already is a square. -/theorem symmetric_square_iff {n : ℕ} (hn : 4 < n) (i₀ : Fin n)(S₁ S₂ : MvPolynomial (Fin n) ℚ) (h₁ : S₁.IsSymmetric) (h₂ : S₂.IsSymmetric) :IsSquare (S₁ + X i₀ * S₂) ↔ S₂ = 0 ∧ IsSquare S₁ := byconstructor· intro hhave he : S₂ = 0 := byby_contra hnzobtain ⟨P,hP⟩ := (isSquare_iff_exists_sq _).mp hobtain ⟨A,B,c,y,z,hB,hc,hy,hz⟩ := exists_five hn i₀ S₁ S₂ P h₁ h₂ hnz hP.symmexact no_five A B hB c hc y hy z hzexact ⟨he, by simpa [he] using h⟩· rintro ⟨rfl,h⟩simpa using h#print axioms symmetric_square_iffend SquarePencil