1 package com.example.furt.myapplication;
3 import android.graphics.Paint;
5 import java.util.ArrayList;
8 public class FormulaNot extends GenericFormula implements Formula{
20 public String Draw(int p)
23 return "¬"+Operand.Draw(20);
25 return("¬("+Operand.Draw(20)+")");
28 public List<IntroductionRule> introductionRules(){
29 List<IntroductionRule> nodes=new ArrayList<IntroductionRule>();
31 //Introduzione del not (NOTA: il not non eredita la regola di riduzione ad assurdo)
32 RuleIntroduction notIntro=new RuleIntroduction("¬i",4);
33 Node notN=new Node(new FormulaBOT());
34 List<Formula> notHP=new ArrayList<Formula>();
36 notN.addHPFormula(notHP,true);
37 Node thisNode=new Node(this);
38 thisNode.addChild(notN);
39 notIntro.tempRule=thisNode;
43 public List<EliminationRule> EliminationRules()
45 List<EliminationRule> nodes=new ArrayList<EliminationRule>();
46 nodes.add(new RuleNotElimination(this));
51 public boolean Fill(Formula Filler) {
52 if(Operand.toString().equals("_")) {
56 return Operand.Fill(Filler);
60 public boolean setCursor() {
61 return Operand.setCursor();
65 public Formula duplicate() {
66 return new FormulaNot(Operand.duplicate());