Documentation

Projects.Esolangs.Cornucopia.Programs.Prog1

@[simp]
@[simp]
theorem Esolangs.Cornucopia.Prog₁.builtin_not_name_of_mem_fs {name₁ name : String} {d : List } [H : BuiltinC name₁] (h : (name, d) fs) :
name₁ name
theorem Esolangs.Cornucopia.Prog₁.get!_fsMap {name : String} :
Map.get! name fsMap = match (motive := Option (String × (List ))List ) List.find? (fun (x : String × (List )) => decide (x.1 = name)) fs with | some p => p.2 | none => Map.get! name builtinFs
@[simp]
theorem Esolangs.Cornucopia.Prog₁.not_builtin_mem_fs {name : String} {f : List } [H : BuiltinC name] :
(name, f)fs
@[simp]
@[simp]
@[simp]
@[simp]
theorem Esolangs.Cornucopia.Prog₁.fs₁_get!_of {fs₁ : Map String (List )} {name : String} (h : CompatibleDefs (Map.ofList defs) fs₁) (d : Def) (h₁ : (name, d) defs) (h₂ : ∀ (f : List ), Map.get! name (Map.ofList defs) = dMap.get! name (builtinFs fs₁) = fMap.get? name fs₁ = some (fn d.arity (d.expr.eval prog (builtinFs fs₁)))Map.get? name fs₁ = some ff = fn d.arity (d.expr.eval prog (builtinFs fs₁))fn d.arity f = Map.get! name (Map.ofList fs)) :
@[simp]
@[simp]
@[simp]
@[simp]
theorem Esolangs.Cornucopia.Prog₁.exprAdd_aux (f : ) (h : ∀ (x y : ), f x y = ((f (x - 1) (y - 1) + 2 - if x = 0 then 1 else 0) - if y = 0 then 1 else 0) - f 0 0) :
f = fun (x1 x2 : ) => x1 + x2
theorem Esolangs.Cornucopia.Prog₁.exprIte_aux (f : ) (h : ∀ (a b c : ), f a b c = f a (b - 1) (c - 1) + 1 - ((if a = 0 then 0 else 1) - b) - ((if a = 0 then 1 else 0) - c) - f a 0 0) :
f = fun (a b c : ) => if a = 0 then c else b