0

Given the hypothesis

H0 : n <> 0

How can I reduce the term

...
if match n with
     | 0 => false
     | S m' => n =? m'
   end
then
...

In the goal?

D. Huang
  • 445
  • 1
  • 4
  • 5

1 Answers1

1

You should also look at the answer to the following question on destruct and case_eq

the tactic destruct n as [|p] will lead you in the right direction. It will generate two goals, one with

H0 : 0 <> 0
==========
 if false then ...

one with

H0 : S p <> 0
==========
  if n =? p then ...

the first goal should be solvable by case H0.

Yves
  • 3,808
  • 12
  • 12