coq.js 4.1 KB

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