Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. A : Type
  2. i : nat
  3. index_f : nat → nat
  4. n : nat
  5. ip : n < i
  6. partial_index_f : nat → option nat
  7. L : partial_index_f (index_f n) ≡ Some n
  8. V : ∀ i0 : nat, i0 < i → option A
  9. l : ∀ z : nat, partial_index_f (index_f n) ≡ Some z → z < i
  10. ============================
  11. V n ip
  12. ≡ match
  13. partial_index_f (index_f n) as fn
  14. return (partial_index_f (index_f n) ≡ fn → option A)
  15. with
  16. | Some z => λ p : partial_index_f (index_f n) ≡ Some z, V z (l z p)
  17. | None => λ _ : partial_index_f (index_f n) ≡ None, None
  18. end eq_refl
  19.  
  20. Error: Abstracting over the term "partial_index_f (index_f n)"
  21. leads to a term
  22. "λ o : option nat,
  23. V n ip
  24. ≡ match o as fn return (o ≡ fn → option A) with
  25. | Some z => λ p : o ≡ Some z, V z (l z p)
  26. | None => λ _ : o ≡ None, None
  27. end eq_refl" which is ill-typed.
  28.  
  29. destruct (partial_index_f (index_f n)).
  30. inversion L.
  31. generalize (l n0 eq_refl).
  32. intros. subst n0.
  33. replace l0 with ip by apply proof_irrelevance.
  34. reflexivity.
  35. congruence.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement