Documentation

VCVio.Interaction.Concurrent.Interleaving

Interleaving equivalence of concurrent traces #

This file adds the first quotient-style refinement on top of finite concurrent traces.

Concurrent.Trace records one concrete scheduler linearization of frontier events. Concurrent.Independent then identifies pairs of frontier events that come from independent concurrent components and commute at the residual-spec level.

The present file packages that commuting behavior into an equivalence relation on traces:

This is still intentionally minimal. It does not yet construct quotient types, normal forms, or more elaborate partial-order objects; it only records the standard commuting conversion at the trace level.

def Interaction.Concurrent.Trace.cast {S T : Spec} (h : S = T) (trace : Trace S) :

Transport a concurrent trace along equality of residual concurrent specs.

This is the trace-level cast operation needed when two independent frontier events commute and therefore produce definitionally different but propositionally equal residual specs.

Instances For
    @[simp]
    theorem Interaction.Concurrent.Trace.cast_rfl {S : Spec} (trace : Trace S) :
    cast trace = trace
    @[simp]
    theorem Interaction.Concurrent.Trace.length_cast {S T : Spec} (h : S = T) (trace : Trace S) :
    (cast h trace).length = trace.length

    Equiv trace₁ trace₂ says that the concurrent traces trace₁ and trace₂ represent the same execution up to commuting adjacent independent frontier events.

    This relation is generated by:

    • refl, symm, and trans, making it an equivalence relation;
    • step, which preserves equivalence under a common leading event;
    • swap, which performs one adjacent interchange of two independent frontier events.
    Instances For
      theorem Interaction.Concurrent.Trace.Equiv.length_eq {S : Spec} {trace₁ trace₂ : Trace S} :
      trace₁.Equiv trace₂trace₁.length = trace₂.length

      Interleaving-equivalent traces have the same length.