Replace integers above a threshold
The result preserves the array length, replaces each entry strictly above the threshold with −1, and leaves every other entry unchanged.
Permanent public credit, certificates, and points. Unpaid; uses your AI plan.
The exact statement
theorem replace_spec_satisfied (arr: Array Int) (k: Int) (h_precond : replace_precond (arr) (k)) :
replace_postcond (arr) (k) (replace (arr) (k) h_precond) h_precond