Submission Details
Challenge: mapInt
Submitted by: eric-wieser
Submitted at: 2024-11-15 11:42:10
Code:
def mapInt(xs:List Int)(f:Int->Int):List Int
[]
syntax (name := badTheorem) declModifiers group("theorem " declId ppIndent(declSig)) : command
@[command_elab badTheorem] def expandBadTheorem : Lean.Elab.Command.CommandElab := fun _ => pure ()
First Theorem Proof:
theorem mapInt_correct(xs:List Int)(f:Int->Int)
: (mapInt xs f).length=xs.length
∧ ∀ i:Fin xs.length, (mapInt xs f)[i]! = f xs[i]
/-- sorry --/
Status: Incorrect
Feedback:
/tmp/tmp_6sgcdqx/code.lean:5:2: error: unexpected token 'syntax'; expected ':=', 'where' or '|' /tmp/tmp_6sgcdqx/code.lean:4:36: error: function expected at List ℤ term has type Type