Verify Never Matches is complete
Cedar.Thm.verifyNeverMatches_is_complete'
Plain-language statement
Alternate definition of completeness for neverMatches: For a singleton policyset, if symcc says the policy does not neverMatch, then there exists a concrete environment where the policy appears in determiningPolicies.
Exact Lean statement
theorem verifyNeverMatches_is_complete' {p : Policy} {εnv : SymEnv} {asserts : Asserts} :
εnv.StronglyWellFormedForPolicy p →
verifyNeverMatches p εnv = .ok asserts →
εnv ⊧ asserts →
∃ env,
env ∈ᵢ εnv ∧
env.StronglyWellFormedForPolicy p ∧
Env.EnumCompleteFor env εnv ∧
p.id ∈ (Spec.isAuthorized env.request env.entities [p]).determiningPoliciesFormal artifact
Lean source
theorem verifyNeverMatches_is_complete' {p : Policy} {εnv : SymEnv} {asserts : Asserts} : εnv.StronglyWellFormedForPolicy p → verifyNeverMatches p εnv = .ok asserts → εnv ⊧ asserts → ∃ env, env ∈ᵢ εnv ∧ env.StronglyWellFormedForPolicy p ∧ Env.EnumCompleteFor env εnv ∧ p.id ∈ (Spec.isAuthorized env.request env.entities [p]).determiningPolicies:= by intro h₁ h₂ h₃ have ⟨env, h₄, h₅, h₆, h₇⟩ := verifyNeverMatches_is_complete h₁ h₂ h₃ exists env apply And.intro h₄ apply And.intro h₅ apply And.intro h₆ simp only [Spec.isAuthorized, Data.Set.isEmpty, Spec.satisfiedPolicies, satisfiedWithEffect, satisfied, Bool.and_eq_true, beq_iff_eq, decide_eq_true_eq, List.filterMap_cons, h₇, and_true, List.filterMap_nil, Bool.not_eq_eq_eq_not, Bool.not_true, beq_eq_false_iff_ne, ne_eq] cases p.effect <;> simp- Project
- Cedar Specification
- License
- Apache-2.0
- Commit
- 3f093947b8ae
- Source
- cedar-lean/Cedar/Thm/Verification.lean:249-268
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.