lean4-htt/tests/lean/run/term_app.lean
Leonardo de Moura c396e4519a fix(library/equations_compiler/util): missing case at prove_eq_rec_invertible
@dselsam You have used a function similar to prove_eq_rec_invertible in
the inductive compiler.
I'm wondering if this bug (missing case) may also occur in the inductive
compiler.
2017-05-24 14:34:54 -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