Hi, I am currently confused why the definition of is_zero
is not valid, I get
an Inner syntax error, it seems like I am not allowed to use ¬
in that
way but why?
fun not_zero :: "nat ⇒ bool" where
"not_zero 0 = False"
| "not_zero n = True"
definition is_zero :: "nat ⇒ bool" where
"is_zero n = ¬(not_zero n)"
Isabelle has a global issue with the priority of bindings, but that will never get fixed
Here =
binds too strongly.
You can use which has weaker binding priority.
Or ≡
Thanks :+1:
Mathias Fleury said:
Isabelle has a global issue with the priority of bindings, but that will never get fixed
In most cases, you actually do want =
to bind more weakly than logical connectives. It's only the Boolean =
where one often wants it to bind more weakly, and that's why ⟷
exists for Boolean equality, as Lukas mentioned.
I kind of agree, but then why does A ⟶ ∃x. P x
not parse either? (⟶
exists only for bools)
(I am just mentioning it because I wrote about a "global issue")
Last updated: Dec 21 2024 at 16:20 UTC