import Lean.Elab.Tactic.Omega import Mathlib.Algebra.BigOperators.Fin import Mathlib.Tactic.Linarith import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring namespace OAI /-! Multiplicity sequences and their arithmetic identities. -/ namespace Kaplansky open scoped BigOperators def testMultiplicity (m R j : ℕ) (i : Fin (j+1)) : ℕ := if i.val=0 then 64*m*4^(R-j) else 960*m*4^(R+2*i.val-j-2) def testRank (m R j : ℕ) : ℕ := 4^j*(64*m*4^R) theorem testRank_eq (m R j : ℕ) : testRank m R j = 64*m*4^(R+j) := by simp only [testRank,pow_add] ring theorem testMultiplicity_pos {m : ℕ} (hm : 0 positivity theorem testMultiplicity_quarter {m R j : ℕ} (hj : j simp [testMultiplicity,testRank] | succ j ih => have hlt : j