Typed First-order Logic (TFF)
New logic features
- TPTP defined types, user types
- Signatures for predicates and functions, arguments not boolean
- Typed variables, not boolean
Problem
- Axioms
- The USA is a country.
- The capital of every country is a beautiful big city.
- There is some city that is the capital of the USA.
- Every big city in every country has crime.
- Conjecture
- Therefore, there is some city that is beautiful but has crime.
In logic
- Type information
- country is a type
- city is a type
- usa is a country
- capital_of takes one country argument and returns the capital
city
- has_crime takes one city argument and returns boolean
- beautiful takes one city argument and returns boolean
- big_city takes one city and one country argument,
and returns boolean
- Axioms
- ∀ Country:country (big_city(capital_of(Country),Country) ∧ beautiful(capital_of(Country)) )
- ∃ City:city City = capital_of(usa)
- ∀ City:city ∀ Country:country (big_city(City,Country) → has_crime(City))
- Conjecture
- ∃ City:city (beautiful(City) ∧ has_crime(City))
In TPTP format
- TPTP defined types: $i $o
- User types: Declared of "type" $tType, in annotated formulae with type role
- Predicate and function signatures: Declared in annotated formulae with type role,
arguments not $o
- Variables: Given type in quantification, not $o
- tff annotated formulae have a name (lowercase), a role (axiom,
conjecture, and others), a formula, and end with .
-
tff(country_type,type, country: $tType ).
tff(city_type,type, city: $tType ).
tff(usa_decl,type, usa: country ).
tff(capital_of_decl,type, capital_of: country > city ).
tff(has_crime_decl,type, has_crime: city > $o ).
tff(beautiful_decl,type, beautiful: city > $o ).
tff(big_city_decl,type, big_city: (city * country) > $o ).
tff(country_big_city,axiom,
! [Country: country] :
( big_city(capital_of(Country),Country) & beautiful(capital_of(Country)) ) ).
tff(usa_capital_axiom,axiom,
? [City: city] : City = capital_of(usa) ).
tff(crime_axiom,axiom,
! [City: city,Country: country] : ( big_city(City,Country) => has_crime(City) ) ).
tff(some_beautiful_crime,conjecture,
? [City: city] : ( beautiful(City) & has_crime(City) ) ).
- Check the syntax in
SystemB4TPTP using TPTP4X.
- Check the axioms are satisfiable with Vampire-SAT in
SystemOnTPTP.
- Try prove it using Vampire in
SystemOnTPTP.
- View the derivation using IDV in
SystemOnTSTP.
- Verify the derivation using GDV in
SystemOnTSTP.
Challenge problem
All humans are created equal.
John is a human.
John got an F grade.
There is some human who got an A grade.
An A grade is not equal to an F grade.
Therefore there is a human other than John, who was created equal to John.
Non-theorems
- Axioms
- Jon is the only human.
- Garfield, Arlene, and Nermal are the only (distinct) cats.
- Jon owns Garfield, but does not own Arlene.
- All cats love only one cat, and that cat is Garfield.
- Conjecture
- Jon owns all cats that love Garfield, except for Arlene.
- In TPTP format
tff(human_type,type, human: $tType ).
tff(cat_type,type, cat: $tType ).
tff(jon_decl,type, jon: human ).
tff(garfield_decl,type, garfield: cat ).
tff(arlene_decl,type, arlene: cat ).
tff(nermal_decl,type, nermal: cat ).
tff(loves_decl,type, loves: cat > cat ).
tff(owns_decl,type, owns: ( human * cat ) > $o ).
tff(only_jon,axiom, ! [H: human] : H = jon ).
tff(only_garfield_and_arlene_and_nermal,axiom,
! [C: cat] :
( C = garfield | C = arlene | C = nermal ) ).
tff(distinct_cats,axiom,
( garfield != arlene & arlene != nermal
& nermal != garfield ) ).
tff(jon_owns_garfield_not_arlene,axiom,
( owns(jon,garfield) & ~ owns(jon,arlene) ) ).
tff(all_cats_love_garfield,axiom,
! [C: cat] : ( loves(C) = garfield ) ).
tff(jon_owns_garfields_lovers,conjecture,
! [C: cat] :
( ( loves(C) = garfield & C != arlene )
=> owns(jon,C) ) ).
- Check the syntax using TPTP4X in
SystemB4TPTP.
- Check the axioms are satisfiable with Vampire-SAT in
SystemOnTPTP.
- Try prove it using Vampire in
SystemOnTPTP.
- Disprove it using Vampire-FMo
SystemOnTPTP.
That produces a (non-TPTP-compliant) finite countermodel.
Here's a counter model in the new TPTP format.
- View the finite countermodel using IIV in
SystemOnTSTP.
- Verify the finite countermodel using AGMV in
SystemOnTSTP.
Use the concatenation of the problem and the countermodel as input.