lean4-htt/old_tests/tests/lean/run/term_app.lean
2018-04-10 12:56:55 -07:00

11 lines
314 B
Text

inductive term
| const : string → term
| app : string → list term → term
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