mirror of
https://github.com/achlipala/frap.git
synced 2024-11-10 00:07:51 +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.
|
||||
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! *)
|
||||
|
||||
|
@ -635,7 +635,7 @@ Proof.
|
|||
induct s; substring.
|
||||
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,
|
||||
m1 <= m2
|
||||
|
|
|
@ -398,8 +398,7 @@ Local Hint Extern 1 (_ <= _) => linear_arithmetic : core.
|
|||
Theorem selectionSort_ok :
|
||||
{{_&_ ~> True}}
|
||||
"i" <- 0;;
|
||||
{{h&v ~> v $! "i" <= v $! "n"
|
||||
/\ (forall i j, i < j < v $! "i" -> h $! (v $! "a" + i) <= h $! (v $! "a" + j))
|
||||
{{h&v ~> (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)) }}
|
||||
while "i" < "n" loop
|
||||
"j" <- "i"+1;;
|
||||
|
|
Loading…
Reference in a new issue