All proofs
Project-declaredLean 4.31.0 · null

Opt is Authorized correctness

Cedar.Thm.Opt.isAuthorized.correctness

Project documentation

Correctness theorem for Opt.isAuthorized: Opt.isAuthorized produces the same term as SymCC.isAuthorized, and Opt.isAuthorized produces the same footprint as footprints

Exact Lean statement

theorem Opt.isAuthorized.correctness (ps : Policies) (εnv : SymEnv) :
  Opt.isAuthorized ps εnv = (do
    let term ← SymCC.isAuthorized ps εnv
    let footprint := footprints (ps.map Policy.toExpr) εnv
    .ok { term, footprint }
  )

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem Opt.isAuthorized.correctness (ps : Policies) (εnv : SymEnv) :  Opt.isAuthorized ps εnv = (do    let term  SymCC.isAuthorized ps εnv    let footprint := footprints (ps.map Policy.toExpr) εnv    .ok { term, footprint }  ):= by  simp [Opt.isAuthorized, SymCC.isAuthorized]  rw [Opt.satisfiedPolicies.correctness .permit]  rw [Opt.satisfiedPolicies.correctness .forbid]  simp_do_let SymCC.satisfiedPolicies .forbid ps εnv as hforbid  simp_do_let SymCC.satisfiedPolicies .permit ps εnv as hpermit  rename_i ft pt  simp only [Except.ok.injEq, Opt.CompileResult.mk.injEq, true_and]  simp only [footprints, List.mapUnion_filterMap, List.mapUnion_map]  rw [List.mapUnion_union_mapUnion']  · apply List.mapUnion_congr    intro p hp    cases p.effect <;> simp only [reduceCtorEq, ↓reduceIte, Option.mapD_none, Option.mapD_some, Function.comp_apply]    · exact Data.Set.union_empty_right (footprint_wf _ _)    · exact Data.Set.union_empty_left (footprint_wf _ _)  · intro p hp    cases p.effect <;> simp [Data.Set.empty_wf, footprint_wf _ _]
Project
Cedar Specification
License
Apache-2.0
Commit
3f093947b8ae
Source
cedar-lean/Cedar/Thm/SymCC/Opt/Authorizer.lean:146-168

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