Primitives.v 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. (* SPDX-License-Identifier: GPL-2.0 or GPL-3.0
  2. Copyright © 2019 Ariadne Devos *)
  3. Require Import S.Lucid.Arrow.
  4. Require Import S.Lucid.Parallel.
  5. Require Import S.Lucid.Sequential.
  6. Require Import S.Lucid.Lift.
  7. Require Import S.Lucid.Equivalence.
  8. Require Import Coq.Program.Basics.
  9. (* Pure arrows and sequential and parallel composition,
  10. the most common operators. *)
  11. Section definitions.
  12. Variable World : Type.
  13. Variable Arrow : forall A B, ArrowSig World A B -> Type.
  14. Arguments Arrow { _ _ } _.
  15. Record arrow_primitives := {
  16. (* sequential composition *)
  17. seqA : forall A B C (stop : ArrowSig World A B) (start : ArrowSig World B C)
  18. (f : Arrow stop) (g : Arrow start), Arrow (seq_sig stop start);
  19. (* parallel composition *)
  20. parA : forall A B C D (up : ArrowSig World A B) (down : ArrowSig World C D)
  21. (f : Arrow up) (g : Arrow down), Arrow (parA_sig up down);
  22. (* TODO: or allow custom arrows-within-arrows?
  23. Proving with reification, arrow transformers etc. *)
  24. (* TODO: variant with bijections *)
  25. pureA : forall A B (p : PureSig A B) (relyg : Situation A -> Frame World), Arrow (PureArrowSig p relyg);
  26. }.
  27. End definitions.
  28. Arguments seqA { _ _ } _ { _ _ _ } _ _ _ _.
  29. Arguments parA { _ _ } _ { _ _ _ _ } _ _ _ _.
  30. Arguments pureA { _ _ } _ { _ _ } _ _.