#-------------------------------------------------------------------- # Equational specification of a group. This specification does have # models, i.e. it cannot be refuted (and the prover will note this). # # It uses only unit clauses in infix-equational notation. # # There exists a right-neutral element 0. f(X,0)=X. # For each X, there is a right inverse element i(X). f(X,i(X))=0. # f is associative. f(f(X,Y),Z)=f(X,f(Y,Z)).You can add hypothesises to this example to make it into a proof problem. As goal clauses are negated in refutational theorem proving, all-quantified variables are turned into skolem constants:
# Hypothesis: Right inverse is also left inverse <- f(i(a),a) = 0.For some people it might be more intuitive to represent the goal as an explicitly negated atom:
# A nother possible hypothesis: Multiplication with inverse element is # commutative. ~f(a,i(a)) = f(i(a),a).Both ways to state the theorem are possible in the LOP-dialect that is used by E, as would be the use of != in the atom. In strict LOP, only the prefix equal() predicate is supported, as shown in the next example.
#-------------------------------------------------------------------------- # File : GRP121-1 : TPTP v2.1.0. Released v1.2.0. # Domain : Group Theory # Problem : Derive right identity from a single axiom for groups order 4 # Version : [Wos96] (equality) axioms. # English : # Refs : [Wos96] Wos (1996), The Automation of Reasoning: An Experiment # Source : [OTTER] # Names : groups.exp4.in part 3 [OTTER] # Status : unsatisfiable # Rating : 0.60 v2.1.0, 0.43 v2.0.0 # Syntax : Number of clauses : 3 ( 0 non-Horn; 3 unit; 2 RR) # Number of literals : 3 ( 3 equality) # Maximal clause size : 1 ( 1 average) # Number of predicates : 1 ( 0 propositional; 2-2 arity) # Number of functors : 3 ( 2 constant; 0-2 arity) # Number of variables : 3 ( 0 singleton) # Maximal term depth : 6 ( 2 average) # Comments : # : tptp2X -f setheo:sign -t rm_equality:rstfp GRP121-1.p #-------------------------------------------------------------------------- # single_axiom, axiom. equal(multiply(Y, multiply(multiply(Y, multiply(multiply(Y, Y), multiply(X, Z))) , multiply(Z, multiply(Z, Z)))), X) <- . # single_axiom2, axiom. equal(multiply(identity, identity), identity) <- . # prove_order3, conjecture. <- equal(multiply(a, identity), a). #--------------------------------------------------------------------------
Note that the literals in the clauses are non-equational. E automatically translates them to equational literals internally, i.e.the axiom
animal(X) <- wolf(X).is internally represented as
equal(animal(X), $true) <- equal(wolf(X), $true).for the special constant symbol $true.
#-------------------------------------------------------------------------- # File : PUZ031-1 : TPTP v2.0.0. Released v1.0.0. # Domain : Puzzles # Problem : Schubert's Steamroller # Version : Special. # English : Wolves, foxes, birds, caterpillars, and snails are animals, # and there are some of each of them. Also there are some # grains, and grains are plants. Every animal either likes # to eat all plants or all animals much smaller than itself # that like to eat some plants. # Caterpillars and snails are much smaller than birds, which # are much smaller than foxes, which in turn are much smaller # than wolves. Wolves do not like to eat foxes or grains, while # birds like to eat caterpillars but not snails. Caterpillars # and snails like to eat some plants. Therefore there # is an animal that likes to eat a grain eating animal. # Refs : Stickel M. (1986), Schubert's Steamroller Problem: # Formulations and Solution, Journal of Automated Reasoning # 2(2), 89-104. # : Pelletier F.J. (1986), Seventy-Five Problems for Testing # Automatic Theorem Provers, Journal of Automated Reasoning # 2(2), 191-216. # : Wang T-C., Bledsoe W.W. (1987), Hierarchical Deduction, # Journal of Automated Deduction 3(1), 35-77. # : Manthey R., Bry F. (1988), SATCHMO: a theorem prover # implemented in Prolog, In Lusk E., Overbeek R. (Eds), # Proceedings of the 9th International Conference on Automated # Deduction (Argonne, IL, 1988), (Lecture Notes in Computer # Science 310), Springer-Verlag, New York, NY, 415-434. # Source : [Pelletier, 1986] # Names : Pelletier 47 [Pelletier, 1986] # : steamroller.ver1.in [ANL] # : steam.in [OTTER] # : SST [Wang & Bledsoe, 1987] # Status : unsatisfiable # Rating : 0.00 v2.0.0 # Syntax : Number of clauses : 26 ( 1 non-Horn; 6 unit; 26 RR) # Number of literals : 63 ( 0 equality) # Maximal clause size : 8 ( 2 average) # Number of predicates : 10 ( 0 propositional; 1-2 arity) # Number of functors : 8 ( 6 constant; 0-1 arity) # Number of variables : 33 ( 0 singleton) # Maximal term depth : 2 ( 1 average) # Comments : This problem is named after Len Schubert. # : tptp2X: -fsetheo:sign PUZ031-1.p #-------------------------------------------------------------------------- #clausename wolf_is_an_animal animal(X) <- wolf(X). #clausename fox_is_an_animal animal(X) <- fox(X). #clausename bird_is_an_animal animal(X) <- bird(X). #clausename caterpillar_is_an_animal animal(X) <- caterpillar(X). #clausename snail_is_an_animal animal(X) <- snail(X). #clausename there_is_a_wolf wolf(a_wolf) <- . #clausename there_is_a_fox fox(a_fox) <- . #clausename there_is_a_bird bird(a_bird) <- . #clausename there_is_a_caterpillar caterpillar(a_caterpillar) <- . #clausename there_is_a_snail snail(a_snail) <- . #clausename there_is_a_grain grain(a_grain) <- . #clausename grain_is_a_plant plant(X) <- grain(X). #clausename eating_habits eats(Animal, Plant); eats(Animal, Small_animal) <- animal(Animal), plant(Plant), animal(Small_animal), plant(Other_plant), much_smaller(Small_animal, Animal), eats(Small_animal, Other_plant). #clausename caterpillar_smaller_than_bird much_smaller(Catapillar, Bird) <- caterpillar(Catapillar), bird(Bird). #clausename snail_smaller_than_bird much_smaller(Snail, Bird) <- snail(Snail), bird(Bird). #clausename bird_smaller_than_fox much_smaller(Bird, Fox) <- bird(Bird), fox(Fox). #clausename fox_smaller_than_wolf much_smaller(Fox, Wolf) <- fox(Fox), wolf(Wolf). #clausename wolfs_dont_eat_foxes <- wolf(Wolf), fox(Fox), eats(Wolf, Fox). #clausename wolfs_dont_eat_grain <- wolf(Wolf), grain(Grain), eats(Wolf, Grain). #clausename bird_eats_caterpillar eats(Bird, Catapillar) <- bird(Bird), caterpillar(Catapillar). #clausename bird_dont_eat_snail <- bird(Bird), snail(Snail), eats(Bird, Snail). #clausename caterpillar_food_is_a_plant plant(caterpillar_food_of(Catapillar)) <- caterpillar(Catapillar). #clausename caterpillar_eats_caterpillar_food eats(Catapillar, caterpillar_food_of(Catapillar)) <- caterpillar(Catapillar). #clausename snail_food_is_a_plant plant(snail_food_of(Snail)) <- snail(Snail). #clausename snail_eats_snail_food eats(Snail, snail_food_of(Snail)) <- snail(Snail). #clausename conjecture <- animal(Animal), animal(Grain_eater), grain(Grain), eats(Animal, Grain_eater), eats(Grain_eater, Grain).