Plain-language statement
Inverse of find?_mem_toList, except that this requires wf
Exact Lean statement
public theorem find?_notmem_keys [LT α] [DecidableLT α] [StrictLT α] [DecidableEq α] {m : Map α β} {k : α}
(wf : m.WellFormed) :
m.find? k = none ↔ k ∉ m.keysFormal artifact
Lean source
public theorem find?_notmem_keys [LT α] [DecidableLT α] [StrictLT α] [DecidableEq α] {m : Map α β} {k : α} (wf : m.WellFormed) : m.find? k = none ↔ k ∉ m.keys:= by unfold find? at * constructor <;> intro h₁ case mp => split at h₁ <;> simp at h₁ rename_i h₂ intro h₃ replace ⟨v, h₃⟩ := in_keys_exists_value h₃ apply h₂ k v ; clear h₂ replace h₃ := (in_list_iff_find?_some wf).mp h₃ unfold find? at h₃ split at h₃ <;> simp only [Option.some.injEq, reduceCtorEq] at h₃ · subst v ; rename_i k' v h₂ simp only [h₂, Option.some.injEq, Prod.mk.injEq, and_true] simpa using List.find?_some h₂ case mpr => split <;> simp ; rename_i k' v h₂ · apply h₁ ; clear h₁ have h₃ := List.find?_some h₂ ; simp at h₃ ; subst k' replace h₂ := List.mem_of_find?_eq_some h₂ exact in_list_in_keys h₂- Project
- Cedar Specification
- License
- Apache-2.0
- Commit
- 3f093947b8ae
- Source
- cedar-lean/Cedar/Thm/Data/Map.lean:443-466
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? 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.
In list iff find? some
Cedar.Data.Map.in_list_iff_find?_some
Plain-language statement
The mpr direction of this does not need the wf precondition and, in fact, is available separately as find?_mem_toList above
Source project: Cedar Specification
Person-level attribution pending.