From f39393ebcea737df714577cf7366a24373c5ae9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 12 May 2020 06:10:59 +0200 Subject: [PATCH] Add comments to example 2 --- examples/example-2.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/example-2.spec b/examples/example-2.spec index af1d09e..cae8461 100644 --- a/examples/example-2.spec +++ b/examples/example-2.spec @@ -1,11 +1,15 @@ +# Perform the proofs under the assumption that n is a nonnegative integer input constant input: n -> integer. +assume: n >= 0. + +# p/1 is an auxiliary predicate, so replace all occurrences of p/1 with its completed definition output: q/1. axiom: forall N1, N2, N3 (N1 > N2 and N3 > 0 -> N1 * N3 > N2 * N3). +# Induction principle instantiated for p. +# This axiom is necessary because we use Vampire without higher-order reasoning axiom: (p(0) and forall N (N >= 0 and p(N) -> p(N + 1))) -> (forall N p(N)). -assume: n >= 0. - assert: exists N (forall X (q(X) <-> X = N) and N >= 0 and N * N <= n and (N + 1) * (N + 1) > n).