Skip to content

Multiple arity symbol #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jechev28 opened this issue Mar 15, 2017 · 3 comments
Open

Multiple arity symbol #98

jechev28 opened this issue Mar 15, 2017 · 3 comments

Comments

@jechev28
Copy link

jechev28 commented Mar 15, 2017

module Bug where

infixr 1 _⊕_

data _⊕_ (A B : Set) : Set where
  inj : A  B  A ⊕ B

postulate
  : Set

infixl 4 _≡_

data _≡_ : Set where
  refl : (x : ℝ)  x ≡ x

infixl 4 _>_ _<_

postulate
  _>_ : Set

_<_ : Set
y < x = x > y

{-# ATP definition _<_ #-}

postulate
  bar : (x : ℝ)  (x < x) ⊕ (x < x)

{-# ATP axiom bar #-}

postulate foo : (x : ℝ)  x ≡ x
{-# ATP prove foo #-}
$ agda Bug.agda

$ apia --atp=e --check Bug.agda

apia: tptp4X found an error/warning in the file /tmp/Bug/31-foo.fof
Please report this as a bug

WARNING: Line 23 Char 96 Token "," : Multiple arity symbol n_60__24_6263726395305411342, arity 2 and now 0
@asr
Copy link
Owner

asr commented Mar 18, 2017

Self question: Duplicated of #96?

CC'ing @jorgeacv2.

@asr
Copy link
Owner

asr commented Mar 21, 2017

@jechev28 and @jorgeacv2: I was thinking about this issue.

Let's define xor by

_⊕_ : Set  Set  Set
P ⊕ Q = (P ∨ Q) ∧ ¬ (P ∧ Q)

Can you wrote the above definition in, for example, TPTP? No, you cannot because the above definition is not a FOL-definition.

Let be our universe of discourse, that, is

postulate
  : Set

in FOL we can define, n-ary predicates or n-ary functions, that is,

P : ...  Set  -- n-ary predicate
P = ...

f : ... -- n-ary function
f = ...

c :-- constant (0-ary function)
c = ...

but we cannot define new logical constants, for example,

_⊕_ : Set  Set  Set
P ⊕ Q = ...

So in the OP (original post), Apia cannot translate the definition of _⊕_ (but it should generates an error though).

@asr
Copy link
Owner

asr commented Mar 21, 2017

For a correct error using definitions see #80.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants