# How to semi-automate proofs?

1. Dec 24, 2007

### jordi

I am looking for a method to semi-automate mathematical proofs. Precisely, what I would like is that, if for example I define (sorry, I have never used latex in this forum, and I still do not know how to do it yet):

f[A] := {y|$$\exists$$x$$\in$$A (y=f(x))}

then, if I have

f[A$$\cup$$B]

what I would like is to make a call to the definition above (something like F[f=f,A=A$$\cup$$B]) and that the math editor (maybe Mathematica) just writes

f[A$$\cup$$B] = {y|$$\exists$$x$$\in$$A$$\cup$$B (y=f(x))}

where the = has a link (hyperlink) to the initial definition (ie, if I click on it, I go to the original definition).

How can I do that?

1. Is there in Mathematica functionality for that?
2. Is there a package that does that, not Mathematica?
3. If not, can I program in a programming language, using latex symbols?

2. Dec 24, 2007

### EnumaElish

You should be able to do this by using either of the Module or Block functions in Math'ca.

3. Dec 26, 2007

### jordi

Let us say I want to proof something very simple, eg, A U (B U C) = (A U B) U C.

If I define:

UnionToSet=Function[{A,B},body={x|x$$\in$$A||x$$\in$$B}]

I start the proof with:

UnionToSet[C,UnionToSet[F,G]]

that gives me:

{x|x$$\in$$C||x$$\in$${x|x$$\in$$F||x$$\in$$G}}

Now I need to apply the axiom:

x$$\in$${x|P(x)} iff P(x)

I find then a problem:

In my definition of UnionToSet, the body is only a string of characters. What I would like is to be able to define an object, Set(P), which is a functional on the set of “acceptable logic statements”, that is equivalent to {x|P(x)}. This object should have methods, like Belongs(x,Set(P)), and Property(x,Set(P))=P(x).

I have googled a bit, but I cannot find anything like this. It is strange, because I think a mathematical package should have an object for defining sets, for belonging, for logic statements... and I think quite natural that mathematicians working with Mathematica would want to state their axioms and let the package to automate the proofs.

Note: for the record, the above proof should be ( means belongs to)$$\in$$

CU(FUG)={x|x$$\in$$C||x$$\in$$FUG}}={x|x$$\in$$C||x$$\in$${y|y$$\in$$F||y$$\in$$G}} = {x|x$$\in$$C||(x$$\in$$F||x$$\in$$G)} = {x|(x$$\in$$C||x$$\in$$F)||x$$\in$$G} = {x|x$$\in$${y|y$$\in$$C||y$$\in$$F}||x$$\in$$G}={x|x$$\in$$CUF||x$$\in$$G}}=(CUF)UG.

What I would like is that every time I write “=” and I refer to it a given theorem/axiom/whatever, the program automatically applies this theorem/axiom/whatever and writes the corresponding right hand side.

CU(FUG)=Set(P = *$$\in$$C||*$$\in$$FUG)=Set(P = *$$\in$$C||*$$\in$$Set(P=**$$\in$$F||**$$\in$$G ))=Set(P = *$$\in$$C||(*$$\in$$F||*$$\in$$G ))
=Set(P = (*$$\in$$C||*$$\in$$F)||*$$\in$$G )=Set(P = (*$$\in$$Set(P=**$$\in$$C ||**$$\in$$F ))||*$$\in$$G)=Set(P = *$$\in$$CUF||*$$\in$$G )=(CUF)UG.

Last edited: Dec 26, 2007
4. Dec 26, 2007

### jordi

I have seen that there is a package in Mathematica called SetTheory.m. Apparently, it automates the proofs in set theory and logic. Has anybody used it? Is it possible to use it for proofs not only in set theory and logic, but in all other areas of mathematics?