Multisets of sigma types #
NodupKeys s means that s has no duplicate keys.
Equations
- s.NodupKeys = Quot.liftOn s List.NodupKeys ⋯
Instances For
Alias of the reverse direction of Multiset.nodup_keys.
Finmap #
Lifting from AList #
Lift a permutation-respecting function on AList to Finmap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Induction #
extensionality #
mem #
The predicate a ∈ s means that s has a value associated to the key a.
keys #
empty #
The empty map.
Alias of Finmap.notMem_empty.
singleton #
Equations
- x✝¹.decidableEq x✝ = decidable_of_iff (x✝¹.entries = x✝.entries) ⋯
lookup #
Look up the value associated to a key in a map.
Equations
- Finmap.lookup a s = s.liftOn (AList.lookup a) ⋯
Instances For
Equations
- Finmap.instDecidableMem a s = decidable_of_iff ((Finmap.lookup a s).isSome = true) ⋯
An equivalence between Finmap β and pairs (keys : Finset α, lookup : ∀ a, Option (β a)) such
that (lookup a).isSome ↔ a ∈ keys.
Equations
- One or more equations did not get rendered due to their size.
Instances For
replace #
Replace a key with a given value in a finite map. If the key is not present it does nothing.
Equations
- Finmap.replace a b s = s.liftOn (fun (t : AList β) => (AList.replace a b t).toFinmap) ⋯
Instances For
foldl #
Fold a commutative function over the key-value pairs in the map
Equations
- Finmap.foldl f H d m = Multiset.foldl (fun (d : δ) (s : Sigma β) => f d s.fst s.snd) d m.entries
Instances For
any f s returns true iff there exists a value v in s such that f v = true.
Equations
- Finmap.any f s = Finmap.foldl (fun (x : Bool) (y : α) (z : β y) => x || f y z) ⋯ false s
Instances For
all f s returns true iff f v = true for all values v in s.
Equations
- Finmap.all f s = Finmap.foldl (fun (x : Bool) (y : α) (z : β y) => x && f y z) ⋯ true s
Instances For
erase #
Erase a key from the map. If the key is not present it does nothing.
Equations
- Finmap.erase a s = s.liftOn (fun (t : AList β) => (AList.erase a t).toFinmap) ⋯
Instances For
Alias of Finmap.notMem_erase_self.
sdiff #
sdiff s s' consists of all key-value pairs from s and s' where the keys are in s or
s' but not both.
Equations
- s.sdiff s' = Finmap.foldl (fun (s : Finmap β) (x : α) (x_1 : β x) => Finmap.erase x s) ⋯ s s'
Instances For
Equations
- Finmap.instSDiff = { sdiff := Finmap.sdiff }
insert #
Insert a key-value pair into a finite map, replacing any existing pair with the same key.
Equations
- Finmap.insert a b s = s.liftOn (fun (t : AList β) => (AList.insert a b t).toFinmap) ⋯
Instances For
Alias of Finmap.entries_insert_of_notMem.
extract #
Erase a key from the map, and return the corresponding value, if found.
Equations
- Finmap.extract a s = s.liftOn (fun (t : AList β) => Prod.map id AList.toFinmap (AList.extract a t)) ⋯
Instances For
union #
Equations
- Finmap.instUnion = { union := Finmap.union }