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