For each employee X there exists a department Y. The expected result:
department(y1, 1).department(y2, 2).
Facts
The simplest form of linear rule is a fact: a ground head-less linear rule.
employee("Jack").employee("Ruth").
Join Rules
Join rules are rules with multiple atoms in the body. They define facts of the head predicate, given facts of the body.
project(Z,X) <- employee(X), department(Y,X).
For each employee X in a department Y, there exists a project Z in which they participate.If the atoms in the body do not have variables in common, the Cartesian product is assumed.
employee("Jack").employee("Ruth").department("science").department("finance").canWork(X, Y, Z) <- employee(X), department(Y).@output("canWork").
Any employee X can work in any department Y on some unknown project Z. The expected result:
Constants can appear in the atoms of the rules.When they appear in the head, they denote specific constant values to be generated in the head facts.When they appear in the body, they denote specific filters, or selection criteria, to be applied to the facts considered in the rule.
Any junior employee X will have a “basic” contract with stipend 20. Any senior employee X will have an “advanced” contract with stipend 40. The constants filter the facts to which the rules apply, so the basic contract rule applies only to Mark, and the advanced contract rule applies only to Ruth.The expected result:
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prometheux","colors":{"primary":"#4a90fd","light":"#40e9a0","dark":"#0f0f0f"},"logo":{"light":"/images/202510-Logo-TransparentBlack.jpg","dark":"/images/202510-Logo-White.png","href":"https://prometheux.ai"},"favicon":{"light":"/images/prometheux_icon_black_on_white.jpg","dark":"/images/prometheux_icon_black_on_white.jpg"},"background":{"color":{"light":"#ffffff","dark":"#0f0f0f"}},"navbar":{"links":[{"href":"https://platform.prometheux.ai","label":"Platform"}],"primary":{"type":"button","label":"Get Started","href":"https://platform.prometheux.ai/login"}},"footer":{"socials":{"website":"https://prometheux.ai","linkedin":"https://www.linkedin.com/company/prometheux"}},"fonts":{"family":"Roboto","weight":400},"integrations":{"telemetry":{"enabled":false}},"navigation":{"global":{"anchors":[{"anchor":"Community (Coming Soon)","icon":"discord","color":{"light":"#ffee16","dark":"#ffee16"},"href":"https://docs.prometheux.ai/resources/community"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4127"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":true,"isLoggedInCli":false,"mintExport":{}},"customCss":[{"filePath":"assets/static-search.css","content":"#px-search-modal{position:fixed;inset:0;display:none;z-index:9999}#px-search-modal.open{display:block}.px-search-backdrop{position:absolute;inset:0;background:rgba(15, 15, 15, 0.55);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.px-search-panel{position:relative;display:flex;flex-direction:column;width:min(680px, calc(100vw - 32px));max-height:82vh;max-height:82dvh;margin:9vh auto 0;background:#ffffff;color:inherit;border-radius:14px;box-shadow:0 16px 48px rgba(0, 0, 0, 0.35);overflow:hidden;padding:18px 18px 12px}html.dark .px-search-panel,html[data-theme=\"dark\"] .px-search-panel{background:#141414;color:#e8e8e8}html.px-search-open,html.px-search-open body{overflow:hidden}:root{--px-search-primary: #00e382}.pagefind-ui{--pagefind-ui-primary: var(--px-search-primary);--pagefind-ui-text: #1a1a1a;--pagefind-ui-background: transparent;--pagefind-ui-border: #e3e3e3;--pagefind-ui-tag: #f4f4f4;--pagefind-ui-border-width: 1px;--pagefind-ui-border-radius: 10px;--pagefind-ui-image-border-radius: 8px;--pagefind-ui-image-box-ratio: 3 / 2;--pagefind-ui-font: inherit;--pagefind-ui-scale: 0.95}html.dark .pagefind-ui,html[data-theme=\"dark\"] .pagefind-ui{--pagefind-ui-text: #ececec;--pagefind-ui-border: #2a2a2a;--pagefind-ui-tag: #1f1f1f}.pagefind-ui__search-input{font-size:1rem}.pagefind-ui__result-link{color:var(--px-search-primary)}#px-search-modal #px-search-host,#px-search-modal .pagefind-ui,#px-search-modal .pagefind-ui__form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}#px-search-modal .pagefind-ui__search-input{flex:0 0 auto}#px-search-modal .pagefind-ui__drawer{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}"}],"page":{"pagePath":"vadalog/rules","slug":"/vadalog/rules","pageMetadata":{"title":"Rules","description":"Linear rules, join rules, facts, and constants in Vadalog.","href":"/vadalog/rules"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Linear rules, join rules, facts, and constants in Vadalog.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`linear-rules`,children:`Linear Rules`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.em,{children:`Linear rules`}),` are rules with one single atom in the body. They define facts of the head predicate, given facts of the single body predicate.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`4`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`department`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Y`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) \u003c- employee(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@output(\"department\").`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`For each employee X there exists a department Y. The expected result:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`department`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`y1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`department`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`y2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`facts`,children:`Facts`}),`\n`,_jsxs(_components.p,{children:[`The simplest form of linear rule is a `,_jsx(_components.strong,{children:`fact`}),`: a ground head-less linear rule.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Jack\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ruth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`join-rules`,children:`Join Rules`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.em,{children:`Join rules`}),` are rules with multiple atoms in the body. They define facts of the head predicate, given facts of the body.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`1`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`project`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) \u003c- employee(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), department(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Y`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`For each employee X in a department Y, there exists a project Z in which they participate.`}),`\n`,_jsx(_components.p,{children:`If the atoms in the body do not have variables in common, the Cartesian product is assumed.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Jack\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ruth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`department`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"science\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`department`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"finance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`canWork`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Y`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Z`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) \u003c- employee(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), department(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Y`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@output(\"canWork\").`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Any employee X can work in any department Y on some unknown project Z. The expected result:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`4`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`canWork`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Jack\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"science\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`z1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`canWork`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Jack\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"finance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`z2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`canWork`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ruth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"science\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`z3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`canWork`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ruth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"finance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`z4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`constants-within-rules`,children:`Constants within Rules`}),`\n`,_jsx(_components.p,{children:`Constants can appear in the atoms of the rules.`}),`\n`,_jsx(_components.p,{children:`When they appear in the head, they denote specific constant values to be generated in the head facts.`}),`\n`,_jsx(_components.p,{children:`When they appear in the body, they denote specific filters, or selection criteria, to be applied to the facts considered in the rule.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`4`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mark\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`junior`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mark\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`contract`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"basic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) \u003c- employee(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), junior(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@output(\"contract\").`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A junior employee will have a “basic” contract, with stipend 20. The expected result:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`contract(\"Mark\", \"basic\", 20).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`For this next example:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`5`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mark\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"junior\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`employee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ruth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"senior\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`contract`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"basic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) \u003c- employee(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"junior\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`contract`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"advanced\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`40`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) \u003c- employee(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`X`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"senior\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@output(\"contract\").`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Any junior employee X will have a “basic” contract with stipend 20. Any senior employee X will have an “advanced” contract with stipend 40. The constants filter the facts to which the rules apply, so the basic contract rule applies only to Mark, and the advanced contract rule applies only to Ruth.`}),`\n`,_jsx(_components.p,{children:`The expected result:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`prolog`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`prolog`,children:_jsxs(_components.code,{language:`prolog`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`contract`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mark\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"basic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`contract`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ruth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"advanced\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`40`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`.`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Rules","description":"Linear rules, join rules, facts, and constants in Vadalog.","href":"/vadalog/rules"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Linear Rules","slug":"linear-rules","depth":2,"children":[]},{"title":"Facts","slug":"facts","depth":2,"children":[]},{"title":"Join Rules","slug":"join-rules","depth":2,"children":[]},{"title":"Constants within Rules","slug":"constants-within-rules","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/localhost/59112c55929f7b0a/assets/static-search.js"],"subdomain":"localhost","siteName":"Prometheux","title":"Rules - Prometheux","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"vadalog/rules.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Linear rules, join rules, facts, and constants in Vadalog.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prometheux\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/favicons/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicons/favicon-32x32.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicons/favicon-16x16.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicons/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Rules - Prometheux\">\u003cmeta data-mint-head property=\"og:description\" content=\"Linear rules, join rules, facts, and constants in Vadalog.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prometheux\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./vadalog/rules\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Rules - Prometheux\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Linear rules, join rules, facts, and constants in Vadalog.\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/favicons/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prometheux\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4a90fd\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./vadalog/rules\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/vadalog/rules.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Prometheux\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Prometheux\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/vadalog/rules.md","siteName":"Prometheux","nav":{"global":{"anchors":[{"anchor":"Community (Coming Soon)","icon":"discord","color":{"light":"#ffee16","dark":"#ffee16"},"href":"https://docs.prometheux.ai/resources/community"}]},"groups":[{"group":"Introduction","pages":[{"title":"Getting Started","href":"/introduction"}]},{"group":"Get Started","pages":[{"title":"Platform Overview","href":"/get-started/platform-overview"},{"title":"Quickstart","href":"/get-started/quickstart"},{"title":"Your First Ontology","href":"/get-started/your-first-ontology"},{"group":"Installation","pages":[{"title":"Installation","href":"/get-started/installation/overview"},{"title":"Prometheux Cloud","href":"/get-started/installation/cloud"},{"title":"Snowflake Native App","href":"/get-started/installation/snowflake"},{"group":"On-Premises","pages":[{"title":"On (Cloud) Premises","href":"/get-started/installation/on-premises/cloud-premises"},{"title":"Single VM","href":"/get-started/installation/on-premises/single-vm"},{"title":"Physical Premises","href":"/get-started/installation/on-premises/physical-premises"}]},{"group":"Databricks","pages":[{"title":"Databricks","href":"/get-started/installation/databricks/overview"},{"title":"Databricks Native App","href":"/get-started/installation/databricks/native-app"},{"title":"Installing PX on Databricks \u0026 Connectors","href":"/get-started/installation/databricks/connectors"}]},{"title":"Palantir Foundry","href":"/get-started/installation/palantir"}]}]},{"group":"Platform","pages":[{"title":"Data Connections","href":"/platform/data-connections"},{"title":"Ontologies","href":"/platform/ontologies"},{"title":"Ontology Graph","href":"/platform/ontology-graph"},{"title":"Concepts \u0026 Lineage","href":"/platform/concepts-and-lineage"},{"title":"Ontology Workspace","href":"/platform/ontology-workspace"},{"title":"Concept Editor","href":"/platform/concept-editor"},{"title":"Context \u0026 LLM Concepts","href":"/platform/context-and-llm-concepts"},{"group":"Apps","pages":[{"title":"Apps","href":"/platform/apps/overview"},{"title":"Your first app","href":"/platform/apps/your-first-app"},{"title":"Forms and parameters","href":"/platform/apps/forms-and-parameters"},{"title":"Selects, triggers and drill-downs","href":"/platform/apps/selects-triggers-and-drill-downs"},{"title":"The App Editor","href":"/platform/apps/the-app-editor"},{"title":"How apps run","href":"/platform/apps/how-apps-run"},{"title":"App definition reference","href":"/platform/apps/schema-reference"}]},{"title":"AI Assistant","href":"/platform/ai-assistant"},{"title":"Compute","href":"/platform/compute"},{"title":"Settings","href":"/platform/settings"}]},{"group":"Integrations","pages":[{"title":"PX APIs","href":"/integrations/overview"},{"title":"Python SDK","href":"/integrations/python-sdk"},{"title":"TypeScript SDK","href":"/integrations/typescript-sdk"},{"title":"SDK Function Reference","href":"/integrations/sdk-reference"},{"title":"REST API","href":"/integrations/rest-api"},{"title":"Config","href":"/integrations/config"},{"title":"Bring Your Own Frontend","href":"/integrations/bring-your-own-frontend"},{"title":"Chat API","href":"/integrations/chat-api"},{"group":"CLI","pages":[{"title":"Overview","href":"/integrations/cli/overview"},{"title":"Installation","href":"/integrations/cli/installation"},{"title":"Quickstart","href":"/integrations/cli/quickstart"},{"title":"Authoring a workspace","href":"/integrations/cli/authoring"},{"title":"Context as code","href":"/integrations/cli/context-as-code"},{"title":"Command reference","href":"/integrations/cli/command-reference"},{"title":"Agent skill","href":"/integrations/cli/agent-skill"},{"title":"CI/CD","href":"/integrations/cli/ci-cd"}]},{"group":"MCP","pages":[{"title":"AI Agent Integration via MCP","href":"/integrations/mcp/overview"},{"title":"Local MCP Server","href":"/integrations/mcp/local"},{"title":"Remote MCP Server","href":"/integrations/mcp/remote"},{"title":"Connect Claude","href":"/integrations/mcp/claude"},{"title":"Connect Claude Code","href":"/integrations/mcp/claude-code"},{"title":"Connect ChatGPT","href":"/integrations/mcp/chatgpt"},{"title":"Connect Cursor","href":"/integrations/mcp/cursor"},{"title":"Connect Genie Code","href":"/integrations/mcp/databricks-genie"},{"title":"Connect Snowflake Cortex","href":"/integrations/mcp/snowflake-cortex"}]},{"group":"API Reference","pages":[{"title":"Authentication","href":"/integrations/api-endpoints/authentication"},{"title":"Ontologies","href":"/integrations/api-endpoints/ontologies"},{"title":"Ontology Sharing","href":"/integrations/api-endpoints/sharing"},{"title":"Concepts","href":"/integrations/api-endpoints/concepts"},{"title":"Data Sources","href":"/integrations/api-endpoints/data"},{"title":"Schema","href":"/integrations/api-endpoints/schema"},{"title":"Knowledge Graph","href":"/integrations/api-endpoints/knowledge-graph"},{"title":"Vadalog","href":"/integrations/api-endpoints/vadalog"},{"title":"Vadalingo","href":"/integrations/api-endpoints/vadalingo"},{"title":"Apps","href":"/integrations/api-endpoints/apps"},{"title":"Schedules","href":"/integrations/api-endpoints/schedules"},{"title":"Context Layer","href":"/integrations/api-endpoints/context-layer"},{"title":"AI Agent","href":"/integrations/api-endpoints/agent"},{"title":"Assistant","href":"/integrations/api-endpoints/assistant"},{"title":"Chat History","href":"/integrations/api-endpoints/chat-history"},{"title":"Alerts","href":"/integrations/api-endpoints/alerts"},{"title":"Compute","href":"/integrations/api-endpoints/compute"}]}]},{"group":"Examples","pages":[{"title":"Examples Overview","href":"/examples/overview"},{"group":"Patterns","pages":[{"title":"Graph Analytics","href":"/examples/patterns/graph-analytics"},{"title":"Recursion","href":"/examples/patterns/recursion"},{"title":"State Machine","href":"/examples/patterns/state-machine"}]},{"group":"Finance","pages":[{"title":"Banking Supervision","href":"/examples/finance/banking-supervision"},{"title":"Card Clearing Migration","href":"/examples/finance/card-clearing-migration"},{"title":"Non-Performing Loans","href":"/examples/finance/non-performing-loans"}]}]},{"group":"Vadalog Reference","pages":[{"title":"What is Vadalog?","href":"/vadalog/overview"},{"title":"Thinking in Vadalog","href":"/vadalog/thinking-in-vadalog"},{"title":"Grammar Reference","href":"/vadalog/grammar"},{"title":"Language Primitives","description":"Core Vadalog concepts: rules, facts, data types, variables, and labelled nulls.","href":"/vadalog/language-primitives"},{"title":"Rules","href":"/vadalog/rules"},{"group":"Expressions","pages":[{"title":"Expressions","description":"An overview of expressions in Vadalog: operators, conditions, assignments, and functions.","href":"/vadalog/expressions/overview"},{"title":"Operators","href":"/vadalog/expressions/operators"},{"title":"Negation","href":"/vadalog/expressions/negation"},{"title":"Conditions \u0026 Assignments","href":"/vadalog/expressions/conditions-assignments"},{"title":"Recursion","href":"/vadalog/expressions/recursion"},{"title":"Aggregations","href":"/vadalog/expressions/aggregations"},{"title":"Collections","href":"/vadalog/expressions/collections"},{"title":"Specialized Functions","href":"/vadalog/expressions/specialized-functions"},{"title":"AI Functions","href":"/vadalog/expressions/ai-functions"}]},{"title":"Annotations","href":"/vadalog/annotations"},{"title":"Data Sources","href":"/vadalog/data-sources"},{"title":"Chase \u0026 Provenance","href":"/vadalog/chase-provenance"},{"title":"Explanations","href":"/vadalog/explanations"},{"title":"Graph Analytics","href":"/vadalog/graph-analytics"},{"title":"SQL Integration","href":"/vadalog/sql-integration"},{"title":"Cypher Integration","href":"/vadalog/cypher-integration"},{"title":"Engine API (Low-Level)","href":"/vadalog/engine-api"}]},{"group":"Resources","pages":[{"title":"FAQ","href":"/resources/faq"},{"title":"Learning Resources","href":"/resources/community"}]}]},"basePath":"","title":"Rules - Prometheux","buildId":"2b1ecce0afe8","dynamics":[],"chunks":[]}