Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Require Import PeanoNat.
  2. Require Import List.
  3. Import ListNotations.
  4.  
  5.  
  6. Fixpoint iota (n : nat) : list nat :=
  7. match n with
  8. | 0 => []
  9. | S k => iota k ++ [k]
  10. end.
  11.  
  12. Axiom app_split : forall A x (l l2 : list A), In x (l ++ l2) -> not (In x l2) -> In x l.
  13. Axiom s_inj : forall n, ~(n = S n).
  14.  
  15. Theorem t : forall n k, n <= k -> In k (iota n) -> False.
  16. Proof.
  17. intro n; induction n; intros k nlek kin.
  18. - cbn in kin; contradiction.
  19. - cbn in kin; apply app_split in kin.
  20. + eapply IHn with (k := k).
  21. * transitivity (S n); eauto.
  22. * assumption.
  23. + inversion 1; subst.
  24. * apply (Nat.nle_succ_diag_l _ nlek).
  25. * contradiction.
  26. Qed.
  27.  
  28. Corollary t1 : forall n, In n (iota n) -> False.
  29. intro n; apply (t n n); reflexivity.
  30. Qed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement