Debian Codegraph @

test-suite/success/Case6.v

raw
1 Parameter ff : forall n m : nat, n <> m -> S n <> S m.
2 Parameter discr_r : forall n : nat, 0 <> S n.
3 Parameter discr_l : forall n : nat, S n <> 0.
4
5 Fixpoint eqdec (n m : nat) {struct n} : n = m \/ n <> m :=
6 match n, m return (n = m \/ n <> m) with
7 | O, O => or_introl (0 <> 0) (refl_equal 0)
8 | O, S x => or_intror (0 = S x) (discr_r x)
9 | S x, O => or_intror _ (discr_l x)
10 | S x as N, S y as M =>
11 match eqdec x y return (N = M \/ N <> M) with
12 | or_introl h => or_introl (N <> M) (f_equal S h)
13 | or_intror h => or_intror (N = M) (ff x y h)
14 end
15 end.