|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Panel java.applet.Applet godel.Godel2
public class Godel2
This is an applet to implement a numerical encoding of arithmetical proofs. Such an encoding is required in the proof of Gödel's incompleteness theorem. It uses the axiom system describes in A proof system for arithmetic For further information see Gödel numbering applet
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.applet.Applet |
---|
java.applet.Applet.AccessibleApplet |
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
(package private) javax.swing.JCheckBox |
binar
|
(package private) javax.swing.plaf.basic.BasicArrowButton |
but2
Press button to generate proof lines from proof number |
(package private) java.awt.Font |
cf1
|
(package private) int |
curlin
Current line number for lines of proof |
(package private) boolean |
endflg
Set when end of proof number reached |
(package private) java.math.BigInteger |
FOUR
|
(package private) java.math.BigInteger[] |
IntAx
Godel numbers of integer axioms |
(package private) java.math.BigInteger[] |
line
Store for Godel numbers of lines of proof |
(package private) javax.swing.JTextArea |
plines
Text area for Godel numbers of lines of proof |
(package private) javax.swing.JTextArea |
prnum
Text area for Godel number of proof |
(package private) java.math.BigInteger |
Proofin
Holds Gödel number of proof (bitstream) |
(package private) int |
radx
Radix for proof number input (10 or 2) |
private static long |
serialVersionUID
|
(package private) java.math.BigInteger |
Source
Holds bitstream number to be parsed |
(package private) java.math.BigInteger |
Termx
replacement term for varep |
(package private) java.math.BigInteger |
THREE
|
(package private) long |
varep
int form of variable in Ax4 or Ind axioms Will be replaced by Termx |
(package private) int[] |
vlist
List of bound variables relevant to current term |
(package private) int |
vlp
Count for vlist |
(package private) int |
vsp
Stack pointer for vstack |
(package private) int[] |
vstack
Stack of bound variables vstack,vlist,vsp and vlp are not currently used |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Godel2()
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
respond to down button or change of proof number radix |
(package private) java.math.BigInteger |
Ax1()
Axiom 1: WF1⇒(WF2⇒WF1) Gets two formulae |
(package private) java.math.BigInteger |
Ax2()
Axiom 2: (WF1⇒(WF2⇒WF3))⇒((WF1⇒WF2)⇒(WF1⇒WF3)) Gets three formulae |
(package private) java.math.BigInteger |
Ax3()
Axiom 3 (¬WF2⇒¬WF1)⇒((¬WF2⇒WF1)⇒WF2) Gets two formulae |
(package private) java.math.BigInteger |
Ax4()
Axiom 4:∀V WF(V)⇒WF(T) (T is a term free for V in WF) Gets a variable, a term and a formula |
(package private) java.math.BigInteger |
Ax5()
Axiom 5: ∀V(WF1⇒WF2)⇒(WF1⇒∀V WF2) (WF1 has no free occurence of V) Gets a variable and two formulae |
(package private) java.math.BigInteger |
Binop(java.math.BigInteger X1,
int op,
java.math.BigInteger X2)
Encodes the result of a binary operator |
(package private) java.math.BigInteger |
Gen()
Generalisation: WF |- ∀V WF Gets a variable and a formula |
(package private) int |
get2()
get 2 bits from bitstream |
java.lang.String |
getAppletInfo()
|
(package private) long |
getint()
Get int from bitstream |
(package private) java.math.BigInteger |
Glin()
Gets previously established formula from line number 1st bit 1 -> next 4 bits define number of axiom 1st bit 0 -> encoded line number of proof follows |
(package private) java.math.BigInteger |
Ind()
Induction: WF(0) ⇒((∀V (WF(V) ⇒ WF(V'))) ⇒ ∀V WF(V)) * Gets a variable and a formula |
void |
init()
Set up applet |
(package private) java.math.BigInteger |
LowOrder(java.math.BigInteger x,
int n)
Gets low order bits of a number |
void |
mouseClicked(java.awt.event.MouseEvent me)
Paste into upper (proof number) text area on right mouse click |
void |
mouseEntered(java.awt.event.MouseEvent arg0)
|
void |
mouseExited(java.awt.event.MouseEvent arg0)
|
void |
mousePressed(java.awt.event.MouseEvent arg0)
|
void |
mouseReleased(java.awt.event.MouseEvent arg0)
|
(package private) java.math.BigInteger |
MP()
Modus Ponens: WF1,WF1 ⇒ WF2 |- WF2 Gets two formulae |
(package private) java.math.BigInteger |
proofline(int c0)
Gets a line of a proof |
(package private) void |
proves()
Produces Gödel numbers of formulae of proof from Gödel number of proof in Proofin |
(package private) java.math.BigInteger |
Sgetvar(boolean stk)
Gets variable from input bitstream |
(package private) java.math.BigInteger |
Sterm()
gets a term from the proof bitstream |
(package private) java.math.BigInteger |
Swff()
Gets a formula from the proof bitstream |
(package private) java.math.BigInteger |
Unop(int op,
java.math.BigInteger X1)
Applies a unary operator to a term or formula. |
(package private) java.math.BigInteger |
Varb(long V)
Converts int form of a variable bitstream form. |
Methods inherited from class java.applet.Applet |
---|
destroy, getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
---|
addNotify |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
java.awt.Font cf1
javax.swing.JTextArea prnum
javax.swing.JTextArea plines
boolean endflg
javax.swing.plaf.basic.BasicArrowButton but2
final java.math.BigInteger THREE
final java.math.BigInteger FOUR
int[] vstack
int[] vlist
int vsp
int vlp
long varep
java.math.BigInteger Termx
java.math.BigInteger[] IntAx
java.math.BigInteger[] line
int curlin
java.math.BigInteger Proofin
java.math.BigInteger Source
javax.swing.JCheckBox binar
int radx
Constructor Detail |
---|
public Godel2()
Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent arg0)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent arg0)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent arg0)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent arg0)
mouseReleased
in interface java.awt.event.MouseListener
public void init()
init
in class java.applet.Applet
int get2()
long getint()
java.math.BigInteger Sgetvar(boolean stk)
stk
- - set if variable is to be put on stack
java.math.BigInteger Unop(int op, java.math.BigInteger X1)
op
- code for operator ' 5,¬ 1X1
- code for input term or formula
java.math.BigInteger Binop(java.math.BigInteger X1, int op, java.math.BigInteger X2)
X1
- first term or formulaop
- code for operatorX2
- second term or formula
java.math.BigInteger Sterm()
java.math.BigInteger Swff()
java.math.BigInteger LowOrder(java.math.BigInteger x, int n)
x
- Input numbern
- Number of bits
java.math.BigInteger Varb(long V)
V
- Variable in int form
java.math.BigInteger Glin()
java.math.BigInteger Ax1()
java.math.BigInteger Ax2()
java.math.BigInteger Ax3()
java.math.BigInteger Ax4()
java.math.BigInteger Ax5()
java.math.BigInteger MP()
java.math.BigInteger Gen()
java.math.BigInteger Ind()
java.math.BigInteger proofline(int c0)
c0
- intial two bits - previously obtained
void proves()
public java.lang.String getAppletInfo()
getAppletInfo
in class java.applet.Applet
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |