Skip to content
Snippets Groups Projects

add telescopes and a bit of theory about them

Merged Ralf Jung requested to merge ralf/telescopes into master
1 unresolved thread

I think the basic definitions are pretty solid by now, though I am still fighting with making high-level telescope-based definitions that have nice pretty-printing.

Open question: Telescopes generalize hlists to the dependent case. Should we get rid of hlists? Does anyone want to attempt porting hlist users over to telescopes? Restricting the dependency can actually be useful because it makes them easier to use.

Merge request reports

Approval is optional

Merged by Ralf JungRalf Jung 7 years ago (Jun 6, 2018 9:11pm UTC)

Merge details

  • Changes merged into master with 5bcfb8b0.
  • Deleted the source branch.

Pipeline #9447 passed

Pipeline passed for 5bcfb8b0 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Robbert Krebbers
  • Robbert Krebbers
  • Robbert Krebbers
  • Robbert Krebbers
  • Ralf Jung
  • Robbert Krebbers
  • Ralf Jung added 1 commit

    added 1 commit

    Compare with previous version

  • Ralf Jung added 1 commit

    added 1 commit

    Compare with previous version

  • Ralf Jung added 1 commit

    added 1 commit

    • f2292a3e - show that tele_app ∘ tele_bind is an identity; remove unused strange fmap instance

    Compare with previous version

  • Ralf Jung resolved all discussions

    resolved all discussions

  • All discussions resolved.

  • 95 tele_bind (λ a, F (TargS x a))
    96 end.
    97 Arguments tele_bind {_ !_} _ /.
    98
    99 (* Show that tele_app ∘ tele_bind is the identity. *)
    100 Lemma tele_app_bind {U} {TT : tele} (f : TT U) x :
    101 (tele_app $ tele_bind f) x = f x.
    102 Proof. Set Printing Coercions.
    103 induction TT as [|X b IH]; simpl in *.
    104 - rewrite (tele_arg_O_inv x). done.
    105 - destruct (tele_arg_S_inv x) as [x' [a' ->]]. simpl.
    106 rewrite IH. done.
    107 Qed.
    108
    109 (** A function that looks funny. *)
    110 Definition tele_arg_id (TT : tele) : TT -t> TT := tele_bind id.
  • Ralf Jung
  • Ralf Jung added 1 commit

    added 1 commit

    • db84c646 - show that tele_app ∘ tele_bind is an identity; remove unused strange fmap instance

    Compare with previous version

  • Ralf Jung added 3 commits

    added 3 commits

    • b0e5c5f3 - add telescopes and a bit of theory about them
    • 7ecfa30c - show that tele_app ∘ tele_bind is an identity; remove unused strange fmap instance
    • ed94cec2 - also provide a composition for the function space

    Compare with previous version

  • Ralf Jung added 3 commits

    added 3 commits

    • 49b04e85 - add telescopes and a bit of theory about them
    • cee2597b - show that tele_app ∘ tele_bind is an identity; remove unused strange fmap instance
    • 4933fa76 - also provide a composition for the function space

    Compare with previous version

  • Ralf Jung resolved all discussions

    resolved all discussions

  • I think I'm happy to merge!

  • Awesome. :) Thanks for the great feedback!

    Would you like me to squash it into one commit? The 3 commits we have right now are at least a bit meaningful.

  • The 3 commits we have right now are at least a bit meaningful.

    They have enough meaning, so no need to squash.

  • Ralf Jung mentioned in commit 5bcfb8b0

    mentioned in commit 5bcfb8b0

  • merged

  • All right, merged.

    The Iris side of this depends on https://gitlab.mpi-sws.org/FP/iris-coq/merge_requests/150.

  • Oh, right, they are used for the arguments of iSpecialize (foo $! ...). Not sure how easy it's to port them, but feel free to try.

    FYI, you nerdsniped me into briefly trying this. However, Coq's type inference is entirely unable to cope with all the extra freedom it gets when these things can be dependent, so everything falls apart. I don't think we can use telescopes there with the current unification algorithm; maybe after the new one got merged.

  • Please register or sign in to reply
    Loading