Relational Assertions #
This file defines relational preconditions and postconditions for pRHL.
Main definitions #
RPre- Relational precondition (predicate on heap pairs)RPost α β- Relational postcondition (predicate on (result, heap) pairs)eqPre- Equality preconditioneqPost- Equality postcondition
Notation #
⟨1⟩- Access left component⟨2⟩- Access right component
Basic types #
@[reducible, inline]
Relational precondition: predicate on pairs of heaps
Equations
Instances For
@[reducible, inline]
Relational postcondition: predicate on pairs of (result, heap)
Equations
- CatCrypt.Relational.RPost α β = (α → CatCrypt.Core.Heap → β → CatCrypt.Core.Heap → Prop)
Instances For
Standard preconditions #
Equality precondition: heaps must be equal
Equations
- CatCrypt.Relational.eqPre h₁ h₂ = (h₁ = h₂)
Instances For
Standard postconditions #
Equality postcondition: results and heaps must be equal
Equations
- CatCrypt.Relational.eqPost a₁ h₁ a₂ h₂ = (a₁ = a₂ ∧ h₁ = h₂)
Instances For
True postcondition: always holds
Equations
- CatCrypt.Relational.truePost x✝³ x✝² x✝¹ x✝ = True
Instances For
Combinators #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Conjunction of postconditions
Equations
- CatCrypt.Relational.andPost P Q a₁ h₁ a₂ h₂ = (P a₁ h₁ a₂ h₂ ∧ Q a₁ h₁ a₂ h₂)
Instances For
EasyCrypt-style ⟨1⟩/⟨2⟩ accessors #
Equations
- CatCrypt.Relational.«term_⟨1⟩» = Lean.ParserDescr.trailingNode `CatCrypt.Relational.«term_⟨1⟩» 1024 0 (Lean.ParserDescr.symbol "⟨1⟩")
Instances For
Equations
- CatCrypt.Relational.«term_⟨2⟩» = Lean.ParserDescr.trailingNode `CatCrypt.Relational.«term_⟨2⟩» 1024 0 (Lean.ParserDescr.symbol "⟨2⟩")
Instances For
Location-based assertions #
Left heap has value v at location l
Equations
- CatCrypt.Relational.leftHas l v h₁ x✝ = (h₁.get l = v)
Instances For
Right heap has value v at location l
Equations
- CatCrypt.Relational.rightHas l v x✝ h₂ = (h₂.get l = v)