new library list.Sum

parent 8ec3700e
......@@ -486,6 +486,18 @@ theory Prefix
end
theory Sum
use export List
use import int.Int
function sum (l: list int) : int = match l with
| Nil -> 0
| Cons x r -> x + sum r
end
end
(** {2 Induction on lists} *)
theory Induction
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment