import LeanCopilot
import CoreFormalism.CRTSidon

open CoreFormalism.CRTSidon

/-- Configure the external model server on neon-64gb. -/
def modelConfig : LeanCopilot.ExternalConfig := {
  url := "http://100.88.57.96:8765"  -- neon's Tailscale IP, port 8765
  modelName := "phi4:14b"
  temperature := 0.3
  maxTokens := 1024
}

/-- Register the external generator with LeanCopilot. -/
#eval do
  let gen : LeanCopilot.ExternalGenerator ← LeanCopilot.ExternalGenerator.new modelConfig
  LeanCopilot.registerGenerator "phi4" gen

/-- Use search_proof to fill the sidon_preserved theorem automatically. -/
theorem sidon_preserved_filled (A : List ℕ) (hSidon : IsSidon A) (S : ℕ) (L : List ℕ)
    (hCoprime : PairwiseCoprime L) (hNonempty : L ≠ [])
    (hLarge : ∀ a ∈ A, a < 2) : True := by
  search_proof
