Section and_now_from_formulas.
Let f k (p : pos k) n : 𝕋' := match n with 0 => £ (pos2nat p) | S n => £ (n+k) end.
Local Fixpoint fol_rem_syms A : 𝔽' :=
match A with
| ⊥               => ⊥
| fol_atom r v    => let A  := @fol_atom Σ' (inr (inr r)) (vec_set_pos (fun p => £ (pos2nat p))) in
let wB := vec_set_pos (fun p => (fot_rem_syms (vec_pos v p))⦃f p⦄)
in  fol_mquant fol_ex (ar_rels _ r) (A ⟑ fol_vec_fa wB)
| fol_bin c A B   => fol_bin c (fol_rem_syms A) (fol_rem_syms B)
| fol_quant q A   => fol_quant q (fol_rem_syms A)
end.
Local Fact fol_rem_syms_rels A :
incl (fol_rels (fol_rem_syms A))
(e :: map (fun r => inr (inl r)) (fol_syms A)
++ map (fun r => inr (inr r)) (fol_rels A)).
Local Fact fol_rem_syms_spec A X M φ :
fol_sem M φ A
<-> fol_sem (@fom_nosyms X M) φ (fol_rem_syms A).
End and_now_from_formulas.
Variable (X : Type) (M : fo_model Σ' X)
(HM : forall x y, fom_rels M e (x##y##ø) <-> x = y)  (* e is an interpreted equality *)
.
Local Definition fol_rel_fun (s : syms Σ) : 𝔽' :=
let n := ar_syms _ s
in ∀∀ fol_mquant fol_fa n (
@fol_atom Σ' (inr (inl s)) (£(S n)##vec_set_pos (fun p => £(pos2nat p)))
⤑ @fol_atom Σ' (inr (inl s)) (£n##vec_set_pos (fun p => £(pos2nat p)))
⤑ @fol_atom Σ' e (£(S n)##£n##ø) ).
Local Fact fol_rel_fun_spec s φ :
fol_sem M φ (fol_rel_fun s)
<-> graph_fun (fun v x => fom_rels M (inr (inl s)) (x##v)).
Local Definition fol_rel_tot (s : syms Σ) : 𝔽' :=
let n := ar_syms _ s
in fol_mquant fol_fa n (∃ @fol_atom Σ' (inr (inl s)) (£0##vec_set_pos (fun p => £(1+pos2nat p)))).
Local Fact fol_rel_tot_spec s φ :
fol_sem M φ (fol_rel_tot s)
<-> graph_tot (fun v x => fom_rels M (inr (inl s)) (x##v)).
Local Definition fol_rels_are_functions ls :=
fol_lconj (map (fun s => fol_rel_fun s ⟑ fol_rel_tot s) ls).
Local Fact fol_rels_are_functions_spec ls φ :
fol_sem M φ (fol_rels_are_functions ls)
<-> forall s, In s ls -> is_graph_function (fun v x => fom_rels M (inr (inl s)) (x##v)).
Definition Σsyms_Σnosyms ls A := fol_rels_are_functions ls ⟑ fol_rem_syms A.
End Sig_remove_symbols.
(* And now the reduction soundness and completeness results for Σsyms_Σnosyms The reduction is from FIN_DEC_DISCR_SAT to FIN_DEC_EQ_SAT *)
(* Soundess of Σsyms_Σnosyms *)

Theorem Σsyms_Σnosyms_sound Σ ls A X :
fo_form_fin_discr_dec_SAT_in A X
-> @fo_form_fin_dec_eq_SAT_in (Σnosyms Σ) (inl tt) eq_refl (Σsyms_Σnosyms ls A) X.