mirror of
https://github.com/achlipala/frap.git
synced 2024-11-27 23:06:20 +00:00
Noticed one invariant in HoareLogic was more complex than required
This commit is contained in:
parent
1d93f6f994
commit
796fc8d64c
2 changed files with 3 additions and 4 deletions
|
@ -540,7 +540,7 @@ Proof.
|
||||||
induct s1; simplify; subst; simplify; auto.
|
induct s1; simplify; subst; simplify; auto.
|
||||||
Qed.
|
Qed.
|
||||||
|
|
||||||
Local Hint Rewrite substring_app_fst substring_app_snd using solve [trivial].
|
Hint Rewrite substring_app_fst substring_app_snd using solve [trivial].
|
||||||
|
|
||||||
(* BOREDOM'S END! *)
|
(* BOREDOM'S END! *)
|
||||||
|
|
||||||
|
@ -635,7 +635,7 @@ Proof.
|
||||||
induct s; substring.
|
induct s; substring.
|
||||||
Qed.
|
Qed.
|
||||||
|
|
||||||
Hint Extern 1 (String _ _ = String _ _) => f_equal : core.
|
Local Hint Extern 1 (String _ _ = String _ _) => f_equal : core.
|
||||||
|
|
||||||
Lemma substring_stack : forall s n2 m1 m2,
|
Lemma substring_stack : forall s n2 m1 m2,
|
||||||
m1 <= m2
|
m1 <= m2
|
||||||
|
|
|
@ -398,8 +398,7 @@ Local Hint Extern 1 (_ <= _) => linear_arithmetic : core.
|
||||||
Theorem selectionSort_ok :
|
Theorem selectionSort_ok :
|
||||||
{{_&_ ~> True}}
|
{{_&_ ~> True}}
|
||||||
"i" <- 0;;
|
"i" <- 0;;
|
||||||
{{h&v ~> v $! "i" <= v $! "n"
|
{{h&v ~> (forall i j, i < j < v $! "i" -> h $! (v $! "a" + i) <= h $! (v $! "a" + j))
|
||||||
/\ (forall i j, i < j < v $! "i" -> h $! (v $! "a" + i) <= h $! (v $! "a" + j))
|
|
||||||
/\ (forall i j, i < v $! "i" -> v $! "i" <= j < v $! "n" -> h $! (v $! "a" + i) <= h $! (v $! "a" + j)) }}
|
/\ (forall i j, i < v $! "i" -> v $! "i" <= j < v $! "n" -> h $! (v $! "a" + i) <= h $! (v $! "a" + j)) }}
|
||||||
while "i" < "n" loop
|
while "i" < "n" loop
|
||||||
"j" <- "i"+1;;
|
"j" <- "i"+1;;
|
||||||
|
|
Loading…
Reference in a new issue