All proofs
Project-declaredLean 4.31.0 · null

Determining erroring disjoint when unique ids

Cedar.Thm.determining_erroring_disjoint_when_unique_ids

Plain-language statement

Determining policies and erroring policies of an isAuthorized response are disjoint when input policy IDs are unique.

Exact Lean statement

theorem determining_erroring_disjoint_when_unique_ids (request : Request) (entities : Entities) (policies : Policies) :
  PolicyIdsUnique policies →
    ((isAuthorized request entities policies).determiningPolicies ∩ (isAuthorized request entities policies).erroringPolicies).isEmpty

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem determining_erroring_disjoint_when_unique_ids (request : Request) (entities : Entities) (policies : Policies) :  PolicyIdsUnique policies     ((isAuthorized request entities policies).determiningPolicies ∩ (isAuthorized request entities policies).erroringPolicies).isEmpty:= by  intro  rw [Set.empty_iff_not_exists]  simp only [Set.mem_inter_iff, not_exists, not_and]  rw [determiningPolicies_of]  intro _ h_det h_err  unfold isAuthorized satisfiedPolicies errorPolicies satisfiedWithEffect errored at *  simp only [    Bool.and_eq_true, beq_iff_eq, apply_ite, ite_self, Set.mem_make, List.mem_filterMap, Option.ite_none_right_eq_some, Option.some.injEq  ] at *  -- Extract the determining policy  obtain p₁, _, _, _, _ := h_det  -- Extract the erroring policy, and the fact that it is erroring  obtain p₂, _, h₂, _ := h_err  -- They're the same policy, leading to a contradiction  have heq : p₁ = p₂ := by grind [PolicyIdsUnique]  subst heq  have l₁ :  p, hasError p request entities  ¬satisfied p request entities := by    unfold satisfied hasError    intro    split <;> rename_i _ s <;> simp [s]  have : ¬satisfied _ request entities := l₁ _ h₂  contradiction
Project
Cedar Specification
License
Apache-2.0
Commit
3f093947b8ae
Source
cedar-lean/Cedar/Thm/Authorization.lean:249-274

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