Skip to content
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

Emulate Coq's induction schemes for data types that inhabit Prop #6

Open
RyanGlScott opened this issue Jun 30, 2018 · 0 comments
Open

Comments

@RyanGlScott
Copy link
Owner

RyanGlScott commented Jun 30, 2018

Coq generates different induction schemes depending on whether a data type inhabits Prop or not:

Inductive evenA : nat -> Type :=
  evenA0  : evenA 0
| evenASS : forall n, evenA n -> evenA (S (S n)).

Inductive evenB : nat -> Prop :=
  evenB0  : evenB 0
| evenBSS : forall n, evenB n -> evenB (S (S n)).

Check evenA_ind.
(*
evenA_ind
     : forall P : forall n : nat, evenA n -> Prop,
       P 0 evenA0 ->
       (forall (n : nat) (e : evenA n), P n e -> P (S (S n)) (evenASS n e)) ->
       forall (n : nat) (e : evenA n), P n e
*)

Check evenB_ind.
(*
evenB_ind
     : forall P : nat -> Prop,
       P 0 ->
       (forall n : nat, evenB n -> P n -> P (S (S n))) ->
       forall n : nat, evenB n -> P n
*)

eliminators should permit the generation of induction schemes à la evenB_ind. (What should we call these?)

RyanGlScott added a commit that referenced this issue Oct 23, 2018
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

1 participant