File: bug_2089.v

package info (click to toggle)
coq 8.20.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 44,116 kB
  • sloc: ml: 234,160; sh: 4,301; python: 3,270; ansic: 2,644; makefile: 882; lisp: 172; javascript: 63; xml: 24; sed: 2
file content (17 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Inductive even (x: nat): nat -> Prop :=
  | even_base: even x O
  | even_succ: forall n, odd x n -> even x (S n)

with odd (x: nat): nat -> Prop :=
  | odd_succ: forall n, even x n -> odd x (S n).

Scheme even_ind2 := Minimality for even Sort Prop
  with odd_ind2 := Minimality for odd Sort Prop.

Combined Scheme even_odd_ind from even_ind2, odd_ind2.

Check (even_odd_ind :forall (x : nat) (P P0 : nat -> Prop),
  P 0 ->
  (forall n : nat, odd x n -> P0 n -> P (S n)) ->
  (forall n : nat, even x n -> P n -> P0 (S n)) ->
  (forall n : nat, even x n -> P n) /\ (forall n : nat, odd x n -> P0 n)).