-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3356 from FStarLang/nik_3353
Adding a missing simplifcation rule
- Loading branch information
Showing
6 changed files
with
1,274 additions
and
1,111 deletions.
There are no files selected for viewing
1,375 changes: 727 additions & 648 deletions
1,375
ocaml/fstar-lib/generated/FStar_TypeChecker_Normalize.ml
Large diffs are not rendered by default.
Oops, something went wrong.
966 changes: 507 additions & 459 deletions
966
ocaml/fstar-lib/generated/FStar_TypeChecker_TermEqAndSimplify.ml
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module Bug3353 | ||
|
||
// true when all elements of a list satisfy a predicate | ||
let rec for_allP (#a:Type) (pre:a -> prop) (l:list a): prop = | ||
match l with | ||
| [] -> True | ||
| h::t -> pre h /\ for_allP pre t | ||
|
||
|
||
// a type, a predicate on that type, and some values | ||
assume val ty: Type0 | ||
assume val pre: ty -> prop | ||
|
||
assume val v1: ty | ||
assume val v2: ty | ||
assume val v3: ty | ||
|
||
// Given a list of values... | ||
let all_v = [ v1 ] | ||
|
||
// ... we define this subtle squashed type... | ||
assume val all_v_pre: squash (norm [delta_only [`%all_v; `%for_allP]; iota; zeta] (for_allP pre all_v)) | ||
|
||
#push-options "--fuel 0 --ifuel 0" | ||
let test () = | ||
// ... to have `pre ...` in the global scope, with no fuel. Hooray! | ||
assert(pre v1) | ||
|
||
assume val p : Type0 | ||
let test2 (x : squash (p /\ True)) : squash p = () | ||
|
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