All proofs
Project-declaredLean 4.31.0 · null

Level based no dne get attr

Cedar.Thm.level_based_no_dne_get_attr

Plain-language statement

Meaty case. Dispatches on whether the receiver has entity or record type (type_of_getAttr_inversion); the entity branch is where entityDoesNotExist can fire and where EntitiesClosedAtLevel is consumed.

Exact Lean statement

theorem level_based_no_dne_get_attr {e : Expr} {a : Attr} {n : Nat} {c₀ c₁ : Capabilities} {env : TypeEnv} {request : Request} {entities : Entities}
  (hc : CapabilitiesInvariant c₀ request entities)
  (hr : InstanceOfWellFormedEnvironment request entities env)
  (hcl : EntitiesClosedAtLevel entities request n)
  (ht : typeOf (e.getAttr a) c₀ env = Except.ok (tx, c₁))
  (hl : tx.AtLevel env n)
  (ihe : TypedAtLevelHasNoDNEError e) :
  evaluate (.getAttr e a) request entities ≠ .error .entityDoesNotExist

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem level_based_no_dne_get_attr {e : Expr} {a : Attr} {n : Nat} {c₀ c₁ : Capabilities} {env : TypeEnv} {request : Request} {entities : Entities}  (hc : CapabilitiesInvariant c₀ request entities)  (hr : InstanceOfWellFormedEnvironment request entities env)  (hcl : EntitiesClosedAtLevel entities request n)  (ht : typeOf (e.getAttr a) c₀ env = Except.ok (tx, c₁))  (hl : tx.AtLevel env n)  (ihe : TypedAtLevelHasNoDNEError e) :  evaluate (.getAttr e a) request entities  .error .entityDoesNotExist:= by  have  _, tx₁, c₁', ht', h₅, h₆  := type_of_getAttr_inversion ht  rw [h₅] at hl  cases h₆  case inl hety =>    obtain  ety, hety  := hety    exact level_based_no_dne_get_attr_entity hc hr hcl hl ht' hety ihe  case inr hrty =>    obtain  rty, hrty  := hrty    exact level_based_no_dne_get_attr_record hc hr hcl hl ht' hrty ihe
Project
Cedar Specification
License
Apache-2.0
Commit
3f093947b8ae
Source
cedar-lean/Cedar/Thm/Validation/Levels/NoEntitiesError.lean:526-543

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.31.0

Find? ext

Cedar.Data.Map.find?_ext

Plain-language statement

Two well-formed maps are equal if they have the same find? for every key.

authorizationprogram verificationsemantics

Source project: Cedar Specification

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Find? notmem keys

Cedar.Data.Map.find?_notmem_keys

Plain-language statement

Inverse of find?_mem_toList, except that this requires wf

authorizationprogram verificationsemantics

Source project: Cedar Specification

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Find? some iff in values

Cedar.Data.Map.find?_some_iff_in_values

Plain-language statement

The mp direction of this does not need the wf precondition and, in fact, is available separately as find?_some_implies_in_values above

authorizationprogram verificationsemantics

Source project: Cedar Specification

Person-level attribution pending.

View proof record