All proofs
Project-declaredLean 4.31.0 · null

Compile is complete

Cedar.Thm.compile_is_complete

Project documentation

Let x be a Cedar expression and εnv a symbolic environment, where x and εnv are a well-formed input to the symbolic compiler, i.e., εnv.WellFormedFor x. Let t the outcome of compiling x to a Term with respect to εnv, and o a concrete outcome represented by t. Then, the completeness theorem says that there exists a concrete environment...

Exact Lean statement

theorem compile_is_complete {x : Expr} {εnv : SymEnv} {t : Term.Outcome εnv} {o : Outcome Value} :
  εnv.WellFormedFor x →
  compile x εnv = .ok t →
  o ∈ₒ t →
  ∃ (env : Env),
    env.WellFormedFor x ∧
    env ∈ᵢ εnv ∧
    evaluate x env.request env.entities ∼ o

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem compile_is_complete {x : Expr} {εnv : SymEnv} {t : Term.Outcome εnv} {o : Outcome Value} :  εnv.WellFormedFor x   compile x εnv = .ok t   o ₒ t    (env : Env),    env.WellFormedFor x     env ᵢ εnv     evaluate x env.request env.entities ∼ o:= by  intros h₁ h₂ h₃  replace I, h₃, h₅ := h₃  have env, h₆, h₇ := exists_wf_env h₁ h₃  exists env  simp only [h₇, true_and]  constructor  · exists I  · have o', h₈, h₉ := same_results_implies_exists_outcome (compile_bisimulation h₁ h₇ h₃ h₆ h₂)    have h₁₀ := same_outcomes_implies_eq h₅ h₉    subst h₁₀    exact h₈
Project
Cedar Specification
License
Apache-2.0
Commit
3f093947b8ae
Source
cedar-lean/Cedar/Thm/SymbolicCompilation.lean:99-118

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