Every ancestor set is transitively closed. TODO: it is a bit suprising how this does not already exists. Maybe define it for complete schema and see if it is useful for proving some nice facts about schema.
Equations
- One or more equations did not get rendered due to their size.
Instances For
No external entity type declaration lists an enum entity type as a parent: a definition of the external must list the parent, so only a declaration of the parent, which an enum definition cannot be, can supply it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A partial schema is well-formed when its definitions satisfy the existing schema conditions, its externals satisfy those conditions using only their known ancestors, and no external lists an enum entity type as a parent.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The environment in which PartialSchema.WellFormed checks a partial schema and
PartialSchema.validateEntities validates entities: the validation view with the
default request type.
Equations
- schema.wfEnv = { ets := schema.validationView.ets, acts := schema.validationView.acts, reqty := default }
Instances For
t keeps every declaration of s: its entity types with their definitions,
standard entity types, and listed ancestors, and its actions with their
ancestors and definitions.
- entities (ety : Spec.EntityType) : Data.Map.contains s.ets ety = true → Data.Map.contains t.ets ety = true
- definitions (ety : Spec.EntityType) (entry : EntitySchemaEntry) : Data.Map.find? s.ets ety = some (PartialEntitySchemaEntry.defined entry) → Data.Map.find? t.ets ety = some (PartialEntitySchemaEntry.defined entry)
- standard (ety : Spec.EntityType) (entry : PartialEntitySchemaEntry) : Data.Map.find? s.ets ety = some entry → entry.isStandard = true → ∃ (entry' : PartialEntitySchemaEntry), Data.Map.find? t.ets ety = some entry' ∧ entry'.isStandard = true
- ancestors (ety : Spec.EntityType) (entry : PartialEntitySchemaEntry) (ancestor : Spec.EntityType) : Data.Map.find? s.ets ety = some entry → ancestor ∈ entry.ancestors → ∃ (entry' : PartialEntitySchemaEntry), Data.Map.find? t.ets ety = some entry' ∧ ancestor ∈ entry'.ancestors
- actions (uid : Spec.EntityUID) (entry : PartialActionSchemaEntry) : Data.Map.find? s.acts uid = some entry → ∃ (entry' : PartialActionSchemaEntry), Data.Map.find? t.acts uid = some entry' ∧ entry'.ancestors = entry.ancestors
- actionDefinitions (uid : Spec.EntityUID) (entry : ActionSchemaEntry) : Data.Map.find? s.acts uid = some (PartialActionSchemaEntry.defined entry) → Data.Map.find? t.acts uid = some (PartialActionSchemaEntry.defined entry)
Instances For
z keeps the definition, the standard kind, and the ancestors of the entity entry x.
- definition (entry : EntitySchemaEntry) : x = PartialEntitySchemaEntry.defined entry → z = PartialEntitySchemaEntry.defined entry
- standard : x.isStandard = true → z.isStandard = true
Instances For
The definition that completes an entity entry: its definition, or a standard
entity type with its ancestors, the attributes attrs, and no tags.
Equations
- One or more equations did not get rendered due to their size.
- Cedar.Validation.PartialEntitySchemaEntry.completeWith attrs (Cedar.Validation.PartialEntitySchemaEntry.defined entry) = entry
Instances For
The schema that completes p: it defines each external entity type of p with
the attributes attrs, and each external action by its validation view.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Coercing a schema to a partial schema preserves its validation view.
Coercing a schema to a partial schema defines each of its entity types.
Coercing a schema to a partial schema defines each of its actions.
A partial schema converts to a schema exactly when it is complete.
The entity validation view maps the entry found in the partial schema.
The action validation view maps the entry found in the partial schema.
A completed partial schema agrees with its validation view.
The validation view keeps an action's ancestors.
The validation view keeps whether an entity type is standard or external.
A standard or external entity type accepts every entity id in the validation view.
Replacing ancestors keeps an entry standard or external.
A well-formed partial schema has a well-formed entity map.
A well-formed partial schema has a well-formed action map.
PartialSchema.WellFormed checks the maps in wfEnv.
Each entity entry of wfEnv is the view of an entry of the partial schema.
Each action entry of wfEnv is the view of an entry of the partial schema.
wfEnv declares the entity types of the partial schema.
wfEnv declares the actions of the partial schema.
In a well-formed partial schema, the view of each entity entry is well-formed.
In a well-formed partial schema, the view of each action is well-formed.
In a well-formed partial schema, no parent of an external entity type is an enum.
In a well-formed partial schema, every ancestor of an entity type is declared.
In a well-formed partial schema, every ancestor of an action is an action.
A well-formed partial schema has no action among its own ancestors.
A well-formed partial schema has transitively closed action ancestors.
A well-formed partial schema declares no action type as an entity type.
In a well-formed partial schema, every entity entry has well-formed ancestors.
With closed ancestors, every entity type reachable through listed ancestors is listed.
An external action's view is well-formed when its ancestors are a well-formed set of actions.
t declares every action of s.
An entity type well-formed for s is well-formed for t.
A type well-formed for s is well-formed for t.
An ancestor listed in a well-formed s is declared in t.
A definition of a well-formed s is well-formed in t.
An action of a well-formed s is well-formed in t.
In t, the ancestors of an ancestor of an action of a well-formed s are
ancestors of that action.
Keeping declarations is transitive.
The entry of t for an entity type of s keeps the entry of s.
Well-formed partial schemas that keep each other's declarations are equal.
A partial schema with well-formed maps is a schema that it keeps and that keeps it.
Completing a partial schema completes each of its entity entries.
Completing with no attributes gives the validation view.
Completing an entry keeps its ancestors.
Completing an entry keeps whether it is standard or external.
The partial schema of a completion defines each entity type of p by its completion.
The partial schema of a completion defines each action of p by its validation view.
Completing p keeps the declarations of p.
Completing a well-formed partial schema with well-formed lifted attributes is well-formed.