cleaning up

parent ec97e258
......@@ -63,12 +63,6 @@ theory Mat22 "2x2 integer matrices"
clone export
int.Exponentiation with type t = t, function one = id, function (*) = mult
(* already in int.Exponentiation
lemma power_sum :
forall x: t, n m: int.
n >= 0 -> m >= 0 -> power x (n + m) = mult (power x n) (power x m)
*)
end
module FibonacciLogarithmic
......@@ -78,7 +72,7 @@ module FibonacciLogarithmic
use import Mat22
function m1110 : t = {| a11 = 1; a12 = 1;
a21 = 1; a22 = 0 |}
a21 = 1; a22 = 0 |}
(* computes ((1 1) (1 0))^n in O(log(n)) time
......
......@@ -15,7 +15,7 @@
Proving Pearl: Knuth's Algorithm for Prime Numbers.
TPHOLs 2003
A truly tour de force, this proof included the full proof of Bertrand's
Truly a tour de force, this proof includes the full proof of Bertrand's
postulate in Coq. Here, we simply focus on the program verification part,
assuming Bertrand's postulate as an axiom.
......
......@@ -77,7 +77,7 @@ theory ComputerDivision
(* division and modulo operators with the same conventions as
mainstream programming language such C, Java, OCaml, that is
division rounds towards zero, and thus (x mod y) as the same sign
division rounds towards zero, and thus (x mod y) has the same sign
as x *)
use import Int
......@@ -143,7 +143,7 @@ theory Exponentiation
lemma Power_1 : forall x : t. power x 1 = x
lemma Power_sum : forall x: t, n m: int. n >= 0 /\ m >= 0 ->
lemma Power_sum : forall x: t, n m: int. n >= 0 /\ m >= 0 ->
power x (n+m) = power x n * power x m
lemma Power_mult : forall x:t, n m : int. 0 <= n -> 0 <= m ->
......@@ -263,6 +263,7 @@ theory Iter
type t
function f t : t
(* f^k(x) *)
function iter int t : t
axiom iter_0: forall x: t. iter 0 x = x
......
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