Finite-support ghost maps and their resource algebras.
Copyright (c) The Iris-Lean Contributors.
GenMap #
The OFE over gmaps is equivalent to a non-dependent discrete function to an Option type with a
OFE of keys, and a finite number of allocated elements.
In this setting, the ORA is always unital, and as a consequence the oFunctors do not require
unitality in order to act as a URFunctor(Contractive).
GenMap is only intended to be used in the construction of the core IProp model. It is a stripped-down version of the generic heap constructions, which you should use instead.
The ghost map with no allocated keys.
Instances For
The ghost map allocating one value at one key.
Equations
- Iris.GenMap.singleton x y = Iris.GenMap.empty.alter x (some y)
Instances For
Given a GenMap and a predicate that is satisfied by infinitely many naturals (witnessed by: for any N, there exists k ≥ N with P k), we can find a fresh key satisfying P.
OFE #
Equations
- Iris.instOFEGenMap β = { Dist := fun (n : Nat) (x1 x2 : Iris.GenMap β) => Iris.OFE.Dist n x1.car x2.car, dist_eqv := ⋯, eq_dist' := ⋯, dist_lt := ⋯ }
ORA #
The total partial-core operation on finite-support ghost maps.
Equations
- Iris.pcoreGenMap β x = some { car := fun (k : Nat) => Iris.PCore.core (x.car k), bound := ⋯ }
Instances For
The partial core on finite-support ghost maps.
Equations
- Iris.GenMap.raPCore β = { pcore := Iris.pcoreGenMap β, pcore_ne := ⋯, pcore_idem := ⋯ }
Instances For
Validity on finite-support ghost maps.
Equations
- Iris.GenMap.raValid β = { ValidN := fun (n : Nat) (x : Iris.GenMap β) => ✓{n} x.car, Valid := fun (x : Iris.GenMap β) => ✓ x.car, validN_ne := ⋯, valid_iff_validN := ⋯, validN_succ := ⋯ }
Instances For
Equations
- Iris.instUORAGenMap β = { toORA := Iris.instORAGenMap β, toOrderRefl := ⋯, unit := Iris.GenMap.empty, unit_valid := ⋯, unit_left_id := ⋯, pcore_unit := ⋯ }
OFunctors #
Lift a mixed-variance family to finite-support ghost maps.
Equations
- Iris.GenMapOF F A B = Iris.GenMap (F A B)
Instances For
Map a non-expansive function over every allocated ghost-map entry.
Equations
- Iris.GenMap.lift f = { f := fun (g : Iris.GenMap α) => { car := fun (t : Nat) => Option.map f.f (g.car t), bound := ⋯ }, ne := ⋯ }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Iris.instURFunctorContractiveGenMapOF F = { toURFunctor := Iris.instURFunctorGenMapOF F, map_contractive := ⋯ }