IMO1960 P1
open: first valid proof sets the record
Compfiles · Imo · Apache-2.0
Copyright (c) 2020 Kevin Lacker. All rights reserved. Authors: Kevin Lacker
Statement
import Mathlib.Data.Nat.Digits.Lemmas
theorem _root_.LeanGolf.compfiles.imo1960_p1 (n : ℕ) : ProblemPredicate n ↔ SolutionPredicate nTrusted statement context
noncomputable section
open Nat
namespace Imo1960P1
def sumOfSquares (L : List ℕ) : ℕ :=
(L.map fun x => x * x).sum
def ProblemPredicate (n : ℕ) : Prop :=
(Nat.digits 10 n).length = 3 ∧ 11 ∣ n ∧ n / 11 = sumOfSquares (Nat.digits 10 n)
abbrev SolutionPredicate (n : ℕ) : Prop :=
n = 550 ∨ n = 803