Many-Valued Multi-Modal Logic
For all logics, many-valuedness is treated through $FL_{ew}$-algebras.
Many-Valued Linear Order
All logics are defined over a many-valued linear order.
SoleReasoners.isaManyValuedLinearOrder — MethodisaManyValuedLinearOrder(
mvlt::M,
mveq::M,
algebra::FiniteFLewAlgebra
) where {
N,
M<:SMatrix{N,N,FiniteTruth}
}Return true if a domain of cardinality N enriched with two functions mveq and mvlt form a many-valued linear order, i.e., if the following axioms are satisfied:
- ̃=(x,y) = ⊤ iff x = y
- ̃=(x,y) = ̃=(y,x)
- ̃<(x,x) = ⊥
- ̃<(x,z) ⪰ ̃<(x,y) ⋅ ̃<(y,z)
- if ̃<(x,y) ≻ 0 and ̃<(y,z) ≻ 0 then ̃<(x,z) ≻ 0
- if ̃<(x,y) = 0 and ̃<(y,x) = 0 then ̃=(x,y) = 1
- if ̃=(x,y) ≻ 0 then ̃<(x,y) ≺ 1
Return false otherwise.
SoleReasoners.checkManyValuedLinearOrder — MethodcheckManyValuedLinearOrder(
mvlt::M,
mveq::M,
algebra::FiniteFLewAlgebra
) where {
N,
M<:SMatrix{N,N,FiniteTruth}
}Check if a domain of cardinality N enriched with two functions mveq and mvlt form a many-valued linear order, i.e., if the following axioms are satisfied:
- ̃=(x,y) = ⊤ iff x = y
- ̃=(x,y) = ̃=(y,x)
- ̃<(x,x) = ⊥
- ̃<(x,z) ⪰ ̃<(x,y) ⋅ ̃<(y,z)
- if ̃<(x,y) ≻ 0 and ̃<(y,z) ≻ 0 then ̃<(x,z) ≻ 0
- if ̃<(x,y) = 0 and ̃<(y,x) = 0 then ̃=(x,y) = 1
- if ̃=(x,y) ≻ 0 then ̃<(x,y) ≺ 1
SoleReasoners.ManyValuedLinearOrder — Typestruct ManyValuedLinearOrder{N, M<:SMatrix{N,N,FiniteTruth}}
mvlt::M # ̃<
mveq::M # ̃=
algebra::FiniteFLewAlgebra
endGiven an algebra, a many-valued linear order is a structure of the type (D,̃<,̃=) where D is a domain enriched with two functions ̃<, ̃=: D×D→A, for which the following conditions apply for every x, y and z in the domain D:
- ̃=(x,y) = ⊤ iff x = y
- ̃=(x,y) = ̃=(y,x)
- ̃<(x,x) = ⊥
- ̃<(x,z) ⪰ ̃<(x,y) ⋅ ̃<(y,z)
- if ̃<(x,y) ≻ 0 and ̃<(y,z) ≻ 0 then ̃<(x,z) ≻ 0
- if ̃<(x,y) = 0 and ̃<(y,x) = 0 then ̃=(x,y) = 1
- if ̃=(x,y) ≻ 0 then ̃<(x,y) ≺ 1
SoleReasoners.cardinality — Methodcardinality(o::ManyValuedLinearOrder)Return the cardinality (i.e., number of Point1Ds), in the 'ManyValuedLinearOrder`.
Base.show — Methodshow(io::IO, o::ManyValuedLinearOrder)A ManyValuedLinearOrder is printed with the tables for the many-valued functions ̃< and ̃= that represent it.
Many-Valued Multi-Modal Logic
Each logic requires the definition of:
- a data structure representing a world in a specific logic
- the many-valued evaluation functions for the relations in the logic
One should notice how these structures change from the ones in SoleLogics.jl, as in the latter worlds need to carry a specific value that will be used for evaluation purposes (e.g., check and learning), hence they are not suited for reasoning tasks (e.g., frames should be dynamic).
Many-Valued Linear Temporal Logic with Future and Past
SoleReasoners.Point1D — Typestruct Point1D
index::UInt8
endA Point1D is represented by its index in a many-valued linear order domain.
Base.show — Methodshow(io::IO, p::Point1D)A Point1D is printed as xi, where i is its index in the domain associated with the many-valued linear order it belongs to.
SoleReasoners.mvlt — Methodmvlt(x1::Point1D, x2::Point1D, o::ManyValuedLinearOrder)Return the value for the ̃< function between two Point1Ds x1 and x2on the many-valued linear order o.
SoleReasoners.mveq — Methodmvlt(x1::Point1D, x2::Point1D, o::ManyValuedLinearOrder)Return the value for the ̃= function between two Point1Ds x1 and x2on the many-valued linear order o.
SoleReasoners.mvleq — Methodmvleq(x1::Point1D, x2::Point1D, o::ManyValuedLinearOrder)Return the value for the ̃≤ function between two Point1Ds x1 and x2on the many-valued linear order o (i.e., ̃<(x1,x2) ∨ ̃=(x1,x2)).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LTLFP_F),
x1::Point1D,
x2::Point1D,
o::ManyValuedLinearOrder
)Many-valued evaluation function x1Rx2 = ̃<(x1,x2) for relation R=LTLFP_F in many-valued linear order o (how much x2 is in the future w.r.t. x1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LTLFP_P),
x1::Point1D,
x2::Point1D,
o::ManyValuedLinearOrder
)Many-valued evaluation function x1Rx2 = ̃<(x2,x1) for relation R=LTLFP_P in many-valued linear order o (how much x2 is in the past w.r.t. x1).
Many-Valued Compass Logic
SoleReasoners.Point2D — Typestruct Point2D
px::Point1D
py::Point1D
endA Point2D is represented by a Point1D in a many-valued linear order Dx and another Point1D in a many-valued linear order Dy.
Base.show — Methodshow(io::IO, p::Point2D)A Point2D is printed as (xi,yj), where i is the index of the Point1D in the domain associated with the many-valued linear order Dx, and j is the index of the Point1D in the domain associated with the many-valued linear order Dy.
SoleReasoners.mveval — Methodfunction mveval(
::typeof(CL_N),
p1::Point2D,
p2::Point2D,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function p1Rp2 = ̃=(p1x,p2x)⋅̃<(p1y,p2y) for relation R=CL_N in many-valued linear orders ox and oy (how much p2 is norther than p1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(CL_S),
p1::Point2D,
p2::Point2D,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function p1Rp2 = ̃=(p1x,p2x)⋅̃<(p2y,p1y) for relation R=CL_S in many-valued linear orders ox and oy (how much p2 is souther than p1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(CL_E),
p1::Point2D,
p2::Point2D,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function p1Rp2 = ̃<(p1x,p2x)⋅̃=(p1y,p2y) for relation R=CL_E in many-valued linear orders ox and oy (how much p2 is easter than p1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(CL_W),
p1::Point2D,
p2::Point2D,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function p1Rp2 = ̃<(p2x,p1x)⋅̃=(p1y,p2y) for relation R=CL_W in many-valued linear orders ox and oy (how much p2 is wester than p1).
Many-Valued Halpern and Shoham's modal logic of time intervals
SoleReasoners.isaInterval — MethodisaInterval(p1::Point1D, p2::Point1D, o::ManyValuedLinearOrder)Return true if a two Point1Ds p1 and p1 form an interval in the many-valued linear order o, i.e., ̃<(p1,p2) ≻ ⊥; return false otherwise.
SoleReasoners.checkInterval — MethodcheckInterval(p1::Point1D, p2::Point1D, o::ManyValuedLinearOrder)Check if a two Point1Ds p1 and p1 form an interval in the many-valued linear order o, i.e., ̃<(p1,p2) ≻ ⊥.
SoleReasoners.Interval — Typestruct Interval
p1::Point1D
p1::Point1D
endAn Interval is represented by two Point1Ds in the same many-valued linear order.
Base.show — Methodshow(io::IO, p::Interval)An Interval is printed as [xi,xj], where i and j are the indexes of the Point1Ds p1 and p2 in the domain associated with the many-valued linear order they belong to.
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_A),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃=(i1p2,i2p1) for relation R=HS_A in many-valued linear order o (how much i2 is after i1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_L),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃<(i1p2,i2p1) for relation R=HS_L in many-valued linear order o (how much i2 is later than i1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_B),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃=(i1p1,i2p1) ⋅ ̃<(i2p2,i1p2) for relation R=HS_B in many-valued linear order o (how much i2 is at the begin of i1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_E),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃<(i1p1,i2p1) ⋅ ̃=(i1p2,i2p2) for relation R=HS_E in many-valued linear order o (how much i2 is at the end of i1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_D),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃<(i1p1,i2p1) ⋅ ̃<(i2p2,i1p2) for relation R=HS_D in many-valued linear order o (how much i2 is during i1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_O),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃<(i1p1,i2p1) ⋅ ̃<(i2p1,i1p2) ⋅ ̃<(i1p2, i2p2) for relation R=HS_O in many-valued linear order o (how much i2 is overlapping i1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_Ai),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃=(i2p2,i1p1) for relation R=HS_Ai in many-valued linear order o (how much i1 is after i2).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_Li),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃<(i2p2,i1p1) for relation R=HS_Li in many-valued linear order o (how much i1 is later than i2).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_Bi),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃=(i1p1,i2p1) ⋅ ̃<(i1p2,i2p2) for relation R=HS_Bi in many-valued linear order o (how much i1 is at the begin of i2).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_Ei),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃<(i2p1,i1p1) ⋅ ̃=(i1p2,i2p2) for relation R=HS_Ei in many-valued linear order o (how much i1 is at the end of i2).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_Di),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃<(i2p1,i1p1) ⋅ ̃<(i1p2,i2p2) for relation R=HS_Di in many-valued linear order o (how much i1 is during i2).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(HS_Oi),
i1::Interval,
i2::Interval,
o::ManyValuedLinearOrder
)Many-valued evaluation function i1Ri2 = ̃<(i2p1,i1p1) ⋅ ̃<(i1p1,i2p2) ⋅ ̃<(i2p2, i1p2) for relation R=HS_Oi in many-valued linear order o (how much i1 is overlapping i2).
Many-Valued Lutz and Wolter's modal logic of topological relations with rectangular areas aligned with the axes
SoleReasoners.Rectangle — Typestruct Rectangle
ix::Interval
iy::Interval
endA Rectangle is represented by an Interval on a many-valued linear order Dx and another Interval on a many-valued linear order Dy.
Base.show — MethodA Rectangle is printed as ([xi,xj],[yk,yl]), where i and j are the indexes of the Point1Ds of the first Interval in the domain associated with the many-valued linear order Dx and k and l are the indexes of the Point1Ds of the second Interval in the domain associated with the many-valued linear order Dy.
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LRCC8_Rec_DC),
r1::Rectangle,
r2::Rectangle,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function r1Rr2 for relation R=LRCC8RecDC in many-valued linear orders ox and oy (how much r2 is disconnected from r1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LRCC8_Rec_EC),
r1::Rectangle,
r2::Rectangle,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function r1Rr2 for relation R=LRCC8RecEC in many-valued linear orders ox and oy (how much r2 is externally connected with r1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LRCC8_Rec_PO),
r1::Rectangle,
r2::Rectangle,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function r1Rr2 for relation R=LRCC8RecPO in many-valued linear orders ox and oy (how much r2 is partially overlapping with r1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LRCC8_Rec_TPP),
r1::Rectangle,
r2::Rectangle,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function r1Rr2 for relation R=LRCC8RecTPP in many-valued linear orders ox and oy (how much r2 is a tangential proper part of r1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LRCC8_Rec_NTPP),
r1::Rectangle,
r2::Rectangle,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function r1Rr2 for relation R=LRCC8RecNTPP in many-valued linear orders ox and oy (how much r2 is a non-tangential proper part of r1).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LRCC8_Rec_TPPi),
r1::Rectangle,
r2::Rectangle,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function r1Rr2 for relation R=LRCC8RecTPPi in many-valued linear orders ox and oy (how much r1 is a tangential proper part of r2).
SoleReasoners.mveval — Methodfunction mveval(
::typeof(LRCC8_Rec_NTPPi),
r1::Rectangle,
r2::Rectangle,
(ox,oy)::NTuple{2,ManyValuedLinearOrder}
)Many-valued evaluation function r1Rr2 for relation R=LRCC8RecNTPPi in many-valued linear orders ox and oy (how much r1 is a non-tangential proper part of r2).