test(tests/lean/run/term_app): add test for nested inductive type
This commit is contained in:
parent
1d7dd20091
commit
e3249dfdb9
1 changed files with 14 additions and 0 deletions
14
tests/lean/run/term_app.lean
Normal file
14
tests/lean/run/term_app.lean
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
inductive term
|
||||
| const : string → term
|
||||
| app : string → list term → term
|
||||
|
||||
/- TODO(Leo): remove after we fix bug in lemma generator. -/
|
||||
set_option eqn_compiler.lemmas false
|
||||
|
||||
mutual def num_consts, num_consts_lst
|
||||
with num_consts : term → nat
|
||||
| (term.const n) := 1
|
||||
| (term.app n ts) := num_consts_lst ts
|
||||
with num_consts_lst : list term → nat
|
||||
| [] := 0
|
||||
| (t::ts) := num_consts t + num_consts_lst ts
|
||||
Loading…
Add table
Reference in a new issue