Equal states after the same writes #
subst_states -- from `X.set a s₁ = X.set b s₂` (and so on inward), `s₁ = s₂`
EC's sp over the same initializations on both sides, from equal memories, leaves the memories
equal: ={glob D} holds for any D after it. Ours leaves the equation of the two states before
the writes, in the form ∃ old values, (the states with the old values written back) are equal,
next to the new values (S.m{1} = FMap.empty, …). When the new values agree on both sides,
the states themselves are equal: subst_states peels the writes from the outside in
(Lens.eq_of_set_eq_of_get_eq, each X.get sᵢ read through the inner writes and rewritten with
the hypotheses), down to σ₁ = σ₂.
A hypothesis X.set x s₁ = X.set y s₂ (the same lens on both sides).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equal states after the same writes: see the module docstring. Each hypothesis
X.set x s₁ = X.set y s₂ whose X.get s₁ = X.get s₂ follows from the reads through writes and
the hypotheses (simp_reads, simp only [*]) is replaced by s₁ = s₂, until no write is left on
either side. Fails if no hypothesis can be peeled.
Equations
- tacticSubst_states = Lean.ParserDescr.node `tacticSubst_states 1024 (Lean.ParserDescr.nonReservedSymbol "subst_states" false)