Lean / Reader
Lean readerQuarticStatement.lean
Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports QuarticSequence, QuarticCharacterization, which it does not have: you can read it there, but it will not check. Build the project itself to check it.
import QuarticSequenceimport QuarticCharacterizationnamespace QuarticGreedy/-- Exact block indexing beginning with the fourteenth term, together with theinitial consecutive positive integers. The argument n is one-based. -/theorem greedy_explicit (n : ℕ) (hn : 0<n) : sequence n =if n≤13 then n else 2^((n-14)/12)*values (slot (n-14)) := byrw [seq_formula_of_criterion root_criterion,formula]by_cases h : n≤13· rw [if_pos (by omega),if_pos h]; omega· rw [if_neg (by omega),if_neg h,tail,show n-1-13=n-14 by omega]/-- The conjecture of OEIS A321291 for the source greedy sequence. -/theorem greedy_doubling (n : ℕ) (hn : 25<n) : sequence n=2*sequence (n-12) :=doubling_of_criterion root_criterion n hn#print axioms greedy_explicit#print axioms greedy_doublingend QuarticGreedy