Section mkdirIsSecure.
intros s t Sub FP1 FP2 FP3 SS TF; inversion TF.
inversion H.
BreakSS.
unfold SecureState in |- *.
split.
unfold DACSecureState in |- *; simpl in |- *.
intros.
cut
(match fsecmat (secmat s) o with
| Some y => set_In u0 (ActReaders y) -> PreDACRead s u0 o
| None => True
end /\
match fsecmat (secmat s) o with
| Some y => set_In u0 (ActWriters y) -> PreDACWrite s u0 o
| None => True
end).
elim (fsecmat (secmat s) o).
unfold PreDACRead, PreDACWrite, mkdir_acl in |- *; simpl in |- *.
elim (fsecmat (secmat s) (MyDir p)); elim (fSSC (subjectSC s) Sub).
elim (OBJNAMEeq_dec p (ObjName o)).
intro y.
rewrite y.
replace (facl (acl s) o) with (None (A:=AccessCtrlListData)).
intros.
elim H8; intros.
split; intro.
tauto.
tauto.
rewrite y in H4.
rewrite y in H2.
symmetry  in |- *.
unfold facl in |- *.
apply NotInDOMIsUndef.
eauto.
intro y.
replace
(facl
(set_add ACLeq_dec
(NEWDIR p,
acldata Sub (primaryGrp s Sub)
(ChangeUserR Sub (empty_set SUBJECT) (ownerp perms))
(ChangeGroupR (AllGrp s) (groupp perms)
(ChangeGroupR (primaryGrp s Sub) (groupp perms)
(empty_set GRPNAME)))
(ChangeUserW Sub (empty_set SUBJECT) (ownerp perms))
(ChangeGroupW (AllGrp s) (groupp perms)
(ChangeGroupW (primaryGrp s Sub) (groupp perms)
(empty_set GRPNAME))) (Sub :: nil) (RootGrp s :: nil))
(acl s)) o) with (facl (acl s) o).
auto.
unfold facl in |- *; apply AddEq.
unfold NEWDIR in |- *.
intro.
apply y.
rewrite H8.
simpl in |- *.
auto.
auto.
auto.
auto.
tauto.
unfold DACSecureState in DAC.
split.
apply ReadWriteImpRead; auto.
apply ReadWriteImpWrite; auto.
unfold MACSecureState in |- *; simpl in |- *; intros.
elim (OBJNAMEeq_dec p (ObjName o)).
intro y.
rewrite y.
replace (fsecmat (secmat s) o) with (None (A:=ReadersWriters)).
replace (fOSC (objectSC s) o) with (None (A:=SecClass)).
elim (fSSC (subjectSC s) u0); elim (fOSC (mkdir_oSC s Sub (ObjName o)) o);
contradiction || auto.
symmetry  in |- *.
unfold fOSC in |- *; apply NotInDOMIsUndef.
replace (DOM OBJeq_dec (objectSC s)) with (DOM OBJeq_dec (acl s)).
rewrite y in H4; rewrite y in H2; eauto.
symmetry  in |- *; unfold fsecmat in |- *; apply NotInDOMIsUndef.
cut (~ set_In o (DOM OBJeq_dec (acl s))).
unfold not in |- *.
intros SI1 SI2; apply SI1.
unfold FuncPre3 in FP3.
unfold Included in FP3.
auto.
rewrite y in H4; rewrite y in H2; eauto.
intro y.
replace (fOSC (mkdir_oSC s Sub p) o) with (fOSC (objectSC s) o).
unfold MACSecureState in MAC; apply MAC.
auto.
Qed.

Lemma MkdirPSP :
forall (s t : SFSstate) (u : SUBJECT),
FuncPre1 s ->
FuncPre2 s ->
FuncPre3 s -> StarProperty s -> TransFunc u s Mkdir t -> StarProperty t.