first_levels

This commit is contained in:
Jon Eugster
2022-11-29 17:11:17 +01:00
parent e43a2e2e9f
commit 5bf0cd9775
19 changed files with 186 additions and 167 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ elab "Introduction" t:str : command => do
| .Game => modifyCurGame fun game => pure {game with introduction := t.getString}
/-- Define the statement of the current level. -/
elab "Statement" name:ident ? sig:declSig val:declVal : command => do
elab "Statement" statementName:ident ? descr:str ? sig:declSig val:declVal : command => do
let lvlIdx ← getCurLevelIdx
let declName : Name := (← getCurGame).name ++ (← getCurWorld).name ++ ("level" ++ toString lvlIdx : String)
elabCommand (← `(theorem $(mkIdent declName) $sig $val))