Section createIsSecure.
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, create_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.
symmetry  in |- *.
unfold facl in |- *.
apply NotInDOMIsUndef.
rewrite y in H4.
rewrite y in H2.
apply UniqNames; assumption.
intro y.
replace
(facl
(set_add ACLeq_dec
(NEWFILE 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 NEWFILE 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 (create_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; apply UniqNames; assumption.
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; apply UniqNames; assumption.
intro y.
replace (fOSC (create_oSC s Sub p) o) with (fOSC (objectSC s) o).
unfold MACSecureState in MAC; apply MAC.
auto.
Qed.

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