<?xml version="1.0" encoding="UTF-8"?>
<RuleML
xmlns="http://www.ruleml.org/0.9/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ruleml.org/0.9/xsd http://www.ruleml.org/0.9/xsd/fologeq.xsd">

	<!-- a trivial example rulebase for testing the Hornlog RuleML sublanguage -->

	<Assert mapClosure="universal" mapDirection="bidirectional">



				    <Equal>
				      <Ind>some constant</Ind>
				      <Var>d</Var>
				    </Equal>

				<Forall>
					<Var>d</Var>
					<Equal>
				      <Ind>some constant</Ind>
				      <Var>d</Var>
				    </Equal>
				</Forall>

				<Exists>
					<Var>d</Var>
					<Equal>
				      <Ind>some constant</Ind>
				      <Var>d</Var>
				    </Equal>
				</Exists>

		<Forall>
			<Var>person</Var>
			<Var>object</Var>
			<Implies>
				<head>
					<Atom>
						<Rel>own</Rel>
						<Var>person</Var>
						<Var>object</Var>
					</Atom>
				</head>
				<body>
				    <Equal>
				      <Ind>some constant</Ind>
				      <Var>d</Var>
				    </Equal>
				</body>
			</Implies>
		</Forall>

		<Neg>
				    <Equal>
				      <Ind>some constant</Ind>
				      <Var>d</Var>
				    </Equal>
		</Neg>

		<Equivalent>
			<torso>
				    <Equal>
				      <Ind>some constant</Ind>
				      <Var>d</Var>
				    </Equal>
			</torso>
			<torso>
				    <Equal>
				      <Ind>some constant</Ind>
				      <Var>d</Var>
				    </Equal>
			</torso>
		</Equivalent>

		<Equivalent>
			<torso>
				<Atom>
					<Rel>own</Rel>
					<Skolem>test</Skolem>
					<Var>person</Var>
					<Var>object</Var>
				</Atom>
			</torso>
			<torso>
				<Atom>
					<Rel>belongs</Rel>
					<Var>object</Var>
					<Var>person</Var>
					<repo>
						<Var>x</Var>
					</repo>
					<resl>
						<Var>y</Var>
					</resl>
				</Atom>
			</torso>
		</Equivalent>

		<Implies>
			<oid>
				<Ind>claiming-through-disclaimers</Ind>
			</oid>
			<head>
				<Atom>
					<Rel>claim</Rel>
					<Var>person</Var>
					<Var>object</Var>
				</Atom>
			</head>
			<body>
				<And>
					<Forall>
						<Var>x</Var>
						<Implies>
							<oid>
								<Ind>disclaiming-of-other-persons</Ind>
							</oid>
							<body>
								<Atom>
									<Rel>unequal</Rel>
									<Var>x</Var>
									<Var>person</Var>
								</Atom>
							</body>
							<head>
								<Atom>
									<Rel>disclaim</Rel>
									<Var>x</Var>
									<Skolem>test</Skolem>
									<Var>object</Var>
								</Atom>
							</head>
						</Implies>
					</Forall>
					<Atom>
						<Rel>keep</Rel>
						<Var>person</Var>
						<Var>object</Var>
					</Atom>
				</And>
			</body>
		</Implies>

		<Implies>
			<oid>
				<Ind>claiming-or-relinquishing-through-disclaimers</Ind>
			</oid>
			<head>
			    <Equal>
			      <Ind>some constant</Ind>
			      <Var>d</Var>
			    </Equal>
			</head>
			<body>
				<Forall>
					<Var>x</Var>
					<Implies>
						<oid>
							<Ind>disclaiming-of-other-persons</Ind>
						</oid>
						<body>
							<Atom>
								<Rel>unequal</Rel>
								<Var>x</Var>
								<Var>person</Var>
							</Atom>
						</body>
						<head>
							<Atom>
								<Rel>disclaim</Rel>
								<Var>x</Var>
								<Var>object</Var>
								<repo>
									<Var>x</Var>
								</repo>
							</Atom>
						</head>
					</Implies>
				</Forall>
			</body>
		</Implies>
		<Implies>
			<head>
				<Or>
					<Atom>
						<op>
							<Rel>friend</Rel>
						</op>
						<slot>
							<Ind>t</Ind>
							<Var>b</Var>
						</slot>
						<Var>x</Var>
						<Var>y</Var>
						<Ind>Steph</Ind>
					</Atom>
					<Atom>
						<op>
							<Rel>friend</Rel>
						</op>
						<slot>
							<Ind>t</Ind>
							<Var>b</Var>
						</slot>
						<Var>x</Var>
						<Var>y</Var>
						<Ind>Jill</Ind>
					</Atom>
				</Or>
			</head>
			<body>
				<And>
				       <Equal>
					      <Ind>some constant</Ind>
					      <Var>d</Var>
				       </Equal>
					<Atom>
						<op>
							<Rel>friend</Rel>
						</op>
						<Ind>Jane</Ind>
						<Ind>Joan</Ind>
						<Skolem/>
						<Ind>Jack</Ind>
						<Var>y</Var>
						<Ind>Frank</Ind>
						<Plex>
							<Ind/>
						</Plex>
						<repo>
							<Plex>
								<Ind/>
								<Var/>
							</Plex>
						</repo>
						<slot>
							<Ind>yar</Ind>
							<Cterm>
								<op>
									<Ctor>constructor</Ctor>
								</op>
								<Plex>
									<Var>z</Var>
									<slot>
										<Ind>yar2</Ind>
										<Var>c</Var>
									</slot>
								</Plex>
							</Cterm>
						</slot>
						<resl>
							<Plex>
								<slot>
									<Ind/>
									<Var/>
								</slot>
							</Plex>
						</resl>
					</Atom>
				</And>
			</body>
		</Implies>

		<Atom>
			<op>
				<Rel>some relation</Rel>
			</op>
			<slot>
				<Ind>role_name1</Ind>
				<Ind>role 1</Ind>
			</slot>
			<Ind>constant a</Ind>
			<Ind>constant b</Ind>
			<slot>
				<Ind>role_name2</Ind>
				<Ind>role 2</Ind>
			</slot>
		</Atom>

     <Equal>
        <Nano>
          <op><Fun>some function</Fun></op>
          <Ind>arg1</Ind>
          <Ind>arg2</Ind>
          <Ind>arg3</Ind>
        </Nano>
        <Nano>
          <op><Fun>some other function</Fun></op>
          <Ind>arg4</Ind>
          <Ind>arg5</Ind>
          <Ind>arg6</Ind>
        </Nano>
      </Equal>

		

</Assert>

</RuleML>
