Add comments to example 2

This commit is contained in:
Patrick Lühne 2020-05-12 06:10:59 +02:00
parent 9621cb1e0c
commit f39393ebce
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
1 changed files with 6 additions and 2 deletions

View File

@ -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).