On Do, 2018-08-23 at 18:35 +0300, Askar Safin via Cl-isabelle-users
Post by Lars HupelAs Larry has already said, this has literally nothing to do with
soundness. See also < https://www.hillelwayne.com/post/divide-by-ze
ro/ >
for a survey on this.
I will repeat: main drawback of Isabelle's totality is need to
manually
keep track of assumptions, i. e. see my first letter, where I had to
write
all assumptions in comments without any help from Isabelle. This was
main
reason I gave up on developing this proof script more.
And the second drawback is that what I write doesn't correspond to
what I
mean. When I write "(x + y) / z = x / z + y / z" I mean "only if z ~=
0",
but Isabelle doesn't require such assumption. So, I have to manually
make
sure that such assumption is always present in the context and thus
what I
write is actually correspond to what I mean.
Another option would be to encode partiality explicitly, on top of HOL,
e.g., by lifting everything into an option monad. Then, you could use
Isabelle's standard reasoning tools to reason about definedness. I
doubt that definedness is trivial enough to do it fully automatic,
e.g., what is about "1/f(x)", with a very complicated f, that has a
very complicated proof that !x. f(x) ~= 0.
However, current Isabelle lacks automation or syntax support for such
an embedding, but maybe this might be a more feasible short-term
solution than writing a new proof assistant from scratch.
So, current approach lacks some degree of automation.
And finally, I will say again that division is partial in actual
mathematics. Actual proofs assume partial division, and proof
assistants
must do the same to be close to real math. I will repeat that phrase
"Let's
assume that b ~= 0 and a / b = 4" is OK for mathematical text, but
"Let's
assume that a / b = 4 and b ~= 0" is not, and thus the same should
apply to
proof assistants.
This imposes an execution order! But don't you also want to have
"a&b = b&a", and substitution? then both terms must have the same
meaning.
Of course, in the option monad, you could explicitly define a
short-circuit version of "&", which, however, would not be commutative.
--
Peter
p.s.
My interest in this stuff stems from the fact that explicitly partial
terms are much nicer parametric than underspecified total ones, e.g.,
the term
"case l of [] => None | x#_ => Some x" is parametric (the element type
of the list can be replaced, without invalidating any theorems),
whereas "hd l" is not (the "undefined" values on two types need not be
related in any way!)
==
Askar Safin
http://vk.com/safinaskar