-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 1099 #1102
Fix issue 1099 #1102
Changes from 4 commits
af77783
90d0ff8
de37c06
2d823b5
45174bf
ca3d3d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -72,7 +72,25 @@ and quantified = private { | |||||||||||
(** The underlying formula. *) | ||||||||||||
|
||||||||||||
toplevel : bool; | ||||||||||||
(** Determine if the quantified formula is at the top level. | ||||||||||||
(** Determine if the quantified formula is at the top level of an asserted | ||||||||||||
formula. | ||||||||||||
|
||||||||||||
An {e asserted formula} is a formula introduced by {e (assert ...)} or | ||||||||||||
generated by a function definition with {e (define-fun ...)}. | ||||||||||||
|
||||||||||||
By {e top level}, we mean that the quantified formula is not | ||||||||||||
contained in another quantified formula, but the formula can be a | ||||||||||||
subformula. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is confusing. Isn't a formula contained in another formula a subformula? Maybe we can use some clearer wording?
Suggested change
Should suffice IMO. |
||||||||||||
|
||||||||||||
For instance, the subformula ∀y:int. ¬G(y) of the asserted formula | ||||||||||||
¬(∀y:int. ¬G(y)) is also considered at the top level. | ||||||||||||
|
||||||||||||
Notice that quantifiers of the same kind are packed as much as possible. | ||||||||||||
For instance, if we assert the formula: | ||||||||||||
∀α. ∀x:list α. ∃y:α. F(x, y) | ||||||||||||
Then the two universal quantifiers are packed in a same top level formula | ||||||||||||
but the subformula ∃y:α. F(x, y) is not at the top level. | ||||||||||||
|
||||||||||||
This flag is important for the prenex polymorphism. | ||||||||||||
- If this flag is [true], all the free type variables of [main] | ||||||||||||
are implicitely considered as quantified. | ||||||||||||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type 'a t | ||
logic p : 'a t, unit -> prop | ||
logic f : 'a t -> prop | ||
logic r : unit t | ||
|
||
axiom a : forall s:'a t. exists n:unit. p(s, n) | ||
|
||
goal g : f(r) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
unknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar with the formatting
{e ...}
for documentation, not sure what it does. Afaik brackets[...]
or[|...|]
are usually used for code.cf: https://ocamlverse.net/content/documentation_guidelines.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{e ...}
emphasizes the text. I'm used to use brackets for OCaml code only but I haven't strong opinions on this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use the bracket syntax in the last commit.