import Mathlib

-- Precondition definitions
@[reducible, simp]
def check_prime_precond (n : Nat) : Prop :=
  -- !benchmark @start precond
  True
  -- !benchmark @end precond

-- !benchmark @start auxcode
-- !benchmark @end auxcode

-- Main function definitions
def check_prime (n : Nat) (h_precond : check_prime_precond n) : Bool :=
  -- !benchmark @start code
  sorry
  -- !benchmark @end code

-- Postcondition definitions
@[reducible, simp]
def check_prime_postcond (n : Nat) (result : Bool) (h_precond : check_prime_precond n) : Prop :=
  -- !benchmark @start postcond
  result = true ↔ (n > 1 ∧ ∀ d : Nat, 1 < d ∧ d < n → n % d ≠ 0)
  -- !benchmark @end postcond

-- !benchmark @start lemma
-- !benchmark @end lemma

-- Proof content
theorem check_prime_postcond_satisfied (n : Nat) (h_precond : check_prime_precond n) :
    check_prime_postcond n (check_prime n h_precond) h_precond := by
  -- !benchmark @start proof
  sorry
  -- !benchmark @end proof