formal-methods

What are the most interesting equivalences arising from the Curry-Howard Isomorphism?

旧街凉风 提交于 2019-12-02 13:47:35
I came upon the Curry-Howard Isomorphism relatively late in my programming life, and perhaps this contributes to my being utterly fascinated by it. It implies that for every programming concept there exists a precise analogue in formal logic, and vice versa. Here's a "basic" list of such analogies, off the top of my head: program/definition | proof type/declaration | proposition inhabited type | theorem/lemma function | implication function argument | hypothesis/antecedent function result | conclusion/consequent function application | modus ponens recursion | induction identity function |

How to define axiom of a line as two points in Coq

不打扰是莪最后的温柔 提交于 2019-12-02 08:22:34
问题 I am trying to find an example axiom in Coq of something like the line axiom in geometry: If given two points, there exist a line between those two points. I would like to see how this could be defined in Coq. Inherently choosing this simple line axiom to see how something very primitive is defined, because I'm having a hard time defining it outside natural language. Specifically, I have seen these two axioms and would like to know how in Coq to define both: Any two distinct points always

How to define axiom of a line as two points in Coq

╄→гoц情女王★ 提交于 2019-12-02 04:45:23
I am trying to find an example axiom in Coq of something like the line axiom in geometry: If given two points, there exist a line between those two points. I would like to see how this could be defined in Coq. Inherently choosing this simple line axiom to see how something very primitive is defined, because I'm having a hard time defining it outside natural language. Specifically, I have seen these two axioms and would like to know how in Coq to define both: Any two distinct points always determine a line Any two distinct points of a line determine this line uniquely It almost seems like you

What are the strengths and weaknesses of the Isabelle proof assistant compared to Coq?

人盡茶涼 提交于 2019-11-29 19:56:35
Does Isabelle/HOL proof assistant have any weaknesses and strengths compared to Coq? I am mostly familiar with Coq, and do not have much experience with Isabelle/HOL, but I might be able to help a little bit. Perhaps others with more experience on Isabelle/HOL can help improve this. There are two big points of divergence between the two systems: the underlying theories and the style of interaction . I'll try to give a brief overview of the main differences in each case. Theories Both Coq and Isabelle/HOL are based on powerful, very expressive higher-order logics. These logics, however, differ

What is the best way of determining a loop invariant?

老子叫甜甜 提交于 2019-11-28 19:38:47
When using formal aspects to create some code is there a generic method of determining a loop invariant or will it be completely different depending on the problem? It has already been pointed out that one same loop can have several invariants, and that Calculability is against you. It doesn't mean that you cannot try. You are, in fact, looking for an inductive invariant : the word invariant may also be used for a property that is true at each iteration but for which is it not enough to know that it hold at one iteration to deduce that it holds at the next. If I is an inductive invariant, then

What is the best way of determining a loop invariant?

北慕城南 提交于 2019-11-27 12:26:05
问题 When using formal aspects to create some code is there a generic method of determining a loop invariant or will it be completely different depending on the problem? 回答1: It has already been pointed out that one same loop can have several invariants, and that Calculability is against you. It doesn't mean that you cannot try. You are, in fact, looking for an inductive invariant : the word invariant may also be used for a property that is true at each iteration but for which is it not enough to