coq.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. Language: Coq
  3. Author: Stephan Boyer <[email protected]>
  4. Category: functional
  5. */
  6. function(hljs) {
  7. return {
  8. keywords: {
  9. keyword:
  10. '_ as at cofix else end exists exists2 fix for forall fun if IF in let ' +
  11. 'match mod Prop return Set then Type using where with ' +
  12. 'Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo ' +
  13. 'Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion ' +
  14. 'Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture ' +
  15. 'Conjectures Constant constr Constraint Constructors Context Corollary ' +
  16. 'CreateHintDb Cut Declare Defined Definition Delimit Dependencies Dependent' +
  17. 'Derive Drop eauto End Equality Eval Example Existential Existentials ' +
  18. 'Existing Export exporting Extern Extract Extraction Fact Field Fields File ' +
  19. 'Fixpoint Focus for From Function Functional Generalizable Global Goal Grab ' +
  20. 'Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident ' +
  21. 'Identity If Immediate Implicit Import Include Inductive Infix Info Initial ' +
  22. 'Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear ' +
  23. 'Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML ' +
  24. 'Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation ' +
  25. 'Obligations Opaque Open Optimize Options Parameter Parameters Parametric ' +
  26. 'Path Paths pattern Polymorphic Preterm Print Printing Program Projections ' +
  27. 'Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark ' +
  28. 'Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save ' +
  29. 'Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern ' +
  30. 'SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies ' +
  31. 'Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time ' +
  32. 'Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused ' +
  33. 'Unfold Universe Universes Unset Unshelve using Variable Variables Variant ' +
  34. 'Verbose Visibility where with',
  35. built_in:
  36. 'abstract absurd admit after apply as assert assumption at auto autorewrite ' +
  37. 'autounfold before bottom btauto by case case_eq cbn cbv change ' +
  38. 'classical_left classical_right clear clearbody cofix compare compute ' +
  39. 'congruence constr_eq constructor contradict contradiction cut cutrewrite ' +
  40. 'cycle decide decompose dependent destruct destruction dintuition ' +
  41. 'discriminate discrR do double dtauto eapply eassumption eauto ecase ' +
  42. 'econstructor edestruct ediscriminate eelim eexact eexists einduction ' +
  43. 'einjection eleft elim elimtype enough equality erewrite eright ' +
  44. 'esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail ' +
  45. 'field field_simplify field_simplify_eq first firstorder fix fold fourier ' +
  46. 'functional generalize generalizing gfail give_up has_evar hnf idtac in ' +
  47. 'induction injection instantiate intro intro_pattern intros intuition ' +
  48. 'inversion inversion_clear is_evar is_var lapply lazy left lia lra move ' +
  49. 'native_compute nia nsatz omega once pattern pose progress proof psatz quote ' +
  50. 'record red refine reflexivity remember rename repeat replace revert ' +
  51. 'revgoals rewrite rewrite_strat right ring ring_simplify rtauto set ' +
  52. 'setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry ' +
  53. 'setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve ' +
  54. 'specialize split split_Rabs split_Rmult stepl stepr subst sum swap ' +
  55. 'symmetry tactic tauto time timeout top transitivity trivial try tryif ' +
  56. 'unfold unify until using vm_compute with'
  57. },
  58. contains: [
  59. hljs.QUOTE_STRING_MODE,
  60. hljs.COMMENT('\\(\\*', '\\*\\)'),
  61. hljs.C_NUMBER_MODE,
  62. {
  63. className: 'type',
  64. excludeBegin: true,
  65. begin: '\\|\\s*',
  66. end: '\\w+'
  67. },
  68. {begin: /[-=]>/} // relevance booster
  69. ]
  70. };
  71. }