(**************************************************************)
(*   Copyright Dominique Larchey-Wendling [*]                 *)
(*                                                            *)
(*                             [*] Affiliation LORIA -- CNRS  *)
(**************************************************************)
(*      This file is distributed under the terms of the       *)
(*         CeCILL v2 FREE SOFTWARE LICENSE AGREEMENT          *)
(**************************************************************)
(* ** FRACTRAN reduces to Diophantine logic *)
From Undecidability.Synthetic Require Import Undecidability.
From Undecidability.Shared.Libs.DLW
From Undecidability.FRACTRAN
From Undecidability.H10.Fractran Require Import fractran_dio.
From Undecidability.H10.Dio      Require Import dio_elem dio_single dio_logic.
Set Implicit Arguments.
(* A diophantine logic satisfiability question is given a diophantine logic formula f and a valuation for the parameters. Is the formula valid ? *)
Definition DIO_LOGIC_PROBLEM :=
(dio_formula * (nat -> nat))%type.
Definition DIO_LOGIC_SAT (p : DIO_LOGIC_PROBLEM) :=
let (f,ν) := p in df_pred f ν.

Theorem FRACTRAN_HALTING_DIO_LOGIC_SAT : FRACTRAN_HALTING ⪯ DIO_LOGIC_SAT.