Satisfied Policies is ok
Cedar.Thm.satisfiedPolicies_is_ok
Plain-language statement
satisfiedPolicies succeeds on sufficiently well-formed inputs.
Exact Lean statement
theorem satisfiedPolicies_is_ok (effect : Effect) {ps ps' : Policies} {Γ : TypeEnv}
(hwf : Γ.WellFormed)
(hwt : wellTypedPolicies ps Γ = .ok ps') :
∃ asserts, satisfiedPolicies effect ps' (SymEnv.ofEnv Γ) = .ok assertsFormal artifact
Lean source
theorem satisfiedPolicies_is_ok (effect : Effect) {ps ps' : Policies} {Γ : TypeEnv} (hwf : Γ.WellFormed) (hwt : wellTypedPolicies ps Γ = .ok ps') : ∃ asserts, satisfiedPolicies effect ps' (SymEnv.ofEnv Γ) = .ok asserts:= by simp only [SymCC.satisfiedPolicies] have ⟨ts, hts⟩ : ∃ ts, List.filterMapM (fun x => compileWithEffect effect x (SymEnv.ofEnv Γ)) ps' = .ok ts := by induction ps' generalizing ps with | nil => exists [] | cons hd tl ih => simp only [List.filterMapM_cons] have hwt_policies := List.mapM_ok_implies_all_from_ok hwt have ⟨p, hmem_p, hwt_p⟩ := hwt_policies hd List.mem_cons_self have ⟨asserts, hasserts⟩ := compileWithEffect_is_ok effect hwf hwt_p simp only [hasserts, bind_pure_comp, Except.bind_ok] cases ps with | nil => contradiction | cons ps_hd ps_tl => simp only [wellTypedPolicies, List.mapM_cons, bind, Except.bind, pure, Except.pure] at hwt split at hwt contradiction split at hwt contradiction rename_i heq simp only [Except.ok.injEq, List.cons.injEq] at hwt simp only [hwt.2] at heq have ⟨ts_tl, hts_tl⟩ := ih heq split · exists ts_tl · simp [hts_tl] simp [hts]- Project
- Cedar Specification
- License
- Apache-2.0
- Commit
- 3f093947b8ae
- Source
- cedar-lean/Cedar/Thm/SymCC/Verifier/WellTypedOk.lean:67-100
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
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.
Source project: Cedar Specification
Person-level attribution pending.
Find? notmem keys
Cedar.Data.Map.find?_notmem_keys
Plain-language statement
Inverse of find?_mem_toList, except that this requires wf
Source project: Cedar Specification
Person-level attribution pending.
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
Source project: Cedar Specification
Person-level attribution pending.