sbv-12.1: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.
Copyright(c) Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Documentation.SBV.Examples.TP.CaseSplit

Description

Use TP to prove 2n^2 + n + 1 is never divisible by 3.

Synopsis

Documentation

notDiv3 :: IO (Proof (Forall "n" Integer -> SBool)) Source #

Prove that 2n^2 + n + 1 is not divisible by 3.

We have:

>>> notDiv3
Lemma: notDiv3
  Step: 1 (3 way case split)
    Step: 1.1                           Q.E.D.
    Step: 1.2                           Q.E.D.
    Step: 1.3                           Q.E.D.
    Step: 1.Completeness                Q.E.D.
  Result:                               Q.E.D.
[Proven] notDiv3 :: Ɐn ∷ Integer → Bool