Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Why3
why3
Commits
647d63e7
Commit
647d63e7
authored
Nov 23, 2011
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preuve de power_sum
parent
b50c3f74
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
12 deletions
+25
-12
tests/bitvector1/bitvector1_Pow2int_Power_sum_1.v
tests/bitvector1/bitvector1_Pow2int_Power_sum_1.v
+15
-2
tests/bitvector1/why3session.xml
tests/bitvector1/why3session.xml
+10
-10
No files found.
tests/bitvector1/bitvector1_Pow2int_Power_sum_1.v
View file @
647d63e7
...
...
@@ -20,9 +20,22 @@ Theorem Power_sum : forall (n:Z) (m:Z), ((0%Z <= n)%Z /\ (0%Z <= m)%Z) ->
((
pow2
(
n
+
m
)
%
Z
)
=
((
pow2
n
)
*
(
pow2
m
))
%
Z
).
(
*
YOU
MAY
EDIT
THE
PROOF
BELOW
*
)
intros
n
m
Hmn
.
cut
(
0
<=
m
);
auto
with
zarith
.
apply
Z_lt_induction
with
(
P
:=
fun
m
=>
0
<=
m
->
pow2
(
n
+
m
)
=
pow2
n
*
pow2
m
);
auto
with
zarith
.
intros
x
Hind
Hxpos
.
assert
(
h
:
(
x
=
0
\
/
x
>
0
))
by
omega
.
destruct
h
.
subst
x
.
rewrite
Power_0
.
(
*
auto
with
zarith
.
elim
n
.
replace
(
0
+
m
)
with
m
by
omega
.
rewrite
Power_0
.
replace
(
1
*
pow2
m
)
with
(
pow2
m
)
by
omega
.
auto
.
intro
.
...
...
@@ -37,7 +50,7 @@ replace (2 * Zpos p0) with (Zpos p0 * 2) by omega.
rewrite
<-
Zplus_diag_eq_mult_2
.
rewrite
Power_s
.
*
)
Qed
.
...
...
tests/bitvector1/why3session.xml
View file @
647d63e7
...
...
@@ -1036,7 +1036,7 @@
<theory
name=
"Pow2real"
verified=
"false"
expanded=
"
tru
e"
>
expanded=
"
fals
e"
>
<goal
name=
"Power_1"
sum=
"05eff9d48281eb24cb06eb9caecf811e"
...
...
@@ -1118,7 +1118,7 @@
<theory
name=
"BitVector"
verified=
"false"
expanded=
"
tru
e"
>
expanded=
"
fals
e"
>
<goal
name=
"Nth_bw_xor_v1true"
sum=
"3ea193c399b136e4f0619cc666a98664"
...
...
@@ -1305,7 +1305,7 @@
name=
"nth_from_int_low_even"
sum=
"5de955fad899fb21842dc88dddf9eef7"
proved=
"true"
expanded=
"
tru
e"
expanded=
"
fals
e"
shape=
"ainfix =anthafrom_intV0c0aFalseIainfix =amodV0c2c0F"
>
<proof
prover=
"coq"
...
...
@@ -1417,28 +1417,28 @@
name=
"nth_from_int2c_low_even_positive"
sum=
"69f18f37edd8fc04bfdf09f8bb8a8f85"
proved=
"false"
expanded=
"
tru
e"
expanded=
"
fals
e"
shape=
"ainfix =anthafrom_int2cV0c0aFalseIainfix =amodV0c2c0Aainfix >=V0c0F"
>
</goal>
<goal
name=
"nth_from_int2c_low_odd_positive"
sum=
"475988455b849e1fbc62bc87c2a4b147"
proved=
"false"
expanded=
"
tru
e"
expanded=
"
fals
e"
shape=
"ainfix =anthafrom_int2cV0c0aTrueIainfix =amodV0c2c0NAainfix >=V0c0F"
>
</goal>
<goal
name=
"nth_from_int2c_low_even_negative"
sum=
"5ffbc4d5d31761cff206901e8b5f825a"
proved=
"false"
expanded=
"
tru
e"
expanded=
"
fals
e"
shape=
"ainfix =anthafrom_int2cV0c0aTrueIainfix =amodV0c2c0Aainfix <V0c0F"
>
</goal>
<goal
name=
"nth_from_int2c_low_odd_negative"
sum=
"043edbe6d2a94a92420cb81b9b134329"
proved=
"false"
expanded=
"
tru
e"
expanded=
"
fals
e"
shape=
"ainfix =anthafrom_int2cV0c0aFalseIainfix =amodV0c2c0NAainfix <V0c0F"
>
</goal>
</theory>
...
...
@@ -2969,14 +2969,14 @@
name=
"x_negative"
sum=
"75aca8e6393ca908f8163a9722aeb5e8"
proved=
"false"
expanded=
"
tru
e"
expanded=
"
fals
e"
shape=
"ainfix =ato_nat_subavarV0c30c0aprefix -V0Iainfix =anthavarV0c31aFalseF"
>
</goal>
<goal
name=
"mantissa_var_x_negative"
sum=
"af80cf6d8e488e18405d3f91f4ce940f"
proved=
"false"
expanded=
"
tru
e"
expanded=
"
fals
e"
shape=
"ainfix =amantissaavarV0ainfix -apow2c31V0Iainfix =anthavarV0c31aFalseF"
>
<proof
prover=
"coq"
...
...
@@ -3067,7 +3067,7 @@
name=
"from_int_sum"
sum=
"a1bb3937bfed62df0155e2517454c2d0"
proved=
"false"
expanded=
"
tru
e"
expanded=
"
fals
e"
shape=
"ainfix =afrom_intainfix +apow2c31V0ainfix +.afrom_intapow2c31afrom_intV0F"
>
</goal>
<goal
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment