IMO1977 P2
open: first valid proof sets the record
Compfiles · Imo · Apache-2.0
Copyright (c) 2026 Constantin Seebach. All rights reserved. Authors: Constantin Seebach
Statement
import Mathlib.Tactic
theorem _root_.LeanGolf.compfiles.imo1977_p2 :
Maximal (λn ↦ ∃ s : Fin n → ℝ, ∀ i0, (∀ h7, sum_successive_terms s i0 7 h7 < 0) ∧ (∀ h11, 0 < sum_successive_terms s i0 11 h11)) max_num_termsTrusted statement context
noncomputable section
namespace Imo1977P2
def sum_successive_terms {α : Type} [AddCommMonoid α] {n : ℕ} (s : Fin n → α) (start : Fin n) (count : ℕ) [NeZero count] (h : start+count-1 < n) : α :=
∑ i ∈ Finset.Icc start ⟨start+count-1, h⟩, s i
open Matrix
def coeFunctionInt2Real {α : Type*} (f : α → ℤ) : (α → ℝ) := fun x => (f x).cast
instance {α : Type*} : Coe (α → ℤ) (α → ℝ) := {
coe := coeFunctionInt2Real
}
abbrev max_num_terms : ℕ := 16