Skip to content

Commit

Permalink
use no-auto-config for the mapReverse proof
Browse files Browse the repository at this point in the history
  • Loading branch information
LeventErkok committed Dec 25, 2024
1 parent f78e6ec commit d545d1e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Documentation/SBV/Examples/KnuckleDragger/Lists.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ mkUninterpretedSort ''B
data C
mkUninterpretedSort ''C

-- | For certain proofs, the default settings for z3 have trouble converging. So, we use
-- the no-auto-config configuration in certain cases.
z3NoAutoConfig :: SMTConfig
z3NoAutoConfig = z3{extraArgs = ["auto_config=false"]}

-- * Appending null

-- | @xs ++ [] == xs@
Expand Down Expand Up @@ -288,8 +293,11 @@ mapAppend = runKD $ do
-- Lemma: mapReverse.6 Q.E.D.
-- Lemma: mapReverse Q.E.D.
-- [Proven] mapReverse
--
-- Note that for this proof pass the no-auto-config parameter
-- to z3, as otherwise it doesn't converge.
mapReverse :: IO Proof
mapReverse = runKD $ do
mapReverse = runKDWith z3NoAutoConfig $ do
let p :: (SA -> SB) -> SList A -> SBool
p g xs = reverse (map g xs) .== map g (reverse xs)

Expand Down

0 comments on commit d545d1e

Please sign in to comment.