Additional Complete Lattice Operations #
Extensions to Lean.Order.CompleteLattice providing additional operations
needed for program verification.
Top element of a complete lattice (supremum of all elements)
Instances For
Top element of a complete lattice (supremum of all elements)
Instances For
A complete lattice is a chain-complete partial order.
Instances For
Binary meet (infimum)
Instances For
Binary join (supremum)
Instances For
Indexed infimum
Instances For
Pointwise characterization of indexed infimum on function lattices.
Indexed supremum
Instances For
Pointwise characterization of indexed supremum on function lattices.
Pointwise characterization of CompleteLattice.sup on function lattices:
(sup c) s = sup (fun y => ∃ f, c f ∧ f s = y).
Pointwise characterization of binary meet on function lattices.
Pointwise characterization of binary join on function lattices.
Pointwise characterization of ⊤ on a function lattice.
Pointwise characterization of ⊥ on a function lattice.
Prop Embedding into Partial Order #
Embedding propositions into a partial order with top and bottom.
CompleteLattice instance for Prop #
We define a CompleteLattice structure on Prop where:
- rel is implication (→)
- sup is existential quantification over the predicate
Entailment on a function lattice is pointwise. β is recoverable from the operands' types, so
unlike a carrier-only parameter this is a usable @[grind =] trigger; it lets grind push ⊑
through a state argument down to the base lattice.
Supremum for Prop: true iff some element of the set is true
Instances For
Introduction rule for a ∀ on the RHS of a Prop entailment.
Embedding of propositions into an CompleteLattice type. ⌜p⌝ embeds p : Prop as ⊤ if p holds
and ⊥ otherwise.
Instances For
Embedding of propositions into an CompleteLattice type. ⌜p⌝ embeds p : Prop as ⊤ if p holds
and ⊥ otherwise.
Instances For
Pointwise characterization of CompleteLattice.ofProp on a function lattice.
x ⊑ ⌜p⌝ whenever p holds.
⌜p⌝ ⊑ rhs reduces to assuming p and proving ⊤ ⊑ rhs.
⌜p⌝ ⊓ x ⊑ rhs reduces to assuming p and proving x ⊑ rhs.
Entailment between functions is pointwise.
Entailment between functions follows from pointwise entailment.
The bottom element of the Prop lattice is False. See top_prop_eq for why this is not
@[simp].
Embedding a proposition into the Prop lattice (⌜p⌝) is the proposition itself. See
top_prop_eq for why this is not @[simp].
Prop-valued, fixed-arity specializations of CompleteLattice.ofProp_apply: ⌜p⌝ at a
state-indexed Prop lattice, applied to its states, is p. Fixing the carrier to Prop (a ground
instance) leaves every parameter recoverable from the trigger, so these are usable @[grind =]
lemmas where the general ofProp_apply is not. They reduce a guard straight to its Prop in one
step, avoiding the intermediate (⌜p⌝ : Prop) whose instance ofProp_prop_eq fails to match.