Union_of_Primitive_Recursive_Sets
Provedcomputabilityprimitive-recursive-functionsproofwikiset-union
Let be subsets of the set of natural numbers . Let and both be primitive recursive. Then , the union of and , is primitive recursive.
Preamble
import Mathlib.Computability.Primrec
Formal statement
theorem Union_of_Primitive_Recursive_Sets (f g : ℕ → ℕ) (hf : Nat.Primrec f) (hg : Nat.Primrec g) : Nat.Primrec (fun n => if f n + g n > 0 then 1 else 0) := by sorry
Source