Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3998365
luav.lp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 8, 11:57 PM
Size
783 B
Mime Type
text/plain
Expires
Fri, Jul 10, 11:57 PM (1 d, 7 h)
Engine
blob
Format
Raw Data
Handle
272878
Attached To
rXR Xreate
luav.lp
View Options
#begin_lua
function f(x)
if Val.type(x) == Val.NUM then
return Val.new(Val.FUNC, { "num", x })
elseif Val.type(x) == Val.ID then
return Val.new(Val.FUNC, { "str", x })
elseif Val.type(x) == Val.FUNC then
local f = Val.new(Val.FUNC, x:name(), x:args())
return Val.new(Val.FUNC, { "fun", f })
elseif Val.type(x) == Val.INF then
return Val.new(Val.FUNC, { "inf", Val.new(Val.INF) })
elseif Val.type(x) == Val.SUP then
return Val.new(Val.FUNC, { "sup", Val.new(Val.SUP) })
end
end
function g(a,b)
return Val.cmp(a, b)
end
function h(x)
return '"' .. tostring(x) .. '"'
end
#end_lua.
p(1). p(a). p(#supremum).
p(f(d(x),1)). p(#infimum).
type(X,Y) :- (X,Y) := @f(Z), p(Z).
leq(X,Y) :- p(X), p(Y), @g(X,Y) <= 0.
str(@h(X)) :- p(X).
Event Timeline
Log In to Comment