Extract? implies enum complete
Cedar.Thm.extract?_implies_enum_complete
Plain-language statement
SymEnv.extract? always produces a concrete Env that satisfies Env.EnumCompleteFor.
Exact Lean statement
theorem extract?_implies_enum_complete
{env : Env} {εnv : SymEnv} {I : Interpretation} {exprs : List Expr}
(hext : env = εnv.extract? exprs I) :
Env.EnumCompleteFor env εnvFormal artifact
Lean source
theorem extract?_implies_enum_complete {env : Env} {εnv : SymEnv} {I : Interpretation} {exprs : List Expr} (hext : env = εnv.extract? exprs I) : Env.EnumCompleteFor env εnv:= by simp only [ SymEnv.extract?, SymEnv.concretize?, bind, Option.bind, ] at hext split at hext contradiction rename_i req hreq simp only at hext split at hext contradiction rename_i entities hents simp only [Option.some.injEq] at hext simp only [hext, Env.EnumCompleteFor] intros uid δ eids hfind_uid_ty heids heid have huid := sym_entities_entityUIDs_include_enums (Interpretation.repair (footprints exprs εnv) εnv I) hfind_uid_ty heids heid replace ⟨eds, heds, hents⟩ := concretize?_εs_some_eq hents simp only [←hents] have ⟨⟨uid', data⟩, hmem_uid'_data, huid'⟩ := List.mapM_some_implies_all_some heds uid ((Set.mem_union _ _ uid).mpr (Or.intro_right _ huid)) have ⟨δ, d, hfind_uid_ty, hd, heq_uid'⟩ := concretize?_entityData?_some_eq huid' simp only [Prod.mk.injEq] at heq_uid' simp only [←heq_uid'.1] at hmem_uid'_data huid' exists data rw [← Map.list_find?_iff_make_find?] apply List.find?_unique_entry · intros x hmem heq_fst have ⟨uid', data'⟩ := x simp only [beq_iff_eq] at heq_fst simp only [heq_fst] have ⟨uid'', hmem_uid'', huid''⟩ := List.mapM_some_implies_all_from_some heds (uid', data') hmem have ⟨_, d', hfind_uid_ty', hd', heq_uid''⟩ := concretize?_entityData?_some_eq huid'' simp only [Prod.mk.injEq] at heq_uid'' simp only [heq_uid''.1, heq_fst] at hd' hfind_uid_ty' simp only [hfind_uid_ty, Option.some.injEq] at hfind_uid_ty' simp only [←hfind_uid_ty'] at hd' simp only [hd', Option.some.injEq] at hd simp only [←heq_uid''.2, hd, heq_uid'.2] · exact hmem_uid'_data · simp- Project
- Cedar Specification
- License
- Apache-2.0
- Commit
- 3f093947b8ae
- Source
- cedar-lean/Cedar/Thm/SymCC/Enforcer/Extractor.lean:503-547
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.