Commit 0a4ec4c2 authored by Sylvain Dailler's avatar Sylvain Dailler

destruct: now destruct "true" and "false"

Also add tests for not, true and false
parent 06cb0f6e
......@@ -34,6 +34,7 @@ Transformations
generalize in the induction
* `destruct` now destruct `not p` into `p -> false`. `destruct_rec` is
allowed to further destruct afterwards.
`destruct` can also destruct `true` and `false`.
IDE
* display of counterexamples in the Task view has been improved
......
use list.List
use list.Length
use int.Int
constant x: int
predicate p int
axiom H: not (p 0)
axiom H1: p 0
goal g: false
axiom H2: false
goal g5: p 5
axiom H3: true
goal g6: p 5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE why3session PUBLIC "-//Why3//proof session v5//EN"
"http://why3.lri.fr/why3session.dtd">
<why3session shape_version="6">
<prover id="0" name="Alt-Ergo" version="2.2.0" timelimit="20" steplimit="0" memlimit="1000"/>
<file proved="true">
<path name=".."/>
<path name="311_destruct.mlw"/>
<theory name="Top" proved="true">
<goal name="g" proved="true">
<transf name="destruct" proved="true" arg1="H">
<goal name="g.0" proved="true">
<transf name="destruct" proved="true" arg1="H">
<goal name="g.0.0" expl="destruct premise" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="2"/></proof>
</goal>
<goal name="g.0.1" proved="true">
<transf name="destruct" proved="true" arg1="H">
</transf>
</goal>
</transf>
</goal>
</transf>
<transf name="destruct_rec" proved="true" arg1="H">
<goal name="g.0" expl="destruct premise" proved="true">
<proof prover="0"><result status="valid" time="0.00" steps="2"/></proof>
</goal>
</transf>
</goal>
<goal name="g5" proved="true">
<transf name="destruct" proved="true" arg1="H2">
</transf>
</goal>
<goal name="g6" proved="true">
<transf name="destruct" proved="true" arg1="H3">
<goal name="g6.0" proved="true">
<transf name="destruct" proved="true" arg1="H2">
</transf>
</goal>
</transf>
</goal>
</theory>
</file>
</why3session>
......@@ -248,6 +248,10 @@ let destruct_fmla ~recursive (t: term) =
in
match t.t_node with
| Tfalse ->
[]
| Ttrue ->
[[]]
| Tbinop (Tand, t1, t2) ->
let l1 = destruct_fmla_exception ~toplevel:false t1 in
let l2 = destruct_fmla_exception ~toplevel:false t2 in
......
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