forked from HOL-Theorem-Prover/HOL
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into probability_dev
- Loading branch information
Showing
24 changed files
with
339 additions
and
1,204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
(* | ||
Demonstrates use of cv_eval_pat | ||
*) | ||
open HolKernel Parse boolLib bossLib; | ||
open cv_transLib cv_stdTheory | ||
|
||
val _ = new_theory "cv_eval_example"; | ||
|
||
Definition test_def: | ||
test n = if n = 0 then NONE else SOME (n+1, n+2, REPLICATE n T) | ||
End | ||
|
||
val _ = cv_trans test_def; | ||
|
||
(* The following example demonstrates that the given pattern, | ||
Some (Tuple ...), instructs cv_eval_pat what to do with the | ||
result of evaluation. In this example, we can see that the | ||
result must be a SOME containing a tuple and the elements | ||
of the tuple are handled as follows. | ||
- The first is just directly evaluated. | ||
- The second is left untouched after the raw cv computation. | ||
- The third is stored in a new constant, big_replicate, that | ||
can be used in subsequent calls to cv_trans, cv_eval, etc. | ||
*) | ||
val res = cv_eval_pat | ||
(Some (Tuple [Eval EVAL, Raw, Name "big_replicate"])) | ||
“test 10000”; | ||
(* returns: | ||
⊢ test 10000 = SOME (10001,cv$c2n (Num 10002),big_replicate) | ||
*) | ||
|
||
val res = cv_eval “LENGTH big_replicate”; | ||
(* returns: | ||
⊢ LENGTH big_replicate = 10000 | ||
*) | ||
|
||
val _ = (max_print_depth := 10); | ||
val _ = export_theory(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
QuoteFilter.sml | ||
HolLex.sml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.