All proofs
Project-declaredLean 4.31.0 · null

Opt satisfied Policies correctness

Cedar.Thm.Opt.satisfiedPolicies.correctness

Project documentation

Correctness theorem for Opt.satisfiedPolicies: Opt.satisfiedPolicies produces the same term as SymCC.satisfiedPolicies, and Opt.satisfiedPolicies produces the same footprint as footprints applied to just the policies with the appropriate effect

Exact Lean statement

theorem Opt.satisfiedPolicies.correctness (effect : Effect) (ps : Policies) (εnv : SymEnv) :
  Opt.satisfiedPolicies effect ps εnv = (do
    let term ← SymCC.satisfiedPolicies effect ps εnv
    let footprint := footprints (ps.filterMap λ p => if p.effect = effect then p.toExpr else none) εnv
    .ok { term, footprint }
  )

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem Opt.satisfiedPolicies.correctness (effect : Effect) (ps : Policies) (εnv : SymEnv) :  Opt.satisfiedPolicies effect ps εnv = (do    let term  SymCC.satisfiedPolicies effect ps εnv    let footprint := footprints (ps.filterMap λ p => if p.effect = effect then p.toExpr else none) εnv    .ok { term, footprint }  ):= by  simp [Opt.satisfiedPolicies, SymCC.satisfiedPolicies]  have := filterMapM_compileWithEffect_correctness effect ps εnv  simp_do_let ps.filterMapM (Opt.compileWithEffect effect · εnv)  case error e h =>    specialize this [] -- doesn't matter what we choose in this case    simp_all [Except.map,  this]  case ok ress hress =>    specialize this ress    simp_all [Except.map,  this.left, footprints]    conv => lhs ; rw [List.mapUnion_eq_mapUnion_id_map]    simp [this, List.mapUnion_filterMap]    apply List.mapUnion_congr    intro p hp    simp only [Option.mapD, id_eq]    grind
Project
Cedar Specification
License
Apache-2.0
Commit
3f093947b8ae
Source
cedar-lean/Cedar/Thm/SymCC/Opt/Authorizer.lean:112-133

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