1

I am new to Coq, I have f1 & f2 two functions whose input and output arguments are natural number.I want to ask that what ever be the output value of f1 and f2. Result should not be zero due to addition of non zero number.Therefore it should be solve by eauto or lia.

 Theorem not_0:forall (n a b:nat),
    n=?0= false ->
   0=? (f1(a) + n) = false->
   0=? (f2 (f1(a)+n)) = false.     
zeesha huq
  • 17
  • 2

1 Answers1

0

lia will solve equalities on integers or natural numbers, but here you are using boolean equality on them. As such I would rather state something like:

Theorem not_0 :
  forall (f1 f2 : nat -> nat) (n a b : nat),
    n <> 0 ->
    0 <> (f1(a) + n) ->
    0 <> (f2 (f1(a)+n)).
Proof.

However, lia will still fail, because the theorem doesn't hold. You need to know something about f2 first. So I don't see any way lia or eauto would solve it.

Théo Winterhalter
  • 4,908
  • 2
  • 18
  • 34