forked from FStarLang/FStar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module Bug3213 | ||
|
||
#set-options "--debug Test --debug_level SMTQuery" | ||
|
||
let ff = nat -> Type0 | ||
|
||
let bad2 () | ||
: Lemma (forall (f : ff). (forall (x : nat). f x) ==> (fun (_:nat) -> True) == f) = () | ||
|
||
[@@expect_failure [19]] | ||
let bad () | ||
: Lemma (forall (f : int -> Type0). (forall (x : nat). f x) ==> f (-1)) = () | ||
|
||
(* Replaying unsoundness from an axiom *) | ||
let bad_assumed () | ||
: Lemma (forall (f : int -> Type0). (forall (x : nat). f x) ==> f (-1)) = admit() | ||
|
||
let forall_elim (#a: Type) (p: (a -> GTot Type)) (x:a) | ||
: Lemma (requires forall (x: a). p x) (ensures p x) = () | ||
|
||
let falso () : Lemma False = | ||
bad_assumed(); | ||
let f (x:int) : Type0 = x >= 0 in | ||
forall_elim #(int -> Type0) (fun f -> (forall (x : nat). f x) ==> f (-1)) f; | ||
() |
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