Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit 401e4625 authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

update sessions

parent 7497d447
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE why3session SYSTEM "/home/andrei/prj/why-git/share/why3session.dtd">
<why3session
name="programs/algo64/why3session.xml" shape_version="2">
name="examples/programs/algo64/why3session.xml" shape_version="2">
<prover
id="0"
name="Alt-Ergo"
......@@ -16,13 +16,13 @@
expanded="true">
<theory
name="Algo64"
locfile="programs/algo64/../algo64.mlw"
loclnum="15" loccnumb="7" loccnume="13"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="14" loccnumb="7" loccnume="13"
verified="true"
expanded="true">
<goal
name="WP_parameter quicksort"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="parameter quicksort"
sum="8ce983870add1b671d5acb4720e907c7"
......@@ -37,12 +37,12 @@
expanded="true">
<goal
name="WP_parameter quicksort.1"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="precondition"
sum="98154b0bb9e9cf79f5701a8c8d9f8862"
proved="true"
expanded="false"
expanded="true"
shape="ainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
......@@ -57,12 +57,12 @@
</goal>
<goal
name="WP_parameter quicksort.2"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="variant decrease"
sum="c6fce40c4d56cf1d86ea343cc8663826"
proved="true"
expanded="false"
expanded="true"
shape="ainfix &lt;ainfix -V4V1ainfix -V2V1Aainfix &lt;=c0ainfix -V2V1Iainfix &gt;=agetV6V8V7Iainfix &lt;=V8V2Aainfix &lt;=V5V8FAainfix =agetV6V9V7Iainfix &lt;V9V5Aainfix &lt;V4V9FAainfix &lt;=agetV6V10V7Iainfix &lt;=V10V4Aainfix &lt;=V1V10FEAapermut_subV3V6V1ainfix +V2c1Aainfix &lt;=V5V2Aainfix &lt;V4V5Aainfix &lt;=V1V4FIainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
......@@ -77,12 +77,12 @@
</goal>
<goal
name="WP_parameter quicksort.3"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="precondition"
sum="6699bdb6c0edbf732892993ca660692d"
proved="true"
expanded="false"
expanded="true"
shape="ainfix &lt;V4V0Aainfix &lt;=V1V4Aainfix &lt;=c0V1Iainfix &gt;=agetV6V8V7Iainfix &lt;=V8V2Aainfix &lt;=V5V8FAainfix =agetV6V9V7Iainfix &lt;V9V5Aainfix &lt;V4V9FAainfix &lt;=agetV6V10V7Iainfix &lt;=V10V4Aainfix &lt;=V1V10FEAapermut_subV3V6V1ainfix +V2c1Aainfix &lt;=V5V2Aainfix &lt;V4V5Aainfix &lt;=V1V4FIainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
......@@ -97,12 +97,12 @@
</goal>
<goal
name="WP_parameter quicksort.4"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="assertion"
sum="447aca98da7fe7db957540e379d4b2d5"
proved="true"
expanded="false"
expanded="true"
shape="apermut_subV6V7V1ainfix +V2c1Iasorted_subV7V1ainfix +V4c1Aapermut_subV6V7V1ainfix +V4c1FIainfix &lt;V4V0Aainfix &lt;=V1V4Aainfix &lt;=c0V1Iainfix &gt;=agetV6V9V8Iainfix &lt;=V9V2Aainfix &lt;=V5V9FAainfix =agetV6V10V8Iainfix &lt;V10V5Aainfix &lt;V4V10FAainfix &lt;=agetV6V11V8Iainfix &lt;=V11V4Aainfix &lt;=V1V11FEAapermut_subV3V6V1ainfix +V2c1Aainfix &lt;=V5V2Aainfix &lt;V4V5Aainfix &lt;=V1V4FIainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
......@@ -117,12 +117,12 @@
</goal>
<goal
name="WP_parameter quicksort.5"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="variant decrease"
sum="5f75860636670ea0b4d0d4125390adac"
proved="true"
expanded="false"
expanded="true"
shape="ainfix &lt;ainfix -V2V5ainfix -V2V1Aainfix &lt;=c0ainfix -V2V1Iapermut_subV6V7V1ainfix +V2c1Iasorted_subV7V1ainfix +V4c1Aapermut_subV6V7V1ainfix +V4c1FIainfix &lt;V4V0Aainfix &lt;=V1V4Aainfix &lt;=c0V1Iainfix &gt;=agetV6V9V8Iainfix &lt;=V9V2Aainfix &lt;=V5V9FAainfix =agetV6V10V8Iainfix &lt;V10V5Aainfix &lt;V4V10FAainfix &lt;=agetV6V11V8Iainfix &lt;=V11V4Aainfix &lt;=V1V11FEAapermut_subV3V6V1ainfix +V2c1Aainfix &lt;=V5V2Aainfix &lt;V4V5Aainfix &lt;=V1V4FIainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
......@@ -137,12 +137,12 @@
</goal>
<goal
name="WP_parameter quicksort.6"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="precondition"
sum="79be74f3588ada732be11fa60093db5f"
proved="true"
expanded="false"
expanded="true"
shape="ainfix &lt;V2V0Aainfix &lt;=V5V2Aainfix &lt;=c0V5Iapermut_subV6V7V1ainfix +V2c1Iasorted_subV7V1ainfix +V4c1Aapermut_subV6V7V1ainfix +V4c1FIainfix &lt;V4V0Aainfix &lt;=V1V4Aainfix &lt;=c0V1Iainfix &gt;=agetV6V9V8Iainfix &lt;=V9V2Aainfix &lt;=V5V9FAainfix =agetV6V10V8Iainfix &lt;V10V5Aainfix &lt;V4V10FAainfix &lt;=agetV6V11V8Iainfix &lt;=V11V4Aainfix &lt;=V1V11FEAapermut_subV3V6V1ainfix +V2c1Aainfix &lt;=V5V2Aainfix &lt;V4V5Aainfix &lt;=V1V4FIainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
......@@ -157,12 +157,12 @@
</goal>
<goal
name="WP_parameter quicksort.7"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="assertion"
sum="9dac3b3ed92a3afc6800798ded2ac4d6"
proved="true"
expanded="false"
expanded="true"
shape="apermut_subV7V8V1ainfix +V2c1Iasorted_subV8V5ainfix +V2c1Aapermut_subV7V8V5ainfix +V2c1FIainfix &lt;V2V0Aainfix &lt;=V5V2Aainfix &lt;=c0V5Iapermut_subV6V7V1ainfix +V2c1Iasorted_subV7V1ainfix +V4c1Aapermut_subV6V7V1ainfix +V4c1FIainfix &lt;V4V0Aainfix &lt;=V1V4Aainfix &lt;=c0V1Iainfix &gt;=agetV6V10V9Iainfix &lt;=V10V2Aainfix &lt;=V5V10FAainfix =agetV6V11V9Iainfix &lt;V11V5Aainfix &lt;V4V11FAainfix &lt;=agetV6V12V9Iainfix &lt;=V12V4Aainfix &lt;=V1V12FEAapermut_subV3V6V1ainfix +V2c1Aainfix &lt;=V5V2Aainfix &lt;V4V5Aainfix &lt;=V1V4FIainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
......@@ -177,33 +177,18 @@
</goal>
<goal
name="WP_parameter quicksort.8"
locfile="programs/algo64/../algo64.mlw"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="postcondition"
sum="c867d711c1258570114f0d162574c767"
proved="true"
expanded="true"
shape="asorted_subV8V1ainfix +V2c1Aapermut_subV3V8V1ainfix +V2c1Iapermut_subV7V8V1ainfix +V2c1Iasorted_subV8V5ainfix +V2c1Aapermut_subV7V8V5ainfix +V2c1FIainfix &lt;V2V0Aainfix &lt;=V5V2Aainfix &lt;=c0V5Iapermut_subV6V7V1ainfix +V2c1Iasorted_subV7V1ainfix +V4c1Aapermut_subV6V7V1ainfix +V4c1FIainfix &lt;V4V0Aainfix &lt;=V1V4Aainfix &lt;=c0V1Iainfix &gt;=agetV6V10V9Iainfix &lt;=V10V2Aainfix &lt;=V5V10FAainfix =agetV6V11V9Iainfix &lt;V11V5Aainfix &lt;V4V11FAainfix &lt;=agetV6V12V9Iainfix &lt;=V12V4Aainfix &lt;=V1V12FEAapermut_subV3V6V1ainfix +V2c1Aainfix &lt;=V5V2Aainfix &lt;V4V5Aainfix &lt;=V1V4FIainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
<transf
name="split_goal"
proved="true"
expanded="true">
<goal
name="WP_parameter quicksort.8.1"
locfile="programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="parameter quicksort"
sum="13b1e0f734ce07d1a81bcdd3442aebe7"
proved="true"
expanded="false"
expanded="true"
shape="apermut_subV3V8V1ainfix +V2c1Iapermut_subV7V8V1ainfix +V2c1Iasorted_subV8V5ainfix +V2c1Aapermut_subV7V8V5ainfix +V2c1FIainfix &lt;V2V0Aainfix &lt;=V5V2Aainfix &lt;=c0V5Iapermut_subV6V7V1ainfix +V2c1Iasorted_subV7V1ainfix +V4c1Aapermut_subV6V7V1ainfix +V4c1FIainfix &lt;V4V0Aainfix &lt;=V1V4Aainfix &lt;=c0V1Iainfix &gt;=agetV6V10V9Iainfix &lt;=V10V2Aainfix &lt;=V5V10FAainfix =agetV6V11V9Iainfix &lt;V11V5Aainfix &lt;V4V11FAainfix &lt;=agetV6V12V9Iainfix &lt;=V12V4Aainfix &lt;=V1V12FEAapermut_subV3V6V1ainfix +V2c1Aainfix &lt;=V5V2Aainfix &lt;V4V5Aainfix &lt;=V1V4FIainfix &lt;V2V0Aainfix &lt;V1V2Aainfix &lt;=c0V1Iainfix &lt;V1V2Iainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
<proof
prover="0"
timelimit="5"
timelimit="17"
memlimit="1000"
obsolete="false"
archived="false">
......@@ -211,10 +196,10 @@
</proof>
</goal>
<goal
name="WP_parameter quicksort.8.2"
locfile="programs/algo64/../algo64.mlw"
name="WP_parameter quicksort.9"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="parameter quicksort"
expl="postcondition"
sum="64700d77b60a90271005c75455b8e88e"
proved="true"
expanded="true"
......@@ -223,29 +208,47 @@
name="expl:parameter quicksort"/>
<proof
prover="1"
timelimit="36"
timelimit="17"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="4.14"/>
<result status="valid" time="6.55"/>
</proof>
</goal>
</transf>
<goal
name="WP_parameter quicksort.10"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="postcondition"
sum="30396f56e9cab59ea0f07a344d4c0a46"
proved="true"
expanded="true"
shape="apermut_subV3V3V1ainfix +V2c1Iainfix &lt;V1V2NIainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
<proof
prover="0"
timelimit="17"
memlimit="1000"
obsolete="false"
archived="false">
<result status="valid" time="0.01"/>
</proof>
</goal>
<goal
name="WP_parameter quicksort.9"
locfile="programs/algo64/../algo64.mlw"
name="WP_parameter quicksort.11"
locfile="examples/programs/algo64/../algo64.mlw"
loclnum="37" loccnumb="10" loccnume="19"
expl="postcondition"
sum="8ccaf2253bd77eeaea8070a64dad234a"
sum="a4fafe220d612f2a3c12174a871fe268"
proved="true"
expanded="false"
shape="asorted_subV3V1ainfix +V2c1Aapermut_subV3V3V1ainfix +V2c1Iainfix &lt;V1V2NIainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
expanded="true"
shape="asorted_subV3V1ainfix +V2c1Iainfix &lt;V1V2NIainfix &lt;V2V0Aainfix &lt;=V1V2Aainfix &lt;=c0V1FF">
<label
name="expl:parameter quicksort"/>
<proof
prover="0"
timelimit="5"
timelimit="17"
memlimit="1000"
obsolete="false"
archived="false">
......
This diff is collapsed.
This diff is collapsed.
......@@ -72,6 +72,10 @@ Definition get1 {a:Type} {a_WT:WhyType a}(a1:(array a)) (i:Z): a :=
Definition set1 {a:Type} {a_WT:WhyType a}(a1:(array a)) (i:Z) (v:a): (array
a) := (mk_array (length a1) (set (elts a1) i v)).
(* Why3 assumption *)
Definition make {a:Type} {a_WT:WhyType a}(n:Z) (v:a): (array a) :=
(mk_array n (const v:(map Z a))).
Parameter n: Z.
Axiom n_nonneg : (0%Z < n)%Z.
......@@ -99,21 +103,21 @@ Theorem WP_parameter_distance : (0%Z <= n)%Z -> ((((0%Z < 0%Z)%Z \/
(0%Z = 0%Z)) /\ (0%Z < n)%Z) -> forall (g:(map Z Z)),
(g = (set (const 0%Z:(map Z Z)) 0%Z (-1%Z)%Z)) -> ((0%Z <= n)%Z ->
(((1%Z < (n - 1%Z)%Z)%Z \/ (1%Z = (n - 1%Z)%Z)) -> forall (count:Z) (d:(map
Z Z)) (g1:(map Z Z)), (((get d 0%Z) = 0%Z) /\ (((get g1 0%Z) = (-1%Z)%Z) /\
((((count + (get d
Z Z)) (g1:(map Z Z)), (((((get d 0%Z) = 0%Z) /\ (((get g1
0%Z) = (-1%Z)%Z) /\ (((count + (get d
(((n - 1%Z)%Z + 1%Z)%Z - 1%Z)%Z))%Z < (((n - 1%Z)%Z + 1%Z)%Z - 1%Z)%Z)%Z \/
((count + (get d
(((n - 1%Z)%Z + 1%Z)%Z - 1%Z)%Z))%Z = (((n - 1%Z)%Z + 1%Z)%Z - 1%Z)%Z)) /\
((forall (k:Z), ((0%Z < k)%Z /\ (k < ((n - 1%Z)%Z + 1%Z)%Z)%Z) ->
(((((get g1 (get g1 k)) < (f k))%Z /\ (((f k) < (get g1 k))%Z \/
((f k) = (get g1 k)))) /\ ((get g1 k) < k)%Z) /\ ((((0%Z < (get d k))%Z \/
(0%Z = (get d k))) /\ ((get d k) = ((get d (get g1 k)) + 1%Z)%Z)) /\
forall (k':Z), (((get g1 k) < k')%Z /\ (k' < k)%Z) -> ((get d (get g1
k)) < (get d k'))%Z))) /\ forall (k:Z), (((0%Z < k)%Z \/ (0%Z = k)) /\
(k < ((n - 1%Z)%Z + 1%Z)%Z)%Z) -> (path (get d k) k))))) ->
((count < n)%Z -> forall (k:Z), (((0%Z < k)%Z \/ (0%Z = k)) /\
(k < n)%Z) -> forall (d':Z), (path d' k) -> ((get d k) <= d')%Z)))).
intros h1 (h2,h3) g h4 h5 h6 count d g1 (h7,(h8,(h9,(h10,h11)))) h12 k
(((n - 1%Z)%Z + 1%Z)%Z - 1%Z)%Z))%Z = (((n - 1%Z)%Z + 1%Z)%Z - 1%Z)%Z)))) /\
forall (k:Z), ((0%Z < k)%Z /\ (k < ((n - 1%Z)%Z + 1%Z)%Z)%Z) -> (((((get g1
(get g1 k)) < (f k))%Z /\ (((f k) < (get g1 k))%Z \/ ((f k) = (get g1
k)))) /\ ((get g1 k) < k)%Z) /\ (((0%Z < (get d k))%Z /\ ((get d
k) = ((get d (get g1 k)) + 1%Z)%Z)) /\ forall (k':Z), (((get g1
k) < k')%Z /\ (k' < k)%Z) -> ((get d (get g1 k)) < (get d k'))%Z))) /\
forall (k:Z), (((0%Z < k)%Z \/ (0%Z = k)) /\
(k < ((n - 1%Z)%Z + 1%Z)%Z)%Z) -> (path (get d k) k)) -> ((count < n)%Z ->
forall (k:Z), (((0%Z < k)%Z \/ (0%Z = k)) /\ (k < n)%Z) -> forall (d':Z),
(path d' k) -> ((get d k) <= d')%Z)))).
intros h1 (h2,h3) g h4 h5 h6 count d g1 (((h7,(h8,h9)),h10),h11) h12 k
(h13,h14) d' h15.
clear h1 h2.
clear h5 h6.
......
This diff is collapsed.
(* This file is generated by Why3's Coq driver *)
(* Beware! Only edit allowed sections below *)
Require Import ZArith.
Require Import Rbase.
Definition unit := unit.
Parameter mark : Type.
Require Import BuiltIn.
Require BuiltIn.
Require int.Int.
Require int.MinMax.
Parameter at1: forall (a:Type), a -> mark -> a.
(* Why3 assumption *)
Definition unit := unit.
Implicit Arguments at1.
(* Why3 assumption *)
Inductive list (a:Type) {a_WT:WhyType a} :=
| Nil : list a
| Cons : a -> (list a) -> list a.
Axiom list_WhyType : forall (a:Type) {a_WT:WhyType a}, WhyType (list a).
Existing Instance list_WhyType.
Implicit Arguments Nil [[a] [a_WT]].
Implicit Arguments Cons [[a] [a_WT]].
Parameter old: forall (a:Type), a -> a.
(* Why3 assumption *)
Fixpoint length {a:Type} {a_WT:WhyType a}(l:(list a)) {struct l}: Z :=
match l with
| Nil => 0%Z
| (Cons _ r) => (1%Z + (length r))%Z
end.
Implicit Arguments old.
Axiom Length_nonnegative : forall {a:Type} {a_WT:WhyType a}, forall (l:(list
a)), (0%Z <= (length l))%Z.
Axiom Max_is_ge : forall (x:Z) (y:Z), (x <= (Zmax x y))%Z /\
(y <= (Zmax x y))%Z.
Axiom Length_nil : forall {a:Type} {a_WT:WhyType a}, forall (l:(list a)),
((length l) = 0%Z) <-> (l = (Nil :(list a))).
Axiom Max_is_some : forall (x:Z) (y:Z), ((Zmax x y) = x) \/ ((Zmax x y) = y).
Axiom char : Type.
Parameter char_WhyType : WhyType char.
Existing Instance char_WhyType.
Axiom Min_is_le : forall (x:Z) (y:Z), ((Zmin x y) <= x)%Z /\
((Zmin x y) <= y)%Z.
(* Why3 assumption *)
Definition word := (list char).
Axiom Min_is_some : forall (x:Z) (y:Z), ((Zmin x y) = x) \/ ((Zmin x y) = y).
(* Why3 assumption *)
Inductive dist : (list char) -> (list char) -> Z -> Prop :=
| dist_eps : (dist (Nil :(list char)) (Nil :(list char)) 0%Z)
| dist_add_left : forall (w1:(list char)) (w2:(list char)) (n:Z), (dist w1
w2 n) -> forall (a:char), (dist (Cons a w1) w2 (n + 1%Z)%Z)
| dist_add_right : forall (w1:(list char)) (w2:(list char)) (n:Z), (dist w1
w2 n) -> forall (a:char), (dist w1 (Cons a w2) (n + 1%Z)%Z)
| dist_context : forall (w1:(list char)) (w2:(list char)) (n:Z), (dist w1
w2 n) -> forall (a:char), (dist (Cons a w1) (Cons a w2) n).
Axiom Max_x : forall (x:Z) (y:Z), (y <= x)%Z -> ((Zmax x y) = x).
(* Why3 assumption *)
Definition min_dist(w1:(list char)) (w2:(list char)) (n:Z): Prop := (dist w1
w2 n) /\ forall (m:Z), (dist w1 w2 m) -> (n <= m)%Z.
Axiom Max_y : forall (x:Z) (y:Z), (x <= y)%Z -> ((Zmax x y) = y).
(* Why3 assumption *)
Fixpoint infix_plpl {a:Type} {a_WT:WhyType a}(l1:(list a)) (l2:(list
a)) {struct l1}: (list a) :=
match l1 with
| Nil => l2
| (Cons x1 r1) => (Cons x1 (infix_plpl r1 l2))
end.
Axiom Min_x : forall (x:Z) (y:Z), (x <= y)%Z -> ((Zmin x y) = x).
Axiom Append_assoc : forall {a:Type} {a_WT:WhyType a}, forall (l1:(list a))
(l2:(list a)) (l3:(list a)), ((infix_plpl l1 (infix_plpl l2
l3)) = (infix_plpl (infix_plpl l1 l2) l3)).
Axiom Min_y : forall (x:Z) (y:Z), (y <= x)%Z -> ((Zmin x y) = y).
Axiom Append_l_nil : forall {a:Type} {a_WT:WhyType a}, forall (l:(list a)),
((infix_plpl l (Nil :(list a))) = l).
Axiom Max_sym : forall (x:Z) (y:Z), (y <= x)%Z -> ((Zmax x y) = (Zmax y x)).
Axiom Append_length : forall {a:Type} {a_WT:WhyType a}, forall (l1:(list a))
(l2:(list a)), ((length (infix_plpl l1
l2)) = ((length l1) + (length l2))%Z).
Axiom Min_sym : forall (x:Z) (y:Z), (y <= x)%Z -> ((Zmin x y) = (Zmin y x)).
(* Why3 assumption *)
Fixpoint mem {a:Type} {a_WT:WhyType a}(x:a) (l:(list a)) {struct l}: Prop :=
match l with
| Nil => False
| (Cons y r) => (x = y) \/ (mem x r)
end.
Inductive list (a:Type) :=
| Nil : list a
| Cons : a -> (list a) -> list a.
Set Contextual Implicit.
Implicit Arguments Nil.
Unset Contextual Implicit.
Implicit Arguments Cons.
Axiom mem_append : forall {a:Type} {a_WT:WhyType a}, forall (x:a) (l1:(list
a)) (l2:(list a)), (mem x (infix_plpl l1 l2)) <-> ((mem x l1) \/ (mem x
l2)).
Parameter length: forall (a:Type), (list a) -> Z.
Axiom mem_decomp : forall {a:Type} {a_WT:WhyType a}, forall (x:a) (l:(list
a)), (mem x l) -> exists l1:(list a), exists l2:(list a),
(l = (infix_plpl l1 (Cons x l2))).
Implicit Arguments length.
(* Why3 assumption *)
Fixpoint last_char(a:char) (u:(list char)) {struct u}: char :=
match u with
| Nil => a
| (Cons c u') => (last_char c u')
end.
Axiom length_def : forall (a:Type), forall (l:(list a)),
match l with
| Nil => ((length l) = 0%Z)
| Cons _ r => ((length l) = (1%Z + (length r))%Z)
(* Why3 assumption *)
Fixpoint but_last(a:char) (u:(list char)) {struct u}: (list char) :=
match u with
| Nil => (Nil :(list char))
| (Cons c u') => (Cons a (but_last c u'))
end.
Axiom Length_nonnegative : forall (a:Type), forall (l:(list a)),
(0%Z <= (length l))%Z.
Axiom first_last_explicit : forall (u:(list char)) (a:char),
((infix_plpl (but_last a u) (Cons (last_char a u) (Nil :(list
char)))) = (Cons a u)).
Axiom Length_nil : forall (a:Type), forall (l:(list a)),
((length l) = 0%Z) <-> (l = (Nil:(list a))).
Axiom first_last : forall (a:char) (u:(list char)), exists v:(list char),
exists b:char, ((infix_plpl v (Cons b (Nil :(list char)))) = (Cons a u)) /\
((length v) = (length u)).
Parameter char : Type.
Axiom key_lemma_right : forall (w1:(list char)) (w'2:(list char)) (m:Z)
(a:char), (dist w1 w'2 m) -> forall (w2:(list char)), (w'2 = (Cons a
w2)) -> exists u1:(list char), exists v1:(list char), exists k:Z,
(w1 = (infix_plpl u1 v1)) /\ ((dist v1 w2 k) /\
((k + (length u1))%Z <= (m + 1%Z)%Z)%Z).
Definition word := (list char).
Axiom dist_symetry : forall (w1:(list char)) (w2:(list char)) (n:Z), (dist w1
w2 n) -> (dist w2 w1 n).
Inductive dist : (list char) -> (list char) -> Z -> Prop :=
| dist_eps : (dist (Nil:(list char)) (Nil:(list char)) 0%Z)
| dist_add_left : forall (w1:(list char)) (w2:(list char)) (n:Z), (dist w1
w2 n) -> forall (a:char), (dist (Cons a w1) w2 (n + 1%Z)%Z)
| dist_add_right : forall (w1:(list char)) (w2:(list char)) (n:Z), (dist w1
w2 n) -> forall (a:char), (dist w1 (Cons a w2) (n + 1%Z)%Z)
| dist_context : forall (w1:(list char)) (w2:(list char)) (n:Z), (dist w1
w2 n) -> forall (a:char), (dist (Cons a w1) (Cons a w2) n).
Axiom key_lemma_left : forall (w1:(list char)) (w2:(list char)) (m:Z)
(a:char), (dist (Cons a w1) w2 m) -> exists u2:(list char), exists v2:(list
char), exists k:Z, (w2 = (infix_plpl u2 v2)) /\ ((dist w1 v2 k) /\
((k + (length u2))%Z <= (m + 1%Z)%Z)%Z).
Definition min_dist(w1:(list char)) (w2:(list char)) (n:Z): Prop := (dist w1
w2 n) /\ forall (m:Z), (dist w1 w2 m) -> (n <= m)%Z.
Axiom dist_concat_left : forall (u:(list char)) (v:(list char)) (w:(list
char)) (n:Z), (dist v w n) -> (dist (infix_plpl u v) w ((length u) + n)%Z).
Axiom dist_concat_right : forall (u:(list char)) (v:(list char)) (w:(list
char)) (n:Z), (dist v w n) -> (dist v (infix_plpl u w) ((length u) + n)%Z).
Axiom min_dist_equal : forall (w1:(list char)) (w2:(list char)) (a:char)
(n:Z), (min_dist w1 w2 n) -> (min_dist (Cons a w1) (Cons a w2) n).
......@@ -85,79 +136,85 @@ Axiom min_dist_diff : forall (w1:(list char)) (w2:(list char)) (a:char)
((Zmin m p) + 1%Z)%Z))).
Axiom min_dist_eps : forall (w:(list char)) (a:char) (n:Z), (min_dist w
(Nil:(list char)) n) -> (min_dist (Cons a w) (Nil:(list char))
(Nil :(list char)) n) -> (min_dist (Cons a w) (Nil :(list char))
(n + 1%Z)%Z).
Axiom min_dist_eps_length : forall (w:(list char)), (min_dist (Nil:(list
Axiom min_dist_eps_length : forall (w:(list char)), (min_dist (Nil :(list
char)) w (length w)).
Inductive ref (a:Type) :=
(* Why3 assumption *)
Inductive ref (a:Type) {a_WT:WhyType a} :=
| mk_ref : a -> ref a.
Implicit Arguments mk_ref.
Definition contents (a:Type)(u:(ref a)): a :=
match u with
| mk_ref contents1 => contents1
Axiom ref_WhyType : forall (a:Type) {a_WT:WhyType a}, WhyType (ref a).
Existing Instance ref_WhyType.
Implicit Arguments mk_ref [[a] [a_WT]].
(* Why3 assumption *)
Definition contents {a:Type} {a_WT:WhyType a}(v:(ref a)): a :=
match v with
| (mk_ref x) => x
end.
Implicit Arguments contents.
Parameter map : forall (a:Type) (b:Type), Type.
Axiom map : forall (a:Type) {a_WT:WhyType a} (b:Type) {b_WT:WhyType b}, Type.
Parameter map_WhyType : forall (a:Type) {a_WT:WhyType a}
(b:Type) {b_WT:WhyType b}, WhyType (map a b).
Existing Instance map_WhyType.
Parameter get: forall (a:Type) (b:Type), (map a b) -> a -> b.
Parameter get: forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
(map a b) -> a -> b.
Implicit Arguments get.
Parameter set: forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
(map a b) -> a -> b -> (map a b).
Parameter set: forall (a:Type) (b:Type), (map a b) -> a -> b -> (map a b).
Axiom Select_eq : forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},
forall (m:(map a b)), forall (a1:a) (a2:a), forall (b1:b), (a1 = a2) ->
((get (set m a1 b1) a2) = b1).
Implicit Arguments set.
Axiom Select_neq : forall {a:Type} {a_WT:WhyType a}
{b:Type} {b_WT:WhyType b}, forall (m:(map a b)), forall (a1:a) (a2:a),
forall (b1:b), (~ (a1 = a2)) -> ((get (set m a1 b1) a2) = (get m a2)).
Axiom Select_eq : forall (a:Type) (b:Type), forall (m:(map a b)),
forall (a1:a) (a2:a), forall (b1:b), (a1 = a2) -> ((get (set m a1 b1)
a2) = b1).
Parameter const: forall {a:Type} {a_WT:WhyType a} {b:Type} {b_WT:WhyType b},