Download Knowledge Spaces Mathematica Package - Technical Report

Transcript
KSMP Techical Report
Andrej Zaluski
with the set X1 *)
StructureReplaceSet[Structure[X_,F_],X1_]:=Structure[X1,F]
(* StructureReplaceFamily[SF,
F1] primitive function that replaces the family forming the structure \
with the family F1*)
StructureReplaceFamily[Structure[X_,F_],F1_]:=Structure[X,F1]
(* StructureSetEmptyQ[
SF] returns True if the set forming the structure SF is empty *)
StructureSetEmptyQ[Structure[X_,F_]]:=SetEmptyQ[X]
(* StructureSetNonEmptyQ[
SF] returns True if the set forming the structure SF is non-empty *)
StructureSetNonEmptyQ[Structure[X_,F_]]:=SetNonEmptyQ[X]
(* StructureFamilyEmptyQ[
SF] returns True if the family forming the structure SF is empty*)
StructureFamilyEmptyQ[Structure[X_,F_]]:=SetEmptyQ[F]
(* StructureFamilyNonEmptyQ[
SF] returns True if the family forming the structure SF is non-empty *)
StructureFamilyNonEmptyQ[Structure[X_,F_]]:=SetNonEmptyQ[F]
(* StructureSetElementQ[SF,
s] tests whether s is a element of the set forming the structure SF *)
StructureSetElementQ[Structure[S_,F_],s_]:=SetElementQ[s,S]
(* StructureSetSubsetQ[SF,
S1] tests whether the set S1 is a subset of the set forming the \
structure SF *)
StructureSetSubsetQ[Structure[S_,F_],S1_]:=SubsetQ[S1,S]
(* StructureFamilyElementQ[SF,
f] tests whether the set f is a element of the family forming the \
structure SF *)
StructureFamilyElementQ[Structure[S_,F_],f_]:=SetElementQ[f,F]
(* StructureFamilySubsetQ[SF,
F1] tests whether the family F1 is a subset of the family forming the \
structure SF *)
StructureFamilySubsetQ[Structure[S_,F_],F1_]:=SubsetQ[F1,F]
(* StructureSubsetQ[SF1,
SF2] tests whether the structure SF1 is contained (in the sense S1=S2,
F1\[SubsetEqual]F2), in the structure SF2*)
StructureSubsetQ[Structure[S1_,F1_],Structure[S2_,F2_]]:=Module[{},
If[SubsetQ[F1,F2],True,False]
] /; EqualSetsQ[S1,S2]
(* EqualStructuresQ[SF1,
SF2] tests whether the structure SF1 is equal to the structure SF2 *)
EqualStructuresQ[Structure[S1_,F1_],Structure[S2_,F2_]]:=Module[{},
EqualSetsQ[F1,F2]
] /; EqualSetsQ[S1,S2]
61