(* ** 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.
Ltac hstep_CaseChar :=
lazymatch goal with
| [ |- TripleT ?P ?k (CaseChar _) ?Q ] => eapply CaseChar_SpecTReg
| [ |- TripleT ?P ?k ReadChar ?Q ] => refine (_ : TripleT _ _ (CaseChar (fun x => x)) _);eapply CaseChar_SpecTReg
end.
Smpl Add hstep_CaseChar : hstep_Spec.

Lemma MoveToSymbol_SpecTReg (sig : finType) (f : boundary + sig -> _) g tin:
TripleT ≃≃([],  [|Custom (eq tin) |])
(MoveToSymbol_steps f g tin) (MoveToSymbol f g)
(fun _ => ≃≃([], [|Custom (eq (MoveToSymbol_Fun f g tin))|])).