(*Definition of security class, and its standard partial order.      *) 

(*
SECLEV: security levels
CATEGORY: categories, departments or need-to-know
*)

Definition SECLEV := nat.Parameter CATEGORY : Set.(*SecClass: security class or access class*)

Record SecClass : Set := sclass {level : SECLEV; categs : set CATEGORY}.(*SecClass: security class or access class*)

Record SecClass : Set := sclass {level : SECLEV; categs : set CATEGORY}.(*SecClass: security class or access class*)

Record SecClass : Set := sclass {level : SECLEV; categs : set CATEGORY}.(*SecClass: security class or access class*)

Record SecClass : Set := sclass {level : SECLEV; categs : set CATEGORY}.Definition eq_sc (a b : SecClass) : Prop :=
  level a = level b /\ categs a = categs b.Definition le_sc (a b : SecClass) : Prop :=
  level a <= level b /\ Included (categs a) (categs b).(*********************************************************************) 
(*                  Security Policy Subjects                         *) 
(*********************************************************************) 
 
(*This are global parameters introducing the basic sets of the model.*) 

(*
SUBJECT: all the subjects of the system
GRPNAME: all the group names of the system
root: UNIX superuser
secofr: security officer, in charge of MAC attributes
*)
 
Parameter SUBJECT GRPNAME : Set.Parameter root secofr : SUBJECT.(*These axioms are needed by functions of ListSet.                   *) 
 
Axiom SUBeq_dec : forall x y : SUBJECT, {x = y} + {x <> y}.Axiom GRPeq_dec : forall x y : GRPNAME, {x = y} + {x <> y}.(*********************************************************************) 
(*                         The Filesystem                            *) 
(*********************************************************************) 
 
(*
OBJNAME: all the possible absolute path names for files and directories
BYTE: elements that can be stored in a file
*) 

Parameter OBJNAME BYTE : Set.(*These axioms are needed by functions of ListSet.                   *) 
Axiom OBJNAMEeq_dec : forall x y : OBJNAME, {x = y} + {x <> y}.Axiom BYTEeq_dec : forall x y : BYTE, {x = y} + {x <> y}.(*OBJTYPE: used to distinguish between files and directories*)

Inductive OBJTYPE : Set :=
  | File : OBJTYPE
  | Directory : OBJTYPE.(*OBJTYPE: used to distinguish between files and directories*)

Inductive OBJTYPE : Set :=
  | File : OBJTYPE
  | Directory : OBJTYPE.(*OBJTYPE: used to distinguish between files and directories*)

Inductive OBJTYPE : Set :=
  | File : OBJTYPE
  | Directory : OBJTYPE.

Lemma OBJTYPEeq_dec : forall x y : OBJTYPE, {x = y} + {x <> y}.