Lean / Reader
Lean reader

QuarticStatement.lean

22 lines2 declarationsno sorryimports QuarticSequence QuarticCharacterization

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.

  1. import QuarticSequence
  2. import QuarticCharacterization
  3. namespace QuarticGreedy
  4. /-- Exact block indexing beginning with the fourteenth term, together with the
  5. initial consecutive positive integers. The argument n is one-based. -/
  6. theorem greedy_explicit (n : ℕ) (hn : 0<n) : sequence n =
  7. if n≤13 then n else 2^((n-14)/12)*values (slot (n-14)) := by
  8. rw [seq_formula_of_criterion root_criterion,formula]
  9. by_cases h : n≤13
  10. · rw [if_pos (by omega),if_pos h]; omega
  11. · rw [if_neg (by omega),if_neg h,tail,show n-1-13=n-14 by omega]
  12. /-- The conjecture of OEIS A321291 for the source greedy sequence. -/
  13. theorem greedy_doubling (n : ℕ) (hn : 25<n) : sequence n=2*sequence (n-12) :=
  14. doubling_of_criterion root_criterion n hn
  15. #print axioms greedy_explicit
  16. #print axioms greedy_doubling
  17. end QuarticGreedy