Menu

Negation

2013-11-13
2013-11-13
  • John Tang Boyland

    Sometimes a judgment that doesn't assume a context and which doesn't depend on a judgment that assumes a context can be algorithmically negated. One could annotate a judgment with @HasNegation to modularly assert this fact (it can be checked). Then one can write "not ..." as a new judgment.

    While it seems possible to generate the negation judgment for any judgment without a context (with combinatorial explosion), the crucial excluded-middle lemma cannot be so easily constructed; the problem being that termination cannot be proved.

     

    Last edit: John Tang Boyland 2014-02-28
  • John Tang Boyland

    Requiring the @HasNegation annotation is important for modularity and to avoid expensive compilation since negation explodes (probably exponentially). We don't need to knpw all the rules of a judgment then to know whether we can negate it. It also means people don't naturally assume everything can be negated. Finally, as a side-effect., this means that implicit judgments (such as "and" judgments) cannot be negated, which is probably just as well.

     
  • John Tang Boyland

    The rules for proving a negation will be generated and hard to use in any case. So we want to allow classical-style logic that can be translated to use the generated judgment.

    First of all, we want to allow a prove of a negative to do case analysis analysis on the positive (using keyword else, or some other).

    d: not n1 + (s n2) = n1 by case analysis on else:
        case rule ...
        end case
    end case analysis
    

    Then, as a special case, contradiction case analysis can be used if the analysis would have no cases at all:

    d: not z + n2 = (s n2) by contradiction on else
    

    These would both be implemented as sugar for the following, assuming the "or" judgment extension:

    tmp: z + n2 = (s n2) or not z + n2 = (s n2) by excluded middle
    d: not z + n2 = (s n2) by case analysis on tmp:
        case or tmp1: z + n2 = (s n2) is
            proof by contradiction on tmp1
        end case
        case or tmp2: not z + n2 = (s n2) is
            proof by tmp2
        end case
    end case analysis
    

    The "excluded middle" justification is sugar for calling the generated lemma that the judgment and its negation partition the possibility space.

    Finally, one could use "contradicition" with two arguments that would be negations of each other:

    d1: n1 + n2 = n3
    d2: not n1 + n2 = n3
    f: ... by contradiction on d1,d2
    

    Here this is short for calling the generated lemma that the judgment is disjoint from its negation.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.