Skip to content

Instantly share code, notes, and snippets.

@Isweet
Created November 29, 2017 16:17
Show Gist options
  • Save Isweet/81441324fe31460be076ad6baf3ba59f to your computer and use it in GitHub Desktop.
Save Isweet/81441324fe31460be076ad6baf3ba59f to your computer and use it in GitHub Desktop.
Coq auto-generated induction principles being silly.
Inductive ev_dumb : nat -> Prop :=
| EvDBase : ev_dumb 0
| EvDRec : forall n, ev_dumb n /\ n <> 1 -> ev_dumb (S (S n)).
Check ev_dumb_ind.
(* ev_dumb_ind
: forall P : nat -> Prop,
P 0 -> (forall n : nat, ev_dumb n /\ n <> 1 -> P (S (S n))) -> forall n : nat, ev_dumb n -> P n
*)
Inductive ev_dumb' : nat -> Prop :=
| EvDBase' : ev_dumb' 0
| EvDRec' : forall n, ev_dumb' n -> n <> 1 -> ev_dumb' (S (S n)).
Check ev_dumb'_ind.
(* ev_dumb'_ind
: forall P : nat -> Prop,
P 0 -> (forall n : nat, ev_dumb' n -> P n -> n <> 1 -> P (S (S n))) -> forall n : nat, ev_dumb' n -> P n
*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment