(* ** Hoare Rules for Machines that do not reason on codes *)
From Undecidability.TM Require Import TMTac.
From Undecidability.TM Require Export Basic.Basic Compound.MoveToSymbol.
From Undecidability.TM.Hoare Require Import HoareLogic HoareCombinators HoareRegister HoareTactics HoareTacticsView.
(* *** WriteValue *)
Ltac hstep_DoAct :=
lazymatch goal with
| [ |- TripleT ?P ?k (DoAct _) ?Q ] => eapply DoAct_SpecTReg
| [ |- TripleT ?P ?k (Write _) ?Q ] => eapply DoAct_SpecTReg
| [ |- TripleT ?P ?k (WriteMove _ _) ?Q ] => eapply DoAct_SpecTReg
| [ |- TripleT ?P ?k (Move _) ?Q ] => eapply DoAct_SpecTReg
end.
Smpl Add hstep_DoAct : hstep_Spec.

Lemma CaseChar_SpecTReg (sig F : finType) (f : option (boundary + sig) -> F) P:
TripleT ≃≃([],[|Custom P|])
1 (CaseChar f) (fun y => ≃≃([exists t, y = f (current t) /\ P t],[|Custom (fun t => y = f (current t) /\ P t) |])).